]> git.pld-linux.org Git - packages/gpac.git/commitdiff
- added ffmped-0.8 patch
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 27 Jun 2011 19:34:21 +0000 (19:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- ghost soname symlink
- package headers as -devel
- release 2

Changed files:
    gpac-ffmpeg-0.8.patch -> 1.1
    gpac.spec -> 1.34

gpac-ffmpeg-0.8.patch [new file with mode: 0644]
gpac.spec

diff --git a/gpac-ffmpeg-0.8.patch b/gpac-ffmpeg-0.8.patch
new file mode 100644 (file)
index 0000000..85b0334
--- /dev/null
@@ -0,0 +1,160 @@
+--- gpac/modules/ffmpeg_in/ffmpeg_decode.c.orig        2011-06-27 18:51:07.878588020 +0200
++++ gpac/modules/ffmpeg_in/ffmpeg_decode.c     2011-06-27 20:18:43.345430660 +0200
+@@ -24,6 +24,7 @@
+ #include "ffmpeg_in.h"
+ #include <gpac/avparse.h>
++#include <libavutil/avutil.h>
+ static AVCodec *ffmpeg_get_codec(u32 codec_4cc)
+ {
+@@ -111,7 +112,7 @@
+               bs = gf_bs_new(esd->decoderConfig->decoderSpecificInfo->data, esd->decoderConfig->decoderSpecificInfo->dataLength, GF_BITSTREAM_READ);
+               codec_id = gf_bs_read_u32(bs);
+               if (ffd->st==GF_STREAM_AUDIO) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
+                       ffd->ctx->sample_rate = gf_bs_read_u32(bs);
+                       ffd->ctx->channels = gf_bs_read_u16(bs);
+                       ffd->ctx->frame_size = gf_bs_read_u16(bs);
+@@ -121,7 +122,7 @@
+                       /*ffmpeg specific*/
+                       ffd->ctx->block_align = gf_bs_read_u16(bs);
+               } else if (ffd->st==GF_STREAM_VISUAL) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
+                       ffd->ctx->width = gf_bs_read_u16(bs);
+                       ffd->ctx->height = gf_bs_read_u16(bs);
+               }
+@@ -138,7 +139,7 @@
+               bs = gf_bs_new(esd->decoderConfig->decoderSpecificInfo->data, esd->decoderConfig->decoderSpecificInfo->dataLength, GF_BITSTREAM_READ);
+               codec_id = gf_bs_read_u32(bs);
+               if (ffd->st==GF_STREAM_AUDIO) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
+                       ffd->ctx->sample_rate = gf_bs_read_u32(bs);
+                       ffd->ctx->channels = gf_bs_read_u16(bs);
+                       ffd->ctx->frame_size = gf_bs_read_u16(bs);
+@@ -151,7 +152,7 @@
+                         ffd->ctx->frame_size = 160;
+                       }
+               } else if (ffd->st==GF_STREAM_VISUAL) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
+                       ffd->ctx->width = gf_bs_read_u16(bs);
+                       ffd->ctx->height = gf_bs_read_u16(bs);
+               }
+@@ -163,7 +164,7 @@
+       else {
+               u32 codec_id = 0;
+               if (ffd->st==GF_STREAM_VISUAL) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
+                       switch (ffd->oti) {
+                       case 0x20:
+                               codec_id = CODEC_ID_MPEG4;
+@@ -190,7 +191,7 @@
+                               break;
+                       }
+               } else if (ffd->st==GF_STREAM_AUDIO) {
+-                      ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
++                      ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
+                       switch (ffd->oti) {
+                       case 0x69:
+                       case 0x6B:
+@@ -412,20 +413,20 @@
+       /*WARNING: this breaks H264 (and maybe others) decoding, disabled for now*/
+ #if 1
+-      if (!ffd->ctx->hurry_up) {
++      if (ffd->ctx->skip_frame < AVDISCARD_NONREF) {
+               switch (mmlevel) {
+               case GF_CODEC_LEVEL_SEEK:
+               case GF_CODEC_LEVEL_DROP:
+                       /*skip as much as possible*/
+-                      ffd->ctx->hurry_up = 5;
++                      ffd->ctx->skip_frame = AVDISCARD_NONKEY;
+                       break;
+               case GF_CODEC_LEVEL_VERY_LATE:
+               case GF_CODEC_LEVEL_LATE:
+                       /*skip B-frames*/
+-                      ffd->ctx->hurry_up = 1;
++                      ffd->ctx->skip_frame = AVDISCARD_NONREF;
+                       break;
+               default:
+-                      ffd->ctx->hurry_up = 0;
++                      ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
+                       break;
+               }
+       }
+@@ -451,7 +452,7 @@
+               if (len<0) { ffd->frame_start = 0; return GF_NON_COMPLIANT_BITSTREAM; }
+               if (gotpic<0) { ffd->frame_start = 0; return GF_OK; }
+-              ffd->ctx->hurry_up = 0;
++              ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
+               if (ffd->ctx->frame_size < gotpic) ffd->ctx->frame_size = gotpic;
+@@ -552,7 +553,7 @@
+                               }
+                       }
+               }
+-              ffd->ctx->hurry_up = 0;
++              ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
+               /*recompute outsize in case on-the-fly change*/
+               if ((w != ffd->ctx->width) || (h != ffd->ctx->height)) {
+                       outsize = ffd->ctx->width * ffd->ctx->height * 3;
+--- gpac/modules/ffmpeg_in/ffmpeg_demux.c.orig 2008-11-28 18:21:48.000000000 +0100
++++ gpac/modules/ffmpeg_in/ffmpeg_demux.c      2011-06-27 21:20:51.252222149 +0200
+@@ -31,6 +31,7 @@
+ #if !defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+ #include <errno.h>
+ #endif
++#include <libavutil/avutil.h>
+ static u32 FFDemux_Run(void *par)
+ {
+@@ -233,10 +234,10 @@
+     for(i = 0; i < ctx->nb_streams; i++) {
+         AVCodecContext *enc = ctx->streams[i]->codec;
+         switch(enc->codec_type) {
+-        case CODEC_TYPE_AUDIO:
++        case AVMEDIA_TYPE_AUDIO:
+             if (!has_audio) has_audio = 1;
+             break;
+-        case CODEC_TYPE_VIDEO:
++        case AVMEDIA_TYPE_VIDEO:
+             if (!has_video) has_video= 1;
+             break;
+         default:
+@@ -531,10 +532,10 @@
+       switch (i) {
+       case 0: e = GF_OK; break;
+-      case AVERROR_IO: e = GF_URL_ERROR; goto err_exit;
++      case AVERROR(EIO): e = GF_URL_ERROR; goto err_exit;
+       case AVERROR_INVALIDDATA: e = GF_NON_COMPLIANT_BITSTREAM; goto err_exit;
+-      case AVERROR_NOMEM: e = GF_OUT_OF_MEM; goto err_exit;
+-      case AVERROR_NOFMT: e = GF_NOT_SUPPORTED; goto err_exit;
++      case AVERROR(ENOMEM): e = GF_OUT_OF_MEM; goto err_exit;
++      case AVERROR(EILSEQ): e = GF_NOT_SUPPORTED; goto err_exit;
+       default: e = GF_SERVICE_ERROR; goto err_exit;
+       }
+@@ -552,13 +553,13 @@
+     for (i = 0; i < ffd->ctx->nb_streams; i++) {
+         AVCodecContext *enc = ffd->ctx->streams[i]->codec;
+         switch(enc->codec_type) {
+-        case CODEC_TYPE_AUDIO:
++        case AVMEDIA_TYPE_AUDIO:
+             if ((ffd->audio_st<0) && (ffd->service_type!=1)) {
+                               ffd->audio_st = i;
+                               ffd->audio_tscale = ffd->ctx->streams[i]->time_base;
+                       }
+             break;
+-        case CODEC_TYPE_VIDEO:
++        case AVMEDIA_TYPE_VIDEO:
+             if ((ffd->video_st<0) && (ffd->service_type!=2)) {
+                               ffd->video_st = i;
+                               ffd->video_tscale = ffd->ctx->streams[i]->time_base;
index 6246bd3396eafd62a4ec9f656042a600a297e268..3e8169e1d6ab18bfbca3d80eb47098c7dee861d6 100644 (file)
--- a/gpac.spec
+++ b/gpac.spec
@@ -15,7 +15,7 @@ Summary:      GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-
 Summary(pl.UTF-8):     GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
 Name:          gpac
 Version:       0.4.5
-Release:       1
+Release:       2
 License:       LGPL v2+
 Group:         Applications/Multimedia
 Source0:       http://downloads.sourceforge.net/gpac/%{name}-%{version}.tar.gz
@@ -28,6 +28,7 @@ Patch4:               %{name}-amr.patch
 Patch5:                %{name}-ffmpeg.patch
 Patch6:                %{name}-install-is-not-clean.patch
 Patch7:                %{name}-flags.patch
+Patch8:                %{name}-ffmpeg-0.8.patch
 URL:           http://gpac.sourceforge.net/
 BuildRequires: SDL-devel
 BuildRequires: a52dec-libs-devel
@@ -35,7 +36,7 @@ BuildRequires:        alsa-lib-devel >= 0.9
 %{?with_amr:BuildRequires:     amrnb-devel}
 %{?with_amr:BuildRequires:     amrwb-devel}
 %{?with_faad:BuildRequires:    faad2-devel}
-%{?with_ffmpeg:BuildRequires:  ffmpeg-devel >= 0.6}
+%{?with_ffmpeg:BuildRequires:  ffmpeg-devel >= 0.8}
 %{?with_freetype:BuildRequires:        freetype-devel}
 BuildRequires: jack-audio-connection-kit-devel
 %{?with_js:BuildRequires:      js-devel}
@@ -89,6 +90,18 @@ DSP) z prostym celem: wymagać tak mało pamięci, jak to tylko możliwe.
 Projekt docelowo dostarczy odtwarzacz(e), kodery systemowe i narzędzia
 do publikacji w celu dystrybucji materiałów.
 
+%package devel
+Summary:       Header files for GPAC library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki GPAC
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for GPAC library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki GPAC.
+
 %package gui
 Summary:       wxWidgets-based GUI for GPAC
 Summary(pl.UTF-8):     Oparty na wxWidgets graficzny interfejs do GPAC
@@ -125,6 +138,7 @@ Wtyczka GPAC dla przeglądarek WWW zgodnych z Netscape.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 %if %{with amr}
 sed -i -e 's/amr_\([nw]b\)_ft/amr\1/' modules/amr_float_dec/amr_float_dec.c
@@ -172,6 +186,9 @@ rm -rf $RPM_BUILD_ROOT
        libdir=%{_lib} \
        MOZILLA_DIR=$RPM_BUILD_ROOT%{_browserpluginsdir}
 
+install -d $RPM_BUILD_ROOT%{_includedir}
+cp -a include/gpac $RPM_BUILD_ROOT%{_includedir}/gpac
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -192,7 +209,7 @@ fi
 %attr(755,root,root) %{_bindir}/MP4Box
 %attr(755,root,root) %{_bindir}/MP4Client
 %attr(755,root,root) %{_libdir}/libgpac-%{version}.so
-%attr(755,root,root) %{_libdir}/libgpac.so
+%attr(755,root,root) %ghost %{_libdir}/libgpac.so
 %dir %{_libdir}/gpac
 %attr(755,root,root) %{_libdir}/gpac/gm_*.so
 %{_datadir}/gpac
@@ -200,6 +217,10 @@ fi
 %{_mandir}/man1/mp4box.1*
 %{_mandir}/man1/mp4client.1*
 
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/gpac
+
 %files gui
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/Osmo4
This page took 0.096787 seconds and 4 git commands to generate.