mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
playsink: Add video-sink property
The video-sink property allows manual specification via g_object_set () of the video sink element to be used.
This commit is contained in:
parent
12a54ae4dd
commit
ddcda53714
1 changed files with 22 additions and 0 deletions
|
@ -251,6 +251,7 @@ enum
|
|||
PROP_VIS_PLUGIN,
|
||||
PROP_FRAME,
|
||||
PROP_AV_OFFSET,
|
||||
PROP_VIDEO_SINK,
|
||||
PROP_LAST
|
||||
};
|
||||
|
||||
|
@ -406,6 +407,19 @@ gst_play_sink_class_init (GstPlaySinkClass * klass)
|
|||
G_MININT64, G_MAXINT64, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* GstPlaySink:video-sink:
|
||||
*
|
||||
* Set the used video sink element. NULL will use the default sink. playsink
|
||||
* must be in %GST_STATE_NULL
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
g_object_class_install_property (gobject_klass, PROP_VIDEO_SINK,
|
||||
g_param_spec_object ("video-sink", "Video Sink",
|
||||
"the video output element to use (NULL = default sink)",
|
||||
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_signal_new ("reconfigure", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstPlaySinkClass,
|
||||
reconfigure), NULL, NULL, gst_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN,
|
||||
|
@ -3621,6 +3635,10 @@ gst_play_sink_set_property (GObject * object, guint prop_id,
|
|||
case PROP_AV_OFFSET:
|
||||
gst_play_sink_set_av_offset (playsink, g_value_get_int64 (value));
|
||||
break;
|
||||
case PROP_VIDEO_SINK:
|
||||
gst_play_sink_set_sink (playsink, GST_PLAY_SINK_TYPE_VIDEO,
|
||||
g_value_get_object (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
|
||||
break;
|
||||
|
@ -3659,6 +3677,10 @@ gst_play_sink_get_property (GObject * object, guint prop_id,
|
|||
case PROP_AV_OFFSET:
|
||||
g_value_set_int64 (value, gst_play_sink_get_av_offset (playsink));
|
||||
break;
|
||||
case PROP_VIDEO_SINK:
|
||||
g_value_take_object (value, gst_play_sink_get_sink (playsink,
|
||||
GST_PLAY_SINK_TYPE_VIDEO));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue