Android 6.0 gstreamer 1.0: frame is not writable
Gregoire Gentil
gregoire at gentil.com
Wed Nov 25 12:40:14 PST 2015
Hello,
Do understand that the same code is working on Nexus 7 2013 running
Android 5.1.1.
To answer precisely your question, I do:
playbin uri=... video-sink="... ! glimagesink"
video_sink = gst_bin_get_by_interface(GST_BIN(bin), GST_TYPE_VIDEO_OVERLAY);
GstPad *pad = gst_element_get_static_pad(video_sink, "sink");
gst_pad_add_probe(pad, GST_PAD_PROBE_TYPE_BUFFER,
(GstPadProbeCallback)cb, NULL, NULL);
Grégoire
On 11/25/2015 12:20 PM, Olivier Crête wrote:
> Hi,
>
> What is your pipeline? Where are you putting the probe in it?
>
> Olivier
>
> On Wed, 2015-11-25 at 12:01 -0800, Gregoire Gentil wrote:
>> 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
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list