tag: Update for taglist/tag event API changes

This commit is contained in:
Sebastian Dröge 2012-07-28 00:32:58 +02:00
parent dd3ae904f9
commit afd50a79f4
9 changed files with 24 additions and 23 deletions

View file

@ -151,7 +151,7 @@ gst_chromaprint_create_fingerprint (GstChromaprint * chromaprint)
chromaprint->fingerprint, NULL);
gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (chromaprint),
gst_event_new_tag ("chromaprint", tags));
gst_event_new_tag (tags));
}
static void

View file

@ -446,7 +446,7 @@ gme_setup (GstGmeDec * gme)
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_DURATION, total_duration, NULL);
gst_pad_push_event (gme->srcpad, gst_event_new_tag ("GstDecoder", taglist));
gst_pad_push_event (gme->srcpad, gst_event_new_tag (taglist));
g_free (info);

View file

@ -98,7 +98,7 @@ enum
#define FORMATS "{ "GST_AUDIO_NE (S32)", "GST_AUDIO_NE (S16)", U8 }"
static GstStaticPadTemplate modplug_src_template_factory =
GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw,"
@ -451,7 +451,7 @@ gst_modplug_load_song (GstModPlug * modplug)
GstCaps *newcaps;
GstStructure *structure;
GstMapInfo map;
const gchar * format;
const gchar *format;
GST_DEBUG_OBJECT (modplug, "Setting caps");
@ -461,22 +461,24 @@ gst_modplug_load_song (GstModPlug * modplug)
}
newcaps = gst_caps_make_writable (newcaps);
GST_DEBUG_OBJECT (modplug, "allowed caps %"GST_PTR_FORMAT, newcaps);
GST_DEBUG_OBJECT (modplug, "allowed caps %" GST_PTR_FORMAT, newcaps);
structure = gst_caps_get_structure (newcaps, 0);
if (!gst_structure_fixate_field_string (structure, "format", GST_AUDIO_NE (S16)))
if (!gst_structure_fixate_field_string (structure, "format",
GST_AUDIO_NE (S16)))
GST_WARNING_OBJECT (modplug, "Failed to fixate format to S16NE");
if (!gst_structure_fixate_field_nearest_int (structure, "rate", 44100))
GST_WARNING_OBJECT (modplug, "Failed to fixate rate to 44100");
if (!gst_structure_fixate_field_nearest_int (structure, "channels", 2))
GST_WARNING_OBJECT (modplug, "Failed to fixate number of channels to stereo");
GST_WARNING_OBJECT (modplug,
"Failed to fixate number of channels to stereo");
GST_DEBUG_OBJECT (modplug, "normalized caps %"GST_PTR_FORMAT, newcaps);
GST_DEBUG_OBJECT (modplug, "normalized caps %" GST_PTR_FORMAT, newcaps);
newcaps = gst_caps_fixate (newcaps);
GST_DEBUG_OBJECT (modplug, "fixated caps %"GST_PTR_FORMAT, newcaps);
GST_DEBUG_OBJECT (modplug, "fixated caps %" GST_PTR_FORMAT, newcaps);
/* set up modplug to output the negotiated format */
structure = gst_caps_get_structure (newcaps, 0);
@ -491,8 +493,8 @@ gst_modplug_load_song (GstModPlug * modplug)
gst_structure_get_int (structure, "channels", &modplug->channel);
gst_structure_get_int (structure, "rate", &modplug->frequency);
GST_DEBUG_OBJECT (modplug,
GST_DEBUG_OBJECT (modplug,
"Audio settings: %d bits, %d channel(s), %d Hz sampling rate",
modplug->bits, modplug->channel, modplug->frequency);
@ -676,7 +678,7 @@ gst_modplug_loop (GstModPlug * modplug)
if (modplug->offset == modplug->song_size) {
GstTagList *tags;
gboolean ok;
#define COMMENT_SIZE 16384
#define COMMENT_SIZE 16384
gchar comment[COMMENT_SIZE];
GstSegment seg;
@ -701,12 +703,12 @@ gst_modplug_loop (GstModPlug * modplug)
(gdouble) modplug->mSoundFile->GetMusicTempo (), NULL);
if (modplug->mSoundFile->GetSongComments ((gchar *) & comment,
COMMENT_SIZE, 32)) {
COMMENT_SIZE, 32)) {
comment[COMMENT_SIZE - 1] = '\0';
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
GST_TAG_COMMENT, comment, NULL);
}
gst_pad_push_event (modplug->srcpad, gst_event_new_tag ("GstDecoder", tags));
gst_pad_push_event (modplug->srcpad, gst_event_new_tag (tags));
} else {
/* not fully loaded yet */
return;
@ -729,7 +731,7 @@ gst_modplug_loop (GstModPlug * modplug)
}
/* read and output a buffer */
GST_LOG_OBJECT (modplug, "Read %d bytes", (gint)modplug->read_bytes);
GST_LOG_OBJECT (modplug, "Read %d bytes", (gint) modplug->read_bytes);
/* libmodplug 0.8.7 trashes memory */
out = gst_buffer_new_allocate (NULL, modplug->read_bytes * 2, NULL);

