aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-23 13:47:14 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-23 14:01:41 +0100
commit042d9aa9455c3288247526edbd9a2ae56eee5675 (patch)
tree4efd80e16332ce898ad970c0561291129d3228b2
parent99495ff764f4dce27fdaec0478f84ef8143f529e (diff)
downloadmeta-baryon-042d9aa9455c3288247526edbd9a2ae56eee5675.tar.gz
meta-baryon-042d9aa9455c3288247526edbd9a2ae56eee5675.tar.bz2
meta-baryon-042d9aa9455c3288247526edbd9a2ae56eee5675.zip
mediatomb: add support for building against libav
Add a Debian patch to support building mediatomb against libav. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--recipes-multimedia/mediatomb/files/libav_0.7_support.patch70
-rw-r--r--recipes-multimedia/mediatomb/mediatomb_0.12.1.bb3
2 files changed, 72 insertions, 1 deletions
diff --git a/recipes-multimedia/mediatomb/files/libav_0.7_support.patch b/recipes-multimedia/mediatomb/files/libav_0.7_support.patch
new file mode 100644
index 0000000..59c0935
--- /dev/null
+++ b/recipes-multimedia/mediatomb/files/libav_0.7_support.patch
@@ -0,0 +1,70 @@
+Fix mediatomb to build against libav 0.7+
+
+Patch originally from Debian.
+
+Upstream-Status: Pending
+
+=== modified file 'src/metadata/ffmpeg_handler.cc'
+--- old/src/metadata/ffmpeg_handler.cc 2010-08-25 17:07:03 +0000
++++ new/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/recipes-multimedia/mediatomb/mediatomb_0.12.1.bb b/recipes-multimedia/mediatomb/mediatomb_0.12.1.bb
index 04191e2..4bd9917 100644
--- a/recipes-multimedia/mediatomb/mediatomb_0.12.1.bb
+++ b/recipes-multimedia/mediatomb/mediatomb_0.12.1.bb
@@ -3,12 +3,13 @@ HOMEPAGE = "http://mediatomb.cc/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=0b609ee7722218aa600220f779cb5035 \
file://src/main.cc;beginline=14;endline=25;md5=ba9c4cf20a63e18b1626c4c9d794635a"
-DEPENDS = "expat ffmpeg sqlite3 libexif js zlib file taglib ffmpegthumbnailer curl"
+DEPENDS = "expat libav sqlite3 libexif js zlib file taglib ffmpegthumbnailer curl"
PR = "r4"
SRC_URI = "${SOURCEFORGE_MIRROR}/mediatomb/mediatomb-${PV}.tar.gz \
file://youtube_warning.patch \
file://size_t_header.patch \
+ file://libav_0.7_support.patch \
file://init \
file://default \
file://config.xml \