problom with constructing GstBuffer

Sebastian Dröge sebastian at centricular.com
Sun Jan 5 01:46:34 PST 2014


On Fr, 2014-01-03 at 05:55 -0800, Ugly Face wrote:
> I am developping a android program. I need to push NV21 raw video data into
> pipeline which will transmit it with rtp. I use appsrc .
> 
> code is like this:
> 
> static void gst_native_push_data(JNIEnv * env, jobject thiz, jbyteArray
> fdata)
> [...]
> with error like this :gstvideorate.c:830:gst_video_rate_event:<videorate>
> Got segment but doesn't have GST_FORMAT_TIME value

Set the format property on appsrc to TIME.

> I think I did not construct a Gstbuffer properly and I don't kwon what dose
> this message mean.
> [...]
> with warning log like this:
> 01-03 21:51:03.750: W/GStreamer+bin(3310): 0:00:11.178009032 0x58faf9a0
> gstbin.c:2399:gst_bin_do_latency_func:<pipeline0> failed to query latency
> I do not know what is the meaning od this .

That's something you can ignore. Or just upgrade to GStreamer 1.x

> at last , the program fail with :
> 01-03 21:54:08.414: A/libc(3310): Fatal signal 11 (SIGSEGV) at 0x00000018
> (code=1), thread 3332 (appsrc:src)

That not so much. Please get a backtrace of the crash.

I suspect this is because you just set GST_BUFFER_DATA() to the Java
array elements. You need to make sure that the Java array (and the
native memory of the elements) stays around until the buffer is
destroyed. Look at the JNI ref handling, and set a freefunc with
appropiate mallocdata to the GstBuffer.

-- 
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/20140105/2bd16c94/attachment.pgp>


More information about the gstreamer-devel mailing list