monitor: Add critical issue for checking accurate seek results

If an accurate seek is accepted, the resulting segment.time should be
exactly the requested seek start value..

https://bugzilla.gnome.org/show_bug.cgi?id=763299
This commit is contained in:
Edward Hervey 2016-03-08 10:49:43 +01:00 committed by Edward Hervey
parent fdccffbb2e
commit ef4635fe51
4 changed files with 23 additions and 0 deletions

View file

@ -893,6 +893,7 @@ gst_validate_pad_monitor_init (GstValidatePadMonitor * pad_monitor)
pad_monitor->timestamp_range_start = GST_CLOCK_TIME_NONE;
pad_monitor->timestamp_range_end = GST_CLOCK_TIME_NONE;
pad_monitor->pending_seek_accurate_time = GST_CLOCK_TIME_NONE;
}
/**
@ -1706,6 +1707,16 @@ gst_validate_pad_monitor_downstream_event_check (GstValidatePadMonitor *
"Got: %u Expected: %u", seqnum, pad_monitor->pending_eos_seqnum);
}
}
if (GST_CLOCK_TIME_IS_VALID (pad_monitor->pending_seek_accurate_time)) {
if (segment->time == pad_monitor->pending_seek_accurate_time) {
pad_monitor->pending_seek_accurate_time = GST_CLOCK_TIME_NONE;
} else {
GST_VALIDATE_REPORT (pad_monitor, SEGMENT_HAS_WRONG_START,
"After an accurate seek, got: %" GST_TIME_FORMAT " Expected: %"
GST_TIME_FORMAT, GST_TIME_ARGS (segment->time),
GST_TIME_ARGS (pad_monitor->pending_seek_accurate_time));
}
}
pad_monitor->pending_eos_seqnum = seqnum;
@ -1862,6 +1873,9 @@ gst_validate_pad_monitor_src_event_check (GstValidatePadMonitor * pad_monitor,
pad_monitor->pending_flush_start_seqnum = seqnum;
pad_monitor->pending_flush_stop_seqnum = seqnum;
}
if (seek_flags & GST_SEEK_FLAG_ACCURATE) {
pad_monitor->pending_seek_accurate_time = start;
}
}
break;
/* both flushes are handled by the common event handling function */
@ -1895,6 +1909,7 @@ gst_validate_pad_monitor_src_event_check (GstValidatePadMonitor * pad_monitor,
pad_monitor->pending_flush_stop_seqnum = 0;
pad_monitor->pending_newsegment_seqnum = 0;
pad_monitor->pending_eos_seqnum = 0;
pad_monitor->pending_seek_accurate_time = GST_CLOCK_TIME_NONE;
}
}
break;

View file

@ -89,6 +89,8 @@ struct _GstValidatePadMonitor {
guint32 pending_newsegment_seqnum;
guint32 pending_eos_seqnum;
GstClockTime pending_seek_accurate_time;
GstEvent *expected_segment;
GPtrArray *serialized_events;
GList *expired_events;

View file

@ -259,6 +259,11 @@ gst_validate_report_load_issues (void)
_("when events/messages are created from another event/message, "
"they should have their seqnums set to the original event/message "
"seqnum"));
REGISTER_VALIDATE_ISSUE (CRITICAL, SEGMENT_HAS_WRONG_START,
_("A segment doesn't have the proper time value after an ACCURATE seek"),
_("If a seek with the ACCURATE flag was accepted, the following segment "
"should have a time value corresponding exactly to the requested start "
"seek time"));
REGISTER_VALIDATE_ISSUE (WARNING, EVENT_SERIALIZED_OUT_OF_ORDER,
_("a serialized event received should be pushed in the same order "
"as it was received"),

View file

@ -78,6 +78,7 @@ typedef enum {
#define FLUSH_START_HAS_WRONG_SEQNUM _QUARK("event::flush-start-has-wrong-seqnum")
#define FLUSH_STOP_HAS_WRONG_SEQNUM _QUARK("event::flush-stop-has-wrong-seqnum")
#define SEGMENT_HAS_WRONG_SEQNUM _QUARK("event::segment-has-wrong-seqnum")
#define SEGMENT_HAS_WRONG_START _QUARK("event::segment-has-wrong-start")
#define EVENT_SERIALIZED_OUT_OF_ORDER _QUARK("event::serialized-out-of-order")