Projects
Multimedia
mediatomb
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 10
View file
mediatomb.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Aug 9 11:49:26 UTC 2013 - obs@botter.cc + +- add patch to have mediatomb 0.12.1 compile against mp4v2 >= 2.0.0 + +------------------------------------------------------------------- Mon Dec 10 17:54:44 UTC 2012 - lang@b1-systems.de - openSUSE 12.2 compat: Do not assume the dir for the pid file just exists
View file
mediatomb.spec
Changed
@@ -45,6 +45,8 @@ Patch5: mediatomb-0.12.1-libextractor-0.6.patch # PATCH-FIX-UPSTREAM - build with ffmpeg new API Patch6: libavformat_0.11_support.patch +# PATCH-FIX-UPSTREAM - build with mp4v2 >= 2.0.0 +Patch7: mediatomb-0.12.1-mp4v2_2.0.0.patch Source90: %{name}-rpmlintrc BuildRequires: autoconf BuildRequires: automake @@ -180,6 +182,7 @@ %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 cp %{SOURCE2} .
View file
mediatomb-0.12.1-mp4v2_2.0.0.patch
Added
@@ -0,0 +1,175 @@ +diff -Naur mediatomb-0.12.1.svn2103.orig/src/metadata/libmp4v2_handler.cc mediatomb-0.12.1.svn2103/src/metadata/libmp4v2_handler.cc +--- mediatomb-0.12.1.svn2103.orig/src/metadata/libmp4v2_handler.cc 2012-11-09 03:02:02.283176882 +0100 ++++ mediatomb-0.12.1.svn2103/src/metadata/libmp4v2_handler.cc 2013-08-09 14:34:00.262756277 +0200 +@@ -62,28 +62,26 @@ + { + } + +-static void addMetaField(metadata_fields_t field, MP4FileHandle mp4, Ref<CdsItem> item) ++static void addMetaField(metadata_fields_t field, const MP4Tags* mp4tags, Ref<CdsItem> item) + { + String value; + char* mp4_retval = NULL; +- u_int16_t track; +- u_int16_t total_tracks; + + Ref<StringConverter> sc = StringConverter::i2i(); + + switch (field) + { + case M_TITLE: +- MP4GetMetadataName(mp4, &mp4_retval); ++ mp4_retval = (char *)mp4tags->name; + break; + case M_ARTIST: +- MP4GetMetadataArtist(mp4, &mp4_retval); ++ mp4_retval = (char *)mp4tags->artist; + break; + case M_ALBUM: +- MP4GetMetadataAlbum(mp4, &mp4_retval); ++ mp4_retval = (char *)mp4tags->album; + break; + case M_DATE: +- MP4GetMetadataYear(mp4, &mp4_retval); ++ mp4_retval = (char *)mp4tags->releaseDate; + if (mp4_retval) + { + value = mp4_retval; +@@ -95,17 +93,16 @@ + } + break; + case M_GENRE: +- MP4GetMetadataGenre(mp4, &mp4_retval); ++ mp4_retval = (char *)mp4tags->genre; + break; + case M_DESCRIPTION: +- MP4GetMetadataComment(mp4, &mp4_retval); ++ mp4_retval = (char *)mp4tags->description; + break; + case M_TRACKNUMBER: +- MP4GetMetadataTrack(mp4, &track, &total_tracks); +- if (track > 0) ++ if (mp4tags->track->index > 0) + { +- value = String::from(track); +- item->setTrackNumber((int)track); ++ value = String::from(mp4tags->track->index); ++ item->setTrackNumber((int)mp4tags->track->index); + } + else + return; +@@ -128,6 +125,7 @@ + item->setMetadata(MT_KEYS[field].upnp, sc->convert(value)); + log_debug("mp4 handler: setting metadata on item: %d, %s\n", field, sc->convert(value).c_str()); + } ++ + } + + void LibMP4V2Handler::fillMetadata(Ref<CdsItem> item) +@@ -145,8 +143,13 @@ + + try + { ++ /* allocate */ ++ const MP4Tags* tags = MP4TagsAlloc(); ++ /* fetch data from MP4 file and populate structure */ ++ MP4TagsFetch( tags, mp4 ); ++ + for (int i = 0; i < M_MAX; i++) +- addMetaField((metadata_fields_t) i, mp4, item); ++ addMetaField((metadata_fields_t) i, tags, item); + + Ref<ConfigManager> cm = ConfigManager::getInstance(); + +@@ -190,32 +193,35 @@ + } + + #if defined(HAVE_MAGIC) +- u_int8_t *art_data; +- u_int32_t art_data_len; ++ //u_int8_t *art_data; ++ //u_int32_t art_data_len; + String art_mimetype; ++ const MP4TagArtwork *art; + #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT +- if (MP4GetMetadataCoverArtCount(mp4) && +- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len)) ++ //if (MP4GetMetadataCoverArtCount(mp4) && ++ // MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len)) ++ if (tags->artworkCount) + #else +- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len); ++ //MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len); + #endif + { +- if (art_data) ++ art = tags->artwork; ++ if (art->data) + { + try + { +- art_mimetype = ContentManager::getInstance()->getMimeTypeFromBuffer((void *)art_data, art_data_len); ++ art_mimetype = ContentManager::getInstance()->getMimeTypeFromBuffer((void *)art->data, art->size); + if (!string_ok(art_mimetype)) + art_mimetype = _(MIMETYPE_DEFAULT); + + } + catch (Exception ex) + { +- free(art_data); ++ //free(art_data); + throw ex; + } + +- free(art_data); ++ //free(art_data); + if (art_mimetype != _(MIMETYPE_DEFAULT)) + { + Ref<CdsResource> resource(new CdsResource(CH_MP4)); +@@ -226,6 +232,7 @@ + } + } + #endif ++ MP4TagsFree( tags ); + MP4Close(mp4); + } + catch (Exception ex) +@@ -247,24 +254,30 @@ + + String ctype = res->getParameters()->get(_(RESOURCE_CONTENT_TYPE)); + ++ const MP4Tags* tags = MP4TagsAlloc(); ++ MP4TagsFetch( tags, mp4 ); ++ + if (ctype != ID3_ALBUM_ART) + throw _Exception(_("LibMP4V2Handler: got unknown content type: ") + ctype); + #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT +- if (!MP4GetMetadataCoverArtCount(mp4)) ++ if (!tags->artworkCount) + throw _Exception(_("LibMP4V2Handler: resource has no album art information")); + #endif +- u_int8_t *art_data; +- u_int32_t art_data_len; +- if (MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len)) ++ //u_int8_t *art_data; ++ //u_int32_t art_data_len; ++ const MP4TagArtwork *art; ++ art = tags->artwork; ++ if (art) + { +- if (art_data) ++ if (art->data) + { +- *data_size = (off_t)art_data_len; +- Ref<IOHandler> h(new MemIOHandler((void *)art_data, art_data_len)); +- free(art_data); ++ *data_size = (off_t)art->size; ++ Ref<IOHandler> h(new MemIOHandler((void *)art->data, art->size)); ++ //free(art_data); + return h; + } + } ++ MP4TagsFree( tags ); + + throw _Exception(_("LibMP4V2Handler: could not serve album art " + "for file") + item->getLocation() +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.