GST_DEBUG_CATEGORY_INIT (gst_qa_bin_monitor_debug, "qa_bin_monitor", 0, "QA BinMonitor");
#define gst_qa_bin_monitor_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstQaBinMonitor, gst_qa_bin_monitor,
- G_TYPE_OBJECT, _do_init);
+ GST_TYPE_QA_ELEMENT_MONITOR, _do_init);
static void
gst_qa_bin_monitor_wrap_element (GstQaBinMonitor * monitor,
gst_qa_bin_monitor_new (GstBin * bin)
{
GstQaBinMonitor *monitor = g_object_new (GST_TYPE_QA_BIN_MONITOR, "object",
- G_TYPE_OBJECT, bin, NULL);
+ bin, NULL);
if (GST_QA_MONITOR_GET_OBJECT (monitor) == NULL) {
g_object_unref (monitor);
g_return_val_if_fail (element != NULL, NULL);
- monitor =
- g_object_new (GST_TYPE_QA_ELEMENT_MONITOR, "object",
- G_TYPE_OBJECT, element, NULL);
+ monitor = g_object_new (GST_TYPE_QA_ELEMENT_MONITOR, "object", element, NULL);
if (GST_QA_ELEMENT_MONITOR_GET_ELEMENT (monitor) == NULL) {
g_object_unref (monitor);
g_object_class_install_property (gobject_class, PROP_OBJECT,
g_param_spec_object ("object", "Object", "The object to be monitored",
- G_TYPE_OBJECT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READABLE));
+ G_TYPE_OBJECT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
}
static void
switch (prop_id) {
case PROP_OBJECT:
g_assert (monitor->object == NULL);
- monitor->object = g_value_get_object (value);
+ monitor->object = g_value_dup_object (value);
gst_qa_monitor_setup (monitor);
break;
default:
gst_qa_pad_monitor_new (GstPad * pad)
{
GstQaPadMonitor *monitor = g_object_new (GST_TYPE_QA_PAD_MONITOR,
- "object", G_TYPE_OBJECT, pad, NULL);
+ "object", pad, NULL);
if (GST_QA_PAD_MONITOR_GET_PAD (monitor) == NULL) {
g_object_unref (monitor);