[FFmpeg-devel] [PATCH][GSoC] lavf/http: Parse and set HTTP method when listening on HTTP(S)

Stephan Holljes klaxa1337 at googlemail.com
Tue Jun 2 01:47:17 CEST 2015


On Mon, Jun 1, 2015 at 10:52 PM, Nicolas George <george at nsup.org> wrote:
> Le tridi 13 prairial, an CCXXIII, Stephan Holljes a écrit :
>> After looking at the ffserver code, I'm wondering if maintaining a
>> list of clients as HTTPContext or custom wrapper structs would make
>> sense.
>> For the time being it would only contain the singular client context
>> which can be accepted right now, but in the future could contain an
>> arbitrary number of clients.
>> Before I start implementing that I would like to know if it is a good
>> choice to do this.
>
> Have you considered the more traditional approach: when a client is
> accepted, create a new AVFormatContext for it?
>
> It seems simpler, and more adapted for various uses, for example if an
> application wants to handle clients in separate threads or even forks. But
> maybe there are benefits to your idea that I have not seen.
>
> Also, that choice seems orthogonal to the question at hand: what do you want
> to do with the method and other connection options?

I agree, I have probably thought a little bit too far ahead.

I hope the attached patches are okay.
I'm somewhat unsure about the first patch, because it checks ret and
sets it explicitly if no other error occurred.
I also added documentation for the method option in HTTPContext.

A related issue is how to autodetect which method is to be expected
when it is not explicitly set.
For example, when listening for a client as an input, a POST request
should be expected, but how do I know that inside http.c?

>
> Regards,
>
> --
>   Nicolas George
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-http-Process-client-HTTP-request-header-before-.patch
Type: text/x-patch
Size: 1782 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150602/bdfbc0b0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavf-http-Process-client-HTTP-methods-and-document-m.patch
Type: text/x-patch
Size: 3134 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150602/bdfbc0b0/attachment-0001.bin>


More information about the ffmpeg-devel mailing list