mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
qa-override: add callbacks for query/buffer/event functions
Add callbacks for pad event/buffer/query functions in case the override wants to do additional checks
This commit is contained in:
parent
7fedf5a111
commit
8a66b3d4ed
2 changed files with 41 additions and 2 deletions
|
@ -64,3 +64,24 @@ gst_qa_override_get_severity (GstQaOverride * override, GstQaIssueId issue_id,
|
||||||
}
|
}
|
||||||
return default_level;
|
return default_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_qa_override_set_event_handler (GstQaOverride * override,
|
||||||
|
GstQaOverrideEventHandler handler)
|
||||||
|
{
|
||||||
|
override->event_handler = handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_qa_override_set_buffer_handler (GstQaOverride * override,
|
||||||
|
GstQaOverrideBufferHandler handler)
|
||||||
|
{
|
||||||
|
override->buffer_handler = handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_qa_override_set_query_handler (GstQaOverride * override,
|
||||||
|
GstQaOverrideQueryHandler handler)
|
||||||
|
{
|
||||||
|
override->query_handler = handler;
|
||||||
|
}
|
||||||
|
|
|
@ -28,16 +28,34 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct {
|
typedef struct _QstQaOverride GstQaOverride;
|
||||||
|
typedef struct _GstQaMonitor GstQaMonitor;
|
||||||
|
|
||||||
|
typedef void (*GstQaOverrideBufferHandler)(GstQaOverride * override,
|
||||||
|
GstQaMonitor * pad_monitor, GstBuffer * buffer);
|
||||||
|
typedef void (*GstQaOverrideEventHandler)(GstQaOverride * override,
|
||||||
|
GstQaMonitor * pad_monitor, GstEvent * event);
|
||||||
|
typedef void (*GstQaOverrideQueryHandler)(GstQaOverride * override,
|
||||||
|
GstQaMonitor * pad_monitor, GstQuery * query);
|
||||||
|
|
||||||
|
struct _QstQaOverride {
|
||||||
GHashTable *level_override;
|
GHashTable *level_override;
|
||||||
|
|
||||||
} GstQaOverride;
|
/* Pad handlers */
|
||||||
|
GstQaOverrideBufferHandler buffer_handler;
|
||||||
|
GstQaOverrideEventHandler event_handler;
|
||||||
|
GstQaOverrideQueryHandler query_handler;
|
||||||
|
};
|
||||||
|
|
||||||
GstQaOverride * gst_qa_override_new (void);
|
GstQaOverride * gst_qa_override_new (void);
|
||||||
void gst_qa_override_free (GstQaOverride * override);
|
void gst_qa_override_free (GstQaOverride * override);
|
||||||
void gst_qa_override_change_severity (GstQaOverride * override, GstQaIssueId issue_id, GstQaReportLevel new_level);
|
void gst_qa_override_change_severity (GstQaOverride * override, GstQaIssueId issue_id, GstQaReportLevel new_level);
|
||||||
GstQaReportLevel gst_qa_override_get_severity (GstQaOverride * override, GstQaIssueId issue_id, GstQaReportLevel default_level);
|
GstQaReportLevel gst_qa_override_get_severity (GstQaOverride * override, GstQaIssueId issue_id, GstQaReportLevel default_level);
|
||||||
|
|
||||||
|
void gst_qa_override_set_event_handler (GstQaOverride * override, GstQaOverrideEventHandler handler);
|
||||||
|
void gst_qa_override_set_buffer_handler (GstQaOverride * override, GstQaOverrideBufferHandler handler);
|
||||||
|
void gst_qa_override_set_query_handler (GstQaOverride * override, GstQaOverrideQueryHandler handler);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_QA_OVERRIDE_H__ */
|
#endif /* __GST_QA_OVERRIDE_H__ */
|
||||||
|
|
Loading…
Reference in a new issue