diff options
author | Heinz Wiesinger <pprkut@slackbuilds.org> | 2015-05-23 18:42:38 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-06-20 11:55:20 +0700 |
commit | dbf4c04be62be254e5bd9ce8b1ddfe0b12d48f08 (patch) | |
tree | 4cd895594c9e63cead0060438bd7c1c34e15acc2 /multimedia | |
parent | fcf3692ac81d9cbeb7765969a6f17c34901b636f (diff) | |
download | slackbuilds-dbf4c04be62be254e5bd9ce8b1ddfe0b12d48f08.tar.gz |
multimedia/transcode: Fixed building with newer ffmpeg.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/transcode/README | 3 | ||||
-rw-r--r-- | multimedia/transcode/transcode-1.1.7-ffmpeg2.patch | 225 | ||||
-rw-r--r-- | multimedia/transcode/transcode-1.1.7-ffmpeg24.patch | 18 | ||||
-rw-r--r-- | multimedia/transcode/transcode.SlackBuild | 18 |
4 files changed, 262 insertions, 2 deletions
diff --git a/multimedia/transcode/README b/multimedia/transcode/README index f41385a165..d99e428405 100644 --- a/multimedia/transcode/README +++ b/multimedia/transcode/README @@ -17,3 +17,6 @@ MJPEGTOOLS=yes|no (default: no), requires mjpegtools QUICKTIME=yes|no (default: no), requires libquicktime X264=yes|no (default: no), requires x264 XVID=yes|no (default: no), requires xvidcore + +Note that newer versions of the stabilize and transform filters are available +as part of vid.stab and have thus been dropped from this package. diff --git a/multimedia/transcode/transcode-1.1.7-ffmpeg2.patch b/multimedia/transcode/transcode-1.1.7-ffmpeg2.patch index 26d7431402..9a770a6a0d 100644 --- a/multimedia/transcode/transcode-1.1.7-ffmpeg2.patch +++ b/multimedia/transcode/transcode-1.1.7-ffmpeg2.patch @@ -290,6 +290,25 @@ Index: transcode-1.1.7/export/aud_aux.c =================================================================== --- transcode-1.1.7.orig/export/aud_aux.c +++ transcode-1.1.7/export/aud_aux.c +@@ -326,10 +326,18 @@ static int tc_audio_init_ffmpeg(vob_t *vob, int o_codec) + + switch (o_codec) { + case 0x50: ++#if LIBAVCODEC_VERSION_MAJOR < 55 + codeid = CODEC_ID_MP2; ++#else ++ codeid = AV_CODEC_ID_MP2; ++#endif + break; + case 0x2000: ++#if LIBAVCODEC_VERSION_MAJOR < 55 + codeid = CODEC_ID_AC3; ++#else ++ codeid = AV_CODEC_ID_AC3; ++#endif + break; + default: + tc_warn("cannot init ffmpeg with %x", o_codec); @@ -346,7 +346,7 @@ static int tc_audio_init_ffmpeg(vob_t *v //-- set parameters (bitrate, channels and sample-rate) -- @@ -308,10 +327,89 @@ Index: transcode-1.1.7/export/aud_aux.c TC_UNLOCK_LIBAVCODEC; if (ret < 0) { tc_warn("tc_audio_init_ffmpeg: could not open %s codec !", +@@ -371,7 +371,12 @@ static int tc_audio_init_ffmpeg(vob_t *vob, int o_codec) + TC_UNLOCK_LIBAVCODEC; + if (ret < 0) { + tc_warn("tc_audio_init_ffmpeg: could not open %s codec !", +- (codeid == CODEC_ID_MP2) ?"mpa" :"ac3"); ++#if LIBAVCODEC_VERSION_MAJOR < 55 ++ (codeid == CODEC_ID_MP2) ++#else ++ (codeid == AV_CODEC_ID_MP2) ++#endif ++ ?"mpa" :"ac3"); + return(TC_EXPORT_ERROR); + } + Index: transcode-1.1.7/import/import_ffmpeg.c =================================================================== --- transcode-1.1.7.orig/import/import_ffmpeg.c +++ transcode-1.1.7/import/import_ffmpeg.c +@@ -58,6 +58,7 @@ struct ffmpeg_codec { + }; + + // fourCC to ID mapping taken from MPlayer's codecs.conf ++#if LIBAVCODEC_VERSION_MAJOR < 55 + static struct ffmpeg_codec ffmpeg_codecs[] = { + {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41", + {"MP41", "DIV1", ""}}, +@@ -106,6 +107,56 @@ static struct ffmpeg_codec ffmpeg_codecs[] = { + {CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw", + {"Y42B", ""}}, + {0, TC_CODEC_UNKNOWN, NULL, {""}}}; ++#else ++static struct ffmpeg_codec ffmpeg_codecs[] = { ++ {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41", ++ {"MP41", "DIV1", ""}}, ++ {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42", ++ {"MP42", "DIV2", ""}}, ++ {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4", ++ {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}}, ++ {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4", ++ {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}}, ++ {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg", ++ {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}}, ++ {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPG1, "mpeg1video", ++ {"MPG1", ""}}, ++ {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo", ++ {"DVSD", ""}}, ++ {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1", ++ {"WMV1", ""}}, ++ {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2", ++ {"WMV2", ""}}, ++ {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu", ++ {"HFYU", ""}}, ++ {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i", ++ {"I263", ""}}, ++ {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p", ++ {"H263", "U263", "VIV1", ""}}, ++ {AV_CODEC_ID_H264, TC_CODEC_H264, "h264", ++ {"H264", "h264", "X264", "x264", "avc1", ""}}, ++ {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10", ++ {"RV10", "RV13", ""}}, ++ {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1", ++ {"SVQ1", ""}}, ++ {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3", ++ {"SVQ3", ""}}, ++ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video", ++ {"MPG2", ""}}, ++ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG, "mpeg2video", ++ {"MPG2", ""}}, ++ {AV_CODEC_ID_ASV1, TC_CODEC_ASV1, "asv1", ++ {"ASV1", ""}}, ++ {AV_CODEC_ID_ASV2, TC_CODEC_ASV2, "asv2", ++ {"ASV2", ""}}, ++ {AV_CODEC_ID_FFV1, TC_CODEC_FFV1, "ffv1", ++ {"FFV1", ""}}, ++ {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV420P, "raw", ++ {"I420", "IYUV", ""}}, ++ {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw", ++ {"Y42B", ""}}, ++ {0, TC_CODEC_UNKNOWN, NULL, {""}}}; ++#endif + + #define BUFFER_SIZE SIZE_RGB_FRAME + @@ -302,7 +302,7 @@ do_avi: // Set these to the expected values so that ffmpeg's decoder can @@ -321,6 +419,30 @@ Index: transcode-1.1.7/import/import_ffmpeg.c if (lavc_dec_context == NULL) { tc_log_error(MOD_NAME, "Could not allocate enough memory."); return TC_IMPORT_ERROR; +@@ -324,6 +375,7 @@ do_avi: + // XXX: some codecs need extra data + switch (codec->id) + { ++#if LIBAVCODEC_VERSION_MAJOR < 55 + 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; +@@ -331,6 +383,15 @@ do_avi: + 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; ++#else ++ 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; ++#endif + default: extra_data_size = 0; break; + } + @@ -344,7 +344,7 @@ do_avi: } @@ -330,3 +452,106 @@ Index: transcode-1.1.7/import/import_ffmpeg.c TC_UNLOCK_LIBAVCODEC; if (ret < 0) { tc_log_warn(MOD_NAME, "Could not initialize the '%s' codec.", +@@ -360,7 +421,11 @@ 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 LIBAVCODEC_VERSION_MAJOR < 55 + if(codec->id == CODEC_ID_MJPEG) { ++#else ++ if(codec->id == AV_CODEC_ID_MJPEG) { ++#endif + enable_levels_filter(); + } + break; +@@ -434,7 +499,11 @@ do_dv: + } + + // we adapt the color space ++#if LIBAVCODEC_VERSION_MAJOR < 55 + if(codec->id == CODEC_ID_MJPEG) { ++#else ++ if(codec->id == AV_CODEC_ID_MJPEG) { ++#endif + enable_levels_filter(); + } + +@@ -504,13 +573,25 @@ MOD_decode { + int bkey = 0; + + // check for keyframes ++#if LIBAVCODEC_VERSION_MAJOR < 55 + if (codec->id == CODEC_ID_MSMPEG4V3) { ++#else ++ if (codec->id == AV_CODEC_ID_MSMPEG4V3) { ++#endif + if (divx3_is_key(buffer)) bkey = 1; + } ++#if LIBAVCODEC_VERSION_MAJOR < 55 + else if (codec->id == CODEC_ID_MPEG4) { ++#else ++ else if (codec->id == AV_CODEC_ID_MPEG4) { ++#endif + if (mpeg4_is_key(buffer, bytes_read)) bkey = 1; + } ++#if LIBAVCODEC_VERSION_MAJOR < 55 + else if (codec->id == CODEC_ID_MJPEG) { ++#else ++ else if (codec->id == AV_CODEC_ID_MJPEG) { ++#endif + bkey = 1; + } + +--- a/import/decode_lavc.c ++++ b/import/decode_lavc.c +@@ -57,6 +57,7 @@ struct ffmpeg_codec { + }; + + // fourCC to ID mapping taken from MPlayer's codecs.conf ++#if LIBAVCODEC_VERSION_MAJOR < 55 + static struct ffmpeg_codec ffmpeg_codecs[] = { + {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41", + {"MP41", "DIV1", ""}}, +@@ -91,6 +92,42 @@ static struct ffmpeg_codec ffmpeg_codecs[] = { + {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video", + {"MPG2", ""}}, + {0, TC_CODEC_UNKNOWN, NULL, {""}}}; ++#else ++static struct ffmpeg_codec ffmpeg_codecs[] = { ++ {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41", ++ {"MP41", "DIV1", ""}}, ++ {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42", ++ {"MP42", "DIV2", ""}}, ++ {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4", ++ {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}}, ++ {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4", ++ {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}}, ++ {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg", ++ {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}}, ++ {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPEG1VIDEO, "mpeg1video", ++ {"MPG1", ""}}, ++ {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo", ++ {"DVSD", ""}}, ++ {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1", ++ {"WMV1", ""}}, ++ {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2", ++ {"WMV2", ""}}, ++ {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu", ++ {"HFYU", ""}}, ++ {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i", ++ {"I263", ""}}, ++ {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p", ++ {"H263", "U263", "VIV1", ""}}, ++ {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10", ++ {"RV10", "RV13", ""}}, ++ {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1", ++ {"SVQ1", ""}}, ++ {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3", ++ {"SVQ3", ""}}, ++ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video", ++ {"MPG2", ""}}, ++ {0, TC_CODEC_UNKNOWN, NULL, {""}}}; ++#endif + + + static struct ffmpeg_codec *find_ffmpeg_codec_id(unsigned int transcode_id) diff --git a/multimedia/transcode/transcode-1.1.7-ffmpeg24.patch b/multimedia/transcode/transcode-1.1.7-ffmpeg24.patch new file mode 100644 index 0000000000..57a91774ab --- /dev/null +++ b/multimedia/transcode/transcode-1.1.7-ffmpeg24.patch @@ -0,0 +1,18 @@ +https://bugs.gentoo.org/show_bug.cgi?id=520190 + +Index: transcode-1.1.7/import/probe_ffmpeg.c +=================================================================== +--- transcode-1.1.7.orig/import/probe_ffmpeg.c ++++ transcode-1.1.7/import/probe_ffmpeg.c +@@ -120,7 +120,11 @@ void probe_ffmpeg(info_t *ipipe) + + translate_info(lavf_dmx_context, ipipe->probe_info); + ++#if LIBAVFORMAT_VERSION_INT > AV_VERSION_INT(53,25,0) ++ avformat_close_input(&lavf_dmx_context); ++#else + av_close_input_file(lavf_dmx_context); ++#endif + return; + } + diff --git a/multimedia/transcode/transcode.SlackBuild b/multimedia/transcode/transcode.SlackBuild index 1ac0bc1c30..992a622ac1 100644 --- a/multimedia/transcode/transcode.SlackBuild +++ b/multimedia/transcode/transcode.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for transcode -# Copyright 2008-2013 Heinz Wiesinger, Amsterdam, The Netherlands +# Copyright 2008-2015 Heinz Wiesinger, Amsterdam, The Netherlands # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ PRGNAM=transcode VERSION=1.1.7 -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -77,6 +77,7 @@ patch -p1 -i $CWD/transcode-1.1.7-preset-free.patch patch -p0 -i $CWD/transcode-1.1.7-libav-9.patch patch -p1 -i $CWD/transcode-1.1.7-preset-force.patch patch -p1 -i $CWD/transcode-1.1.7-ffmpeg2.patch +patch -p1 -i $CWD/transcode-1.1.7-ffmpeg24.patch CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -115,6 +116,19 @@ CXXFLAGS="$SLKCFLAGS" \ make make install-strip DESTDIR=$PKG +# Install headers +mkdir -p $PKG/usr/include/transcode/{aclib,avilib,libtc,libtcaudio,libtcvideo} +install -m 644 src/*.h $PKG/usr/include/transcode/ +install -m 644 aclib/*.h $PKG/usr/include/transcode/aclib/ +install -m 644 avilib/*.h $PKG/usr/include/transcode/avilib/ +install -m 644 libtc/*.h $PKG/usr/include/transcode/libtc/ +install -m 644 libtcaudio/*.h $PKG/usr/include/transcode/libtcaudio/ +install -m 644 libtcvideo/*.h $PKG/usr/include/transcode/libtcvideo/ +install -m 644 config.h $PKG/usr/include/transcode/ + +# remove filters shipped by other packages +rm -f $PKG/usr/lib$LIBDIRSUFFIX/transcode/filter_{stabilize,transform}.* + find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |