mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
aur/mediatomb => 0.12.1-8
This commit is contained in:
parent
5b902311c7
commit
ae7dcdc721
2 changed files with 194 additions and 6 deletions
|
@ -4,16 +4,14 @@
|
|||
# Contributor: Mika Hynnä <igheax@gmail.com>
|
||||
# Contributor: Jonathan Conder <jonno.conder@gmail.com>
|
||||
|
||||
plugrel=1
|
||||
|
||||
pkgname=mediatomb
|
||||
pkgver=0.12.1
|
||||
pkgrel=7
|
||||
pkgrel=8
|
||||
pkgdesc="Free UPnP/DLNA media server"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://mediatomb.cc/"
|
||||
license=('GPL')
|
||||
depends=('curl' 'ffmpegthumbnailer' 'js' 'libexif' 'libmp4v2' 'sqlite3' 'taglib')
|
||||
depends=('file' 'curl' 'ffmpegthumbnailer' 'js' 'libexif' 'libmp4v2' 'sqlite3' 'taglib')
|
||||
backup=('etc/conf.d/mediatomb')
|
||||
install=mediatomb.install
|
||||
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
|
||||
|
@ -22,14 +20,16 @@ source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
|
|||
'gcc46.patch'
|
||||
'tonewjs.patch'
|
||||
'jsparse.patch'
|
||||
'libav_0.7_support.patch')
|
||||
'libav_0.7_support.patch'
|
||||
'libmp4v2_191_p497.patch')
|
||||
sha256sums=('31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd'
|
||||
'1a67a1deb8a41467fe9bbf66358a255f0df97b0170a5fc3d48c1f768c8d328b9'
|
||||
'ba9753a4a380d4c717c987efec03a3c6d401d3ff93a6fced28098adbd3a44cc9'
|
||||
'0c02a20032f0c296800b1bb9644638970c2dedbc5ab7141d66a637235e9da6ce'
|
||||
'2cd8f5628c3a38b290526f008bae351b90211825f86e5959bf95f140748de574'
|
||||
'd9a3062858900d32b977f0d50d168fd7d36785b6ecc038c019e661e27f7b1c17'
|
||||
'c6523e8bf5e2da89b7475d6777ef9bffe7d089752ef2f7b27b5e39a4130fb0ff')
|
||||
'c6523e8bf5e2da89b7475d6777ef9bffe7d089752ef2f7b27b5e39a4130fb0ff'
|
||||
'd39c2f9aab051c5447461718fd0ec72cf5982f6c920a4a985a50831f34babe84')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
@ -37,6 +37,7 @@ build() {
|
|||
patch -Np1 -i "$srcdir/tonewjs.patch"
|
||||
patch -Np1 -i "$srcdir/jsparse.patch"
|
||||
patch -Np1 -i "$srcdir/libav_0.7_support.patch"
|
||||
patch -Np1 -i "$srcdir/libmp4v2_191_p497.patch"
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--disable-mysql \
|
||||
|
|
187
aur/mediatomb/libmp4v2_191_p497.patch
Normal file
187
aur/mediatomb/libmp4v2_191_p497.patch
Normal file
|
@ -0,0 +1,187 @@
|
|||
diff -urN old/src/metadata/libmp4v2_handler.cc new/src/metadata/libmp4v2_handler.cc
|
||||
--- old/src/metadata/libmp4v2_handler.cc 2012-04-05 01:46:26.000000000 +0200
|
||||
+++ new/src/metadata/libmp4v2_handler.cc 2012-04-05 02:01:24.000000000 +0200
|
||||
@@ -65,29 +65,28 @@
|
||||
static void addMetaField(metadata_fields_t field, MP4FileHandle mp4, Ref<CdsItem> item)
|
||||
{
|
||||
String value;
|
||||
- char* mp4_retval = NULL;
|
||||
- u_int16_t track;
|
||||
- u_int16_t total_tracks;
|
||||
-
|
||||
Ref<StringConverter> sc = StringConverter::i2i();
|
||||
|
||||
+ const MP4Tags* new_tags = MP4TagsAlloc();
|
||||
+
|
||||
+ if (!MP4TagsFetch(new_tags, mp4))
|
||||
+ return;
|
||||
+
|
||||
switch (field)
|
||||
{
|
||||
case M_TITLE:
|
||||
- MP4GetMetadataName(mp4, &mp4_retval);
|
||||
+ value = new_tags->name;
|
||||
break;
|
||||
case M_ARTIST:
|
||||
- MP4GetMetadataArtist(mp4, &mp4_retval);
|
||||
+ value = new_tags->artist;
|
||||
break;
|
||||
case M_ALBUM:
|
||||
- MP4GetMetadataAlbum(mp4, &mp4_retval);
|
||||
+ value = new_tags->album;
|
||||
break;
|
||||
case M_DATE:
|
||||
- MP4GetMetadataYear(mp4, &mp4_retval);
|
||||
- if (mp4_retval)
|
||||
+ value = new_tags->releaseDate;
|
||||
+ if (value.length() > 0)
|
||||
{
|
||||
- value = mp4_retval;
|
||||
- free(mp4_retval);
|
||||
if (string_ok(value))
|
||||
value = value + "-01-01";
|
||||
else
|
||||
@@ -95,34 +94,31 @@
|
||||
}
|
||||
break;
|
||||
case M_GENRE:
|
||||
- MP4GetMetadataGenre(mp4, &mp4_retval);
|
||||
+ value = new_tags->genre;
|
||||
break;
|
||||
case M_DESCRIPTION:
|
||||
- MP4GetMetadataComment(mp4, &mp4_retval);
|
||||
+ value = new_tags->comments;
|
||||
break;
|
||||
case M_TRACKNUMBER:
|
||||
- MP4GetMetadataTrack(mp4, &track, &total_tracks);
|
||||
- if (track > 0)
|
||||
+ if (new_tags->track)
|
||||
{
|
||||
- value = String::from(track);
|
||||
- item->setTrackNumber((int)track);
|
||||
+ value = String::from(new_tags->track->index);
|
||||
+ item->setTrackNumber((int)new_tags->track->index);
|
||||
}
|
||||
else
|
||||
+ {
|
||||
+ MP4TagsFree( new_tags );
|
||||
return;
|
||||
+ }
|
||||
break;
|
||||
default:
|
||||
+ MP4TagsFree( new_tags );
|
||||
return;
|
||||
}
|
||||
|
||||
- if ((field != M_DATE) && (field != M_TRACKNUMBER) &&
|
||||
- (mp4_retval))
|
||||
- {
|
||||
- value = mp4_retval;
|
||||
- free(mp4_retval);
|
||||
- }
|
||||
-
|
||||
+ MP4TagsFree( new_tags );
|
||||
value = trim_string(value);
|
||||
-
|
||||
+
|
||||
if (string_ok(value))
|
||||
{
|
||||
item->setMetadata(MT_KEYS[field].upnp, sc->convert(value));
|
||||
@@ -190,14 +186,19 @@
|
||||
}
|
||||
|
||||
#if defined(HAVE_MAGIC)
|
||||
- u_int8_t *art_data;
|
||||
- u_int32_t art_data_len;
|
||||
+ void *art_data = 0;
|
||||
+ u_int32_t art_data_len = 0;
|
||||
String art_mimetype;
|
||||
+
|
||||
+ const MP4Tags* new_tags = MP4TagsAlloc();
|
||||
+ MP4TagsFetch(new_tags, mp4);
|
||||
+ if (new_tags->artworkCount)
|
||||
+ {
|
||||
+ art_data = new_tags->artwork->data;
|
||||
+ art_data_len = new_tags->artwork->size;
|
||||
+ }
|
||||
#ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
|
||||
- if (MP4GetMetadataCoverArtCount(mp4) &&
|
||||
- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
|
||||
-#else
|
||||
- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len);
|
||||
+ if (new_tags->artworkCount && art_data_len > 0)
|
||||
#endif
|
||||
{
|
||||
if (art_data)
|
||||
@@ -211,11 +212,10 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
- free(art_data);
|
||||
+ MP4TagsFree(new_tags);
|
||||
throw ex;
|
||||
}
|
||||
|
||||
- free(art_data);
|
||||
if (art_mimetype != _(MIMETYPE_DEFAULT))
|
||||
{
|
||||
Ref<CdsResource> resource(new CdsResource(CH_MP4));
|
||||
@@ -225,6 +225,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ MP4TagsFree(new_tags);
|
||||
#endif
|
||||
MP4Close(mp4);
|
||||
}
|
||||
@@ -249,26 +250,35 @@
|
||||
|
||||
if (ctype != ID3_ALBUM_ART)
|
||||
throw _Exception(_("LibMP4V2Handler: got unknown content type: ") + ctype);
|
||||
+
|
||||
+ const MP4Tags* new_tags = MP4TagsAlloc();
|
||||
+ if (MP4TagsFetch(new_tags, mp4))
|
||||
+ {
|
||||
#ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
|
||||
- if (!MP4GetMetadataCoverArtCount(mp4))
|
||||
- throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
|
||||
+ if (!new_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))
|
||||
- {
|
||||
- if (art_data)
|
||||
+ void *art_data = 0;
|
||||
+ u_int32_t art_data_len;
|
||||
+
|
||||
+ const MP4TagArtwork* art = new_tags->artwork;
|
||||
+ art_data = art->data;
|
||||
+ art_data_len = art->size;
|
||||
+ if (art)
|
||||
{
|
||||
- *data_size = (off_t)art_data_len;
|
||||
- Ref<IOHandler> h(new MemIOHandler((void *)art_data, art_data_len));
|
||||
- free(art_data);
|
||||
- return h;
|
||||
+ if (art_data)
|
||||
+ {
|
||||
+ *data_size = (off_t)art_data_len;
|
||||
+ Ref<IOHandler> h(new MemIOHandler(art_data, art_data_len));
|
||||
+ MP4TagsFree(new_tags);
|
||||
+ return h;
|
||||
+ }
|
||||
}
|
||||
+ MP4TagsFree(new_tags);
|
||||
}
|
||||
-
|
||||
throw _Exception(_("LibMP4V2Handler: could not serve album art "
|
||||
- "for file") + item->getLocation() +
|
||||
- " - embedded image not found");
|
||||
+ "for file") + item->getLocation() +
|
||||
+ " - embedded image not found");
|
||||
}
|
||||
|
||||
#endif // HAVE_LIBMP4V2
|
||||
De binära filerna old/src/metadata/.libmp4v2_handler.cc.swp och new/src/metadata/.libmp4v2_handler.cc.swp skiljer
|
Loading…
Reference in a new issue