[arch-commits] Commit in cinelerra-cv/repos (12 files)

Evangelos Foutras foutrelis at nymeria.archlinux.org
Sat Nov 9 17:07:42 UTC 2013


    Date: Saturday, November 9, 2013 @ 18:07:42
  Author: foutrelis
Revision: 100735

archrelease: copy trunk to community-staging-x86_64, community-staging-i686

Added:
  cinelerra-cv/repos/community-staging-i686/
  cinelerra-cv/repos/community-staging-i686/PKGBUILD
    (from rev 100734, cinelerra-cv/trunk/PKGBUILD)
  cinelerra-cv/repos/community-staging-i686/cinelerra-std_and_str_h.patch
    (from rev 100734, cinelerra-cv/trunk/cinelerra-std_and_str_h.patch)
  cinelerra-cv/repos/community-staging-i686/ffmpeg2.0.patch
    (from rev 100734, cinelerra-cv/trunk/ffmpeg2.0.patch)
  cinelerra-cv/repos/community-staging-i686/ffmpeg_api.patch
    (from rev 100734, cinelerra-cv/trunk/ffmpeg_api.patch)
  cinelerra-cv/repos/community-staging-i686/v4l1_removal.patch
    (from rev 100734, cinelerra-cv/trunk/v4l1_removal.patch)
  cinelerra-cv/repos/community-staging-x86_64/
  cinelerra-cv/repos/community-staging-x86_64/PKGBUILD
    (from rev 100734, cinelerra-cv/trunk/PKGBUILD)
  cinelerra-cv/repos/community-staging-x86_64/cinelerra-std_and_str_h.patch
    (from rev 100734, cinelerra-cv/trunk/cinelerra-std_and_str_h.patch)
  cinelerra-cv/repos/community-staging-x86_64/ffmpeg2.0.patch
    (from rev 100734, cinelerra-cv/trunk/ffmpeg2.0.patch)
  cinelerra-cv/repos/community-staging-x86_64/ffmpeg_api.patch
    (from rev 100734, cinelerra-cv/trunk/ffmpeg_api.patch)
  cinelerra-cv/repos/community-staging-x86_64/v4l1_removal.patch
    (from rev 100734, cinelerra-cv/trunk/v4l1_removal.patch)

--------------------------------------------------------+
 community-staging-i686/PKGBUILD                        |  105 +++++++++
 community-staging-i686/cinelerra-std_and_str_h.patch   |   81 +++++++
 community-staging-i686/ffmpeg2.0.patch                 |   98 +++++++++
 community-staging-i686/ffmpeg_api.patch                |  163 +++++++++++++++
 community-staging-i686/v4l1_removal.patch              |  125 +++++++++++
 community-staging-x86_64/PKGBUILD                      |  105 +++++++++
 community-staging-x86_64/cinelerra-std_and_str_h.patch |   81 +++++++
 community-staging-x86_64/ffmpeg2.0.patch               |   98 +++++++++
 community-staging-x86_64/ffmpeg_api.patch              |  163 +++++++++++++++
 community-staging-x86_64/v4l1_removal.patch            |  125 +++++++++++
 10 files changed, 1144 insertions(+)

