[MPlayer-dev-eng] [TEST PATCH] How to get rid of all sscanf() or new face of config :)

Ivan Szanto szivan at duticai.TWI.TUDelft.NL
Sat Mar 29 12:37:47 CET 2003



Hi Andriy,



I wanted to try your patch, cause from your description I deducted
that I will be able to put my list of channels into the configfile
and then I won't have to type it in any more on the command line
like this:

mplayer -tv
on:channel=Belga1:driver=v4l:input=2:mjpeg:chanlist=europe-west:channels=e9-NL1,e11-NL2,e7-NL3,28-RTL4,63-RTL5,68125-Net5,31-SBS6,79325-V8,21-Yorin,82025-Veronica,E12-Belga1,SE11-Belga2,E8-ARD,SE9-ZDF,48425-BBC1,24-BBC2,84925-BBC_World,59-CNN
-aspect 4:3

And I'd love to get rid of most of this long command line.

However, there are problems with the patch. This may be the
reason why noone else than Albeu replied.

1. failed hunk against MPlayer-20030325:

(Stripping trailing CRs from patch.)
patching file libao2/ao_win32.c
Hunk #1 FAILED at 48.
1 out of 1 hunk FAILED -- saving rejects to file libao2/ao_win32.c.rej

 (This is not serious, I fixed it by hand.)

2. doesn't compile with --enable-gui :

make

[ ... ]

gcc -c -O4 -march=i686 -mcpu=i686 -pipe -ffast-math -fomit-frame-pointer
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-fexpensive-optimizations -fschedule-insns2 -Wall -malign-double -I.
-I../loader -I./wm -I./skin -I/usr/local/include
-I/usr/local/include/freetype2 -I/usr/lib/glib/include
-I/usr/X11R6/include -I/usr/lib/glib/include -I/usr/X11R6/include  -DDEBUG
-o interface.o interface.c
interface.c:369: parse error before `*'
interface.c:369: warning: type defaults to `int' in declaration of
`vo_plugin_args'
interface.c:369: warning: data definition has no type or storage class
interface.c: In function `add_vop':
interface.c:465: request for member `name' in something not a structure or
union
interface.c:465: request for member `name' in something not a structure or
union
interface.c:467: `m_obj_settings_t' undeclared (first use in this
function)
interface.c:467: (Each undeclared identifier is reported only once
interface.c:467: for each function it appears in.)
interface.c:467: request for member `name' in something not a structure or
union
interface.c:467: request for member `attribs' in something not a structure
or union
interface.c:467: request for member `name' in something not a structure or
union
interface.c:468: request for member `name' in something not a structure or
union
interface.c:468: request for member `attribs' in something not a structure
or union
interface.c:468: request for member `name' in something not a structure or
union
interface.c: In function `remove_vop':
interface.c:479: request for member `name' in something not a structure or
union
interface.c:483: request for member `name' in something not a structure or
union
interface.c:483: request for member `name' in something not a structure or
union
interface.c:487: request for member `name' in something not a structure or
union
interface.c:487: request for member `attribs' in something not a structure
or union
interface.c:488: request for member `name' in something not a structure or
union
interface.c:488: request for member `attribs' in something not a structure
or union
interface.c:488: `m_obj_settings_t' undeclared (first use in this
function)
interface.c: In function `guiGetEvent':
interface.c:715: `video_driver_list' undeclared (first use in this
function)
interface.c:774: `audio_driver_list' undeclared (first use in this
function)
interface.c: In function `gtkSet':
interface.c:1034: warning: passing arg 2 of pointer to function makes
pointer from integer without a cast
interface.c:1065: warning: passing arg 2 of pointer to function makes
pointer from integer without a cast
interface.c:1073: warning: passing arg 2 of pointer to function makes
pointer from integer without a cast
interface.c: At top level:
../cfg-mplayer-def.h:1: warning: `default_config' defined but not used
make[1]: *** [interface.o] Error 1
make[1]: Leaving directory
`/data2/ls/software/mplayer/cvs/MPlayer-20030325/Gui'
make: *** [Gui/libgui.a] Error 2


How did you test it with the gui, if it did not compile?

3. After compiling it without the gui, it crashed immediately (SIGSEGV):

