new-buffer signal in appsink
jyoti kulkarni
jyotimk029 at gmail.com
Thu Aug 22 23:40:52 PDT 2013
Hello All,
Now new-buffer signal is removed in gstreamer1.0 how can we access the
buffers.
Now i am using "new-sample" and writing it to a file. (the samples what i
get is decoded video/audio buffers of huge size)
since GstSample can hold only small amount of data iam able to write only
single sample. how should i write all the samples to the files.
I am doing it in following way for audio buffer and simillarly for video
buffer.
g_signal_emit_by_name (sink, "pull-sample", &sample,NULL);
if (sample) {
buffer = gst_sample_get_buffer (sample);
gst_buffer_map (buffer, &map, GST_MAP_READ);
g_print("\n size=%d\n",map.size);
fwrite(map.data, 1, map.size,data->audio_file);
gst_sample_unref(sample);
gst_buffer_unmap (buffer,&map);
If i simply use GstBuffer i get below critical warnings and some junk data
is written into file.
g_signal_emit_by_name (sink, "pull-sample", &buffer,NULL);
GStreamer-CRITICAL **: gst_buffer_map_range: assertion `GST_IS_BUFFER
(buffer)' failed
Please help.. Thanks in advance
Regards
Jyoti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130823/dd47a704/attachment.html>
More information about the gstreamer-devel
mailing list