Copied: cinelerra-cv/repos/community-staging-i686/PKGBUILD (from rev 100734, cinelerra-cv/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD	                        (rev 0)
+++ community-staging-i686/PKGBUILD	2013-11-09 17:07:42 UTC (rev 100735)
@@ -0,0 +1,105 @@
+# $Id$
+# Maintainer: Ray Rashif <schiv at archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+# Contributor: Jaroslaw Swierczynski <swiergot at aur.archlinux.org>
+# Contributor: Alexander Rødseth <rodseth at gmail.com>
+
+pkgname=cinelerra-cv
+pkgver=2.2
+_gitrel=2.2.0
+pkgrel=19
+epoch=1
+pkgdesc="Professional video editing and compositing environment"
+arch=('x86_64' 'i686')
+url="http://cinelerra.org/"
+license=('GPL')
+depends=('e2fsprogs' 'libavc1394' 'libiec61883' 'libxv'
+         'libtiff' 'mjpegtools' 'fftw' 'a52dec' 'glu'
+         'ffmpeg' 'faad2' 'faac' 'openexr>=2.0.0')
+makedepends=('git' 'nasm' 'mesa')
+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')
+md5sums=('SKIP'
+         'bfa85e20809429d88eba4ab83e569612'
+         'b05ec2fb54e7d02f6167525417802111'
+         '14dd897084d64cd0b5e9caa8a69818bd'
+         '02d8222e596133bbc05eaad15bef242c')
+
+_confit() {
+  ./configure --prefix=/usr \
+              --with-buildinfo=git/recompile \
+              --with-external-ffmpeg \
+              --enable-opengl \
+              --disable-esd $@
+}
+
+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"
+
+  # fix avcodec_alloc_context and alloc_open
+  patch -Np1 -i "$srcdir/ffmpeg2.0.patch"
+
+  ## Hacks ##
+
+  # if you don't need OpenGL comment out the next line (and no glu/mesa dep)
+  # 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 {} +
+
+  # 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"
+
+  # remove executable stack
+  export LDFLAGS+=" -Wl,-z,noexecstack"
+
+  ./autogen.sh
+
+  # TODO: check if this is still needed (pre-svn commit) --schiv
+  if [ "$CARCH" = 'x86_64' ]; then
+    _confit --disable-mmx
+  else
+    _confit --enable-mmx
+  fi
+
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname"
+
+  make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:

Copied: cinelerra-cv/repos/community-staging-i686/cinelerra-std_and_str_h.patch (from rev 100734, cinelerra-cv/trunk/cinelerra-std_and_str_h.patch)
===================================================================
--- community-staging-i686/cinelerra-std_and_str_h.patch	                        (rev 0)
+++ community-staging-i686/cinelerra-std_and_str_h.patch	2013-11-09 17:07:42 UTC (rev 100735)
@@ -0,0 +1,81 @@
+Include required headers for free(), memcpy(), strcpy(), bcopy(), and more
+Thanks to Martin von Gagern for reporting and initial patch
+See, http://bugs.gentoo.org/show_bug.cgi?id=465478
+
+--- cinelerra/vdevicebuz.C
++++ cinelerra/vdevicebuz.C
+@@ -49,6 +49,8 @@
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+ #include <unistd.h>
++#include <string.h>
++#include <strings.h>
+ 
+ #define BASE_VIDIOCPRIVATE	192	
+ 
+--- cinelerra/videodevice.C
++++ cinelerra/videodevice.C
+@@ -53,6 +53,7 @@
+ 
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <string.h>
+ 
+ KeepaliveThread::KeepaliveThread(VideoDevice *device)
+  : Thread()
+--- libmpeg3/audio/ac3.c
++++ libmpeg3/audio/ac3.c
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include <stdint.h>
+ #include <stdio.h>
+ 
+--- libmpeg3/audio/layer3.c
++++ libmpeg3/audio/layer3.c
+@@ -4,6 +4,7 @@
+ #include "tables.h"
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ 
+ struct gr_info_s 
+--- mplexlo/mplex.c
++++ mplexlo/mplex.c
+@@ -1,6 +1,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+-
++#include <string.h>
+ 
+ #include "libmpeg3.h"
+ #include "mpeg3protos.h"
+--- quicktime/graphics.c
++++ quicktime/graphics.c
+@@ -1,5 +1,6 @@
+ #include "graphics.h"
+ 
++#include <stdlib.h>
+ #include <string.h>
+ 
+ /* Graphics acceleration routines */
+--- quicktime/libmjpeg.c
++++ quicktime/libmjpeg.c
+@@ -17,6 +17,7 @@
+  
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "colormodels.h"
+ #include "libmjpeg.h"
+ 
+--- quicktime/qtpng.c
++++ quicktime/qtpng.c
+@@ -1,6 +1,7 @@
+ #include "colormodels.h"
+ #include "funcprotos.h"
+ #include <png.h>
++#include <string.h>
+ #include "quicktime.h"
+ #include "qtpng.h"
+ 

Copied: cinelerra-cv/repos/community-staging-i686/ffmpeg2.0.patch (from rev 100734, cinelerra-cv/trunk/ffmpeg2.0.patch)
===================================================================
--- community-staging-i686/ffmpeg2.0.patch	                        (rev 0)
+++ community-staging-i686/ffmpeg2.0.patch	2013-11-09 17:07:42 UTC (rev 100735)
@@ -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,
+ 			return 0;
+ 		}
+ 
+-		AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context();
++		//AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context();
++		AVCodecContext *context = avcodec_alloc_context3(ptr->decoder[i]);
++		ptr->decoder_context[i] = context;
+ 		static char fake_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ 		context->width = ptr->width_i;
+ 		context->height = ptr->height_i;
+@@ -96,8 +98,7 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg(int cpus,
+ 			avcodec_thread_init(context, cpus);
+ 			context->thread_count = cpus;
+ 		}
+-		if(avcodec_open(context, 
+-			ptr->decoder[i]) < 0)
++		if(avcodec_open2(context, ptr->decoder[i], NULL) < 0)
+ 		{
+ 			printf("quicktime_new_ffmpeg: avcodec_open failed.\n");
+ 			quicktime_delete_ffmpeg(ptr);
+diff --git a/quicktime/wma.c b/quicktime/wma.c
+index c045741..6a6588b 100644
+--- a/quicktime/wma.c
++++ b/quicktime/wma.c
+@@ -77,10 +77,10 @@ static int init_decode(quicktime_audio_map_t *track_map,
+ 			printf("init_decode: avcodec_find_decoder returned NULL.\n");
+ 			return 1;
+ 		}
+-		codec->decoder_context = avcodec_alloc_context();
++		codec->decoder_context = avcodec_alloc_context3(codec->decoder);
+ 		codec->decoder_context->sample_rate = trak->mdia.minf.stbl.stsd.table[0].sample_rate;
+ 		codec->decoder_context->channels = track_map->channels;
+-		if(avcodec_open(codec->decoder_context, codec->decoder) < 0)
++		if(avcodec_open2(codec->decoder_context, codec->decoder,NULL) < 0)
+ 		{
+ 			printf("init_decode: avcodec_open failed.\n");
+ 			return 1;

Copied: cinelerra-cv/repos/community-staging-i686/ffmpeg_api.patch (from rev 100734, cinelerra-cv/trunk/ffmpeg_api.patch)
===================================================================
--- community-staging-i686/ffmpeg_api.patch	                        (rev 0)
+++ community-staging-i686/ffmpeg_api.patch	2013-11-09 17:07:42 UTC (rev 100735)
@@ -0,0 +1,163 @@
+diff --git a/cinelerra/ffmpeg.C b/cinelerra/ffmpeg.C
+index 6ab6047..7cde503 100644
+--- a/cinelerra/ffmpeg.C
++++ b/cinelerra/ffmpeg.C
+@@ -23,7 +23,6 @@ FFMPEG::FFMPEG(Asset *asset) {
+ 
+ int FFMPEG::init(char *codec_string) {
+ 
+-	avcodec_init();
+ 	avcodec_register_all();
+ 
+ 	CodecID id = codec_id(codec_string);
+@@ -364,12 +363,15 @@ int FFMPEG::decode(uint8_t *data, long data_size, VFrame *frame_out) {
+ 
+ 	// NOTE: frame must already have data space allocated
+ 	
++	AVPacket pkt;
+ 	got_picture = 0;
+-	int length = avcodec_decode_video(context,
++	av_init_packet( &pkt );
++	pkt.data = data;
++	pkt.size = data_size;
++	int length = avcodec_decode_video2(context,
+ 					  picture,
+ 					  &got_picture,
+-					  data,
+-					  data_size);
++					  &pkt);
+ 	
+ 	if (length < 0) {
+ 		printf("FFMPEG::decode error decoding frame\n");
+diff --git a/cinelerra/fileac3.C b/cinelerra/fileac3.C
+index a1ef61e..e56705f 100644
+--- a/cinelerra/fileac3.C
++++ b/cinelerra/fileac3.C
+@@ -84,7 +84,6 @@ int FileAC3::open_file(int rd, int wr)
+ 
+ 	if(wr)
+ 	{
+-  		avcodec_init();
+ 		avcodec_register_all();
+ 		codec = avcodec_find_encoder(CODEC_ID_AC3);
+ 		if(!codec)
+diff --git a/quicktime/mpeg4.c b/quicktime/mpeg4.c
+index 81cb72b..67bcab8 100644
+--- a/quicktime/mpeg4.c
++++ b/quicktime/mpeg4.c
+@@ -629,7 +629,6 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track)
+ 			if(!ffmpeg_initialized)
+ 			{
+ 				ffmpeg_initialized = 1;
+-  				avcodec_init();
+ 				avcodec_register_all();
+ 			}
+ 
+@@ -674,7 +673,7 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track)
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ 			context->error_resilience = FF_ER_CAREFUL;
+ #else
+-			context->error_recognition = FF_ER_CAREFUL;
++			context->err_recognition = AV_EF_CRCCHECK;
+ #endif
+ 			context->error_concealment = 3;
+ 			context->frame_skip_cmp = FF_CMP_DCTMAX;
+@@ -699,7 +698,6 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track)
+         	context->profile= FF_PROFILE_UNKNOWN;
+ 			context->rc_buffer_aggressivity = 1.0;
+         	context->level= FF_LEVEL_UNKNOWN;
+-			context->flags |= CODEC_FLAG_H263P_UMV;
+ 			context->flags |= CODEC_FLAG_AC_PRED;
+ 
+ // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg...
+@@ -717,10 +715,8 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track)
+ 				(codec->ffmpeg_id == CODEC_ID_MPEG4 ||
+ 			         codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
+ 			         codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
+-			         codec->ffmpeg_id == CODEC_ID_H263P || 
+-			         codec->ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
++			         codec->ffmpeg_id == CODEC_ID_H263P))
+ 			{
+-				avcodec_thread_init(context, file->cpus);
+ 				context->thread_count = file->cpus;
+ 			}
+ 
+diff --git a/quicktime/qtffmpeg.c b/quicktime/qtffmpeg.c
+index 8c532c2..a2b51e9 100644
+--- a/quicktime/qtffmpeg.c
++++ b/quicktime/qtffmpeg.c
+@@ -54,7 +54,6 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg(int cpus,
+ 	if(!ffmpeg_initialized)
+ 	{
+ 		ffmpeg_initialized = 1;
+-  		avcodec_init();
+ 		avcodec_register_all();
+ 	}
+ 
+@@ -90,10 +89,8 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg(int cpus,
+ 				(ffmpeg_id == CODEC_ID_MPEG4 ||
+ 			         ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
+ 			         ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
+-			         ffmpeg_id == CODEC_ID_H263P || 
+-			         ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
++			         ffmpeg_id == CODEC_ID_H263P))
+ 		{
+-			avcodec_thread_init(context, cpus);
+ 			context->thread_count = cpus;
+ 		}
+ 		if(avcodec_open(context, 
+@@ -181,6 +178,7 @@ static int decode_wrapper(quicktime_t *file,
+  
+ 	if(!result) 
+ 	{ 
++		AVPacket pkt;
+ 
+ 
+ // No way to determine if there was an error based on nonzero status.
+@@ -189,11 +187,13 @@ static int decode_wrapper(quicktime_t *file,
+ 			ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */;
+ 		else
+ 			ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT;
+-		result = avcodec_decode_video(ffmpeg->decoder_context[current_field], 
++		av_init_packet( &pkt );
++		pkt.data = ffmpeg->work_buffer;
++		pkt.size = bytes + header_bytes;
++		result = avcodec_decode_video2(ffmpeg->decoder_context[current_field], 
+ 			&ffmpeg->picture[current_field], 
+ 			&got_picture, 
+-			ffmpeg->work_buffer, 
+-			bytes + header_bytes);
++			&pkt);
+ 
+ 
+ 
+diff --git a/quicktime/wma.c b/quicktime/wma.c
+index c045741..abc2dc8 100644
+--- a/quicktime/wma.c
++++ b/quicktime/wma.c
+@@ -67,7 +67,6 @@ static int init_decode(quicktime_audio_map_t *track_map,
+ 		if(!ffmpeg_initialized)
+ 		{
+ 			ffmpeg_initialized = 1;
+-			avcodec_init();
+ 			avcodec_register_all();
+ 		}
+ 
+@@ -195,11 +194,14 @@ printf("decode 2 %x %llx %llx\n", chunk_size, chunk_offset, chunk_offset + chunk
+ 			chunk_size);
+ #else
+ 		bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-		result = avcodec_decode_audio2(codec->decoder_context,
++		AVPacket pkt;
++		av_init_packet( &pkt );
++		pkt.data = codec->packet_buffer;
++		pkt.size = chunk_size;
++		result = avcodec_decode_audio3(codec->decoder_context,
+ 			(int16_t*)(codec->work_buffer + codec->output_size * sample_size),
+ 			&bytes_decoded,
+-			codec->packet_buffer,
+-			chunk_size);
++			&pkt);
+ #endif
+ 
+ 		pthread_mutex_unlock(&ffmpeg_lock);

Copied: cinelerra-cv/repos/community-staging-i686/v4l1_removal.patch (from rev 100734, cinelerra-cv/trunk/v4l1_removal.patch)
===================================================================
--- community-staging-i686/v4l1_removal.patch	                        (rev 0)
+++ community-staging-i686/v4l1_removal.patch	2013-11-09 17:07:42 UTC (rev 100735)
@@ -0,0 +1,125 @@
+http://bugs.cinelerra.org/ticket/949
+https://bugs.gentoo.org/show_bug.cgi?id=361709
+
+diff -Nru cinelerra.orig//cinelerra/channelpicker.C cinelerra/cinelerra/channelpicker.C
+--- cinelerra.orig//cinelerra/channelpicker.C	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/channelpicker.C	2011-02-17 13:31:30.147880002 -0500
+@@ -39,7 +39,7 @@
+ #include "recordgui.h"
+ #include "recordmonitor.h"
+ #include "theme.h"
+-#include "vdevicebuz.h"
++//#include "vdevicebuz.h"
+ #include "vdeviceprefs.h"
+ #include "videodevice.h"
+ 
+@@ -280,7 +280,7 @@
+ //	printf("PrefsChannelPicker::PrefsChannelPicker 1\n");
+ 	this->mwindow = mwindow;
+ 	this->prefs = prefs;
+-	VDeviceBUZ::get_inputs(&input_sources);
++//	VDeviceBUZ::get_inputs(&input_sources);
+ }
+ 
+ PrefsChannelPicker::~PrefsChannelPicker()
+diff -Nru cinelerra.orig//cinelerra/Makefile.am cinelerra/cinelerra/Makefile.am
+--- cinelerra.orig//cinelerra/Makefile.am	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/Makefile.am	2011-02-17 13:31:30.147880002 -0500
+@@ -305,10 +305,8 @@
+ 		    vattachmentpoint.C \
+ 		    vautomation.C \
+ 		    vdevicebase.C \
+-		    vdevicebuz.C \
+ 		    vdevicedvb.C \
+ 		    vdeviceprefs.C \
+-		    vdevicev4l.C \
+ 		    vdevicev4l2.C \
+ 		    vdevicev4l2jpeg.C \
+ 		    vdevicex11.C \
+diff -Nru cinelerra.orig//cinelerra/reversemake cinelerra/cinelerra/reversemake
+--- cinelerra.orig//cinelerra/reversemake	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/reversemake	2011-02-17 13:31:30.151880002 -0500
+@@ -32,10 +32,8 @@
+ make $OBJDIR/vedits.o
+ make $OBJDIR/vedit.o
+ make $OBJDIR/vdevicex11.o
+-make $OBJDIR/vdevicev4l.o
+ make $OBJDIR/vdeviceprefs.o
+ make $OBJDIR/vdevicelml.o
+-make $OBJDIR/vdevicebuz.o
+ make $OBJDIR/vdevicebase.o
+ make $OBJDIR/vdevice1394.o
+ make $OBJDIR/vautomation.o
+diff -Nru cinelerra.orig//cinelerra/videodevice.C cinelerra/cinelerra/videodevice.C
+--- cinelerra.orig//cinelerra/videodevice.C	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/videodevice.C	2011-02-17 13:41:53.239880001 -0500
+@@ -39,9 +39,9 @@
+ #ifdef HAVE_FIREWIRE
+ #include "vdevice1394.h"
+ #endif
+-#include "vdevicebuz.h"
++//#include "vdevicebuz.h"
+ #include "vdevicedvb.h"
+-#include "vdevicev4l.h"
++//#include "vdevicev4l.h"
+ #include "vdevicev4l2.h"
+ #include "vdevicev4l2jpeg.h"
+ #include "vdevicex11.h"
+@@ -203,7 +203,6 @@
+ 			result = input_base->open_input();
+ 			break;
+ 
+-
+ #ifdef HAVE_VIDEO4LINUX2
+ 		case VIDEO4LINUX2:
+ 			new_device_base();
+@@ -250,8 +249,8 @@
+ {
+ 	switch(in_config->driver)
+ 	{
+-		case VIDEO4LINUX:
+-			return input_base = new VDeviceV4L(this);
++		//case VIDEO4LINUX:
++		//	return input_base = new VDeviceV4L(this);
+ 
+ #ifdef HAVE_VIDEO4LINUX2
+ 		case VIDEO4LINUX2:
+@@ -264,8 +263,8 @@
+ 		case SCREENCAPTURE:
+ 			return input_base = new VDeviceX11(this, 0);
+ 
+-		case CAPTURE_BUZ:
+-			return input_base = new VDeviceBUZ(this);
++		//case CAPTURE_BUZ:
++		//	return input_base = new VDeviceBUZ(this);
+ 
+ #ifdef HAVE_FIREWIRE
+ 		case CAPTURE_FIREWIRE:
+@@ -662,9 +661,9 @@
+ //printf("VideoDevice::open_output 1 %d\n", out_config->driver);
+ 	switch(out_config->driver)
+ 	{
+-		case PLAYBACK_BUZ:
+-			output_base = new VDeviceBUZ(this);
+-			break;
++		//case PLAYBACK_BUZ:
++		//	output_base = new VDeviceBUZ(this);
++		//	break;
+ 		case PLAYBACK_X11:
+ 		case PLAYBACK_X11_XV:
+ 		case PLAYBACK_X11_GL:
+diff -Nru cinelerra.orig//cinelerra/videodevice.h cinelerra/cinelerra/videodevice.h
+--- cinelerra.orig//cinelerra/videodevice.h	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/videodevice.h	2011-02-17 13:31:30.167880002 -0500
+@@ -40,9 +40,9 @@
+ #include "thread.h"
+ #include "picture.inc"
+ #include "vdevicebase.inc"
+-#include "vdevicebuz.inc"
++//#include "vdevicebuz.inc"
+ #include "vdevicelml.inc"
+-#include "vdevicev4l.inc"
++//#include "vdevicev4l.inc"
+ #include "vdevicex11.inc"
+ #include "videoconfig.inc"
+ #include "videowindow.inc"

Copied: cinelerra-cv/repos/community-staging-x86_64/PKGBUILD (from rev 100734, cinelerra-cv/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2013-11-09 17:07:42 UTC (rev 100735)
@@ -0,0 +1,105 @@
+# $Id$
+# Maintainer: Ray Rashif <schiv at archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+# Contributor: Jaroslaw Swierczynski <swiergot at aur.archlinux.org>
+# Contributor: Alexander Rødseth <rodseth at gmail.com>
+
+pkgname=cinelerra-cv
+pkgver=2.2
+_gitrel=2.2.0
+pkgrel=19
+epoch=1
+pkgdesc="Professional video editing and compositing environment"
+arch=('x86_64' 'i686')
+url="http://cinelerra.org/"
+license=('GPL')
+depends=('e2fsprogs' 'libavc1394' 'libiec61883' 'libxv'
+         'libtiff' 'mjpegtools' 'fftw' 'a52dec' 'glu'
+         'ffmpeg' 'faad2' 'faac' 'openexr>=2.0.0')
+makedepends=('git' 'nasm' 'mesa')
+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')
+md5sums=('SKIP'
+         'bfa85e20809429d88eba4ab83e569612'
+         'b05ec2fb54e7d02f6167525417802111'
+         '14dd897084d64cd0b5e9caa8a69818bd'
+         '02d8222e596133bbc05eaad15bef242c')
+
+_confit() {
+  ./configure --prefix=/usr \
+              --with-buildinfo=git/recompile \
+              --with-external-ffmpeg \
+              --enable-opengl \
+              --disable-esd $@
+}
+
+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"
+
+  # fix avcodec_alloc_context and alloc_open
+  patch -Np1 -i "$srcdir/ffmpeg2.0.patch"
+
+  ## Hacks ##
+
+  # if you don't need OpenGL comment out the next line (and no glu/mesa dep)
+  # 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 {} +
+
+  # 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"
+
+  # remove executable stack
+  export LDFLAGS+=" -Wl,-z,noexecstack"
+
+  ./autogen.sh
+
+  # TODO: check if this is still needed (pre-svn commit) --schiv
+  if [ "$CARCH" = 'x86_64' ]; then
+    _confit --disable-mmx
+  else
+    _confit --enable-mmx
+  fi
+
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname"
+
+  make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:

Copied: cinelerra-cv/repos/community-staging-x86_64/cinelerra-std_and_str_h.patch (from rev 100734, cinelerra-cv/trunk/cinelerra-std_and_str_h.patch)
===================================================================
--- community-staging-x86_64/cinelerra-std_and_str_h.patch	                        (rev 0)
+++ community-staging-x86_64/cinelerra-std_and_str_h.patch	2013-11-09 17:07:42 UTC (rev 100735)
@@ -0,0 +1,81 @@
+Include required headers for free(), memcpy(), strcpy(), bcopy(), and more
+Thanks to Martin von Gagern for reporting and initial patch
+See, http://bugs.gentoo.org/show_bug.cgi?id=465478
+
+--- cinelerra/vdevicebuz.C
++++ cinelerra/vdevicebuz.C
+@@ -49,6 +49,8 @@
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+ #include <unistd.h>
++#include <string.h>
++#include <strings.h>
+ 
+ #define BASE_VIDIOCPRIVATE	192	
+ 
+--- cinelerra/videodevice.C
++++ cinelerra/videodevice.C
+@@ -53,6 +53,7 @@
+ 
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <string.h>
+ 
+ KeepaliveThread::KeepaliveThread(VideoDevice *device)
+  : Thread()
+--- libmpeg3/audio/ac3.c
++++ libmpeg3/audio/ac3.c
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include <stdint.h>
+ #include <stdio.h>
+ 
+--- libmpeg3/audio/layer3.c
++++ libmpeg3/audio/layer3.c
+@@ -4,6 +4,7 @@
+ #include "tables.h"
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ 
+ struct gr_info_s 
+--- mplexlo/mplex.c
++++ mplexlo/mplex.c
+@@ -1,6 +1,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+-
++#include <string.h>
+ 
+ #include "libmpeg3.h"
+ #include "mpeg3protos.h"
+--- quicktime/graphics.c
++++ quicktime/graphics.c
+@@ -1,5 +1,6 @@
+ #include "graphics.h"
+ 
++#include <stdlib.h>
+ #include <string.h>
+ 
+ /* Graphics acceleration routines */
+--- quicktime/libmjpeg.c
++++ quicktime/libmjpeg.c
+@@ -17,6 +17,7 @@
+  
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "colormodels.h"
+ #include "libmjpeg.h"
+ 
+--- quicktime/qtpng.c
++++ quicktime/qtpng.c
+@@ -1,6 +1,7 @@
+ #include "colormodels.h"
+ #include "funcprotos.h"
+ #include <png.h>
++#include <string.h>
+ #include "quicktime.h"
+ #include "qtpng.h"
+ 

Copied: cinelerra-cv/repos/community-staging-x86_64/ffmpeg2.0.patch (from rev 100734, cinelerra-cv/trunk/ffmpeg2.0.patch)
===================================================================
--- community-staging-x86_64/ffmpeg2.0.patch	                        (rev 0)
+++ community-staging-x86_64/ffmpeg2.0.patch	2013-11-09 17:07:42 UTC (rev 100735)
@@ -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,
+ 			return 0;
+ 		}
+ 
+-		AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context();
++		//AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context();
++		AVCodecContext *context = avcodec_alloc_context3(ptr->decoder[i]);
++		ptr->decoder_context[i] = context;
+ 		static char fake_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ 		context->width = ptr->width_i;
+ 		context->height = ptr->height_i;
+@@ -96,8 +98,7 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg(int cpus,
+ 			avcodec_thread_init(context, cpus);
+ 			context->thread_count = cpus;
+ 		}
+-		if(avcodec_open(context, 
+-			ptr->decoder[i]) < 0)
++		if(avcodec_open2(context, ptr->decoder[i], NULL) < 0)
+ 		{
+ 			printf("quicktime_new_ffmpeg: avcodec_open failed.\n");
+ 			quicktime_delete_ffmpeg(ptr);
+diff --git a/quicktime/wma.c b/quicktime/wma.c
+index c045741..6a6588b 100644
+--- a/quicktime/wma.c
++++ b/quicktime/wma.c
+@@ -77,10 +77,10 @@ static int init_decode(quicktime_audio_map_t *track_map,
+ 			printf("init_decode: avcodec_find_decoder returned NULL.\n");
+ 			return 1;
+ 		}
+-		codec->decoder_context = avcodec_alloc_context();
++		codec->decoder_context = avcodec_alloc_context3(codec->decoder);
+ 		codec->decoder_context->sample_rate = trak->mdia.minf.stbl.stsd.table[0].sample_rate;
+ 		codec->decoder_context->channels = track_map->channels;
+-		if(avcodec_open(codec->decoder_context, codec->decoder) < 0)
++		if(avcodec_open2(codec->decoder_context, codec->decoder,NULL) < 0)
+ 		{
+ 			printf("init_decode: avcodec_open failed.\n");
+ 			return 1;

Copied: cinelerra-cv/repos/community-staging-x86_64/ffmpeg_api.patch (from rev 100734, cinelerra-cv/trunk/ffmpeg_api.patch)
===================================================================
--- community-staging-x86_64/ffmpeg_api.patch	                        (rev 0)
+++ community-staging-x86_64/ffmpeg_api.patch	2013-11-09 17:07:42 UTC (rev 100735)
@@ -0,0 +1,163 @@
+diff --git a/cinelerra/ffmpeg.C b/cinelerra/ffmpeg.C
+index 6ab6047..7cde503 100644
+--- a/cinelerra/ffmpeg.C
++++ b/cinelerra/ffmpeg.C
+@@ -23,7 +23,6 @@ FFMPEG::FFMPEG(Asset *asset) {
+ 
+ int FFMPEG::init(char *codec_string) {
+ 
+-	avcodec_init();
+ 	avcodec_register_all();
+ 
+ 	CodecID id = codec_id(codec_string);
+@@ -364,12 +363,15 @@ int FFMPEG::decode(uint8_t *data, long data_size, VFrame *frame_out) {
+ 
+ 	// NOTE: frame must already have data space allocated
+ 	
++	AVPacket pkt;
+ 	got_picture = 0;
+-	int length = avcodec_decode_video(context,
++	av_init_packet( &pkt );
++	pkt.data = data;
++	pkt.size = data_size;
++	int length = avcodec_decode_video2(context,
+ 					  picture,
+ 					  &got_picture,
+-					  data,
+-					  data_size);
++					  &pkt);
+ 	
+ 	if (length < 0) {
+ 		printf("FFMPEG::decode error decoding frame\n");
+diff --git a/cinelerra/fileac3.C b/cinelerra/fileac3.C
+index a1ef61e..e56705f 100644
+--- a/cinelerra/fileac3.C
++++ b/cinelerra/fileac3.C
+@@ -84,7 +84,6 @@ int FileAC3::open_file(int rd, int wr)
+ 
+ 	if(wr)
+ 	{
+-  		avcodec_init();
+ 		avcodec_register_all();
+ 		codec = avcodec_find_encoder(CODEC_ID_AC3);
+ 		if(!codec)
+diff --git a/quicktime/mpeg4.c b/quicktime/mpeg4.c
+index 81cb72b..67bcab8 100644
+--- a/quicktime/mpeg4.c
++++ b/quicktime/mpeg4.c
+@@ -629,7 +629,6 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track)
+ 			if(!ffmpeg_initialized)
+ 			{
+ 				ffmpeg_initialized = 1;
+-  				avcodec_init();
+ 				avcodec_register_all();
+ 			}
+ 
+@@ -674,7 +673,7 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track)
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ 			context->error_resilience = FF_ER_CAREFUL;
+ #else
+-			context->error_recognition = FF_ER_CAREFUL;
++			context->err_recognition = AV_EF_CRCCHECK;
+ #endif
+ 			context->error_concealment = 3;
+ 			context->frame_skip_cmp = FF_CMP_DCTMAX;
+@@ -699,7 +698,6 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track)
+         	context->profile= FF_PROFILE_UNKNOWN;
+ 			context->rc_buffer_aggressivity = 1.0;
+         	context->level= FF_LEVEL_UNKNOWN;
+-			context->flags |= CODEC_FLAG_H263P_UMV;
+ 			context->flags |= CODEC_FLAG_AC_PRED;
+ 
+ // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg...
+@@ -717,10 +715,8 @@ static int encode(quicktime_t *file, unsigned char **row_pointers, int track)
+ 				(codec->ffmpeg_id == CODEC_ID_MPEG4 ||
+ 			         codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
+ 			         codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
+-			         codec->ffmpeg_id == CODEC_ID_H263P || 
+-			         codec->ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
++			         codec->ffmpeg_id == CODEC_ID_H263P))
+ 			{
+-				avcodec_thread_init(context, file->cpus);
+ 				context->thread_count = file->cpus;
+ 			}
+ 
+diff --git a/quicktime/qtffmpeg.c b/quicktime/qtffmpeg.c
+index 8c532c2..a2b51e9 100644
+--- a/quicktime/qtffmpeg.c
++++ b/quicktime/qtffmpeg.c
+@@ -54,7 +54,6 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg(int cpus,
+ 	if(!ffmpeg_initialized)
+ 	{
+ 		ffmpeg_initialized = 1;
+-  		avcodec_init();
+ 		avcodec_register_all();
+ 	}
+ 
+@@ -90,10 +89,8 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg(int cpus,
+ 				(ffmpeg_id == CODEC_ID_MPEG4 ||
+ 			         ffmpeg_id == CODEC_ID_MPEG1VIDEO ||
+ 			         ffmpeg_id == CODEC_ID_MPEG2VIDEO ||
+-			         ffmpeg_id == CODEC_ID_H263P || 
+-			         ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
++			         ffmpeg_id == CODEC_ID_H263P))
+ 		{
+-			avcodec_thread_init(context, cpus);
+ 			context->thread_count = cpus;
+ 		}
+ 		if(avcodec_open(context, 
+@@ -181,6 +178,7 @@ static int decode_wrapper(quicktime_t *file,
+  
+ 	if(!result) 
+ 	{ 
++		AVPacket pkt;
+ 
+ 
+ // No way to determine if there was an error based on nonzero status.
+@@ -189,11 +187,13 @@ static int decode_wrapper(quicktime_t *file,
+ 			ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */;
+ 		else
+ 			ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT;
+-		result = avcodec_decode_video(ffmpeg->decoder_context[current_field], 
++		av_init_packet( &pkt );
++		pkt.data = ffmpeg->work_buffer;
++		pkt.size = bytes + header_bytes;
++		result = avcodec_decode_video2(ffmpeg->decoder_context[current_field], 
+ 			&ffmpeg->picture[current_field], 
+ 			&got_picture, 
+-			ffmpeg->work_buffer, 
+-			bytes + header_bytes);
++			&pkt);
+ 
+ 
+ 
+diff --git a/quicktime/wma.c b/quicktime/wma.c
+index c045741..abc2dc8 100644
+--- a/quicktime/wma.c
++++ b/quicktime/wma.c
+@@ -67,7 +67,6 @@ static int init_decode(quicktime_audio_map_t *track_map,
+ 		if(!ffmpeg_initialized)
+ 		{
+ 			ffmpeg_initialized = 1;
+-			avcodec_init();
+ 			avcodec_register_all();
+ 		}
+ 
+@@ -195,11 +194,14 @@ printf("decode 2 %x %llx %llx\n", chunk_size, chunk_offset, chunk_offset + chunk
+ 			chunk_size);
+ #else
+ 		bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-		result = avcodec_decode_audio2(codec->decoder_context,
++		AVPacket pkt;
++		av_init_packet( &pkt );
++		pkt.data = codec->packet_buffer;
++		pkt.size = chunk_size;
++		result = avcodec_decode_audio3(codec->decoder_context,
+ 			(int16_t*)(codec->work_buffer + codec->output_size * sample_size),
+ 			&bytes_decoded,
+-			codec->packet_buffer,
+-			chunk_size);
++			&pkt);
+ #endif
+ 
+ 		pthread_mutex_unlock(&ffmpeg_lock);

Copied: cinelerra-cv/repos/community-staging-x86_64/v4l1_removal.patch (from rev 100734, cinelerra-cv/trunk/v4l1_removal.patch)
===================================================================
--- community-staging-x86_64/v4l1_removal.patch	                        (rev 0)
+++ community-staging-x86_64/v4l1_removal.patch	2013-11-09 17:07:42 UTC (rev 100735)
@@ -0,0 +1,125 @@
+http://bugs.cinelerra.org/ticket/949
+https://bugs.gentoo.org/show_bug.cgi?id=361709
+
+diff -Nru cinelerra.orig//cinelerra/channelpicker.C cinelerra/cinelerra/channelpicker.C
+--- cinelerra.orig//cinelerra/channelpicker.C	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/channelpicker.C	2011-02-17 13:31:30.147880002 -0500
+@@ -39,7 +39,7 @@
+ #include "recordgui.h"
+ #include "recordmonitor.h"
+ #include "theme.h"
+-#include "vdevicebuz.h"
++//#include "vdevicebuz.h"
+ #include "vdeviceprefs.h"
+ #include "videodevice.h"
+ 
+@@ -280,7 +280,7 @@
+ //	printf("PrefsChannelPicker::PrefsChannelPicker 1\n");
+ 	this->mwindow = mwindow;
+ 	this->prefs = prefs;
+-	VDeviceBUZ::get_inputs(&input_sources);
++//	VDeviceBUZ::get_inputs(&input_sources);
+ }
+ 
+ PrefsChannelPicker::~PrefsChannelPicker()
+diff -Nru cinelerra.orig//cinelerra/Makefile.am cinelerra/cinelerra/Makefile.am
+--- cinelerra.orig//cinelerra/Makefile.am	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/Makefile.am	2011-02-17 13:31:30.147880002 -0500
+@@ -305,10 +305,8 @@
+ 		    vattachmentpoint.C \
+ 		    vautomation.C \
+ 		    vdevicebase.C \
+-		    vdevicebuz.C \
+ 		    vdevicedvb.C \
+ 		    vdeviceprefs.C \
+-		    vdevicev4l.C \
+ 		    vdevicev4l2.C \
+ 		    vdevicev4l2jpeg.C \
+ 		    vdevicex11.C \
+diff -Nru cinelerra.orig//cinelerra/reversemake cinelerra/cinelerra/reversemake
+--- cinelerra.orig//cinelerra/reversemake	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/reversemake	2011-02-17 13:31:30.151880002 -0500
+@@ -32,10 +32,8 @@
+ make $OBJDIR/vedits.o
+ make $OBJDIR/vedit.o
+ make $OBJDIR/vdevicex11.o
+-make $OBJDIR/vdevicev4l.o
+ make $OBJDIR/vdeviceprefs.o
+ make $OBJDIR/vdevicelml.o
+-make $OBJDIR/vdevicebuz.o
+ make $OBJDIR/vdevicebase.o
+ make $OBJDIR/vdevice1394.o
+ make $OBJDIR/vautomation.o
+diff -Nru cinelerra.orig//cinelerra/videodevice.C cinelerra/cinelerra/videodevice.C
+--- cinelerra.orig//cinelerra/videodevice.C	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/videodevice.C	2011-02-17 13:41:53.239880001 -0500
+@@ -39,9 +39,9 @@
+ #ifdef HAVE_FIREWIRE
+ #include "vdevice1394.h"
+ #endif
+-#include "vdevicebuz.h"
++//#include "vdevicebuz.h"
+ #include "vdevicedvb.h"
+-#include "vdevicev4l.h"
++//#include "vdevicev4l.h"
+ #include "vdevicev4l2.h"
+ #include "vdevicev4l2jpeg.h"
+ #include "vdevicex11.h"
+@@ -203,7 +203,6 @@
+ 			result = input_base->open_input();
+ 			break;
+ 
+-
+ #ifdef HAVE_VIDEO4LINUX2
+ 		case VIDEO4LINUX2:
+ 			new_device_base();
+@@ -250,8 +249,8 @@
+ {
+ 	switch(in_config->driver)
+ 	{
+-		case VIDEO4LINUX:
+-			return input_base = new VDeviceV4L(this);
++		//case VIDEO4LINUX:
++		//	return input_base = new VDeviceV4L(this);
+ 
+ #ifdef HAVE_VIDEO4LINUX2
+ 		case VIDEO4LINUX2:
+@@ -264,8 +263,8 @@
+ 		case SCREENCAPTURE:
+ 			return input_base = new VDeviceX11(this, 0);
+ 
+-		case CAPTURE_BUZ:
+-			return input_base = new VDeviceBUZ(this);
++		//case CAPTURE_BUZ:
++		//	return input_base = new VDeviceBUZ(this);
+ 
+ #ifdef HAVE_FIREWIRE
+ 		case CAPTURE_FIREWIRE:
+@@ -662,9 +661,9 @@
+ //printf("VideoDevice::open_output 1 %d\n", out_config->driver);
+ 	switch(out_config->driver)
+ 	{
+-		case PLAYBACK_BUZ:
+-			output_base = new VDeviceBUZ(this);
+-			break;
++		//case PLAYBACK_BUZ:
++		//	output_base = new VDeviceBUZ(this);
++		//	break;
+ 		case PLAYBACK_X11:
+ 		case PLAYBACK_X11_XV:
+ 		case PLAYBACK_X11_GL:
+diff -Nru cinelerra.orig//cinelerra/videodevice.h cinelerra/cinelerra/videodevice.h
+--- cinelerra.orig//cinelerra/videodevice.h	2010-11-24 18:18:03.000000000 -0500
++++ cinelerra/cinelerra/videodevice.h	2011-02-17 13:31:30.167880002 -0500
+@@ -40,9 +40,9 @@
+ #include "thread.h"
+ #include "picture.inc"
+ #include "vdevicebase.inc"
+-#include "vdevicebuz.inc"
++//#include "vdevicebuz.inc"
+ #include "vdevicelml.inc"
+-#include "vdevicev4l.inc"
++//#include "vdevicev4l.inc"
+ #include "vdevicex11.inc"
+ #include "videoconfig.inc"
+ #include "videowindow.inc"




More information about the arch-commits mailing list