diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-06-05 10:31:03 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-06-05 11:09:40 +0200 |
commit | 823089cf68b319f0c017cdd3a31ffcb5a9054328 (patch) | |
tree | 2cfe51283dff0bcbe9ba792f6166070e85c4e040 | |
parent | cbff745b49ee8b8ac51bedb41c9990b83b35d24f (diff) |
playsink: add property to get the last frame
Add a property to get the last video frame.
See #620279
-rw-r--r-- | gst/playback/gstplaysink.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 7edaae22b..7884e7eec 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -211,6 +211,7 @@ enum PROP_FONT_DESC, PROP_SUBTITLE_ENCODING, PROP_VIS_PLUGIN, + PROP_FRAME, PROP_LAST }; @@ -306,6 +307,19 @@ gst_play_sink_class_init (GstPlaySinkClass * klass) g_param_spec_object ("vis-plugin", "Vis plugin", "the visualization element to use (NULL = default)", GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstPlaySink:frame: + * @playsink: a #GstPlaySink + * + * Get the currently rendered or prerolled frame in the video sink. + * The #GstCaps on the buffer will describe the format of the buffer. + * + * Since: 0.10.30 + */ + g_object_class_install_property (gobject_klass, PROP_FRAME, + gst_param_spec_mini_object ("frame", "Frame", + "The last frame (NULL = no video available)", + GST_TYPE_BUFFER, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_signal_new ("reconfigure", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstPlaySinkClass, @@ -2933,6 +2947,9 @@ gst_play_sink_get_property (GObject * object, guint prop_id, case PROP_VIS_PLUGIN: g_value_take_object (value, gst_play_sink_get_vis_plugin (playsink)); break; + case PROP_FRAME: + gst_value_take_buffer (value, gst_play_sink_get_last_frame (playsink)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec); break; |