[svn] r5077 - trunk/rpms/ffmpeg

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Mon Jan 15 18:58:22 CET 2007


Author: thias
Date: 2007-01-15 18:58:21 +0100 (Mon, 15 Jan 2007)
New Revision: 5077

Added:
   trunk/rpms/ffmpeg/ffmpeg-20070109-faad2.patch
   trunk/rpms/ffmpeg/ffmpeg-20070109-gsm.patch
Removed:
   trunk/rpms/ffmpeg/ffmpeg-20061215-gsm.patch
Modified:
   trunk/rpms/ffmpeg/ffmpeg.spec
Log:
Update ffmpeg and patch faad support.


Deleted: trunk/rpms/ffmpeg/ffmpeg-20061215-gsm.patch
===================================================================
--- trunk/rpms/ffmpeg/ffmpeg-20061215-gsm.patch	2007-01-15 16:31:31 UTC (rev 5076)
+++ trunk/rpms/ffmpeg/ffmpeg-20061215-gsm.patch	2007-01-15 17:58:21 UTC (rev 5077)
@@ -1,24 +0,0 @@
-diff -Naupr ffmpeg-20061215.orig/configure ffmpeg-20061215/configure
---- ffmpeg-20061215.orig/configure	2006-12-13 21:42:11.000000000 +0100
-+++ ffmpeg-20061215/configure	2006-12-18 11:41:24.000000000 +0100
-@@ -1456,7 +1456,7 @@ fi
- 
- # these are off by default, so fail if requested and not available
- enabled dts     && require libdts dts.h dts_init -ldts -lm
--enabled libgsm  && require libgsm gsm.h gsm_create -lgsm
-+enabled libgsm  && require libgsm gsm/gsm.h gsm_create -lgsm
- enabled mp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
- enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg
- enabled libogg  && require libogg ogg/ogg.h ogg_sync_init -logg
-diff -Naupr ffmpeg-20061215.orig/libavcodec/libgsm.c ffmpeg-20061215/libavcodec/libgsm.c
---- ffmpeg-20061215.orig/libavcodec/libgsm.c	2006-10-07 17:30:46.000000000 +0200
-+++ ffmpeg-20061215/libavcodec/libgsm.c	2006-12-18 11:41:47.000000000 +0100
-@@ -25,7 +25,7 @@
-  */
- 
- #include "avcodec.h"
--#include <gsm.h>
-+#include <gsm/gsm.h>
- 
- // gsm.h miss some essential constants
- #define GSM_BLOCK_SIZE 33