Starting program: /data2/ls/software/mplayer/cvs/MPlayer-20030325/./mplayer -v /windows/F/film/nine-months/nine1.avi
[New Thread 1024 (LWP 13756)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale


MPlayer dev-CVS-030325-05:00-2.95.2 (C) 2000-2003 Arpad Gereoffy (see DOCS)

CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /usr/local/etc/mplayer/mplayer.conf
Reading config file /home/szivan/.mplayer/config
Reading /home/szivan/.mplayer/codecs.conf: can't open '/home/szivan/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: 50 audio & 136 video codecs
CommandLine: '-v' '/windows/F/film/nine-months/nine1.avi'
get_path('font/font.desc') -> '/home/szivan/.mplayer/font/font.desc'
Font /home/szivan/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Failed to open /dev/rtc: No such device (mplayer should be setuid root or /dev/rtc should be readable by the user.)
Using usleep() timing
get_path('input.conf') -> '/home/szivan/.mplayer/input.conf'
Parsing input config file /home/szivan/.mplayer/input.conf
Input config file /home/szivan/.mplayer/input.conf parsed : 50 binds
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: Connection refused
Failed to open LIRC support.
You will not be able to use your remote control.
get_path('nine1.avi.conf') -> '/home/szivan/.mplayer/nine1.avi.conf'

Playing /windows/F/film/nine-months/nine1.avi
Not an URL!
File size is 159127262 bytes
AVI file format detected.
list_end=0x144
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 34022   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  352 x 288
list_end=0xD4
==> Found video stream: 0
======= STREAM Header =======
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 250000/10000 = 25.000
Start: 0   Len: 34022
Suggested BufferSize: 41861
Quality 0
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 352
  biHeight 288
  biPlanes 1
  biBitCount 24
  biCompression 1482049860='DIVX'
  biSizeImage 304128
===========================
Regenerating keyframe table for DIVX 4 video
list_end=0x144
==> Found audio stream: 1
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 44100/1152 = 38.281
Start: 0   Len: 52114
Suggested BufferSize: 731
Quality 0
Sample size: 0
found 'wf', 28 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 1
Samplerate: 44100
avg byte/sec: 15710
Block align: 1152
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=1152
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
list_end=0x17E
hdr=Software  size=38
Software  : MEncoder dev-CVS-030319-18:35-2.95.2
Broken chunk?  chunksize=1658  (id=JUNK)
list_end=0x9670F56
Found movie at 0x80C - 0x9670F56
Reading INDEX block, 86136 chunks for 34022 frames (fpos=0x9670f5e)
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0x1AE)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=135605035 (34022) audio size=21386120 (52114)
VIDEO:  [DIVX]  352x288  24bpp  25.00 fps  797.2 kbps (97.3 kbyte/s)
[V] filefmt:3  fourcc:0x58564944  size:352x288  fps:25.00  ftime:=0.0400
Clip info:
 Software: MEncoder dev-CVS-030319-18:35-2.95.2
get_path('sub/') -> '/home/szivan/.mplayer/sub/'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 128 kbit Single-Channel, BPF: 417
Channels: 1, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16000->176400 (128.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
open: No such device
vo_mga: Couldn't open /dev/mga_vid
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1280x1024 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Unknown wm type...
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Error at audio filter chain pre-init!
ao2: 44100 Hz  2 chans  Signed 16-bit (Little-Endian)
audio_setup: using '/dev/dsp' dsp device
audio_setup: sample format: Signed 16-bit (Little-Endian) (requested: Signed 16-bit (Little-Endian))
audio_setup: using 2 channels (requested: 2)
audio_setup: using 44100 Hz samplerate (requested: 44100)
audio_setup: frags:   8/8  (8192 bytes/frag)  free:  65536
AO: [oss] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Couldn't find matching filter / ao format!
Starting playback...
This file was encoded with libavcodec build 4660
[ffmpeg] aspect_ratio: 1.222222
VDec: vo config request - 352 x 288 (preferred csp: Planar YV12)
Trying filter chain: vo

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 13756)]
0x8263bb5 in _IO_stdin_used ()
(gdb) bt
#0  0x8263bb5 in _IO_stdin_used ()
#1  0x2 in ?? ()
#2  0x80b63c0 in mpcodecs_config_vo (sh=0x83bd210, w=352, h=288, preferred_outfmt=842094169)
    at vd.c:193
#3  0x80bef29 in init_vo (sh=0x83bd210) at vd_ffmpeg.c:364
#4  0x80befbd in get_buffer (avctx=0x83ff620, pic=0x83ff8f0) at vd_ffmpeg.c:385
#5  0x8190f72 in alloc_picture (s=0x83ff830, pic=0x83ff8f0, shared=0) at mpegvideo.c:240
#6  0x819268b in MPV_frame_start (s=0x83ff830, avctx=0x83ff620) at mpegvideo.c:891
#7  0x823c4ed in ff_h263_decode_frame (avctx=0x83ff620, data=0x83ff570, data_size=0xbfffe568,
    buf=0x83eb6a0 "", buf_size=1328) at h263dec.c:632
#8  0x818ff0c in avcodec_decode_video (avctx=0x83ff620, picture=0x83ff570, got_picture_ptr=0xbfffe568,
    buf=0x83eb6a0 "", buf_size=1328) at utils.c:326
#9  0x80bf316 in decode (sh=0x83bd210, data=0x83eb6a0, len=1328, flags=0) at vd_ffmpeg.c:541
#10 0x80b6196 in decode_video (sh_video=0x83bd210, start=0x83eb6a0 "", in_size=1328, drop_frame=0)
    at dec_video.c:304
#11 0x806d796 in main (argc=3, argv=0xbffff8c4) at mplayer.c:1908
#12 0x40695baf in __libc_start_main () from /lib/libc.so.6


Ivan



More information about the MPlayer-dev-eng mailing list