GTK+ buffer in g_input_stream_read
I load data with function:
gssize g_input_stream_read (GInputStream *开发者_如何转开发stream,
void *buffer, gsize count,
GCancellable *cancellable,
GError **error);
What is ma value of buffer parameter. How can I know what should be equal to buffer?
I make:
#define LOAD_BUFFER_SIZE 65536
But when i try to load image, only visible part of the image.
Thank you.
The buffer
is a pointer to the memory you have allocated to contain what g_input_stream_read
reads. It must be big enough to contain count
bytes.
Could you expand this question, by showing with code samples how you are allocating the memory for buffer
and how you called g_input_stream_read
exactly?
Here is documentation on using g_input_stream_read.
精彩评论