Setting Playbin's default sink

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting Playbin's default sink

Takido
Hello,

I'm trying to stream media on a specific platform which does not (for the moment) have an alsa, jack or oss sink. I want playbin to stream on a specific sink that I partially wrote and which works correctly when I use gst-launch.
How can I specify it to playbin ?

Thanks,
Hamza

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Setting Playbin's default sink

Tim-Philipp Müller-2
On Thu, 2012-08-02 at 17:42 +0200, Hamza Chouh wrote:

Hi,

> I'm trying to stream media on a specific platform which does not (for
> the moment) have an alsa, jack or oss sink. I want playbin to stream
> on a specific sink that I partially wrote and which works correctly
> when I use gst-launch.
> How can I specify it to playbin ?

I would recommend you use playbin2 instead of playbin.

Use the "audio-sink" property and set your element as that:

  GstElement *mysink;
  mysink = gst_element_factory_make ("mysink", NULL);
  g_object_set (playbin, "audio-sink", mysink, NULL);


With gst-launch you can do this *if* your version of GStreamer core is
sufficiently recent:

  gst-launch-0.10 playbin2 uri=file:///path/to/foo.mp3 audio-sink=mysink

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Setting Playbin's default sink

Takido
Hi,

Thanks very much Tim, that is indeed the solution, and it works perfectly !

2012/8/2 Tim-Philipp Müller <[hidden email]>
On Thu, 2012-08-02 at 17:42 +0200, Hamza Chouh wrote:

Hi,

> I'm trying to stream media on a specific platform which does not (for
> the moment) have an alsa, jack or oss sink. I want playbin to stream
> on a specific sink that I partially wrote and which works correctly
> when I use gst-launch.
> How can I specify it to playbin ?

I would recommend you use playbin2 instead of playbin.

Use the "audio-sink" property and set your element as that:

  GstElement *mysink;
  mysink = gst_element_factory_make ("mysink", NULL);
  g_object_set (playbin, "audio-sink", mysink, NULL);


With gst-launch you can do this *if* your version of GStreamer core is
sufficiently recent:

  gst-launch-0.10 playbin2 uri=file:///path/to/foo.mp3 audio-sink=mysink

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel