[MPlayer-dev-eng] mmst client patch
Bertrand Baudet
bertrand_baudet at yahoo.com
Wed Apr 17 23:16:29 CEST 2002
On Wednesday 17 April 2002 05:35 am, Abhijeet Phatak wrote:
> hi Bertrand,
>
> > please create a new file asf_mmst_streaming.c and
>
> put all your
>
> > related code in it. I should rename asf_streaming.c
>
> by asf_http_streaming.c
>
> > and have the asf_streaming.c contains only the
>
> asf_streaming_start and the
>
> > shared functions with all the protocols(if there is
>
> any!)...
>
> I have created asf_mmst_streaming.c and put all the
> related code in that file as u suggested.
>
> Please check out the change.
>
> >It's simplier for me than to try to see what you
>
> changed in asf_streaming.c
>
> > For example don't comment out the line 66:
>
> !strncasecmp( proto_s, "mms", 3)
>
> I removed the comment from it.
>
> I would be glad to do changes as u suggest.
>
> Regards.
Ok, I gave it a quick try, but unfortunatly it didn't play any of the
3 streams I tried.
I just popped up the output window and closed it right away.
I suggest you to take care of the warning that are displayed at
compilation time:
asf_mmst_streaming.c: In function `get_header':
asf_mmst_streaming.c:262: warning: passing arg 2 of `get_data' from
incompatible pointer type
asf_mmst_streaming.c:267: warning: passing arg 1 of `get_32' from incompatible
pointer type
asf_mmst_streaming.c: In function `get_media_packet':
asf_mmst_streaming.c:399: warning: passing arg 2 of `get_data' from
incompatible pointer type
asf_mmst_streaming.c:404: warning: passing arg 1 of `get_32' from incompatible
pointer type
I just browsed the code and a few comment that popped up to me:
in the asf_mmst_streaming_start, you are sending commands then you
read the answer but I don't see any fail check! You shouldn't expect
everything to go well.
In addition when you read from a socket, depending on the network
status (congestion or not) you may received the answer in 2 chuncks
of data, so the first chunck will be read when you call read, but the second
one will be stuck in the socket buffer until the next read. So if you know the
size of the data you expect to receive, do some kind of sanity check.
Can you also describe more what the code is trying to do, it will make
the code more easier to understand.
The cmd1, cmd2, 0x5.... are not really easy to understand.
What does this hard coded \IP\Protocol\Port means? Is it always like
this?
\\192.168.0.129\\TCP\\1037\0000
Here is my output if it can help:
(both computers on the same subnet)
MPlayer CVS-020415-13:29-2.96 (C) 2000-2002 Arpad Gereoffy (see DOCS!)
CPU vendor name: GenuineIntel max cpuid level: 2
CPU: Intel Celeron 2/Pentium III Tualatin (Type: 6, Stepping: 1)
extended cpuid-level: 4
Testing OS support for SSE... yes.
Testing OS support for SSE unmasked exceptions... yes.
Tests of OS support for SSE passed.
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with features: MMX MMX2 SSE
Reading /home/bertrand/.mplayer/codecs.conf: 30 audio & 81 video codecs
Font /home/bertrand/.mplayer/font/font.desc loaded successfully! (206 chars)
Linux RTC init error: Permission denied
Using usleep() timing
Input config file /home/bertrand/.mplayer/input.conf parsed : 50 binds
Playing mms://192.168.4.137/berty
Can't open IFO file: No such file or directory
Trying ASF/UDP...
===> ASF/UDP failed
Trying ASF/TCP...
Connecting to server 192.168.4.137:1755 ...
connected
pre_header[0] = 01 (1)
pre_header[1] = 00 (0)
pre_header[2] = 00 (0)
pre_header[3] = 00 (0)
pre_header[4] = ce (206)
pre_header[5] = fa (250)
pre_header[6] = 0b (11)
pre_header[7] = b0 (176)
pre_header[0] = 00 (0)
pre_header[1] = 00 (0)
pre_header[2] = 00 (0)
pre_header[3] = 00 (0)
pre_header[4] = 02 (2)
pre_header[5] = 0c (12)
pre_header[6] = f3 (243)
pre_header[7] = 03 (3)
unknown object
unknown object
file object, packet length = 1339 (1339)
unknown object
stream object, stream id: 1
stream object, stream id: 2
unknown object
unknown object
data object
Cache size set to 16 KBytes
Connected to server: 192.168.4.137
CACHE_PRE_INIT: 0 [0] 0 pre:0 eof:0
Cache fill: 0.00% (0 bytes) Detected ASF file format!
============ ASF Stream group == START ===
object size = 38
stream count=[0x2][2]
stream id=[0x1][1]
max bitrate=[0x4790][18320]
stream id=[0x2][2]
max bitrate=[0x15ab8][88760]
============ ASF Stream group == END ===
VIDEO: [WMV1] 320x160 24bpp
ASF: No Audio stream found... ->nosound
[V] filefmt:6 fourcc:0x31564D57 size:320x160 fps:1000.00 ftime:=0.0010
Clip info:
name: Toy Story 2
author: Pixar
copyright: 1999
comments: There's a snake in my boot....
Can't find codec for audio format 0x0 !
*** Try to upgrade /home/bertrand/.mplayer/codecs.conf from etc/codecs.conf
*** If it's still not OK, then read DOCS/codecs.html!
vo: X11 running at 1600x1200 with depth 24 and 32 bits/pixel (":0.0" => local
display)
==========================================================================
Opening Video Decoder: [dshow] DirectShow video codecs
fs seg 0x4001c000
Loading DLL: 'wmvds32.ax'
Using DirectShow codec: wmvds32.ax
Decoder is capable of YUV output ( flags 0x1f)
VDec: vo config request - 320 x 160, Packed YUY2
[PP] Using codec's postprocessing, max q = 4
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 320x160 => 320x160 Packed YUY2
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 85 for hw scaling
[xv] dcx: 4 dcy: 20 dx: 0 dy: 0 dw: 320 dh: 160
Disabling DPMS
stat: 1
Detected video codec: [wmv7] drv:4 prio:0 (Windows Media Video 7)
==========================================================================
Audio: no sound!!!
Start playing...
*** [vo] Allocating mp_image_t, 320x160x16bpp YUV packed, 102400 bytes
[xv] dcx: 4 dcy: 20 dx: 0 dy: 0 dw: 320 dh: 160
Successfully enabled DPMS.0% 0 0 12%
*** free_stream() called ***
Exiting... (End of file)
Bertrand
More information about the MPlayer-dev-eng
mailing list