<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I'm modifying the OpenCV disparity plugin to get at the raw 16-bit signed disparity values, if the downstream caps request "video/x-raw,format=GRAY16_LE". After some headache,
I managed to get the caps negotiation to work so that either RGB or GRAY16_LE could be obtained from the source pad. I was still running into trouble trying to use the buffers in pipelines, though, most notably when I tried to use videoconvert on them to
prep them for encoding or display, I would get a message like this with every video frame:<br>
<br>
<pre>** (gst-launch-1.0:9670): CRITICAL **: gst_video_frame_map_id: assertion 'info->finfo->format == meta->format' failed
WARNING: from element /GstPipeline:pipeline0/GstVideoConvert:videoconvert0: Internal GStreamer error: code not implemented. Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.
Additional debug info:
gstvideofilter.c(292): gst_video_filter_transform (): /GstPipeline:pipeline0/GstVideoConvert:videoconvert0:
invalid video buffer received<br><br><font face="Tahoma">I didn't realize that just getting the caps set wasn't enough, and that there was essentially another copy of some of the caps data in meta data embedded in the buffer.<br><br>What is the correct way to modify this meta data? As it is, I'm basically doing:<br><br>GstVideoMeta *meta = gst_buffer_get_video_meta (buffer);<br>meta->format = GST_VIDEO_FORMAT_GRAY16_LE;<br>ret = gst_pad_push (srcpad, buffer);<br><br>...that works, pipelines are happy, but it seems like a hack. Is there a more preferred way of doing this? It seems like maybe this plugin should derive from GST_TYPE_VIDEO_FILTER instead of GST_TYPE_ELEMENT, so that GstBaseTransform::transform_meta could be hooked into, although I'm not sure I have time to rewrite the plugin to that extent at the moment.<br><br>Thanks for any insight!<br></font></pre>
</div>
</body>
</html>