diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c b/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c index 1d3618f1d9..5f5990204e 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c @@ -34,14 +34,17 @@ gst_va_base_dec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstVaBaseDec *self = GST_VA_BASE_DEC (object); + GstVaBaseDecClass *klass = GST_VA_BASE_DEC_GET_CLASS (self); switch (prop_id) { case GST_VA_DEC_PROP_DEVICE_PATH:{ - if (!(self->display && GST_IS_VA_DISPLAY_PLATFORM (self->display))) { + if (!self->display) + g_value_set_string (value, klass->render_device_path); + else if (GST_IS_VA_DISPLAY_PLATFORM (self->display)) + g_object_get_property (G_OBJECT (self->display), "path", value); + else g_value_set_string (value, NULL); - return; - } - g_object_get_property (G_OBJECT (self->display), "path", value); + break; } default: @@ -748,7 +751,7 @@ gst_va_base_dec_class_init (GstVaBaseDecClass * klass, GstVaCodecs codec, g_object_class_install_property (object_class, GST_VA_DEC_PROP_DEVICE_PATH, g_param_spec_string ("device-path", "Device Path", - GST_VA_DEVICE_PATH_PROP_DESC, NULL, + GST_VA_DEVICE_PATH_PROP_DESC, NULL, GST_PARAM_DOC_SHOW_DEFAULT | G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); } diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c b/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c index 8f85495dc0..75c38060ad 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c @@ -849,14 +849,17 @@ gst_va_base_enc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstVaBaseEnc *base = GST_VA_BASE_ENC (object); + GstVaBaseEncClass *klass = GST_VA_BASE_ENC_GET_CLASS (base); switch (prop_id) { case PROP_DEVICE_PATH:{ - if (!(base->display && GST_IS_VA_DISPLAY_PLATFORM (base->display))) { + if (!base->display) + g_value_set_string (value, klass->render_device_path); + else if (GST_IS_VA_DISPLAY_PLATFORM (base->display)) + g_object_get_property (G_OBJECT (base->display), "path", value); + else g_value_set_string (value, NULL); - return; - } - g_object_get_property (G_OBJECT (base->display), "path", value); + break; } default: @@ -919,7 +922,7 @@ gst_va_base_enc_class_init (GstVaBaseEncClass * klass) */ properties[PROP_DEVICE_PATH] = g_param_spec_string ("device-path", "Device Path", GST_VA_DEVICE_PATH_PROP_DESC, NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + GST_PARAM_DOC_SHOW_DEFAULT | G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (gobject_class, N_PROPERTIES, properties); diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabasetransform.c b/subprojects/gst-plugins-bad/sys/va/gstvabasetransform.c index ad7388acbc..b3055bce6f 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabasetransform.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabasetransform.c @@ -74,14 +74,17 @@ gst_va_base_transform_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstVaBaseTransform *self = GST_VA_BASE_TRANSFORM (object); + GstVaBaseTransformClass *klass = GST_VA_BASE_TRANSFORM_GET_CLASS (self); switch (prop_id) { case PROP_DEVICE_PATH:{ - if (!(self->display && GST_IS_VA_DISPLAY_PLATFORM (self->display))) { + if (!self->display) + g_value_set_string (value, klass->render_device_path); + else if (GST_IS_VA_DISPLAY_PLATFORM (self->display)) + g_object_get_property (G_OBJECT (self->display), "path", value); + else g_value_set_string (value, NULL); - return; - } - g_object_get_property (G_OBJECT (self->display), "path", value); + break; } default: @@ -649,7 +652,7 @@ gst_va_base_transform_class_init (GstVaBaseTransformClass * klass) */ properties[PROP_DEVICE_PATH] = g_param_spec_string ("device-path", "Device Path", GST_VA_DEVICE_PATH_PROP_DESC, NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + GST_PARAM_DOC_SHOW_DEFAULT | G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (gobject_class, N_PROPERTIES, properties); diff --git a/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c b/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c index 4cc7ebd1d7..882bc055db 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c @@ -288,15 +288,18 @@ gst_va_compositor_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstVaCompositor *self = GST_VA_COMPOSITOR (object); + GstVaCompositorClass *klass = GST_VA_COMPOSITOR_GET_CLASS (self); switch (prop_id) { case PROP_DEVICE_PATH: { - if (!(self->display && GST_IS_VA_DISPLAY_PLATFORM (self->display))) { + if (!self->display) + g_value_set_string (value, klass->render_device_path); + else if (GST_IS_VA_DISPLAY_PLATFORM (self->display)) + g_object_get_property (G_OBJECT (self->display), "path", value); + else g_value_set_string (value, NULL); - return; - } - g_object_get_property (G_OBJECT (self->display), "path", value); + break; } case PROP_SCALE_METHOD: @@ -1408,7 +1411,7 @@ gst_va_compositor_class_init (gpointer g_class, gpointer class_data) */ properties[PROP_DEVICE_PATH] = g_param_spec_string ("device-path", "Device Path", GST_VA_DEVICE_PATH_PROP_DESC, NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + GST_PARAM_DOC_SHOW_DEFAULT | G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); /** * GstVaCompositor:scale-method: