[MPlayer-users] Seekable http streams are not reporting stream length. Can they?
The Wanderer
inverseparadox at comcast.net
Sun Aug 3 13:20:09 CEST 2008
Brian L. wrote:
> I am using mplayer to play audio files over http. I was immediately
> impressed that seeking in the media file was supported out of the box
> using http ranges.
>
> Unfortunately, the http stream implementation doesn't report the
> stream length back to mplayer, even when the stream length is known
> based on a Content-Length header, so streams appear with
> unknown/zero/bad lengths, like this:
>
> A: 6.1 (06.1) of -0.3 (unknown) 0.0% 45%
>
> The same file played from the local filesystem shows up like this:
>
> A: 2.0 (01.9) of 237.0 (03:57.0) 0.1%
>
> It seems like adding something to stream/http.c like this:
>
> char *tmp = http_get_field(http_hdr, "Content-Length");
> if (tmp)
> {
> stream->end_pos = atoi(tmp);
> }
>
> in nop_streaming_start in the case 200: // OK case would cause the
> information to be reported back and (presumably) show up in the
> feedback on mplayer's stdout.
>
> Is there a reason not to do this? Can this feature be added?
Write up a patch (following DOCS/tech/patches.txt) and submit it to
mplayer-dev-eng, and see what they say. At a glance, I don't think
there's any reason this would be rejected.
--
The Wanderer
Warning: Simply because I argue an issue does not mean I agree with any
side of it.
Secrecy is the beginning of tyranny.
More information about the MPlayer-users
mailing list