Is error "transform_caps returned caps which are not a real subset of the filter caps" a "safe" error?
José Carlos Cazarin Filho
jose at au-zone.com
Fri Mar 11 20:33:45 UTC 2022
Hello! I'm writing a custom element that, depending on which element it is connected to, I get the following error:
0:00:00.146996442 2491 0xaaaafa871000 ERROR basetransform gstbasetransform.c:482:gst_base_transform_transform_caps:<custom_element> transform_caps returned caps video/x-raw, format=(string){ RGB, NV12, I420, YV12, NV21, YUYV, YVYU, UYVY, VYUY, NV16, NV61, YUY2 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] which are not a real subset of the filter caps video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080
** (gst-launch-1.0:2491): WARNING **: 20:26:35.991: customelement0 : transform_caps returned caps which are not a real subset of the filter caps
But the pipeline doesn't break, it works just fine.
For this custom element I wrote the following transform_caps function:
static GstCaps*
transform_caps(GstBaseTransform* trans,
GstPadDirection direction,
GstCaps* caps,
GstCaps* filter)
{
if (direction == GST_PAD_SINK) {
filter = gst_caps_from_string(
GST_TENSOR_CAP_DEFAULT
";" GST_TENSORS_CAP_MAKE("{ static, flexible }"));
} else if (direction == GST_PAD_SRC) {
filter = gst_caps_from_string(
GST_VIDEO_CAPS_MAKE("{ RGB, NV12, I420, YV12, NV21, YUYV, YVYU, "
"UYVY, VYUY, NV16, NV61, YUY2 }"));
}
return filter;
}
The element is used in a machine learning pipeline, and it should receive video frames with the caps referred in the code snippet, and it will output tensors, that's why I used the NNStreamer defines (namely GST_TENSOR_CAP_DEFAULT, GST_TENSORS_CAP_MAKE ) when the direction is GST_PAD_SINK.
I want to know if there's something wrong in that transform_caps, because the error doesn't break the pipeline nor it always happens. Or can I just ignore this error?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220311/c8f9a1b8/attachment.htm>
More information about the gstreamer-devel
mailing list