Android 6.0 gstreamer 1.0: frame is not writable

Gregoire Gentil gregoire at gentil.com
Wed Nov 25 12:01:40 PST 2015


Hello,

On a Nexus5X with Android 6.0 Marshmallow, a frame accessed through a 
pad probe is not writable. The same code works on a Nexus 7 2013 5.x. My 
code is the following:

gst_pad_add_probe(pad, GST_PAD_PROBE_TYPE_BUFFER, 
(GstPadProbeCallback)cb, NULL, NULL);

static GstPadProbeReturn cb(GstPad *pad, GstPadProbeInfo *info, 
CustomData *data) {
GstBuffer *buffer = gst_pad_probe_info_get_buffer(info);
GstMapInfo map;
gst_buffer_map(buffer, &map, GST_MAP_WRITE | GST_MAP_READ);
guint8 *frameIn = (guint8 *)map.data;
...
}

and I get the following warning (before a crash when writing to the frame):

11-25 11:58:14.830: W/GStreamer+default(5277): 0:00:06.511757706 
0xdb0f1320 gstbuffer.c:1613:gst_buffer_map_range:<0xf41fcf40> write map 
requested on non-writable buffer

Any idea what's wrong? Thanks in advance,

Grégoire


More information about the gstreamer-devel mailing list