-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_XVMC_MPEG2_MC’ was not declared in this scope #323
Comments
I have the same problem. +1 |
Does this PR help? #318 |
@stevenlovegrove That pull request worked for me :) |
@stevenlovegrove The PR is confirmed working with Mac OS X high sierra. Thanks! |
#318 works for me too, on OS X 10.11. It would be great to have that merged to simplify building. |
Can confirm that #318 works on Archlinux too |
I finally cherry-picked that PR here d9daba6 |
despite having commit |
@visigoth this same thing actually happened to me today too (on an m1 mac as well). I killed my build dir, upgraded my macports installation and it suddenly was fine, so I didn't look further into it, assuming something was out of date / out of sync. |
I'm also getting the same errors:
|
I just hit this now too. Pretty sure it's because XVMC is being removed from ffmpeg entirely. https://www.phoronix.com/news/FFmpeg-Drops-XvMC This fixes it for me (at least against 0.8.0) |
This also fixes the build for me on Intel Mac (Catalina) with up-to-date dependencies from Homebrew. Thanks! I'm not sure I understand how this relates to older ffmpeg versions. Will this break things with older versions of ffmpeg? Otherwise, it would be great to get this merged. |
Thanks @Otterverse. @NikolausDemmel great, that looks easily mergeable - I can accept a PR with that if it is working for you. |
Recent versions of ffmpeg lead to compilation errors. This commit removes XVMC format parsing. It doesn't seem to be relevant these days, see https://www.phoronix.com/news/FFmpeg-Drops-XvMC Credit to [James Otting](https://github.com/Otterverse) for the fix and link.
According to @Otterverse's reference above, it's unlikely anybody is using XVMC, so removing it from the format string should be ok. PR is up. |
I'm getting this erros below related with ffmpeg when compiling under Ubuntu 16.04. Some idea?
[ 71%] Building CXX object src/CMakeFiles/pangolin.dir/video/drivers/ffmpeg.cpp.o
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp: In function ‘std::cxx11::string pangolin::FfmpegFmtToString(AVPixelFormat)’:
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_XVMC_MPEG2_MC’ was not declared in this scope
#define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT##fmt: return #fmt;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:83:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(XVMC_MPEG2_MC);
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_XVMC_MPEG2_IDCT’ was not declared in this scope
#define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT##fmt: return #fmt;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:84:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(XVMC_MPEG2_IDCT);
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_H264’ was not declared in this scope
#define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:104:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_H264);
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
#define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:105:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_MPEG1);
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
#define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:106:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_MPEG2);
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_WMV3’ was not declared in this scope
#define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:107:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_WMV3);
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_VC1’ was not declared in this scope
#define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:108:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_VC1);
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:47:41: error: ‘AV_PIX_FMT_VDPAU_MPEG4’ was not declared in this scope
#define TEST_PIX_FMT_RETURN(fmt) case AV_PIX_FMT_##fmt: return #fmt;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:128:5: note: in expansion of macro ‘TEST_PIX_FMT_RETURN’
TEST_PIX_FMT_RETURN(VDPAU_MPEG4);
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp: In function ‘AVStream* pangolin::CreateStream(AVFormatContext*, pangolin::CodecID, uint64_t, int, AVPixelFormat, int, int)’:
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:519:33: error: ‘CODEC_FLAG_GLOBAL_HEADER’ was not declared in this scope
stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
^
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp: In member function ‘void pangolin::FfmpegVideoOutputStream::WriteFrame(AVFrame*)’:
/home/ota/src/Pangolin/src/video/drivers/ffmpeg.cpp:582:39: error: ‘AVFMT_RAWPICTURE’ was not declared in this scope
if (recorder.oc->oformat->flags & AVFMT_RAWPICTURE) {
^
src/CMakeFiles/pangolin.dir/build.make:1790: recipe for target 'src/CMakeFiles/pangolin.dir/video/drivers/ffmpeg.cpp.o' failed
make[2]: *** [src/CMakeFiles/pangolin.dir/video/drivers/ffmpeg.cpp.o] Error 1
CMakeFiles/Makefile2:135: recipe for target 'src/CMakeFiles/pangolin.dir/all' failed
make[1]: *** [src/CMakeFiles/pangolin.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: