diff options
author | antoine <antoine@FreeBSD.org> | 2014-08-10 05:24:16 +0800 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2014-08-10 05:24:16 +0800 |
commit | f02c85448529ef6373cb178eeebb44e64d2bcf37 (patch) | |
tree | f34e9258f905326834207c63084ac89efd9474f0 /multimedia/gstreamer-plugins-ugly | |
parent | 9519450375c46ae321b7efc73c48592b193398d0 (diff) | |
download | freebsd-ports-gnome-f02c85448529ef6373cb178eeebb44e64d2bcf37.tar.gz freebsd-ports-gnome-f02c85448529ef6373cb178eeebb44e64d2bcf37.tar.zst freebsd-ports-gnome-f02c85448529ef6373cb178eeebb44e64d2bcf37.zip |
Add a patch to fix the build of gstreamer-plugins-cdio with new libcdio
Obtained from upstream:
http://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/patch/?id=6700410efb1786e5a40f45515574a1bf713ba011
Approved by: kwm
Diffstat (limited to 'multimedia/gstreamer-plugins-ugly')
-rw-r--r-- | multimedia/gstreamer-plugins-ugly/files/patch-bug675112 | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/multimedia/gstreamer-plugins-ugly/files/patch-bug675112 b/multimedia/gstreamer-plugins-ugly/files/patch-bug675112 new file mode 100644 index 000000000000..2c7f67f9b63f --- /dev/null +++ b/multimedia/gstreamer-plugins-ugly/files/patch-bug675112 @@ -0,0 +1,164 @@ +--- ext/cdio/gstcdio.c.orig 2011-12-11 18:48:45 UTC ++++ 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 * s + } + + 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, Cd + 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 (GstObjec + 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); + } + +--- ext/cdio/gstcdio.h.orig 2011-12-11 18:48:45 UTC ++++ 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__ */ +--- ext/cdio/gstcdiocddasrc.c.orig 2011-12-11 18:48:45 UTC ++++ ext/cdio/gstcdiocddasrc.c +@@ -218,6 +218,9 @@ gst_cdio_cdda_src_open (GstCddaBaseSrc * + 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 (cddabasesrc); + +@@ -244,8 +247,18 @@ gst_cdio_cdda_src_open (GstCddaBaseSrc * + 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); + +@@ -262,8 +275,14 @@ gst_cdio_cdda_src_open (GstCddaBaseSrc * + * 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_cdda_base_src_add_track (GST_CDDA_BASE_SRC (src), &track); + } |