also you can get the caps directly from the sample with gst_sample_get_caps shich might be faster than getting the static pad for the sink which is probably locking the pipeline temporarily somehow