mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
element-monitor: add is_encoder flag
Easy access to knowing if the monitored element is an encoder
This commit is contained in:
parent
ab98bd242e
commit
694935fdea
2 changed files with 3 additions and 0 deletions
|
@ -114,6 +114,7 @@ gst_qa_element_monitor_inspect (GstQaElementMonitor * monitor)
|
|||
klass = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
|
||||
|
||||
monitor->is_decoder = strstr (klass->details.klass, "Decoder") != NULL;
|
||||
monitor->is_encoder = strstr (klass->details.klass, "Encoder") != NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -40,6 +40,7 @@ G_BEGIN_DECLS
|
|||
|
||||
#define GST_QA_ELEMENT_MONITOR_GET_ELEMENT(m) (GST_ELEMENT_CAST (GST_QA_MONITOR_GET_OBJECT (m)))
|
||||
#define GST_QA_ELEMENT_MONITOR_ELEMENT_IS_DECODER(m) (GST_QA_ELEMENT_MONITOR_CAST (m)->is_decoder)
|
||||
#define GST_QA_ELEMENT_MONITOR_ELEMENT_IS_ENCODER(m) (GST_QA_ELEMENT_MONITOR_CAST (m)->is_encoder)
|
||||
|
||||
typedef struct _GstQaElementMonitor GstQaElementMonitor;
|
||||
typedef struct _GstQaElementMonitorClass GstQaElementMonitorClass;
|
||||
|
@ -59,6 +60,7 @@ struct _GstQaElementMonitor {
|
|||
GList *pad_monitors;
|
||||
|
||||
gboolean is_decoder;
|
||||
gboolean is_encoder;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue