Author: kwizart
Update of /cvs/free/rpms/gpac/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv14473
Modified Files:
gpac.spec
Added Files:
gpac-0.4.5-ffmpeg.patch
Log Message:
Fixes
gpac-0.4.5-ffmpeg.patch:
--- NEW FILE gpac-0.4.5-ffmpeg.patch ---
diff -up gpac/configure.ffmpeg gpac/configure
--- gpac/configure.ffmpeg 2009-03-20 21:46:41.000000000 +0100
+++ gpac/configure 2009-03-20 21:58:21.000000000 +0100
@@ -737,10 +737,11 @@ fi
#look for FFMPEG support
cat > $TMPC << EOF
#include <stddef.h>
-#include <ffmpeg/avcodec.h>
+#include <libavcodec/avcodec.h>
int main( void ) { return 0; }
EOF
-
+ffmpeg_cflags=`pkg-config --cflags libavcodec libavformat libswscale`
+ffmpeg_lflags=`pkg-config --libs libavcodec libavformat libswscale`
if test "$cross_prefix" != "" ; then
echo "HELLO"
echo "HELLO"
@@ -756,7 +757,7 @@ if test "$cross_prefix" != "" ; then
fi
fi
else
- if $cc -o $TMPO $TMPC -lz -lavcodec -lavformat 2> /dev/null ; then
+ if $cc -o $TMPO $TMPC $ffmpeg_cflags $ffmpeg_lflags 2> /dev/null ; then
has_ffmpeg="system"
elif test "$alt_macosx_dir" != "" ; then
if $cc -o $TMPO $TMPC -I$alt_macosx_dir/include -L$alt_macosx_dir/lib -lz -lavcodec
-lavformat 2> /dev/null ; then
@@ -1587,6 +1588,10 @@ echo "CONFIG_OGG=$has_ogg" >> config.mak
echo "CONFIG_VORBIS=$has_vorbis" >> config.mak
echo "CONFIG_THEORA=$has_theora" >> config.mak
echo "CONFIG_FFMPEG=$has_ffmpeg" >> config.mak
+if test "$has_ffmpeg" = "system"; then
+ echo "FFMPEG_CFLAGS=$ffmpeg_cflags" >> config.mak
+ echo "FFMPEG_LFLAGS=$ffmpeg_lflags" >> config.mak
+fi
echo "CONFIG_OSS_AUDIO=$has_oss_audio" >> config.mak
echo "CONFIG_ALSA=$has_alsa" >> config.mak
echo "CONFIG_JACK=$has_jack" >> config.mak
diff -up gpac/modules/ffmpeg_in/ffmpeg_decode.c.ffmpeg
gpac/modules/ffmpeg_in/ffmpeg_decode.c
--- gpac/modules/ffmpeg_in/ffmpeg_decode.c.ffmpeg 2008-11-28 18:26:06.000000000 +0100
+++ gpac/modules/ffmpeg_in/ffmpeg_decode.c 2009-03-20 22:12:55.000000000 +0100
@@ -241,7 +241,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
/*setup audio streams*/
if (ffd->st==GF_STREAM_AUDIO) {
- if ((ffd->codec->type == CODEC_ID_MP3LAME) || (ffd->codec->type ==
CODEC_ID_MP2)) {
+ if ((ffd->codec->type == CODEC_ID_MP3) || (ffd->codec->type ==
CODEC_ID_MP2)) {
ffd->ctx->frame_size = (ffd->ctx->sample_rate > 24000) ? 1152 : 576;
}
/*may be 0 (cfg not known yet)*/
@@ -444,9 +444,9 @@ static GF_Err FFDEC_ProcessData(GF_Media
return GF_OK;
}
if (ffd->frame_start>inBufferLength) ffd->frame_start = 0;
-
+ gotpic=buf_size;
redecode:
- len = avcodec_decode_audio(ffd->ctx, (short *)ffd->audio_buf, &gotpic,
inBuffer + ffd->frame_start, inBufferLength - ffd->frame_start);
+ len = avcodec_decode_audio2(ffd->ctx, (short *)ffd->audio_buf, &gotpic,
inBuffer + ffd->frame_start, inBufferLength - ffd->frame_start);
if (len<0) { ffd->frame_start = 0; return GF_NON_COMPLIANT_BITSTREAM; }
if (gotpic<0) { ffd->frame_start = 0; return GF_OK; }
@@ -643,7 +643,7 @@ redecode:
NULL, NULL, NULL);
if (ffd->sws_ctx)
- sws_scale(ffd->sws_ctx, ffd->frame->data, ffd->frame->linesize, 0,
ffd->ctx->height->codec->height, pict.data, pict.linesize);
+ sws_scale(ffd->sws_ctx, ffd->frame->data, ffd->frame->linesize, 0,
ffd->ctx->height, pict.data, pict.linesize);
#endif
diff -up gpac/modules/ffmpeg_in/ffmpeg_in.h.ffmpeg gpac/modules/ffmpeg_in/ffmpeg_in.h
--- gpac/modules/ffmpeg_in/ffmpeg_in.h.ffmpeg 2008-10-20 13:04:40.000000000 +0200
+++ gpac/modules/ffmpeg_in/ffmpeg_in.h 2009-03-20 21:47:50.000000000 +0100
@@ -56,14 +56,14 @@
/*include FFMPEG APIs*/
-#include <ffmpeg/avformat.h>
+#include <libavformat/avformat.h>
void gf_av_vlog(void* avcl, int level, const char *fmt, va_list vl);
#if LIBAVCODEC_VERSION_INT > ((52<<16)+(0<<8)+0)
#define FFMPEG_SWSCALE
-#include <ffmpeg/swscale.h>
+#include <libswscale/swscale.h>
#endif
/*FFMPEG decoder module */
diff -up gpac/modules/ffmpeg_in/Makefile.ffmpeg gpac/modules/ffmpeg_in/Makefile
--- gpac/modules/ffmpeg_in/Makefile.ffmpeg 2008-11-24 10:14:18.000000000 +0100
+++ gpac/modules/ffmpeg_in/Makefile 2009-03-20 21:46:41.000000000 +0100
@@ -2,7 +2,7 @@ include ../../config.mak
vpath %.c $(SRC_PATH)/modules/ffmpeg_in
-CFLAGS= $(OPTFLAGS) -I$(SRC_PATH)/include
+CFLAGS= $(OPTFLAGS) -I$(SRC_PATH)/include $(FFMPEG_CFLAGS)
ifeq ($(DEBUGBUILD), yes)
CFLAGS+=-g
@@ -15,7 +15,7 @@ LDFLAGS+=-pg
endif
LOCAL_LIB=
-LINKLIBS=-lgpac -lavcodec -lavformat -lz
+LINKLIBS=-lgpac $(FFMPEG_LFLAGS) -lz
#common obj
OBJS=ffmpeg_decode.o ffmpeg_demux.o ffmpeg_load.o
Index: gpac.spec
===================================================================
RCS file: /cvs/free/rpms/gpac/devel/gpac.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- gpac.spec 11 Feb 2009 10:13:45 -0000 1.8
+++ gpac.spec 24 Mar 2009 00:15:19 -0000 1.9
@@ -12,14 +12,14 @@
%define with_osmo 0
# Mozilla stuff fails. It's completely disabled for now.
%define mozver 3.0
-%define geckover 1.9
-%define xuldir %{_datadir}/idl/xulrunner-sdk-1.9pre
-%define xulbindir %{_libdir}/xulrunner-%{geckover}pre
+%define geckover 1.9.1
+%define xuldir %{_datadir}/idl/xulrunner-sdk-%{geckover}
+%define xulbindir %{_libdir}/xulrunner-%{geckover}
Name: gpac
Summary: MPEG-4 multimedia framework
Version: 0.4.5
-Release: 5%{?dist}
+Release: 6%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL:
http://gpac.sourceforge.net/
@@ -34,6 +34,7 @@
Patch6: gpac-0.4.5-shared_sggen.patch
Patch7: gpac-0.4.5-libxml2.patch
Patch8: gpac-ppc64.patch
+Patch9: gpac-0.4.5-ffmpeg.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: ImageMagick
@@ -152,6 +153,7 @@
%patch6 -p1 -b .shared
%patch7 -p1 -b .libxml2
%patch8 -p1 -b .ppc64
+%patch9 -p1 -b .ffmpeg
## kwizart - enable dynamic mode - hardcoded with patch2
# define SONAME number from the first number of gpac version.
@@ -287,7 +289,7 @@
%files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
%doc AUTHORS BUGS Changelog COPYING README TODO
%{_bindir}/MP4*
%{_bindir}/*Gen
@@ -295,14 +297,14 @@
%{_mandir}/man1/*.1.*
%files libs
-%defattr(-,root,root)
+%defattr(-,root,root,-)
%{_libdir}/libgpac.so.*
%{_libdir}/gpac/
%if %{with_osmo}
%files -n %{osmo}
+%defattr(-,root,root,-)
%doc AUTHORS BUGS COPYING README TODO
-%defattr(-,root,root)
%{_bindir}/Osmo4
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/%{osmo}.xpm
@@ -310,27 +312,31 @@
%{?_with_mozilla:
%files -n mozilla-%{osmo}
-%defattr(-,root,root)
+%defattr(-,root,root,-)
%{_libdir}/mozilla/plugins/nposmozilla.so
%{_libdir}/mozilla/components/nposmozilla.xpt
}
%files devel
+%defattr(-,root,root,-)
%doc doc/CODING_STYLE doc/ipmpx_syntax.bt
%doc doc/html/*
-%defattr(-,root,root)
%{_includedir}/gpac/
%{_libdir}/libgpac.so
%if %{with_static}
%files devel-static
-%defattr(-,root,root)
+%defattr(-,root,root,-)
%{_libdir}/libgpac_static.a
%else
%exclude %{_libdir}/libgpac_static.a
%endif
%changelog
+* Mon Mar 23 2009 kwizart < kwizart at
gmail.com > - 0.4.5-6
+- Add ffmpeg patch by Rathann (RPM Fusion #454 )
+- Fix default defattr
+
* Wed Feb 11 2009 kwizart < kwizart at
gmail.com > - 0.4.5-5
- Rebuild for openssl (#363) - Made possible because the
circle dependency with gpac/x264 was fixed first (#362)