mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 113 forks source link

Unable to compile with FFmepg 3.4.8 - Ubuntu Bionic #713

Closed theofficialgman closed 2 years ago

theofficialgman commented 2 years ago

Running this on nvidia jetson, I am unable to compile due to these recent changes: https://github.com/mickelson/attract/commit/1b933c39dbd9201b09140e922babe21939d64dad

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 commented 2 years ago

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

mickelson commented 2 years ago

Yes that’s probably a good idea, I can put some version checking around the use of the url field

On May 18, 2022, at 6:17 PM, theofficialgman @.***> wrote:

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

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

mickelson commented 2 years ago

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 commented 2 years ago

yup, fixed. thank you!