Author: qboosh Date: Mon Jun 27 15:50:22 2011 GMT Module: packages Tag: HEAD ---- Log message: - added ffmpeg-0.8 patch (minimal changes to support ffmpeg 0.8) - release 2
---- Files affected: packages/ffmpegsource: ffmpegsource.spec (1.2 -> 1.3) , ffmpegsource-ffmpeg-0.8.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/ffmpegsource/ffmpegsource.spec diff -u packages/ffmpegsource/ffmpegsource.spec:1.2 packages/ffmpegsource/ffmpegsource.spec:1.3 --- packages/ffmpegsource/ffmpegsource.spec:1.2 Fri Apr 29 19:13:02 2011 +++ packages/ffmpegsource/ffmpegsource.spec Mon Jun 27 17:50:17 2011 @@ -3,21 +3,24 @@ 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) @@ -45,7 +48,7 @@ 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 @@ -70,8 +73,9 @@ %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 @@ -123,6 +127,10 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.3 2011/06/27 15:50:17 qboosh +- added ffmpeg-0.8 patch (minimal changes to support ffmpeg 0.8) +- release 2 + Revision 1.2 2011/04/29 17:13:02 qboosh - updated to 2.15 - added c++ patch (fixes build with gcc 4.5) ================================================================ Index: packages/ffmpegsource/ffmpegsource-ffmpeg-0.8.patch diff -u /dev/null packages/ffmpegsource/ffmpegsource-ffmpeg-0.8.patch:1.1 --- /dev/null Mon Jun 27 17:50:22 2011 +++ packages/ffmpegsource/ffmpegsource-ffmpeg-0.8.patch Mon Jun 27 17:50:17 2011 @@ -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); + ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ffmpegsource/ffmpegsource.spec?r1=1.2&r2=1.3&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
