Date: Tuesday, April 30, 2013 @ 17:37:06
  Author: foutrelis
Revision: 89629

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 89628, cinelerra-cv/trunk/PKGBUILD)
  cinelerra-cv/repos/community-staging-i686/cinelerra-std_and_str_h.patch
    (from rev 89628, cinelerra-cv/trunk/cinelerra-std_and_str_h.patch)
  cinelerra-cv/repos/community-staging-i686/ffmpeg_api.patch
    (from rev 89628, cinelerra-cv/trunk/ffmpeg_api.patch)
  cinelerra-cv/repos/community-staging-i686/v4l1_removal.patch
    (from rev 89628, cinelerra-cv/trunk/v4l1_removal.patch)
  cinelerra-cv/repos/community-staging-x86_64/
  cinelerra-cv/repos/community-staging-x86_64/PKGBUILD
    (from rev 89628, cinelerra-cv/trunk/PKGBUILD)
  cinelerra-cv/repos/community-staging-x86_64/cinelerra-std_and_str_h.patch
    (from rev 89628, cinelerra-cv/trunk/cinelerra-std_and_str_h.patch)
  cinelerra-cv/repos/community-staging-x86_64/ffmpeg_api.patch
    (from rev 89628, cinelerra-cv/trunk/ffmpeg_api.patch)
  cinelerra-cv/repos/community-staging-x86_64/v4l1_removal.patch
    (from rev 89628, cinelerra-cv/trunk/v4l1_removal.patch)

--------------------------------------------------------+
 community-staging-i686/PKGBUILD                        |   85 +++++++
 community-staging-i686/cinelerra-std_and_str_h.patch   |   81 +++++++
 community-staging-i686/ffmpeg_api.patch                |  163 +++++++++++++++
 community-staging-i686/v4l1_removal.patch              |  125 +++++++++++
 community-staging-x86_64/PKGBUILD                      |   85 +++++++
 community-staging-x86_64/cinelerra-std_and_str_h.patch |   81 +++++++
 community-staging-x86_64/ffmpeg_api.patch              |  163 +++++++++++++++
 community-staging-x86_64/v4l1_removal.patch            |  125 +++++++++++
 8 files changed, 908 insertions(+)

