On Fri, 2007-07-06 at 11:30 +0200, David Härdeman wrote:
> Is there any convenient way of getting hold of live raw audio 
> samples from ClutterGstAudio?
> 
> The reason that I'm asking is that I'm experimenting with audio
> visualization.

Hey,

This reminds me of the fact that that in clutter-gst-video-texture.h
there is "GstElement   *clutter_gst_video_texture_get_playbin
(ClutterGstVideoTexture *texture);", but there's nothing regarding that
clutter-gst-video-texture.c. Should there be?

Attached is a change I did when I tried using the function in the header
file and found it not implemented. Feel free to apply it.

I was just indeed experimenting a bit with audio visualization, using
the playbin something like this:

audiosink = gst_bin_get_by_name(GST_BIN(playbin), "audio-sink");
sink_pad = gst_element_get_pad(audiosink, "sink");
gst_pad_add_buffer_probe(sink_pad, G_CALLBACK(audio_cb), self);

Then you can eg. calculate visualizations in the callback function from
the data.

-Timo

-- 
http://iki.fi/tjyrinki/

Index: trunk/clutter-gst/clutter-gst/clutter-gst-video-texture.c
===================================================================
--- trunk/clutter-gst/clutter-gst/clutter-gst-video-texture.c	(revision 921)
+++ trunk/clutter-gst/clutter-gst/clutter-gst-video-texture.c	(working copy)
@@ -798,3 +798,7 @@
   return CLUTTER_ACTOR(video_texture);
 }
 
+GstElement   *clutter_gst_video_texture_get_playbin (ClutterGstVideoTexture *texture) {
+    return texture->priv->playbin;
+}
+    

Reply via email to