diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-11-16 02:25:26 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-11-23 06:19:32 +0100 |
commit | aed7f2aeee24ee2b9d92718fd90013054cdaed25 (patch) | |
tree | 7e2e770360de21b934350aee493aca0878b838d1 | |
parent | e8fb8cb52351b0acea2c022a9397da9748daa336 (diff) |
rename eventsrename-events
52 files changed, 189 insertions, 189 deletions
diff --git a/ext/gio/gstgiobasesink.c b/ext/gio/gstgiobasesink.c index 6ececec5b..ea8d42da8 100644 --- a/ext/gio/gstgiobasesink.c +++ b/ext/gio/gstgiobasesink.c @@ -210,7 +210,7 @@ gst_gio_base_sink_event (GstBaseSink * base_sink, GstEvent * event) if (G_IS_OUTPUT_STREAM (sink->stream)) { const GstSegment *segment; - gst_event_parse_segment (event, &segment); + gst_event_segment_parse (event, &segment); if (segment->format != GST_FORMAT_BYTES) { GST_WARNING_OBJECT (sink, "ignored SEGMENT event in %s format", diff --git a/ext/libvisual/visual.c b/ext/libvisual/visual.c index 6f6d65baf..6a92bb944 100644 --- a/ext/libvisual/visual.c +++ b/ext/libvisual/visual.c @@ -371,7 +371,7 @@ gst_visual_src_setcaps (GstVisual * visual, GstCaps * caps) visual->duration = gst_util_uint64_scale_int (GST_SECOND, visual->fps_d, visual->fps_n); - res = gst_pad_push_event (visual->srcpad, gst_event_new_caps (caps)); + res = gst_pad_push_event (visual->srcpad, gst_event_caps_new (caps)); return res; @@ -527,7 +527,7 @@ gst_visual_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); res = gst_visual_sink_setcaps (pad, caps); gst_event_unref (event); break; @@ -537,7 +537,7 @@ gst_visual_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) /* the newsegment values are used to clip the input samples * and to convert the incomming timestamps to running time so * we can do QoS */ - gst_event_copy_segment (event, &visual->segment); + gst_event_segment_copy (event, &visual->segment); /* and forward */ res = gst_pad_push_event (visual->srcpad, event); @@ -566,7 +566,7 @@ gst_visual_src_event (GstPad * pad, GstObject * parent, GstEvent * event) GstClockTimeDiff diff; GstClockTime timestamp; - gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); + gst_event_qos_parse (event, NULL, &proportion, &diff, ×tamp); /* save stuff for the _chain function */ GST_OBJECT_LOCK (visual); diff --git a/ext/ogg/gstoggaviparse.c b/ext/ogg/gstoggaviparse.c index 0d635d212..feba8d93f 100644 --- a/ext/ogg/gstoggaviparse.c +++ b/ext/ogg/gstoggaviparse.c @@ -253,7 +253,7 @@ gst_ogg_avi_parse_setcaps (GstPad * pad, GstCaps * caps) /* set caps */ outcaps = gst_caps_new_empty_simple ("audio/x-vorbis"); - gst_pad_push_event (ogg->srcpad, gst_event_new_caps (outcaps)); + gst_pad_push_event (ogg->srcpad, gst_event_caps_new (outcaps)); gst_caps_unref (outcaps); /* copy header data */ @@ -303,7 +303,7 @@ gst_ogg_avi_parse_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); ret = gst_ogg_avi_parse_setcaps (pad, caps); gst_event_unref (event); break; diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index b0907baea..35984b112 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -958,7 +958,7 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet) segment.start = ogg->push_seek_time_original_target; segment.stop = -1; segment.time = ogg->push_seek_time_original_target; - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); ogg->push_state = PUSH_PLAYING; } else { segment.rate = ogg->segment.rate; @@ -966,7 +966,7 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet) segment.start = start_time; segment.stop = chain->segment_stop; segment.time = segment_time; - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); } GST_PUSH_UNLOCK (ogg); @@ -992,7 +992,7 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet) segment.start = chain->segment_start; segment.stop = chain->segment_stop; segment.time = chain->begin_time; - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); } } @@ -1227,7 +1227,7 @@ gst_ogg_demux_seek_back_after_push_duration_check_unlock (GstOggDemux * ogg) } else { /* If there wasn't, seek back at start to start normal playback */ GST_INFO_OBJECT (ogg, "Seeking back to 0 after duration check"); - event = gst_event_new_seek (1.0, GST_FORMAT_BYTES, + event = gst_event_seek_new (1.0, GST_FORMAT_BYTES, GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, 1, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); if (!gst_pad_push_event (ogg->sinkpad, event)) { @@ -1471,7 +1471,7 @@ gst_ogg_pad_handle_push_mode_state (GstOggPad * pad, ogg_page * page) g_assert (best != -1); ogg->push_bisection_steps[ogg->push_state == PUSH_BISECT2 ? 1 : 0]++; sevent = - gst_event_new_seek (ogg->push_seek_rate, GST_FORMAT_BYTES, + gst_event_seek_new (ogg->push_seek_rate, GST_FORMAT_BYTES, ogg->push_seek_flags, GST_SEEK_TYPE_SET, best, GST_SEEK_TYPE_NONE, -1); @@ -1905,7 +1905,7 @@ gst_ogg_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstSegment segment; - gst_event_copy_segment (event, &segment); + gst_event_segment_copy (event, &segment); if (segment.format == GST_FORMAT_BYTES) { GST_PUSH_LOCK (ogg); @@ -2242,7 +2242,7 @@ gst_ogg_demux_deactivate_current_chain (GstOggDemux * ogg) if (!pad->added) continue; - event = gst_event_new_eos (); + event = gst_event_eos_new (); gst_event_set_seqnum (event, ogg->seqnum); gst_pad_push_event (GST_PAD_CAST (pad), event); @@ -2393,7 +2393,7 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain, gst_ogg_demux_send_event (ogg, event); tags = gst_tag_list_new (GST_TAG_CONTAINER_FORMAT, "Ogg", NULL); - gst_ogg_demux_send_event (ogg, gst_event_new_tag (tags)); + gst_ogg_demux_send_event (ogg, gst_event_tag_new (tags)); } GST_DEBUG_OBJECT (ogg, "starting chain"); @@ -2409,7 +2409,7 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain, if (pad->map.taglist) { GST_DEBUG_OBJECT (ogg, "pushing tags"); gst_pad_push_event (GST_PAD_CAST (pad), - gst_event_new_tag (pad->map.taglist)); + gst_event_tag_new (pad->map.taglist)); pad->map.taglist = NULL; } @@ -2822,7 +2822,7 @@ gst_ogg_demux_perform_seek_pull (GstOggDemux * ogg, GstEvent * event) if (event) { GST_DEBUG_OBJECT (ogg, "seek with event"); - gst_event_parse_seek (event, &rate, &format, &flags, + gst_event_seek_parse (event, &rate, &format, &flags, &cur_type, &cur, &stop_type, &stop); /* we can only seek on time */ @@ -2852,7 +2852,7 @@ gst_ogg_demux_perform_seek_pull (GstOggDemux * ogg, GstEvent * event) if (flush) { gint i; - tevent = gst_event_new_flush_start (); + tevent = gst_event_flush_start_new (); gst_event_set_seqnum (tevent, seqnum); gst_event_ref (tevent); @@ -2894,7 +2894,7 @@ gst_ogg_demux_perform_seek_pull (GstOggDemux * ogg, GstEvent * event) /* we need to stop flushing on the srcpad as we're going to use it * next. We can do this as we have the STREAM lock now. */ if (flush) { - tevent = gst_event_new_flush_stop (TRUE); + tevent = gst_event_flush_stop_new (TRUE); gst_event_set_seqnum (tevent, seqnum); gst_pad_push_event (ogg->sinkpad, tevent); } @@ -2935,7 +2935,7 @@ gst_ogg_demux_perform_seek_pull (GstOggDemux * ogg, GstEvent * event) /* we have to send the flush to the old chain, not the new one */ if (flush) { - tevent = gst_event_new_flush_stop (TRUE); + tevent = gst_event_flush_stop_new (TRUE); gst_event_set_seqnum (tevent, seqnum); gst_ogg_demux_send_event (ogg, tevent); } @@ -2982,7 +2982,7 @@ gst_ogg_demux_perform_seek_pull (GstOggDemux * ogg, GstEvent * event) segment.start = start; segment.stop = position; } - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); gst_event_set_seqnum (event, seqnum); if (chain != ogg->current_chain) { @@ -3053,7 +3053,7 @@ gst_ogg_demux_get_duration_push (GstOggDemux * ogg, int flags) "Getting duration, seeking near the end, to %" G_GINT64_FORMAT, position); ogg->push_state = PUSH_DURATION; /* do not read the last byte */ - sevent = gst_event_new_seek (1.0, GST_FORMAT_BYTES, flags, GST_SEEK_TYPE_SET, + sevent = gst_event_seek_new (1.0, GST_FORMAT_BYTES, flags, GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_SET, ogg->push_byte_length - 1); res = gst_pad_push_event (ogg->sinkpad, sevent); if (res) { @@ -3129,7 +3129,7 @@ gst_ogg_demux_perform_seek_push (GstOggDemux * ogg, GstEvent * event) GST_DEBUG_OBJECT (ogg, "Push mode seek request received"); - gst_event_parse_seek (event, &rate, &format, &flags, + gst_event_seek_parse (event, &rate, &format, &flags, &start_type, &start, &stop_type, &stop); if (format != GST_FORMAT_TIME) { @@ -3254,7 +3254,7 @@ gst_ogg_demux_perform_seek_push (GstOggDemux * ogg, GstEvent * event) ogg->push_mode_seek_delayed_event = NULL; ogg->push_bisection_steps[0] = 1; ogg->push_bisection_steps[1] = 0; - sevent = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, + sevent = gst_event_seek_new (rate, GST_FORMAT_BYTES, flags, start_type, best, GST_SEEK_TYPE_NONE, -1); GST_PUSH_UNLOCK (ogg); @@ -3820,7 +3820,7 @@ gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page) segment.start = start; segment.stop = chain->segment_stop; segment.time = chain->begin_time; - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); gst_event_set_seqnum (event, ogg->seqnum); GST_DEBUG_OBJECT (ogg, @@ -4258,13 +4258,13 @@ pause: } else { /* normal playback, send EOS to all linked pads */ GST_LOG_OBJECT (ogg, "Sending EOS, at end of stream"); - event = gst_event_new_eos (); + event = gst_event_eos_new (); } } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) { GST_ELEMENT_ERROR (ogg, STREAM, FAILED, (_("Internal data stream error.")), ("stream stopped, reason %s", reason)); - event = gst_event_new_eos (); + event = gst_event_eos_new (); } /* For wrong-state we still want to pause the task and stop diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 283505c6f..470d8541b 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -317,7 +317,7 @@ gst_ogg_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { const GstSegment *segment; - gst_event_parse_segment (event, &segment); + gst_event_segment_parse (event, &segment); /* We don't support non time NEWSEGMENT events */ if (segment->format != GST_FORMAT_TIME) { @@ -336,7 +336,7 @@ gst_ogg_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) case GST_EVENT_TAG:{ GstTagList *tags; - gst_event_parse_tag (event, &tags); + gst_event_tag_parse (event, &tags); tags = gst_tag_list_merge (ogg_pad->tags, tags, GST_TAG_MERGE_APPEND); if (ogg_pad->tags) gst_tag_list_free (ogg_pad->tags); @@ -1625,7 +1625,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best) GST_TIME_FORMAT, GST_TIME_ARGS (ogg_mux->next_ts)); } else { /* no pad to pull on, send EOS */ - gst_pad_push_event (ogg_mux->srcpad, gst_event_new_eos ()); + gst_pad_push_event (ogg_mux->srcpad, gst_event_eos_new ()); return GST_FLOW_WRONG_STATE; } } @@ -1915,7 +1915,7 @@ gst_ogg_mux_collected (GstCollectPads2 * pads, GstOggMux * ogg_mux) ret = gst_ogg_mux_process_best_pad (ogg_mux, best); if (best->eos && all_pads_eos (pads)) { - gst_pad_push_event (ogg_mux->srcpad, gst_event_new_eos ()); + gst_pad_push_event (ogg_mux->srcpad, gst_event_eos_new ()); return GST_FLOW_EOS; } diff --git a/ext/ogg/gstoggparse.c b/ext/ogg/gstoggparse.c index eb8e0b988..b813520ff 100644 --- a/ext/ogg/gstoggparse.c +++ b/ext/ogg/gstoggparse.c @@ -700,7 +700,7 @@ gst_ogg_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) return result; failure: - gst_pad_push_event (GST_PAD (ogg->srcpad), gst_event_new_eos ()); + gst_pad_push_event (GST_PAD (ogg->srcpad), gst_event_eos_new ()); return GST_FLOW_ERROR; } diff --git a/ext/ogg/gstogmparse.c b/ext/ogg/gstogmparse.c index 6790937f7..cdfe06e50 100644 --- a/ext/ogg/gstogmparse.c +++ b/ext/ogg/gstogmparse.c @@ -657,7 +657,7 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size) GstTagList *tags; tags = gst_tag_list_new (GST_TAG_SUBTITLE_CODEC, "Ogm", NULL); - gst_pad_push_event (ogm->srcpad, gst_event_new_tag (tags)); + gst_pad_push_event (ogm->srcpad, gst_event_tag_new (tags)); } } @@ -699,7 +699,7 @@ gst_ogm_parse_comment_packet (GstOgmParse * ogm, GstBuffer * buf) if (tags) { GST_DEBUG_OBJECT (ogm, "tags = %" GST_PTR_FORMAT, tags); - gst_pad_push_event (ogm->srcpad, gst_event_new_tag (tags)); + gst_pad_push_event (ogm->srcpad, gst_event_tag_new (tags)); } else { GST_DEBUG_OBJECT (ogm, "failed to extract tags from vorbis comment"); } diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index df036aee2..0bb09c4ad 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -768,7 +768,7 @@ gst_base_text_overlay_setcaps (GstBaseTextOverlay * overlay, GstCaps * caps) overlay->width = GST_VIDEO_INFO_WIDTH (&info); overlay->height = GST_VIDEO_INFO_HEIGHT (&info); - ret = gst_pad_push_event (overlay->srcpad, gst_event_new_caps (caps)); + ret = gst_pad_push_event (overlay->srcpad, gst_event_caps_new (caps)); if (ret) { GST_OBJECT_LOCK (overlay); @@ -1043,11 +1043,11 @@ gst_base_text_overlay_src_event (GstPad * pad, GstObject * parent, GST_DEBUG_OBJECT (overlay, "seek received, driving from here"); - gst_event_parse_seek (event, NULL, NULL, &flags, NULL, NULL, NULL, NULL); + gst_event_seek_parse (event, NULL, NULL, &flags, NULL, NULL, NULL, NULL); /* Flush downstream, only for flushing seek */ if (flags & GST_SEEK_FLAG_FLUSH) - gst_pad_push_event (overlay->srcpad, gst_event_new_flush_start ()); + gst_pad_push_event (overlay->srcpad, gst_event_flush_start_new ()); /* Mark ourself as flushing, unblock chains */ GST_OBJECT_LOCK (overlay); @@ -2161,7 +2161,7 @@ gst_base_text_overlay_text_event (GstPad * pad, GstObject * parent, { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); ret = gst_base_text_overlay_setcaps_txt (overlay, caps); gst_event_unref (event); break; @@ -2172,7 +2172,7 @@ gst_base_text_overlay_text_event (GstPad * pad, GstObject * parent, overlay->text_eos = FALSE; - gst_event_parse_segment (event, &segment); + gst_event_segment_parse (event, &segment); if (segment->format == GST_FORMAT_TIME) { GST_OBJECT_LOCK (overlay); @@ -2250,7 +2250,7 @@ gst_base_text_overlay_video_event (GstPad * pad, GstObject * parent, { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); ret = gst_base_text_overlay_setcaps (overlay, caps); gst_event_unref (event); break; @@ -2261,7 +2261,7 @@ gst_base_text_overlay_video_event (GstPad * pad, GstObject * parent, GST_DEBUG_OBJECT (overlay, "received new segment"); - gst_event_parse_segment (event, &segment); + gst_event_segment_parse (event, &segment); if (segment->format == GST_FORMAT_TIME) { GST_DEBUG_OBJECT (overlay, "VIDEO SEGMENT now: %" GST_SEGMENT_FORMAT, diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c index a2b0b7c17..95d389e90 100644 --- a/ext/pango/gsttextrender.c +++ b/ext/pango/gsttextrender.c @@ -371,7 +371,7 @@ gst_text_render_src_setcaps (GstTextRender * render, GstCaps * caps) gst_text_render_check_argb (render); - ret = gst_pad_push_event (render->srcpad, gst_event_new_caps (caps)); + ret = gst_pad_push_event (render->srcpad, gst_event_caps_new (caps)); return ret; } diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index dbdc9925a..be361c2ff 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -529,7 +529,7 @@ theora_dec_src_event (GstPad * pad, GstObject * parent, GstEvent * event) gint64 tcur, tstop; guint32 seqnum; - gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur, + gst_event_seek_parse (event, &rate, &format, &flags, &cur_type, &cur, &stop_type, &stop); seqnum = gst_event_get_seqnum (event); gst_event_unref (event); @@ -547,7 +547,7 @@ theora_dec_src_event (GstPad * pad, GstObject * parent, GstEvent * event) goto convert_error; /* then seek with time on the peer */ - real_seek = gst_event_new_seek (rate, GST_FORMAT_TIME, + real_seek = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, cur_type, tcur, stop_type, tstop); gst_event_set_seqnum (real_seek, seqnum); @@ -560,7 +560,7 @@ theora_dec_src_event (GstPad * pad, GstObject * parent, GstEvent * event) GstClockTimeDiff diff; GstClockTime timestamp; - gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); + gst_event_qos_parse (event, NULL, &proportion, &diff, ×tamp); /* we cannot randomly skip frame decoding since we don't have * B frames. we can however use the timestamp and diff to not @@ -617,7 +617,7 @@ theora_dec_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { const GstSegment *segment; - gst_event_parse_segment (event, &segment); + gst_event_segment_parse (event, &segment); /* we need TIME format */ if (segment->format != GST_FORMAT_TIME) @@ -642,7 +642,7 @@ theora_dec_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); ret = theora_dec_setcaps (dec, caps); gst_event_unref (event); break; @@ -975,7 +975,7 @@ theora_handle_type_packet (GstTheoraDec * dec, ogg_packet * packet) } if (dec->tags) { - gst_pad_push_event (dec->srcpad, gst_event_new_tag (dec->tags)); + gst_pad_push_event (dec->srcpad, gst_event_tag_new (dec->tags)); dec->tags = NULL; } diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index 2797c02bb..4710bee07 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -910,14 +910,14 @@ theora_enc_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); res = theora_enc_sink_setcaps (enc, caps); gst_event_unref (event); break; } case GST_EVENT_SEGMENT: { - gst_event_copy_segment (event, &enc->segment); + gst_event_segment_copy (event, &enc->segment); res = gst_pad_push_event (enc->srcpad, event); break; diff --git a/ext/vorbis/gstvorbisdec.c b/ext/vorbis/gstvorbisdec.c index 45c840abb..eec14d3a0 100644 --- a/ext/vorbis/gstvorbisdec.c +++ b/ext/vorbis/gstvorbisdec.c @@ -186,7 +186,7 @@ vorbis_dec_src_event (GstPad * pad, GstEvent * event) gint64 tcur, tstop; guint32 seqnum; - gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur, + gst_event_seek_parse (event, &rate, &format, &flags, &cur_type, &cur, &stop_type, &stop); seqnum = gst_event_get_seqnum (event); gst_event_unref (event); @@ -199,7 +199,7 @@ vorbis_dec_src_event (GstPad * pad, GstEvent * event) goto convert_error; /* then seek with time on the peer */ - real_seek = gst_event_new_seek (rate, GST_FORMAT_TIME, + real_seek = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, cur_type, tcur, stop_type, tstop); gst_event_set_seqnum (real_seek, seqnum); @@ -339,7 +339,7 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet) if (vd->initialized) { gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (vd), - gst_event_new_tag (vd->taglist)); + gst_event_tag_new (vd->taglist)); vd->taglist = NULL; } else { /* Only post them as messages for the time being. * @@ -374,7 +374,7 @@ vorbis_handle_type_packet (GstVorbisDec * vd) if (vd->taglist) { /* The tags have already been sent on the bus as messages. */ gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (vd), - gst_event_new_tag (vd->taglist)); + gst_event_tag_new (vd->taglist)); vd->taglist = NULL; } return GST_FLOW_OK; diff --git a/ext/vorbis/gstvorbisenc.c b/ext/vorbis/gstvorbisenc.c index 5a13ffd9e..2312fad92 100644 --- a/ext/vorbis/gstvorbisenc.c +++ b/ext/vorbis/gstvorbisenc.c @@ -596,7 +596,7 @@ gst_vorbis_enc_sink_event (GstAudioEncoder * enc, GstEvent * event) if (vorbisenc->tags) { GstTagList *list; - gst_event_parse_tag (event, &list); + gst_event_tag_parse (event, &list); gst_tag_list_insert (vorbisenc->tags, list, gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (vorbisenc))); } else { diff --git a/gst-libs/gst/audio/gstaudiocdsrc.c b/gst-libs/gst/audio/gstaudiocdsrc.c index 4909e0617..00722752b 100644 --- a/gst-libs/gst/audio/gstaudiocdsrc.c +++ b/gst-libs/gst/audio/gstaudiocdsrc.c @@ -796,7 +796,7 @@ gst_audio_cd_src_handle_track_seek (GstAudioCdSrc * src, gdouble rate, /* send fake segment seek event in TIME format to * base class, which will hopefully handle the rest */ - event = gst_event_new_seek (rate, GST_FORMAT_TIME, flags, start_type, + event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, start_type, start_time, stop_type, stop_time); return GST_BASE_SRC_CLASS (parent_class)->event (basesrc, event); @@ -835,7 +835,7 @@ gst_audio_cd_src_handle_track_seek (GstAudioCdSrc * src, gdouble rate, /* send fake segment seek event in TIME format to * base class (so we get a newsegment etc.) */ - event = gst_event_new_seek (rate, GST_FORMAT_TIME, flags, + event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, -1); return GST_BASE_SRC_CLASS (parent_class)->event (basesrc, event); @@ -862,7 +862,7 @@ gst_audio_cd_src_handle_event (GstBaseSrc * basesrc, GstEvent * event) break; } - gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start, + gst_event_seek_parse (event, &rate, &format, &flags, &start_type, &start, &stop_type, &stop); if (format == sector_format) { @@ -978,7 +978,7 @@ gst_audio_cd_src_uri_set_uri (GstURIHandler * handler, const gchar * uri, GST_OBJECT_UNLOCK (src); gst_pad_send_event (GST_BASE_SRC_PAD (src), - gst_event_new_seek (1.0, track_format, GST_SEEK_FLAG_FLUSH, + gst_event_seek_new (1.0, track_format, GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, src->uri_track - 1, GST_SEEK_TYPE_NONE, -1)); } else { /* seek will be done in start() */ @@ -1568,7 +1568,7 @@ gst_audio_cd_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer) tags = gst_tag_list_merge (src->tags, src->tracks[src->cur_track].tags, GST_TAG_MERGE_REPLACE); GST_LOG_OBJECT (src, "announcing tags: %" GST_PTR_FORMAT, tags); - gst_pad_push_event (GST_BASE_SRC_PAD (src), gst_event_new_tag (tags)); + gst_pad_push_event (GST_BASE_SRC_PAD (src), gst_event_tag_new (tags)); src->prev_track = src->cur_track; gst_audio_cd_src_update_duration (src); diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index 99cffadef..d0ae10f0e 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -872,7 +872,7 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf, if (gst_tag_list_is_empty (priv->taglist)) { gst_tag_list_free (priv->taglist); } else { - gst_pad_push_event (dec->srcpad, gst_event_new_tag (priv->taglist)); + gst_pad_push_event (dec->srcpad, gst_event_tag_new (priv->taglist)); } priv->taglist = NULL; } @@ -1408,7 +1408,7 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event) GstSegment seg; GST_AUDIO_DECODER_STREAM_LOCK (dec); - gst_event_copy_segment (event, &seg); + gst_event_segment_copy (event, &seg); if (seg.format == GST_FORMAT_TIME) { GST_DEBUG_OBJECT (dec, "received TIME SEGMENT %" GST_SEGMENT_FORMAT, @@ -1433,7 +1433,7 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event) seg.stop = GST_CLOCK_TIME_NONE; /* replace event */ gst_event_unref (event); - event = gst_event_new_segment (&seg); + event = gst_event_segment_new (&seg); } else { GST_DEBUG_OBJECT (dec, "unsupported format; ignoring"); GST_AUDIO_DECODER_STREAM_UNLOCK (dec); @@ -1511,7 +1511,7 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); gst_audio_decoder_sink_setcaps (dec, caps); gst_event_unref (event); handled = TRUE; @@ -1583,7 +1583,7 @@ gst_audio_decoder_do_seek (GstAudioDecoder * dec, GstEvent * event) GstSegment seek_segment; guint32 seqnum; - gst_event_parse_seek (event, &rate, &format, &flags, &start_type, + gst_event_seek_parse (event, &rate, &format, &flags, &start_type, &start_time, &end_type, &end_time); /* we'll handle plain open-ended flushing seeks with the simple approach */ @@ -1620,7 +1620,7 @@ gst_audio_decoder_do_seek (GstAudioDecoder * dec, GstEvent * event) } seqnum = gst_event_get_seqnum (event); - event = gst_event_new_seek (1.0, GST_FORMAT_BYTES, flags, + event = gst_event_seek_new (1.0, GST_FORMAT_BYTES, flags, GST_SEEK_TYPE_SET, start, GST_SEEK_TYPE_NONE, -1); gst_event_set_seqnum (event, seqnum); @@ -1652,7 +1652,7 @@ gst_audio_decoder_src_event (GstPad * pad, GstObject * parent, GstEvent * event) gint64 tcur, tstop; guint32 seqnum; - gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur, + gst_event_seek_parse (event, &rate, &format, &flags, &cur_type, &cur, &stop_type, &stop); seqnum = gst_event_get_seqnum (event); @@ -1678,7 +1678,7 @@ gst_audio_decoder_src_event (GstPad * pad, GstObject * parent, GstEvent * event) goto convert_error; /* then seek with time on the peer */ - event = gst_event_new_seek (rate, GST_FORMAT_TIME, + event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, cur_type, tcur, stop_type, tstop); gst_event_set_seqnum (event, seqnum); diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 45f130ac5..5391fff0e 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -528,7 +528,7 @@ gst_audio_encoder_finish_frame (GstAudioEncoder * enc, GstBuffer * buf, caps); #endif GST_DEBUG_OBJECT (enc, "sending tags %" GST_PTR_FORMAT, tags); - gst_pad_push_event (enc->srcpad, gst_event_new_tag (tags)); + gst_pad_push_event (enc->srcpad, gst_event_tag_new (tags)); } /* remove corresponding samples from input */ @@ -1230,7 +1230,7 @@ gst_audio_encoder_sink_eventfunc (GstAudioEncoder * enc, GstEvent * event) { GstSegment seg; - gst_event_copy_segment (event, &seg); + gst_event_segment_copy (event, &seg); if (seg.format == GST_FORMAT_TIME) { GST_DEBUG_OBJECT (enc, "received TIME SEGMENT %" GST_SEGMENT_FORMAT, @@ -1281,7 +1281,7 @@ gst_audio_encoder_sink_eventfunc (GstAudioEncoder * enc, GstEvent * event) { GstTagList *tags; - gst_event_parse_tag (event, &tags); + gst_event_tag_parse (event, &tags); tags = gst_tag_list_copy (tags); gst_event_unref (event); @@ -1297,7 +1297,7 @@ gst_audio_encoder_sink_eventfunc (GstAudioEncoder * enc, GstEvent * event) gst_tag_list_remove_tag (tags, GST_TAG_MINIMUM_BITRATE); gst_tag_list_remove_tag (tags, GST_TAG_ENCODER); gst_tag_list_remove_tag (tags, GST_TAG_ENCODER_VERSION); - event = gst_event_new_tag (tags); + event = gst_event_tag_new (tags); GST_AUDIO_ENCODER_STREAM_LOCK (enc); enc->priv->pending_events = @@ -1311,7 +1311,7 @@ gst_audio_encoder_sink_eventfunc (GstAudioEncoder * enc, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); gst_audio_encoder_sink_setcaps (enc, caps); gst_event_unref (event); handled = TRUE; diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index f9745853b..3a576397f 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -418,7 +418,7 @@ _event_probe (GstPad * pad, GstPadProbeInfo * info, PrivateStream * ps) if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) { GstTagList *tl = NULL, *tmp; - gst_event_parse_tag (event, &tl); + gst_event_tag_parse (event, &tl); GST_DEBUG_OBJECT (pad, "tags %" GST_PTR_FORMAT, tl); DISCO_LOCK (ps->dc); /* If preroll is complete, drop these tags - the collected information is diff --git a/gst-libs/gst/rtp/gstrtpbasedepayload.c b/gst-libs/gst/rtp/gstrtpbasedepayload.c index 498671886..135713a48 100644 --- a/gst-libs/gst/rtp/gstrtpbasedepayload.c +++ b/gst-libs/gst/rtp/gstrtpbasedepayload.c @@ -396,7 +396,7 @@ gst_rtp_base_depayload_handle_event (GstRTPBaseDepayload * filter, { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); res = gst_rtp_base_depayload_setcaps (filter, caps); forward = FALSE; @@ -404,7 +404,7 @@ gst_rtp_base_depayload_handle_event (GstRTPBaseDepayload * filter, } case GST_EVENT_SEGMENT: { - gst_event_copy_segment (event, &filter->segment); + gst_event_segment_copy (event, &filter->segment); /* don't pass the event downstream, we generate our own segment including * the NTP time and other things we receive in caps */ forward = FALSE; @@ -487,7 +487,7 @@ create_segment_event (GstRTPBaseDepayload * filter, gboolean update, segment.time = priv->npt_start; segment.position = position; - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); return event; } diff --git a/gst-libs/gst/rtp/gstrtpbasepayload.c b/gst-libs/gst/rtp/gstrtpbasepayload.c index dc2d6093f..541a25775 100644 --- a/gst-libs/gst/rtp/gstrtpbasepayload.c +++ b/gst-libs/gst/rtp/gstrtpbasepayload.c @@ -358,7 +358,7 @@ gst_rtp_base_payload_sink_event_default (GstRTPBasePayload * rtpbasepayload, GstRTPBasePayloadClass *rtpbasepayload_class; GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); GST_DEBUG_OBJECT (rtpbasepayload, "setting caps %" GST_PTR_FORMAT, caps); rtpbasepayload_class = GST_RTP_BASE_PAYLOAD_GET_CLASS (rtpbasepayload); @@ -373,7 +373,7 @@ gst_rtp_base_payload_sink_event_default (GstRTPBasePayload * rtpbasepayload, GstSegment *segment; segment = &rtpbasepayload->segment; - gst_event_copy_segment (event, segment); + gst_event_segment_copy (event, segment); rtpbasepayload->priv->base_offset = GST_BUFFER_OFFSET_NONE; diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c index 04e9c463a..e98f56ce5 100644 --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c @@ -696,7 +696,7 @@ gst_tag_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) break; case GST_EVENT_SEGMENT: { - gst_event_copy_segment (event, &demux->priv->segment); + gst_event_segment_copy (event, &demux->priv->segment); demux->priv->need_newseg = TRUE; gst_event_unref (event); @@ -763,7 +763,7 @@ gst_tag_demux_srcpad_event (GstPad * pad, GstObject * parent, GstEvent * event) GstSeekFlags flags; gint64 cur, stop; - gst_event_parse_seek (event, &rate, &format, &flags, + gst_event_seek_parse (event, &rate, &format, &flags, &cur_type, &cur, &stop_type, &stop); if (format == GST_FORMAT_BYTES && @@ -806,7 +806,7 @@ gst_tag_demux_srcpad_event (GstPad * pad, GstObject * parent, GstEvent * event) default: break; } - upstream = gst_event_new_seek (rate, format, flags, + upstream = gst_event_seek_new (rate, format, flags, cur_type, cur, stop_type, stop); res = gst_pad_push_event (tagdemux->priv->sinkpad, upstream); } @@ -1406,7 +1406,7 @@ gst_tag_demux_send_tag_event (GstTagDemux * demux) gst_tag_list_copy (demux->priv->parsed_tags))); if (merged) { - GstEvent *event = gst_event_new_tag (merged); + GstEvent *event = gst_event_tag_new (merged); GST_EVENT_TIMESTAMP (event) = 0; GST_DEBUG_OBJECT (demux, "Sending tag event on src pad"); @@ -1432,7 +1432,7 @@ gst_tag_demux_send_new_segment (GstTagDemux * tagdemux) /* Can't adjust segments in non-BYTES formats */ if (tagdemux->priv->segment.format != GST_FORMAT_BYTES) { - event = gst_event_new_segment (seg); + event = gst_event_segment_new (seg); return gst_pad_push_event (tagdemux->priv->srcpad, event); } @@ -1488,7 +1488,7 @@ gst_tag_demux_send_new_segment (GstTagDemux * tagdemux) newseg.start = start; newseg.stop = stop; newseg.position = position; - event = gst_event_new_segment (&newseg); + event = gst_event_segment_new (&newseg); return gst_pad_push_event (tagdemux->priv->srcpad, event); } diff --git a/gst-libs/gst/tag/gsttagmux.c b/gst-libs/gst/tag/gsttagmux.c index 3f94708bc..eab147068 100644 --- a/gst-libs/gst/tag/gsttagmux.c +++ b/gst-libs/gst/tag/gsttagmux.c @@ -237,11 +237,11 @@ gst_tag_mux_render_start_tag (GstTagMux * mux) /* Send newsegment event from byte position 0, so the tag really gets * written to the start of the file, independent of the upstream segment */ gst_segment_init (&segment, GST_FORMAT_BYTES); - gst_pad_push_event (mux->priv->srcpad, gst_event_new_segment (&segment)); + gst_pad_push_event (mux->priv->srcpad, gst_event_segment_new (&segment)); /* Send an event about the new tags to downstream elements */ - /* gst_event_new_tag takes ownership of the list, so use a copy */ - event = gst_event_new_tag (gst_tag_list_copy (taglist)); + /* gst_event_tag_new takes ownership of the list, so use a copy */ + event = gst_event_tag_new (gst_tag_list_copy (taglist)); gst_pad_push_event (mux->priv->srcpad, event); GST_BUFFER_OFFSET (buffer) = 0; @@ -293,7 +293,7 @@ gst_tag_mux_render_end_tag (GstTagMux * mux) independent of whatever new segment events upstream has sent us */ gst_segment_init (&segment, GST_FORMAT_BYTES); segment.start = mux->priv->max_offset; - gst_pad_push_event (mux->priv->srcpad, gst_event_new_segment (&segment)); + gst_pad_push_event (mux->priv->srcpad, gst_event_segment_new (&segment)); GST_BUFFER_OFFSET (buffer) = mux->priv->max_offset; ret = gst_pad_push (mux->priv->srcpad, buffer); @@ -314,7 +314,7 @@ gst_tag_mux_adjust_event_offsets (GstTagMux * mux, { GstSegment segment; - gst_event_copy_segment ((GstEvent *) newsegment_event, &segment); + gst_event_segment_copy ((GstEvent *) newsegment_event, &segment); g_assert (segment.format == GST_FORMAT_BYTES); @@ -330,7 +330,7 @@ gst_tag_mux_adjust_event_offsets (GstTagMux * mux, " (delta = +%" G_GSIZE_FORMAT ")", segment.start, segment.stop, segment.time, mux->priv->start_tag_size); - return gst_event_new_segment (&segment); + return gst_event_segment_new (&segment); } static GstFlowReturn @@ -360,7 +360,7 @@ gst_tag_mux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) gst_event_unref (mux->priv->newsegment_ev); mux->priv->newsegment_ev = NULL; - gst_event_copy_segment (newseg, &segment); + gst_event_segment_copy (newseg, &segment); gst_pad_push_event (mux->priv->srcpad, newseg); mux->priv->current_offset = segment.start; @@ -406,7 +406,7 @@ gst_tag_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) case GST_EVENT_TAG:{ GstTagList *tags; - gst_event_parse_tag (event, &tags); + gst_event_tag_parse (event, &tags); GST_INFO_OBJECT (mux, "Got tag event: %" GST_PTR_FORMAT, tags); @@ -429,7 +429,7 @@ gst_tag_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstSegment segment; - gst_event_copy_segment (event, &segment); + gst_event_segment_copy (event, &segment); if (segment.format != GST_FORMAT_BYTES) { GST_WARNING_OBJECT (mux, "dropping newsegment event in %s format", diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index c2bdff26f..0e5a2b6e1 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -565,7 +565,7 @@ forward_event_func (const GValue * val, GValue * ret, EventData * data) /* quick hack to unflush the pads, ideally we need a way to just unflush * this single collect pad */ if (data->flush) - gst_pad_send_event (pad, gst_event_new_flush_stop (TRUE)); + gst_pad_send_event (pad, gst_event_flush_stop_new (TRUE)); } else { g_value_set_boolean (ret, TRUE); GST_LOG_OBJECT (pad, "Sent event %p (%s).", @@ -649,7 +649,7 @@ gst_adder_src_event (GstPad * pad, GstObject * parent, GstEvent * event) gboolean flush; /* parse the seek parameters */ - gst_event_parse_seek (event, &rate, NULL, &flags, &curtype, + gst_event_seek_parse (event, &rate, NULL, &flags, &curtype, &cur, &endtype, &end); if ((curtype != GST_SEEK_TYPE_NONE) && (curtype != GST_SEEK_TYPE_SET)) { @@ -674,7 +674,7 @@ gst_adder_src_event (GstPad * pad, GstObject * parent, GstEvent * event) /* flushing seek, start flush downstream, the flush will be done * when all pads received a FLUSH_STOP. */ - gst_pad_push_event (adder->srcpad, gst_event_new_flush_start ()); + gst_pad_push_event (adder->srcpad, gst_event_flush_start_new ()); /* We can't send FLUSH_STOP here since upstream could start pushing data * after we unlock adder->collect. @@ -719,7 +719,7 @@ gst_adder_src_event (GstPad * pad, GstObject * parent, GstEvent * event) if (g_atomic_int_compare_and_exchange (&adder->flush_stop_pending, TRUE, FALSE)) { GST_DEBUG_OBJECT (adder, "pending flush stop"); - gst_pad_push_event (adder->srcpad, gst_event_new_flush_stop (TRUE)); + gst_pad_push_event (adder->srcpad, gst_event_flush_stop_new (TRUE)); } break; } @@ -760,7 +760,7 @@ gst_adder_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); ret = gst_adder_setcaps (adder, pad, caps); gst_event_unref (event); @@ -1072,7 +1072,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data) if (g_atomic_int_compare_and_exchange (&adder->flush_stop_pending, TRUE, FALSE)) { GST_DEBUG_OBJECT (adder, "pending flush stop"); - gst_pad_push_event (adder->srcpad, gst_event_new_flush_stop (TRUE)); + gst_pad_push_event (adder->srcpad, gst_event_flush_stop_new (TRUE)); } /* get available bytes for reading, this can be 0 which could mean empty @@ -1183,7 +1183,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data) * event. We also adjust offset & timestamp acordingly. * This basically ignores all newsegments sent by upstream. */ - event = gst_event_new_segment (&adder->segment); + event = gst_event_segment_new (&adder->segment); if (adder->segment.rate > 0.0) { adder->segment.position = adder->segment.start; @@ -1268,7 +1268,7 @@ not_negotiated: eos: { GST_DEBUG_OBJECT (adder, "no data available, must be EOS"); - gst_pad_push_event (adder->srcpad, gst_event_new_eos ()); + gst_pad_push_event (adder->srcpad, gst_event_eos_new ()); return GST_FLOW_EOS; } } diff --git a/gst/audiorate/gstaudiorate.c b/gst/audiorate/gstaudiorate.c index 3e7d07686..85f1ab349 100644 --- a/gst/audiorate/gstaudiorate.c +++ b/gst/audiorate/gstaudiorate.c @@ -283,7 +283,7 @@ gst_audio_rate_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); if ((res = gst_audio_rate_setcaps (audiorate, caps))) { res = gst_pad_push_event (audiorate->srcpad, event); } else { @@ -298,7 +298,7 @@ gst_audio_rate_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) break; case GST_EVENT_SEGMENT: { - gst_event_copy_segment (event, &audiorate->sink_segment); + gst_event_segment_copy (event, &audiorate->sink_segment); GST_DEBUG_OBJECT (audiorate, "handle NEWSEGMENT"); #if 0 diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c index 6a5988407..3fd3f2608 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.c +++ b/gst/audiotestsrc/gstaudiotestsrc.c @@ -1120,7 +1120,7 @@ gst_audio_test_src_fill (GstBaseSrc * basesrc, guint64 offset, eclass = GST_ELEMENT_CLASS (parent_class); if (eclass->send_event) eclass->send_event (GST_ELEMENT_CAST (basesrc), - gst_event_new_tag (taglist)); + gst_event_tag_new (taglist)); src->tags_pushed = TRUE; } diff --git a/gst/encoding/gstsmartencoder.c b/gst/encoding/gstsmartencoder.c index ec57f7255..0771c612d 100644 --- a/gst/encoding/gstsmartencoder.c +++ b/gst/encoding/gstsmartencoder.c @@ -200,9 +200,9 @@ gst_smart_encoder_reencode_gop (GstSmartEncoder * smart_encoder) GST_INFO ("Pushing Flush start/stop to clean decoder/encoder"); gst_pad_push_event (smart_encoder->internal_srcpad, - gst_event_new_flush_start ()); + gst_event_flush_start_new ()); gst_pad_push_event (smart_encoder->internal_srcpad, - gst_event_new_flush_stop (TRUE)); + gst_event_flush_stop_new (TRUE)); /* push newsegment */ GST_INFO ("Pushing newsegment %" GST_PTR_FORMAT, smart_encoder->newsegment); @@ -228,7 +228,7 @@ gst_smart_encoder_reencode_gop (GstSmartEncoder * smart_encoder) } } else { GST_INFO ("Pushing out EOS to flush out decoder/encoder"); - gst_pad_push_event (smart_encoder->internal_srcpad, gst_event_new_eos ()); + gst_pad_push_event (smart_encoder->internal_srcpad, gst_event_eos_new ()); } /* Activate elements */ @@ -354,7 +354,7 @@ smart_encoder_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) break; case GST_EVENT_SEGMENT: { - gst_event_copy_segment (event, smart_encoder->segment); + gst_event_segment_copy (event, smart_encoder->segment); GST_DEBUG_OBJECT (smart_encoder, "segment: %" GST_SEGMENT_FORMAT, smart_encoder->segment); diff --git a/gst/encoding/gststreamcombiner.c b/gst/encoding/gststreamcombiner.c index 5cf762993..059d114b0 100644 --- a/gst/encoding/gststreamcombiner.c +++ b/gst/encoding/gststreamcombiner.c @@ -114,7 +114,7 @@ gst_stream_combiner_sink_event (GstPad * pad, GstObject * parent, case GST_EVENT_CUSTOM_DOWNSTREAM: if (gst_event_has_name (event, "stream-switching-eos")) { gst_event_unref (event); - event = gst_event_new_eos (); + event = gst_event_eos_new (); } break; default: diff --git a/gst/encoding/gststreamsplitter.c b/gst/encoding/gststreamsplitter.c index a7d337628..a848d3006 100644 --- a/gst/encoding/gststreamsplitter.c +++ b/gst/encoding/gststreamsplitter.c @@ -161,7 +161,7 @@ gst_stream_splitter_sink_event (GstPad * pad, GstObject * parent, { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); res = gst_stream_splitter_sink_setcaps (pad, caps); store = TRUE; @@ -222,7 +222,7 @@ gst_stream_splitter_sink_event (GstPad * pad, GstObject * parent, * before our custom one (which will be converted back to and EOS * in the streamcombiner) */ if (eos) - gst_pad_push_event (srcpad, gst_event_new_eos ()); + gst_pad_push_event (srcpad, gst_event_eos_new ()); gst_event_ref (event); res = gst_pad_push_event (srcpad, event); STREAMS_LOCK (stream_splitter); diff --git a/gst/gdp/gstgdppay.c b/gst/gdp/gstgdppay.c index b9c3cbc78..dd5fa6d0f 100644 --- a/gst/gdp/gstgdppay.c +++ b/gst/gdp/gstgdppay.c @@ -460,7 +460,7 @@ gst_gdp_pay_reset_streamheader (GstGDPPay * this) GstSegment segment; gst_segment_init (&segment, GST_FORMAT_BYTES); - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); GST_DEBUG_OBJECT (this, "Sending out new_segment event %p", event); if (!gst_pad_push_event (this->srcpad, event)) { @@ -571,7 +571,7 @@ gst_gdp_pay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) GST_WARNING_OBJECT (this, "did not receive new-segment before first buffer"); gst_segment_init (&segment, GST_FORMAT_BYTES); - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); outbuffer = gst_gdp_buffer_from_event (this, event); gst_event_unref (event); @@ -708,7 +708,7 @@ gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) gst_gdp_pay_reset_streamheader (this); break; case GST_EVENT_CAPS:{ - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); if (this->caps == NULL || !gst_caps_is_equal (this->caps, caps)) { GST_INFO_OBJECT (pad, "caps changed to %" GST_PTR_FORMAT, caps); gst_caps_replace (&this->caps, caps); diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 6fc3bd3fb..60039e04f 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -1634,11 +1634,11 @@ gst_play_bin_suburidecodebin_seek_to_start (GstElement * suburidecodebin) GstEvent *event; event = - gst_event_new_seek (1.0, GST_FORMAT_BYTES, GST_SEEK_FLAG_NONE, + gst_event_seek_new (1.0, GST_FORMAT_BYTES, GST_SEEK_FLAG_NONE, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, -1); if (!gst_pad_send_event (sinkpad, event)) { event = - gst_event_new_seek (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_NONE, + gst_event_seek_new (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_NONE, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, -1); if (!gst_pad_send_event (sinkpad, event)) GST_DEBUG_OBJECT (suburidecodebin, "Seeking to the beginning failed!"); @@ -2880,7 +2880,7 @@ no_more_pads_cb (GstElement * decodebin, GstSourceGroup * group) gst_structure_set (s, "suburi", G_TYPE_STRING, group->suburi, NULL); msg = gst_message_new_element (GST_OBJECT_CAST (playbin), s); seqnum = gst_message_get_seqnum (msg); - event = gst_event_new_sink_message (msg); + event = gst_event_sink_message_new (msg); g_mutex_lock (group->stream_changed_pending_lock); group->stream_changed_pending = g_list_prepend (group->stream_changed_pending, diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 09c35391f..be455d835 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -3333,7 +3333,7 @@ gst_play_sink_handle_message (GstBin * bin, GstMessage * message) GstEvent *event; event = - gst_event_new_step (GST_FORMAT_TIME, duration, rate, flush, + gst_event_step_new (GST_FORMAT_TIME, duration, rate, flush, intermediate); if (!gst_element_send_event (playsink->audiochain->chain.bin, event)) { @@ -3415,7 +3415,7 @@ gst_play_sink_send_event (GstElement * element, GstEvent * event) gdouble rate; gboolean flush, intermediate; - gst_event_parse_step (event, &format, &amount, &rate, &flush, + gst_event_step_parse (event, &format, &amount, &rate, &flush, &intermediate); if (format == GST_FORMAT_BUFFERS) { diff --git a/gst/playback/gstplaysinkconvertbin.c b/gst/playback/gstplaysinkconvertbin.c index dbd233b9c..6bc225053 100644 --- a/gst/playback/gstplaysinkconvertbin.c +++ b/gst/playback/gstplaysinkconvertbin.c @@ -84,10 +84,10 @@ distribute_running_time (GstElement * element, const GstSegment * segment) pad = gst_element_get_static_pad (element, "sink"); - gst_pad_send_event (pad, gst_event_new_flush_start ()); - gst_pad_send_event (pad, gst_event_new_flush_stop (FALSE)); + gst_pad_send_event (pad, gst_event_flush_start_new ()); + gst_pad_send_event (pad, gst_event_flush_stop_new (FALSE)); - event = gst_event_new_segment (segment); + event = gst_event_segment_new (segment); gst_pad_send_event (pad, event); gst_object_unref (pad); @@ -259,7 +259,7 @@ gst_play_sink_convert_bin_sink_event (GstPad * pad, GstObject * parent, { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); ret = gst_play_sink_convert_bin_sink_setcaps (self, caps); break; } @@ -273,7 +273,7 @@ gst_play_sink_convert_bin_sink_event (GstPad * pad, GstObject * parent, GstSegment seg; GST_PLAY_SINK_CONVERT_BIN_LOCK (self); - gst_event_copy_segment (event, &seg); + gst_event_segment_copy (event, &seg); GST_DEBUG_OBJECT (self, "Segment before %" GST_SEGMENT_FORMAT, &self->segment); diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c index 5dca2820d..a6f320cd2 100644 --- a/gst/playback/gststreamsynchronizer.c +++ b/gst/playback/gststreamsynchronizer.c @@ -175,7 +175,7 @@ gst_stream_synchronizer_src_event (GstPad * pad, GstObject * parent, gint64 running_time_diff; GstStream *stream; - gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); + gst_event_qos_parse (event, NULL, &proportion, &diff, ×tamp); gst_event_unref (event); GST_STREAM_SYNCHRONIZER_LOCK (self); @@ -210,7 +210,7 @@ gst_stream_synchronizer_src_event (GstPad * pad, GstObject * parent, } event = - gst_event_new_qos (GST_QOS_TYPE_UNDERFLOW, proportion, diff, + gst_event_qos_new (GST_QOS_TYPE_UNDERFLOW, proportion, diff, timestamp); break; } @@ -249,7 +249,7 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, case GST_EVENT_SINK_MESSAGE:{ GstMessage *message; - gst_event_parse_sink_message (event, &message); + gst_event_sink_message_parse (event, &message); if (gst_message_has_name (message, "playbin-stream-changed")) { GstStream *stream; @@ -312,7 +312,7 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, GstStream *stream; GstSegment segment; - gst_event_copy_segment (event, &segment); + gst_event_segment_copy (event, &segment); GST_STREAM_SYNCHRONIZER_LOCK (self); stream = gst_pad_get_element_private (pad); @@ -358,7 +358,7 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, GST_DEBUG_OBJECT (pad, "Updating stop position"); stream->segment.stop = stream->segment.position; gst_pad_push_event (stream->srcpad, - gst_event_new_segment (&stream->segment)); + gst_event_segment_new (&stream->segment)); } stop_running_time = MAX (stop_running_time, position_running_time); GST_DEBUG_OBJECT (pad, @@ -465,7 +465,7 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent, while (epad) { pad = epad->data; GST_DEBUG_OBJECT (pad, "Pushing EOS"); - ret = ret && gst_pad_push_event (pad, gst_event_new_eos ()); + ret = ret && gst_pad_push_event (pad, gst_event_eos_new ()); gst_object_unref (pad); epad = g_slist_next (epad); } @@ -607,7 +607,7 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstObject * parent, ostream->segment.position = new_start; gst_pad_push_event (ostream->srcpad, - gst_event_new_segment (&ostream->segment)); + gst_event_segment_new (&ostream->segment)); } } GST_STREAM_SYNCHRONIZER_UNLOCK (self); diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index 03dea41cc..90a5f5792 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -580,7 +580,7 @@ _generate_update_segment_event (GstSegment * segment, GstEvent ** event1) GstEvent *event; GstStructure *structure; - event = gst_event_new_segment (segment); + event = gst_event_segment_new (segment); structure = gst_event_writable_structure (event); gst_structure_id_set (structure, _subtitle_overlay_event_marker_id, G_TYPE_BOOLEAN, TRUE, NULL); @@ -1763,7 +1763,7 @@ gst_subtitle_overlay_video_sink_event (GstPad * pad, GstObject * parent, { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); ret = gst_subtitle_overlay_video_sink_setcaps (self, caps); if (!ret) goto done; @@ -1777,7 +1777,7 @@ gst_subtitle_overlay_video_sink_event (GstPad * pad, GstObject * parent, if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) { GST_DEBUG_OBJECT (pad, "segment event: %" GST_PTR_FORMAT, event); - gst_event_copy_segment (event, &self->video_segment); + gst_event_segment_copy (event, &self->video_segment); if (self->video_segment.format != GST_FORMAT_TIME) goto invalid_format; @@ -1999,7 +1999,7 @@ gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstObject * parent, { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); ret = gst_subtitle_overlay_subtitle_sink_setcaps (self, caps); if (!ret) goto out; @@ -2033,7 +2033,7 @@ gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstObject * parent, if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) { GST_DEBUG_OBJECT (pad, "segment event: %" GST_PTR_FORMAT, event); - gst_event_copy_segment (event, &self->subtitle_segment); + gst_event_segment_copy (event, &self->subtitle_segment); GST_DEBUG_OBJECT (pad, "New subtitle segment: %" GST_SEGMENT_FORMAT, &self->subtitle_segment); } diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index 95d2bfc26..13e16fb1e 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -1004,7 +1004,7 @@ decoded_pad_event_probe (GstPad * pad, GstPadProbeInfo * info, guint bitrate = 0; GstURIDecodeBinStream *stream; - gst_event_parse_tag (event, &list); + gst_event_tag_parse (event, &list); if (!gst_tag_list_get_uint_index (list, GST_TAG_NOMINAL_BITRATE, 0, &bitrate)) { gst_tag_list_get_uint_index (list, GST_TAG_BITRATE, 0, &bitrate); diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c index f94153d6b..03caa10e0 100644 --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c @@ -130,7 +130,7 @@ gst_ssa_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstCaps *caps; - gst_event_parse_caps (event, &caps); + gst_event_caps_parse (event, &caps); res = gst_ssa_parse_setcaps (pad, caps); gst_event_unref (event); break; @@ -325,7 +325,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) tags = gst_tag_list_new_empty (); gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_SUBTITLE_CODEC, "SubStation Alpha", NULL); - gst_pad_push_event (parse->srcpad, gst_event_new_tag (tags)); + gst_pad_push_event (parse->srcpad, gst_event_tag_new (tags)); parse->send_tags = FALSE; } @@ -347,7 +347,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) gst_segment_init (&segment, GST_FORMAT_TIME); segment.start = ts; segment.time = ts; - gst_pad_push_event (parse->srcpad, gst_event_new_segment (&segment)); + gst_pad_push_event (parse->srcpad, gst_event_segment_new (&segment)); ret = GST_FLOW_OK; } diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index 404be726a..003062e97 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -279,7 +279,7 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event) gdouble rate; gboolean update; - gst_event_parse_seek (event, &rate, &format, &flags, + gst_event_seek_parse (event, &rate, &format, &flags, &start_type, &start, &stop_type, &stop); if (format != GST_FORMAT_TIME) { @@ -291,7 +291,7 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event) /* Convert that seek to a seeking in bytes at position 0, FIXME: could use an index */ ret = gst_pad_push_event (self->sinkpad, - gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, + gst_event_seek_new (rate, GST_FORMAT_BYTES, flags, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0)); if (ret) { @@ -1466,7 +1466,7 @@ handle_buffer (GstSubParse * self, GstBuffer * buf) tags = gst_tag_list_new (GST_TAG_SUBTITLE_CODEC, self->subtitle_codec, NULL); - gst_pad_push_event (self->srcpad, gst_event_new_tag (tags)); + gst_pad_push_event (self->srcpad, gst_event_tag_new (tags)); } } @@ -1541,7 +1541,7 @@ gst_sub_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) GST_LOG_OBJECT (self, "pushing newsegment event with %" GST_SEGMENT_FORMAT, &self->segment); - gst_pad_push_event (self->srcpad, gst_event_new_segment (&self->segment)); + gst_pad_push_event (self->srcpad, gst_event_segment_new (&self->segment)); self->need_segment = FALSE; } @@ -1581,7 +1581,7 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) } case GST_EVENT_SEGMENT: { - gst_event_copy_segment (event, &self->segment); + gst_event_segment_copy (event, &self->segment); GST_DEBUG_OBJECT (self, "newsegment (%s)", gst_format_get_name (self->segment.format)); diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 3317af252..bfddde663 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -668,7 +668,7 @@ gst_video_rate_sink_event (GstBaseTransform * trans, GstEvent * event) { const GstSegment *segment; - gst_event_parse_segment (event, &segment); + gst_event_segment_parse (event, &segment); if (segment->format != GST_FORMAT_TIME) goto format_error; diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index f9420e38e..9d07f8a44 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -513,7 +513,7 @@ gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink) if (reconfigure) gst_pad_push_event (GST_BASE_SINK (ximagesink)->sinkpad, - gst_event_new_reconfigure ()); + gst_event_reconfigure_new ()); } static void @@ -1405,7 +1405,7 @@ gst_ximagesink_event (GstBaseSink * sink, GstEvent * event) GstTagList *l; gchar *title = NULL; - gst_event_parse_tag (event, &l); + gst_event_tag_parse (event, &l); gst_tag_list_get_string (l, GST_TAG_TITLE, &title); if (title) { @@ -1519,7 +1519,7 @@ gst_ximagesink_navigation_send_event (GstNavigation * navigation, gdouble x, y; GstPad *pad = NULL; - event = gst_event_new_navigation (structure); + event = gst_event_navigation_new (structure); /* We are not converting the pointer coordinates as there's no hardware scaling done here. The only possible scaling is done by videoscale and diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index a876f579e..6d21e4db1 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1921,7 +1921,7 @@ gst_xvimagesink_event (GstBaseSink * sink, GstEvent * event) GstTagList *l; gchar *title = NULL; - gst_event_parse_tag (event, &l); + gst_event_tag_parse (event, &l); gst_tag_list_get_string (l, GST_TAG_TITLE, &title); if (title) { @@ -2036,7 +2036,7 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation, GstVideoRectangle src, dst, result; gdouble x, y, xscale = 1.0, yscale = 1.0; - event = gst_event_new_navigation (structure); + event = gst_event_navigation_new (structure); /* We take the flow_lock while we look at the window */ g_mutex_lock (xvimagesink->flow_lock); diff --git a/tests/check/elements/adder.c b/tests/check/elements/adder.c index 70863a12d..5524fdff5 100644 --- a/tests/check/elements/adder.c +++ b/tests/check/elements/adder.c @@ -133,7 +133,7 @@ GST_START_TEST (test_event) consist = gst_consistency_checker_new (srcpad); gst_object_unref (srcpad); - seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME, + seek_event = gst_event_seek_new (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, (GstClockTime) 0, GST_SEEK_TYPE_SET, (GstClockTime) 2 * GST_SECOND); @@ -261,7 +261,7 @@ GST_START_TEST (test_play_twice) consist = gst_consistency_checker_new (srcpad); gst_object_unref (srcpad); - play_seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME, + play_seek_event = gst_event_seek_new (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, (GstClockTime) 0, GST_SEEK_TYPE_SET, (GstClockTime) 2 * GST_SECOND); @@ -348,7 +348,7 @@ GST_START_TEST (test_play_twice_then_add_and_play_again) res = gst_element_link (adder, sink); fail_unless (res == TRUE, NULL); - play_seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME, + play_seek_event = gst_event_seek_new (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, (GstClockTime) 0, GST_SEEK_TYPE_SET, (GstClockTime) 2 * GST_SECOND); @@ -498,7 +498,7 @@ GST_START_TEST (test_live_seeking) res = gst_element_link (adder, sink); fail_unless (res == TRUE, NULL); - play_seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME, + play_seek_event = gst_event_seek_new (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, (GstClockTime) 0, GST_SEEK_TYPE_SET, (GstClockTime) 2 * GST_SECOND); @@ -785,7 +785,7 @@ GST_START_TEST (test_clip) segment.start = GST_SECOND; segment.stop = 2 * GST_SECOND; segment.time = 0; - event = gst_event_new_segment (&segment); + event = gst_event_segment_new (&segment); gst_pad_send_event (sinkpad, event); /*FIXME: caps = gst_caps_new_simple ("audio/x-raw", diff --git a/tests/check/elements/audioconvert.c b/tests/check/elements/audioconvert.c index e101f675e..5e9b91ce5 100644 --- a/tests/check/elements/audioconvert.c +++ b/tests/check/elements/audioconvert.c @@ -434,7 +434,7 @@ verify_convert (const gchar * which, void *in, int inlength, GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, "could not set to playing"); - gst_pad_push_event (mysrcpad, gst_event_new_caps (incaps)); + gst_pad_push_event (mysrcpad, gst_event_caps_new (incaps)); GST_DEBUG ("Creating buffer of %d bytes", inlength); inbuffer = gst_buffer_new_and_alloc (inlength); diff --git a/tests/check/elements/subparse.c b/tests/check/elements/subparse.c index 8f1c4edff..dd364954d 100644 --- a/tests/check/elements/subparse.c +++ b/tests/check/elements/subparse.c @@ -204,7 +204,7 @@ test_srt_do_test (SubParseInputChunk * input, guint start_idx, guint num) fail_unless_equals_int (gst_pad_push (mysrcpad, buf), GST_FLOW_OK); } - gst_pad_push_event (mysrcpad, gst_event_new_eos ()); + gst_pad_push_event (mysrcpad, gst_event_eos_new ()); fail_unless_equals_int (g_list_length (buffers), num); @@ -287,7 +287,7 @@ do_test (SubParseInputChunk * input, guint num, const gchar * media_type) fail_unless_equals_int (gst_pad_push (mysrcpad, buf), GST_FLOW_OK); } - gst_pad_push_event (mysrcpad, gst_event_new_eos ()); + gst_pad_push_event (mysrcpad, gst_event_eos_new ()); fail_unless_equals_int (g_list_length (buffers), num); diff --git a/tests/check/elements/videorate.c b/tests/check/elements/videorate.c index f022b93d5..836a5c936 100644 --- a/tests/check/elements/videorate.c +++ b/tests/check/elements/videorate.c @@ -307,7 +307,7 @@ GST_START_TEST (test_more) ASSERT_BUFFER_REFCOUNT (second, "second", 1); /* now send EOS */ - fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ())); + fail_unless (gst_pad_push_event (mysrcpad, gst_event_eos_new ())); /* submitting eos should flush out two more frames for tick 8 and 10 */ /* FIXME: right now it only flushes out one, so out is 5 instead of 6 ! */ diff --git a/tests/check/libs/navigation.c b/tests/check/libs/navigation.c index a44933b2d..b6139b732 100644 --- a/tests/check/libs/navigation.c +++ b/tests/check/libs/navigation.c @@ -92,7 +92,7 @@ test_element_init (TestElement * this) static void nav_send_event (GstNavigation * navigation, GstStructure * structure) { - GstEvent *event = gst_event_new_navigation (structure); + GstEvent *event = gst_event_navigation_new (structure); GstNavigationEventType etype = gst_navigation_event_get_type (event); TestElement *self = (TestElement *) (navigation); diff --git a/tests/examples/dynamic/sprinkle2.c b/tests/examples/dynamic/sprinkle2.c index 15ea81204..c89e7f206 100644 --- a/tests/examples/dynamic/sprinkle2.c +++ b/tests/examples/dynamic/sprinkle2.c @@ -121,7 +121,7 @@ remove_source (SourceInfo * info) gst_bin_remove (GST_BIN (pipeline), info->fx); /* send EOS to the sinkpad to make adder EOS when needed */ - gst_pad_send_event (info->adder_sinkpad, gst_event_new_eos ()); + gst_pad_send_event (info->adder_sinkpad, gst_event_eos_new ()); /* give back the pad */ gst_element_release_request_pad (adder, info->adder_sinkpad); diff --git a/tests/examples/dynamic/sprinkle3.c b/tests/examples/dynamic/sprinkle3.c index 4b9d80b8b..4e6d5a5be 100644 --- a/tests/examples/dynamic/sprinkle3.c +++ b/tests/examples/dynamic/sprinkle3.c @@ -129,7 +129,7 @@ remove_source (SourceInfo * info) gst_bin_remove (GST_BIN (pipeline), info->bin); /* send EOS to the sinkpad to make adder EOS when needed */ - gst_pad_send_event (info->adder_sinkpad, gst_event_new_eos ()); + gst_pad_send_event (info->adder_sinkpad, gst_event_eos_new ()); /* give back the pad */ gst_element_release_request_pad (adder, info->adder_sinkpad); diff --git a/tests/examples/seek/jsseek.c b/tests/examples/seek/jsseek.c index 209a47233..9c26ac832 100644 --- a/tests/examples/seek/jsseek.c +++ b/tests/examples/seek/jsseek.c @@ -1326,13 +1326,13 @@ do_seek (GtkWidget * widget) flags |= GST_SEEK_FLAG_SKIP; if (rate >= 0) { - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, real, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE); GST_DEBUG ("seek with rate %lf to %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (real), GST_TIME_ARGS (duration)); } else { - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, real); GST_DEBUG ("seek with rate %lf to %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT, @@ -1666,11 +1666,11 @@ rate_spinbutton_changed_cb (GtkSpinButton * button, GstPipeline * pipeline) flags |= GST_SEEK_FLAG_SKIP; if (rate >= 0.0) { - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE); } else { - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, position); } @@ -2097,7 +2097,7 @@ step_cb (GtkButton * button, gpointer data) break; } - event = gst_event_new_step (format, amount, rate, flush, FALSE); + event = gst_event_step_new (format, amount, rate, flush, FALSE); res = send_event (event); @@ -2141,7 +2141,7 @@ do_shuttle (GstElement * element) duration = -1; gst_element_send_event (element, - gst_event_new_step (GST_FORMAT_TIME, duration, shuttle_rate, FALSE, + gst_event_step_new (GST_FORMAT_TIME, duration, shuttle_rate, FALSE, FALSE)); } @@ -2218,11 +2218,11 @@ shuttle_rate_switch (GstElement * element) flags |= GST_SEEK_FLAG_ACCURATE; if (play_rate >= 0.0) { - s_event = gst_event_new_seek (play_rate, + s_event = gst_event_seek_new (play_rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE); } else { - s_event = gst_event_new_seek (play_rate, + s_event = gst_event_seek_new (play_rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, position); } @@ -2314,7 +2314,7 @@ msg_segment_done (GstBus * bus, GstMessage * message, GstPipeline * pipeline) if (skip_seek) flags |= GST_SEEK_FLAG_SKIP; - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, duration); diff --git a/tests/examples/seek/scrubby.c b/tests/examples/seek/scrubby.c index f399cb47a..ea3d01fa0 100644 --- a/tests/examples/seek/scrubby.c +++ b/tests/examples/seek/scrubby.c @@ -175,7 +175,7 @@ speed_cb (GtkWidget * widget) if (cur_speed == 0.0) return; - s_event = gst_event_new_seek (cur_speed, + s_event = gst_event_seek_new (cur_speed, GST_FORMAT_TIME, 0, GST_SEEK_TYPE_NONE, -1, GST_SEEK_TYPE_NONE, -1); res = gst_element_send_event (pipeline, s_event); @@ -271,7 +271,7 @@ do_seek (GtkWidget * widget, gboolean flush, gboolean segment) GST_TIME_ARGS (start), GST_TIME_ARGS (stop), rate, GST_ELEMENT_NAME (pipeline)); - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, (flush ? GST_SEEK_FLAG_FLUSH : 0) | (segment ? GST_SEEK_FLAG_SEGMENT : 0), diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index dd432df7b..cd6c64f02 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -475,13 +475,13 @@ do_seek (GtkWidget * widget) flags |= GST_SEEK_FLAG_SKIP; if (rate >= 0) { - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, real, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE); GST_DEBUG ("seek with rate %lf to %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (real), GST_TIME_ARGS (duration)); } else { - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, real); GST_DEBUG ("seek with rate %lf to %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT, @@ -811,11 +811,11 @@ rate_spinbutton_changed_cb (GtkSpinButton * button, GstPipeline * pipeline) flags |= GST_SEEK_FLAG_SKIP; if (rate >= 0.0) { - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE); } else { - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, position); } @@ -1242,7 +1242,7 @@ step_cb (GtkButton * button, gpointer data) break; } - event = gst_event_new_step (format, amount, rate, flush, FALSE); + event = gst_event_step_new (format, amount, rate, flush, FALSE); res = send_event (event); @@ -1299,7 +1299,7 @@ do_shuttle (GstElement * element) duration = -1; gst_element_send_event (element, - gst_event_new_step (GST_FORMAT_TIME, duration, shuttle_rate, FALSE, + gst_event_step_new (GST_FORMAT_TIME, duration, shuttle_rate, FALSE, FALSE)); } @@ -1376,11 +1376,11 @@ shuttle_rate_switch (GstElement * element) flags |= GST_SEEK_FLAG_ACCURATE; if (play_rate >= 0.0) { - s_event = gst_event_new_seek (play_rate, + s_event = gst_event_seek_new (play_rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE); } else { - s_event = gst_event_new_seek (play_rate, + s_event = gst_event_seek_new (play_rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, position); } @@ -1485,7 +1485,7 @@ msg_segment_done (GstBus * bus, GstMessage * message, GstPipeline * pipeline) if (skip_seek) flags |= GST_SEEK_FLAG_SKIP; - s_event = gst_event_new_seek (rate, + s_event = gst_event_seek_new (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, duration); diff --git a/tests/examples/seek/stepping.c b/tests/examples/seek/stepping.c index 6f6997fc2..ee29fa774 100644 --- a/tests/examples/seek/stepping.c +++ b/tests/examples/seek/stepping.c @@ -42,7 +42,7 @@ do_step (GstElement * bin) length *= 100 * GST_MSECOND; gst_element_send_event (bin, - gst_event_new_step (GST_FORMAT_TIME, length, 1.0, TRUE, FALSE)); + gst_event_step_new (GST_FORMAT_TIME, length, 1.0, TRUE, FALSE)); return FALSE; } diff --git a/tests/examples/seek/stepping2.c b/tests/examples/seek/stepping2.c index 8cea180e3..d9f9f4ec3 100644 --- a/tests/examples/seek/stepping2.c +++ b/tests/examples/seek/stepping2.c @@ -41,7 +41,7 @@ do_step (GstElement * bin) rate += 1.2; gst_element_send_event (bin, - gst_event_new_step (GST_FORMAT_TIME, 40 * GST_MSECOND, rate, FALSE, + gst_event_step_new (GST_FORMAT_TIME, 40 * GST_MSECOND, rate, FALSE, FALSE)); } diff --git a/tests/icles/audio-trickplay.c b/tests/icles/audio-trickplay.c index bb52d0000..9f6a43753 100644 --- a/tests/icles/audio-trickplay.c +++ b/tests/icles/audio-trickplay.c @@ -159,13 +159,13 @@ main (gint argc, gchar ** argv) /* prepare events */ flags = use_flush ? GST_SEEK_FLAG_FLUSH : GST_SEEK_FLAG_NONE; - pos_seek = gst_event_new_seek (1.0, GST_FORMAT_TIME, flags, + pos_seek = gst_event_seek_new (1.0, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, 3 * GST_SECOND, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); - rate_seek1 = gst_event_new_seek (0.5, GST_FORMAT_TIME, flags, + rate_seek1 = gst_event_seek_new (0.5, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); - rate_seek2 = gst_event_new_seek (-1.0, GST_FORMAT_TIME, flags, + rate_seek2 = gst_event_seek_new (-1.0, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); |