On 9/12/2010 12:56 PM, Ronald S. Bultje wrote:
Hi,

On Sun, Sep 12, 2010 at 11:45 AM, Mike Edenfield<[email protected]>  wrote:
I'm using avformat and avcodec to stream audio data from a media server over
HTTP. The server is expecting certain HTTP headers in the GET request, but
otherwise works like any other HTTP client.

Please look at ff_http_set_headers() in libavformat/http.h. This is
currently private API so don't expect anything in terms of ABI/API
stability, but it does what you want.

Thanks! This should work fine, since I'm linking the libs into the application statically anyway.

Just to make sure I'm not missing something obvious: In order to use ff_http_set_headers, I can no longer call av_open_input_file. I'll have to replicate that method locally instead, to get the custom headers set where they need to be. It appears I need to do something like this:

url_alloc()
ff_http_set_headers()
url_connect()
url_fdopen()
ff_probe_input_buffer()
av_open_input_stream()

Does that look about right?

--Mike
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to