Hi,
I am developing an application which serves video and picture files
according to the URL.
Pictures are getting served properly using the callback mechanism. But
for video only the MHD_ContentReaderFreeCallback is getting called, not
the MHD_ContentReaderCallback . I know that this might not have anything
to do with picture or video.
The picture and video file sizes are not that different.
If someone has any idea why this happens, please let me know.
Regards,
Kiran G
Some relevant code:
================
debug("file : %s : found1 ", full_file_path);
response = MHD_create_response_from_callback(buf.st_size,
32 * 1024,
&file_reader, file, &file_free_callback);
if (NULL == response) {
debug("Unable to create response");
return MHD_NO;
}
MHD_add_response_header(response, "Content-Type",
"video/mp2t");
/* ret = */MHD_queue_response(connection, MHD_HTTP_OK,
response);
================