Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 301675
Collapse All | Expand All

(-)a/ext/taglib/gstapev2mux.cc (-30 / +29 lines)
Lines 115-121 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
115
    result = gst_tag_list_get_string_index (list, tag, 0, &title);
115
    result = gst_tag_list_get_string_index (list, tag, 0, &title);
116
    if (result != FALSE) {
116
    if (result != FALSE) {
117
      GST_DEBUG ("Setting title to %s", title);
117
      GST_DEBUG ("Setting title to %s", title);
118
      apev2tag->setTitle (String::String (title, String::UTF8));
118
      apev2tag->setTitle (String (title, String::UTF8));
119
    }
119
    }
120
    g_free (title);
120
    g_free (title);
121
  } else if (strcmp (tag, GST_TAG_ALBUM) == 0) {
121
  } else if (strcmp (tag, GST_TAG_ALBUM) == 0) {
Lines 124-130 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
124
    result = gst_tag_list_get_string_index (list, tag, 0, &album);
124
    result = gst_tag_list_get_string_index (list, tag, 0, &album);
125
    if (result != FALSE) {
125
    if (result != FALSE) {
126
      GST_DEBUG ("Setting album to %s", album);
126
      GST_DEBUG ("Setting album to %s", album);
127
      apev2tag->setAlbum (String::String (album, String::UTF8));
127
      apev2tag->setAlbum (String (album, String::UTF8));
128
    }
128
    }
129
    g_free (album);
129
    g_free (album);
130
  } else if (strcmp (tag, GST_TAG_ARTIST) == 0) {
130
  } else if (strcmp (tag, GST_TAG_ARTIST) == 0) {
Lines 133-139 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
133
    result = gst_tag_list_get_string_index (list, tag, 0, &artist);
133
    result = gst_tag_list_get_string_index (list, tag, 0, &artist);
134
    if (result != FALSE) {
134
    if (result != FALSE) {
135
      GST_DEBUG ("Setting artist to %s", artist);
135
      GST_DEBUG ("Setting artist to %s", artist);
136
      apev2tag->setArtist (String::String (artist, String::UTF8));
136
      apev2tag->setArtist (String (artist, String::UTF8));
137
    }
137
    }
138
    g_free (artist);
138
    g_free (artist);
139
  } else if (strcmp (tag, GST_TAG_COMPOSER) == 0) {
139
  } else if (strcmp (tag, GST_TAG_COMPOSER) == 0) {
Lines 142-149 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
142
    result = gst_tag_list_get_string_index (list, tag, 0, &composer);
142
    result = gst_tag_list_get_string_index (list, tag, 0, &composer);
143
    if (result != FALSE) {
143
    if (result != FALSE) {
144
      GST_DEBUG ("Setting composer to %s", composer);
144
      GST_DEBUG ("Setting composer to %s", composer);
145
      apev2tag->addValue (String::String ("COMPOSER", String::UTF8),
145
      apev2tag->addValue (String ("COMPOSER", String::UTF8),
146
          String::String (composer, String::UTF8));
146
          String (composer, String::UTF8));
147
    }
147
    }
148
    g_free (composer);
148
    g_free (composer);
149
  } else if (strcmp (tag, GST_TAG_GENRE) == 0) {
149
  } else if (strcmp (tag, GST_TAG_GENRE) == 0) {
Lines 152-158 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
152
    result = gst_tag_list_get_string_index (list, tag, 0, &genre);
152
    result = gst_tag_list_get_string_index (list, tag, 0, &genre);
153
    if (result != FALSE) {
153
    if (result != FALSE) {
154
      GST_DEBUG ("Setting genre to %s", genre);
154
      GST_DEBUG ("Setting genre to %s", genre);
155
      apev2tag->setGenre (String::String (genre, String::UTF8));
155
      apev2tag->setGenre (String (genre, String::UTF8));
156
    }
156
    }
157
    g_free (genre);
157
    g_free (genre);
158
  } else if (strcmp (tag, GST_TAG_COMMENT) == 0) {
158
  } else if (strcmp (tag, GST_TAG_COMMENT) == 0) {
Lines 161-167 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
161
    result = gst_tag_list_get_string_index (list, tag, 0, &comment);
161
    result = gst_tag_list_get_string_index (list, tag, 0, &comment);
162
    if (result != FALSE) {
162
    if (result != FALSE) {
163
      GST_DEBUG ("Setting comment to %s", comment);
163
      GST_DEBUG ("Setting comment to %s", comment);
164
      apev2tag->setComment (String::String (comment, String::UTF8));
164
      apev2tag->setComment (String (comment, String::UTF8));
165
    }
165
    }
166
    g_free (comment);
166
    g_free (comment);
167
  } else if (strcmp (tag, GST_TAG_DATE) == 0) {
167
  } else if (strcmp (tag, GST_TAG_DATE) == 0) {
Lines 190-197 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
190
190
191
        tag_str = g_strdup_printf ("%d/%d", track_number, total_tracks);
191
        tag_str = g_strdup_printf ("%d/%d", track_number, total_tracks);
192
        GST_DEBUG ("Setting track number to %s", tag_str);
192
        GST_DEBUG ("Setting track number to %s", tag_str);
193
        apev2tag->addValue (String::String ("TRACK", String::UTF8),
193
        apev2tag->addValue (String ("TRACK", String::UTF8),
194
            String::String (tag_str, String::UTF8), true);
194
            String (tag_str, String::UTF8), true);
195
        g_free (tag_str);
195
        g_free (tag_str);
196
      } else {
196
      } else {
197
        GST_DEBUG ("Setting track number to %d", track_number);
197
        GST_DEBUG ("Setting track number to %d", track_number);
Lines 208-215 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
208
208
209
      tag_str = g_strdup_printf ("0/%d", n);
209
      tag_str = g_strdup_printf ("0/%d", n);
210
      GST_DEBUG ("Setting track number to %s", tag_str);
210
      GST_DEBUG ("Setting track number to %s", tag_str);
211
      apev2tag->addValue (String::String ("TRACK", String::UTF8),
211
      apev2tag->addValue (String ("TRACK", String::UTF8),
212
          String::String (tag_str, String::UTF8), true);
212
          String (tag_str, String::UTF8), true);
213
      g_free (tag_str);
213
      g_free (tag_str);
214
    }
214
    }
215
#if 0
215
#if 0
Lines 233-240 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
233
233
234
      GST_DEBUG ("Setting album number to %s", tag_str);
234
      GST_DEBUG ("Setting album number to %s", tag_str);
235
235
236
      apev2tag->addValue (String::String ("MEDIA", String::UTF8),
236
      apev2tag->addValue (String ("MEDIA", String::UTF8),
237
          String::String (tag_str, String::UTF8), true);
237
          String (tag_str, String::UTF8), true);
238
      g_free (tag_str);
238
      g_free (tag_str);
239
    }
239
    }
240
  } else if (strcmp (tag, GST_TAG_ALBUM_VOLUME_COUNT) == 0) {
240
  } else if (strcmp (tag, GST_TAG_ALBUM_VOLUME_COUNT) == 0) {
Lines 249-256 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
249
      tag_str = g_strdup_printf ("CD 0/%u", n);
249
      tag_str = g_strdup_printf ("CD 0/%u", n);
250
      GST_DEBUG ("Setting album volume number/count to %s", tag_str);
250
      GST_DEBUG ("Setting album volume number/count to %s", tag_str);
251
251
252
      apev2tag->addValue (String::String ("MEDIA", String::UTF8),
252
      apev2tag->addValue (String ("MEDIA", String::UTF8),
253
          String::String (tag_str, String::UTF8), true);
253
          String (tag_str, String::UTF8), true);
254
      g_free (tag_str);
254
      g_free (tag_str);
255
    }
255
    }
256
#endif
256
#endif
Lines 261-268 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
261
261
262
    if (result != FALSE) {
262
    if (result != FALSE) {
263
      GST_DEBUG ("Setting copyright to %s", copyright);
263
      GST_DEBUG ("Setting copyright to %s", copyright);
264
      apev2tag->addValue (String::String ("COPYRIGHT", String::UTF8),
264
      apev2tag->addValue (String ("COPYRIGHT", String::UTF8),
265
          String::String (copyright, String::UTF8), true);
265
          String (copyright, String::UTF8), true);
266
      g_free (copyright);
266
      g_free (copyright);
267
    }
267
    }
268
  } else if (strcmp (tag, GST_TAG_LOCATION) == 0) {
268
  } else if (strcmp (tag, GST_TAG_LOCATION) == 0) {
Lines 272-279 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
272
272
273
    if (result != FALSE) {
273
    if (result != FALSE) {
274
      GST_DEBUG ("Setting location to %s", location);
274
      GST_DEBUG ("Setting location to %s", location);
275
      apev2tag->addValue (String::String ("FILE", String::UTF8),
275
      apev2tag->addValue (String ("FILE", String::UTF8),
276
          String::String (location, String::UTF8), true);
276
          String (location, String::UTF8), true);
277
      g_free (location);
277
      g_free (location);
278
    }
278
    }
279
  } else if (strcmp (tag, GST_TAG_ISRC) == 0) {
279
  } else if (strcmp (tag, GST_TAG_ISRC) == 0) {
Lines 283-290 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
283
283
284
    if (result != FALSE) {
284
    if (result != FALSE) {
285
      GST_DEBUG ("Setting ISRC to %s", isrc);
285
      GST_DEBUG ("Setting ISRC to %s", isrc);
286
      apev2tag->addValue (String::String ("ISRC", String::UTF8),
286
      apev2tag->addValue (String ("ISRC", String::UTF8),
287
          String::String (isrc, String::UTF8), true);
287
          String (isrc, String::UTF8), true);
288
      g_free (isrc);
288
      g_free (isrc);
289
    }
289
    }
290
  } else if (strcmp (tag, GST_TAG_TRACK_GAIN) == 0) {
290
  } else if (strcmp (tag, GST_TAG_TRACK_GAIN) == 0) {
Lines 297-304 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
297
297
298
      track_gain = g_ascii_dtostr (track_gain, G_ASCII_DTOSTR_BUF_SIZE, value);
298
      track_gain = g_ascii_dtostr (track_gain, G_ASCII_DTOSTR_BUF_SIZE, value);
299
      GST_DEBUG ("Setting track gain to %s", track_gain);
299
      GST_DEBUG ("Setting track gain to %s", track_gain);
300
      apev2tag->addValue (String::String ("REPLAYGAIN_TRACK_GAIN",
300
      apev2tag->addValue (String ("REPLAYGAIN_TRACK_GAIN",
301
              String::UTF8), String::String (track_gain, String::UTF8), true);
301
              String::UTF8), String (track_gain, String::UTF8), true);
302
      g_free (track_gain);
302
      g_free (track_gain);
303
    }
303
    }
304
  } else if (strcmp (tag, GST_TAG_TRACK_PEAK) == 0) {
304
  } else if (strcmp (tag, GST_TAG_TRACK_PEAK) == 0) {
Lines 311-318 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
311
311
312
      track_peak = g_ascii_dtostr (track_peak, G_ASCII_DTOSTR_BUF_SIZE, value);
312
      track_peak = g_ascii_dtostr (track_peak, G_ASCII_DTOSTR_BUF_SIZE, value);
313
      GST_DEBUG ("Setting track peak to %s", track_peak);
313
      GST_DEBUG ("Setting track peak to %s", track_peak);
314
      apev2tag->addValue (String::String ("REPLAYGAIN_TRACK_PEAK",
314
      apev2tag->addValue (String ("REPLAYGAIN_TRACK_PEAK",
315
              String::UTF8), String::String (track_peak, String::UTF8), true);
315
              String::UTF8), String (track_peak, String::UTF8), true);
316
      g_free (track_peak);
316
      g_free (track_peak);
317
    }
317
    }
318
  } else if (strcmp (tag, GST_TAG_ALBUM_GAIN) == 0) {
318
  } else if (strcmp (tag, GST_TAG_ALBUM_GAIN) == 0) {
Lines 325-332 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
325
325
326
      album_gain = g_ascii_dtostr (album_gain, G_ASCII_DTOSTR_BUF_SIZE, value);
326
      album_gain = g_ascii_dtostr (album_gain, G_ASCII_DTOSTR_BUF_SIZE, value);
327
      GST_DEBUG ("Setting album gain to %s", album_gain);
327
      GST_DEBUG ("Setting album gain to %s", album_gain);
328
      apev2tag->addValue (String::String ("REPLAYGAIN_ALBUM_GAIN",
328
      apev2tag->addValue (String ("REPLAYGAIN_ALBUM_GAIN",
329
              String::UTF8), String::String (album_gain, String::UTF8), true);
329
              String::UTF8), String (album_gain, String::UTF8), true);
330
      g_free (album_gain);
330
      g_free (album_gain);
331
    }
331
    }
332
  } else if (strcmp (tag, GST_TAG_ALBUM_PEAK) == 0) {
332
  } else if (strcmp (tag, GST_TAG_ALBUM_PEAK) == 0) {
Lines 339-346 add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data) Link Here
339
339
340
      album_peak = g_ascii_dtostr (album_peak, G_ASCII_DTOSTR_BUF_SIZE, value);
340
      album_peak = g_ascii_dtostr (album_peak, G_ASCII_DTOSTR_BUF_SIZE, value);
341
      GST_DEBUG ("Setting album peak to %s", album_peak);
341
      GST_DEBUG ("Setting album peak to %s", album_peak);
342
      apev2tag->addValue (String::String ("REPLAYGAIN_ALBUM_PEAK",
342
      apev2tag->addValue (String ("REPLAYGAIN_ALBUM_PEAK",
343
              String::UTF8), String::String (album_peak, String::UTF8), true);
343
              String::UTF8), String (album_peak, String::UTF8), true);
344
      g_free (album_peak);
344
      g_free (album_peak);
345
    }
345
    }
346
  } else {
346
  } else {
347
-

Return to bug 301675