[FFmpeg-devel] [PATCH] SHOUTcast HTTP Support

Micah Galizia micahgalizia
Wed Jan 27 04:04:54 CET 2010

On 01/25/2010 10:25 AM, Ronald S. Bultje wrote:
> Hi,
> 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.

OK, I'll check out mov and try to find the demuxer chaining on the 
mailing list.

>> 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.

I just want to make sure I'm understanding correctly... This means that 
HTTPProtocol cannot strip out the header any more so that the shoutcast 
demuxer will be able to parse it.  This goes for plain HTTP streams too. 
  Thats fine with me, but the HTTPProtocol wouldn't really work by 
itself anymore, which is fine because the shoutcast demuxer will be there.

> Other than that, it's starting to look good, thanks for you work!

TY. I know it is slow going, so I appreciate the help and feedback.
Micah F. Galizia
micahgalizia at gmail.com

"The mark of an immature man is that he wants to die nobly for a cause, 
while the mark of the mature man is that he wants to live humbly for 
one."   --W. Stekel

More information about the ffmpeg-devel mailing list