pad-monitor: also track eos event that should be emitted after a seek
When seeking out of the media file length, the element should push an EOS with the same seqnum of the seek event
This commit is contained in:
parent
390b54f40d
commit
fef4eba9a2
@ -1159,6 +1159,9 @@ gst_validate_pad_monitor_downstream_event_check (GstValidatePadMonitor *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* got a segment, no need for EOS now */
|
||||||
|
pad_monitor->pending_eos_seqnum = 0;
|
||||||
|
|
||||||
if (GST_PAD_DIRECTION (pad) == GST_PAD_SINK) {
|
if (GST_PAD_DIRECTION (pad) == GST_PAD_SINK) {
|
||||||
gst_validate_pad_monitor_add_expected_newsegment (pad_monitor, event);
|
gst_validate_pad_monitor_add_expected_newsegment (pad_monitor, event);
|
||||||
} else {
|
} else {
|
||||||
@ -1186,6 +1189,13 @@ gst_validate_pad_monitor_downstream_event_check (GstValidatePadMonitor *
|
|||||||
break;
|
break;
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
pad_monitor->is_eos = TRUE;
|
pad_monitor->is_eos = TRUE;
|
||||||
|
if (pad_monitor->pending_eos_seqnum &&
|
||||||
|
pad_monitor->pending_eos_seqnum != seqnum) {
|
||||||
|
GST_VALIDATE_REPORT (pad_monitor, EVENT_HAS_WRONG_SEQNUM,
|
||||||
|
"The expected EOS seqnum should be the same as the "
|
||||||
|
"one from the seek that caused it. Got: %u."
|
||||||
|
" Expected: %u", seqnum, pad_monitor->pending_eos_seqnum);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* TODO add end of stream checks for
|
* TODO add end of stream checks for
|
||||||
* - events not pushed
|
* - events not pushed
|
||||||
@ -1270,6 +1280,7 @@ gst_validate_pad_monitor_src_event_check (GstValidatePadMonitor * pad_monitor,
|
|||||||
pad_monitor->pending_flush_stop_seqnum = seqnum;
|
pad_monitor->pending_flush_stop_seqnum = seqnum;
|
||||||
}
|
}
|
||||||
pad_monitor->pending_newsegment_seqnum = seqnum;
|
pad_monitor->pending_newsegment_seqnum = seqnum;
|
||||||
|
pad_monitor->pending_eos_seqnum = seqnum;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
/* both flushes are handled by the common event handling function */
|
/* both flushes are handled by the common event handling function */
|
||||||
|
@ -80,6 +80,7 @@ struct _GstValidatePadMonitor {
|
|||||||
guint32 pending_flush_stop_seqnum;
|
guint32 pending_flush_stop_seqnum;
|
||||||
guint32 pending_flush_start_seqnum;
|
guint32 pending_flush_start_seqnum;
|
||||||
guint32 pending_newsegment_seqnum;
|
guint32 pending_newsegment_seqnum;
|
||||||
|
guint32 pending_eos_seqnum;
|
||||||
|
|
||||||
GstEvent *expected_segment;
|
GstEvent *expected_segment;
|
||||||
GPtrArray *serialized_events;
|
GPtrArray *serialized_events;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user