I've been writing an element that takes input from a stereo camera that
outputs the two camera's images as raw Bayer patterns that are byte by byte
interleaved. So far I have the element working so that I am using a
transform function to manually copy rather than transform it in place. This
lets me at least select which camera to output. I am now working to make
the element so that it can start to convert the Bayer pattern over to RGB.
To do that, I have done the following things:
* I have changed my static pad source template from GST_STATIC_CAPS
("video/x-raw)
to GST_STATIC_CAPS ("video/x-raw, format=(string)RGB")
* I have added a transform_caps function because the input and output will
now be differently sized.
* I have added this line in my _init function:
trans_class->transform_caps = GST_DEBUG_FUNCPTR
(gst_ocamElement_transform_caps);
* I have modified my transform function so that at the moment it simply
copies the data from one camera into all three channels of the RGB image so
that I should just see a black and white version of the Bayer pattern.
1. (EDIT) Figured this one out mostly.
2. I haven't found any good documentation about how to properly implement a
transform_caps function so I have mostly just copied it from another
element. Is there any sort of documentation about what you are supposed to
do with this function? I don't think that my error is in there but I think
that I may run into issues later because I don't really understand what is
going on here.
3. How is the size of the output buffer arrived at? I am working off of
the assumption that Gstreamer is looking at the width and height of my input
buffer and seeing that the output is now RGB so it should give me
width*height*3 bytes. Is that correct?
--
Sent from:
http://gstreamer-devel.966125.n4.nabble.com/_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel