How to get pointer to a gstBuffer with QtGSTreamer
pfarmer
flacone at gmx.de
Wed Apr 18 01:42:35 PDT 2012
Sorry. Strange. Here again:
Thanks
I actualy would like to have the data from the buffer. So that would be
ideal:
bufferptr->data().
And it works. This was what I was searching for. Simple enough.
So the newBuffer() function looks like this:
virtual QGst::FlowReturn newBuffer()
{
bufferPtr = pullBuffer();
unsigned char* imageData = static_cast<unsigned char*>(bufferPtr->data());
m_image->image.setValue(SbVec2s(resX,resY), bytesPerPixel, imageData );
return QGst::FlowOk;
}
Is this good to use?
Is it garanteed that the data in the Buffer stayes untouched during the copy
process in the image.setValue() function? Or do I have to take special care?
data() function returns a pointer to quint8. So I have to assume that quint8
is the same as uchar on the machine. Is there a better way for the
conversion?
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-get-pointer-to-a-gstBuffer-with-QtGSTreamer-tp4564129p4567067.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list