(bind-func new_sample
(lambda (sink:GstAppSink* data:gpointer)
(let ((sample (gst_app_sink_pull_sample (cast sink i8*)))
(caps (gst_sample_get_caps sample))
(buffer (gst_sample_get_buffer sample))
(dat:i8* null)
(xsize:gsize 0)
(quad (tref (cast data userdata*) 0)))
;;(printf "Playing back on quad:%d\n" quad)
(set! dat sampledata1)
(set! xsize (gst_buffer_extract buffer 0 dat (* 3 600 400)))
(if (= xsize (* 3 600 400))
(cond ((= quad 1) (set! sampledata1dirty #t))
)
(cond ((= quad 1) (set! sampledata1dirty #f))
))
GST_FLOW_OK)))