GST Java input-selector

168 views
Skip to first unread message

gst...@ccc2.com

unread,
Feb 28, 2012, 3:49:44 AM2/28/12
to gstreamer-java
Hi All,

Does anyone have any examples of using input-selector in the java
framework. I have been hunting for a week without any joy.


Thx
Art

Tal Shalif

unread,
Feb 28, 2012, 10:46:37 PM2/28/12
to gstream...@googlegroups.com
Here is an example - the syntax is python (executed with jython), but should be trivial to write it in Java:

from org.gstreamer import *
from time import sleep

Gst.init()

p = Pipeline.launch("audiotestsrc freq=500 ! input-selector name=sel  ! autoaudiosink  audiotestsrc freq=400 !  sel.  audiotestsrc freq=300 ! sel.")

sel = p.getElementByName("sel")

sel.set("active-pad", sel.getPad("sink0"))
p.play()
sleep(2)
p.stop()
sel.set("active-pad", sel.getPad("sink1"))
p.play()
sleep(2)
p.stop()
sel.set("active-pad", sel.getPad("sink2"))
p.play()
sleep(2)
p.stop()




--
You received this message because you are subscribed to the Google Groups "gstreamer-java" group.
To post to this group, send email to gstream...@googlegroups.com.
To unsubscribe from this group, send email to gstreamer-jav...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gstreamer-java?hl=en.


gst...@ccc2.com

unread,
Mar 5, 2012, 7:34:33 PM3/5/12
to gstreamer-java
thanks Tal, that helped as a good starting point.

Art

Reply all
Reply to author
Forward
0 new messages