plugin: importers: Support different template and actual caps

Make a template caps during class_init. It will be used for e.g. gst-inspect-1.0, while do and use an actual caps that current HW can handle.
This commit is contained in:
Rafał Dzięgiel
2022-05-25 20:30:56 +02:00
parent 5b89879031
commit 3f7ba0674f
7 changed files with 47 additions and 30 deletions

View File

@@ -695,9 +695,10 @@ gst_clapper_sink_get_times (GstBaseSink *bsink, GstBuffer *buffer,
static GstCaps *
gst_clapper_sink_get_caps (GstBaseSink *bsink, GstCaps *filter)
{
GstClapperSink *self = GST_CLAPPER_SINK_CAST (bsink);
GstCaps *result, *tmp;
tmp = gst_pad_get_pad_template_caps (GST_BASE_SINK_PAD (bsink));
tmp = gst_clapper_importer_loader_make_actual_caps (self->loader);
if (filter) {
GST_DEBUG ("Intersecting with filter caps: %" GST_PTR_FORMAT, filter);