(bind-func playbin_bus_call:[void,GstElement*,GstMessage*,userdata*]*
(lambda (bus msg data)
(let ((playz (tref (cast data userdata*) 1))
(msgtype (tref msg 1))
(time (tref msg 2))
(seq (tref msg 4)))
(cond ((<> (& GST_MESSAGE_EOS msgtype) 0)
(printf "END OF STREAM!\n")
(gst_element_set_state playz GST_STATE_NULL)
(gst_object_unref (cast playz gpointer)) ;; does playz release sink?
(free data)
1))
void)))