diff options
author | Stefan Eßer <se@FreeBSD.org> | 2007-11-15 13:27:23 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2007-11-15 13:27:23 +0000 |
commit | e2f098deac0432106d620df27d84dbd407b0635f (patch) | |
tree | 3fb88886cf58b11a5a09a93efb364683a5dff68a /multimedia | |
parent | Mark broken: bad checksum. (diff) |
Unbreak port: use functional interface to locate encoder/decoder functions
instead of references to global function pointers (which are no longer
exported by ffmpeg).
Approved by: portmgr (linimon)
Notes
Notes:
svn path=/head/; revision=202727
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/dvbcut/Makefile | 2 | ||||
-rw-r--r-- | multimedia/dvbcut/files/patch-main.cpp | 10 | ||||
-rw-r--r-- | multimedia/dvbcut/files/patch-psfile.cpp | 27 | ||||
-rw-r--r-- | multimedia/dvbcut/files/patch-tsfile.cpp | 30 |
4 files changed, 56 insertions, 13 deletions
diff --git a/multimedia/dvbcut/Makefile b/multimedia/dvbcut/Makefile index a06127e05b37..394ad010ab62 100644 --- a/multimedia/dvbcut/Makefile +++ b/multimedia/dvbcut/Makefile @@ -22,8 +22,6 @@ RUN_DEPENDS= mplayer:${PORTSDIR}/multimedia/mplayer LIB_DEPENDS= avutil.1:${PORTSDIR}/multimedia/ffmpeg \ ao.3:${PORTSDIR}/audio/libao -BROKEN= fails to compile - WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} USE_BZIP2= yes USE_GMAKE= yes diff --git a/multimedia/dvbcut/files/patch-main.cpp b/multimedia/dvbcut/files/patch-main.cpp index 24bd0ea00fdd..7aa93a6c3c18 100644 --- a/multimedia/dvbcut/files/patch-main.cpp +++ b/multimedia/dvbcut/files/patch-main.cpp @@ -1,5 +1,5 @@ --- src/main.cpp~ 2007-04-13 19:36:26 +0200 -+++ src/main.cpp 2007-07-17 01:10:36 +0200 ++++ src/main.cpp 2007-11-15 09:19:25 +0100 @@ -27,7 +27,9 @@ #endif // HAVE_LIB_AO @@ -10,3 +10,11 @@ #include <qimage.h> #include <qsettings.h> #include "dvbcut.h" +@@ -76,6 +78,7 @@ + else + idxfilename=mpgfilename+".idx"; + ++ av_register_all(); + std::string errormessage; + mpgfile *mpg=mpgfile::open(mpgfilename,&errormessage); + diff --git a/multimedia/dvbcut/files/patch-psfile.cpp b/multimedia/dvbcut/files/patch-psfile.cpp index 822a4193d31d..fe7b3fd3f64c 100644 --- a/multimedia/dvbcut/files/patch-psfile.cpp +++ b/multimedia/dvbcut/files/patch-psfile.cpp @@ -1,22 +1,41 @@ --- src/psfile.cpp~ 2007-04-13 19:36:27.000000000 +0200 -+++ src/psfile.cpp 2007-08-19 11:51:11.554951537 +0200 ++++ src/psfile.cpp 2007-11-15 09:40:42.110171154 +0100 @@ -19,7 +19,9 @@ #include "psfile.h" #include "streamhandle.h" #include "stream.h" +extern "C" { --#include <ffmpeg/avcodec.h> -+#include <ffmpeg/allcodecs.h> + #include <ffmpeg/avcodec.h> +} psfile::psfile(const std::string &filename, inbuffer &b, int initial_offset) : mpgfile(filename, b, initial_offset) +@@ -90,7 +92,7 @@ + streamnumber[sid]=audiostream(audiostreams); + stream *S=&s[audiostream(audiostreams++)]; + S->id=sid; +- S->dec=&mp2_decoder; ++ S->dec=avcodec_find_decoder(CODEC_ID_MP2); + S->type=streamtype::mpegaudio; + if (audiostreams>=MAXAUDIOSTREAMS) + break; @@ -100,7 +102,7 @@ streamnumber[sid]=audiostream(audiostreams); stream *S=&s[audiostream(audiostreams++)]; S->id=sid; - S->dec=&ac3_decoder; -+ S->dec=&liba52_decoder; ++ S->dec=avcodec_find_decoder(CODEC_ID_AC3); S->type=streamtype::ac3audio; if (audiostreams>=MAXAUDIOSTREAMS) break; +@@ -114,8 +116,8 @@ + S->allocavcc(); + S->avcc->codec_type=CODEC_TYPE_VIDEO; + S->avcc->codec_id=CODEC_ID_MPEG2VIDEO; +- S->dec=&mpeg2video_decoder; +- S->enc=&mpeg2video_encoder; ++ S->dec=avcodec_find_decoder(CODEC_ID_MPEG2VIDEO); ++ S->enc=avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); + S->type=streamtype::mpeg2video; + } + diff --git a/multimedia/dvbcut/files/patch-tsfile.cpp b/multimedia/dvbcut/files/patch-tsfile.cpp index 897e766ec539..4ce69380c059 100644 --- a/multimedia/dvbcut/files/patch-tsfile.cpp +++ b/multimedia/dvbcut/files/patch-tsfile.cpp @@ -1,22 +1,40 @@ --- src/tsfile.cpp~ 2007-04-13 19:36:27.000000000 +0200 -+++ src/tsfile.cpp 2007-08-19 11:51:32.753587432 +0200 ++++ src/tsfile.cpp 2007-11-15 09:38:58.606927367 +0100 @@ -22,7 +22,9 @@ #include <list> #include <utility> +extern "C" { --#include <ffmpeg/avcodec.h> -+#include <ffmpeg/allcodecs.h> + #include <ffmpeg/avcodec.h> +} tsfile::tsfile(const std::string &filename, inbuffer &b, int initial_offset) : mpgfile(filename, b, initial_offset) -@@ -78,7 +80,7 @@ +@@ -78,12 +80,12 @@ stream *S=&s[audiostream(audiostreams++)]; S->id=it->second; if (it->first==0xbd) { - S->dec=&ac3_decoder; -+ S->dec=&liba52_decoder; - S->enc=&ac3_encoder; +- S->enc=&ac3_encoder; ++ S->dec=avcodec_find_decoder(CODEC_ID_AC3); ++ S->enc=avcodec_find_encoder(CODEC_ID_AC3); S->type=streamtype::ac3audio; } else { +- S->dec=&mp2_decoder; +- S->enc=&mp2_encoder; ++ S->dec=avcodec_find_decoder(CODEC_ID_MP2); ++ S->enc=avcodec_find_encoder(CODEC_ID_MP2); + S->type=streamtype::mpegaudio; + } + if (audiostreams>=MAXAUDIOSTREAMS) +@@ -98,8 +100,8 @@ + S->allocavcc(); + S->avcc->codec_type=CODEC_TYPE_VIDEO; + S->avcc->codec_id=CODEC_ID_MPEG2VIDEO; +- S->dec=&mpeg2video_decoder; +- S->enc=&mpeg2video_encoder; ++ S->dec=avcodec_find_decoder(CODEC_ID_MPEG2VIDEO); ++ S->enc=avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); + S->type=streamtype::mpeg2video; + } + |