GESTimelinePipeline: Add API to get/set audio sink

This commit is contained in:
Robert Swain 2011-11-07 15:08:34 +01:00
parent 42039ee48b
commit edf47f880d
2 changed files with 45 additions and 0 deletions

View file

@ -916,6 +916,44 @@ ges_timeline_pipeline_preview_set_video_sink (GESTimelinePipeline * self,
g_object_set (self->priv->playsink, "video-sink", sink, NULL);
};
/**
* ges_timeline_pipeline_preview_get_audio_sink:
* @self: a #GESTimelinePipeline
*
* Obtains a pointer to playsink's audio sink element that is used for
* displaying audio when the #GESTimelinePipeline is in %TIMELINE_MODE_PREVIEW
*
* The caller is responsible for unreffing the returned element with
* #gst_object_unref.
*
* Returns: (transfer full): a pointer to the playsink audio sink #GstElement
*/
GstElement *
ges_timeline_pipeline_preview_get_audio_sink (GESTimelinePipeline * self)
{
GstElement *sink;
g_object_get (self->priv->playsink, "audio-sink", &sink, NULL);
return sink;
};
/**
* ges_timeline_pipeline_preview_set_audio_sink:
* @self: a #GESTimelinePipeline in %GST_STATE_NULL
* @sink: (transfer none): a audio sink #GstElement
*
* Sets playsink's audio sink element that is used for displaying audio when
* the #GESTimelinePipeline is in %TIMELINE_MODE_PREVIEW
*/
void
ges_timeline_pipeline_preview_set_audio_sink (GESTimelinePipeline * self,
GstElement * sink)
{
g_object_set (self->priv->playsink, "audio-sink", sink, NULL);
};
static gboolean
play_sink_multiple_seeks_send_event (GstElement * element, GstEvent * event)
{

View file

@ -106,6 +106,13 @@ void
ges_timeline_pipeline_preview_set_video_sink (GESTimelinePipeline * self,
GstElement * sink);
GstElement *
ges_timeline_pipeline_preview_get_audio_sink (GESTimelinePipeline * self);
void
ges_timeline_pipeline_preview_set_audio_sink (GESTimelinePipeline * self,
GstElement * sink);
G_END_DECLS
#endif /* _GES_TIMELINE_PIPELINE */