mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 14:38:48 +00:00
validate: Add a new issue to detect invalid event seqnum
Events should always have a valid seqnum. Add a new issue which allows detecting such events. And use that check in the pad monitor
This commit is contained in:
parent
18b0d109f2
commit
9af908195c
3 changed files with 10 additions and 0 deletions
|
@ -1616,6 +1616,11 @@ gst_validate_pad_monitor_common_event_check (GstValidatePadMonitor *
|
||||||
{
|
{
|
||||||
guint32 seqnum = gst_event_get_seqnum (event);
|
guint32 seqnum = gst_event_get_seqnum (event);
|
||||||
|
|
||||||
|
if (seqnum == GST_SEQNUM_INVALID)
|
||||||
|
GST_VALIDATE_REPORT (pad_monitor, EVENT_INVALID_SEQNUM,
|
||||||
|
"Event %p (%s) has an invalid SEQNUM", event,
|
||||||
|
GST_EVENT_TYPE_NAME (event));
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
{
|
{
|
||||||
|
|
|
@ -342,6 +342,10 @@ gst_validate_report_load_issues (void)
|
||||||
" EOS being some kind of data flow, there is no exception"
|
" EOS being some kind of data flow, there is no exception"
|
||||||
" in that regard"));
|
" in that regard"));
|
||||||
|
|
||||||
|
REGISTER_VALIDATE_ISSUE (CRITICAL, EVENT_INVALID_SEQNUM,
|
||||||
|
_("Event has an invalid seqnum"),
|
||||||
|
_("An event is using GST_SEQNUM_INVALID. This should never happen"));
|
||||||
|
|
||||||
REGISTER_VALIDATE_ISSUE (CRITICAL, STATE_CHANGE_FAILURE,
|
REGISTER_VALIDATE_ISSUE (CRITICAL, STATE_CHANGE_FAILURE,
|
||||||
_("state change failed"), NULL);
|
_("state change failed"), NULL);
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,7 @@ typedef enum {
|
||||||
#define EVENT_SEEK_NOT_HANDLED _QUARK("event::seek-not-handled")
|
#define EVENT_SEEK_NOT_HANDLED _QUARK("event::seek-not-handled")
|
||||||
#define EVENT_SEEK_RESULT_POSITION_WRONG _QUARK("event::seek-result-position-wrong")
|
#define EVENT_SEEK_RESULT_POSITION_WRONG _QUARK("event::seek-result-position-wrong")
|
||||||
#define EVENT_EOS_WITHOUT_SEGMENT _QUARK("event::eos-without-segment")
|
#define EVENT_EOS_WITHOUT_SEGMENT _QUARK("event::eos-without-segment")
|
||||||
|
#define EVENT_INVALID_SEQNUM _QUARK("event::invalid-seqnum")
|
||||||
|
|
||||||
#define STATE_CHANGE_FAILURE _QUARK("state::change-failure")
|
#define STATE_CHANGE_FAILURE _QUARK("state::change-failure")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue