[MPlayer-dev-eng] [PATCH] Following ASF redirections and detecting ASX playlist
bl4
bl4 at playker.info
Sun Apr 20 00:30:47 CEST 2008
Hi,
I've made a patch that fixes problems with ASF streaming I came across
when streaming Yahoo Launchcast. In response to an HTTP request, server
replies with an ASF content-type and a single URL in the content.
Instead of following this URL and making another request, mplayer wants
to stream the original URL and fails. Before I made this patch, I had to
write a Perl script that followed these redirections until it received
an MMS URL. Then the script passed the URL to mplayer.
With this patch, when an HTTP response is received with an ASF
content-type, mplayer checks if the content starts with `http://` or
`mms://`. If it does, it makes another HTTP request (if http) or changes
the current URL to the new one (if mms).
The second problem is ASX playlist detection. If mplayer is started with
-playlist option, everything is fine, but I think it should be the
player, not the user, that checks if the URL is a playlist. Especially
if one uses mplayer plugin in a web browser and doesn't have chance to
modify mplayer command line.
mplayer only checks the content-type. If it's an ASX content-type, the
URL is treated as playlist. But if it's an ASF content-type, the URL is
always treated as stream. mplayer doesn't check the content, even if it
contains a playlist. With this patch, when the content-type of an HTTP
response indicates ASF, mplayer checks if the content starts with `<asx`.
bl4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asf_redirect_playlist.patch
Type: text/x-patch
Size: 1596 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080420/66daf0de/attachment.bin>
More information about the MPlayer-dev-eng
mailing list