[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[606] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-12-27 09:50:39
|
Revision: 606 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=606&view=rev Author: nickols_k Date: 2012-12-27 09:50:31 +0000 (Thu, 27 Dec 2012) Log Message: ----------- use std::map as environment source. Note about illegal patch: i cannot find records like: 'get_path' in output of mplayerxp. It seems that malefactor(s) hacked namespace mpxp {}. Well, i'll think about renameing this namespace on configure stage. Most probably illegal-patch contains own version of this function or malefactor(s) already have hacked new mpxp_ostream system. Gdb shows that illegal-patch still continue substitutions of mpxp::mpxp_parse_command_line and _PlayTree_Iter::get_file(int) methods. I have doubts that malefactor(s) in addition substitute every #define within of this project. Btw, with new changes illegal-patch decreases verbosity level upto 1: $gdb --args ./ffmpeg -ao alsa:hw:1 -vo x11 M/l.avi -vf menu=main -v -v -v -v GNU gdb (GDB) 7.5 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /Data/-SF.NET-/MPXP/mplayerxp/mplayerxp/ffmpeg...done. (gdb) break mplayerxp.cpp:1693 Breakpoint 1 at 0x455bad: file mplayerxp.cpp, line 1693. (gdb) run Starting program: /Data/-SF.NET-/MPXP/mplayerxp/mplayerxp/ffmpeg -ao alsa:hw:1 -vo x11 M/l.avi -vf menu=main -v -v -v -v warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". *** Antiviral protection was inited ***!!! MPlayerXP svn.598 2002 Nickols_K 2000-2002 Arpad Gereoffy (?\209?\129?\208?\188. DOCS!) Can't open input config file /root/.ffmpeg/input.conf : No such file or directory Can't open input config file /usr/local/share/mplayerxp/input.conf : No such file or directory Falling back on default (hardcoded) input config Opening joystick device:/dev/input/js0 Can't open joystick device: /dev/input/js0 : No such file or directory Can't init input joystick with using: /dev/input/js0 ?\208?\163?\209?\129?\209?\130?\208?\176?\208?\189?\208?\190?\208?\178?\208?\186?\208?\176 ?\208?\191?\208?\190?\208?\180?\208?\180?\208?\181?\209?\128?\208?\182?\208?\186?\208?\184 lirc... mplayer: could not connect to socket mplayer: No such file or directory ?\208?\157?\208?\181?\209?\131?\208?\180?\208?\176?\209?\135?\208?\189?\208?\190?\208?\181 ?\208?\190?\209?\130?\208?\186?\209?\128?\209?\139?\209?\130?\208?\184?\208?\181 ?\208?\191?\208?\190?\208?\180?\208?\180?\208?\181?\209?\128?\208?\182?\208?\186?\208?\184 lirc! ?\208?\146?\209?\139 ?\208?\189?\208?\181 ?\209?\129?\208?\188?\208?\190?\208?\182?\208?\181?\209?\130?\208?\181 ?\208?\184?\209?\129?\208?\191?\208?\190?\208?\187?\209?\140?\208?\183?\208?\190?\208?\178?\208?\176?\209?\130?\209?\140 ?\208?\146?\208?\176?\209?\136?\208?\181 ?\209?\131?\208?\180?\208?\176?\208?\187?\209?\145?\208?\189?\208?\189?\208?\190?\208?\181 ?\209?\131?\208?\191?\209?\128?\208?\176?\208?\178?\208?\187?\208?\181?\208?\189?\208?\184?\208?\181 Breakpoint 1, mpxp::MPlayerXP (argv=..., envm=...) at mplayerxp.cpp:1693 1693 if(mpxp_parse_command_line(m_config, argv,envm)!=MPXP_Ok) (gdb) print mp_conf $1 = {has_video = 1, has_audio = 1, has_dvdsub = 1, msg_filter = 4294967295, test_av = 0, malloc_debug = 0, max_trace = 10, xp = 4, gomp = 0, stream_dump = 0x0, s_cache_size = 0, autoq = 0, verbose = 0, benchmark = 0, playbackspeed_factor = 1, frame_dropping = 0, av_sync_pts = -1, av_force_pts_fix = 0, av_force_pts_fix2 = -1, frame_reorder = 1, force_fps = 0, softsleep = 0, nortc = 0, audio_id = -1, video_id = -1, dvdsub_id = -1, vobsub_id = -1, audio_lang = 0xe2f42a "ru", dvdsub_lang = 0xe2f42a "ru", spudec_ifo = 0x0, force_srate = 0, seek_to_sec = 0x0, seek_to_byte = 0, loop_times = -1, shuffle_playback = 0, play_n_frames = -1, audio_codec = 0x0, video_codec = 0x0, audio_family = 0x0, video_family = 0x0, video_driver = 0x0, audio_driver = 0x0, osd_level = 2, font_name = 0x0, font_factor = 0.75, sub_name = 0x0, sub_fps = 0, sub_auto = 1, vobsub_name = 0x0, subcc_enabled = 0, npp_options = 0x0, ao_channels = 2, z_compression = 0, monitor_pixel_aspect = 1, x86 = {simd = -1, mmx = -1, mmx2 = -1, _3dnow = -1, _3dnow2 = -1, sse = -1, sse2 = -1, sse3 = -1, ssse3 = -1, sse41 = -1, sse42 = -1, aes = -1, avx = -1, fma = -1}} (gdb) n 1696 if(!mp_conf.xp) { (gdb) print mp_conf.verbose $2 = 0 (gdb) n 1701 if(mp_conf.test_av) { (gdb) n 1707 xp_num_cpu=get_number_cpu(); (gdb) n 1709 get_mmx_optimizations(); (gdb) n 1707 xp_num_cpu=get_number_cpu(); (gdb) n 1709 get_mmx_optimizations(); (gdb) print mp_conf.verbose $3 = 0 (gdb) n 1711 if(mp_conf.shuffle_playback) MPXPSys.playtree->flags|=PLAY_TREE_RND; (gdb) n 1712 else MPXPSys.playtree->flags&=~PLAY_TREE_RND; (gdb) n 1714 MPXPSys.playtree = play_tree_cleanup(MPXPSys.playtree); (gdb) n 1715 if(MPXPSys.playtree) { (gdb) print mp_conf.verbose $4 = 0 (gdb) n 1714 MPXPSys.playtree = play_tree_cleanup(MPXPSys.playtree); (gdb) n 1715 if(MPXPSys.playtree) { (gdb) n 1716 MPXPSys.playtree_iter = new _PlayTree_Iter(MPXPSys.playtree,m_config); (gdb) n 1717 if(MPXPSys.playtree_iter) { (gdb) n 1716 MPXPSys.playtree_iter = new _PlayTree_Iter(MPXPSys.playtree,m_config); (gdb) n 1717 if(MPXPSys.playtree_iter) { (gdb) n 1718 if(MPXPSys.playtree_iter->step(0,0) != PLAY_TREE_ITER_ENTRY) { (gdb) n 1722 filename = MPXPSys.playtree_iter->get_file(1); (gdb) n 1726 mpxp_context().engine().xp_core->num_a_buffs = vo_conf.xp_buffs; (gdb) print mp_conf.verbose $5 = 1 More or less typical output of this project: *** Antiviral protection was inited ***!!! MPlayerXP svn.598 2002 Nickols_K 2000-2002 Arpad Gereoffy (?\209?\129?\208?\188. DOCS!) Can't open input config file /root/.ffmpeg/input.conf : No such file or directory Can't open input config file /usr/local/share/mplayerxp/input.conf : No such file or directory Falling back on default (hardcoded) input config Opening joystick device:/dev/input/js0 Can't open joystick device: /dev/input/js0 : No such file or directory Can't init input joystick with using: /dev/input/js0 ?\208?\163?\209?\129?\209?\130?\208?\176?\208?\189?\208?\190?\208?\178?\208?\186?\208?\176 ?\208?\191?\208?\190?\208?\180?\208?\180?\208?\181?\209?\128?\208?\182?\208?\186?\208?\184 lirc... mplayer: could not connect to socket mplayer: No such file or directory ?\208?\157?\208?\181?\209?\131?\208?\180?\208?\176?\209?\135?\208?\189?\208?\190?\208?\181 ?\208?\190?\209?\130?\208?\186?\209?\128?\209?\139?\209?\130?\208?\184?\208?\181 ?\208?\191?\208?\190?\208?\180?\208?\180?\208?\181?\209?\128?\208?\182?\208?\186?\208?\184 lirc! ?\208?\146?\209?\139 ?\208?\189?\208?\181 ?\209?\129?\208?\188?\208?\190?\208?\182?\208?\181?\209?\130?\208?\181 ?\208?\184?\209?\129?\208?\191?\208?\190?\208?\187?\209?\140?\208?\183?\208?\190?\208?\178?\208?\176?\209?\130?\209?\140 ?\208?\146?\208?\176?\209?\136?\208?\181 ?\209?\131?\208?\180?\208?\176?\208?\187?\209?\145?\208?\189?\208?\189?\208?\190?\208?\181 ?\209?\131?\208?\191?\209?\128?\208?\176?\208?\178?\208?\187?\208?\181?\208?\189?\208?\184?\208?\181 Environment: BROWSER => /usr/bin/www-browser COLORTERM => DBUS_SESSION_BUS_ADDRESS => unix:abstract=/root/tmp/dbus-46t91eE7b8,guid=42beb05839d357dbdb063dfc0000002f DESKTOP_SESSION => 03WindowMaker DISPLAY => :0.0 ENV => /root/.bashrc GCONF_TMPDIR => /tmp GDMSESSION => 03WindowMaker GDM_LANG => ru_RU.UTF8 GDM_XSERVER_LOCATION => local G_FILENAME_ENCODING => @locale HISTCONTROL => ignorespace HISTSIZE => 1000 HOME => /root HOSTNAME => kas-wifi.ap INPUTRC => /etc/inputrc KONSOLE_DCOP => DCOPRef(konsole-7511,konsole) KONSOLE_DCOP_SESSION => DCOPRef(konsole-7511,session-1) LANG => ru_RU.UTF-8 LC_SOURCED => 1 LD_LIBRARY_PATH => /usr/X11/lib:/usr/X11/lib64:/opt/qt4/lib:/usr/X11/lib:/usr/X11/lib64:/opt/qt4/lib LESS => -MM LESSCHARSET => utf-8 LESSKEY => /etc/.less LESSOPEN => |/usr/bin/lesspipe.sh %s LIBGL_DRIVERS_PATH => /usr/lib/dri:/usr/lib64/dri:/usr/X11/lib/dri:/usr/X11/lib64/dri:/usr/X11/lib/dri:/usr/X11/lib64/dri:/usr/X11/lib/dri:/usr/X11/lib64/dri:/usr/X11/lib/dri:/usr/X11/lib64/dri:/usr/X11/lib/dri:/usr/X11/lib64/dri LOGNAME => guru LS_COLORS => no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.lzma=01;31:*.tlz=01;31:*.deb=01;31:*.rpm=01;31:*.cpio=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.iso=01;31:*.jpg=01;35:*.jpeg=01;35:*.JPG=01;35:*.JPEG=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.divx=01;35:*.xvid=01;35:*.asf=01;35:*.wmv=01;35:*.mp4=01;35:*.3gp=01;35:*.flv=01;35:*.ico=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.mp2=00;36:*.mod=00;36:*.xm=00;36:*.s3m=00;36:*.it=00;36:*.wma=00;36:*~=47;30:*.bak=47;30:*.swp=47;30:*.bck=47;30:*.bk=47;30:*.old=47;30:*.tmp=47;30:*.save=47;30:*.rpmsave=47;30:*.rpmnew=47;30: MAIL => /var/spool/mail/guru MC_SID => 11047 MC_TMPDIR => /root/tmp/mc-root MDV_MENU_STYLE => mandriva META_CLASS => powerpack OLDPWD => /Data/-SF.NET-/MPXP/mplayerxp/mplayerxp/libmpconf PATH => /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/X11/bin:/opt/qt4/bin:/opt/kde4/bin:/opt/kde3/bin:/opt/qt4//bin:/opt/real/RealPlayer PKG32_CONFIG_PATH => /usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig:/opt/qt4/lib/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig PKG64_CONFIG_PATH => /usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/X11/lib64/pkgconfig:/opt/qt4/lib64/pkgconfig:/opt/kde4/lib/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig PKG_CONFIG_PATH => /usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig:/usr/lib/qt4/lib64/pkgconfig PWD => /Data/-SF.NET-/MPXP/mplayerxp/mplayerxp PYTHONPATH => :/usr/lib/ooo-2.1/program:/usr/lib/ooo-2.1/program:/usr/lib/ooo-2.1/program:/usr/lib/ooo-2.1/program:/usr/lib/ooo-2.1/program PYTHONSTARTUP => /etc/pythonrc.py QT4DOCDIR => /usr/share/doc/qt4/doc QTDIR => /opt/qt4/ QTINC => /opt/qt3/include QTLIB => /opt/qt3/lib SCREENDIR => /home/guru/tmp SECURE_LEVEL => 3 SHELL => /bin/bash SHLVL => 4 SSH_AGENT_PID => 5974 SSH_ASKPASS => /usr/lib64/ssh/ssh-askpass SSH_AUTH_SOCK => /tmp/ssh-tJygbg5939/agent.5939 TERM => xterm TMP => /root/tmp TMPDIR => /root/tmp TZ => Europe/Moscow USER => guru USERNAME => root WINDOWID => 44040324 WINDOWPATH => 7 WMAKER_BIN_NAME => /usr/X11/bin/wmaker WRASTER_COLOR_RESOLUTION0 => 4 XAUTHORITY => /root/.xauthKLw4Xe XCURSOR_DITHER => diffuse XCURSOR_PATH => /usr/X11R6/share:/usr/X11R6/share/icons XCURSOR_SIZE => 48 XCURSOR_THEME => Gold XDG_DATA_DIRS => /usr/local/share/:/usr/share/:/usr/share/gdm/ XDG_SESSION_COOKIE => 4bfa5d308775c9aba49e220048fa837c-1356596574.689001-222484848 XMODIFIERS => @im=none _ => ./ffmpeg CommandLine: '-ao' 'alsa:hw:1' '-vo' 'x11' 'M/l.avi' '-vf' 'menu=main' '-v' '-v' '-v' '-v' font: can't open file: /root/.ffmpeg/font/font.desc font: Reading section: [info] font: Reading section: [files] RAW: /usr/local/share/mplayerxp/font//koi8-r-a.raw 4216 x 30, 256 colors RAW: /usr/local/share/mplayerxp/font//koi8-r-b.raw 4216 x 30, 256 colors font: Reading section: [characters] font: Reading section: [files] RAW: /usr/local/share/mplayerxp/font//osd-mplayer-a.raw 544 x 38, 256 colors RAW: /usr/local/share/mplayerxp/font//osd-mplayer-b.raw 544 x 38, 256 colors font: Reading section: [characters] font: resampling alpha by factor 0.75 (192) DONE! font: resampling alpha by factor 0.75 (192) DONE! Font /usr/local/share/mplayerxp/font/font.desc loaded successfully! (205 chars) At line 61 : value of attribute ptr isn't finished At line 87 : value of attribute ptr isn't finished Menu initialized: /root/.ffmpeg/menu.conf X11 opening display: :0.0 X11_System: color mask: ffffff (R:ff0000 G:ff00 B:ff) X11_System: running 1400x1050 with depth 32 bits/pixel (":0.0" => local display) Disabling DPMS stat: 1 ?\208?\146?\208?\190?\209?\129?\208?\191?\209?\128?\208?\190?\208?\184?\208?\183?\208?\178?\208?\181?\208?\180?\208?\181?\208?\189?\208?\184?\208?\181 M/l.avi Filename for url is now M/l.avi Not an URL! [Stream]: Opening *:// ... False [Demuxer]: Probing RAW audio parser ...:False [Demuxer]: Probing RAW video parser ...:False [Demuxer]: Probing AVI - Audio Video Interleaved parser ...:Ok CHUNK 'avih' len=56 ======= AVI Header ======= us/frame: 40000 (fps=25.000) max bytes/sec: 0 padding: 0 MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED frames total: 6056 initial: 0 streams: 2 Suggested BufferSize: 0 Size: 720 x 432 CHUNK 'strh' len=56 [Demuxer]: ==> Found video stream: 0 [Demuxer]: ID_VIDEO_ID=0 ======= STREAM Header ======= Type: vids FCC: xvid (64697678) Flags: 0 Priority: 0 Language: 0 InitialFrames: 0 Rate: 25/1 = 25.000 Start: 0 Len: 6056 Suggested BufferSize: 84858 Quality 10000 Sample size: 0 CHUNK 'strf' len=40 found 'bih', 40 bytes of 40 ======= VIDEO Format (chunk size: 40 )====== biSize 40 biWidth 720 biHeight 432 biPlanes 1 biBitCount 12 biCompression 44495658='XVID' biSizeImage 1866240 biXPelPerMeter 0 biYPelPerMeter 0 biClrUsed 0 biClrIpmortant 0 ======= End of Video Format ======= Regenerating keyframe table for DIVX 4 video CHUNK 'JUNK' len=4120 CHUNK 'strh' len=56 avi: Found audio stream Demuxer: ==> Found audio stream: 1 Demuxer: ID_AUDIO_ID=1 ======= STREAM Header ======= Type: auds FCC: (0) Flags: 0 Priority: 0 Language: 0 InitialFrames: 1 Rate: 48000/1152 = 41.667 Start: 0 Len: 10093 Suggested BufferSize: 960 Quality -1 Sample size: 0 CHUNK 'strf' len=30 found 'wf', 30 bytes of 18 ======= WAVE Format (chunk size: 30 )======= Format Tag: 85 (0x55) Channels: 2 Samplerate: 48000 avg byte/sec: 14907 Block align: 1152 bits/sample: 0 cbSize: 12 mp3.wID=1 mp3.fdwFlags=0x0 mp3.nBlockSize=358 mp3.nFramesPerBlock=1 mp3.nCodecDelay=0 ======= End of WAVE Format ======= CHUNK 'JUNK' len=4120 CHUNK 'dmlh' len=248 Found ODML header 248 frames 6056 CHUNK 'ISFT' len=43 Software : VirtualDubMod 1.5.4.1 (build 2178/release) CHUNK 'JUNK' len=1318 Broken chunk? chunksize=0 (id=JUNK) CHUNK 'JUNK' len=1318 Found movie at 0x280C - 0x65C9BBE CHUNK 'idx1' len=258384 Reading INDEX block, 16149 chunks for 6056 frames CHUNK 'JUNK' len=738 AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x18C) Auto-selected AVI audio ID = 1 Auto-selected AVI video ID = 0 AVI: Searching for audio stream (id:1) AVI video size=102978663 (6056) audio size=3611280 (10093) VIDEO: [XVID] 720x432 12bpp 25.00 fps [Demuxer]: Using: AVI - Audio Video Interleaved parser [Stream]:Video=XVID Audio=00000055 Probing: mp3lib [codec_ld] ?\208?\145?\208?\184?\208?\177?\208?\187?\208?\184?\208?\190?\209?\130?\208?\181?\208?\186?\208?\176 ?\208?\183?\208?\176?\208?\179?\209?\128?\209?\131?\208?\182?\208?\181?\208?\189?\208?\176 ?\209?\131?\209?\129?\208?\191?\208?\181?\209?\136?\208?\189?\208?\190:libmpg123.so Driver: mp3lib supports these outfmt for 00000055 100000 10 0 Using SSE2 optimized memcpy [codec_ld] ?\208?\145?\208?\184?\208?\177?\208?\187?\208?\184?\208?\190?\209?\130?\208?\181?\208?\186?\208?\176 ?\208?\183?\208?\176?\208?\179?\209?\128?\209?\131?\208?\182?\208?\181?\208?\189?\208?\176 ?\209?\131?\209?\129?\208?\191?\208?\181?\209?\136?\208?\189?\208?\190:libmpg123.so dec_audio: Allocating 8192 + 65536 = 73728 bytes for output buffer mpg123_init: MPEG-1.0 [Layer:III (ABR)], Hz=48000 128-kbit Joint-Stereo, BPF=96 Out=32-bit mpg123_init: Copyrght=No Orig=Yes CRC=No Priv=No Emphas=0 Optimiz=x86-64 [AC] Selecting decoder: [libmpg123.so] drv:mp3lib.libmpg123.so ratio 16000->384000 alsa-init: compiled for ALSA-1.0.26 alsa-init: soundcard set to hw:1 alsa-init: Testing & bugs are welcome. Found 1 cards, use: hw:1 alsa-init: pcm opend in block-mode Attach filter menu menu(NULL, vo2) vo2(menu, NULL) Probing: raw Probing: nuv Probing: mpeg2 Probing: xvid [codec_ld] ?\208?\145?\208?\184?\208?\177?\208?\187?\208?\184?\208?\190?\209?\130?\208?\181?\208?\186?\208?\176 ?\208?\183?\208?\176?\208?\179?\209?\128?\209?\131?\208?\182?\208?\181?\208?\189?\208?\176 ?\209?\131?\209?\129?\208?\191?\208?\181?\209?\136?\208?\189?\208?\190:libxvidcore.so Driver: xvid supports these outfmt for XVID fourcc: YV12 (flg=0) I420 (flg=0) YUY2 (flg=0) UYVY (flg=0) YVYU (flg=0) RGB (flg=0) 42475218 (flg=0) 4247520f (flg=0) 42475210 (flg=0) 00000000 (flg=0) [codec_ld] ?\208?\145?\208?\184?\208?\177?\208?\187?\208?\184?\208?\190?\209?\130?\208?\181?\208?\186?\208?\176 ?\208?\183?\208?\176?\208?\179?\209?\128?\209?\131?\208?\182?\208?\181?\208?\189?\208?\176 ?\209?\131?\209?\129?\208?\191?\208?\181?\209?\136?\208?\189?\208?\190:libxvidcore.so [XVID] using library version 1.3.2 (build xvid-1.3.2) [XVID] using 4 cpus/threads. Flags: 000001FF VDec: vo config request - 720 x 432 dri_vo: request for Planar YV12 fourcc: 0 dri_vo: request for Planar I420 fourcc: 0 dri_vo: request for Packed YUY2 fourcc: 0 dri_vo: request for Packed UYVY fourcc: 0 dri_vo: request for Packed YVYU fourcc: 0 dri_vo: request for BGRA fourcc: 0 dri_vo: request for BGR 24-bit fourcc: 0 dri_vo: request for BGR 15-bit fourcc: 0 dri_vo: request for BGR 16-bit fourcc: 0 Can't find colorspace for: 'Planar YV12' 'Planar I420' 'Packed YUY2' 'Packed UYVY' 'Packed YVYU' 'BGRA' 'BGR 24-bit' 'BGR 15-bit' 'BGR 16-bit' Trying -vf fmtcvt Open video filter: [fmtcvt] <720x432 Planar YV12> SwScale params: -1 x -1 (-1=no scaling) dri_vo: request for Planar 444P 16-bit little-endian fourcc: 0 dri_vo: request for Planar 444P 16-bit big-endian fourcc: 0 dri_vo: request for Planar 422P 16-bit little-endian fourcc: 0 dri_vo: request for Planar 422P 16-bit big-endian fourcc: 0 dri_vo: request for Planar 420P 16-bit little-endian fourcc: 0 dri_vo: request for Planar 420P 16-bit big-endian fourcc: 0 dri_vo: request for Planar YV12 with alpha fourcc: 0 dri_vo: request for Planar 444P fourcc: 0 dri_vo: request for Planar 422P fourcc: 0 dri_vo: request for Planar YV12 fourcc: 0 dri_vo: request for Planar I420 fourcc: 0 dri_vo: request for Planar IYUV fourcc: 0 dri_vo: request for Planar YVU9 fourcc: 0 dri_vo: request for Planar IF09 fourcc: 0 dri_vo: request for Planar 411P fourcc: 0 dri_vo: request for Packed YUY2 fourcc: 0 dri_vo: request for Packed UYVY fourcc: 0 dri_vo: request for RGB 48-bit fourcc: 0 dri_vo: request for BGR 48-bit fourcc: 0 dri_vo: request for BGRA fourcc: 0 dri_vo: request for RGBA fourcc: 1 dri_vo: request for BGR 24-bit fourcc: 0 dri_vo: request for RGB 24-bit fourcc: 1 dri_vo: request for BGR 16-bit fourcc: 0 dri_vo: request for RGB 16-bit fourcc: 1 dri_vo: request for BGR 15-bit fourcc: 0 dri_vo: request for RGB 15-bit fourcc: 1 dri_vo: request for Planar Y800 fourcc: 0 dri_vo: request for Planar Y8 fourcc: 0 dri_vo: request for BGR 8-bit fourcc: 0 dri_vo: request for RGB 8-bit fourcc: 0 dri_vo: request for BGR 4-bit fourcc: 0 dri_vo: request for RGB 4-bit fourcc: 1 dri_vo: request for BGR 4-bit per byte fourcc: 0 dri_vo: request for RGB 4-bit per byte fourcc: 1 dri_vo: request for BGR 1-bit fourcc: 0 dri_vo: request for RGB 1-bit fourcc: 0 dri_vo: request for RGBA fourcc: 1 dri_vo: request for RGBA fourcc: 1 dri_vo: request for RGBA fourcc: 1 dri_vo: request for RGBA fourcc: 1 dri_vo: request for RGBA fourcc: 1 dri_vo: request for RGBA fourcc: 1 dri_vo: request for RGBA fourcc: 1 dri_vo: request for RGBA fourcc: 1 Movie-Aspect is undefined - no prescaling applied. vf->config(720x432->720x432,flags=0x0,'MPlayerXP',Planar YV12) dri_vo: request for RGBA fourcc: 1 [swscaler @ 0x2fbc660] using unscaled yuv420p -> bgra special converter dri_vo: request for RGBA fourcc: 1 REQ: flags=0x401 req=0x0 [libvf] Using video filters chain: [vf_fmtcvt]: video[720x432] in[Planar YV12] -> out[RGBA] [vf_menu] Internal filter for libmenu [720x432,Unknown XVID] VO-CONF: [x11] 0x0 => 0x0 Unknown 0x0000 VO: Description: X11 ( XImage/Shm ) (with x11:vidix subdevice) VO: Author: Aaron Holtzman <aho...@es...> dri_vo: request for RGBA fourcc: 1 REQ: flags=0x401 req=0x0 [libvf] Using video filters chain: [vf_menu] Internal filter for libmenu [720x432,Unknown XVID] VO-CONF: [x11] 0x0 => 0x0 Unknown 0x0000 VO: Description: X11 ( XImage/Shm ) (with x11:vidix subdevice) VO: Author: Aaron Holtzman <aho...@es...> dri_vo: request for RGBA fourcc: 1 priv.video_out->config(720,432,720,432, 0x0,'MPlayerXP',RGBA) Sharing memory. [stream: vf_reinit_vo]: 0x2fbbac0 Call vf_reinit_vo <fmtcvt: 720x432@Planar YV12> -> <vo: 720x432@BGRA> vf->first: 720x432@Planar YV12 [720x432@Planar YV12](NULL<-fmtcvt->menu) [720x432@Unknown XVID](fmtcvt<-menu->vo2) [720x432@RGBA](menu<-vo2->NULL) Using(menu) 720x432@Unknown XVID vf_reinit->config_vf 720 432 Unknown XVID=> 720 432 BGRA Open video filter: [fmtcvt] <720x432 Planar YV12> SwScale params: -1 x -1 (-1=no scaling) dri_vo: request for Planar 444P 16-bit little-endian fourcc: 0 dri_vo: request for Planar 444P 16-bit big-endian fourcc: 0 dri_vo: request for Planar 422P 16-bit little-endian fourcc: 0 dri_vo: request for Planar 422P 16-bit big-endian fourcc: 0 dri_vo: request for Planar 420P 16-bit little-endian fourcc: 0 dri_vo: request for Planar 420P 16-bit big-endian fourcc: 0 dri_vo: request for Planar YV12 with alpha fourcc: 0 dri_vo: request for Planar 444P fourcc: 0 dri_vo: request for Planar 422P fourcc: 0 dri_vo: request for Planar YV12 fourcc: 0 dri_vo: request for Planar I420 fourcc: 0 dri_vo: request for Planar IYUV fourcc: 0 dri_vo: request for Planar YVU9 fourcc: 0 dri_vo: request for Planar IF09 fourcc: 0 dri_vo: request for Planar 411P fourcc: 0 dri_vo: request for Packed YUY2 fourcc: 0 dri_vo: request for Packed UYVY fourcc: 0 dri_vo: request for RGB 48-bit fourcc: 0 dri_vo: request for BGR 48-bit fourcc: 0 dri_vo: request for BGRA fourcc: 0 dri_vo: request for RGBA fourcc: 1 dri_vo: request for BGR 24-bit fourcc: 0 dri_vo: request for RGB 24-bit fourcc: 1 dri_vo: request for BGR 16-bit fourcc: 0 dri_vo: request for RGB 16-bit fourcc: 1 dri_vo: request for BGR 15-bit fourcc: 0 dri_vo: request for RGB 15-bit fourcc: 1 dri_vo: request for Planar Y800 fourcc: 0 dri_vo: request for Planar Y8 fourcc: 0 dri_vo: request for BGR 8-bit fourcc: 0 dri_vo: request for RGB 8-bit fourcc: 0 dri_vo: request for BGR 4-bit fourcc: 0 dri_vo: request for RGB 4-bit fourcc: 1 dri_vo: request for BGR 4-bit per byte fourcc: 0 dri_vo: request for RGB 4-bit per byte fourcc: 1 dri_vo: request for BGR 1-bit fourcc: 0 dri_vo: request for RGB 1-bit fourcc: 0 dri_vo: request for RGBA fourcc: 1 [swscaler @ 0x2fd5e80] (null) is not supported as input pixel format Couldn't init SwScaler for this setup (nil) FATAL: ?\208?\157?\208?\181 ?\208?\188?\208?\190?\208?\179?\209?\131 ?\208?\191?\209?\128?\208?\190?\208?\184?\208?\189?\208?\184?\209?\134?\208?\184?\208?\176?\208?\187?\208?\184?\208?\183?\208?\184?\209?\128?\208?\190?\208?\178?\208?\176?\209?\130?\209?\140 ?\208?\178?\208?\184?\208?\180?\208?\181?\208?\190 ?\208?\180?\209?\128?\208?\176?\208?\185?\208?\178?\208?\181?\209?\128! vf->first: 720x432@Planar YV12 [720x432@Planar YV12](NULL<-fmtcvt->menu) [720x432@Unknown XVID](fmtcvt<-menu->vo2) [720x432@RGBA](fmtcvt<-vo2->NULL) dri_vo_caps: driver does support DRI dri_vo_caps: caps=00000000 fourcc=42475220(BGRA) x,y,w,h(0 0 2d0 1b0) dri_vo_caps: width,height(2d0,1b0) strides(b40000) priv.dri.bpp=20 dri_vo_src: w,h(2d0,1b0) d_w,d_h(2d0,1b0 dri_vo_src: flags=00000000 fourcc=52474220(RGBA) [libvf] Using video filters chain: [vf_fmtcvt]: video[720x432] in[Planar YV12] -> out[RGBA] [vf_menu] Internal filter for libmenu [720x432,Unknown XVID] VO-CONF: [x11] 720x432 => 720x432 RGBA VO: Description: X11 ( XImage/Shm ) (with x11:vidix subdevice) VO: Author: Aaron Holtzman <aho...@es...> [VC] Selected decoder: [libxvidcore.so] drv:xvid.libxvidcore.so (720x432 (aspect 0) 25.00fps Checking audio filter chain for 48000Hz/2ch/32bit... [libaf] Adding filter ao3 [libaf] Adding filter resample [libaf] Adding filter format AF_pre: af format: 2 ch, 44100 hz, S32LE af_bps=352800 alsa-conf: requested format: 44100 Hz, 2 channels, Signed 32-bit (Little-Endian) alsa-init: buffer_time: 500045, period_time :124988 alsa-conf: got buffersize=176416 alsa-conf: bits per sample (bps)=32, bits per frame (bpf)=64, chunk_bytes=0 alsa-conf: 44100 Hz/2 channels/8 bpf/176416 bytes buffer/Signed 32 bit Little Endian Building audio filter chain for 48000Hz/2ch/32bit (Float32) -> 44100Hz/2ch/32bit (Signed 32-bit (Little-Endian))... AF_init: af format: 2 ch, 44100 hz, S32LE af_bps=352800 [libaf] Using audio filters chain: [af_resample] New filter designed (48000 -> 44100 Hz) [af_format] Changing sample format FLOAT32LE -> S32LE AO-CONF: [alsa] 44100Hz nch=2 S32LE (2822.4-kbit) Using Linux's hardware RTC timing (1024Hz) CLIP INFO (M/l.avi): Encoder: VirtualDubMod 1.5.4.1 (build 2178/release) Using audio buffer 911368 bytes (min reserve = 8200, indices 210) XXX initial v_pts=0.000 a_pos=2448 (0.164) Using SSE2 optimized agpcpy Using generic optimized agpcpy Using DECODING AHEAD mplayer's core with 64 video buffers alsa-space: mp_free space = 176416, status=2, 1 -- alsa-space: mp_free space = 176416, status=2, 1 -- Using SSE3 Optimized OnScreenDisplay Using the next 5 threads: [0] main (id=13837 pth_id=140640945727488) [1] audio decoder (id=13837 pth_id=140640713684736) [2] video decoder (id=13837 pth_id=140640703194880) [3] audio player (id=13837 pth_id=140640692705024) [4] video player (id=13837 pth_id=140640682215168) ?\208?\146?\208?\190?\209?\129?\208?\191?\209?\128?\208?\190?\208?\184?\208?\183?\208?\178?\208?\181?\208?\180?\208?\181?\208?\189?\208?\184?\208?\181... X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) X11_common: event_type = 2 (KeyPress) X11_common: event_type = 4d (Unknown) X11_common: event_type = 4d (Unknown) *** stop thread: [1] audio decoder *** stop thread: [2] video decoder *** stop thread: [3] audio player *** stop thread: [4] video player uninit video ... Successfully enabled DPMS Uninit audio filters... [libaf] Removing filter resample [libaf] Removing filter format [libaf] Removing filter ao3 uninit audio: ... alsa-uninit: pcm closed [Demuxer]: freeing demuxer at 0x2ee7ea0 DEMUXER: freeing sh_audio at 0x2eeec20 DEMUXER: freeing sh_video at 0x2eee430 *** free_stream(drv:file://) called [errno: Inappropriate ioctl for device]*** ?\208?\146?\209?\139?\209?\133?\208?\190?\208?\180?\208?\184?\208?\188...(?\208?\146?\209?\139?\209?\133?\208?\190?\208?\180) Modified Paths: -------------- mplayerxp/libmpconf/cfgparser.cpp mplayerxp/libmpconf/cfgparser.h mplayerxp/mplayerxp.cpp mplayerxp/mplayerxp.h mplayerxp/postproc/af_export.cpp mplayerxp/postproc/af_internal.h Modified: mplayerxp/libmpconf/cfgparser.cpp =================================================================== --- mplayerxp/libmpconf/cfgparser.cpp 2012-12-27 09:50:00 UTC (rev 605) +++ mplayerxp/libmpconf/cfgparser.cpp 2012-12-27 09:50:31 UTC (rev 606) @@ -695,7 +695,7 @@ } namespace mpxp { -MPXP_Rc mpxp_parse_command_line(m_config_t& config, const std::vector<std::string>& argv) +MPXP_Rc mpxp_parse_command_line(m_config_t& config, const std::vector<std::string>& argv,const std::map<std::string,std::string>& envm) { size_t i,siz=argv.size(); int tmp; @@ -715,7 +715,7 @@ exit(0); } if(opt=="--long-help") { - show_long_help(); + show_long_help(envm); exit(0); } /* check for -- (no more options id.) except --help! */ Modified: mplayerxp/libmpconf/cfgparser.h =================================================================== --- mplayerxp/libmpconf/cfgparser.h 2012-12-27 09:50:00 UTC (rev 605) +++ mplayerxp/libmpconf/cfgparser.h 2012-12-27 09:50:31 UTC (rev 606) @@ -6,6 +6,7 @@ #include "xmpcore/xmp_enums.h" #include <vector> #include <string> +#include <map> namespace mpxp { struct libinput_t; @@ -92,7 +93,7 @@ * 1 otherwise */ namespace mpxp { - MPXP_Rc mpxp_parse_command_line(m_config_t& config, const std::vector<std::string>& argv); + MPXP_Rc mpxp_parse_command_line(m_config_t& config, const std::vector<std::string>& argv,const std::map<std::string,std::string>& envm); } m_config_t& m_config_new(play_tree_t* pt,libinput_t&libinput); Modified: mplayerxp/mplayerxp.cpp =================================================================== --- mplayerxp/mplayerxp.cpp 2012-12-27 09:50:00 UTC (rev 605) +++ mplayerxp/mplayerxp.cpp 2012-12-27 09:50:31 UTC (rev 606) @@ -5,6 +5,7 @@ #include <algorithm> #include <iostream> #include <iomanip> +#include <map> #include <ctype.h> #include <stdio.h> @@ -134,12 +135,12 @@ void print_stream_formats() const; void print_audio_status() const; void read_video_properties() const; - void read_subtitles(const std::string& filename,int forced_subs_only,int stream_dump_type); + void read_subtitles(const std::map<std::string,std::string>& envm,const std::string& filename,int forced_subs_only,int stream_dump_type); - void find_acodec(const char *ao_subdevice); + void find_acodec(const std::map<std::string,std::string>& envm,const char *ao_subdevice); int configure_audio(); - MPXP_Rc find_vcodec(); + MPXP_Rc find_vcodec(const std::map<std::string,std::string>& envm); void run_ahead_engine(); @@ -199,6 +200,21 @@ } MP_Config mp_conf; +__always_inline std::string get_path(const std::map<std::string,std::string>& envm,const std::string& filename="") { + std::map<std::string,std::string>::const_iterator it; + it = envm.find("HOME"); + const std::string homedir = (*it).second; + std::string rs; + std::string config_dir = std::string("/.")+PROGNAME; + + if (homedir.empty()) throw "No 'HOME' environment found"; + rs=homedir+config_dir; + if (!filename.empty()) rs+="/"+filename; + mpxp_v<<"get_path('"<<homedir<<":"<<filename<<"') -> "<<rs<<std::endl; + return rs; +} + + MPXPContext::MPXPContext() :_engine(new(zeromem) mpxp_engine_t), _audio(new(zeromem) audio_processing_t), @@ -426,15 +442,15 @@ //"nosound=nein" "\n"; -void parse_cfgfiles( m_config_t& conf ) +void parse_cfgfiles(const std::map<std::string,std::string>& envm, m_config_t& conf ) { std::string conffile; int conffile_fd; - conffile = get_path(); + conffile = get_path(envm); if (conffile.empty()) mpxp_warn<<MSGTR_NoHomeDir<<std::endl; else { ::mkdir(conffile.c_str(), 0777); - conffile = get_path("config"); + conffile = get_path(envm,"config"); if (conffile.empty()) { mpxp_err<<MSGTR_GetpathProblem<<std::endl; conffile="config"; @@ -532,7 +548,7 @@ #endif -static void init_player( void ) +static void init_player(const std::map<std::string,std::string>& envm) { if(mp_conf.video_driver && strcmp(mp_conf.video_driver,"help")==0) { mpxp_context().video().output->print_help(); @@ -567,7 +583,7 @@ #ifdef ENABLE_WIN32LOADER /* check codec.conf*/ - if(!parse_codec_cfg(get_path("win32codecs.conf").c_str())) { + if(!parse_codec_cfg(get_path(envm,"win32codecs.conf").c_str())) { if(!parse_codec_cfg(CONFDIR"/win32codecs.conf")) { mpxp_hint<<MSGTR_CopyCodecsConf<<std::endl; mpxp_uninit_structs(); @@ -600,7 +616,7 @@ mpxp_info<<"Use --long-help option for full help"<<std::endl; } -void show_long_help(void) { +void show_long_help(const std::map<std::string,std::string>& envm) { MPXPSystem& MPXPSys=*mpxp_context().engine().MPXPSys; m_config_show_options(*mpxp_context().mconfig); mp_input_print_binds(MPXPSys.libinput()); @@ -613,7 +629,7 @@ afm_help(); #ifdef ENABLE_WIN32LOADER /* check codec.conf*/ - if(!parse_codec_cfg(get_path("win32codecs.conf").c_str())){ + if(!parse_codec_cfg(get_path(envm,"win32codecs.conf").c_str())){ if(!parse_codec_cfg(CONFDIR"/win32codecs.conf")){ mpxp_hint<<MSGTR_CopyCodecsConf<<std::endl; mpxp_uninit_structs(); @@ -829,7 +845,7 @@ } -static void mpxp_init_osd(void) { +static void mpxp_init_osd(const std::map<std::string,std::string>& envm) { // check font #ifdef USE_OSD if(mp_conf.font_name){ @@ -838,7 +854,7 @@ mpxp_err<<MSGTR_CantLoadFont<<": "<<mp_conf.font_name<<std::endl; } else { // try default: - mpxp_context().video().output->font=read_font_desc(get_path("font/font.desc").c_str(),mp_conf.font_factor,mp_conf.verbose>1); + mpxp_context().video().output->font=read_font_desc(get_path(envm,"font/font.desc").c_str(),mp_conf.font_factor,mp_conf.verbose>1); if(!mpxp_context().video().output->font) mpxp_context().video().output->font=read_font_desc(DATADIR"/font/font.desc",mp_conf.font_factor,mp_conf.verbose>1); } @@ -846,7 +862,7 @@ /* Configure menu here */ { std::string menu_cfg; - menu_cfg = get_path("menu.conf"); + menu_cfg = get_path(envm,"menu.conf"); if(menu_init(NULL, menu_cfg.c_str())) mpxp_info<<"Menu initialized: "<<menu_cfg<<std::endl; else { @@ -1021,7 +1037,7 @@ } } -void MPXPSystem::read_subtitles(const std::string& filename,int forced_subs_only,int stream_dump_type) { +void MPXPSystem::read_subtitles(const std::map<std::string,std::string>& envm,const std::string& filename,int forced_subs_only,int stream_dump_type) { sh_video_t* sh_video=reinterpret_cast<sh_video_t*>(_demuxer->video->sh); Stream* stream=static_cast<Stream*>(_demuxer->stream); if (mp_conf.spudec_ifo) { @@ -1060,7 +1076,7 @@ mpxp_context().subtitles=sub_read_file(mp_conf.sub_name, sh_video->fps); if(!mpxp_context().subtitles) mpxp_err<<MSGTR_CantLoadSub<<": "<<mp_conf.sub_name<<std::endl; } else if(mp_conf.sub_auto) { // auto load sub file ... - mpxp_context().subtitles=sub_read_file( !filename.empty() ? sub_filename(get_path("sub/").c_str(), filename.c_str() ) + mpxp_context().subtitles=sub_read_file( !filename.empty() ? sub_filename(get_path(envm,"sub/").c_str(), filename.c_str() ) : "default.sub", sh_video->fps ); } if(mpxp_context().subtitles) { @@ -1070,7 +1086,7 @@ #endif } -void MPXPSystem::find_acodec(const char *ao_subdevice) { +void MPXPSystem::find_acodec(const std::map<std::string,std::string>& envm,const char *ao_subdevice) { int found=0; audio_decoder_t* mpca=0; sh_audio_t* sh_audio=reinterpret_cast<sh_audio_t*>(_demuxer->audio->sh); @@ -1113,7 +1129,7 @@ if(!found) { mpxp_err<<MSGTR_CantFindAudioCodec<<std::endl; fourcc(mpxp_err,sh_audio->wtag); - mpxp_hint<<get_path("win32codecs.conf")<<":"<<MSGTR_TryUpgradeCodecsConfOrRTFM<<std::endl; + mpxp_hint<<get_path(envm,"win32codecs.conf")<<":"<<MSGTR_TryUpgradeCodecsConfOrRTFM<<std::endl; d_audio->sh=NULL; sh_audio=reinterpret_cast<sh_audio_t*>(d_audio->sh); } else { @@ -1131,7 +1147,7 @@ } } -MPXP_Rc MPXPSystem::find_vcodec(void) { +MPXP_Rc MPXPSystem::find_vcodec(const std::map<std::string,std::string>& envm) { Demuxer_Stream *d_video=_demuxer->video; sh_video_t* sh_video=reinterpret_cast<sh_video_t*>(_demuxer->video->sh); MPXP_Rc rc=MPXP_Ok; @@ -1170,7 +1186,7 @@ if(!sh_video->inited) { mpxp_err<<MSGTR_CantFindVideoCodec<<std::endl; fourcc(mpxp_err,sh_video->fourcc); - mpxp_hint<<get_path("win32codecs.conf")<<":"<<MSGTR_TryUpgradeCodecsConfOrRTFM<<std::endl; + mpxp_hint<<get_path(envm,"win32codecs.conf")<<":"<<MSGTR_TryUpgradeCodecsConfOrRTFM<<std::endl; d_video->sh = NULL; sh_video = reinterpret_cast<sh_video_t*>(d_video->sh); rc=MPXP_False; @@ -1627,10 +1643,9 @@ /******************************************\ * MAIN MPLAYERXP FUNCTION !!! * \******************************************/ -int MPlayerXP(const std::vector<std::string>& argv){ +int MPlayerXP(const std::vector<std::string>& argv, const std::map<std::string,std::string>& envm){ mpxp_init_antiviral_protection(1); // mpxp_test_backtrace(); - int i; Stream* stream=NULL; int stream_dump_type=0; input_state_t input_state = { 0, 0, 0 }; @@ -1673,9 +1688,9 @@ m_config_register_options(m_config,mplayer_opts); // TODO : add something to let modules register their options mp_register_options(m_config); - parse_cfgfiles(m_config); + parse_cfgfiles(envm,m_config); - if(mpxp_parse_command_line(m_config, argv)!=MPXP_Ok) + if(mpxp_parse_command_line(m_config, argv,envm)!=MPXP_Ok) exit_player("Error parse command line"); // error parsing cmdline if(!mp_conf.xp) { @@ -1710,7 +1725,7 @@ mpxp_context().engine().xp_core->num_a_buffs = vo_conf.xp_buffs; - init_player(); + init_player(envm); if(filename.empty()){ show_help(); @@ -1719,14 +1734,18 @@ // Many users forget to include command line in bugreports... if(mp_conf.verbose){ - size_t sz=argv.size(); + std::map<std::string,std::string>::const_iterator it; + mpxp_info<<"Environment:"<<std::endl; + for(it=envm.begin();it!=envm.end();it++) + mpxp_info<<(*it).first<<" => "<<(*it).second<<std::endl; + size_t i,sz=argv.size(); mpxp_info<<"CommandLine:"; for(i=1;i<sz;i++) mpxp_info<<" '"<<argv[i]<<"'"; mpxp_info<<std::endl; } //------ load global data first ------ - mpxp_init_osd(); + mpxp_init_osd(envm); // ========== Init keyboard FIFO (connection to libvo) ============ MP_UNIT(NULL); @@ -1829,12 +1848,12 @@ } //================== Read SUBTITLES (DVD & TEXT) ========================== - if(sh_video) MPXPSys.read_subtitles(filename,forced_subs_only,stream_dump_type); + if(sh_video) MPXPSys.read_subtitles(envm,filename,forced_subs_only,stream_dump_type); //================== Init AUDIO (codec) ========================== MP_UNIT("init_audio_codec"); - if(sh_audio) MPXPSys.find_acodec(ao_subdevice); + if(sh_audio) MPXPSys.find_acodec(envm,ao_subdevice); sh_audio=reinterpret_cast<sh_audio_t*>(MPXPSys.demuxer()->audio->sh); if(stream_dump_type>1) { @@ -1871,7 +1890,7 @@ /*================== Init VIDEO (codec & libvo) ==========================*/ if(!sh_video) goto main; - if((MPXPSys.find_vcodec())!=MPXP_Ok) { + if((MPXPSys.find_vcodec(envm))!=MPXP_Ok) { sh_video=reinterpret_cast<sh_video_t*>(MPXPSys.demuxer()->video->sh); if(!sh_audio) goto goto_next_file; goto main; @@ -2132,15 +2151,25 @@ int main(int argc,char* args[], char *envp[]) { - UNUSED(envp); try { std::vector<std::string> argv; - std::string str; + std::string str,stmp; for(int i=0;i<argc;i++) { str=args[i]; argv.push_back(str); } - return MPlayerXP(argv); + std::map<std::string,std::string> envm; + unsigned j=0; + size_t pos; + while(envp[j]) { + str=envp[j++]; + pos=str.find('='); + if(pos==std::string::npos) throw "Broken environment variable: "+str; + stmp=str.substr(pos+1); + str=str.substr(0,pos); + envm[str]=stmp; + } + return MPlayerXP(argv,envm); } catch(const std::string& what) { std::cout<<"Exception '"<<what<<"'caught in module: MPlayerXP"<<std::endl; } catch(...) { Modified: mplayerxp/mplayerxp.h =================================================================== --- mplayerxp/mplayerxp.h 2012-12-27 09:50:00 UTC (rev 605) +++ mplayerxp/mplayerxp.h 2012-12-27 09:50:31 UTC (rev 606) @@ -197,7 +197,7 @@ unsigned get_number_cpu(void); void show_help(void); - void show_long_help(void); + void show_long_help(const std::map<std::string,std::string>& envm); void update_osd( float v_pts ); Modified: mplayerxp/postproc/af_export.cpp =================================================================== --- mplayerxp/postproc/af_export.cpp 2012-12-27 09:50:00 UTC (rev 605) +++ mplayerxp/postproc/af_export.cpp 2012-12-27 09:50:31 UTC (rev 606) @@ -30,12 +30,10 @@ #include "osdep/get_path.h" #include "pp_msg.h" -#define DEF_SZ 512 // default buffer size (in samples) -#define SHARED_FILE "mplayer-af_export" /* default file name - (relative to ~/.mplayer/ */ +static const int DEF_SZ=512; // default buffer size (in samples) +static const char* SHARED_FILE="mplayer-af_export"; /* default file name (relative to ~/.mplayer/ */ +static const int SIZE_HEADER=(2 * sizeof(int) + sizeof(unsigned long long)); -#define SIZE_HEADER (2 * sizeof(int) + sizeof(unsigned long long)) - // Data for specific instances of this filter struct af_export_t { Modified: mplayerxp/postproc/af_internal.h =================================================================== --- mplayerxp/postproc/af_internal.h 2012-12-27 09:50:00 UTC (rev 605) +++ mplayerxp/postproc/af_internal.h 2012-12-27 09:50:31 UTC (rev 606) @@ -18,5 +18,5 @@ double delay; // Delay caused by the filter [ms] frac_t mul; /* length multiplier: how much does this instance change the length of the buffer. */ -}__attribute__ ((packed)); +}; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |