Merge lp:~vanvugt/ubuntu/oneiric/mediatomb/fix-770964-784431 into lp:ubuntu/oneiric/mediatomb

Proposed by Daniel van Vugt
Status: Merged
Merged at revision: 18
Proposed branch: lp:~vanvugt/ubuntu/oneiric/mediatomb/fix-770964-784431
Merge into: lp:ubuntu/oneiric/mediatomb
Diff against target: 93 lines (+76/-0)
3 files modified
debian/patches/libav_0.7_support.patch (+64/-0)
debian/patches/mediatomb-0.12.1-gcc46.patch (+10/-0)
debian/patches/series (+2/-0)
To merge this branch: bzr merge lp:~vanvugt/ubuntu/oneiric/mediatomb/fix-770964-784431
Reviewer Review Type Date Requested Status
Luke Yelavich (community) Approve
Ubuntu branches Pending
Review via email: mp+62261@code.launchpad.net

Description of the change

Fix all problems causing mediatomb builds to fail on oneiric:
* Fix gcc-4.6 build failures (missing header) (LP: #770964)
* Fix libav-0.7 build failures (mediatomb using deprecated API) (LP: #784431).

To post a comment you must log in.
Revision history for this message
Luke Yelavich (themuso) wrote :

Thanks for your work. The change from this branch, along with your other branch all build fine here, so I am going to go ahead and upload your work.

Thanks again.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'debian/patches/libav_0.7_support.patch'
--- debian/patches/libav_0.7_support.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/libav_0.7_support.patch 2011-05-25 09:27:27 +0000
@@ -0,0 +1,64 @@
1=== modified file 'src/metadata/ffmpeg_handler.cc'
2--- old/src/metadata/ffmpeg_handler.cc 2010-08-25 17:07:03 +0000
3+++ new/src/metadata/ffmpeg_handler.cc 2011-05-19 04:33:32 +0000
4@@ -89,6 +89,33 @@
5
6 Ref<StringConverter> sc = StringConverter::m2i();
7
8+ /* Tabs are 4 characters here */
9+ typedef struct {const char *avname; metadata_fields_t field;} mapping_t;
10+ static const mapping_t mapping[] =
11+ {
12+ {"title", M_TITLE},
13+ {"artist", M_ARTIST},
14+ {"album", M_ALBUM},
15+ {"date", M_DATE},
16+ {"genre", M_GENRE},
17+ {"comment", M_DESCRIPTION},
18+ {"track", M_TRACKNUMBER},
19+ {NULL, M_MAX},
20+ };
21+
22+ if (!pFormatCtx->metadata)
23+ return;
24+ for (const mapping_t *m = mapping; m->avname != NULL; m++)
25+ {
26+ AVMetadataTag *tag = NULL;
27+ tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0);
28+ if (tag && tag->value && tag->value[0])
29+ {
30+ log_debug("Added metadata %s: %s\n", m->avname, tag->value);
31+ item->setMetadata(MT_KEYS[m->field].upnp, sc->convert(tag->value));
32+ }
33+ }
34+ /* Old algorithm (doesn't work with libav >= 0.7)
35 if (strlen(pFormatCtx->title) > 0)
36 {
37 log_debug("Added metadata title: %s\n", pFormatCtx->title);
38@@ -131,6 +158,7 @@
39 item->setMetadata(MT_KEYS[M_TRACKNUMBER].upnp,
40 sc->convert(String::from(pFormatCtx->track)));
41 }
42+ */
43 }
44
45 // ffmpeg library calls
46@@ -178,7 +206,7 @@
47 for(i=0; i<pFormatCtx->nb_streams; i++)
48 {
49 AVStream *st = pFormatCtx->streams[i];
50- if((st != NULL) && (videoset == false) && (st->codec->codec_type == CODEC_TYPE_VIDEO))
51+ if((st != NULL) && (videoset == false) && (st->codec->codec_type == AVMEDIA_TYPE_VIDEO))
52 {
53 if (st->codec->codec_tag > 0)
54 {
55@@ -209,7 +237,7 @@
56 *y = st->codec->height;
57 }
58 }
59- if(st->codec->codec_type == CODEC_TYPE_AUDIO)
60+ if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
61 {
62 // Increase number of audiochannels
63 audioch++;
64
065
=== added file 'debian/patches/mediatomb-0.12.1-gcc46.patch'
--- debian/patches/mediatomb-0.12.1-gcc46.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/mediatomb-0.12.1-gcc46.patch 2011-05-25 09:27:27 +0000
@@ -0,0 +1,10 @@
1--- a/src/zmm/object.h
2+++ b/src/zmm/object.h
3@@ -33,6 +33,7 @@
4 #define __ZMM_OBJECT_H__
5
6 #include <new> // for size_t
7+#include <cstddef>
8 #include "atomic.h"
9
10 namespace zmm
011
=== modified file 'debian/patches/series'
--- debian/patches/series 2010-08-25 17:07:03 +0000
+++ debian/patches/series 2011-05-25 09:27:27 +0000
@@ -1,3 +1,5 @@
1debug-mode-fix.patch1debug-mode-fix.patch
2config_xml_comment.patch2config_xml_comment.patch
3const_char_conversion.patch3const_char_conversion.patch
4mediatomb-0.12.1-gcc46.patch
5libav_0.7_support.patch

Subscribers

People subscribed via source and target branches