View file

@ -427,7 +427,7 @@ gst_schrodec_send_tags (GstSchroDec * schro_dec)
GST_TAG_VIDEO_CODEC, "Dirac", NULL);
gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (schro_dec),
gst_event_new_tag ("GstDecoder", list));
gst_event_new_tag (list));
}
static GstFlowReturn

View file

@ -243,7 +243,7 @@ gst_bpm_detect_transform_ip (GstBaseTransform * trans, GstBuffer * in)
gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE_ALL, GST_TAG_BEATS_PER_MINUTE,
bpm, (void *) NULL);
gst_pad_push_event (trans->srcpad, gst_event_new_tag ("bpmdetect", tags));
gst_pad_push_event (trans->srcpad, gst_event_new_tag (tags));
GST_INFO_OBJECT (bpm_detect, "Detected BPM: %lf\n", bpm);
bpm_detect->bpm = bpm;

View file

@ -327,7 +327,7 @@ gst_vp8_dec_send_tags (GstVP8Dec * dec)
GST_TAG_VIDEO_CODEC, "VP8 video", NULL);
gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (dec),
gst_event_new_tag ("GstDecoder", list));
gst_event_new_tag (list));
}
static void

View file

@ -456,7 +456,7 @@ gst_camera_bin_start_capture (GstCameraBin2 * camerabin)
active_pad = gst_element_get_static_pad (camerabin->src,
GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME);
gst_pad_push_event (active_pad,
gst_event_new_tag ("GstSrc", gst_tag_list_copy (taglist)));
gst_event_new_tag (gst_tag_list_copy (taglist)));
gst_object_unref (active_pad);
}
@ -1364,7 +1364,7 @@ gst_camera_bin_image_src_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
GST_PTR_FORMAT, tags);
if (tags) {
peer = gst_pad_get_peer (pad);
gst_pad_send_event (peer, gst_event_new_tag ("GstSrc", tags));
gst_pad_send_event (peer, gst_event_new_tag (tags));
gst_object_unref (peer);
}
} else {

View file

@ -1479,8 +1479,7 @@ push_new_segment:
if (stream->taglist) {
GST_DEBUG_OBJECT (stream->pad, "Sending tags %" GST_PTR_FORMAT,
stream->taglist);
gst_pad_push_event (stream->pad, gst_event_new_tag ("GstDemuxer",
stream->taglist));
gst_pad_push_event (stream->pad, gst_event_new_tag (stream->taglist));
stream->taglist = NULL;
}

View file

@ -786,7 +786,7 @@ gst_mpegv_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
g_free (codec);
gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (mpvparse),
gst_event_new_tag ("GstParser", taglist));
gst_event_new_tag (taglist));
mpvparse->send_codec_tag = FALSE;
}