[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] JPEG Streaming with libmicrohttpd
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] JPEG Streaming with libmicrohttpd |
Date: |
Thu, 11 Nov 2010 17:12:11 +0100 |
User-agent: |
KMail/1.13.2 (Linux/2.6.32-25-generic; KDE/4.4.2; i686; ; ) |
Dear David,
You must use 'MHD_create_response_from_callback', not 'from_data'; use
MHD_SIZE_UNKNOWN for the size argument and your data will be transmitted while
you're still (incrementally) creating the response.
Happy hacking,
Christian
On Thursday, November 11, 2010 04:35:06 pm David J Myers wrote:
> 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,
> David
>
> -----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
> header
> (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
> in
> 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.
>
> Best,
>
> Christian
>
> 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 - www.avg.com
> Version: 9.0.869 / Virus Database: 271.1.1/3248 - Release Date: 11/10/10
> 19:34:00
- [libmicrohttpd] JPEG Streaming with libmicrohttpd, David J Myers, 2010/11/11
- Re: [libmicrohttpd] JPEG Streaming with libmicrohttpd, Christian Grothoff, 2010/11/11
- RE: [libmicrohttpd] JPEG Streaming with libmicrohttpd, David J Myers, 2010/11/12
- Re: [libmicrohttpd] JPEG Streaming with libmicrohttpd,
Christian Grothoff <=
- RE: [libmicrohttpd] JPEG Streaming with libmicrohttpd, David J Myers, 2010/11/12
- Re: [libmicrohttpd] JPEG Streaming with libmicrohttpd, Christian Grothoff, 2010/11/11
- RE: [libmicrohttpd] JPEG Streaming with libmicrohttpd, David J Myers, 2010/11/12
- Re: [libmicrohttpd] JPEG Streaming with libmicrohttpd, Christian Grothoff, 2010/11/11
- RE: [libmicrohttpd] JPEG Streaming with libmicrohttpd, David J Myers, 2010/11/12
- Re: [libmicrohttpd] JPEG Streaming with libmicrohttpd, Erik Slagter, 2010/11/12