diff options
author | Jan Schmidt <jan@centricular.com> | 2016-11-02 02:25:51 +1100 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2016-11-02 11:02:12 +1100 |
commit | afc440e906fd8daf1775781127d5c98e12fa9b63 (patch) | |
tree | 71260561a1675de00cdcef155dafeea0998caae7 /gst | |
parent | f609986c34e7575081ade283dcc7fc72fc2a2088 (diff) |
splitmuxsrc: Store seek seqnum and send it on EOS / segment events.
GES relies on the EOS event having the seqnum of the seek that
caused it.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/multifile/gstsplitmuxsrc.c | 5 | ||||
-rw-r--r-- | gst/multifile/gstsplitmuxsrc.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gst/multifile/gstsplitmuxsrc.c b/gst/multifile/gstsplitmuxsrc.c index 5fc2aa928..a8cba94f6 100644 --- a/gst/multifile/gstsplitmuxsrc.c +++ b/gst/multifile/gstsplitmuxsrc.c @@ -423,6 +423,8 @@ gst_splitmux_handle_event (GstSplitMuxSrc * splitmux, if (gst_splitmux_end_of_part (splitmux, splitpad)) // Continuing to next part, drop the EOS goto drop_event; + if (splitmux->segment_seqnum) + gst_event_set_seqnum (event, splitmux->segment_seqnum); break; } case GST_EVENT_SEGMENT:{ @@ -465,6 +467,8 @@ gst_splitmux_handle_event (GstSplitMuxSrc * splitmux, gst_event_unref (event); event = gst_event_new_segment (&seg); + if (splitmux->segment_seqnum) + gst_event_set_seqnum (event, splitmux->segment_seqnum); splitpad->sent_segment = TRUE; break; } @@ -1142,6 +1146,7 @@ splitmux_src_pad_event (GstPad * pad, GstObject * parent, GstEvent * event) /* Everything is stopped, so update the play_segment */ gst_segment_copy_into (&tmp, &splitmux->play_segment); + splitmux->segment_seqnum = seqnum; /* Work out where to start from now */ for (i = 0; i < splitmux->num_parts; i++) { diff --git a/gst/multifile/gstsplitmuxsrc.h b/gst/multifile/gstsplitmuxsrc.h index 228453c17..c234c9029 100644 --- a/gst/multifile/gstsplitmuxsrc.h +++ b/gst/multifile/gstsplitmuxsrc.h @@ -58,6 +58,7 @@ struct _GstSplitMuxSrc GstClockTime total_duration; GstSegment play_segment; + guint32 segment_seqnum; }; struct _GstSplitMuxSrcClass |