GST_DEBUG_OBJECT (dec, "found CMML head (title: %s base: %s)",
head->title, head->base);
+ /* FIXME: what's the point of all this GValue transform crack? */
/* create the GST_TAG_TITLE tag */
g_value_init (&str_val, G_TYPE_STRING);
g_value_init (&title_val, gst_tag_get_type (GST_TAG_TITLE));
g_value_set_string (&str_val, (gchar *) head->title);
g_value_transform (&str_val, &title_val);
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
gst_tag_list_add_values (tags, GST_TAG_MERGE_APPEND,
GST_TAG_TITLE, &title_val, NULL);
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_CMML_HEAD, head, NULL);
GST_DEBUG_OBJECT (dec, "sending clip tag %s", clip->id);
- tags = gst_tag_list_new ();
- gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_CMML_CLIP, clip, NULL);
+ tags = gst_tag_list_new (GST_TAG_CMML_CLIP, clip, NULL);
gst_element_found_tags_for_pad (GST_ELEMENT (dec), dec->srcpad, tags);
}
{
gst_flac_dec_reset_decoders (dec);
- dec->tags = gst_tag_list_new ();
- gst_tag_list_add (dec->tags, GST_TAG_MERGE_REPLACE,
- GST_TAG_AUDIO_CODEC, "FLAC", NULL);
+ dec->tags = gst_tag_list_new (GST_TAG_AUDIO_CODEC, "FLAC", NULL);
dec->adapter = gst_adapter_new ();
if (flacdec->tags)
list = flacdec->tags;
else
- flacdec->tags = list = gst_tag_list_new ();
+ flacdec->tags = list = gst_tag_list_new_empty ();
num = metadata->data.vorbis_comment.num_comments;
GST_DEBUG_OBJECT (flacdec, "%u tag(s) found", num);
GST_STR_NULL (picture.mime_type));
GST_DEBUG_OBJECT (dec, "image data is %u bytes", picture.data_length);
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
gst_tag_list_add_id3_image (tags, (guint8 *) picture.data,
picture.data_length, picture.type);
flacenc->depth = 0;
flacenc->sample_rate = 0;
flacenc->eos = FALSE;
- flacenc->tags = gst_tag_list_new ();
+ flacenc->tags = gst_tag_list_new_empty ();
return TRUE;
}
}
/* Icecast stuff */
- tag_list = gst_tag_list_new ();
+ tag_list = gst_tag_list_new_empty ();
if ((value =
soup_message_headers_get (msg->response_headers,
if (!list) {
GST_WARNING_OBJECT (dec, "couldn't decode comments");
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
}
if (encoder) {
GST_DEBUG_OBJECT (enc, "start");
speex_bits_init (&enc->bits);
- enc->tags = gst_tag_list_new ();
+ enc->tags = gst_tag_list_new_empty ();
enc->header_sent = FALSE;
return TRUE;
gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (enc)));
if (merged_tags == NULL)
- merged_tags = gst_tag_list_new ();
+ merged_tags = gst_tag_list_new_empty ();
GST_DEBUG_OBJECT (enc, "merged tags = %" GST_PTR_FORMAT, merged_tags);
comments = gst_tag_list_to_vorbiscomment_buffer (merged_tags, NULL,
goto error;
if (!flacparse->tags)
- flacparse->tags = gst_tag_list_new ();
+ flacparse->tags = gst_tag_list_new_empty ();
gst_tag_list_add_id3_image (flacparse->tags,
data + gst_byte_reader_get_pos (&reader), img_len, img_type);
/* empty vorbiscomment */
{
- GstTagList *taglist = gst_tag_list_new ();
+ GstTagList *taglist = gst_tag_list_new_empty ();
guchar header[4];
guint size;
codec = g_strdup_printf ("MPEG %d Audio, Layer %d",
mp3parse->version, mp3parse->layer);
}
- taglist = gst_tag_list_new ();
- gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
- GST_TAG_AUDIO_CODEC, codec, NULL);
+ taglist = gst_tag_list_new (GST_TAG_AUDIO_CODEC, codec, NULL);
if (mp3parse->hdr_bitrate > 0 && mp3parse->xing_bitrate == 0 &&
mp3parse->vbri_bitrate == 0) {
/* We don't have a VBR bitrate, so post the available bitrate as
gboolean using_crc;
if (!taglist) {
- taglist = gst_tag_list_new ();
+ taglist = gst_tag_list_new_empty ();
}
mp3parse->last_posted_crc = mp3parse->last_crc;
if (mp3parse->last_posted_crc == CRC_PROTECTED) {
if (mp3parse->last_posted_channel_mode != mp3parse->last_mode) {
if (!taglist) {
- taglist = gst_tag_list_new ();
+ taglist = gst_tag_list_new_empty ();
}
mp3parse->last_posted_channel_mode = mp3parse->last_mode;
/* make tags */
if (codec_name) {
if (!stream->taglist)
- stream->taglist = gst_tag_list_new ();
+ stream->taglist = gst_tag_list_new_empty ();
avi->got_tags = TRUE;
dt = gst_date_time_new_local_time (y, m, d, h, min, s);
if (avi->globaltags == NULL)
- avi->globaltags = gst_tag_list_new ();
+ avi->globaltags = gst_tag_list_new_empty ();
gst_tag_list_add (avi->globaltags, GST_TAG_MERGE_REPLACE, GST_TAG_DATE, date,
NULL);
}
if (!(tags = avi->globaltags))
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE,
GST_TAG_CONTAINER_FORMAT, "AVI", NULL);
static void
gst_avi_subtitle_title_tag (GstAviSubtitle * sub, gchar * title)
{
- GstTagList *temp_list = gst_tag_list_new ();
-
- gst_tag_list_add (temp_list, GST_TAG_MERGE_APPEND, GST_TAG_TITLE, title,
- NULL);
- gst_pad_push_event (sub->src, gst_event_new_tag (temp_list));
+ gst_pad_push_event (sub->src,
+ gst_event_new_tag (gst_tag_list_new (GST_TAG_TITLE, title, NULL)));
}
static GstFlowReturn
case PROP_TAGS:{
gchar *structure =
g_strdup_printf ("taglist,%s", g_value_get_string (value));
- if (!(self->tags = gst_structure_from_string (structure, NULL))) {
+ if (!(self->tags = gst_tag_list_new_from_string (structure))) {
GST_WARNING ("unparsable taglist = '%s'", structure);
}
if (codec_name) {
if (demux->taglist == NULL)
- demux->taglist = gst_tag_list_new ();
+ demux->taglist = gst_tag_list_new_empty ();
gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_AUDIO_CODEC, codec_name, NULL);
g_free (codec_name);
GST_DEBUG_OBJECT (demux, "pushing tags out %" GST_PTR_FORMAT,
demux->taglist);
gst_element_found_tags (GST_ELEMENT (demux), demux->taglist);
- demux->taglist = gst_tag_list_new ();
+ demux->taglist = gst_tag_list_new_empty ();
demux->push_tags = FALSE;
}
}
if (codec_name) {
if (demux->taglist == NULL)
- demux->taglist = gst_tag_list_new ();
+ demux->taglist = gst_tag_list_new_empty ();
gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_VIDEO_CODEC, codec_name, NULL);
g_free (codec_name);
gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad);
demux->adapter = gst_adapter_new ();
- demux->taglist = gst_tag_list_new ();
+ demux->taglist = gst_tag_list_new_empty ();
gst_segment_init (&demux->segment, GST_FORMAT_TIME);
demux->own_index = FALSE;
* a bit easier, then do that parsing. */
buffer = g_strndup ((const gchar *) data, length);
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
strings = g_strsplit (buffer, "';", 0);
for (i = 0; strings[i]; i++) {
stream->caps =
qtdemux_video_caps (qtdemux, stream, fourcc, stsd_data, &codec);
if (codec) {
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_VIDEO_CODEC, codec, NULL);
g_free (codec);
}
if (!list)
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
if (max_bitrate > 0 && max_bitrate < G_MAXUINT32) {
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GstStructure *s;
gint bitrate = 0;
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_AUDIO_CODEC, codec, NULL);
g_free (codec);
if ((len - 0x34) > 8 &&
(bitrate = qtdemux_parse_amr_bitrate (buf, amrwb))) {
if (!list)
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_MAXIMUM_BITRATE, bitrate, NULL);
}
stream->caps =
qtdemux_sub_caps (qtdemux, stream, fourcc, stsd_data, &codec);
if (codec) {
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_SUBTITLE_CODEC, codec, NULL);
g_free (codec);
const gchar *lang_code;
if (!list)
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
/* convert ISO 639-2 code to ISO 639-1 */
lang_code = gst_tag_get_language_code (stream->lang_id);
", Stream bitrate = %u", sys_bitrate, bitrate);
if (!stream->pending_tags)
- stream->pending_tags = gst_tag_list_new ();
+ stream->pending_tags = gst_tag_list_new_empty ();
gst_tag_list_add (stream->pending_tags, GST_TAG_MERGE_REPLACE,
GST_TAG_BITRATE, bitrate, NULL);
GST_DEBUG_OBJECT (qtdemux, "new tag list");
if (!qtdemux->tag_list)
- qtdemux->tag_list = gst_tag_list_new ();
+ qtdemux->tag_list = gst_tag_list_new_empty ();
i = 0;
while (i < G_N_ELEMENTS (add_funcs)) {
const gchar *fmt;
if (tags == NULL)
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
if (qtdemux->major_brand == FOURCC_mjp2)
fmt = "Motion JPEG 2000";
}
if (datetime) {
if (!qtdemux->tag_list)
- qtdemux->tag_list = gst_tag_list_new ();
+ qtdemux->tag_list = gst_tag_list_new_empty ();
/* Use KEEP as explicit tags should have a higher priority than mvhd tag */
gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_KEEP, GST_TAG_DATE_TIME,
/* Push new segment, first buffer has 0 timestamp */
gst_pad_push_event (srcpad->pad, gst_event_new_segment (&segment));
- tags =
- gst_tag_list_new_full (GST_TAG_CONTAINER_FORMAT, "Multipart", NULL);
+ tags = gst_tag_list_new (GST_TAG_CONTAINER_FORMAT, "Multipart", NULL);
gst_pad_push_event (srcpad->pad, gst_event_new_tag (tags));
GST_BUFFER_TIMESTAMP (outbuf) = 0;
if (track_success) {
if (*tag_list == NULL)
- *tag_list = gst_tag_list_new ();
+ *tag_list = gst_tag_list_new_empty ();
gst_tag_list_add (*tag_list, GST_TAG_MERGE_APPEND,
GST_TAG_TRACK_PEAK, track_peak, GST_TAG_TRACK_GAIN, track_gain, NULL);
}
if (album_success) {
if (*tag_list == NULL)
- *tag_list = gst_tag_list_new ();
+ *tag_list = gst_tag_list_new_empty ();
gst_tag_list_add (*tag_list, GST_TAG_MERGE_APPEND,
GST_TAG_ALBUM_PEAK, album_peak, GST_TAG_ALBUM_GAIN, album_gain, NULL);
}
wav->got_fmt = TRUE;
if (codec_name) {
- wav->tags = gst_tag_list_new ();
+ wav->tags = gst_tag_list_new_empty ();
gst_tag_list_add (wav->tags, GST_TAG_MERGE_REPLACE,
GST_TAG_AUDIO_CODEC, codec_name, NULL);
}
/* send data as tags */
if (!wav->tags)
- wav->tags = gst_tag_list_new ();
+ wav->tags = gst_tag_list_new_empty ();
gst_tag_list_add (wav->tags, GST_TAG_MERGE_REPLACE,
GST_TAG_BEATS_PER_MINUTE, tempo, NULL);