[arch-commits] Commit in cinelerra-cv/trunk (PKGBUILD ffmpeg2.0.patch)
Date: Sunday, September 15, 2013 @ 21:52:15 Author: schiv Revision: 97245 upgpkg: cinelerra-cv 1:2.2-18 fix ffmpeg 2.0 patch; closes FS#36685 Modified: cinelerra-cv/trunk/PKGBUILD cinelerra-cv/trunk/ffmpeg2.0.patch -+ PKGBUILD| 51 +++ ffmpeg2.0.patch |2 +- 2 files changed, 28 insertions(+), 25 deletions(-) Modified: PKGBUILD === --- PKGBUILD2013-09-15 19:11:31 UTC (rev 97244) +++ PKGBUILD2013-09-15 19:52:15 UTC (rev 97245) @@ -7,7 +7,7 @@ pkgname=cinelerra-cv pkgver=2.2 _gitrel=2.2.0 -pkgrel=17 +pkgrel=18 epoch=1 pkgdesc="Professional video editing and compositing environment" arch=('x86_64' 'i686') @@ -16,17 +16,18 @@ depends=('e2fsprogs' 'libavc1394' 'libiec61883' 'libxv' 'libtiff' 'mjpegtools' 'fftw' 'a52dec' 'glu' 'ffmpeg' 'faad2' 'faac' 'openexr>=2.0.0') -makedepends=('git' 'nasm' 'mesa' 'optipng') +makedepends=('git' 'nasm' 'mesa') options=('!libtool') source=("$pkgname::git+git://git.cinelerra.org/CinelerraCV.git#branch=rel$_gitrel" 'v4l1_removal.patch' +'ffmpeg_api.patch' 'ffmpeg2.0.patch' -'cinelerra-std_and_str_h.patch' -'ffmpeg_api.patch') +'cinelerra-std_and_str_h.patch') md5sums=('SKIP' 'bfa85e20809429d88eba4ab83e569612' - '02d8222e596133bbc05eaad15bef242c' - 'b05ec2fb54e7d02f6167525417802111') + 'b05ec2fb54e7d02f6167525417802111' + '14dd897084d64cd0b5e9caa8a69818bd' + '02d8222e596133bbc05eaad15bef242c') _confit() { ./configure --prefix=/usr \ @@ -39,37 +40,44 @@ prepare() { cd "$srcdir/$pkgname" + ## Patches (oldest first) ## + # v4l1 removal patch patch -Np1 -i "$srcdir/v4l1_removal.patch" + # ffmpeg api patch update for 0.11 + patch -Np1 -i "$srcdir/ffmpeg_api.patch" + + # fix some missing headers patch -Np0 -i "$srcdir/cinelerra-std_and_str_h.patch" - # new ffmpeg api patch - patch -Np1 -i "$srcdir/ffmpeg_api.patch" - - # fix avcodec_alloc_context and alloc_open + # fix avcodec_alloc_context and alloc_open patch -Np1 -i "$srcdir/ffmpeg2.0.patch" - # TODO: check if this is still needed (not sure what it does) --schiv - sed -i -e '/Debian/d' admin/nasm + ## Hacks ## # if you don't need OpenGL comment out the next line (and no glu/mesa dep) - # TODO: kind of forgot about the specifics of this one, recheck --schiv + # TODO: check if this is still needed (pre-svn commit) --schiv sed -i '/\/X11R6/s///' configure.in + # TODO: check if this is still needed (old commit; r29539 by ibiru) --schiv + sed -i -e '/Debian/d' admin/nasm + # fix some pngs that break with newer libpng # see https://mailman.archlinux.org/pipermail/arch-dev-public/2013-May/024872.html -# msg2 "Fixing PNGs, please wait..." -#find -name '*.png' -exec optipng -quiet -force -fix {} + + #msg2 "Fixing PNGs, please wait..." + #find -name '*.png' -exec optipng -quiet -force -fix {} + - # FFmpeg 2.0 related replacements - find -type f -exec sed -i 's/AVCODEC_MAX_AUDIO_FRAME_SIZE/192000/' {} \; - find -type f -exec sed -i 's/CodecID/AVCodecID/' {} \; + # ffmpeg 2.0 related replacements + find -type f -exec sed -i 's/AVCODEC_MAX_AUDIO_FRAME_SIZE/192000/' {} \; + find -type f -exec sed -i 's/CodecID/AVCodecID/' {} \; } build() { cd "$srcdir/$pkgname" + ## More Hacks (must be in existing env) ## + # gcc 4.6 workaround export CFLAGS+=" -Wwrite-strings -D__STDC_CONSTANT_MACROS" export CPPFLAGS="$CFLAGS" @@ -79,7 +87,7 @@ ./autogen.sh - # TODO: check if this is still needed (forgot why at all) --schiv + # TODO: check if this is still needed (pre-svn commit) --schiv if [ "$CARCH" = 'x86_64' ]; then _confit --disable-mmx else @@ -96,8 +104,3 @@ } # vim:set ts=2 sw=2 et: -md5sums=('SKIP' - 'bfa85e20809429d88eba4ab83e569612' - '8d003f144b1c5e1cbbf13791fabb67cc' - '02d8222e596133bbc05eaad15bef242c' - 'b05ec2fb54e7d02f6167525417802111') Modified: ffmpeg2.0.patch === --- ffmpeg2.0.patch 2013-09-15 19:11:31 UTC (rev 97244) +++ ffmpeg2.0.patch 2013-09-15 19:52:15 UTC (rev 97245) @@ -75,7 +75,7 @@ } - if(avcodec_open(context, - ptr->decoder[i]) < 0) -+ if(avcodec_open2(context,(ptr->decoder[i]) < 0,NULL)) ++ if(avcodec_open2(context, ptr->decoder[i], NULL) < 0) { printf("quicktime_new_ffmpeg: avcodec_open failed.\n"); quicktime_delete_ffmpeg(ptr);
[arch-commits] Commit in cinelerra-cv/trunk (PKGBUILD ffmpeg2.0.patch)
Date: Monday, July 22, 2013 @ 21:49:48 Author: jelle Revision: 94408 upgpkg: cinelerra-cv 1:2.2-17 ffmpeg 2.0 rebuild Added: cinelerra-cv/trunk/ffmpeg2.0.patch Modified: cinelerra-cv/trunk/PKGBUILD -+ PKGBUILD| 19 -- ffmpeg2.0.patch | 98 ++ 2 files changed, 114 insertions(+), 3 deletions(-) Modified: PKGBUILD === --- PKGBUILD2013-07-22 19:23:28 UTC (rev 94407) +++ PKGBUILD2013-07-22 19:49:48 UTC (rev 94408) @@ -7,7 +7,7 @@ pkgname=cinelerra-cv pkgver=2.2 _gitrel=2.2.0 -pkgrel=16 +pkgrel=17 epoch=1 pkgdesc="Professional video editing and compositing environment" arch=('x86_64' 'i686') @@ -20,6 +20,7 @@ options=('!libtool') source=("$pkgname::git+git://git.cinelerra.org/CinelerraCV.git#branch=rel$_gitrel" 'v4l1_removal.patch' +'ffmpeg2.0.patch' 'cinelerra-std_and_str_h.patch' 'ffmpeg_api.patch') md5sums=('SKIP' @@ -46,6 +47,9 @@ # new ffmpeg api patch patch -Np1 -i "$srcdir/ffmpeg_api.patch" + # fix avcodec_alloc_context and alloc_open + patch -Np1 -i "$srcdir/ffmpeg2.0.patch" + # TODO: check if this is still needed (not sure what it does) --schiv sed -i -e '/Debian/d' admin/nasm @@ -55,8 +59,12 @@ # fix some pngs that break with newer libpng # see https://mailman.archlinux.org/pipermail/arch-dev-public/2013-May/024872.html - msg2 "Fixing PNGs, please wait..." - find -name '*.png' -exec optipng -quiet -force -fix {} + +# msg2 "Fixing PNGs, please wait..." +#find -name '*.png' -exec optipng -quiet -force -fix {} + + + # FFmpeg 2.0 related replacements + find -type f -exec sed -i 's/AVCODEC_MAX_AUDIO_FRAME_SIZE/192000/' {} \; + find -type f -exec sed -i 's/CodecID/AVCodecID/' {} \; } build() { @@ -88,3 +96,8 @@ } # vim:set ts=2 sw=2 et: +md5sums=('SKIP' + 'bfa85e20809429d88eba4ab83e569612' + '8d003f144b1c5e1cbbf13791fabb67cc' + '02d8222e596133bbc05eaad15bef242c' + 'b05ec2fb54e7d02f6167525417802111') Added: ffmpeg2.0.patch === --- ffmpeg2.0.patch (rev 0) +++ ffmpeg2.0.patch 2013-07-22 19:49:48 UTC (rev 94408) @@ -0,0 +1,98 @@ +diff --git a/cinelerra/ffmpeg.C b/cinelerra/ffmpeg.C +index 6ab6047..f1cd308 100644 +--- a/cinelerra/ffmpeg.C b/cinelerra/ffmpeg.C +@@ -33,9 +33,9 @@ int FFMPEG::init(char *codec_string) { + return 1; + } + +- context = avcodec_alloc_context(); ++ context = avcodec_alloc_context3(codec); + +- if (avcodec_open(context, codec)) { ++ if (avcodec_open2(context, codec,NULL)) { + printf("FFMPEG::init avcodec_open() failed\n"); + } + +diff --git a/cinelerra/fileac3.C b/cinelerra/fileac3.C +index a1ef61e..383f377 100644 +--- a/cinelerra/fileac3.C b/cinelerra/fileac3.C +@@ -92,11 +92,11 @@ int FileAC3::open_file(int rd, int wr) + eprintf("codec not found.\n"); + return 1; + } +- codec_context = avcodec_alloc_context(); ++ codec_context = avcodec_alloc_context3(codec); + codec_context->bit_rate = asset->ac3_bitrate * 1000; + codec_context->sample_rate = asset->sample_rate; + codec_context->channels = asset->channels; +- if(avcodec_open(codec_context, codec)) ++ if(avcodec_open2(codec_context, codec,NULL)) + { + eprintf("failed to open codec.\n"); + return 1; +diff --git a/quicktime/mpeg4.c b/quicktime/mpeg4.c +index 81cb72b..02c4a92 100644 +--- a/quicktime/mpeg4.c b/quicktime/mpeg4.c +@@ -641,7 +641,7 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track) + return 1; + } + +- codec->encoder_context[current_field] = avcodec_alloc_context(); ++ codec->encoder_context[current_field] = avcodec_alloc_context3(codec->encoder[current_field]); + AVCodecContext *context = codec->encoder_context[current_field]; + + context->width = width_i; +@@ -740,7 +740,7 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track) + * codec->fix_bitrate, + * codec->quantizer); + */ +- avcodec_open(context, codec->encoder[current_field]); ++ avcodec_open2(context, codec->encoder[current_field],NULL); + + avcodec_get_frame_defaults(&codec->picture[current_field]); + +diff --git a/quicktime/qtffmpeg.c b/quicktime/qtffmpeg.c +index 8c532c2..4f0bacb 100644 +--- a/quicktime/qtffmpeg.c b/quicktime/qtffmpeg.c +@@ -68,7 +68,9 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg(int cpus, +