Bpd: changing device property of gst audio sink

i’m getting bpd to work on a RPI with an usb-audio dongle, and have run down the issue to needing to specify a a non-default device to gstreamer.

from the command line i can do this ala:

gst-launch-1.0 playbin audio-sink="alsasink device=hw:CARD=Device" uri='file:///path2.mp3'

my question is how to do the same thing via the python interface being used by bpd? i see a fakesink being set up (for video) in bpd.gstplayer.GstPlayer.__init__() but don’t find where the AUDIO sink is specified? with this handle i need to do something like:

asink.props.device = "hw:CARD=device"

how/where can i grab the asink?

Awesome; that sounds useful!

I think playbin sets up the sinks automatically by default. So perhaps you need to do one of these things:

  • Ask it for the default-created audio sink object by saying self.player.get_property("audio-sink") or similar.
  • Construct a new (non-fake) audio sink object and assign it to the audio-sink property in the same way we assign to the video-sink property.

Either way, I think the audio-sink property of playbin is what you’re after.