diff options
Diffstat (limited to 'clutter-gst/clutter-gst-util.c')
-rw-r--r-- | clutter-gst/clutter-gst-util.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/clutter-gst/clutter-gst-util.c b/clutter-gst/clutter-gst-util.c index 3c7c325..f344ede 100644 --- a/clutter-gst/clutter-gst-util.c +++ b/clutter-gst/clutter-gst-util.c @@ -98,6 +98,7 @@ #include <clutter/clutter.h> #include "clutter-gst-debug.h" +#include "clutter-gst-video-sink.h" #include "clutter-gst-util.h" static gboolean clutter_gst_is_initialized = FALSE; @@ -202,3 +203,27 @@ clutter_gst_init_with_args (int *argc, return CLUTTER_INIT_SUCCESS; } +/** + * clutter_gst_video_sink_new: + * @texture: a #ClutterTexture + * + * Creates a new GStreamer video sink which uses @texture as the target + * for sinking a video stream from GStreamer. + * + * <note>This function has to be called from Clutter's main thread. While + * GStreamer will spawn threads to do its work, we want all the GL calls to + * happen in the same thread. Clutter-gst knows which thread it is by + * assuming this constructor is called from the Clutter thread.</note> + * + * Return value: a #GstElement for the newly created video sink + * + * Deprecated: 1.6: Use gst_element_factory_make ("cluttersink", ...) and the + * "texture" GObject property instead. + */ +GstElement * +clutter_gst_video_sink_new (ClutterTexture *texture) +{ + return g_object_new (CLUTTER_GST_TYPE_VIDEO_SINK, + "texture", texture, + NULL); +} |