Commit 816f4e79 authored by Wim Taymans's avatar Wim Taymans

segment: fix for new core API

Fix for gst_*_segment_full rename.
parent 9d594f42
......@@ -213,8 +213,8 @@ gst_gio_base_sink_event (GstBaseSink * base_sink, GstEvent * event)
GstFormat format;
gint64 offset;
gst_event_parse_new_segment (event, NULL, NULL, &format, &offset, NULL,
NULL);
gst_event_parse_new_segment (event, NULL, NULL, NULL, &format, &offset,
NULL, NULL);
if (format != GST_FORMAT_BYTES) {
GST_WARNING_OBJECT (sink, "ignored NEWSEGMENT event in %s format",
......
......@@ -445,7 +445,7 @@ gst_gnome_vfs_sink_handle_event (GstBaseSink * basesink, GstEvent * event)
GstFormat format;
gint64 offset;
gst_event_parse_new_segment (event, NULL, NULL, &format, &offset,
gst_event_parse_new_segment (event, NULL, NULL, NULL, &format, &offset,
NULL, NULL);
if (format != GST_FORMAT_BYTES) {
......
......@@ -509,11 +509,11 @@ gst_visual_sink_event (GstPad * pad, 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_parse_new_segment_full (event, &update, &rate, &arate, &format,
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
/* now configure the values */
gst_segment_set_newsegment_full (&visual->segment, update,
gst_segment_set_newsegment (&visual->segment, update,
rate, arate, format, start, stop, time);
/* and forward */
......
......@@ -877,6 +877,7 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet)
/* create the newsegment event we are going to send out */
event = gst_event_new_new_segment (FALSE, ogg->segment.rate,
ogg->segment.applied_rate,
GST_FORMAT_TIME, start_time, chain->segment_stop, segment_time);
ogg->resync = FALSE;
......@@ -895,6 +896,7 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet)
/* create the newsegment event we are going to send out */
event = gst_event_new_new_segment (FALSE, ogg->segment.rate,
ogg->segment.applied_rate,
GST_FORMAT_TIME, chain->segment_start, chain->segment_stop,
chain->begin_time);
}
......@@ -2306,6 +2308,7 @@ gst_ogg_demux_perform_seek_pull (GstOggDemux * ogg, GstEvent * event)
chain_start = chain->segment_start;
newseg = gst_event_new_new_segment (TRUE, ogg->segment.rate,
ogg->segment.applied_rate,
GST_FORMAT_TIME, ogg->segment.start + chain_start,
ogg->segment.last_stop + chain_start, ogg->segment.time);
/* set the seqnum of the running segment */
......@@ -2408,9 +2411,11 @@ gst_ogg_demux_perform_seek_pull (GstOggDemux * ogg, GstEvent * event)
/* create the segment event we are going to send out */
if (ogg->segment.rate >= 0.0)
event = gst_event_new_new_segment (FALSE, ogg->segment.rate,
ogg->segment.applied_rate,
ogg->segment.format, last_stop, stop, ogg->segment.time);
else
event = gst_event_new_new_segment (FALSE, ogg->segment.rate,
ogg->segment.applied_rate,
ogg->segment.format, start, last_stop, ogg->segment.time);
gst_event_set_seqnum (event, seqnum);
......@@ -3067,6 +3072,7 @@ gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page)
/* create the newsegment event we are going to send out */
event = gst_event_new_new_segment (FALSE, ogg->segment.rate,
ogg->segment.applied_rate,
GST_FORMAT_TIME, start, chain->segment_stop, chain->begin_time);
gst_event_set_seqnum (event, ogg->seqnum);
......@@ -3366,6 +3372,7 @@ gst_ogg_demux_sync_streams (GstOggDemux * ogg)
/* advance stream time (FIXME: is this right, esp. time_pos?) */
gst_pad_push_event (GST_PAD_CAST (stream),
gst_event_new_new_segment (TRUE, ogg->segment.rate,
ogg->segment.applied_rate,
GST_FORMAT_TIME, stream->last_stop, -1, stream->last_stop));
}
}
......
......@@ -288,7 +288,7 @@ gst_ogg_mux_sink_event (GstPad * pad, GstEvent * event)
GstFormat format;
gint64 start, stop, position;
gst_event_parse_new_segment_full (event, &update, &rate,
gst_event_parse_new_segment (event, &update, &rate,
&applied_rate, &format, &start, &stop, &position);
/* We don't support non time NEWSEGMENT events */
......@@ -298,7 +298,7 @@ gst_ogg_mux_sink_event (GstPad * pad, GstEvent * event)
break;
}
gst_segment_set_newsegment_full (&ogg_pad->segment, update, rate,
gst_segment_set_newsegment (&ogg_pad->segment, update, rate,
applied_rate, format, start, stop, position);
break;
......
......@@ -2129,12 +2129,12 @@ gst_base_text_overlay_text_event (GstPad * pad, GstEvent * event)
overlay->text_eos = FALSE;
gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
gst_event_parse_new_segment (event, &update, &rate, &applied_rate,
&fmt, &cur, &stop, &time);
if (fmt == GST_FORMAT_TIME) {
GST_OBJECT_LOCK (overlay);
gst_segment_set_newsegment_full (&overlay->text_segment, update, rate,
gst_segment_set_newsegment (&overlay->text_segment, update, rate,
applied_rate, GST_FORMAT_TIME, cur, stop, time);
GST_DEBUG_OBJECT (overlay, "TEXT SEGMENT now: %" GST_SEGMENT_FORMAT,
&overlay->text_segment);
......@@ -2209,21 +2209,21 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
case GST_EVENT_NEWSEGMENT:
{
GstFormat format;
gdouble rate;
gdouble rate, arate;
gint64 start, stop, time;
gboolean update;
GST_DEBUG_OBJECT (overlay, "received new segment");
gst_event_parse_new_segment (event, &update, &rate, &format, &start,
&stop, &time);
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
if (format == GST_FORMAT_TIME) {
GST_DEBUG_OBJECT (overlay, "VIDEO SEGMENT now: %" GST_SEGMENT_FORMAT,
&overlay->segment);
gst_segment_set_newsegment (&overlay->segment, update, rate, format,
start, stop, time);
gst_segment_set_newsegment (&overlay->segment, update, rate, arate,
format, start, stop, time);
} else {
GST_ELEMENT_WARNING (overlay, STREAM, MUX, (NULL),
("received non-TIME newsegment event on video input"));
......
......@@ -635,7 +635,7 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event)
gdouble rate, arate;
gint64 start, stop, time;
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
/* we need TIME format */
......@@ -649,7 +649,7 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event)
GST_TIME_ARGS (time));
/* now configure the values */
gst_segment_set_newsegment_full (&dec->segment, update,
gst_segment_set_newsegment (&dec->segment, update,
rate, arate, format, start, stop, time);
dec->seqnum = gst_event_get_seqnum (event);
......
......@@ -827,10 +827,10 @@ theora_enc_sink_event (GstPad * pad, GstEvent * event)
GstFormat format;
gint64 start, stop, time;
gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
gst_event_parse_new_segment (event, &update, &rate, &applied_rate,
&format, &start, &stop, &time);
gst_segment_set_newsegment_full (&enc->segment, update, rate,
gst_segment_set_newsegment (&enc->segment, update, rate,
applied_rate, format, start, stop, time);
res = gst_pad_push_event (enc->srcpad, event);
......
......@@ -493,7 +493,7 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event)
gint64 start, stop, time;
gboolean update;
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
/* we need time for now */
......@@ -507,7 +507,7 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event)
GST_TIME_ARGS (time));
/* now configure the values */
gst_segment_set_newsegment_full (&dec->segment, update,
gst_segment_set_newsegment (&dec->segment, update,
rate, arate, format, start, stop, time);
dec->seqnum = gst_event_get_seqnum (event);
......
......@@ -970,11 +970,11 @@ gst_vorbis_enc_sink_event (GstPad * pad, GstEvent * event)
GstFormat format;
gint64 start, stop, position;
gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
gst_event_parse_new_segment (event, &update, &rate, &applied_rate,
&format, &start, &stop, &position);
if (format == GST_FORMAT_TIME) {
gst_segment_set_newsegment (&vorbisenc->segment, update, rate, format,
start, stop, position);
gst_segment_set_newsegment (&vorbisenc->segment, update, rate,
applied_rate, format, start, stop, position);
if (vorbisenc->initial_ts == GST_CLOCK_TIME_NONE) {
GST_DEBUG_OBJECT (vorbisenc, "Initial segment %" GST_SEGMENT_FORMAT,
&vorbisenc->segment);
......
......@@ -868,7 +868,7 @@ gst_base_audio_sink_event (GstBaseSink * bsink, GstEvent * event)
gdouble rate;
/* we only need the rate */
gst_event_parse_new_segment_full (event, NULL, &rate, NULL, NULL,
gst_event_parse_new_segment (event, NULL, &rate, NULL, NULL,
NULL, NULL, NULL);
GST_DEBUG_OBJECT (sink, "new segment rate of %f", rate);
......
......@@ -443,14 +443,14 @@ gst_base_rtp_depayload_handle_event (GstBaseRTPDepayload * filter,
case GST_EVENT_NEWSEGMENT:
{
gboolean update;
gdouble rate;
gdouble rate, arate;
GstFormat fmt;
gint64 start, stop, position;
gst_event_parse_new_segment (event, &update, &rate, &fmt, &start, &stop,
&position);
gst_event_parse_new_segment (event, &update, &rate, &arate, &fmt, &start,
&stop, &position);
gst_segment_set_newsegment (&filter->segment, update, rate, fmt,
gst_segment_set_newsegment (&filter->segment, update, rate, arate, fmt,
start, stop, position);
/* don't pass the event downstream, we generate our own segment including
......@@ -531,7 +531,7 @@ create_segment_event (GstBaseRTPDepayload * filter, gboolean update,
else
stop = -1;
event = gst_event_new_new_segment_full (update, priv->play_speed,
event = gst_event_new_new_segment (update, priv->play_speed,
priv->play_scale, GST_FORMAT_TIME, position, stop,
position + priv->npt_start);
......
......@@ -413,9 +413,9 @@ gst_basertppayload_event (GstPad * pad, GstEvent * event)
segment = &basertppayload->segment;
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &fmt,
gst_event_parse_new_segment (event, &update, &rate, &arate, &fmt,
&start, &stop, &position);
gst_segment_set_newsegment_full (segment, update, rate, arate, fmt, start,
gst_segment_set_newsegment (segment, update, rate, arate, fmt, start,
stop, position);
GST_DEBUG_OBJECT (basertppayload,
......
......@@ -744,10 +744,10 @@ gst_tag_demux_sink_event (GstPad * pad, GstEvent * event)
GstFormat format;
gint64 start, stop, position;
gst_event_parse_new_segment_full (event, &update, &rate, &arate,
gst_event_parse_new_segment (event, &update, &rate, &arate,
&format, &start, &stop, &position);
gst_segment_set_newsegment_full (&demux->priv->segment, update, rate,
gst_segment_set_newsegment (&demux->priv->segment, update, rate,
arate, format, start, stop, position);
demux->priv->newseg_update = update;
demux->priv->need_newseg = TRUE;
......@@ -1485,14 +1485,14 @@ gst_tag_demux_send_new_segment (GstTagDemux * tagdemux)
if (seg->format == GST_FORMAT_UNDEFINED) {
GST_LOG_OBJECT (tagdemux,
"No new segment received before first buffer. Using default");
gst_segment_set_newsegment (seg, FALSE, 1.0,
gst_segment_set_newsegment (seg, FALSE, 1.0, 1.0,
GST_FORMAT_BYTES, tagdemux->priv->strip_start, -1,
tagdemux->priv->strip_start);
}
/* Can't adjust segments in non-BYTES formats */
if (tagdemux->priv->segment.format != GST_FORMAT_BYTES) {
event = gst_event_new_new_segment_full (tagdemux->priv->newseg_update,
event = gst_event_new_new_segment (tagdemux->priv->newseg_update,
seg->rate, seg->applied_rate, seg->format, seg->start,
seg->stop, seg->time);
return gst_pad_push_event (tagdemux->priv->srcpad, event);
......@@ -1550,7 +1550,7 @@ gst_tag_demux_send_new_segment (GstTagDemux * tagdemux)
G_GINT64_FORMAT, tagdemux->priv->newseg_update, seg->rate, seg->format,
start, stop, position);
event = gst_event_new_new_segment_full (tagdemux->priv->newseg_update,
event = gst_event_new_new_segment (tagdemux->priv->newseg_update,
seg->rate, seg->applied_rate, seg->format, start, stop, position);
return gst_pad_push_event (tagdemux->priv->srcpad, event);
}
......@@ -1179,7 +1179,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_new_segment_full (FALSE, adder->segment_rate,
event = gst_event_new_new_segment (FALSE, adder->segment_rate,
1.0, GST_FORMAT_TIME, adder->segment_start, adder->segment_end,
adder->segment_start);
if (adder->segment_rate > 0.0) {
......
......@@ -321,7 +321,7 @@ gst_audio_rate_sink_event (GstPad * pad, GstEvent * event)
gint64 start, stop, time;
gboolean update;
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
GST_DEBUG_OBJECT (audiorate, "handle NEWSEGMENT");
......@@ -338,7 +338,7 @@ gst_audio_rate_sink_event (GstPad * pad, GstEvent * event)
}
/* we accept all formats */
gst_segment_set_newsegment_full (&audiorate->sink_segment, update, rate,
gst_segment_set_newsegment (&audiorate->sink_segment, update, rate,
arate, format, start, stop, time);
GST_DEBUG_OBJECT (audiorate, "updated segment: %" GST_SEGMENT_FORMAT,
......
......@@ -357,7 +357,7 @@ smart_encoder_sink_event (GstPad * pad, GstEvent * event)
gint64 start, stop, time;
gboolean update;
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
GST_DEBUG_OBJECT (smart_encoder,
"newsegment: update %d, rate %g, arate %g, start %" GST_TIME_FORMAT
......@@ -369,7 +369,7 @@ smart_encoder_sink_event (GstPad * pad, GstEvent * event)
("smart_encoder can not handle streams not specified in GST_FORMAT_TIME");
/* now configure the values */
gst_segment_set_newsegment_full (smart_encoder->segment, update,
gst_segment_set_newsegment (smart_encoder->segment, update,
rate, arate, format, start, stop, time);
/* And keep a copy for further usage */
......
......@@ -456,7 +456,7 @@ gst_gdp_pay_reset_streamheader (GstGDPPay * this)
/* if these are our first ever buffers, send out new_segment first */
if (!this->sent_streamheader) {
GstEvent *event =
gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0);
gst_event_new_new_segment (TRUE, 1.0, 1.0, GST_FORMAT_BYTES, 0, -1, 0);
GST_DEBUG_OBJECT (this, "Sending out new_segment event %p", event);
if (!gst_pad_push_event (this->srcpad, event)) {
GST_WARNING_OBJECT (this, "pushing new segment failed");
......@@ -564,7 +564,8 @@ gst_gdp_pay_chain (GstPad * pad, GstBuffer * buffer)
GST_WARNING_OBJECT (this,
"did not receive new-segment before first buffer");
event = gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0);
event =
gst_event_new_new_segment (TRUE, 1.0, 1.0, GST_FORMAT_BYTES, 0, -1, 0);
outbuffer = gst_gdp_buffer_from_event (this, event);
gst_event_unref (event);
......
......@@ -244,7 +244,7 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event)
gdouble rate, arate;
gint64 start, stop, time;
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
GST_DEBUG_OBJECT (selpad,
......@@ -253,7 +253,7 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event)
"%" G_GINT64_FORMAT " -- %" G_GINT64_FORMAT ", time %"
G_GINT64_FORMAT, update, rate, arate, format, start, stop, time);
gst_segment_set_newsegment_full (&selpad->segment, update,
gst_segment_set_newsegment (&selpad->segment, update,
rate, arate, format, start, stop, time);
/* if we are not going to forward the segment, mark the segment as
* pending */
......@@ -339,7 +339,7 @@ gst_selector_pad_chain (GstPad * pad, GstBuffer * buf)
/* if we have a pending segment, push it out now */
if (selpad->segment_pending) {
gst_pad_push_event (sel->srcpad, gst_event_new_new_segment_full (FALSE,
gst_pad_push_event (sel->srcpad, gst_event_new_new_segment (FALSE,
seg->rate, seg->applied_rate, seg->format, seg->start, seg->stop,
seg->time));
......
......@@ -353,7 +353,7 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstEvent * event)
GstFormat format;
gint64 start, stop, position;
gst_event_parse_new_segment_full (event,
gst_event_parse_new_segment (event,
&update, &rate, &applied_rate, &format, &start, &stop, &position);
GST_STREAM_SYNCHRONIZER_LOCK (self);
......@@ -399,11 +399,11 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstEvent * event)
if (stop_running_time < last_stop_running_time) {
GST_DEBUG_OBJECT (pad, "Updating stop position");
gst_pad_push_event (stream->srcpad,
gst_event_new_new_segment_full (TRUE, stream->segment.rate,
gst_event_new_new_segment (TRUE, stream->segment.rate,
stream->segment.applied_rate, GST_FORMAT_TIME,
stream->segment.start, stream->segment.last_stop,
stream->segment.time));
gst_segment_set_newsegment_full (&stream->segment, TRUE,
gst_segment_set_newsegment (&stream->segment, TRUE,
stream->segment.rate, stream->segment.applied_rate,
GST_FORMAT_TIME, stream->segment.start,
stream->segment.last_stop, stream->segment.time);
......@@ -423,16 +423,16 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstEvent * event)
"Advancing running time for other streams by: %"
GST_TIME_FORMAT, GST_TIME_ARGS (diff));
gst_pad_push_event (stream->srcpad,
gst_event_new_new_segment_full (FALSE, 1.0, 1.0,
gst_event_new_new_segment (FALSE, 1.0, 1.0,
GST_FORMAT_TIME, 0, diff, 0));
gst_segment_set_newsegment_full (&stream->segment, FALSE, 1.0, 1.0,
gst_segment_set_newsegment (&stream->segment, FALSE, 1.0, 1.0,
GST_FORMAT_TIME, 0, diff, 0);
}
}
GST_DEBUG_OBJECT (pad, "Segment was: %" GST_SEGMENT_FORMAT,
&stream->segment);
gst_segment_set_newsegment_full (&stream->segment, update, rate,
gst_segment_set_newsegment (&stream->segment, update, rate,
applied_rate, format, start, stop, position);
GST_DEBUG_OBJECT (pad, "Segment now is: %" GST_SEGMENT_FORMAT,
&stream->segment);
......@@ -658,10 +658,10 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstBuffer * buffer)
GST_TIME_ARGS (new_start));
gst_pad_push_event (ostream->srcpad,
gst_event_new_new_segment_full (TRUE, ostream->segment.rate,
gst_event_new_new_segment (TRUE, ostream->segment.rate,
ostream->segment.applied_rate, ostream->segment.format,
new_start, new_stop, new_start));
gst_segment_set_newsegment_full (&ostream->segment, TRUE,
gst_segment_set_newsegment (&ostream->segment, TRUE,
ostream->segment.rate, ostream->segment.applied_rate,
ostream->segment.format, new_start, new_stop, new_start);
gst_segment_set_last_stop (&ostream->segment, GST_FORMAT_TIME,
......
......@@ -503,13 +503,13 @@ _generate_update_newsegment_event (GstSegment * segment, GstEvent ** event1,
*event1 = NULL;
*event2 = NULL;
event = gst_event_new_new_segment_full (FALSE, segment->rate,
event = gst_event_new_new_segment (FALSE, segment->rate,
segment->applied_rate, segment->format, 0, segment->accum, 0);
gst_structure_id_set (event->structure, _subtitle_overlay_event_marker_id,
G_TYPE_BOOLEAN, TRUE, NULL);
*event1 = event;
event = gst_event_new_new_segment_full (FALSE, segment->rate,
event = gst_event_new_new_segment (FALSE, segment->rate,
segment->applied_rate, segment->format,
segment->start, segment->stop, segment->time);
gst_structure_id_set (event->structure, _subtitle_overlay_event_marker_id,
......@@ -1688,7 +1688,7 @@ gst_subtitle_overlay_video_sink_event (GstPad * pad, GstEvent * event)
GST_DEBUG_OBJECT (pad, "Newsegment event: %" GST_PTR_FORMAT,
event->structure);
gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
gst_event_parse_new_segment (event, &update, &rate, &applied_rate,
&format, &start, &stop, &position);
if (format != GST_FORMAT_TIME) {
......@@ -1701,7 +1701,7 @@ gst_subtitle_overlay_video_sink_event (GstPad * pad, GstEvent * event)
GST_DEBUG_OBJECT (pad, "Old video segment: %" GST_SEGMENT_FORMAT,
&self->video_segment);
gst_segment_set_newsegment_full (&self->video_segment, update, rate,
gst_segment_set_newsegment (&self->video_segment, update, rate,
applied_rate, format, start, stop, position);
GST_DEBUG_OBJECT (pad, "New video segment: %" GST_SEGMENT_FORMAT,
&self->video_segment);
......@@ -1949,7 +1949,7 @@ gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstEvent * event)
ret = TRUE;
goto out;
} else if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) {
gst_event_parse_new_segment_full (event, NULL, NULL, NULL,
gst_event_parse_new_segment (event, NULL, NULL, NULL,
&format, NULL, NULL, NULL);
if (self->subtitle_segment.format != GST_FORMAT_UNDEFINED &&
self->subtitle_segment.format != format) {
......@@ -1996,7 +1996,7 @@ gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstEvent * event)
GST_DEBUG_OBJECT (pad, "Newsegment event: %" GST_PTR_FORMAT,
event->structure);
gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
gst_event_parse_new_segment (event, &update, &rate, &applied_rate,
&format, &start, &stop, &position);
GST_DEBUG_OBJECT (pad, "Old subtitle segment: %" GST_SEGMENT_FORMAT,
......@@ -2008,7 +2008,7 @@ gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstEvent * event)
gst_segment_init (&self->subtitle_segment, format);
}
gst_segment_set_newsegment_full (&self->subtitle_segment, update, rate,
gst_segment_set_newsegment (&self->subtitle_segment, update, rate,
applied_rate, format, start, stop, position);
GST_DEBUG_OBJECT (pad, "New subtitle segment: %" GST_SEGMENT_FORMAT,
&self->subtitle_segment);
......
......@@ -326,7 +326,8 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstBuffer * buf)
if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) {
/* just advance time without sending anything */
gst_pad_push_event (parse->srcpad,
gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_TIME, ts, -1, ts));
gst_event_new_new_segment (TRUE, 1.0, 1.0, GST_FORMAT_TIME, ts, -1,
ts));
ret = GST_FLOW_OK;
}
......
......@@ -1542,8 +1542,9 @@ gst_sub_parse_chain (GstPad * sinkpad, GstBuffer * buf)
&self->segment);
gst_pad_push_event (self->srcpad, gst_event_new_new_segment (FALSE,
self->segment.rate, self->segment.format,
self->segment.last_stop, self->segment.stop, self->segment.time));
self->segment.rate, self->segment.applied_rate,
self->segment.format, self->segment.last_stop, self->segment.stop,
self->segment.time));
self->need_segment = FALSE;
}
......@@ -1584,17 +1585,17 @@ gst_sub_parse_sink_event (GstPad * pad, GstEvent * event)
case GST_EVENT_NEWSEGMENT:
{
GstFormat format;
gdouble rate;
gdouble rate, arate;
gint64 start, stop, time;
gboolean update;
gst_event_parse_new_segment (event, &update, &rate, &format, &start,
&stop, &time);
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
GST_DEBUG_OBJECT (self, "newsegment (%s)", gst_format_get_name (format));
if (format == GST_FORMAT_TIME) {
gst_segment_set_newsegment (&self->segment, update, rate, format,
gst_segment_set_newsegment (&self->segment, update, rate, arate, format,
start, stop, time);
} else {
/* if not time format, we'll either start with a 0 timestamp anyway or
......
......@@ -562,7 +562,7 @@ gst_video_rate_event (GstPad * pad, GstEvent * event)
gboolean update;
GstFormat format;
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
gst_event_parse_new_segment (event, &update, &rate, &arate, &format,
&start, &stop, &time);
if (format != GST_FORMAT_TIME)
......@@ -604,7 +604,7 @@ gst_video_rate_event (GstPad * pad, GstEvent * event)
}
/* We just want to update the accumulated stream_time */
gst_segment_set_newsegment_full (&videorate->segment, update, rate, arate,
gst_segment_set_newsegment (&videorate->segment, update, rate, arate,
format, start, stop, time);
GST_DEBUG_OBJECT (videorate, "updated segment: %" GST_SEGMENT_FORMAT,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment