mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gst/videomixer/videomixer.c: Handle segments a little better. Fixes #537361.
Original commit message from CVS: * gst/videomixer/videomixer.c: (gst_videomixer_fill_queues), (gst_videomixer_sink_event): Handle segments a little better. Fixes #537361.
This commit is contained in:
parent
b1dfdc758e
commit
1dcf0755c5
2 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-09-25 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/videomixer/videomixer.c: (gst_videomixer_fill_queues),
|
||||||
|
(gst_videomixer_sink_event):
|
||||||
|
Handle segments a little better. Fixes #537361.
|
||||||
|
|
||||||
2008-09-25 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-09-25 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_parse_methods):
|
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_parse_methods):
|
||||||
|
|
|
@ -1277,6 +1277,7 @@ gst_videomixer_fill_queues (GstVideoMixer * mix)
|
||||||
}
|
}
|
||||||
if (mix->sendseg && (mixpad == mix->master)) {
|
if (mix->sendseg && (mixpad == mix->master)) {
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
|
gint64 stop, start;
|
||||||
|
|
||||||
GstSegment *segment = &data->segment;
|
GstSegment *segment = &data->segment;
|
||||||
|
|
||||||
|
@ -1294,8 +1295,18 @@ gst_videomixer_fill_queues (GstVideoMixer * mix)
|
||||||
* match.
|
* match.
|
||||||
*/
|
*/
|
||||||
GST_INFO ("_sending play segment");
|
GST_INFO ("_sending play segment");
|
||||||
|
|
||||||
|
start = segment->accum;
|
||||||
|
|
||||||
|
/* get the duration of the segment if we can and add it to the accumulated
|
||||||
|
* time on the segment. */
|
||||||
|
if (segment->stop != -1 && segment->start != -1)
|
||||||
|
stop = start + (segment->stop - segment->start);
|
||||||
|
else
|
||||||
|
stop = -1;
|
||||||
|
|
||||||
event = gst_event_new_new_segment_full (FALSE, segment->rate, 1.0,
|
event = gst_event_new_new_segment_full (FALSE, segment->rate, 1.0,
|
||||||
segment->format, 0, -1, mix->segment_position);
|
segment->format, start, stop, start + mix->segment_position);
|
||||||
gst_pad_push_event (mix->srcpad, event);
|
gst_pad_push_event (mix->srcpad, event);
|
||||||
mix->sendseg = FALSE;
|
mix->sendseg = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1627,6 +1638,9 @@ gst_videomixer_sink_event (GstPad * pad, GstEvent * event)
|
||||||
*/
|
*/
|
||||||
videomixer->sendseg = TRUE;
|
videomixer->sendseg = TRUE;
|
||||||
break;
|
break;
|
||||||
|
case GST_EVENT_NEWSEGMENT:
|
||||||
|
videomixer->sendseg = TRUE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue