[FFmpeg-devel] [PATCH 1/2] lavf/http: Parse and/or expose various client data.

Nicolas George george at nsup.org
Thu Aug 20 18:51:26 CEST 2015


Le tridi 3 fructidor, an CCXXIII, Stephan Holljes a écrit :
> In ffserver the User-Agent is used to decide how to deal with a
> client. (WMP being a special case.)

Ok, but that is special case for a specific application.

> That sounds pretty optimistic. Maybe it is trivial for you, but from
> my standpoint it looks like a rather large-ish undertaking to rewrite
> all the header-parsing code to utilize an AVDictionary.

You do not need to change the code to use the dictionary. That would be a
lot of work, but I do not think it would be very interesting. All you need
to do is to is to put all the headers in a dictionary, before the parsing
(or after, but if you do it before, the parsing can alter the buffer, that
is more convenient).

In http.c, near "!av_strcasecmp(tag, "Location")", you have the header name
in "tag" and its value in "p", just do a av_dict_add() on them with a bit of
tracking for the total number.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150820/2c4e8066/attachment.sig>


More information about the ffmpeg-devel mailing list