<div dir="ltr"><div><div><div><div><div><div><div><div>Hello All,<br><br></div>Now new-buffer signal is removed in gstreamer1.0 how can we access the buffers.<br><br></div>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)<br>
<br></div>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.<br><br></div>I am doing it in following way for audio buffer and simillarly for video buffer.<br>
<br> g_signal_emit_by_name (sink, "pull-sample", &sample,NULL);<br> if (sample) {<br><br> buffer = gst_sample_get_buffer (sample);<br> <br> gst_buffer_map (buffer, &map, GST_MAP_READ);<br>
g_print("\n size=%d\n",map.size);<br><br>fwrite(map.data, 1, map.size,data->audio_file);<br> gst_sample_unref(sample);<br> gst_buffer_unmap (buffer,&map);<br><br></div>If i simply use GstBuffer i get below critical warnings and some junk data is written into file.<br>
g_signal_emit_by_name (sink, "pull-sample", &buffer,NULL);<br><br>GStreamer-CRITICAL **: gst_buffer_map_range: assertion `GST_IS_BUFFER (buffer)' failed<br><br></div>Please help.. Thanks in advance<br><br>
</div>Regards<br></div>Jyoti<br><div><div><div><br></div></div></div></div>