[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-filesystem-dev
Subject:    [Filesystem-dev] CN-Client: Misc. Shoutcast Fixes
From:       milko <milko () real ! com>
Date:       2005-01-25 1:15:21
Message-ID: 5.1.0.14.2.20050124171059.032182d0 () mailone ! real ! com
[Download RAW message or body]


Modified by: milko@real.com

Reviewed by: Bob Clark, Aaron Colwell, Jamie Gordon

Date: 1/24/2005

Project: HTTP Streaming

-Code review form------------------------------------------

Synopsis: Misc. Shoutcast Fixes

Overview:
   This change improves the detection and hadling of shoutcast/icecast
streams. It is not a perfect solution but rather an incremental
improvement from prior state.
   The issue with shoutcast or icecast streams in current implementation
was that HTTP file system associated such streams with MP3 datatype.
Unfortunately this is no longer the case as Ogg and AAC are possible
datatypes that are delivered via live HTTP streaming (ice cast).
The exiting implementation in HTTP file system lumped all headers from
non standard HTTP response into the content body and automatically
routed it to MP3 file format for parsing.  A patch was present to
exclude Ogg streams from such treatment through simple scan for Ogg
content-type in the first packet received.  As the first packet
received did not necessarily contain all the response headers, this was
unreliable and did not cover other non-MP3 datatypes.
The existing logic also had robustness issues when response headers
spanned multiple packets by re-running the shoutcast/icecast detection
logic over header fragments.

The change accomplishes the following improvements:
- HTTP file system runs shoutcast/icecast detection logic only on start of
   response data
- HTTP file system determines shoutcast/icecast type only after substantial
   response data has been received (1024bytes)
- mp3 file format does not fail when file system cannot provide file
   size information (as is case for HTTP live streams)
- AAC file format does not fail when file system cannot provide file
   size information (as is case for HTTP live streams)

The heuristic for differentiating among standard HTTP, MP3 live and
non-MP3 live HTTP streams:
1 - if response starts with HTTP and does not contain "icy-metaint" in
     the first received response packet, normal HTTP is assumed
2 - if not 1 and
     icecast detected by "ICY" in response and
     content-type is present in starting 1K of response data and
     mp3 mime type is absent from starting 1K of response data
     a non MP3 icecast stream is assumed
3 - if not 1 and
     not 2
     mp3 live stream over HTTP is assumed

Files Modified:

/filesystem/http/httpfsys.cpp,v
/filesystem/http/httpfsys.h,v

/datatype/aac/fileformat/aacff.cpp,v

/datatype/mp3/fileformat/mp3ff.cpp,v

Image Size and Heap Use impact:
Negligible

Platforms and Profiles Affected:
all platforms, all profiles

-----------------------------------------------------------

Platforms and Profiles Build Verified:
windows for
helix-client-all-defines.pf

Platforms and Profiles Functionality verified:
windows
helix-client-all-defines.pf

Branch:
HEAD

QA Instructions:
- Verify http playback
- Verify http playback of shoutcast and icecast mp3 and Ogg streams
   (AAC still requires further work in file format)



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic