I need to add a custom stream-property to my gstreamer player command, however when I try to set the property as an integer, it doesn't get passed to pulseaudio. For example:
gst-launch-1.0 audiotestsrc wave=ticks ! audioconvert ! pulsesink stream-properties="props,application.name=mytestapp,custom.property=200"
doesn't work, but if I make the custom property a string:
gst-launch-1.0 audiotestsrc wave=ticks ! audioconvert ! pulsesink stream-properties="props,application.name=mytestapp,custom.property=twohundred"
it works perfectly. However I need the property to be an integer for pulseaudio to handle it. What can I do?
After a lot of trial and error I found that this works:
gst-launch-1.0 audiotestsrc wave=ticks ! audioconvert ! pulsesink stream-properties="props,application.name=mytestapp,custom.property=(str)200"
Technically it passes 200 as a string to pulseaudio, but that's enough for pulse to parse it into an integer.