[FFmpeg-devel] [PATCH] SHOUTcast HTTP Support

Micah F. Galizia micahgalizia
Sun Jan 24 21:20:31 CET 2010


On 10-01-18 03:27 PM, Michael Niedermayer wrote:
> On Mon, Jan 18, 2010 at 03:12:31PM -0500, Ronald S. Bultje wrote:
>> Hi,
>>
>> On Mon, Jan 18, 2010 at 2:36 PM, Michael Niedermayer<michaelni at gmx.at>  wrote:
>>> On Mon, Jan 18, 2010 at 02:17:12PM -0500, Ronald S. Bultje wrote:
>>>> [...]http demuxer.
>>>>
>>>> What do others think of this?
>>>
>>> its a protocol not a demuxer :)
>>>
>>> besides this iam not sure how to best implement all that, btw
>>> do other protocols exist that contain metadata at the protocol level
>>> or is this stuff the only known case?
>>
>> MMS, if implemented as a protocol, contains some metadata (which is
>> duplicated in the ASF stream).
>
> if itsin the stream we dont need it from protocol level

I have taken this feedback and added a SHOUTcast demuxer that only 
handles mp3 streams.  I had a look at some vorbis streams, and ffplay 
alrady handles the metadata, so it doesn't appear to actually be using 
SHOUTcast metadata.

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.

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.

This version also has special handling for StreamTitle tags that have an 
"artist - title" format. Eventually, it will probably need an 
AVMetadataConv to handle transation of other fields.

As with the previous version of the patch, there is some throw-away code 
in ffplay for printing chapter metadata that can be ignored.

TIA
-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shoutcast5.patch
Type: text/x-diff
Size: 13622 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100124/676800eb/attachment.patch>



More information about the ffmpeg-devel mailing list