Regarding buffer size
Shilpa Chandrappa
elites.shilpa at gmail.com
Mon Jan 6 04:26:33 PST 2014
Linking libgstbase solved the issue.
I am able to receive chunks of data. In the below code I am pulling 8192
Bytes of data every time. If size is less than this, Looks like function is
dropping the data. How to manage, not to drop any data ? And also I cant
pass < 8192Bytes to API function.
static void new_buffer (GstElement *sink, CustomData *data) {
GstBuffer *buffer;
GstAdapter *adapter;
const guint8 *data1;
GstFlowReturn ret = GST_FLOW_OK;
adapter = gst_adapter_new();
g_signal_emit_by_name (sink, "pull-buffer", &buffer);
if (buffer) {
gint size=GST_BUFFER_SIZE(buffer);
g_print("\nsize=%d \n",GST_BUFFER_SIZE(buffer));
gst_adapter_push (adapter, buffer);
printf("fwrite %d\n",fwrite(GST_BUFFER_DATA(buffer), 1,
GST_BUFFER_SIZE(buffer),data->fp));
while (gst_adapter_available (adapter) >= 8192 )
{
data1 = gst_adapter_peek (adapter,8192);
gst_adapter_flush (adapter, 8192);
API(data1,8192);
}
gst_buffer_unref (buffer);
}
}
Thanks,
Shilpa
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Regarding-buffer-size-tp4664396p4664489.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list