player gst Pipeline playbin source gst element_factory_make filesrc fi

1
2
3
4
5
6
7
8
9
player = gst.Pipeline("playbin")
source = gst.element_factory_make("filesrc", "file-source")
target = gst.element_factory_make("filesink", "file-target")
decodebin = gst.element_factory_make("decodebin2","decodebin2")
aasink = gst.element_factory_make("autoaudiosink","autoaudiosink")
neon = gst.element_factory_make("neonhttpsrc","neon")
player.add(source, target, decodebin, aasink, neon)
player.get_by_name("file-source").set_property("location", 'http://localhost/file.mp3')
player.set_state(gst.STATE_PLAYING)