(bind-func new_preroll
(lambda (sink:GstAppSink* data:gpointer)
(let ((sample (gst_app_sink_pull_preroll (cast sink i8*)))
(caps (gst_sample_get_caps sample))
(st (gst_caps_get_structure caps 0))
(gv (gst_structure_get_value st "framerate"))
(num (gst_value_get_fraction_numerator gv))
(denom (gst_value_get_fraction_denominator gv))
(playz (tref (cast data userdata*) 1))
(quad (tref (cast data userdata*) 0)))
(cond ((= quad 1) (set! vplay1 #t))
((= quad 2) (set! vplay2 #t))
((= quad 3) (set! vplay3 #t))
((= quad 4) (set! vplay4 #t)))
;; (printf "Preroll[%d]: %s\n" quad (gst_caps_to_string caps))
GST_FLOW_OK)))