]> git.pld-linux.org Git - packages/ffms2.git/commitdiff
- added ffmpeg-0.8 patch (minimal changes to support ffmpeg 0.8)
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 27 Jun 2011 15:50:17 +0000 (15:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- release 2

Changed files:
    ffmpegsource-ffmpeg-0.8.patch -> 1.1
    ffmpegsource.spec -> 1.3

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

diff --git a/ffmpegsource-ffmpeg-0.8.patch b/ffmpegsource-ffmpeg-0.8.patch
new file mode 100644 (file)
index 0000000..ebc6bfb
--- /dev/null
@@ -0,0 +1,104 @@
+--- ffmpegsource-2.15_src/src/core/indexing.cpp.orig   2011-02-10 01:17:44.000000000 +0100
++++ ffmpegsource-2.15_src/src/core/indexing.cpp        2011-06-27 17:26:09.431750638 +0200
+@@ -27,7 +27,7 @@
+ extern "C" {
+-#include <libavutil/sha1.h>
++#include <libavutil/sha.h>
+ #include <zlib.h>
+ }
+@@ -188,9 +188,9 @@
+                       std::string("Failed to open '") + Filename + "' for hashing");
+       std::vector<uint8_t> FileBuffer(1024*1024, 0);
+-      std::vector<uint8_t> ctxmem(av_sha1_size);
+-      AVSHA1 *ctx = (AVSHA1 *)(&ctxmem[0]);
+-      av_sha1_init(ctx);
++      std::vector<uint8_t> ctxmem(av_sha_size);
++      AVSHA *ctx = (AVSHA *)(&ctxmem[0]);
++      av_sha_init(ctx, 160);
+       try {
+               fread(&FileBuffer[0], 1, FileBuffer.size(), SFile);
+@@ -198,7 +198,7 @@
+                       throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_FILE_READ,
+                               std::string("Failed to read '") + Filename + "' for hashing");
+-              av_sha1_update(ctx, &FileBuffer[0], FileBuffer.size());
++              av_sha_update(ctx, &FileBuffer[0], FileBuffer.size());
+               fseeko(SFile, -(int)FileBuffer.size(), SEEK_END);
+               std::fill(FileBuffer.begin(), FileBuffer.end(), 0);
+@@ -209,7 +209,7 @@
+                       throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_FILE_READ, buf.str());
+               }
+-              av_sha1_update(ctx, &FileBuffer[0], FileBuffer.size());
++              av_sha_update(ctx, &FileBuffer[0], FileBuffer.size());
+               fseeko(SFile, 0, SEEK_END);
+               if (ferror(SFile))
+@@ -220,11 +220,11 @@
+       }
+       catch (...) {
+               fclose(SFile);
+-              av_sha1_final(ctx, Digest);
++              av_sha_final(ctx, Digest);
+               throw;
+       }
+       fclose(SFile);
+-      av_sha1_final(ctx, Digest);
++      av_sha_final(ctx, Digest);
+ }
+ void FFMS_Index::Sort() {
+--- ffmpegsource-2.15_src/src/core/lavfindexer.cpp.orig        2011-01-21 21:58:09.000000000 +0100
++++ ffmpegsource-2.15_src/src/core/lavfindexer.cpp     2011-06-27 17:45:31.855122896 +0200
+@@ -20,6 +20,9 @@
+ #include "indexing.h"
++extern "C" {
++#include <libavutil/avutil.h>
++}
+ FFLAVFIndexer::FFLAVFIndexer(const char *Filename, AVFormatContext *FormatContext) : FFMS_Indexer(Filename) {
+@@ -49,7 +52,7 @@
+                       FormatContext->streams[i]->time_base.den,
+                       static_cast<FFMS_TrackType>(FormatContext->streams[i]->codec->codec_type)));
+-              if (FormatContext->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) {
++              if (FormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+                       AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codec->codec_id);
+                       if (!VideoCodec)
+                               throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED,
+@@ -65,7 +68,7 @@
+                               VideoContexts[i].Parser->flags = PARSER_FLAG_COMPLETE_FRAMES;
+                       IndexMask |= 1 << i;
+               }
+-              else if (IndexMask & (1 << i) && FormatContext->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) {
++              else if (IndexMask & (1 << i) && FormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
+                       AVCodecContext *AudioCodecContext = FormatContext->streams[i]->codec;
+                       AVCodec *AudioCodec = avcodec_find_decoder(AudioCodecContext->codec_id);
+@@ -105,7 +108,7 @@
+               bool KeyFrame = !!(Packet.flags & AV_PKT_FLAG_KEY);
+               ReadTS(Packet, LastValidTS[Track], (*TrackIndices)[Track].UseDTS);
+-              if (FormatContext->streams[Track]->codec->codec_type == CODEC_TYPE_VIDEO) {
++              if (FormatContext->streams[Track]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+                       if (LastValidTS[Track] == ffms_av_nopts_value)
+                               throw FFMS_Exception(FFMS_ERROR_INDEXING, FFMS_ERROR_PARSER,
+                               "Invalid initial pts and dts");
+@@ -121,7 +124,7 @@
+                       (*TrackIndices)[Track].push_back(TFrameInfo::VideoFrameInfo(LastValidTS[Track], RepeatPict, KeyFrame, Packet.pos));
+               }
+-              else if (FormatContext->streams[Track]->codec->codec_type == CODEC_TYPE_AUDIO) {
++              else if (FormatContext->streams[Track]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
+                       int64_t StartSample = AudioContexts[Track].CurrentSample;
+                       int64_t SampleCount = IndexAudioPacket(Track, &Packet, AudioContexts[Track], *TrackIndices);
index 28927356fcc3d7c72635c3186ec749b457b67f9c..15953d28c1ca03ca8673d7e77c19f6bb664ccbe9 100644 (file)
@@ -2,21 +2,24 @@ Summary:      FFmpegSource - FFmpeg wrapper library
 Summary(pl.UTF-8):     FFmpegSource - biblioteka obudowująca FFmpeg
 Name:          ffmpegsource
 Version:       2.15
-Release:       1
+Release:       2
 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/%{name}-%{version}_src.7z
 # Source0-md5: 0d0e2d4f6c4424e5f182f40f451c064e
 Patch0:                %{name}-c++.patch
+Patch1:                %{name}-ffmpeg-0.8.patch
 URL:           http://code.google.com/p/ffmpegsource/
 BuildRequires: autoconf >= 2.58
 BuildRequires: automake
-BuildRequires: ffmpeg-devel >= 0.5.0
+BuildRequires: ffmpeg-devel >= 0.8.0
 BuildRequires: libstdc++-devel
 BuildRequires: libtool >= 2:2.0
 BuildRequires: p7zip
 BuildRequires: pkgconfig >= 1:0.22
+BuildRequires: rpmbuild(macros) >= 1.566
+BuildRequires: sed >= 4.0
 BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -44,7 +47,7 @@ Summary:      Header files for FFmpegSource library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki FFmpegSource
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      ffmpeg-devel >= 0.5.0
+Requires:      ffmpeg-devel >= 0.8.0
 Requires:      libstdc++-devel
 Requires:      zlib-devel
 
@@ -69,8 +72,9 @@ Statyczna biblioteka FFmpegSource.
 %prep
 %setup -q -c -T -n %{name}-%{version}_src
 7z -o.. x %{SOURCE0}
-%undos src/core/utils.cpp
+%undos src/core/{indexing,lavfindexer,utils}.cpp
 %patch0 -p1
+%patch1 -p1
 %{__rm} configure
 
 %build
This page took 0.173704 seconds and 4 git commands to generate.