Archived issue #0030965
Configuration - compilation error when building with FFmpeg 2.8
Description
When building OCCT (7.4.0.beta2) with Clang 6.0 on Ubuntu 16.04, I get these errors:
[ 32%] Building CXX object src/TKService/CMakeFiles/TKService.dir/__/Media/Media_CodecContext.cxx.o
[user path removed]/occt/src/Media/Media_CodecContext.cxx:93:60: error: no member named 'codecpar' in 'AVStream'
if (avcodec_parameters_to_context (myCodecCtx, theStream.codecpar) < 0)
~~~~~~~~~ ^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:104:98: error: no member named 'codecpar' in 'AVStream'
const AVCodecID aCodecId = theCodecId != AV_CODEC_ID_NONE ? (AVCodecID )theCodecId : theStream.codecpar->code...
~~~~~~~~~ ^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:116:17: error: no member named 'codecpar' in 'AVStream'
if (theStream.codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
~~~~~~~~~ ^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:146:17: error: no member named 'codecpar' in 'AVStream'
if (theStream.codecpar->codec_type == AVMEDIA_TYPE_VIDEO
~~~~~~~~~ ^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:241:20: error: use of undeclared identifier
'avcodec_send_packet'
const int aRes = avcodec_send_packet (myCodecCtx, thePacket->Packet());
^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:264:21: error: use of undeclared identifier
'avcodec_receive_frame'
const int aRes2 = avcodec_receive_frame (myCodecCtx, theFrame->ChangeFrame());
^
6 errors generated.
I have FFmpeg 2.8.15-0ubuntu0.16.04.1
[ 32%] Building CXX object src/TKService/CMakeFiles/TKService.dir/__/Media/Media_CodecContext.cxx.o
[user path removed]/occt/src/Media/Media_CodecContext.cxx:93:60: error: no member named 'codecpar' in 'AVStream'
if (avcodec_parameters_to_context (myCodecCtx, theStream.codecpar) < 0)
~~~~~~~~~ ^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:104:98: error: no member named 'codecpar' in 'AVStream'
const AVCodecID aCodecId = theCodecId != AV_CODEC_ID_NONE ? (AVCodecID )theCodecId : theStream.codecpar->code...
~~~~~~~~~ ^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:116:17: error: no member named 'codecpar' in 'AVStream'
if (theStream.codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
~~~~~~~~~ ^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:146:17: error: no member named 'codecpar' in 'AVStream'
if (theStream.codecpar->codec_type == AVMEDIA_TYPE_VIDEO
~~~~~~~~~ ^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:241:20: error: use of undeclared identifier
'avcodec_send_packet'
const int aRes = avcodec_send_packet (myCodecCtx, thePacket->Packet());
^
[user path removed]/occt/src/Media/Media_CodecContext.cxx:264:21: error: use of undeclared identifier
'avcodec_receive_frame'
const int aRes2 = avcodec_receive_frame (myCodecCtx, theFrame->ChangeFrame());
^
6 errors generated.
I have FFmpeg 2.8.15-0ubuntu0.16.04.1
Public activity
2 archived notes
Participants are labeled by their role within this record.
OCCT requires FFmpeg 3.1 or later, which is specified in requirements:
https://dev.opencascade.org/doc/overview/html/index.html#OCCT_OVW_SECTION_5
https://dev.opencascade.org/doc/overview/html/index.html#OCCT_OVW_SECTION_5
I see; then I suppose CMake scripts should report error if older version is found