[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [libmicrohttpd] JPEG Streaming with libmicrohttpd

From: David J Myers
Subject: RE: [libmicrohttpd] JPEG Streaming with libmicrohttpd
Date: Thu, 11 Nov 2010 15:35:06 -0000

Hi Christian,
Thanks for the response. The infinite method is the one I need, but could
you give me a bit more detail on the MHD calls I need to make.

I don't understand how to send each response part ie how to make an
incremental response. In my callback, I can call
MHD_Create_response_from_Data then MHD_queue_response, multiple times, but
these responses won't be sent until the callback returns which won't work.

Thanks again,

-----Original Message-----
From: Christian Grothoff [mailto:address@hidden 
Sent: 11 November 2010 15:04
To: libmicrohttpd development and user mailinglist
Cc: David J Myers
Subject: Re: [libmicrohttpd] JPEG Streaming with libmicrohttpd

Dear David,

MHD does very little for you here.  You'll need to set the content type
(MHD_add_response_header) and then somehow create the response with the 
boundaries yourself.  Depending on the requirements of your application, you

can either create it in-memory a-priori (if the stream is fixed size and 
small) or incrementally with the possibility of making the stream infinite
size (choose there respective MHD method to create the response object).

Either case will work, and in either case MHD will not help with the 
formatting of the response.

I hope this helps a bit.



On Thursday, November 11, 2010 01:30:52 pm David J Myers wrote:
> Hi, I'm new to libmicrohttpd and I want to implement a motion JPEG stream.
> Could someone please show me how to build the following responses ie. A
> multipart response stream. This is what I want to send back to the client
> when I receive the GET :-
> HTTP Code: 200 OK
> Content-Type: multipart/x-mixed-replace; boundary=myboundary
> --myboundary
> Content-Type: image/jpeg
> <JPEG Image data>
> --myboundary
> Content-Type: image/jpeg
> <JPEG Image data>
> --myboundary
> .
> Thanks for your time
> David
No virus found in this incoming message.
Checked by AVG - 
Version: 9.0.869 / Virus Database: 271.1.1/3248 - Release Date: 11/10/10

reply via email to

[Prev in Thread] Current Thread [Next in Thread]