[packages/ffms2] - renamed to ffms2, project moved to github - up to 2.20 - new soname libffms2.so.3
glen
glen at pld-linux.org
Sun Aug 31 20:22:36 CEST 2014
commit 8d93948cab3166d06b31d3e21ab386ffc3ac11e6
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Aug 31 21:15:05 2014 +0300
- renamed to ffms2, project moved to github
- up to 2.20
- new soname libffms2.so.3
ffmpegsource-am.patch | 11 ---
ffmpegsource-ffmpeg011.patch | 12 +--
ffmpegsource-ffmpeg10.patch | 171 ----------------------------------------
ffmpegsource.spec => ffms2.spec | 49 ++++++------
4 files changed, 28 insertions(+), 215 deletions(-)
---
diff --git a/ffmpegsource.spec b/ffms2.spec
similarity index 79%
rename from ffmpegsource.spec
rename to ffms2.spec
index 92f24ea..48b03f7 100644
--- a/ffmpegsource.spec
+++ b/ffms2.spec
@@ -1,18 +1,18 @@
+#
+# Conditional build:
+%bcond_without static_libs # don't build static libraries
+
Summary: FFmpegSource - FFmpeg wrapper library
Summary(pl.UTF-8): FFmpegSource - biblioteka obudowująca FFmpeg
-Name: ffmpegsource
-Version: 2.17
-Release: 6
+Name: ffms2
+Version: 2.20
+Release: 1
License: MIT (ffmpegsource itself), GPL v3+ (forced by ffmpeg)
Group: Libraries
-#Source0Download: http://code.google.com/p/ffmpegsource/downloads/list
-Source0: http://ffmpegsource.googlecode.com/files/ffms-%{version}-src.tar.bz2
-# Source0-md5: 13770e29d5215ad4b68caad44b09da07
-Patch0: %{name}-ffmpeg011.patch
-Patch1: %{name}-ffmpeg10.patch
-Patch2: %{name}-ffmpeg12.patch
-Patch3: %{name}-am.patch
-URL: http://code.google.com/p/ffmpegsource/
+Source0: https://github.com/FFMS/ffms2/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: d6f2faa9e0ffed2e2d8d926592a87744
+Patch0: ffmpegsource-ffmpeg011.patch
+URL: https://github.com/FFMS/ffms2
BuildRequires: autoconf >= 2.58
BuildRequires: automake
# libavformat >= 52.64.2 libavcodec >= 52.72.0 libswscale >= 0.7.0 libavutil >= 50.15.1
@@ -24,6 +24,7 @@ BuildRequires: pkgconfig >= 1:0.22
BuildRequires: rpmbuild(macros) >= 1.566
BuildRequires: sed >= 4.0
BuildRequires: zlib-devel
+Obsoletes: ffmpegsource < 2.20
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -42,8 +43,8 @@ biblioteka obudowująca FFmpeg wraz z paroma dodatkowymi komponentami
mającymi radzić sobie z formatami plików, z którymi libavformat z
FFmpeg ma (lub miał) problemy. Umożliwia w łatwy sposób zażądanie
"otwórz i zdekompresuj ten plik, nieważne jak" i uzyskanie dostępu
-(zwykle) z dokładnością do ramek i próbek, bez potrzeby zajmowania
-się często złożonym, nie najlepiej udokumentowanym API FFmpeg.
+(zwykle) z dokładnością do ramek i próbek, bez potrzeby zajmowania się
+często złożonym, nie najlepiej udokumentowanym API FFmpeg.
%package devel
Summary: Header files for FFmpegSource library
@@ -53,6 +54,8 @@ Requires: %{name} = %{version}-%{release}
Requires: ffmpeg-devel >= 0.9
Requires: libstdc++-devel
Requires: zlib-devel
+Provides: ffmpegsource-devel = %{version}-%{release}
+Obsoletes: ffmpegsource-devel < 2.20
%description devel
Header files for FFmpegSource library.
@@ -65,6 +68,7 @@ Summary: Static FFmpegSource library
Summary(pl.UTF-8): Statyczna biblioteka FFmpegSource
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
+Obsoletes: ffmpegsource-static < 2.20
%description static
Static FFmpegSource library.
@@ -73,11 +77,8 @@ Static FFmpegSource library.
Statyczna biblioteka FFmpegSource.
%prep
-%setup -q -n ffms-%{version}-src
+%setup -q
%patch0 -p0
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
%undos src/core/{indexing,lavfindexer,utils}.cpp
%{__rm} configure
@@ -87,20 +88,20 @@ Statyczna biblioteka FFmpegSource.
%{__autoconf}
%{__autoheader}
%{__automake}
-
%configure \
+ --disable-silent-rules \
+ %{__enable_disable static_libs static} \
--enable-shared
-# V=1 to disable shave silent mode
-%{__make} \
- V=1
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -112,7 +113,7 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING
%attr(755,root,root) %{_bindir}/ffmsindex
%attr(755,root,root) %{_libdir}/libffms2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libffms2.so.2
+%attr(755,root,root) %ghost %{_libdir}/libffms2.so.3
%files devel
%defattr(644,root,root,755)
@@ -123,6 +124,8 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/ffmscompat.h
%{_pkgconfigdir}/ffms2.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libffms2.a
+%endif
diff --git a/ffmpegsource-am.patch b/ffmpegsource-am.patch
deleted file mode 100644
index b0d3ff9..0000000
--- a/ffmpegsource-am.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ffms-2.17-src/configure.in.orig 2013-01-24 10:49:55.065851765 +0100
-+++ ffms-2.17-src/configure.in 2013-01-24 10:51:06.445850274 +0100
-@@ -30,7 +30,7 @@
- CXXFLAGS="$OPT_FLAGS"
- fi
-
--AM_CONFIG_HEADER([src/config/config.h])
-+AC_CONFIG_HEADERS([src/config/config.h])
- AC_PROG_CC
- AC_PROG_CXX
- LT_INIT([static disable-shared])
diff --git a/ffmpegsource-ffmpeg011.patch b/ffmpegsource-ffmpeg011.patch
index 280349e..a586660 100644
--- a/ffmpegsource-ffmpeg011.patch
+++ b/ffmpegsource-ffmpeg011.patch
@@ -1,13 +1,5 @@
---- configure.in.orig 2012-07-09 14:45:54.088864442 +0200
-+++ configure.in 2012-07-09 14:46:55.868944948 +0200
-@@ -135,7 +135,6 @@
- #include <libavcodec/avcodec.h>
- #include <libswscale/swscale.h>
- ]],[[
-- avcodec_init();
- swscale_version();
- #ifdef FFMS_USE_FFMPEG_COMPAT
- int bogus = CODEC_ID_G2M;
+--- configure.ac.orig 2012-07-09 14:45:54.088864442 +0200
++++ configure.ac 2012-07-09 14:46:55.868944948 +0200
@@ -145,7 +144,7 @@
])
diff --git a/ffmpegsource-ffmpeg10.patch b/ffmpegsource-ffmpeg10.patch
deleted file mode 100644
index b363615..0000000
--- a/ffmpegsource-ffmpeg10.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-diff -ur ffms-2.17-src/src/core/codectype.cpp ffms-2.17-src-ffmpeg1.0/src/core/codectype.cpp
---- ffms-2.17-src/src/core/codectype.cpp 2012-01-22 05:46:09.000000000 +0100
-+++ ffms-2.17-src-ffmpeg1.0/src/core/codectype.cpp 2012-11-08 13:08:43.894100438 +0100
-@@ -25,7 +25,7 @@
-
- typedef struct CodecTags {
- char str[20];
-- CodecID id;
-+ AVCodecID id;
- } CodecTags;
-
- static const CodecTags mkv_codec_tags[] = {
-@@ -92,7 +92,7 @@
- };
-
- typedef struct AVCodecTag {
-- enum CodecID id;
-+ enum AVCodecID id;
- unsigned int tag;
- } AVCodecTag;
-
-@@ -400,7 +400,7 @@
- }
- }
-
--CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC, unsigned int BitsPerSample) {
-+AVCodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC, unsigned int BitsPerSample) {
- /* Look up native codecs */
- for(int i = 0; mkv_codec_tags[i].id != CODEC_ID_NONE; i++){
- if(!strncmp(mkv_codec_tags[i].str, Codec,
-@@ -408,7 +408,7 @@
-
- // Uncompressed and exotic format fixup
- // This list is incomplete
-- CodecID CID = mkv_codec_tags[i].id;
-+ AVCodecID CID = mkv_codec_tags[i].id;
- switch (CID) {
- case CODEC_ID_PCM_S16LE:
- switch (BitsPerSample) {
-diff -ur ffms-2.17-src/src/core/codectype.h ffms-2.17-src-ffmpeg1.0/src/core/codectype.h
---- ffms-2.17-src/src/core/codectype.h 2012-01-22 05:46:09.000000000 +0100
-+++ ffms-2.17-src-ffmpeg1.0/src/core/codectype.h 2012-11-08 13:08:50.330766878 +0100
-@@ -27,5 +27,5 @@
- #include "ffmscompat.h"
-
- FFMS_TrackType HaaliTrackTypeToFFTrackType(int TT);
--CodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC = 0, unsigned int BitsPerSample = 0);
-+AVCodecID MatroskaToFFCodecID(char *Codec, void *CodecPrivate, unsigned int FourCC = 0, unsigned int BitsPerSample = 0);
- const char *GetLAVCSampleFormatName(AVSampleFormat s);
-diff -ur ffms-2.17-src/src/core/matroskaaudio.cpp ffms-2.17-src-ffmpeg1.0/src/core/matroskaaudio.cpp
---- ffms-2.17-src/src/core/matroskaaudio.cpp 2012-01-22 05:46:09.000000000 +0100
-+++ ffms-2.17-src-ffmpeg1.0/src/core/matroskaaudio.cpp 2012-11-08 13:11:08.054095355 +0100
-@@ -45,7 +45,7 @@
- CodecContext.reset(avcodec_alloc_context3(NULL), DeleteMatroskaCodecContext);
- assert(CodecContext);
-
-- AVCodec *Codec = avcodec_find_decoder(MatroskaToFFCodecID(TI->CodecID, TI->CodecPrivate, 0, TI->AV.Audio.BitDepth));
-+ AVCodec *Codec = avcodec_find_decoder(MatroskaToFFCodecID(TI->MKVCodecID, TI->CodecPrivate, 0, TI->AV.Audio.BitDepth));
- if (!Codec) {
- mkv_Close(MF);
- throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC, "Audio codec not found");
-diff -ur ffms-2.17-src/src/core/matroskaindexer.cpp ffms-2.17-src-ffmpeg1.0/src/core/matroskaindexer.cpp
---- ffms-2.17-src/src/core/matroskaindexer.cpp 2012-01-22 05:46:09.000000000 +0100
-+++ ffms-2.17-src-ffmpeg1.0/src/core/matroskaindexer.cpp 2012-11-08 13:11:15.454095093 +0100
-@@ -50,7 +50,7 @@
-
- for (unsigned int i = 0; i < mkv_GetNumTracks(MF); i++) {
- TrackInfo *TI = mkv_GetTrackInfo(MF, i);
-- Codec[i] = avcodec_find_decoder(MatroskaToFFCodecID(TI->CodecID, TI->CodecPrivate, 0, TI->AV.Audio.BitDepth));
-+ Codec[i] = avcodec_find_decoder(MatroskaToFFCodecID(TI->MKVCodecID, TI->CodecPrivate, 0, TI->AV.Audio.BitDepth));
- }
- }
-
-diff -ur ffms-2.17-src/src/core/matroskaparser.c ffms-2.17-src-ffmpeg1.0/src/core/matroskaparser.c
---- ffms-2.17-src/src/core/matroskaparser.c 2011-01-27 21:38:25.000000000 +0100
-+++ ffms-2.17-src-ffmpeg1.0/src/core/matroskaparser.c 2012-11-08 13:12:09.934093171 +0100
-@@ -1366,9 +1366,9 @@
- readLangCC(mf, len, t.Language);
- break;
- case 0x86: // CodecID
-- if (t.CodecID)
-+ if (t.MKVCodecID)
- errorjmp(mf,"Duplicate CodecID");
-- STRGETA(mf,t.CodecID,len);
-+ STRGETA(mf,t.MKVCodecID,len);
- break;
- case 0x63a2: // CodecPrivate
- if (cp)
-@@ -1459,7 +1459,7 @@
- ENDFOR(mf);
-
- // validate track info
-- if (!t.CodecID)
-+ if (!t.MKVCodecID)
- errorjmp(mf,"Track has no Codec ID");
-
- if (t.UID != 0) {
-@@ -1525,8 +1525,8 @@
- // copy strings
- if (t.Name)
- cpadd += strlen(t.Name)+1;
-- if (t.CodecID)
-- cpadd += strlen(t.CodecID)+1;
-+ if (t.MKVCodecID)
-+ cpadd += strlen(t.MKVCodecID)+1;
-
- tp = mf->cache->memalloc(mf->cache,sizeof(*tp) + cplen + cslen + cpadd);
- if (tp == NULL)
-@@ -1546,7 +1546,7 @@
-
- cp = (char*)(tp+1) + cplen + cslen;
- CopyStr(&tp->Name,&cp);
-- CopyStr(&tp->CodecID,&cp);
-+ CopyStr(&tp->MKVCodecID,&cp);
-
- // set default language
- if (!tp->Language[0])
-@@ -1797,7 +1797,7 @@
- proc = ASGET(mf, ch, Process);
- memset(proc, 0, sizeof(*proc));
- }
-- proc->CodecID = (unsigned)readUInt(mf,(unsigned)len);
-+ proc->MKVCodecID = (unsigned)readUInt(mf,(unsigned)len);
- break;
- case 0x450d: // ChapProcessPrivate
- if (proc == NULL) {
-diff -ur ffms-2.17-src/src/core/matroskaparser.h ffms-2.17-src-ffmpeg1.0/src/core/matroskaparser.h
---- ffms-2.17-src/src/core/matroskaparser.h 2010-11-28 03:28:40.000000000 +0100
-+++ ffms-2.17-src-ffmpeg1.0/src/core/matroskaparser.h 2012-11-08 13:10:59.050762337 +0100
-@@ -161,7 +161,7 @@
- /* various strings */
- char *Name;
- char Language[4];
-- char *CodecID;
-+ char *MKVCodecID;
- };
-
- typedef struct TrackInfo TrackInfo;
-@@ -208,7 +208,7 @@
- };
-
- struct ChapterProcess {
-- unsigned CodecID;
-+ unsigned MKVCodecID;
- unsigned CodecPrivateLength;
- void *CodecPrivate;
- unsigned nCommands,nCommandsSize;
-diff -ur ffms-2.17-src/src/core/matroskavideo.cpp ffms-2.17-src-ffmpeg1.0/src/core/matroskavideo.cpp
---- ffms-2.17-src/src/core/matroskavideo.cpp 2012-01-22 05:46:09.000000000 +0100
-+++ ffms-2.17-src-ffmpeg1.0/src/core/matroskavideo.cpp 2012-11-08 13:12:29.977425796 +0100
-@@ -71,7 +71,7 @@
- CodecContext->thread_count = 1;
- #endif
-
-- Codec = avcodec_find_decoder(MatroskaToFFCodecID(TI->CodecID, TI->CodecPrivate));
-+ Codec = avcodec_find_decoder(MatroskaToFFCodecID(TI->MKVCodecID, TI->CodecPrivate));
- if (Codec == NULL)
- throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC,
- "Video codec not found");
-diff -ur ffms-2.17-src/src/core/utils.cpp ffms-2.17-src-ffmpeg1.0/src/core/utils.cpp
---- ffms-2.17-src/src/core/utils.cpp 2012-11-08 13:13:28.604090395 +0100
-+++ ffms-2.17-src-ffmpeg1.0/src/core/utils.cpp 2012-11-08 13:12:54.737424924 +0100
-@@ -256,7 +256,7 @@
- uint8_t *PrivateDataSrc = static_cast<uint8_t *>(TI->CodecPrivate);
- size_t PrivateDataSize = TI->CodecPrivateSize;
- size_t BIHSize = sizeof(FFMS_BITMAPINFOHEADER); // 40 bytes
-- if (!strncmp(TI->CodecID, "V_MS/VFW/FOURCC", 15) && PrivateDataSize >= BIHSize) {
-+ if (!strncmp(TI->MKVCodecID, "V_MS/VFW/FOURCC", 15) && PrivateDataSize >= BIHSize) {
- // For some reason UTVideo requires CodecContext->codec_tag (i.e. the FourCC) to be set.
- // Fine, it can't hurt to set it, so let's go find it.
- // In a V_MS/VFW/FOURCC track, the codecprivate starts with a BITMAPINFOHEADER. If you treat that struct
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ffms2.git/commitdiff/8d93948cab3166d06b31d3e21ab386ffc3ac11e6
More information about the pld-cvs-commit
mailing list