[FFmpeg-devel] [PATCH] SHOUTcast HTTP Support
Ronald S. Bultje
Mon Jan 25 16:25:38 CET 2010
On Sun, Jan 24, 2010 at 3:20 PM, Micah F. Galizia
<micahgalizia at gmail.com> wrote:
> This implementation just wraps the mp3 demuxer. ?I'm able to do this because
> the mp3 demuxer doesn't actually use private data
> (AVFormatContext::priv_data). ?If this changes, or wrapping a different
> demuxer that use priv_data is necessary, the shoutcast demuxer could
> maintain a pointer to the wrapped demuxers private data, and swap it before
> calling into the wrapped demuxer.
As Michael said, you can open a new demuxer from this demuxer, that's
e.g. what the mov demuxer does for dv, etc. I think that's cleaner.
> The read_probe method of the demuxer is a little long because AVProbeData
> does not include any way to reference the URLContext that has already been
> opened. As a result, I have to open a new one to check if the stream
> supports ICY.
You're getting closer, but what I meant is that you should find some
way to transfer the HTTP header metadata into the probe function of
shout, so it can parse the metaint straight from the AVMetadata,
rather than re-opening the connection. If this needs any changes in
AVProbeData, we can certainly consider them.
Other than that, it's starting to look good, thanks for you work!
More information about the ffmpeg-devel