GESTimelinePipeline: Add video sink get/set API

This new API allows getting/setting of the preview mode's video sink
element through playsink's video-sink property.
This commit is contained in:
Robert Swain 2011-10-04 16:25:22 +02:00
parent a3ec50053d
commit 8ff7b7def5
2 changed files with 41 additions and 0 deletions

View file

@ -879,6 +879,40 @@ ges_timeline_pipeline_get_thumbnail_rgb24 (GESTimelinePipeline * self,
return ret;
}
/**
* ges_timeline_pipeline_preview_get_video_sink:
* @self: a #GESTimelinePipeline
*
* Obtains a pointer to playsink's video sink element that is used for
* displaying video when the #GESTimelinePipeline is in %TIMELINE_MODE_PREVIEW
*
* Returns: a pointer to the playsink video sink #GstElement
*/
GstElement *
ges_timeline_pipeline_preview_get_video_sink (GESTimelinePipeline * self)
{
GstElement *sink;
g_object_get (self->priv->playsink, "video-sink", &sink, NULL);
return sink;
};
/**
* ges_timeline_pipeline_preview_set_video_sink:
* @self: a #GESTimelinePipeline in %GST_STATE_NULL
* @sink: a video sink #GstElement
*
* Sets playsink's video sink element that is used for displaying video when
* the #GESTimelinePipeline is in %TIMELINE_MODE_PREVIEW
*/
void
ges_timeline_pipeline_preview_set_video_sink (GESTimelinePipeline * self,
GstElement * sink)
{
g_object_set (self->priv->playsink, "video-sink", sink, NULL);
};
static gboolean
play_sink_multiple_seeks_send_event (GstElement * element, GstEvent * event)
{

View file

@ -99,6 +99,13 @@ gboolean
ges_timeline_pipeline_save_thumbnail(GESTimelinePipeline *self,
int width, int height, const gchar *format, const gchar *location);
GstElement *
ges_timeline_pipeline_preview_get_video_sink (GESTimelinePipeline * self);
void
ges_timeline_pipeline_preview_set_video_sink (GESTimelinePipeline * self,
GstElement * sink);
G_END_DECLS
#endif /* _GES_TIMELINE_PIPELINE */