Added: trunk/rpms/ffmpeg/ffmpeg-20070109-faad2.patch
===================================================================
--- trunk/rpms/ffmpeg/ffmpeg-20070109-faad2.patch	                        (rev 0)
+++ trunk/rpms/ffmpeg/ffmpeg-20070109-faad2.patch	2007-01-15 17:58:21 UTC (rev 5077)
@@ -0,0 +1,234 @@
+diff -Naupr ffmpeg-20070109.orig/configure ffmpeg-20070109/configure
+--- ffmpeg-20070109.orig/configure	2007-01-07 01:22:32.000000000 +0100
++++ ffmpeg-20070109/configure	2007-01-09 16:28:16.000000000 +0100
+@@ -1516,7 +1516,7 @@ if enabled libfaad; then
+     check_ld <<EOF && add_extralibs -lfaad || die "ERROR: libfaad not found"
+ #include <faad.h>
+ int main(){
+-    faacDecOpen();
++    NeAACDecOpen();
+     return 0;
+ }
+ EOF
+diff -Naupr ffmpeg-20070109.orig/libavcodec/faad.c ffmpeg-20070109/libavcodec/faad.c
+--- ffmpeg-20070109.orig/libavcodec/faad.c	2007-01-07 00:54:01.000000000 +0100
++++ ffmpeg-20070109/libavcodec/faad.c	2007-01-09 16:28:52.000000000 +0100
+@@ -55,42 +55,42 @@ typedef struct {
+     int init;
+ 
+     /* faad calls */
+-    faacDecHandle FAADAPI (*faacDecOpen)(void);
+-    faacDecConfigurationPtr FAADAPI (*faacDecGetCurrentConfiguration)(faacDecHandle hDecoder);
++    NeAACDecHandle FAADAPI (*NeAACDecOpen)(void);
++    NeAACDecConfigurationPtr FAADAPI (*NeAACDecGetCurrentConfiguration)(NeAACDecHandle hDecoder);
+ #ifndef FAAD2_VERSION
+-        int FAADAPI (*faacDecSetConfiguration)(faacDecHandle hDecoder,
+-                                           faacDecConfigurationPtr config);
+-        int FAADAPI (*faacDecInit)(faacDecHandle hDecoder,
++        int FAADAPI (*NeAACDecSetConfiguration)(NeAACDecHandle hDecoder,
++                                           NeAACDecConfigurationPtr config);
++        int FAADAPI (*NeAACDecInit)(NeAACDecHandle hDecoder,
+                                 unsigned char *buffer,
+                                 unsigned long *samplerate,
+                                 unsigned long *channels);
+-        int FAADAPI (*faacDecInit2)(faacDecHandle hDecoder, unsigned char *pBuffer,
++        int FAADAPI (*NeAACDecInit2)(NeAACDecHandle hDecoder, unsigned char *pBuffer,
+                                 unsigned long SizeOfDecoderSpecificInfo,
+                                 unsigned long *samplerate, unsigned long *channels);
+-        int FAADAPI (*faacDecDecode)(faacDecHandle hDecoder,
++        int FAADAPI (*NeAACDecDecode)(NeAACDecHandle hDecoder,
+                                 unsigned char *buffer,
+                                 unsigned long *bytesconsumed,
+                                 short *sample_buffer,
+                                 unsigned long *samples);
+ #else
+-        unsigned char FAADAPI (*faacDecSetConfiguration)(faacDecHandle hDecoder,
+-                                                     faacDecConfigurationPtr config);
+-        long FAADAPI (*faacDecInit)(faacDecHandle hDecoder,
++        unsigned char FAADAPI (*NeAACDecSetConfiguration)(NeAACDecHandle hDecoder,
++                                                     NeAACDecConfigurationPtr config);
++        long FAADAPI (*NeAACDecInit)(NeAACDecHandle hDecoder,
+                                    unsigned char *buffer,
+                                  unsigned long buffer_size,
+                                  unsigned long *samplerate,
+                                  unsigned char *channels);
+-        char FAADAPI (*faacDecInit2)(faacDecHandle hDecoder, unsigned char *pBuffer,
++        char FAADAPI (*NeAACDecInit2)(NeAACDecHandle hDecoder, unsigned char *pBuffer,
+                                  unsigned long SizeOfDecoderSpecificInfo,
+                                  unsigned long *samplerate, unsigned char *channels);
+-        void *FAADAPI (*faacDecDecode)(faacDecHandle hDecoder,
+-                                         faacDecFrameInfo *hInfo,
++        void *FAADAPI (*NeAACDecDecode)(NeAACDecHandle hDecoder,
++                                         NeAACDecFrameInfo *hInfo,
+                                          unsigned char *buffer,
+                                                                  unsigned long buffer_size);
+-        char* FAADAPI (*faacDecGetErrorMessage)(unsigned char errcode);
++        char* FAADAPI (*NeAACDecGetErrorMessage)(unsigned char errcode);
+ #endif
+ 
+-    void FAADAPI (*faacDecClose)(faacDecHandle hDecoder);
++    void FAADAPI (*NeAACDecClose)(NeAACDecHandle hDecoder);
+ 
+ 
+ } FAACContext;
+@@ -113,12 +113,12 @@ static int faac_init_mp4(AVCodecContext 
+     int r = 0;
+ 
+     if (avctx->extradata){
+-        r = s->faacDecInit2(s->faac_handle, (uint8_t*) avctx->extradata,
++        r = s->NeAACDecInit2(s->faac_handle, (uint8_t*) avctx->extradata,
+                             avctx->extradata_size,
+                             &samplerate, &channels);
+         if (r < 0){
+             av_log(avctx, AV_LOG_ERROR,
+-                   "faacDecInit2 failed r:%d   sr:%ld  ch:%ld  s:%d\n",
++                   "NeAACDecInit2 failed r:%d   sr:%ld  ch:%ld  s:%d\n",
+                    r, samplerate, (long)channels, avctx->extradata_size);
+         } else {
+             avctx->sample_rate = samplerate;
+@@ -141,13 +141,13 @@ static int faac_decode_frame(AVCodecCont
+     unsigned long samples;
+     int out;
+ #else
+-    faacDecFrameInfo frame_info;
++    NeAACDecFrameInfo frame_info;
+     void *out;
+ #endif
+     if(buf_size == 0)
+         return 0;
+ #ifndef FAAD2_VERSION
+-    out = s->faacDecDecode(s->faac_handle,
++    out = s->NeAACDecDecode(s->faac_handle,
+                            (unsigned char*)buf,
+                            &bytesconsumed,
+                            data,
+@@ -162,10 +162,10 @@ static int faac_decode_frame(AVCodecCont
+     if(!s->init){
+         unsigned long srate;
+         unsigned char channels;
+-        int r = s->faacDecInit(s->faac_handle, buf, buf_size, &srate, &channels);
++        int r = s->NeAACDecInit(s->faac_handle, buf, buf_size, &srate, &channels);
+         if(r < 0){
+             av_log(avctx, AV_LOG_ERROR, "faac: codec init failed: %s\n",
+-                   s->faacDecGetErrorMessage(frame_info.error));
++                   s->NeAACDecGetErrorMessage(frame_info.error));
+             return -1;
+         }
+         avctx->sample_rate = srate;
+@@ -173,11 +173,11 @@ static int faac_decode_frame(AVCodecCont
+         s->init = 1;
+     }
+ 
+-    out = s->faacDecDecode(s->faac_handle, &frame_info, (unsigned char*)buf, (unsigned long)buf_size);
++    out = s->NeAACDecDecode(s->faac_handle, &frame_info, (unsigned char*)buf, (unsigned long)buf_size);
+ 
+     if (frame_info.error > 0) {
+         av_log(avctx, AV_LOG_ERROR, "faac: frame decoding failed: %s\n",
+-                s->faacDecGetErrorMessage(frame_info.error));
++                s->NeAACDecGetErrorMessage(frame_info.error));
+         return -1;
+     }
+ 
+@@ -196,8 +196,8 @@ static int faac_decode_end(AVCodecContex
+ {
+     FAACContext *s = (FAACContext *) avctx->priv_data;
+ 
+-    if (s->faacDecClose)
+-        s->faacDecClose(s->faac_handle);
++    if (s->NeAACDecClose)
++        s->NeAACDecClose(s->faac_handle);
+ 
+     dlclose(s->handle);
+     return 0;
+@@ -206,7 +206,7 @@ static int faac_decode_end(AVCodecContex
+ static int faac_decode_init(AVCodecContext *avctx)
+ {
+     FAACContext *s = (FAACContext *) avctx->priv_data;
+-    faacDecConfigurationPtr faac_cfg;
++    NeAACDecConfigurationPtr faac_cfg;
+ 
+ #ifdef CONFIG_LIBFAADBIN
+     const char* err = 0;
+@@ -219,38 +219,38 @@ static int faac_decode_init(AVCodecConte
+         return -1;
+     }
+ #define dfaac(a, b) \
+-    do { static const char* n = "faacDec" #a; \
+-    if ((s->faacDec ## a = b dlsym( s->handle, n )) == NULL) { err = n; break; } } while(0)
++    do { static const char* n = "NeAACDec" #a; \
++    if ((s->NeAACDec ## a = b dlsym( s->handle, n )) == NULL) { err = n; break; } } while(0)
+     for(;;) {
+ #else  /* !CONFIG_LIBFAADBIN */
+-#define dfaac(a, b)     s->faacDec ## a = faacDec ## a
++#define dfaac(a, b)     s->NeAACDec ## a = NeAACDec ## a
+ #endif /* CONFIG_LIBFAADBIN */
+ 
+         // resolve all needed function calls
+-        dfaac(Open, (faacDecHandle FAADAPI (*)(void)));
+-        dfaac(GetCurrentConfiguration, (faacDecConfigurationPtr
+-                                        FAADAPI (*)(faacDecHandle)));
++        dfaac(Open, (NeAACDecHandle FAADAPI (*)(void)));
++        dfaac(GetCurrentConfiguration, (NeAACDecConfigurationPtr
++                                        FAADAPI (*)(NeAACDecHandle)));
+ #ifndef FAAD2_VERSION
+-        dfaac(SetConfiguration, (int FAADAPI (*)(faacDecHandle,
+-                                                           faacDecConfigurationPtr)));
++        dfaac(SetConfiguration, (int FAADAPI (*)(NeAACDecHandle,
++                                                           NeAACDecConfigurationPtr)));
+ 
+-        dfaac(Init, (int FAADAPI (*)(faacDecHandle, unsigned char*,
++        dfaac(Init, (int FAADAPI (*)(NeAACDecHandle, unsigned char*,
+                                      unsigned long*, unsigned long*)));
+-    dfaac(Init2, (int FAADAPI (*)(faacDecHandle, unsigned char*,
++    dfaac(Init2, (int FAADAPI (*)(NeAACDecHandle, unsigned char*,
+                                        unsigned long, unsigned long*,
+                                        unsigned long*)));
+-    dfaac(Close, (void FAADAPI (*)(faacDecHandle hDecoder)));
+-        dfaac(Decode, (int FAADAPI (*)(faacDecHandle, unsigned char*,
++    dfaac(Close, (void FAADAPI (*)(NeAACDecHandle hDecoder)));
++        dfaac(Decode, (int FAADAPI (*)(NeAACDecHandle, unsigned char*,
+                              unsigned long*, short*, unsigned long*)));
+ #else
+-        dfaac(SetConfiguration, (unsigned char FAADAPI (*)(faacDecHandle,
+-                                                           faacDecConfigurationPtr)));
+-        dfaac(Init, (long FAADAPI (*)(faacDecHandle, unsigned char*,
++        dfaac(SetConfiguration, (unsigned char FAADAPI (*)(NeAACDecHandle,
++                                                           NeAACDecConfigurationPtr)));
++        dfaac(Init, (long FAADAPI (*)(NeAACDecHandle, unsigned char*,
+                                      unsigned long, unsigned long*, unsigned char*)));
+-        dfaac(Init2, (char FAADAPI (*)(faacDecHandle, unsigned char*,
++        dfaac(Init2, (char FAADAPI (*)(NeAACDecHandle, unsigned char*,
+                                        unsigned long, unsigned long*,
+                                        unsigned char*)));
+-        dfaac(Decode, (void *FAADAPI (*)(faacDecHandle, faacDecFrameInfo*,
++        dfaac(Decode, (void *FAADAPI (*)(NeAACDecHandle, NeAACDecFrameInfo*,
+                              unsigned char*, unsigned long)));
+         dfaac(GetErrorMessage, (char* FAADAPI (*)(unsigned char)));
+ #endif
+@@ -267,7 +267,7 @@ static int faac_decode_init(AVCodecConte
+     }
+ #endif
+ 
+-    s->faac_handle = s->faacDecOpen();
++    s->faac_handle = s->NeAACDecOpen();
+     if (!s->faac_handle) {
+         av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot create handler!\n");
+         faac_decode_end(avctx);
+@@ -275,7 +275,7 @@ static int faac_decode_init(AVCodecConte
+     }
+ 
+ 
+-    faac_cfg = s->faacDecGetCurrentConfiguration(s->faac_handle);
++    faac_cfg = s->NeAACDecGetCurrentConfiguration(s->faac_handle);
+ 
+     if (faac_cfg) {
+         switch (avctx->bits_per_sample) {
+@@ -305,7 +305,7 @@ static int faac_decode_init(AVCodecConte
+         faac_cfg->defObjectType = LC;
+     }
+ 
+-    s->faacDecSetConfiguration(s->faac_handle, faac_cfg);
++    s->NeAACDecSetConfiguration(s->faac_handle, faac_cfg);
+ 
+     faac_init_mp4(avctx);
+ 

Added: trunk/rpms/ffmpeg/ffmpeg-20070109-gsm.patch
===================================================================
--- trunk/rpms/ffmpeg/ffmpeg-20070109-gsm.patch	                        (rev 0)
+++ trunk/rpms/ffmpeg/ffmpeg-20070109-gsm.patch	2007-01-15 17:58:21 UTC (rev 5077)
@@ -0,0 +1,24 @@
+diff -Naupr ffmpeg-20070109.orig/configure ffmpeg-20070109/configure
+--- ffmpeg-20070109.orig/configure	2007-01-07 01:22:32.000000000 +0100
++++ ffmpeg-20070109/configure	2007-01-09 16:26:37.000000000 +0100
+@@ -1481,7 +1481,7 @@ done
+ 
+ # these are off by default, so fail if requested and not available
+ enabled libdts  && require libdts dts.h dts_init -ldts -lm
+-enabled libgsm  && require libgsm gsm.h gsm_create -lgsm
++enabled libgsm  && require libgsm gsm/gsm.h gsm_create -lgsm
+ enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
+ enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg
+ enabled libogg  && require libogg ogg/ogg.h ogg_sync_init -logg
+diff -Naupr ffmpeg-20070109.orig/libavcodec/libgsm.c ffmpeg-20070109/libavcodec/libgsm.c
+--- ffmpeg-20070109.orig/libavcodec/libgsm.c	2006-10-07 17:30:46.000000000 +0200
++++ ffmpeg-20070109/libavcodec/libgsm.c	2007-01-09 16:26:54.000000000 +0100
+@@ -25,7 +25,7 @@
+  */
+ 
+ #include "avcodec.h"
+-#include <gsm.h>
++#include <gsm/gsm.h>
+ 
+ // gsm.h miss some essential constants
+ #define GSM_BLOCK_SIZE 33

Modified: trunk/rpms/ffmpeg/ffmpeg.spec
===================================================================
--- trunk/rpms/ffmpeg/ffmpeg.spec	2007-01-15 16:31:31 UTC (rev 5076)
+++ trunk/rpms/ffmpeg/ffmpeg.spec	2007-01-15 17:58:21 UTC (rev 5077)
@@ -21,12 +21,12 @@
 %{?el2:%define _without_vorbis 1}
 %{?el2:%define _without_x264 1}
 
-%define date   20061215
+%define date 20070109
 
 Summary: Utilities and libraries to record, convert and stream audio and video
 Name: ffmpeg
 Version: 0.4.9
-Release: 0.7%{?date:.%{date}}
+Release: 0.8%{?date:.%{date}}
 License: GPL
 Group: Applications/Multimedia
 URL: http://ffmpeg.org/
@@ -34,7 +34,8 @@
 # find ffmpeg -name .svn | xargs rm -rf
 # then rename the directory and compress
 Source: ffmpeg-%{date}.tar.bz2
-Patch0: ffmpeg-20061215-gsm.patch
+Patch0: ffmpeg-20070109-gsm.patch
+Patch1: ffmpeg-20070109-faad2.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: imlib2-devel, SDL-devel, freetype-devel, zlib-devel
 ### configure needs sed -i option
@@ -113,6 +114,7 @@
 %prep
 %setup -n ffmpeg-%{date}
 %patch0 -p1 -b .gsm
+%patch1 -p1 -b .faad2
 
 
 %build
@@ -205,6 +207,10 @@
 
 
 %changelog
+* Tue Jan  9 2007 Matthias Saou <http://freshrpms.net/> 0.4.9-0.8.20070109
+- Update to today's SVN codebase, fixes the non existing ffmpeg.pc refrence.
+- Add faad2 patch.
+
 * Fri Dec 15 2006 Matthias Saou <http://freshrpms.net/> 0.4.9-0.7.20061215
 - Update to today's SVN codebase.
 - Update gsm patch so that it still applies.



More information about the svn-commits mailing list