5 implementations of xtm_play:
#1
/digego/extempore/tree/v0.8.9/libs/core/instruments.xtm ·
#2
/digego/extempore/tree/v0.8.9/examples/contrib/mediaplayer.xtm ·
#3
/digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm ·
#4
/digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm ·
#5
/digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
;; path must be a valid URI to media
(bind-func xtm_play
(lambda (path)
(gst_init null null)
(let ((playz (gst_element_factory_make "playbin" "play"))
(bus (gst_pipeline_get_bus (cast playz GstPipeline*)))
(gval:GValue* (alloc)))
(g_value_init gval G_TYPE_STRING)
(g_value_set_string gval path)
(g_object_set_property (cast playz GObject*) "uri" gval)
(gst_bus_add_watch bus (cast (llvm_get_function_ptr "_playbin_bus_call_native") GstBusFunc) (cast playz gpointer))
(gst_object_unref bus)
(gst_element_set_state playz GST_STATE_PLAYING)
1)))