intel / libyami-utils

Libyami Utilities
Apache License 2.0
24 stars 45 forks source link

Compile failure on Ubuntu Trusty (14.04) with AVFORMAT #73

Closed uartie closed 7 years ago

uartie commented 7 years ago

With --enable-avformat, libyami-utils fails to compile using the Ubuntu Trusty provided libav-dev packages. It compiles fine on Ubuntu Xenial (16.04) and Yakkety (16.10). Configure should detect the proper version of libav required to compile.

../tests/decodeinputavformat.cpp:106:5: error: 'AV_CODEC_ID_H265' was not declared in this scope AV_CODEC_ID_H265, YAMI_MIME_H265, ^ ../tests/decodeinputavformat.cpp: In member function 'virtual bool DecodeInputAvFormat::getNextDecodeUnit(VideoDecodeBuffer&)': ../tests/decodeinputavformat.cpp:127:34: error: 'av_packet_unref' was not declared in this scope av_packet_unref(&m_packet); ^ ../tests/decodeinputavformat.cpp: In destructor 'virtual DecodeInputAvFormat::~DecodeInputAvFormat()': ../tests/decodeinputavformat.cpp:153:34: error: 'av_packet_unref' was not declared in this scope av_packet_unref(&m_packet); ^ make[2]: [../tests/grid-decodeinputavformat.o] Error 1 make[2]: Waiting for unfinished jobs.... ../tests/decodeinputavformat.cpp:106:5: error: 'AV_CODEC_ID_H265' was not declared in this scope AV_CODEC_ID_H265, YAMI_MIME_H265, ^ ../tests/decodeinputavformat.cpp: In member function 'virtual bool DecodeInputAvFormat::getNextDecodeUnit(VideoDecodeBuffer&)': ../tests/decodeinputavformat.cpp:127:34: error: 'av_packet_unref' was not declared in this scope av_packet_unref(&m_packet); ^ ../tests/decodeinputavformat.cpp: In destructor 'virtual DecodeInputAvFormat::~DecodeInputAvFormat()': ../tests/decodeinputavformat.cpp:153:34: error: 'av_packet_unref' was not declared in this scope av_packet_unref(&m_packet); ^ make[2]: *** [../tests/decodeinputavformat.o] Error 1

xuguangxin commented 7 years ago

@yizhouwei , please help to check this.

seanvk commented 7 years ago

It builds fine with that flag on ArchLinux and OpenSuse Tumbleweed FWIW

xuguangxin commented 7 years ago

Hi @yizhouwei , any update on this? Seems one of build server is depends on this. You an see the red cross in every pull request.

wudping commented 7 years ago

hi @uartie , I have set up UBUNTU 14.04. But I can't install ffmpeg by command "sudo apt-get install ffmpeg". As the google result: FFmpeg has been removed from Ubuntu 14.04 and was replaced by Libav. This decision has been reversed so that FFmpeg is available now in Ubuntu 15.04 again, but there is still no official package for 14.04.

Can you share your ffmpeg install steps to me?

uartie commented 7 years ago

Install the libavformat-dev libavcodec-dev libavutil-dev packages

seanvk commented 7 years ago

FWIW, Travis also tests on Trusty but I don't enable avformat.

wudping commented 7 years ago

Thanks @uartie , I have reproduce the problem according to your sharing.

xuguangxin commented 7 years ago

Hi @uartie and @seanvk ffmpeg changes repidly and libav may have different API than ffmpeg.We only use ffmpeg to extract container formats. It's not so worth to make sure we can compatible with any version of ffmpeg(libav). Do you think it's ok to use a pinned version of ffmpeg in CI.

wudping commented 7 years ago

I will test libyami-utils on different FFMPEG version. If the API we use is constant from some one version, It would be easy to handle it in two case.

xuguangxin commented 7 years ago

This fixed by #82. thanks @uartie and @seanvk for good discuss.