wok diff gst-plugins-ugly/stuff/libcdio.u @ rev 23700

updated tintin++ (2.01.91 -> 2.02.02)
author Hans-G?nter Theisgen
date Tue Apr 28 08:45:18 2020 +0100 (2020-04-28)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gst-plugins-ugly/stuff/libcdio.u	Tue Apr 28 08:45:18 2020 +0100
     1.3 @@ -0,0 +1,96 @@
     1.4 +--- ext/cdio/gstcdio.h
     1.5 ++++ ext/cdio/gstcdio.h
     1.6 +@@ -28,11 +28,20 @@
     1.7 + GST_DEBUG_CATEGORY_EXTERN (gst_cdio_debug);
     1.8 + #define GST_CAT_DEFAULT gst_cdio_debug
     1.9 + 
    1.10 ++#if LIBCDIO_VERSION_NUM >= 90
    1.11 + void     gst_cdio_add_cdtext_field (GstObject      * src,
    1.12 +                                     cdtext_t       * cdtext,
    1.13 +                                     cdtext_field_t   field,
    1.14 +                                     const gchar    * gst_tag,
    1.15 ++                                    GstTagList    ** p_tags,
    1.16 ++				    track_t	     track);
    1.17 ++#else
    1.18 ++void     gst_cdio_add_cdtext_field (GstObject      * src,
    1.19 ++                                    cdtext_t       * cdtext,
    1.20 ++                                    cdtext_field_t   field,
    1.21 ++                                    const gchar    * gst_tag,
    1.22 +                                     GstTagList    ** p_tags);
    1.23 ++#endif
    1.24 + 
    1.25 + GstTagList  * gst_cdio_get_cdtext  (GstObject      * src,
    1.26 +                                     CdIo           * cdio,
    1.27 +--- ext/cdio/gstcdio.c
    1.28 ++++ ext/cdio/gstcdio.c
    1.29 +@@ -30,12 +30,21 @@
    1.30 + GST_DEBUG_CATEGORY (gst_cdio_debug);
    1.31 + 
    1.32 + void
    1.33 ++#if LIBCDIO_VERSION_NUM >= 90
    1.34 + gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext,
    1.35 ++    cdtext_field_t field, const gchar * gst_tag, GstTagList ** p_tags, track_t track)
    1.36 ++#else
    1.37 ++gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext,
    1.38 +     cdtext_field_t field, const gchar * gst_tag, GstTagList ** p_tags)
    1.39 ++#endif
    1.40 + {
    1.41 +   const gchar *txt;
    1.42 + 
    1.43 ++#if LIBCDIO_VERSION_NUM >= 90
    1.44 ++  txt = cdtext_get_const (cdtext, field, track);
    1.45 ++#else
    1.46 +   txt = cdtext_get_const (field, cdtext);
    1.47 ++#endif
    1.48 +   if (txt == NULL || *txt == '\0') {
    1.49 +     GST_DEBUG_OBJECT (src, "empty CD-TEXT field %u (%s)", field, gst_tag);
    1.50 +     return;
    1.51 +@@ -62,14 +71,23 @@
    1.52 +   GstTagList *tags = NULL;
    1.53 +   cdtext_t *t;
    1.54 + 
    1.55 ++#if LIBCDIO_VERSION_NUM >= 90
    1.56 ++  t = cdio_get_cdtext (cdio);
    1.57 ++#else
    1.58 +   t = cdio_get_cdtext (cdio, track);
    1.59 ++#endif
    1.60 +   if (t == NULL) {
    1.61 +     GST_DEBUG_OBJECT (src, "no CD-TEXT for track %u", track);
    1.62 +     return NULL;
    1.63 +   }
    1.64 + 
    1.65 ++#if LIBCDIO_VERSION_NUM >= 90
    1.66 ++  gst_cdio_add_cdtext_field (src, t, CDTEXT_FIELD_PERFORMER, GST_TAG_ARTIST, &tags, track);
    1.67 ++  gst_cdio_add_cdtext_field (src, t, CDTEXT_FIELD_TITLE, GST_TAG_TITLE, &tags, track);
    1.68 ++#else
    1.69 +   gst_cdio_add_cdtext_field (src, t, CDTEXT_PERFORMER, GST_TAG_ARTIST, &tags);
    1.70 +   gst_cdio_add_cdtext_field (src, t, CDTEXT_TITLE, GST_TAG_TITLE, &tags);
    1.71 ++#endif
    1.72 + 
    1.73 +   return tags;
    1.74 + }
    1.75 +@@ -79,15 +97,24 @@
    1.76 + {
    1.77 +   cdtext_t *t;
    1.78 + 
    1.79 ++#if LIBCDIO_VERSION_NUM >= 90
    1.80 ++  t = cdio_get_cdtext (cdio);
    1.81 ++#else
    1.82 +   t = cdio_get_cdtext (cdio, 0);
    1.83 ++#endif
    1.84 +   if (t == NULL) {
    1.85 +     GST_DEBUG_OBJECT (src, "no CD-TEXT for album");
    1.86 +     return;
    1.87 +   }
    1.88 + 
    1.89 +   /* FIXME: map CDTEXT_PERFORMER to GST_TAG_ALBUM_ARTIST once we have that */
    1.90 ++#if LIBCDIO_VERSION_NUM >= 90
    1.91 ++  gst_cdio_add_cdtext_field (src, t, CDTEXT_FIELD_TITLE, GST_TAG_ALBUM, &tags, 0);
    1.92 ++  gst_cdio_add_cdtext_field (src, t, CDTEXT_FIELD_GENRE, GST_TAG_GENRE, &tags, 0);
    1.93 ++#else
    1.94 +   gst_cdio_add_cdtext_field (src, t, CDTEXT_TITLE, GST_TAG_ALBUM, &tags);
    1.95 +   gst_cdio_add_cdtext_field (src, t, CDTEXT_GENRE, GST_TAG_GENRE, &tags);
    1.96 ++#endif
    1.97 + 
    1.98 +   GST_DEBUG ("CD-TEXT album tags: %" GST_PTR_FORMAT, tags);
    1.99 + }