Change libavcodec CODEC_ID_* to AV_CODEC_ID_*
authorAnton Khirnov <anton@khirnov.net>
Thu, 16 Jan 2014 14:40:37 +0000 (15:40 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 28 Jan 2014 08:00:31 +0000 (14:00 +0600)
CODEC_ID_* have been replaced with AV_CODEC_ID_* in new libavcodec
versions.

Update the code to use those new identifiers.

Added a compatibility code to ffmpeg_compat.h

intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
intern/ffmpeg/ffmpeg_compat.h
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/imbuf/intern/indexer.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_scene.c

index 55040e4db8e3b47c62b8ee3459b04896e892de74..d35b6d56c690706cc15a5b882ef16c69d83b7754 100644 (file)
@@ -68,57 +68,57 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs,
        switch(codec)
        {
        case AUD_CODEC_AAC:
-               m_outputFmt->audio_codec = CODEC_ID_AAC;
+               m_outputFmt->audio_codec = AV_CODEC_ID_AAC;
                break;
        case AUD_CODEC_AC3:
-               m_outputFmt->audio_codec = CODEC_ID_AC3;
+               m_outputFmt->audio_codec = AV_CODEC_ID_AC3;
                break;
        case AUD_CODEC_FLAC:
-               m_outputFmt->audio_codec = CODEC_ID_FLAC;
+               m_outputFmt->audio_codec = AV_CODEC_ID_FLAC;
                break;
        case AUD_CODEC_MP2:
-               m_outputFmt->audio_codec = CODEC_ID_MP2;
+               m_outputFmt->audio_codec = AV_CODEC_ID_MP2;
                break;
        case AUD_CODEC_MP3:
-               m_outputFmt->audio_codec = CODEC_ID_MP3;
+               m_outputFmt->audio_codec = AV_CODEC_ID_MP3;
                break;
        case AUD_CODEC_PCM:
                switch(specs.format)
                {
                case AUD_FORMAT_U8:
-                       m_outputFmt->audio_codec = CODEC_ID_PCM_U8;
+                       m_outputFmt->audio_codec = AV_CODEC_ID_PCM_U8;
                        break;
                case AUD_FORMAT_S16:
-                       m_outputFmt->audio_codec = CODEC_ID_PCM_S16LE;
+                       m_outputFmt->audio_codec = AV_CODEC_ID_PCM_S16LE;
                        break;
                case AUD_FORMAT_S24:
-                       m_outputFmt->audio_codec = CODEC_ID_PCM_S24LE;
+                       m_outputFmt->audio_codec = AV_CODEC_ID_PCM_S24LE;
                        break;
                case AUD_FORMAT_S32:
-                       m_outputFmt->audio_codec = CODEC_ID_PCM_S32LE;
+                       m_outputFmt->audio_codec = AV_CODEC_ID_PCM_S32LE;
                        break;
                case AUD_FORMAT_FLOAT32:
-                       m_outputFmt->audio_codec = CODEC_ID_PCM_F32LE;
+                       m_outputFmt->audio_codec = AV_CODEC_ID_PCM_F32LE;
                        break;
                case AUD_FORMAT_FLOAT64:
-                       m_outputFmt->audio_codec = CODEC_ID_PCM_F64LE;
+                       m_outputFmt->audio_codec = AV_CODEC_ID_PCM_F64LE;
                        break;
                default:
-                       m_outputFmt->audio_codec = CODEC_ID_NONE;
+                       m_outputFmt->audio_codec = AV_CODEC_ID_NONE;
                        break;
                }
                break;
        case AUD_CODEC_VORBIS:
-               m_outputFmt->audio_codec = CODEC_ID_VORBIS;
+               m_outputFmt->audio_codec = AV_CODEC_ID_VORBIS;
                break;
        default:
-               m_outputFmt->audio_codec = CODEC_ID_NONE;
+               m_outputFmt->audio_codec = AV_CODEC_ID_NONE;
                break;
        }
 
        try
        {
-               if(m_outputFmt->audio_codec == CODEC_ID_NONE)
+               if(m_outputFmt->audio_codec == AV_CODEC_ID_NONE)
                        AUD_THROW(AUD_ERROR_SPECS, codec_error);
 
                m_stream = avformat_new_stream(m_formatCtx, NULL);
index cca5f64d9ac46372b35f99ec79fa4d8875273147..3243781940ee571fb07b470d65a27994880e0f67 100644 (file)
@@ -104,6 +104,37 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
 
 #endif
 
+/* FFmpeg upstream 1.0 is the first who added AV_ prefix. */
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100)
+#  define AV_CODEC_ID_NONE CODEC_ID_NONE
+#  define AV_CODEC_ID_MPEG4 CODEC_ID_MPEG4
+#  define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
+#  define AV_CODEC_ID_DNXHD CODEC_ID_DNXHD
+#  define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
+#  define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
+#  define AV_CODEC_ID_DVVIDEO CODEC_ID_DVVIDEO
+#  define AV_CODEC_ID_THEORA CODEC_ID_THEORA
+#  define AV_CODEC_ID_PNG CODEC_ID_PNG
+#  define AV_CODEC_ID_QTRLE CODEC_ID_QTRLE
+#  define AV_CODEC_ID_FFV1 CODEC_ID_FFV1
+#  define AV_CODEC_ID_HUFFYUV CODEC_ID_HUFFYUV
+#  define AV_CODEC_ID_H264 CODEC_ID_H264
+#  define AV_CODEC_ID_FLV1 CODEC_ID_FLV1
+
+#  define AV_CODEC_ID_AAC CODEC_ID_AAC
+#  define AV_CODEC_ID_AC3 CODEC_ID_AC3
+#  define AV_CODEC_ID_MP3 CODEC_ID_MP3
+#  define AV_CODEC_ID_MP2 CODEC_ID_MP2
+#  define AV_CODEC_ID_FLAC CODEC_ID_FLAC
+#  define AV_CODEC_ID_PCM_U8 CODEC_ID_PCM_U8
+#  define AV_CODEC_ID_PCM_S16LE CODEC_ID_PCM_S16LE
+#  define AV_CODEC_ID_PCM_S24LE CODEC_ID_PCM_S24LE
+#  define AV_CODEC_ID_PCM_S32LE CODEC_ID_PCM_S32LE
+#  define AV_CODEC_ID_PCM_F32LE CODEC_ID_PCM_F32LE
+#  define AV_CODEC_ID_PCM_F64LE CODEC_ID_PCM_F64LE
+#  define AV_CODEC_ID_VORBIS CODEC_ID_VORBIS
+#endif
+
 FFMPEG_INLINE
 int av_get_cropped_height_from_codec(AVCodecContext *pCodecCtx)
 {
@@ -124,7 +155,7 @@ int av_get_cropped_height_from_codec(AVCodecContext *pCodecCtx)
        if (pCodecCtx->width == 1920 && 
            pCodecCtx->height == 1088 &&
            pCodecCtx->pix_fmt == PIX_FMT_YUVJ420P &&
-           pCodecCtx->codec_id == CODEC_ID_H264 ) {
+           pCodecCtx->codec_id == AV_CODEC_ID_H264 ) {
                y = 1080;
        }
 #endif
index d975e60146fa68cf73c3abfba3bc872dc539661a..38f80e7cee663dcb11c9d56708d6fc898cef3303 100644 (file)
@@ -70,8 +70,8 @@
 #include "ffmpeg_compat.h"
 
 static int ffmpeg_type = 0;
-static int ffmpeg_codec = CODEC_ID_MPEG4;
-static int ffmpeg_audio_codec = CODEC_ID_NONE;
+static int ffmpeg_codec = AV_CODEC_ID_MPEG4;
+static int ffmpeg_audio_codec = AV_CODEC_ID_NONE;
 static int ffmpeg_video_bitrate = 1150;
 static int ffmpeg_audio_bitrate = 128;
 static int ffmpeg_gop_size = 12;
@@ -119,7 +119,7 @@ static void delete_picture(AVFrame *f)
 static int request_float_audio_buffer(int codec_id)
 {
        /* If any of these codecs, we prefer the float sample format (if supported) */
-       return codec_id == CODEC_ID_AAC || codec_id == CODEC_ID_AC3 || codec_id == CODEC_ID_VORBIS;
+       return codec_id == AV_CODEC_ID_AAC || codec_id == AV_CODEC_ID_AC3 || codec_id == AV_CODEC_ID_VORBIS;
 }
 
 #ifdef WITH_AUDASPACE
@@ -474,7 +474,7 @@ static int ffmpeg_proprty_valid(AVCodecContext *c, const char *prop_name, IDProp
        if (strcmp(prop_name, "video") == 0) {
                if (strcmp(curr->name, "bf") == 0) {
                        /* flash codec doesn't support b frames */
-                       valid &= c->codec_id != CODEC_ID_FLV1;
+                       valid &= c->codec_id != AV_CODEC_ID_FLV1;
                }
        }
 
@@ -580,29 +580,29 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
                c->codec_tag = (('D' << 24) + ('I' << 16) + ('V' << 8) + 'X');
        }
 
-       if (codec_id == CODEC_ID_H264) {
+       if (codec_id == AV_CODEC_ID_H264) {
                /* correct wrong default ffmpeg param which crash x264 */
                c->qmin = 10;
                c->qmax = 51;
        }
        
        /* Keep lossless encodes in the RGB domain. */
-       if (codec_id == CODEC_ID_HUFFYUV) {
+       if (codec_id == AV_CODEC_ID_HUFFYUV) {
                /* HUFFYUV was PIX_FMT_YUV422P before */
                c->pix_fmt = PIX_FMT_RGB32;
        }
 
-       if (codec_id == CODEC_ID_FFV1) {
+       if (codec_id == AV_CODEC_ID_FFV1) {
                c->pix_fmt = PIX_FMT_RGB32;
        }
 
-       if (codec_id == CODEC_ID_QTRLE) {
+       if (codec_id == AV_CODEC_ID_QTRLE) {
                if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
                        c->pix_fmt = PIX_FMT_ARGB;
                }
        }
 
-       if (codec_id == CODEC_ID_PNG) {
+       if (codec_id == AV_CODEC_ID_PNG) {
                if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
                        c->pix_fmt = PIX_FMT_ARGB;
                }
@@ -638,7 +638,7 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
                return NULL;
        }
 
-       if (codec_id == CODEC_ID_QTRLE) {
+       if (codec_id == AV_CODEC_ID_QTRLE) {
                /* normally it should be enough to have buffer with actual image size,
                 * but some codecs like QTRLE might store extra information in this buffer,
                 * so it should be a way larger */
@@ -828,7 +828,7 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
        
        of->oformat = fmt;
        of->packet_size = rd->ffcodecdata.mux_packet_size;
-       if (ffmpeg_audio_codec != CODEC_ID_NONE) {
+       if (ffmpeg_audio_codec != AV_CODEC_ID_NONE) {
                ffmpeg_dict_set_int(&opts, "muxrate", rd->ffcodecdata.mux_rate);
        }
        else {
@@ -850,32 +850,32 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
                        fmt->video_codec = ffmpeg_codec;
                        break;
                case FFMPEG_OGG:
-                       fmt->video_codec = CODEC_ID_THEORA;
+                       fmt->video_codec = AV_CODEC_ID_THEORA;
                        break;
                case FFMPEG_DV:
-                       fmt->video_codec = CODEC_ID_DVVIDEO;
+                       fmt->video_codec = AV_CODEC_ID_DVVIDEO;
                        break;
                case FFMPEG_MPEG1:
-                       fmt->video_codec = CODEC_ID_MPEG1VIDEO;
+                       fmt->video_codec = AV_CODEC_ID_MPEG1VIDEO;
                        break;
                case FFMPEG_MPEG2:
-                       fmt->video_codec = CODEC_ID_MPEG2VIDEO;
+                       fmt->video_codec = AV_CODEC_ID_MPEG2VIDEO;
                        break;
                case FFMPEG_H264:
-                       fmt->video_codec = CODEC_ID_H264;
+                       fmt->video_codec = AV_CODEC_ID_H264;
                        break;
                case FFMPEG_XVID:
-                       fmt->video_codec = CODEC_ID_MPEG4;
+                       fmt->video_codec = AV_CODEC_ID_MPEG4;
                        break;
                case FFMPEG_FLV:
-                       fmt->video_codec = CODEC_ID_FLV1;
+                       fmt->video_codec = AV_CODEC_ID_FLV1;
                        break;
                case FFMPEG_MPEG4:
                default:
-                       fmt->video_codec = CODEC_ID_MPEG4;
+                       fmt->video_codec = AV_CODEC_ID_MPEG4;
                        break;
        }
-       if (fmt->video_codec == CODEC_ID_DVVIDEO) {
+       if (fmt->video_codec == AV_CODEC_ID_DVVIDEO) {
                if (rectx != 720) {
                        BKE_report(reports, RPT_ERROR, "Render width has to be 720 pixels for DV!");
                        return 0;
@@ -891,15 +891,15 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
        }
        
        if (ffmpeg_type == FFMPEG_DV) {
-               fmt->audio_codec = CODEC_ID_PCM_S16LE;
-               if (ffmpeg_audio_codec != CODEC_ID_NONE && rd->ffcodecdata.audio_mixrate != 48000 && rd->ffcodecdata.audio_channels != 2) {
+               fmt->audio_codec = AV_CODEC_ID_PCM_S16LE;
+               if (ffmpeg_audio_codec != AV_CODEC_ID_NONE && rd->ffcodecdata.audio_mixrate != 48000 && rd->ffcodecdata.audio_channels != 2) {
                        BKE_report(reports, RPT_ERROR, "FFMPEG only supports 48khz / stereo audio for DV!");
                        av_dict_free(&opts);
                        return 0;
                }
        }
        
-       if (fmt->video_codec != CODEC_ID_NONE) {
+       if (fmt->video_codec != AV_CODEC_ID_NONE) {
                video_stream = alloc_video_stream(rd, fmt->video_codec, of, rectx, recty, error, sizeof(error));
                PRINT("alloc video stream %p\n", video_stream);
                if (!video_stream) {
@@ -913,7 +913,7 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
                }
        }
 
-       if (ffmpeg_audio_codec != CODEC_ID_NONE) {
+       if (ffmpeg_audio_codec != AV_CODEC_ID_NONE) {
                audio_stream = alloc_audio_stream(rd, fmt->audio_codec, of, error, sizeof(error));
                if (!audio_stream) {
                        if (error[0])
@@ -1418,7 +1418,7 @@ static void ffmpeg_set_expert_options(RenderData *rd)
        if (rd->ffcodecdata.properties)
                IDP_FreeProperty(rd->ffcodecdata.properties);
 
-       if (codec_id == CODEC_ID_H264) {
+       if (codec_id == AV_CODEC_ID_H264) {
                /*
                 * All options here are for x264, but must be set via ffmpeg.
                 * The names are therefore different - Search for "x264 to FFmpeg option mapping"
@@ -1461,7 +1461,7 @@ static void ffmpeg_set_expert_options(RenderData *rd)
                if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT)
                        BKE_ffmpeg_property_add_string(rd, "video", "cqp:0");
        }
-       else if (codec_id == CODEC_ID_DNXHD) {
+       else if (codec_id == AV_CODEC_ID_DNXHD) {
                if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT)
                        BKE_ffmpeg_property_add_string(rd, "video", "mbd:rd");
        }
@@ -1525,7 +1525,7 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
 
                case FFMPEG_PRESET_H264:
                        rd->ffcodecdata.type = FFMPEG_AVI;
-                       rd->ffcodecdata.codec = CODEC_ID_H264;
+                       rd->ffcodecdata.codec = AV_CODEC_ID_H264;
                        rd->ffcodecdata.video_bitrate = 6000;
                        rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
                        rd->ffcodecdata.rc_max_rate = 9000;
@@ -1540,11 +1540,11 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
                case FFMPEG_PRESET_XVID:
                        if (preset == FFMPEG_PRESET_XVID) {
                                rd->ffcodecdata.type = FFMPEG_AVI;
-                               rd->ffcodecdata.codec = CODEC_ID_MPEG4;
+                               rd->ffcodecdata.codec = AV_CODEC_ID_MPEG4;
                        }
                        else if (preset == FFMPEG_PRESET_THEORA) {
                                rd->ffcodecdata.type = FFMPEG_OGG; // XXX broken
-                               rd->ffcodecdata.codec = CODEC_ID_THEORA;
+                               rd->ffcodecdata.codec = AV_CODEC_ID_THEORA;
                        }
 
                        rd->ffcodecdata.video_bitrate = 6000;
@@ -1571,7 +1571,7 @@ void BKE_ffmpeg_image_type_verify(RenderData *rd, ImageFormatData *imf)
                    rd->ffcodecdata.audio_codec <= 0 ||
                    rd->ffcodecdata.video_bitrate <= 1)
                {
-                       rd->ffcodecdata.codec = CODEC_ID_MPEG2VIDEO;
+                       rd->ffcodecdata.codec = AV_CODEC_ID_MPEG2VIDEO;
 
                        BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_DVD);
                }
@@ -1582,26 +1582,26 @@ void BKE_ffmpeg_image_type_verify(RenderData *rd, ImageFormatData *imf)
                audio = 1;
        }
        else if (imf->imtype == R_IMF_IMTYPE_H264) {
-               if (rd->ffcodecdata.codec != CODEC_ID_H264) {
+               if (rd->ffcodecdata.codec != AV_CODEC_ID_H264) {
                        BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_H264);
                        audio = 1;
                }
        }
        else if (imf->imtype == R_IMF_IMTYPE_XVID) {
-               if (rd->ffcodecdata.codec != CODEC_ID_MPEG4) {
+               if (rd->ffcodecdata.codec != AV_CODEC_ID_MPEG4) {
                        BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_XVID);
                        audio = 1;
                }
        }
        else if (imf->imtype == R_IMF_IMTYPE_THEORA) {
-               if (rd->ffcodecdata.codec != CODEC_ID_THEORA) {
+               if (rd->ffcodecdata.codec != AV_CODEC_ID_THEORA) {
                        BKE_ffmpeg_preset_set(rd, FFMPEG_PRESET_THEORA);
                        audio = 1;
                }
        }
 
        if (audio && rd->ffcodecdata.audio_codec < 0) {
-               rd->ffcodecdata.audio_codec = CODEC_ID_NONE;
+               rd->ffcodecdata.audio_codec = AV_CODEC_ID_NONE;
                rd->ffcodecdata.audio_bitrate = 128;
        }
 }
@@ -1615,14 +1615,14 @@ int BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd)
 {
        int codec = rd->ffcodecdata.codec;
 
-       if (codec == CODEC_ID_QTRLE)
+       if (codec == AV_CODEC_ID_QTRLE)
                return TRUE;
 
-       if (codec == CODEC_ID_PNG)
+       if (codec == AV_CODEC_ID_PNG)
                return TRUE;
 
 #ifdef FFMPEG_FFV1_ALPHA_SUPPORTED
-       if (codec == CODEC_ID_FFV1)
+       if (codec == AV_CODEC_ID_FFV1)
                return TRUE;
 #endif
 
index 49a40c461acfdd151ce83ebebac22f0ff9d24a24..74f39d544ccbc0fcf2b2c68a51a0b4dba347d032 100644 (file)
@@ -504,7 +504,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
 
        rv->c = rv->st->codec;
        rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
-       rv->c->codec_id = CODEC_ID_MJPEG;
+       rv->c->codec_id = AV_CODEC_ID_MJPEG;
        rv->c->width = width;
        rv->c->height = height;
 
index 26904cac17f4bebfd62f2b02c67d08a9787eec86..240927efb73b48944336ed68edf7d1f0e2e671ff 100644 (file)
@@ -211,6 +211,9 @@ if(WITH_CODEC_QUICKTIME)
 endif()
 
 if(WITH_CODEC_FFMPEG)
+       list(APPEND INC
+               ../../../../intern/ffmpeg
+       )
        list(APPEND INC_SYS
                ${FFMPEG_INCLUDE_DIRS}
        )
index fe6950e62dd578b88c72c55d64ae802dfed527c8..b222918130346419a7be4c3e98cf13fa0a2d81fd 100644 (file)
@@ -108,7 +108,7 @@ if env['WITH_BF_FRAMESERVER']:
 
 if env['WITH_BF_FFMPEG']:
     defs.append('WITH_FFMPEG')
-    incs += ' ' + env['BF_FFMPEG_INC']
+    incs += ' ' + env['BF_FFMPEG_INC'] + ' #/intern/ffmpeg'
 
 if env['WITH_BF_QUICKTIME']:
     defs.append('WITH_QUICKTIME')
index b378c09a3257d687bd0328b74a6778324711f00f..aa28afc14172c26080376eab15340e7e6fc204cf 100644 (file)
@@ -64,6 +64,7 @@
 #include "BKE_writeffmpeg.h"
 #include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
+#include "ffmpeg_compat.h"
 #endif
 
 #include "ED_render.h"
@@ -3756,31 +3757,31 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
        };
 
        static EnumPropertyItem ffmpeg_codec_items[] = {
-               {CODEC_ID_NONE, "NONE", 0, "None", ""},
-               {CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
-               {CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
-               {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
-               {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
-               {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
-               {CODEC_ID_H264, "H264", 0, "H.264", ""},
-               {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
-               {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
-               {CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
-               {CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""},
-               {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""},
-               {CODEC_ID_PNG, "PNG", 0, "PNG", ""},
+               {AV_CODEC_ID_NONE, "NONE", 0, "None", ""},
+               {AV_CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
+               {AV_CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
+               {AV_CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
+               {AV_CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
+               {AV_CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
+               {AV_CODEC_ID_H264, "H264", 0, "H.264", ""},
+               {AV_CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
+               {AV_CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
+               {AV_CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
+               {AV_CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""},
+               {AV_CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""},
+               {AV_CODEC_ID_PNG, "PNG", 0, "PNG", ""},
                {0, NULL, 0, NULL, NULL}
        };
 
        static EnumPropertyItem ffmpeg_audio_codec_items[] = {
-               {CODEC_ID_NONE, "NONE", 0, "None", ""},
-               {CODEC_ID_MP2, "MP2", 0, "MP2", ""},
-               {CODEC_ID_MP3, "MP3", 0, "MP3", ""},
-               {CODEC_ID_AC3, "AC3", 0, "AC3", ""},
-               {CODEC_ID_AAC, "AAC", 0, "AAC", ""},
-               {CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
-               {CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""},
-               {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
+               {AV_CODEC_ID_NONE, "NONE", 0, "None", ""},
+               {AV_CODEC_ID_MP2, "MP2", 0, "MP2", ""},
+               {AV_CODEC_ID_MP3, "MP3", 0, "MP3", ""},
+               {AV_CODEC_ID_AC3, "AC3", 0, "AC3", ""},
+               {AV_CODEC_ID_AAC, "AAC", 0, "AAC", ""},
+               {AV_CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
+               {AV_CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""},
+               {AV_CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
                {0, NULL, 0, NULL, NULL}
        };
 #endif