Copied: cinelerra-cv/repos/community-staging-i686/PKGBUILD (from rev 89628, 
cinelerra-cv/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD                             (rev 0)
+++ community-staging-i686/PKGBUILD     2013-04-30 15:37:06 UTC (rev 89629)
@@ -0,0 +1,85 @@
+# $Id$
+# Maintainer: Ray Rashif <sc...@archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1...@archlinux.us>
+# Contributor: Jaroslaw Swierczynski <swier...@aur.archlinux.org>
+# Contributor: Alexander Rødseth <rods...@gmail.com>
+
+pkgname=cinelerra-cv
+pkgver=2.2
+_gitrel=2.2.0
+pkgrel=15
+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')
+options=('!libtool')
+source=("$pkgname::git+git://git.cinelerra.org/CinelerraCV.git#branch=rel$_gitrel"
+        'v4l1_removal.patch'
+        'cinelerra-std_and_str_h.patch'
+        'ffmpeg_api.patch')
+md5sums=('SKIP'
+         'bfa85e20809429d88eba4ab83e569612'
+         '02d8222e596133bbc05eaad15bef242c'
+         'b05ec2fb54e7d02f6167525417802111')
+
+_confit() {
+  ./configure --prefix=/usr \
+              --with-buildinfo=git/recompile \
+              --with-external-ffmpeg \
+              --enable-opengl \
+              --disable-esd $@
+}
+
+prepare() {
+  cd "$srcdir/$pkgname"
+
+  # v4l1 removal patch
+  patch -Np1 -i "$srcdir/v4l1_removal.patch"
+
+  patch -Np0 -i "$srcdir/cinelerra-std_and_str_h.patch"
+
+  # new ffmpeg api patch
+  patch -Np1 -i "$srcdir/ffmpeg_api.patch"
+
+  # TODO: check if this is still needed (not sure what it does) --schiv
+  sed -i -e '/Debian/d' admin/nasm
+
+  # 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
+  sed -i '/\/X11R6/s///' configure.in
+}
+
+build() {
+  cd "$srcdir/$pkgname"
+
+  # 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 (forgot why at all) --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 89628, 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-04-30 
15:37:06 UTC (rev 89629)
@@ -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/ffmpeg_api.patch (from rev 
89628, cinelerra-cv/trunk/ffmpeg_api.patch)
===================================================================
--- community-staging-i686/ffmpeg_api.patch                             (rev 0)
+++ community-staging-i686/ffmpeg_api.patch     2013-04-30 15:37:06 UTC (rev 
89629)
@@ -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 
89628, cinelerra-cv/trunk/v4l1_removal.patch)
===================================================================
--- community-staging-i686/v4l1_removal.patch                           (rev 0)
+++ community-staging-i686/v4l1_removal.patch   2013-04-30 15:37:06 UTC (rev 
89629)
@@ -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 89628, 
cinelerra-cv/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2013-04-30 15:37:06 UTC (rev 89629)
@@ -0,0 +1,85 @@
+# $Id$
+# Maintainer: Ray Rashif <sc...@archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1...@archlinux.us>
+# Contributor: Jaroslaw Swierczynski <swier...@aur.archlinux.org>
+# Contributor: Alexander Rødseth <rods...@gmail.com>
+
+pkgname=cinelerra-cv
+pkgver=2.2
+_gitrel=2.2.0
+pkgrel=15
+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')
+options=('!libtool')
+source=("$pkgname::git+git://git.cinelerra.org/CinelerraCV.git#branch=rel$_gitrel"
+        'v4l1_removal.patch'
+        'cinelerra-std_and_str_h.patch'
+        'ffmpeg_api.patch')
+md5sums=('SKIP'
+         'bfa85e20809429d88eba4ab83e569612'
+         '02d8222e596133bbc05eaad15bef242c'
+         'b05ec2fb54e7d02f6167525417802111')
+
+_confit() {
+  ./configure --prefix=/usr \
+              --with-buildinfo=git/recompile \
+              --with-external-ffmpeg \
+              --enable-opengl \
+              --disable-esd $@
+}
+
+prepare() {
+  cd "$srcdir/$pkgname"
+
+  # v4l1 removal patch
+  patch -Np1 -i "$srcdir/v4l1_removal.patch"
+
+  patch -Np0 -i "$srcdir/cinelerra-std_and_str_h.patch"
+
+  # new ffmpeg api patch
+  patch -Np1 -i "$srcdir/ffmpeg_api.patch"
+
+  # TODO: check if this is still needed (not sure what it does) --schiv
+  sed -i -e '/Debian/d' admin/nasm
+
+  # 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
+  sed -i '/\/X11R6/s///' configure.in
+}
+
+build() {
+  cd "$srcdir/$pkgname"
+
+  # 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 (forgot why at all) --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 89628, 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-04-30 
15:37:06 UTC (rev 89629)
@@ -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/ffmpeg_api.patch (from rev 
89628, cinelerra-cv/trunk/ffmpeg_api.patch)
===================================================================
--- community-staging-x86_64/ffmpeg_api.patch                           (rev 0)
+++ community-staging-x86_64/ffmpeg_api.patch   2013-04-30 15:37:06 UTC (rev 
89629)
@@ -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 89628, cinelerra-cv/trunk/v4l1_removal.patch)
===================================================================
--- community-staging-x86_64/v4l1_removal.patch                         (rev 0)
+++ community-staging-x86_64/v4l1_removal.patch 2013-04-30 15:37:06 UTC (rev 
89629)
@@ -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"

Reply via email to