sample: add compare function for GstSample