aboutsummaryrefslogtreecommitdiffstats
path: root/net/mediatomb
diff options
context:
space:
mode:
authorwg <wg@FreeBSD.org>2013-10-20 00:43:32 +0800
committerwg <wg@FreeBSD.org>2013-10-20 00:43:32 +0800
commit7bd53d2a9f339dc47381e00f07db80cc4b59237c (patch)
tree69155a2473ecd42904d8ae76e85c62fefb67950b /net/mediatomb
parent51b8eaeb1ac21f9fe97de34ffac01229f11188ac (diff)
downloadfreebsd-ports-gnome-7bd53d2a9f339dc47381e00f07db80cc4b59237c.tar.gz
freebsd-ports-gnome-7bd53d2a9f339dc47381e00f07db80cc4b59237c.tar.zst
freebsd-ports-gnome-7bd53d2a9f339dc47381e00f07db80cc4b59237c.zip
multimedia/ffmpeg: update to 2.0.1
- Update main ffmpeg port to 2.0.1 - Bump and update dependent ports when necessary (API change) Approved by: portmgr (bapt)
Diffstat (limited to 'net/mediatomb')
-rw-r--r--net/mediatomb/files/patch-livav764
-rw-r--r--net/mediatomb/files/patch-livav942
2 files changed, 106 insertions, 0 deletions
diff --git a/net/mediatomb/files/patch-livav7 b/net/mediatomb/files/patch-livav7
new file mode 100644
index 000000000000..91be32119b22
--- /dev/null
+++ b/net/mediatomb/files/patch-livav7
@@ -0,0 +1,64 @@
+=== modified file 'src/metadata/ffmpeg_handler.cc'
+--- src/metadata/ffmpeg_handler.cc.orig 2010-08-25 17:07:03 +0000
++++ src/metadata/ffmpeg_handler.cc 2011-05-19 04:33:32 +0000
+@@ -89,6 +89,33 @@
+
+ Ref<StringConverter> sc = StringConverter::m2i();
+
++ /* Tabs are 4 characters here */
++ typedef struct {const char *avname; metadata_fields_t field;} mapping_t;
++ static const mapping_t mapping[] =
++ {
++ {"title", M_TITLE},
++ {"artist", M_ARTIST},
++ {"album", M_ALBUM},
++ {"date", M_DATE},
++ {"genre", M_GENRE},
++ {"comment", M_DESCRIPTION},
++ {"track", M_TRACKNUMBER},
++ {NULL, M_MAX},
++ };
++
++ if (!pFormatCtx->metadata)
++ return;
++ for (const mapping_t *m = mapping; m->avname != NULL; m++)
++ {
++ AVMetadataTag *tag = NULL;
++ tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0);
++ if (tag && tag->value && tag->value[0])
++ {
++ log_debug("Added metadata %s: %s\n", m->avname, tag->value);
++ item->setMetadata(MT_KEYS[m->field].upnp, sc->convert(tag->value));
++ }
++ }
++ /* Old algorithm (doesn't work with libav >= 0.7)
+ if (strlen(pFormatCtx->title) > 0)
+ {
+ log_debug("Added metadata title: %s\n", pFormatCtx->title);
+@@ -131,6 +158,7 @@
+ item->setMetadata(MT_KEYS[M_TRACKNUMBER].upnp,
+ sc->convert(String::from(pFormatCtx->track)));
+ }
++ */
+ }
+
+ // ffmpeg library calls
+@@ -178,7 +206,7 @@
+ for(i=0; i<pFormatCtx->nb_streams; i++)
+ {
+ AVStream *st = pFormatCtx->streams[i];
+- if((st != NULL) && (videoset == false) && (st->codec->codec_type == CODEC_TYPE_VIDEO))
++ if((st != NULL) && (videoset == false) && (st->codec->codec_type == AVMEDIA_TYPE_VIDEO))
+ {
+ if (st->codec->codec_tag > 0)
+ {
+@@ -209,7 +237,7 @@
+ *y = st->codec->height;
+ }
+ }
+- if(st->codec->codec_type == CODEC_TYPE_AUDIO)
++ if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+ {
+ // Increase number of audiochannels
+ audioch++;
+
diff --git a/net/mediatomb/files/patch-livav9 b/net/mediatomb/files/patch-livav9
new file mode 100644
index 000000000000..9a706fc2cef8
--- /dev/null
+++ b/net/mediatomb/files/patch-livav9
@@ -0,0 +1,42 @@
+diff -burN mediatomb-0.12.1.old//src/metadata/ffmpeg_handler.cc mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc
+--- src/metadata/ffmpeg_handler.cc.orig 2012-11-25 14:55:05.335753129 +0100
++++ src/metadata/ffmpeg_handler.cc 2012-11-25 15:29:42.840677486 +0100
+@@ -110,8 +110,8 @@
+ return;
+ for (const mapping_t *m = mapping; m->avname != NULL; m++)
+ {
+- AVMetadataTag *tag = NULL;
+- tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0);
++ AVDictionaryEntry *tag = NULL;
++ tag = av_dict_get(pFormatCtx->metadata, m->avname, NULL, 0);
+ if (tag && tag->value && tag->value[0])
+ {
+ log_debug("Added metadata %s: %s\n", m->avname, tag->value);
+@@ -290,14 +290,14 @@
+ av_register_all();
+
+ // Open video file
+- if (av_open_input_file(&pFormatCtx,
+- item->getLocation().c_str(), NULL, 0, NULL) != 0)
++ if (avformat_open_input(&pFormatCtx,
++ item->getLocation().c_str(), NULL, NULL) != 0)
+ return; // Couldn't open file
+
+ // Retrieve stream information
+- if (av_find_stream_info(pFormatCtx) < 0)
++ if (avformat_find_stream_info(pFormatCtx, NULL) < 0)
+ {
+- av_close_input_file(pFormatCtx);
++ avformat_close_input(&pFormatCtx);
+ return; // Couldn't find stream information
+ }
+ // Add metadata using ffmpeg library calls
+@@ -306,7 +306,7 @@
+ addFfmpegResourceFields(item, pFormatCtx, &x, &y);
+
+ // Close the video file
+- av_close_input_file(pFormatCtx);
++ avformat_close_input(&pFormatCtx);
+ }
+
+ static bool _mkdir(const char *path)