[MPlayer-dev-eng] problem in seek bar functionality
Bertrand Baudet
bertrand_baudet at yahoo.com
Wed Apr 24 00:36:20 CEST 2002
On Sunday 21 April 2002 05:17 am, Abhijeet Phatak wrote:
> hi,
> i hacked Windows Media Player Commands through
> proxy server, and got information about how HTTP on
> MMS Server works.
Hehe, you should have asked me for those info!
The way it works for HTTP:
1) connect to the mms server and request for the stream
with an HTTP GET,
the server will answer back with the ASF Header as the
payload of the HTTP reponse.
2) The ASF Header is parsed to know the properties
of the stream: codec, number of channels and other stuff.
3) another HTTP GET request is sent to the mms, this thime
with some pragma:
the xPlayStrm=1 will ask the mms to start send the stream
and the stream-switch-* are the channels of the stream you
want to receive.
I found out what this stream-switch-entry=ffff:1:0 ffff:2:0 means:
the 4 f, that I don't know but the other stuff are the channel
number followed by 0 for channel requested and 2 for not requested.
Your example only has 2 channels, one for audio and one for video.
But for a MBR (MultiBitRate) stream you can have several video stream.
Depending on the connection you have (28.8k/56k/DSL/T1) you will have
to request a different bitrate stream this will be done by reading the
ASF MBR object from the ASF header to get a list of bitrate available,
then by setting the stream-switch-entry:
For example:
channel ID Max_bitrate Type
1 8623 Audio
2 9832 Video
3 14108 Video
4 26740 Video
5 89897 Video
All the video channels are "Mutual Exclusion Video Streams", that means
you can't receive all the video channel just one of them.
Let say you are behind 28.8k modem, you can receive the at least the channel
1 and 3, so the the pragma will be:
stream-switch-entry= ffff:1:0 ffff:2:2 ffff:3:0 ffff:4:2 ffff:5:2
This is not done yet in Mplayer, I need to find some time
to put this in. I haven't seen so much MBR stream out there
so we should be fine for now...
There are other details in the HTTP header, but it will be too long
to describe, just ask me and I can tell you.
Note that for the mmst there should be an equivalent to select the
channel.
To finish with the hand shake, once you made the 1 request you have the
ASF header, so you request the channel you want in the second http request.
you don't need to remake the 1st request every time you want to seek since
you already got the ASF header. You just need to send the second request
with the proper timestamp in the "stream-time" variable.
I have no idea about the stream-offset, but AFAIR it's always the same value.
[...]
> 1st)When the FORWARD/REVERSE button is pressed
> ,windows media player closes the current connection
> and creates a fresh connection.I doubt that the POST
> request( i have given as No. 5 & No. 8) is used to
> close the connection.So he is getting all the headers
> again ,and i have no way restart that movie again
> according to the new connection parameters??
The POST connection is just to report some stat
like TSP (Time Spent Listening) hardware/OS and other
crap that MS wish to know about you.
You can easily drop this POST connection, nothing
will stop working ;)
> 2nd) How do i flush the cache and rebuffer it again??
I have no idea.
Arpi any entries on that?
> With my limited knowledge i have written some code(but
> its incomplete).If u want i can post that code(i didnt
> post it here becoes this mail is already quiet long
Yeh, sure send it I will have a look at it.
> can u give me any idea of how to go about solving this
> problems i mentioned above.
>
> any help will be highly appreciated.
> thanking u in advance.
I hope that helps
Bertrand
More information about the MPlayer-dev-eng
mailing list