Projects
Multimedia
transcode
transcode-1.1.7-libav-10.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File transcode-1.1.7-libav-10.patch of Package transcode (Revision 16)
Currently displaying revision
16
,
Show latest
--- transcode-1.1.7/export/aud_aux.c.libav 2014-05-12 14:33:00.524424335 +0000 +++ transcode-1.1.7/export/aud_aux.c 2014-05-12 15:22:01.853557714 +0000 @@ -326,10 +326,10 @@ static int tc_audio_init_ffmpeg(vob_t *v switch (o_codec) { case 0x50: - codeid = CODEC_ID_MP2; + codeid = AV_CODEC_ID_MP2; break; case 0x2000: - codeid = CODEC_ID_AC3; + codeid = AV_CODEC_ID_AC3; break; default: tc_warn("cannot init ffmpeg with %x", o_codec); @@ -363,7 +363,7 @@ static int tc_audio_init_ffmpeg(vob_t *v TC_UNLOCK_LIBAVCODEC; if (ret < 0) { tc_warn("tc_audio_init_ffmpeg: could not open %s codec !", - (codeid == CODEC_ID_MP2) ?"mpa" :"ac3"); + (codeid == AV_CODEC_ID_MP2) ?"mpa" :"ac3"); return(TC_EXPORT_ERROR); } --- transcode-1.1.7/filter/filter_resample.c.libav 2014-05-12 14:32:29.000000000 +0000 +++ transcode-1.1.7/filter/filter_resample.c 2014-05-12 15:26:57.763368255 +0000 @@ -45,7 +45,7 @@ typedef struct { int bytes_per_sample; - ReSampleContext *resample_ctx; + AVAudioResampleContext *resample_ctx; } ResamplePrivateData; static const char resample_help[] = "" --- transcode-1.1.7/import/decode_lavc.c.libav 2014-05-12 14:33:00.516424069 +0000 +++ transcode-1.1.7/import/decode_lavc.c 2014-05-12 15:32:38.750673288 +0000 @@ -58,37 +58,37 @@ struct ffmpeg_codec { // fourCC to ID mapping taken from MPlayer's codecs.conf static struct ffmpeg_codec ffmpeg_codecs[] = { - {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41", + {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41", {"MP41", "DIV1", ""}}, - {CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42", + {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42", {"MP42", "DIV2", ""}}, - {CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4", + {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4", {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}}, - {CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4", + {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4", {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}}, - {CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg", + {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg", {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}}, - {CODEC_ID_MPEG1VIDEO, TC_CODEC_MPEG1VIDEO, "mpeg1video", + {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPEG1VIDEO, "mpeg1video", {"MPG1", ""}}, - {CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo", + {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo", {"DVSD", ""}}, - {CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1", + {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1", {"WMV1", ""}}, - {CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2", + {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2", {"WMV2", ""}}, - {CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu", + {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu", {"HFYU", ""}}, - {CODEC_ID_H263I, TC_CODEC_H263I, "h263i", + {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i", {"I263", ""}}, - {CODEC_ID_H263P, TC_CODEC_H263P, "h263p", + {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p", {"H263", "U263", "VIV1", ""}}, - {CODEC_ID_RV10, TC_CODEC_RV10, "rv10", + {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10", {"RV10", "RV13", ""}}, - {CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1", + {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1", {"SVQ1", ""}}, - {CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3", + {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3", {"SVQ3", ""}}, - {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video", + {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video", {"MPG2", ""}}, {0, TC_CODEC_UNKNOWN, NULL, {""}}}; --- transcode-1.1.7/import/import_ffmpeg.c.libav 2014-05-12 14:33:00.524424335 +0000 +++ transcode-1.1.7/import/import_ffmpeg.c 2014-05-12 15:31:52.589142857 +0000 @@ -59,51 +59,51 @@ struct ffmpeg_codec { // fourCC to ID mapping taken from MPlayer's codecs.conf static struct ffmpeg_codec ffmpeg_codecs[] = { - {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41", + {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41", {"MP41", "DIV1", ""}}, - {CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42", + {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42", {"MP42", "DIV2", ""}}, - {CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4", + {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4", {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}}, - {CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4", + {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4", {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}}, - {CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg", + {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg", {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}}, - {CODEC_ID_MPEG1VIDEO, TC_CODEC_MPG1, "mpeg1video", + {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPG1, "mpeg1video", {"MPG1", ""}}, - {CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo", + {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo", {"DVSD", ""}}, - {CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1", + {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1", {"WMV1", ""}}, - {CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2", + {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2", {"WMV2", ""}}, - {CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu", + {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu", {"HFYU", ""}}, - {CODEC_ID_H263I, TC_CODEC_H263I, "h263i", + {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i", {"I263", ""}}, - {CODEC_ID_H263P, TC_CODEC_H263P, "h263p", + {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p", {"H263", "U263", "VIV1", ""}}, - {CODEC_ID_H264, TC_CODEC_H264, "h264", + {AV_CODEC_ID_H264, TC_CODEC_H264, "h264", {"H264", "h264", "X264", "x264", "avc1", ""}}, - {CODEC_ID_RV10, TC_CODEC_RV10, "rv10", + {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10", {"RV10", "RV13", ""}}, - {CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1", + {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1", {"SVQ1", ""}}, - {CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3", + {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3", {"SVQ3", ""}}, - {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video", + {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video", {"MPG2", ""}}, - {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG, "mpeg2video", + {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG, "mpeg2video", {"MPG2", ""}}, - {CODEC_ID_ASV1, TC_CODEC_ASV1, "asv1", + {AV_CODEC_ID_ASV1, TC_CODEC_ASV1, "asv1", {"ASV1", ""}}, - {CODEC_ID_ASV2, TC_CODEC_ASV2, "asv2", + {AV_CODEC_ID_ASV2, TC_CODEC_ASV2, "asv2", {"ASV2", ""}}, - {CODEC_ID_FFV1, TC_CODEC_FFV1, "ffv1", + {AV_CODEC_ID_FFV1, TC_CODEC_FFV1, "ffv1", {"FFV1", ""}}, - {CODEC_ID_RAWVIDEO, TC_CODEC_YUV420P, "raw", + {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV420P, "raw", {"I420", "IYUV", ""}}, - {CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw", + {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw", {"Y42B", ""}}, {0, TC_CODEC_UNKNOWN, NULL, {""}}}; @@ -324,13 +324,13 @@ do_avi: // XXX: some codecs need extra data switch (codec->id) { - case CODEC_ID_MJPEG: extra_data_size = 28; break; - case CODEC_ID_LJPEG: extra_data_size = 28; break; - case CODEC_ID_HUFFYUV: extra_data_size = 1000; break; - case CODEC_ID_ASV1: extra_data_size = 8; break; - case CODEC_ID_ASV2: extra_data_size = 8; break; - case CODEC_ID_WMV1: extra_data_size = 4; break; - case CODEC_ID_WMV2: extra_data_size = 4; break; + case AV_CODEC_ID_MJPEG: extra_data_size = 28; break; + case AV_CODEC_ID_LJPEG: extra_data_size = 28; break; + case AV_CODEC_ID_HUFFYUV: extra_data_size = 1000; break; + case AV_CODEC_ID_ASV1: extra_data_size = 8; break; + case AV_CODEC_ID_ASV2: extra_data_size = 8; break; + case AV_CODEC_ID_WMV1: extra_data_size = 4; break; + case AV_CODEC_ID_WMV2: extra_data_size = 4; break; default: extra_data_size = 0; break; } @@ -360,7 +360,7 @@ do_avi: frame_size = x_dim*y_dim + 2*UV_PLANE_SIZE(IMG_YUV_DEFAULT,x_dim,y_dim); // we adapt the color space - if(codec->id == CODEC_ID_MJPEG) { + if(codec->id == AV_CODEC_ID_MJPEG) { enable_levels_filter(); } break; @@ -434,7 +434,7 @@ do_dv: } // we adapt the color space - if(codec->id == CODEC_ID_MJPEG) { + if(codec->id == AV_CODEC_ID_MJPEG) { enable_levels_filter(); } @@ -504,13 +504,13 @@ MOD_decode { int bkey = 0; // check for keyframes - if (codec->id == CODEC_ID_MSMPEG4V3) { + if (codec->id == AV_CODEC_ID_MSMPEG4V3) { if (divx3_is_key(buffer)) bkey = 1; } - else if (codec->id == CODEC_ID_MPEG4) { + else if (codec->id == AV_CODEC_ID_MPEG4) { if (mpeg4_is_key(buffer, bytes_read)) bkey = 1; } - else if (codec->id == CODEC_ID_MJPEG) { + else if (codec->id == AV_CODEC_ID_MJPEG) { bkey = 1; } --- transcode-1.1.7/import/probe_ffmpeg.c.libav 2014-05-12 14:33:00.516424069 +0000 +++ transcode-1.1.7/import/probe_ffmpeg.c 2014-05-12 18:06:57.899206701 +0000 @@ -51,12 +51,7 @@ static void translate_info(const AVForma info->bitrate = st->codec->bit_rate / 1000; info->width = st->codec->width; info->height = st->codec->height; - if (st->r_frame_rate.num > 0 && st->r_frame_rate.den > 0) { - info->fps = av_q2d(st->r_frame_rate); - } else { - /* watch out here */ - info->fps = 1.0/av_q2d(st->codec->time_base); - } + info->fps = 1.0/av_q2d(st->codec->time_base); tc_frc_code_from_value(&info->frc, info->fps); break; } @@ -120,7 +115,7 @@ void probe_ffmpeg(info_t *ipipe) translate_info(lavf_dmx_context, ipipe->probe_info); - av_close_input_file(lavf_dmx_context); + avformat_close_input(&lavf_dmx_context); return; } --- transcode-1.1.7/libtc/tcavcodec.h.libav 2014-05-12 14:33:00.512423937 +0000 +++ transcode-1.1.7/libtc/tcavcodec.h 2014-05-12 15:29:27.800342555 +0000 @@ -32,6 +32,8 @@ #include <libavutil/avutil.h> #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> +#include <libavresample/avresample.h> +#include <libavutil/opt.h> /*************************************************************************/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.