how to read/write property of alsasink from application

Soho Soho123 soho123.2012 at gmail.com
Sun Jan 20 18:32:52 PST 2013


Hi Tim,

Yes, you are right.
But my problem is:
if pipe I used :gst-launch-0.10 playbin2 url=....
then the elements that be constructed in pipe are automatically, right?
that inicludes alsasink element.
If I created alsasink element by myself, then
I have to pass the point to playbin2, right?
how to let playbin2 know the audio sink is the alsasink that I created
by myself,
NOT use the element that auto created?
Could you kindly help to explain more detail?

Thank you very much!!

Best Regards,
Soho

2013/1/20 Tim-Philipp Müller <t.i.m at zen.co.uk>:
> On Sun, 2013-01-20 at 00:13 +0800, Soho Soho123 wrote:
>
> Hi,
>>
>> If my application uses the pipe like "gst-launch-0.10 playbin url=.....", then
>
> You should use playbin2 uri=... really, not the old playbin.
>
>
>> is there any method that I can read/write property of alsasink from
>> main of application?
>>  Does someone have idea?
>> Because I have to tell alsa to do someting while audio playback!
>
> The easiest way would be to create the alsasink yourself using
>
>  GstElement *alsasink = gst_element_factory_make ("alsasink", NULL);
>
> and then set it on playbin (=the pipeline) with
>
> g_object_set (playbin, "audio-sink", alsasink, NULL);
>
> Then you can keep the alsasink pointer around and use
>
>   g_object_set (alsasink, "property-name", value, NULL);
> or
>   g_object_get (alsasink, "property-name", &value, NULL);
>
> (though many of the values can probably only be manipulated while
> alsasink is in NULL state, not while it's being used for output).
>
> Cheers
>  -Tim
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list