diff options
-rw-r--r-- | main/gst-plugins-ugly/APKBUILD | 23 | ||||
-rw-r--r-- | main/gst-plugins-ugly/cdio-cd-text-api.patch | 183 |
2 files changed, 202 insertions, 4 deletions
diff --git a/main/gst-plugins-ugly/APKBUILD b/main/gst-plugins-ugly/APKBUILD index 2f67e6460b..04a39c4438 100644 --- a/main/gst-plugins-ugly/APKBUILD +++ b/main/gst-plugins-ugly/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=gst-plugins-ugly pkgver=0.10.19 -pkgrel=4 +pkgrel=5 pkgdesc="GStreamer Multimedia Framework Ugly Plugins (gst-plugins-ugly)" url="http://gstreamer.freedesktop.org/" arch="all" @@ -9,11 +9,21 @@ license="LGPL" depends= # libdvdread>=4.1.3 libsidplay>=1.36.59 " makedepends="pkgconfig lame-dev libmpeg2-dev a52dec-dev libid3tag-dev libmad-dev glib-dev liboil-dev gstreamer-dev gst-plugins-base-dev - x264-dev libcdio-dev libid3tag-dev orc-dev" -source="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-$pkgver.tar.bz2" + x264-dev libcdio-dev libcdio-paranoia-dev libid3tag-dev orc-dev" +source="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-$pkgver.tar.bz2 + cdio-cd-text-api.patch" subpackages="$pkgname-lang" _builddir="$srcdir"/$pkgname-$pkgver +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + build() { cd "$_builddir" @@ -32,4 +42,9 @@ package() { make DESTDIR="$pkgdir" install || return 1 find "$pkgdir" -name '*.la' -delete } -md5sums="1d81c593e22a6cdf0f2b4f57eae93df2 gst-plugins-ugly-0.10.19.tar.bz2" +md5sums="1d81c593e22a6cdf0f2b4f57eae93df2 gst-plugins-ugly-0.10.19.tar.bz2 +6c1c665f864387f3a77d32231fedeaab cdio-cd-text-api.patch" +sha256sums="1ca90059275c0f5dca71d4d1601a8f429b7852baed0723e820703b977e2c8df0 gst-plugins-ugly-0.10.19.tar.bz2 +2a8aa4cd019fab333f1f8377bf7afa426d3038a033361d90fab70c335e9a53e7 cdio-cd-text-api.patch" +sha512sums="27ae79653f73a143b1dfd864b16b8f1a43d54538a5802d937cb29ce82d5681604c2b3c3fe68c7debf4a319b09bee880a5a95fc48dce83c6cb9753397a1e300d3 gst-plugins-ugly-0.10.19.tar.bz2 +16b65f3140554212bb5454b0bfdc3d5a27627076aabab3ed23e124210a18f41888b488afa1a74ecc9939213cbc61dae1ff6a9055f1929f1803208e2414792de8 cdio-cd-text-api.patch" diff --git a/main/gst-plugins-ugly/cdio-cd-text-api.patch b/main/gst-plugins-ugly/cdio-cd-text-api.patch new file mode 100644 index 0000000000..cbd16b8e48 --- /dev/null +++ b/main/gst-plugins-ugly/cdio-cd-text-api.patch @@ -0,0 +1,183 @@ +From 649bd92cd2600719862ad5189899212409dd0a67 Mon Sep 17 00:00:00 2001 +From: Leon Merten Lohse <leon@green-side.de> +Date: Thu, 03 May 2012 22:50:30 +0000 +Subject: cdio: compensate for libcdio's recent cd-text api changes + +https://bugzilla.gnome.org/show_bug.cgi?id=675112 + +Conflicts: + + ext/cdio/gstcdiocddasrc.c +--- +diff --git a/ext/cdio/gstcdio.c b/ext/cdio/gstcdio.c +index 2f58d18..483ebf5 100644 +--- a/ext/cdio/gstcdio.c ++++ b/ext/cdio/gstcdio.c +@@ -30,12 +30,16 @@ + GST_DEBUG_CATEGORY (gst_cdio_debug); + + void +-gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, ++gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, track_t track, + cdtext_field_t field, const gchar * gst_tag, GstTagList ** p_tags) + { + const gchar *txt; + ++#if LIBCDIO_VERSION_NUM > 83 ++ txt = cdtext_get_const (cdtext, field, track); ++#else + txt = cdtext_get_const (field, cdtext); ++#endif + if (txt == NULL || *txt == '\0') { + GST_DEBUG_OBJECT (src, "empty CD-TEXT field %u (%s)", field, gst_tag); + return; +@@ -57,6 +61,12 @@ gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, + } + + GstTagList * ++#if LIBCDIO_VERSION_NUM > 83 ++gst_cdio_get_cdtext (GstObject * src, cdtext_t * t, track_t track) ++{ ++ GstTagList *tags = NULL; ++ ++#else + gst_cdio_get_cdtext (GstObject * src, CdIo * cdio, track_t track) + { + GstTagList *tags = NULL; +@@ -67,14 +77,22 @@ gst_cdio_get_cdtext (GstObject * src, CdIo * cdio, track_t track) + GST_DEBUG_OBJECT (src, "no CD-TEXT for track %u", track); + return NULL; + } ++#endif + +- gst_cdio_add_cdtext_field (src, t, CDTEXT_PERFORMER, GST_TAG_ARTIST, &tags); +- gst_cdio_add_cdtext_field (src, t, CDTEXT_TITLE, GST_TAG_TITLE, &tags); ++ gst_cdio_add_cdtext_field (src, t, track, CDTEXT_FIELD_PERFORMER, ++ GST_TAG_ARTIST, &tags); ++ gst_cdio_add_cdtext_field (src, t, track, CDTEXT_FIELD_TITLE, GST_TAG_TITLE, ++ &tags); + + return tags; + } + + void ++#if LIBCDIO_VERSION_NUM > 83 ++gst_cdio_add_cdtext_album_tags (GstObject * src, cdtext_t * t, ++ GstTagList * tags) ++{ ++#else + gst_cdio_add_cdtext_album_tags (GstObject * src, CdIo * cdio, GstTagList * tags) + { + cdtext_t *t; +@@ -84,11 +102,14 @@ gst_cdio_add_cdtext_album_tags (GstObject * src, CdIo * cdio, GstTagList * tags) + GST_DEBUG_OBJECT (src, "no CD-TEXT for album"); + return; + } ++#endif + +- /* FIXME: map CDTEXT_PERFORMER to GST_TAG_ALBUM_ARTIST once we have that */ +- gst_cdio_add_cdtext_field (src, t, CDTEXT_TITLE, GST_TAG_ALBUM, &tags); +- gst_cdio_add_cdtext_field (src, t, CDTEXT_GENRE, GST_TAG_GENRE, &tags); +- ++ gst_cdio_add_cdtext_field (src, t, 0, CDTEXT_FIELD_PERFORMER, ++ GST_TAG_ALBUM_ARTIST, &tags); ++ gst_cdio_add_cdtext_field (src, t, 0, CDTEXT_FIELD_TITLE, GST_TAG_ALBUM, ++ &tags); ++ gst_cdio_add_cdtext_field (src, t, 0, CDTEXT_FIELD_GENRE, GST_TAG_GENRE, ++ &tags); + GST_DEBUG ("CD-TEXT album tags: %" GST_PTR_FORMAT, tags); + } + +diff --git a/ext/cdio/gstcdio.h b/ext/cdio/gstcdio.h +index ef31ed0..c6da580 100644 +--- a/ext/cdio/gstcdio.h ++++ b/ext/cdio/gstcdio.h +@@ -24,22 +24,38 @@ + #include <gst/gst.h> + #include <cdio/cdio.h> + #include <cdio/cdtext.h> ++#include <cdio/version.h> ++ ++#if LIBCDIO_VERSION_NUM <= 83 ++ #define CDTEXT_FIELD_PERFORMER CDTEXT_PERFORMER ++ #define CDTEXT_FIELD_GENRE CDTEXT_GENRE ++ #define CDTEXT_FIELD_TITLE CDTEXT_TITLE ++#endif + + GST_DEBUG_CATEGORY_EXTERN (gst_cdio_debug); + #define GST_CAT_DEFAULT gst_cdio_debug + + void gst_cdio_add_cdtext_field (GstObject * src, + cdtext_t * cdtext, ++ track_t track, + cdtext_field_t field, + const gchar * gst_tag, + GstTagList ** p_tags); + + GstTagList * gst_cdio_get_cdtext (GstObject * src, ++#if LIBCDIO_VERSION_NUM > 83 ++ cdtext_t * t, ++#else + CdIo * cdio, ++#endif + track_t track); + + void gst_cdio_add_cdtext_album_tags (GstObject * src, ++#if LIBCDIO_VERSION_NUM > 83 ++ cdtext_t * t, ++#else + CdIo * cdio, ++#endif + GstTagList * tags); + + #endif /* __GST_CDIO_H__ */ +diff --git a/ext/cdio/gstcdiocddasrc.c b/ext/cdio/gstcdiocddasrc.c +index 615a0c8..830839e 100644 +--- a/ext/cdio/gstcdiocddasrc.c ++++ b/ext/cdio/gstcdiocddasrc.c +@@ -206,6 +206,9 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device) + GstCdioCddaSrc *src; + discmode_t discmode; + gint first_track, num_tracks, i; ++#if LIBCDIO_VERSION_NUM > 83 ++ cdtext_t *cdtext; ++#endif + + src = GST_CDIO_CDDA_SRC (audiocdsrc); + +@@ -232,8 +235,18 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device) + if (src->read_speed != -1) + cdio_set_speed (src->cdio, src->read_speed); + ++#if LIBCDIO_VERSION_NUM > 83 ++ cdtext = cdio_get_cdtext (src->cdio); ++ ++ if (NULL == cdtext) ++ GST_DEBUG_OBJECT (src, "no CD-TEXT on disc"); ++ else ++ gst_cdio_add_cdtext_album_tags (GST_OBJECT_CAST (src), cdtext, ++ cddabasesrc->tags); ++#else + gst_cdio_add_cdtext_album_tags (GST_OBJECT_CAST (src), src->cdio, + cddabasesrc->tags); ++#endif + + GST_LOG_OBJECT (src, "%u tracks, first track: %d", num_tracks, first_track); + +@@ -250,8 +263,14 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device) + * the right thing here (for cddb id calculations etc. as well) */ + track.start = cdio_get_track_lsn (src->cdio, i + first_track); + track.end = track.start + len_sectors - 1; /* -1? */ ++#if LIBCDIO_VERSION_NUM > 83 ++ if (NULL != cdtext) ++ track.tags = gst_cdio_get_cdtext (GST_OBJECT (src), cdtext, ++ i + first_track); ++#else + track.tags = gst_cdio_get_cdtext (GST_OBJECT (src), src->cdio, + i + first_track); ++#endif + + gst_audio_cd_src_add_track (GST_AUDIO_CD_SRC (src), &track); + } +-- +cgit v0.9.0.2-2-gbebe |