problom with constructing GstBuffer

Sebastian Dröge sebastian at centricular.com
Tue Jan 7 05:37:58 PST 2014


On Di, 2014-01-07 at 05:11 -0800, Ugly Face wrote:
> Thanks for your kindly reply. 
> I change my code like this:
> 
> memcpy(GST_BUFFER_DATA(buffer) , (*env)->GetByteArrayElements(env, fdata, 
> JNI_FALSE), data_len);
> //GST_BUFFER_DATA (buffer) = (*env)->GetByteArrayElements(env, fdata, 
> JNI_FALSE);
> 
> and the program dose not exit with error anymore . However, the pipe still
> does not work properly . I wonder if more paramters of gstbuffer should be
> set to get things work? 
> 
> My gstbuffer is construced like this:
> 
> [...]
> 
> do you think it wil work with raw NV21 data?

Well, in theory this can all be made to work, yes. How does it not work
properly and what's the other code and where does the Java array come
from? You need to make sure that it's in exactly the format that
GStreamer expects (so what you've set up via the caps, plus using the
correct stride and plane offsets and everything).

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140107/47936eaf/attachment.pgp>


More information about the gstreamer-devel mailing list