@@ -149,6 +149,8 @@ extern "C" {
149
149
#define AV_PIX_FMT_BGR24 PIX_FMT_BGR24
150
150
#define AV_PIX_FMT_RGB24 PIX_FMT_RGB24
151
151
#define AV_PIX_FMT_GRAY8 PIX_FMT_GRAY8
152
+ #define AV_PIX_FMT_BGRA PIX_FMT_BGRA
153
+ #define AV_PIX_FMT_RGBA PIX_FMT_RGBA
152
154
#define AV_PIX_FMT_YUV422P PIX_FMT_YUV422P
153
155
#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
154
156
#define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P
@@ -356,7 +358,7 @@ struct AVInterruptCallbackMetadata
356
358
357
359
// https://github.com/opencv/opencv/pull/12693#issuecomment-426236731
358
360
static
359
- inline const char * _opencv_avcodec_get_name (AVCodecID id)
361
+ inline const char * _opencv_avcodec_get_name (CV_CODEC_ID id)
360
362
{
361
363
#if LIBAVCODEC_VERSION_MICRO >= 100 \
362
364
&& LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION (53 , 47 , 100 )
@@ -1087,11 +1089,11 @@ bool CvCapture_FFMPEG::processRawPacket()
1087
1089
{
1088
1090
rawModeInitialized = true ;
1089
1091
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(58, 20, 100)
1090
- AVCodecID eVideoCodec = ic->streams [video_stream]->codecpar ->codec_id ;
1092
+ CV_CODEC_ID eVideoCodec = ic->streams [video_stream]->codecpar ->codec_id ;
1091
1093
#elif LIBAVFORMAT_BUILD > 4628
1092
- AVCodecID eVideoCodec = video_st->codec ->codec_id ;
1094
+ CV_CODEC_ID eVideoCodec = video_st->codec ->codec_id ;
1093
1095
#else
1094
- AVCodecID eVideoCodec = video_st->codec .codec_id ;
1096
+ CV_CODEC_ID eVideoCodec = video_st->codec .codec_id ;
1095
1097
#endif
1096
1098
const char * filterName = NULL ;
1097
1099
if (eVideoCodec == CV_CODEC (CODEC_ID_H264)
@@ -1394,7 +1396,7 @@ double CvCapture_FFMPEG::getProperty( int property_id ) const
1394
1396
if ( !video_st ) return 0 ;
1395
1397
1396
1398
double codec_tag = 0 ;
1397
- AVCodecID codec_id = AV_CODEC_ID_NONE;
1399
+ CV_CODEC_ID codec_id = AV_CODEC_ID_NONE;
1398
1400
const char * codec_fourcc = NULL ;
1399
1401
1400
1402
switch ( property_id )
@@ -1858,7 +1860,7 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
1858
1860
1859
1861
#if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(54,25,0)
1860
1862
// Set per-codec defaults
1861
- AVCodecID c_id = c->codec_id ;
1863
+ CV_CODEC_ID c_id = c->codec_id ;
1862
1864
avcodec_get_context_defaults3 (c, codec);
1863
1865
// avcodec_get_context_defaults3 erases codec_id for some reason
1864
1866
c->codec_id = c_id;
0 commit comments