Skip to content
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

Unable to compile with FFmepg 3.4.8 - Ubuntu Bionic #713

Closed
theofficialgman opened this issue Apr 28, 2022 · 4 comments
Closed

Unable to compile with FFmepg 3.4.8 - Ubuntu Bionic #713

theofficialgman opened this issue Apr 28, 2022 · 4 comments

Comments

@theofficialgman
Copy link

theofficialgman commented Apr 28, 2022

Running this on nvidia jetson, I am unable to compile due to these recent changes:
1b933c3

resulting in these errors on compilation. cmake passes and is higher than the required version:

src/media.cpp: In member function ‘void FeVideoImp::video_thread()’:
src/media.cpp:855:71: error: ‘AVFormatContext {aka struct AVFormatContext}’ has no member named ‘url’
  FeDebug() << "End Video Thread - " << m_parent->m_imp->m_format_ctx->url << std::endl
                                                                       ^~~
src/media.cpp: In member function ‘bool FeMedia::open(const string&, const string&, sf::Texture*)’:
src/media.cpp:1070:30: error: ‘AVFormatContext {aka struct AVFormatContext}’ has no member named ‘url’
      << m_imp->m_format_ctx->url << std::endl;
                              ^~~
src/media.cpp:1095:31: error: ‘AVFormatContext {aka struct AVFormatContext}’ has no member named ‘url’
       << m_imp->m_format_ctx->url << std::endl;
                               ^~~
src/media.cpp:1144:29: error: ‘AVFormatContext {aka struct AVFormatContext}’ has no member named ‘url’
     << m_imp->m_format_ctx->url << std::endl;
                             ^~~
src/media.cpp:1179:32: error: ‘AVFormatContext {aka struct AVFormatContext}’ has no member named ‘url’
        << m_imp->m_format_ctx->url << std::endl;
                                ^~~
src/media.cpp:1194:32: error: ‘AVFormatContext {aka struct AVFormatContext}’ has no member named ‘url’
        << m_imp->m_format_ctx->url << std::endl;
                                ^~~
Makefile:524: recipe for target 'obj/media.o' failed
make: *** [obj/media.o] Error 1

everything compiles perfectly fine if I use filename
could a workaround be implemented to fallback to filename if url is not defined for these older systems?

@theofficialgman
Copy link
Author

@mickelson can with put this behind case statements or something so it can still be compiled on systems with older ffmpeg?

@mickelson
Copy link
Owner

mickelson commented May 19, 2022 via email

mickelson added a commit that referenced this issue May 19, 2022
- Ubuntu Bionic uses an old enough version of FFmpeg that the
  AVFormatContext does not include the "url" field.
- added version check to continue using the filename field if
  required
@mickelson
Copy link
Owner

Please update your code to the latest version from the attract github repository and try again, this should be fixed now with the latest commit

@theofficialgman
Copy link
Author

yup, fixed. thank you!

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

No branches or pull requests

2 participants