Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Compilation error: many arguments to function ‘gst_h264_parse_sps’ #193

Open
rien333 opened this issue May 12, 2021 · 6 comments
Open

Comments

@rien333
Copy link

rien333 commented May 12, 2021

Whenever I compile this set of plugins (version 1.3.3.rc9, but also seems to happen on HEAD), I get the following error:

/tmp/makepkg/gst-plugins-intel-msdk/src/gstreamer-media-SDK-1.3.3-rc9/gst-libs/mfx/gstmfxdecoder.c: In function ‘gst_mfx_decoder_handle_avc_codec_data’:
/tmp/makepkg/gst-plugins-intel-msdk/src/gstreamer-media-SDK-1.3.3-rc9/gst-libs/mfx/gstmfxdecoder.c:545:45: error: too many arguments to function ‘gst_h264_parse_sps’
  545 |                   if (GST_H264_PARSER_OK == gst_h264_parse_sps(&nalu, &sps, TRUE) &&
      |                                             ^~~~~~~~~~~~~~~~~~
In file included from /tmp/makepkg/gst-plugins-intel-msdk/src/gstreamer-media-SDK-1.3.3-rc9/gst-libs/mfx/gstmfxdecoder.c:24:
/usr/include/gstreamer-1.0/gst/codecparsers/gsth264parser.h:1279:21: note: declared here
 1279 | GstH264ParserResult gst_h264_parse_sps                (GstH264NalUnit *nalu,
      |                     ^~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/gstmfx.dir/build.make:524: CMakeFiles/gstmfx.dir/gst-libs/mfx/gstmfxdecoder.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:163: CMakeFiles/gstmfx.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

I'm using Arch Linux, updated and well, kernel version 5.12.2.arch1-1. I'm using the PKGBUILD from the aur.

Full log I get from yay (an aur helper): t.log

Let me know if I can provide more information.

@brmarkus
Copy link

Can you try to find out which version of gstreamer you have, please?
The mentioned path /usr/include/gstreamer-1.0/gst/codecparsers/gsth264parser.h in your compiler log mentions gstreamer-1.0, which looks quite old...

@rien333
Copy link
Author

rien333 commented May 14, 2021

See my answer below; it's not my system that's outdated, but rather this sdk.


old answer/version information

My gstreamer version is 1.18.4.

The file the error originates from seems to be part of gst-plugins-bad-libs, provided in an official repo:

> yay -F /usr/include/gstreamer-1.0/gst/codecparsers/gsth264parser.h
usr/include/gstreamer-1.0/gst/codecparsers/gsth264parser.h is owned by extra/gst-plugins-bad-libs 1.18.0-2

According to the PKGBUILD, this *-lib package sits at version 1.18.4, which seems to be the newest version (as you would expect from a rolling release distro)

(BTW, note that the gsth264parser.h warns that the h264 parsing library is an unstable API, perhaps I'm encountering some sort of API change?)

@rien333
Copy link
Author

rien333 commented May 15, 2021

The mentioned path /usr/include/gstreamer-1.0/gst/codecparsers/gsth264parser.h in your compiler log mentions gstreamer-1.0, which looks quite old...

The gitlab page of gst-plugins-bad clearly defines gst_h264_parse_sps as a function that takes two arguments. I'm using this entirely up-to-date stable release of gst-plugins-bad (my gsth264parser.h matches the one on gitlab).

The error, in turn, comes from if (GST_H264_PARSER_OK == gst_h264_parse_sps(&nalu, &sps, TRUE) &&... in stmfxdecoder.c, so it seems that it's actually this file that's out of date, and that the last argument ("TRUE") needs to go.

@rien333
Copy link
Author

rien333 commented May 15, 2021

Also note that this is a duplicate issue (#186), which I couldn't find because said issue includes a screenshot of the error instead of a text-based log. Tagging @SiewHoon because this issue has been present for quite a while.

@topilski
Copy link

Same error

@dreirund
Copy link

Mee too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants