Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 28/04/2006, à 22:16

Kanor

Compilation de mplayer probléme !!

Salut
Oui je sais il existe un depot sur Synaptic mais le probléme c'est que les performance sont trés moyenne donc je pensais recompiler pour essayer de gagner de la vitesse .
Donc j'ai telecharger la version cvc ,j'ai installer les différente dépendance .
je lance ./configure -enable-gui  --enable-menu  --enable-runtime-cpudetection --language=fr   --enable-largefiles

Detected operating system: Linux
Detected host architecture: i386
Checking for cc version ... 4.0.2, ok
Checking for host cc ... cc
Checking for cross compilation ... no
Checking for CPU vendor ... GenuineIntel (6:8:3)
Checking for CPU type ...  Pentium III (Coppermine)
Checking for GCC & CPU optimization abilities ... pentium3
Checking for assembler support of -pipe option ... yes
Checking for assembler (as 2.16.1) ... ok
Checking for Linux kernel version ... 2.6.12-10-386, ok
Checking for mplayer binary name ... mplayer
Checking for awk ... mawk
Checking for extra headers ... none
Checking for extra libs ... none
Checking for -lposix ... no
Checking for -lm ... yes
Checking for langinfo ... yes
Checking for language ... using fr (man pages:  fr en)
Checking for enable sighandler ... yes
Checking for runtime cpudetection ... yes
Checking for restrict keyword ... __restrict
Checking for __builtin_expect ... yes
Checking for kstat ... no
Checking for posix4 ... no
Checking for lrintf ... yes
Checking for round ... yes
Checking for nanosleep ... yes
Checking for socklib ... yes (using -lnsl)
Checking for inet_pton() ... yes (using -lnsl)
Checking for inttypes.h (required) ... yes
Checking for int_fastXY_t in inttypes.h ... yes
Checking for word size ... 32
Checking for stddef.h ... yes
Checking for malloc.h ... yes
Checking for memalign() ... yes
Checking for alloca.h ... yes
Checking for mman.h ... yes
Checking for dynamic loader ... yes
Checking for dynamic a/v plugins support ... no
Checking for pthread ... yes (using -lpthread)
Checking for iconv ... yes
Checking for sys/soundcard.h ... yes
Checking for sys/dvdio.h ... no
Checking for sys/cdio.h ... no
Checking for linux/cdrom.h ... yes
Checking for dvd.h ... no
Checking for BSDI dvd.h ... no
Checking for HPUX SCSI header ... no
Checking for userspace SCSI headers (Solaris) ... no
Checking for termcap ... yes (using -lncurses)
Checking for termios ... yes (using sys/termios.h)
Checking for shm ... yes
Checking for linux devfs ... no
Checking for scandir() ... yes
Checking for strsep() ... yes
Checking for strlcpy() ... no
Checking for strlcat() ... no
Checking for fseeko() ... yes
Checking for localtime_r() ... yes
Checking for vsscanf() ... yes
Checking for swab() ... yes
Checking for posix select() ... yes
Checking for gettimeofday() ... yes
Checking for glob() ... yes
Checking for setenv() ... yes
Checking for sys/sysinfo.h ... yes
Checking for Mac OS X APIs ... auto
Checking for Mac OS X Finder Support ... no
Checking for Mac OS X Bundle file locations ... no
Checking for Samba support (libsmbclient) ... no
Checking for 3dfx ... no
Checking for tdfxfb ... no
Checking for tdfxvid ... no
Checking for tga ... yes
Checking for DirectFB headers presence ... not found
Checking for DirectFB ... no
Checking for X11 headers presence ... yes (using /usr/include)
Checking for X11 ... yes (using /usr/X11R6/lib)
Checking for DPMS ... yes (using Xdpms 4)
Checking for Xv ... yes
Checking for XvMC ... no
Checking for Xinerama ... no
Checking for Xxf86vm ... yes
Checking for XF86keysym ... yes
Checking for DGA ... 2 (using DGA 2.0)
Checking for OpenGL ... yes
Checking for /dev/mga_vid ... no
Checking for xmga ... no
Checking for GGI ... no
Checking for GGI extension: libggiwmh ... no
Checking for AA ... yes
Checking for CACA ... no
Checking for SVGAlib ... no
Checking for FBDev ... yes
Checking for DVB ... no (specify path to DVB/ost/include with --with-dvbincdir=DIR)
Checking for DVB HEAD ... yes
Checking for PNG support ... yes
Checking for JPEG support ... yes
Checking for PNM support ... yes
Checking for md5sum support ... yes
Checking for GIF support ... yes
Checking for broken giflib workaround ... disabled
Checking for VESA support ... no
Checking for SDL ... yes (using sdl-config)
Checking for Windows waveout ... no
Checking for Directx ... no
Checking for NAS ... yes
Checking for DXR2 ... no
Checking for DXR3/H+ ... no
Checking for libmp1e ... no
Checking for libfame ... no
Checking for OSS Audio ... yes
Checking for aRts ... yes
Checking for EsounD ... yes
Checking for esd_get_latency() ... yes
Checking for Polyp ... no
Checking for JACK ... no
Checking for OpenAL ... no
Checking for ALSA audio ... yes (using alsa 1.0.x and alsa/asoundlib.h)
Checking for Sun audio ... no
Checking for Sun mediaLib ... no
Checking for SGI audio ... no
Checking for VCD support ... ok
Checking for DVD support (libmpdvdkit2) ... yes
Checking for DVD support (libdvdread) ... no (disabled by libmpdvdkit2)
Checking for cdparanoia ... no
Checking for libcdio ... no
Checking for freetype >= 2.0.9 ... no
Checking for fontconfig ... no (freetype support needed)
Checking for fribidi with charsets ... no
Checking for ENCA ... no
Checking for zlib ... yes
Checking for RTC ... yes
Checking for external liblzo support ... no
Checking for mad support ... yes
Checking for Toolame ... no
Checking for Twolame ... no
Checking for OggVorbis support ... yes (internal Tremor)
Checking for libspeex (version >= 1.1 required) ... no
Checking for OggTheora support ... no
Checking for mp3lib support ... yes
Checking for liba52 support ... yes
Checking for libdts support ... no
Checking for libmpeg2 support ... yes
Checking for libmpcdec (musepack, version >= 1.2.1 required) ... no
Checking for Matroska support ... yes
Checking for FAAC (AAC encoder) support ... no
Checking for internal FAAD2 (AAC) support ... yes
Checking for external FAAD2 (AAC) support ... no
Checking for LADSPA plugin support ... no
Checking for Win32 codec DLL support ... yes (using /usr/local/lib/codecs)
Checking for Win32 loader support ... yes
Checking for DirectShow ... yes
Checking for XAnim DLL ... yes (using /usr/local/lib/codecs)
Checking for RealPlayer DLL ... yes (using /usr/local/lib/codecs)
Checking for LIVE555 Streaming Media libraries ... no
Checking for FFmpeg libavutil (static) ... yes
Checking for FFmpeg libavcodec (static) ... yes
Checking for FFmpeg libavformat (static) ... no
Checking for FFmpeg libpostproc (static) ... yes
Checking for FFmpeg libavformat (dynamic) ... yes (using libavformat.so, but static libavformat is recommended)
Checking for amr narrowband ... no
Checking for amr narrowband, fixed point ... no
Checking for amr wideband ... no
Checking for libdv-0.9.5+ ... yes
Checking for zr ... no
Checking for bl ... no
Checking for XviD ... yes
Checking for XviD 1.1 or higher ... no
Checking for DivX4 compatibility in XviD ... no
Checking for x264 ... no
Checking for DivX4linux/DivX5linux/OpenDivX decore ... no
Checking for libmp3lame (for mencoder) ... no
Checking for DivX4linux encore (for mencoder) ... no
Checking for mencoder ... yes
Checking for fastmemcpy ... yes
Checking for UniquE RAR File Library ... yes
Checking for TV interface ... yes
Checking for *BSD BrookTree 848 TV interface ... no
Checking for Video 4 Linux TV interface ... yes
Checking for Video 4 Linux 2 TV interface ... yes
Checking for audio select() ... yes
Checking for network ... yes
Checking for ftp ... yes
Checking for vstream client ... no
Checking for byte order ... little-endian
Checking for OSD menu ... yes
Checking for QTX codecs ... yes
Checking for Subtitles sorting ... yes
Checking for XMMS inputplugin support ... no
Checking for inet6 ... yes
Checking for gethostbyname2 ... yes
Checking for GUI ... yes
Checking for XShape extension ... yes
Checking for GTK+ version ... GTK-2 devel packages were not found, trying GTK 1.2
Checking for GTK version ... 1.2.10 (using gtk-config)
Checking for glib version ... 1.2.10 (using glib-config)
Creating Gui/config.mak
Checking for automatic gdb attach ... no
Checking for compiler support for -fno-PIC ... yes
Checking for compiler support for noexecstack ... yes
Checking for ftello() ... yes
Checking for VIDIX (internal) ... yes
Checking for VIDIX (external) ... no
Checking for joystick ... no
Checking for lirc ... no
Checking for lircc ... no
Creating config.mak
Creating config.h
Creating libvo/config.mak
Creating libao2/config.mak
Creating libaf/config.mak

Config files successfully generated by ./configure !

  Install prefix: /usr/local
  Data directory: /usr/local/share/mplayer
  Config direct.: /usr/local/etc/mplayer

  Byte order: little-endian
  Optimizing for: Runtime CPU-Detection enabled

  Languages:
    Messages/GUI: fr
    Manual pages:  fr en

  Enabled optional drivers:
    Input: ftp network tv-v4l2 tv-v4l tv matroska mpdvdkit2 vcd dvb
    Codecs: qtx xvid libdv libavcodec real xanim dshow/dmo win32 faad2(internal) libmpeg2 liba52 mp3lib tremor(internal) libmad gif
    Audio output: alsa esd arts oss nas sdl mpegpes(dvb)
    Video output: xvidix cvidix sdl gif89a md5sum pnm jpeg png mpegpes(dvb) fbdev aa opengl dga xv x11 xover tga
    Audio filters:
  Disabled optional drivers:
    Input: vstream tv-bsdbt848 live555 cdda dvdread smb
    Codecs: opendivx x264 amr_wb amr_nb faac musepack libdts libtheora speex twolame toolame liblzo
    Audio output: sgi sun openal jack polyp dxr2 dsound win32
    Video output: winvidix bl zr zr2 dxr3 dxr2 directx vesa svga caca ggi xmga mga xvmc directfb tdfx_vid tdfxfb 3dfx
    Audio filters: ladspa

'config.h' and 'config.mak' contain your configuration options.
Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
      compile *** DO NOT REPORT BUGS if you tweak these files ***

'make' will now compile MPlayer and 'make install' will install it.
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.

Please check mtrr settings at /proc/mtrr (see DOCS/HTML/fr/video.html#mtrr)


Check configure.log if you wonder why an autodetection failed (check whether
the development headers/packages are installed).
Do not report compilation errors if you used any of the --enable-* options
(except --enable-gui and maybe --enable-debug).

If you suspect a bug, please read DOCS/HTML/fr/bugreports.html.

Donc il y a pas de probléme donc je fait une petit make pour finir cette compilation et voir un bon petit filme .
Mais j'obtient cette erreur

mplayer.c:3056: warning: pointer targets in passing argument 2 of 'play_tree_add_file' differ in signedness
mplayer.c:3653: warning: pointer targets in passing argument 2 of 'decode_audio' differ in signedness
mplayer.c:4185: error: dereferencing pointer to incomplete type
make: *** [mplayer.o] Erreur 1

J'ai cherché un peu partout mais j'ai vraiment plus d'idée donc si vous avez une idée...
ps :sans option j'obtient exactement la méme erreur

Hors ligne

#2 Le 28/04/2006, à 23:57

bishop

Re : Compilation de mplayer probléme !!

Salut Kanor
Pas évident en effet de compiler mPlayer, j' ai ramé pendant un bout de temps.
Je n' ai pas utilisé le CVS  mais cette source "MPlayer-1.0pre7try2.tar.bz2" en utilisant (entre autres) certaines infos fournies sur ce site:
http://www.trustonme.net/didactels/33.html

...j'ai installer les différente dépendance .

En ce qui me concerne j' ai dû installer ou vérifier la présence de ces dépendances:
gcc, make, binutils, nasm, libconfhelper-perl, liblogfile-rotate-perl

Pour le make la commande était:
$ make all

Mais comme chaque compil est perso (les arguments passés au ./configure), je ne sais pas si cela t' aidera beaucoup.

Dernière modification par bishop (Le 28/04/2006, à 23:58)


La plus grande surprise que puisse faire un con c'est de faire une pause.

Hors ligne

#3 Le 29/04/2006, à 00:49

Kanor

Re : Compilation de mplayer probléme !!

Salut bishop
merci pour ta réponse j'ai verifier les dépendance que tu 'a dit il  me manquait nasm mais j'ai toujour le même message d'erreur .
J'ai regarder dans le fichier mplayer.c la ligne 4185 sa correspond à la parti Keyboard events, SEEKing .Si vous avez une idée de l'utilité de cette parti roll .J'ai peut étre une chance de trouver le truc qui manque .:|

Hors ligne

#4 Le 29/04/2006, à 01:02

Tao

Re : Compilation de mplayer probléme !!

Pour avoir toutes les dépendances (dont certaines non indispensables, mais c'est pas bien grave) : apt-get build-dep mplayer

Je fais ma compilation à partir du cvs.
./configure --enable-gui --disable-inet6 --language=fr --charset=UTF-8
make
sudo checkinstall

J'ai en effet observé un net gain de performance!

EDIT : c'était la cvs du 21 mars 2006, il se peut aussi qu'un bug ait été introduit entre temps, c'est le risque du cvs... On sait jamais!

Dernière modification par Tao (Le 29/04/2006, à 01:08)

Hors ligne

#5 Le 29/04/2006, à 08:50

Arkoth

Re : Compilation de mplayer probléme !!

Salut,

J'ai compilé la CVS du 27/04/2006... je pense pas qu'à un jour près quand même ça ne fonctionne plus... enfin bon c'est vrai qu'un bug est vite arrivé...

si tu veux faire comme moi, va voir ce "mini" tuto:
http://ubuntuforums.org/showthread.php?t=85190

ps: ça serait tellement bien qu'il y ai un post comme celui ci dans le wiki en français...

@+

Hors ligne

#6 Le 29/04/2006, à 10:00

dom le vrai

Re : Compilation de mplayer probléme !!

Tu as aussi la possibilité de faire un apt-get source:

sudo apt-get install fakeroot build-essential
sudo apt-get build-dep mplayer
mkdir -p mplayer-source && cd mplayer-source
fakeroot apt-get source -b mplayer

Si la compilation a marché, ça te produira des paquetages deb que tu installeras avec un petit
"sudo dpkg -i *.deb".

Je ne garantis pas que ça fonctionne (je n'ai pas essayé pour mplayer), mais d'après mon expérience, il arrive souvent que la compilation fonctionne de cette manière, mais pas de façon "directe".

Hors ligne

#7 Le 29/04/2006, à 10:59

Arkoth

Re : Compilation de mplayer probléme !!

re...

bon, je viens de mettre à jour mon rep main de mplayer:

cvs -z3 update -dPA

et j'arrive au même problème que toi Kanor:

mplayer.c:4185: error: dereferencing pointer to incomplete type
make: *** [mplayer.o] Erreur 1

j'ai pas de soluce pour le moment...

Hors ligne

#8 Le 29/04/2006, à 13:11

Kanor

Re : Compilation de mplayer probléme !!

alors j'ai essayé cette super commande

sudo apt-get build-dep mplayer

qui m'a trouvé une bonne dizaine de dépendance à telecharger mais j'obtient toujour la méme erreur.Le truc de bizarre c'est que je trouve personne qui en parle sur internet car si c'est vraiment un bug sad.

Hors ligne

#9 Le 29/04/2006, à 13:25

bishop

Re : Compilation de mplayer probléme !!

J'ai regarder dans le fichier mplayer.c la ligne 4185 sa correspond à la parti Keyboard events, SEEKing .Si vous avez une idée de l'utilité de cette parti roll .J'ai peut étre une chance de trouver le truc qui manque .neutral

La partie Keyboard events, SEEKing de mon mplayer.c

//================= Keyboard events, SEEKing ====================

  current_module="key_events";

{
  mp_cmd_t* cmd;
  int brk_cmd = 0;
  while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
    switch(cmd->id) {
    case MP_CMD_SEEK : {
      float v;
      int abs;
      osd_show_percentage = 25;
      v = cmd->args[0].v.f;
      abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
      if(abs==2) { /* Absolute seek to a specific timestamp in seconds */
        abs_seek_pos = 1;
	if(sh_video)
	  osd_function= (v > sh_video->timer) ? OSD_FFW : OSD_REW;
	rel_seek_secs = v;
      }
      else if(abs) { /* Absolute seek by percentage */
	abs_seek_pos = 3;
	if(sh_video)
	  osd_function= (v > sh_video->timer) ? OSD_FFW : OSD_REW;
	rel_seek_secs = v/100.0;
      }
      else {
	rel_seek_secs+= v;
	osd_function= (v > 0) ? OSD_FFW : OSD_REW;
      }
      brk_cmd = 1;
    } break;
#ifdef USE_EDL
    case MP_CMD_EDL_MARK:
      if( edl_fd ) {
	float v = sh_video->pts;
	fprintf( edl_fd, "%f %f %d\n", v-2, v, 0 );
      }
      break;
#endif
    case MP_CMD_SWITCH_RATIO : {
      if (cmd->nargs == 0)
	movie_aspect = (float) sh_video->disp_w / sh_video->disp_h;
      else
	movie_aspect = cmd->args[0].v.f;
      mpcodecs_config_vo (sh_video, sh_video->disp_w, sh_video->disp_h, 0);
    } break;
    case MP_CMD_AUDIO_DELAY : {
      float v = cmd->args[0].v.f;
      audio_delay += v;
      osd_show_av_delay = 9;
      if(sh_audio) sh_audio->delay+= v;
    } break;
    case MP_CMD_SPEED_INCR : {
      float v = cmd->args[0].v.f;
      playback_speed += v;
      if (sh_video)
      osd_show_speed = sh_video->fps;
      build_afilter_chain(sh_audio, &ao_data);
    } break;
    case MP_CMD_SPEED_MULT : {
      float v = cmd->args[0].v.f;
      playback_speed *= v;
      if (sh_video)
      osd_show_speed = sh_video->fps;
      build_afilter_chain(sh_audio, &ao_data);
    } break;
    case MP_CMD_SPEED_SET : {
      float v = cmd->args[0].v.f;
      playback_speed = v;
      if (sh_video)
      osd_show_speed = sh_video->fps;
      build_afilter_chain(sh_audio, &ao_data);
    } break;
    case MP_CMD_FRAME_STEP :
    case MP_CMD_PAUSE : {
      cmd->pausing = 1;
      brk_cmd = 1;
    } break;
    case MP_CMD_QUIT : {
      exit_player_with_rc(MSGTR_Exit_quit, (cmd->nargs > 0)? cmd->args[0].v.i : 0);
    }
    case MP_CMD_GRAB_FRAMES : {
      grab_frames=2;
    } break;
    case MP_CMD_PLAY_TREE_STEP : {
      int n = cmd->args[0].v.i == 0 ? 1 : cmd->args[0].v.i;
      int force = cmd->args[1].v.i;

#ifdef HAVE_NEW_GUI
     if (use_gui) {
	int i=0;
        if (n>0)
	  for (i=0;i<n;i++)
	    mplNext();
        else
	  for (i=0;i<-1*n;i++)
	    mplPrev();
     } else
#endif
     {
      if(!force && playtree_iter) {
	play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
	
	if(play_tree_iter_step(i,n,0) == PLAY_TREE_ITER_ENTRY)
	  eof = (n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
	play_tree_iter_free(i);
      } else
	eof = (n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
      if(eof)
	play_tree_step = n;
      brk_cmd = 1;
     }
    } break;
    case MP_CMD_PLAY_TREE_UP_STEP : {
      int n = cmd->args[0].v.i > 0 ? 1 : -1;
      int force = cmd->args[1].v.i;

      if(!force && playtree_iter) {
	play_tree_iter_t* i = play_tree_iter_new_copy(playtree_iter);
	if(play_tree_iter_up_step(i,n,0) == PLAY_TREE_ITER_ENTRY)
	  eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
	play_tree_iter_free(i);
      } else
	eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
      brk_cmd = 1;
    } break;
    case MP_CMD_PLAY_ALT_SRC_STEP : {
      if(playtree_iter && playtree_iter->num_files > 1) {
	int v = cmd->args[0].v.i;
	if(v > 0 && playtree_iter->file < playtree_iter->num_files)
	  eof = PT_NEXT_SRC;
	else if(v < 0 && playtree_iter->file > 1)
	  eof = PT_PREV_SRC;
      }
      brk_cmd = 1;
    } break;
    case MP_CMD_SUB_DELAY : {
#ifdef USE_SUB
    if (sh_video) {
      int abs= cmd->args[1].v.i;
      float v = cmd->args[0].v.f;
      if(abs)
	sub_delay = v;
      else
	sub_delay += v;
      osd_show_sub_delay = 9; // show the subdelay in OSD
    }
#endif
    } break;
    case MP_CMD_SUB_STEP : {
#ifdef USE_SUB
    if (sh_video) {
      int movement = cmd->args[0].v.i;
      step_sub(subdata, sh_video->pts, movement);
      osd_show_sub_delay = 9; // show the subdelay in OSD
    }
#endif
    } break;
    case MP_CMD_SUB_LOG : {
#ifdef USE_SUB
	log_sub();
#endif
    } break;
    case MP_CMD_OSD :  {
#ifdef USE_OSD
      if(sh_video) {
	int v = cmd->args[0].v.i;
	if(v < 0)
	  osd_level=(osd_level+1)%(MAX_OSD_LEVEL+1);
	else
	  osd_level= v > MAX_OSD_LEVEL ? MAX_OSD_LEVEL : v;
      }
#endif
    } break;
    case MP_CMD_OSD_SHOW_TEXT :  {
#ifdef USE_OSD
      if(osd_level && sh_video){
	osd_show_text=sh_video->fps; // 1 sec
        strncpy(osd_show_text_buffer, cmd->args[0].v.s, 64);
      }
#endif
    } break;
    case MP_CMD_VOLUME :  {
      int v = cmd->args[0].v.i;

		// start change for absolute volume value
		int abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
		
#ifdef USE_EDL
      if (edl_muted) break;
      user_muted = 0;
#endif
		if( abs )
		{
			mixer_setvolume(&mixer, (float)v, (float)v );
		} else {
      if(v > 0)
	mixer_incvolume(&mixer);
      else
	mixer_decvolume(&mixer);
		}
	  
#ifdef USE_OSD
      if(osd_level && sh_video){
        float vol;
	osd_visible=sh_video->fps; // 1 sec
	vo_osd_progbar_type=OSD_VOLUME;
	mixer_getbothvolume(&mixer, &vol);
	vo_osd_progbar_value=(vol*256.0)/100.0;
	vo_osd_changed(OSDTYPE_PROGBAR);
      }
#endif
    } break;
    case MP_CMD_MUTE:
#ifdef USE_EDL
      user_muted = !user_muted;
      if ((edl_muted | user_muted) != mixer.muted)
#endif
      mixer_mute(&mixer);
      break;
    case MP_CMD_LOADFILE : {
      play_tree_t* e = play_tree_new();
      play_tree_add_file(e,cmd->args[0].v.s);

      // Go back to the start point
      while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END)
	/* NOP */;
      play_tree_free_list(playtree->child,1);
      play_tree_set_child(playtree,e);
      play_tree_iter_step(playtree_iter,0,0);
      eof = PT_NEXT_SRC;
      brk_cmd = 1;
    } break;
    case MP_CMD_LOADLIST : {
      play_tree_t* e = parse_playlist_file(cmd->args[0].v.s);
      if(!e)
	mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_PlaylistLoadUnable,cmd->args[0].v.s);
      else {
	// Go back to the start point
	while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END)
	  /* NOP */;
	play_tree_free_list(playtree->child,1);
	play_tree_set_child(playtree,e);
	play_tree_iter_step(playtree_iter,0,0);
	eof = PT_NEXT_SRC;	
      }
      brk_cmd = 1;
    } break;
    case MP_CMD_GAMMA :  {
      int v = cmd->args[0].v.i, abs = cmd->args[1].v.i;

      if (!sh_video)
	break;

      if (vo_gamma_gamma == 1000)
      {
	vo_gamma_gamma = 0;
	get_video_colors (sh_video, "gamma", &vo_gamma_gamma);
      }

      if (abs)
        vo_gamma_gamma = v;
      else
        vo_gamma_gamma += v;

      if (vo_gamma_gamma > 100)
        vo_gamma_gamma = 100;
      else if (vo_gamma_gamma < -100)
        vo_gamma_gamma = -100;
      set_video_colors(sh_video, "gamma", vo_gamma_gamma);
#ifdef USE_OSD
       if(osd_level){
	 osd_visible=sh_video->fps; // 1 sec
	 vo_osd_progbar_type=OSD_BRIGHTNESS;
	 vo_osd_progbar_value=(vo_gamma_gamma<<7)/100 + 128;
	 vo_osd_changed(OSDTYPE_PROGBAR);
       }
#endif // USE_OSD
    } break;
    case MP_CMD_BRIGHTNESS :  {
      int v = cmd->args[0].v.i, abs = cmd->args[1].v.i;
      
      if (!sh_video)
	break;
      
      if (vo_gamma_brightness == 1000)
      {
	vo_gamma_brightness = 0;
	get_video_colors(sh_video, "brightness", &vo_gamma_brightness);
      }

      if (abs)
        vo_gamma_brightness = v;
      else
        vo_gamma_brightness += v;

      if (vo_gamma_brightness > 100)
        vo_gamma_brightness = 100;
      else if (vo_gamma_brightness < -100)
        vo_gamma_brightness = -100;
      if(set_video_colors(sh_video, "brightness", vo_gamma_brightness)){
#ifdef USE_OSD
       if(osd_level){
	 osd_visible=sh_video->fps; // 1 sec
	 vo_osd_progbar_type=OSD_BRIGHTNESS;
	 vo_osd_progbar_value=(vo_gamma_brightness<<7)/100 + 128;
	 vo_osd_changed(OSDTYPE_PROGBAR);
       }
#endif // USE_OSD
      }
    } break;
    case MP_CMD_CONTRAST :  {
      int v = cmd->args[0].v.i, abs = cmd->args[1].v.i;

      if (!sh_video)
	break;
      
      if (vo_gamma_contrast == 1000)
      {
	vo_gamma_contrast = 0;
	get_video_colors(sh_video, "contrast", &vo_gamma_contrast);
      }
     
      if (abs)
        vo_gamma_contrast = v;
      else
        vo_gamma_contrast += v;

      if (vo_gamma_contrast > 100)
        vo_gamma_contrast = 100;
      else if (vo_gamma_contrast < -100)
        vo_gamma_contrast = -100;
      if(set_video_colors(sh_video, "contrast", vo_gamma_contrast)){
#ifdef USE_OSD
       if(osd_level){
	 osd_visible=sh_video->fps; // 1 sec
	 vo_osd_progbar_type=OSD_CONTRAST;
	 vo_osd_progbar_value=(vo_gamma_contrast<<7)/100 + 128;
	 vo_osd_changed(OSDTYPE_PROGBAR);
       }
#endif // USE_OSD
      }
    } break;
    case MP_CMD_SATURATION :  {
      int v = cmd->args[0].v.i, abs = cmd->args[1].v.i;

      if (!sh_video)
	break;
      
      if (vo_gamma_saturation == 1000)
      {
	vo_gamma_saturation = 0;
	get_video_colors(sh_video, "saturation", &vo_gamma_saturation);
      }

      if (abs)
        vo_gamma_saturation = v;
      else
        vo_gamma_saturation += v;

      if (vo_gamma_saturation > 100)
        vo_gamma_saturation = 100;
      else if (vo_gamma_saturation < -100)
        vo_gamma_saturation = -100;
      if(set_video_colors(sh_video, "saturation", vo_gamma_saturation)){
#ifdef USE_OSD
       if(osd_level){
	 osd_visible=sh_video->fps; // 1 sec
	 vo_osd_progbar_type=OSD_SATURATION;
	 vo_osd_progbar_value=(vo_gamma_saturation<<7)/100 + 128;
	 vo_osd_changed(OSDTYPE_PROGBAR);
       }
#endif // USE_OSD
      }
    } break;
    case MP_CMD_HUE :  {
      int v = cmd->args[0].v.i, abs = cmd->args[1].v.i;

      if (!sh_video)
	break;
      
      if (vo_gamma_hue == 1000)
      {
	vo_gamma_hue = 0;
	get_video_colors(sh_video, "hue", &vo_gamma_hue);
      }
     
      if (abs)
        vo_gamma_hue = v;
      else
        vo_gamma_hue += v;

      if (vo_gamma_hue > 100)
        vo_gamma_hue = 100;
      else if (vo_gamma_hue < -100)
        vo_gamma_hue = -100;
      if(set_video_colors(sh_video, "hue", vo_gamma_hue)){
#ifdef USE_OSD
       if(osd_level){
	 osd_visible=sh_video->fps; // 1 sec
	 vo_osd_progbar_type=OSD_HUE;
	 vo_osd_progbar_value=(vo_gamma_hue<<7)/100 + 128;
	 vo_osd_changed(OSDTYPE_PROGBAR);
       }
#endif // USE_OSD
      }
    } break;
    case MP_CMD_FRAMEDROPPING :  {
      int v = cmd->args[0].v.i;
      if(v < 0){
	frame_dropping = (frame_dropping+1)%3;
#ifdef USE_OSD
       osd_show_framedropping=10;
       vo_osd_changed(OSDTYPE_SUBTITLE);
#endif
      }
      else
	frame_dropping = v > 2 ? 2 : v;
    } break;
#ifdef USE_TV
    case MP_CMD_TV_SET_FREQ :  {
      if (file_format == DEMUXER_TYPE_TV)
        tv_set_freq((tvi_handle_t*)(demuxer->priv), cmd->args[0].v.f * 16.0);
    } break;
    case MP_CMD_TV_SET_NORM :  {
      if (file_format == DEMUXER_TYPE_TV)
        tv_set_norm((tvi_handle_t*)(demuxer->priv), cmd->args[0].v.s);
    } break;
    case MP_CMD_TV_SET_BRIGHTNESS :  {
      if (file_format == DEMUXER_TYPE_TV)
        tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_BRIGHTNESS, cmd->args[0].v.i);
    } break;
    case MP_CMD_TV_SET_HUE :  {
      if (file_format == DEMUXER_TYPE_TV)
        tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_HUE, cmd->args[0].v.i);
    } break;
    case MP_CMD_TV_SET_SATURATION :  {
      if (file_format == DEMUXER_TYPE_TV)
        tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_SATURATION, cmd->args[0].v.i);
    } break;
    case MP_CMD_TV_SET_CONTRAST :  {
      if (file_format == DEMUXER_TYPE_TV)
        tv_set_color_options((tvi_handle_t*)(demuxer->priv), TV_COLOR_CONTRAST, cmd->args[0].v.i);
    } break;
    case MP_CMD_TV_STEP_CHANNEL :  {
      if (file_format == DEMUXER_TYPE_TV) {
	int v = cmd->args[0].v.i;
	if(v > 0){
	  tv_step_channel((tvi_handle_t*)(demuxer->priv), TV_CHANNEL_HIGHER);
#ifdef USE_OSD
	  if (tv_channel_list) {
	    osd_show_tv_channel = sh_video->fps;
	    vo_osd_changed(OSDTYPE_SUBTITLE);
	  }
#endif
	} else {
	  tv_step_channel((tvi_handle_t*)(demuxer->priv), TV_CHANNEL_LOWER);
#ifdef USE_OSD
	  if (tv_channel_list) {
	    osd_show_tv_channel = sh_video->fps;
	    vo_osd_changed(OSDTYPE_SUBTITLE);
	  }
#endif
	}
      }
    } 
#ifdef HAS_DVBIN_SUPPORT
	if((stream->type == STREAMTYPE_DVB) && stream->priv)
	{
	  dvb_priv_t *priv = (dvb_priv_t*) stream->priv;
	  if(priv->is_on)
	  {
		int dir;
		int v = cmd->args[0].v.i;
	    
		last_dvb_step = v;	
		if(v > 0)
			dir = DVB_CHANNEL_HIGHER;
		else
			dir = DVB_CHANNEL_LOWER;
			
			
		if(dvb_step_channel(priv, dir))
		{
	  		uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
			cache_uninit(stream);
			goto goto_enable_cache;
		}
	  }
	}
#endif	
    break;
    case MP_CMD_TV_SET_CHANNEL :  {
      if (file_format == DEMUXER_TYPE_TV) {
	tv_set_channel((tvi_handle_t*)(demuxer->priv), cmd->args[0].v.s);
#ifdef USE_OSD
	if (tv_channel_list) {
		osd_show_tv_channel = sh_video->fps;
		vo_osd_changed(OSDTYPE_SUBTITLE);
	}
#endif
      }
    } break;
#ifdef HAS_DVBIN_SUPPORT	
  case MP_CMD_DVB_SET_CHANNEL:  
  {
	if((stream->type == STREAMTYPE_DVB) && stream->priv)
	{
	  dvb_priv_t *priv = (dvb_priv_t*) stream->priv;
	  if(priv->is_on)
	  {
		if(priv->list->current <= cmd->args[0].v.i)
		    last_dvb_step = 1;
		else
		    last_dvb_step = -1;

  		if(dvb_set_channel(priv, cmd->args[1].v.i, cmd->args[0].v.i))
		{
	  	  uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
		  cache_uninit(stream);
		  goto goto_enable_cache;
		}
	  }
	}
  }
#endif	
    case MP_CMD_TV_LAST_CHANNEL :  {
      if (file_format == DEMUXER_TYPE_TV) {
	tv_last_channel((tvi_handle_t*)(demuxer->priv));
#ifdef USE_OSD
	if (tv_channel_list) {
		osd_show_tv_channel = sh_video->fps;
		vo_osd_changed(OSDTYPE_SUBTITLE);
	}
#endif
      }
    } break;
    case MP_CMD_TV_STEP_NORM :  {
      if (file_format == DEMUXER_TYPE_TV)
	tv_step_norm((tvi_handle_t*)(demuxer->priv));
    } break;
    case MP_CMD_TV_STEP_CHANNEL_LIST :  {
      if (file_format == DEMUXER_TYPE_TV)
	tv_step_chanlist((tvi_handle_t*)(demuxer->priv));
    } break;
#endif
    case MP_CMD_SWITCH_VSYNC:  {
      vo_vsync = ( cmd->nargs > 0 )? cmd->args[0].v.i : !vo_vsync;
    } break;
    case MP_CMD_VO_FULLSCREEN:
    {
#ifdef HAVE_NEW_GUI
     if ( use_gui ) guiGetEvent( guiIEvent,(char *)MP_CMD_GUI_FULLSCREEN );
      else
#endif
	if(video_out && vo_config_count) video_out->control(VOCTRL_FULLSCREEN, 0);
    } break;
    case MP_CMD_VO_ONTOP:
    {
     if(video_out && vo_config_count) {
       video_out->control(VOCTRL_ONTOP, 0);
#ifdef USE_OSD
       osd_show_ontop=10;
       vo_osd_changed(OSDTYPE_SUBTITLE);
#endif
     }

    } break;
    case MP_CMD_VO_ROOTWIN:
    {
     if(video_out && vo_config_count) {
       video_out->control(VOCTRL_ROOTWIN, 0);
#ifdef USE_OSD
       osd_show_rootwin=10;
       vo_osd_changed(OSDTYPE_SUBTITLE);
#endif
     }

    } break;
    case MP_CMD_PANSCAN : {
      if ( !video_out ) break;
      if ( video_out->control( VOCTRL_GET_PANSCAN,NULL ) == VO_TRUE )
       {
        int abs= cmd->args[1].v.i;
        float v = cmd->args[0].v.f;
        float res;
        if(abs) res = v;
          else res = vo_panscan+v;
        vo_panscan = res > 1 ? 1 : res < 0 ? 0 : res;
        video_out->control( VOCTRL_SET_PANSCAN,NULL );
#ifdef USE_OSD
        if(osd_level && sh_video){
	  osd_visible=sh_video->fps; // 1 sec
	  vo_osd_progbar_type=OSD_PANSCAN;
	  vo_osd_progbar_value=vo_panscan*256;
	  vo_osd_changed(OSDTYPE_PROGBAR);
        }
#endif
       }
    } break;
    case MP_CMD_SUB_POS:
    {
#ifdef USE_SUB
      if (sh_video) {
        int v;
	v = cmd->args[0].v.i;
    
	sub_pos+=v;
	if(sub_pos >100) sub_pos=100;
	if(sub_pos <0) sub_pos=0;
	vo_osd_changed(OSDTYPE_SUBTITLE);
        osd_show_sub_pos = 9;
      }
#endif
    } break;
    case MP_CMD_SUB_ALIGNMENT:
    {
#ifdef USE_SUB
      if (sh_video) {
    	if (cmd->nargs >= 1)
    	    sub_alignment = cmd->args[0].v.i;
    	else
            sub_alignment = (sub_alignment+1) % 3;
	osd_show_sub_alignment = 9;
	vo_osd_changed(OSDTYPE_SUBTITLE);
      }
#endif
    } break;
    case MP_CMD_SUB_VISIBILITY:
    {
#ifdef USE_SUB
      if (sh_video) {
	sub_visibility=1-sub_visibility;
	osd_show_sub_visibility = 9; // show state of subtitle visibility in OSD
	vo_osd_changed(OSDTYPE_SUBTITLE);
      }
#endif
    } break;
    case MP_CMD_GET_SUB_VISIBILITY:
	{
#ifdef USE_SUB
	if (sh_video) {
		mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_AnsSubVisibility, sub_visibility);
	}
#endif
	} break;
    case MP_CMD_SUB_SELECT:
    if (global_sub_size) {
        int source = -1;
        int v = cmd->args[0].v.i;

        if (v < -1)
            global_sub_pos++;
        else
            global_sub_pos = v;
        if (global_sub_pos >= global_sub_size)
            global_sub_pos = -1;
        if (global_sub_pos >= 0)
            source = sub_source();

	mp_msg(MSGT_CPLAYER, MSGL_DBG3, "subtitles: %d subs, (v@%d s@%d d@%d), @%d, source @%d\n",
		global_sub_size, global_sub_indices[SUB_SOURCE_VOBSUB],
		global_sub_indices[SUB_SOURCE_SUBS], global_sub_indices[SUB_SOURCE_DEMUX],
		global_sub_pos, source);

#ifdef USE_SUB
        set_of_sub_pos = -1;
        subdata = NULL;
        vo_sub_last = vo_sub = NULL;
#endif
        vobsub_id = -1;
        dvdsub_id = -1;
        if (d_dvdsub) d_dvdsub->id = -1;

        // be careful!
        // if sub_changed is till on but subdata's been reset, bad things happen.
        osd_show_vobsub_changed = 0;
        osd_show_sub_changed = 0;

        if (source == SUB_SOURCE_VOBSUB) {
            vobsub_id = global_sub_pos - global_sub_indices[SUB_SOURCE_VOBSUB];
            if (!global_sub_quiet_osd_hack) osd_show_vobsub_changed = sh_video->fps;
#ifdef USE_SUB
        } else if (source == SUB_SOURCE_SUBS) {
            set_of_sub_pos = global_sub_pos - global_sub_indices[SUB_SOURCE_SUBS];
            subdata = set_of_subtitles[set_of_sub_pos];
            if (!global_sub_quiet_osd_hack) osd_show_sub_changed = sh_video->fps;
            vo_osd_changed(OSDTYPE_SUBTITLE); 

            // FIXME: is this the correct place for these?
            if(stream_dump_type==3) list_sub_file(subdata);
            if(stream_dump_type==4) dump_mpsub(subdata, sh_video->fps);
            if(stream_dump_type==6) dump_srt(subdata, sh_video->fps);
            if(stream_dump_type==7) dump_microdvd(subdata, sh_video->fps);
            if(stream_dump_type==8) dump_jacosub(subdata, sh_video->fps);
            if(stream_dump_type==9) dump_sami(subdata, sh_video->fps);
#endif
        } else if (source == SUB_SOURCE_DEMUX) {
            dvdsub_id = global_sub_pos - global_sub_indices[SUB_SOURCE_DEMUX];
            if (d_dvdsub) {
#ifdef USE_DVDREAD
                if (vo_spudec && stream->type == STREAMTYPE_DVD) {
                    d_dvdsub->id = dvdsub_id;
                    spudec_reset(vo_spudec);
                }
#endif
#ifdef HAVE_OGGVORBIS
                if (demuxer->type == DEMUXER_TYPE_OGG)
                    d_dvdsub->id = demux_ogg_sub_id(demuxer, dvdsub_id);
#endif
#ifdef HAVE_MATROSKA
                if (demuxer->type == DEMUXER_TYPE_MATROSKA) {
                    d_dvdsub->id = demux_mkv_change_subs(demuxer, dvdsub_id);
      if (d_dvdsub->id >= 0 && ((mkv_sh_sub_t *)d_dvdsub->sh)->type == 'v') {
        mkv_sh_sub_t *mkv_sh_sub = (mkv_sh_sub_t *)d_dvdsub->sh;
        if (vo_spudec != NULL)
          spudec_free(vo_spudec);
        vo_spudec =
          spudec_new_scaled_vobsub(mkv_sh_sub->has_palette ? mkv_sh_sub->palette : NULL, mkv_sh_sub->colors,
                                   mkv_sh_sub->custom_colors,
                                   mkv_sh_sub->width,
                                   mkv_sh_sub->height);
        if (!forced_subs_only)
          forced_subs_only = mkv_sh_sub->forced_subs_only;
        if (vo_spudec) {
          spudec_set_forced_subs_only(vo_spudec, forced_subs_only);
          inited_flags |= INITED_SPUDEC;
        }
      }
    }
#endif
            }
            if (!global_sub_quiet_osd_hack) osd_show_vobsub_changed = sh_video->fps;
        } else { // off
            if (!global_sub_quiet_osd_hack) osd_show_vobsub_changed = sh_video->fps;
#ifdef USE_SUB
            vo_osd_changed(OSDTYPE_SUBTITLE); 
#endif
	}
        // it's annoying and dumb to show osd saying "off" at every subless file...
        global_sub_quiet_osd_hack = 0;
    }
        break;
    case MP_CMD_SUB_FORCED_ONLY:
      if (vo_spudec) {
	forced_subs_only = forced_subs_only ? 0 : ~0; // toggle state
	spudec_set_forced_subs_only(vo_spudec,forced_subs_only);
      }    
      break;
    case MP_CMD_SCREENSHOT :
      if(vo_config_count) video_out->control(VOCTRL_SCREENSHOT, NULL);
      break;
    case MP_CMD_VF_CHANGE_RECTANGLE:
	set_rectangle(sh_video, cmd->args[0].v.i, cmd->args[1].v.i);
	break;
	
    case MP_CMD_GET_TIME_LENGTH : {
	mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_AnsLength, demuxer_get_time_length(demuxer));
    } break;

	case MP_CMD_GET_VO_FULLSCREEN : {
	if(video_out && vo_config_count)
		mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_AnsVoFullscreen, vo_fs);
	} break;
    
    case MP_CMD_GET_PERCENT_POS : {
	mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_AnsPercentPos, demuxer_get_percent_pos(demuxer));
    } break;
    case MP_CMD_SWITCH_AUDIO :
        demuxer_switch_audio(demuxer);
        break;
    case MP_CMD_RUN : {
#ifndef __MINGW32__
        if(!fork()) {
          execl("/bin/sh","sh","-c",cmd->args[0].v.s,NULL);
          exit(0);
        }
#endif
    } break;

#ifdef USE_DVDNAV
    case MP_CMD_DVDNAV_EVENT: {
      dvdnav_priv_t * dvdnav_priv = (dvdnav_priv_t*)(stream->priv);
      dvdnav_event_t * dvdnav_event = (dvdnav_event_t *)(cmd->args[0].v.v);

      /* ignore these events if we're not in dvd_nav mode */
      if (stream->type != STREAMTYPE_DVDNAV) break;

      if (!dvdnav_event) {
        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNullEvent);
        break;
      }

      //printf("mplayer: got event: %d\n",dvdnav_event->event);

      switch (dvdnav_event->event) {
      case DVDNAV_BLOCK_OK: {
          /* be silent about this one */
                break;
          }
      case DVDNAV_HIGHLIGHT: {
          dvdnav_highlight_event_t *hevent = (dvdnav_highlight_event_t*)(dvdnav_event->details);
          if (!hevent) {
                mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavHighlightEventBroken);
                break;
          }

          if (hevent->display && hevent->buttonN>0)
          {
                //dvdnav_priv->seen_root_menu=1; /* if we got a highlight, we're on a menu */
                sprintf( dvd_nav_text, "Highlight button %d (%u,%u)-(%u,%u) PTS %d (now is %5.2f)",
                     hevent->buttonN,
                     hevent->sx,hevent->sy,
                     hevent->ex,hevent->ey,
                     hevent->pts, d_video->pts);
                mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavEvent,dvd_nav_text);
                //osd_show_dvd_nav_delay = 60;

                osd_show_dvd_nav_highlight=1;
                osd_show_dvd_nav_sx=hevent->sx;
                osd_show_dvd_nav_ex=hevent->ex;
                osd_show_dvd_nav_sy=hevent->sy;
                osd_show_dvd_nav_ey=hevent->ey;
          }
          else {
                  osd_show_dvd_nav_highlight=0;
                  mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavHighlightHide);
          }
        break;
        }
      case DVDNAV_STILL_FRAME: {
          dvdnav_still_event_t *still_event = (dvdnav_still_event_t*)(dvdnav_event->details);

          mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavStillFrame, still_event->length );
          while (dvdnav_stream_sleeping(dvdnav_priv)) {
            usec_sleep(1000); /* 1ms */
          }
          dvdnav_stream_sleep(dvdnav_priv,still_event->length);
        break;
        }
      case DVDNAV_STOP: {
          mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavStop );
        break;
        }
      case DVDNAV_NOP: {
        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavNOP);
        break;
        }
      case DVDNAV_SPU_STREAM_CHANGE: {
#if DVDNAVVERSION > 012
        dvdnav_spu_stream_change_event_t *stream_change = (dvdnav_spu_stream_change_event_t*)(dvdnav_event->details);

        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavSpuStreamChangeVerbose,
                stream_change->physical_wide,
                stream_change->physical_letterbox,
                stream_change->physical_pan_scan,
                stream_change->logical);

        if (vo_spudec && dvdsub_id!=stream_change->physical_wide) {
                mp_msg(MSGT_INPUT,MSGL_DBG2,"d_dvdsub->id change: was %d is now %d\n",
                        d_dvdsub->id,stream_change->physical_wide);
                // FIXME: need a better way to change SPU id
                d_dvdsub->id=dvdsub_id=stream_change->physical_wide;
                if (vo_spudec) spudec_reset(vo_spudec);
        }
#else
        dvdnav_stream_change_event_t *stream_change = (dvdnav_stream_change_event_t*)(dvdnav_event->details);

        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavSpuStreamChange,
                stream_change->physical,
                stream_change->logical);

        if (vo_spudec && dvdsub_id!=stream_change->physical) {
                mp_msg(MSGT_INPUT,MSGL_DBG2,"d_dvdsub->id change: was %d is now %d\n",
                        d_dvdsub->id,stream_change->physical);
                // FIXME: need a better way to change SPU id
                d_dvdsub->id=dvdsub_id=stream_change->physical;
                if (vo_spudec) spudec_reset(vo_spudec);
        }
#endif
        break;
        }
      case DVDNAV_AUDIO_STREAM_CHANGE: {
        int aid_temp;
#if DVDNAVVERSION > 012
        dvdnav_audio_stream_change_event_t *stream_change = (dvdnav_audio_stream_change_event_t*)(dvdnav_event->details);
#else
        dvdnav_stream_change_event_t *stream_change = (dvdnav_stream_change_event_t*)(dvdnav_event->details);
#endif

        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavAudioStreamChange,
                stream_change->physical,
                stream_change->logical);

        aid_temp=stream_change->physical;
        if (aid_temp>=0) aid_temp+=128; // FIXME: is this sane?
        if (d_audio && audio_id!=aid_temp) {
                mp_msg(MSGT_INPUT,MSGL_DBG2,"d_audio->id change: was %d is now %d\n",
                        d_audio->id,aid_temp);
                // FIXME: need a bettery way to change audio stream id
                d_audio->id=dvdsub_id=aid_temp;
                if(sh_audio) resync_audio_stream(sh_audio);
        }

        break;
      }
      case DVDNAV_VTS_CHANGE: {
        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavVTSChange);
        break;
        }
      case DVDNAV_CELL_CHANGE: {
        dvdnav_cell_change_event_t *cell_change = (dvdnav_cell_change_event_t*)(dvdnav_event->details);
        cell_playback_t * cell_playback = cell_change->new_cell;

        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavCellChange);
        osd_show_dvd_nav_highlight=0; /* screen changed, disable menu */
        /*
        printf("new still time: %d\n",cell_playback->still_time);
        printf("new cell_cmd_nr: %d\n",cell_playback->cell_cmd_nr);
        printf("new playback_time: %02d:%02d:%02d.%02d\n",
                        cell_playback->playback_time.hour,
                        cell_playback->playback_time.minute,
                        cell_playback->playback_time.second,
                        cell_playback->playback_time.frame_u);

        */
        //rel_seek_secs=1; // not really: we can't seek, but it'll reset the muxer
        //abs_seek_pos=0;
        break;
        }
      case DVDNAV_NAV_PACKET: {
        // printf("DVDNAV Event: Nav Packet\n");
        break;
        }
      case DVDNAV_SPU_CLUT_CHANGE: {
        uint32_t * new_clut = (uint32_t *)(dvdnav_event->details);

        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavSpuClutChange);
        // send new palette to SPU decoder
        if (vo_spudec) spudec_update_palette(vo_spudec,new_clut);

        break;
        }
      case DVDNAV_SEEK_DONE: {
        mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_DvdnavNavSeekDone);
        break;
        }
      }

      // free the dvdnav event
      free(dvdnav_event->details);
      free(dvdnav_event);
      cmd->args[0].v.v=NULL;
    }
    case MP_CMD_DVDNAV: {
      dvdnav_priv_t * dvdnav_priv=(dvdnav_priv_t*)stream->priv;

      /* ignore these events if we're not in dvd_nav mode */
      if (stream->type != STREAMTYPE_DVDNAV) break;

      switch (cmd->args[0].v.i) {
        case MP_CMD_DVDNAV_UP:
          dvdnav_upper_button_select(dvdnav_priv->dvdnav);
          break;
        case MP_CMD_DVDNAV_DOWN:
          dvdnav_lower_button_select(dvdnav_priv->dvdnav);
          break;
        case MP_CMD_DVDNAV_LEFT:
          dvdnav_left_button_select(dvdnav_priv->dvdnav);
          break;
        case MP_CMD_DVDNAV_RIGHT:
          dvdnav_right_button_select(dvdnav_priv->dvdnav);
          break;
        case MP_CMD_DVDNAV_MENU:
          mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_MenuCall);
          dvdnav_menu_call(dvdnav_priv->dvdnav,DVD_MENU_Root);
          break;
        case MP_CMD_DVDNAV_SELECT:
          dvdnav_button_activate(dvdnav_priv->dvdnav);
          break;
        default:
          mp_msg(MSGT_CPLAYER, MSGL_V, "Weird DVD Nav cmd %d\n",cmd->args[0].v.i);
          break;
      }
      break;
    }
#endif
    default : {
#ifdef HAVE_NEW_GUI
      if ( ( use_gui )&&( cmd->id > MP_CMD_GUI_EVENTS ) ) guiGetEvent( guiIEvent,(char *)cmd->id );
       else
#endif
      mp_msg(MSGT_CPLAYER, MSGL_V, "Received unknown cmd %s\n",cmd->name);
    }
    }
    if (cmd->pausing)
      osd_function = OSD_PAUSE;
    mp_cmd_free(cmd);
  }
}

  if (seek_to_sec) {
    int a,b; float d;
    
    if (sscanf(seek_to_sec, "%d:%d:%f", &a,&b,&d)==3)
	rel_seek_secs += 3600*a +60*b +d ;
    else if (sscanf(seek_to_sec, "%d:%f", &a, &d)==2)
	rel_seek_secs += 60*a +d;
    else if (sscanf(seek_to_sec, "%f", &d)==1)
	rel_seek_secs += d;

     seek_to_sec = NULL;
  }
  
  /* Looping. */
  if(eof==1 && loop_times>=0) {
    int l = loop_times;
    play_tree_iter_step(playtree_iter,0,0);
    loop_times = l;
    mp_msg(MSGT_CPLAYER,MSGL_V,"loop_times = %d, eof = %d\n", loop_times,eof);

    if(loop_times>1) loop_times--; else
    if(loop_times==1) loop_times=-1;
    play_n_frames=play_n_frames_mf;
    eof=0;
    abs_seek_pos=3; rel_seek_secs=0; // seek to start of movie (0%)
    loop_seek = 1;
  }

if(rel_seek_secs || abs_seek_pos){
  current_module="seek";
  if(demux_seek(demuxer,rel_seek_secs,abs_seek_pos)){
      // success:
      /* FIXME there should be real seeking for vobsub */
      if(sh_video) sh_video->pts=d_video->pts;
      if (vo_vobsub)
	//vobsub_reset(vo_vobsub);
	vobsub_seek(vo_vobsub,sh_video->pts);
#if 0
      if(sh_video && d_video->packs == 0)
	ds_fill_buffer(d_video);
      if(sh_audio){
	if(d_audio->packs == 0)
	  ds_fill_buffer(d_audio);
	if(verbose>0){
	    float a_pts=d_audio->pts;
            a_pts+=(ds_tell_pts(d_audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps;
	    mp_msg(MSGT_AVSYNC,MSGL_V,"SEEK: A: %5.3f  V: %5.3f  A-V: %5.3f   \n",a_pts,d_video->pts,a_pts-d_video->pts);
	}
        mp_msg(MSGT_AVSYNC,MSGL_STATUS,"A:%6.1f  V:%6.1f  A-V:%7.3f  ct: ?   \r",d_audio->pts,d_video->pts,0.0f);
      } else {
        mp_msg(MSGT_AVSYNC,MSGL_STATUS,"A: ---   V:%6.1f   \r",d_video->pts);
      }
#endif
      fflush(stdout);

      if(sh_video){
	 current_module="seek_video_reset";
         resync_video_stream(sh_video);
         if(vo_config_count) video_out->control(VOCTRL_RESET,NULL);
      }
      
      if(sh_audio){
        current_module="seek_audio_reset";
        audio_out->reset(); // stop audio, throwing away buffered data
      }
#ifdef USE_OSD
        // Set OSD:
      if(osd_level && !loop_seek){
#ifdef USE_EDL
	if( !edl_decision ) {
#else
	  if( 1 ) { // Let the compiler optimize this out
#endif
	  if (sh_video) {
	    osd_visible=sh_video->fps; // 1 sec
	    vo_osd_progbar_type=0;
	    vo_osd_progbar_value=demuxer_get_percent_pos(demuxer) * 256 / 100;
	    vo_osd_changed(OSDTYPE_PROGBAR);
	  }
	}
      }
#endif
      if(sh_video) {
	c_total=0;
	max_pts_correction=0.1;
	osd_visible=sh_video->fps; // to rewert to PLAY pointer after 1 sec
	audio_time_usage=0; video_time_usage=0; vout_time_usage=0;
	drop_frame_cnt=0;
	too_slow_frame_cnt=0;
	too_fast_frame_cnt=0;

        if(vo_spudec) spudec_reset(vo_spudec);
      }
  }
#ifdef USE_EDL
/*
 * We saw a seek, have to rewind the EDL operations stack
 * and find the next EDL action to take care of.
 */

edl_muted = 0;
next_edl_record = edl_records;

while (next_edl_record)
{
    /* Trying to remember if we need to mute/unmute first;
     * prior EDL implementation lacks this.
     */
  
    if (next_edl_record->start_sec >= sh_video->pts)
        break;

    if (next_edl_record->action == EDL_MUTE) edl_muted = !edl_muted;
    next_edl_record = next_edl_record->next;

}
if ((user_muted | edl_muted) != mixer.muted) mixer_mute(&mixer);
#endif
  rel_seek_secs=0;
  abs_seek_pos=0;
  frame_time_remaining=0;
  current_module=NULL;
  loop_seek=0;
}

#ifdef HAVE_NEW_GUI
      if(use_gui){
        guiEventHandling();
	if(demuxer->file_format==DEMUXER_TYPE_AVI && sh_video && sh_video->video.dwLength>2){
	  // get pos from frame number / total frames
	  guiIntfStruct.Position=(float)d_video->pack_no*100.0f/sh_video->video.dwLength;
	} else {
	 off_t len = ( demuxer->movi_end - demuxer->movi_start );
	 off_t pos = ( demuxer->file_format == DEMUXER_TYPE_AUDIO?stream->pos:demuxer->filepos );
	 guiIntfStruct.Position=(len <= 0? 0.0f : ( pos - demuxer->movi_start ) * 100.0f / len );
	}
	if ( sh_video ) guiIntfStruct.TimeSec=sh_video->pts;
	  else if ( sh_audio ) guiIntfStruct.TimeSec=sh_audio->delay;
	guiIntfStruct.LengthInSec=demuxer_get_time_length(demuxer);
	guiGetEvent( guiReDraw,NULL );
	guiGetEvent( guiSetVolume,NULL );
	if(guiIntfStruct.Playing==0) break; // STOP
	if(guiIntfStruct.Playing==2) osd_function=OSD_PAUSE;
        if ( guiIntfStruct.DiskChanged || guiIntfStruct.NewPlay ) goto goto_next_file;
#ifdef USE_DVDREAD
        if ( stream->type == STREAMTYPE_DVD )
	 {
	  dvd_priv_t * dvdp = stream->priv;
	  guiIntfStruct.DVD.current_chapter=dvd_chapter_from_cell(dvdp,guiIntfStruct.DVD.current_title-1, dvdp->cur_cell)+1;
	 }
#endif
      }
#endif


//================= Update OSD ====================
#ifdef USE_OSD
  if(osd_level>=1 && sh_video){
      int pts=sh_video->pts;
      char osd_text_tmp[64];
      if(pts==osd_last_pts-1) ++pts; else osd_last_pts=pts;
      vo_osd_text=osd_text_buffer;
#ifdef USE_DVDNAV
      if (osd_show_dvd_nav_delay) {
          snprintf(osd_text_tmp, 63, "DVDNAV: %s", dvd_nav_text);
          osd_show_dvd_nav_delay--;
      } else
#endif
#ifdef USE_TV
      if (osd_show_tv_channel && tv_channel_list) {
	  snprintf(osd_text_tmp, 63, "Channel: %s", tv_channel_current->name);
	  osd_show_tv_channel--;
      } else
#endif
      if (osd_show_text) {
	  snprintf(osd_text_tmp, 63, "%s", osd_show_text_buffer);
	  osd_show_text--;
      } else
      if (osd_show_sub_visibility) {
	  snprintf(osd_text_tmp, 63, "Subtitles: %sabled", sub_visibility?"en":"dis");
	  osd_show_sub_visibility--;
      } else
      if (osd_show_vobsub_changed) {
	  snprintf(osd_text_tmp, 63, "Subtitles: off");
	  if (vo_vobsub && vobsub_id >= 0) {
	      const char *language = "none";
	      language = vobsub_get_id(vo_vobsub, (unsigned int) vobsub_id);
	      snprintf(osd_text_tmp, 63, "Subtitles: (%d) %s", vobsub_id, language ? language : "unknown");
	  }
#ifdef HAVE_OGGVORBIS
	  if (d_dvdsub && demuxer->type == DEMUXER_TYPE_OGG) {
	      if (dvdsub_id >= 0) {
		char *lang = demux_ogg_sub_lang(demuxer, dvdsub_id);
		if (!lang) lang = "unknown";
		snprintf(osd_text_tmp, 63, "Subtitles: (%d) %s", dvdsub_id, lang);
	      }
	  }
#endif
#ifdef USE_DVDREAD
	  if (vo_spudec && (demuxer->type != DEMUXER_TYPE_MATROSKA)) {
	      if (dvdsub_id >= 0) {
		  char lang[5] = "none";
		  int code = 0;
		  code = dvd_lang_from_sid(stream, dvdsub_id);
		  if (code) {
		      lang[0] = code >> 8;
		      lang[1] = code;
		      lang[2] = 0;
		  }
		  snprintf(osd_text_tmp, 63, "Subtitles: (%d) %s", dvdsub_id, lang);
	      }
	  }
#endif
#ifdef HAVE_MATROSKA
    if (demuxer->type == DEMUXER_TYPE_MATROSKA) {
      char lang[10] = "unknown";
      if (dvdsub_id >= 0) {
        demux_mkv_get_sub_lang(demuxer, dvdsub_id, lang, 9);
        lang[9] = 0;
	snprintf(osd_text_tmp, 63, "Subtitles: (%d) %s", dvdsub_id, lang);
      }
    }
#endif
	  osd_show_vobsub_changed--;
      } else
#ifdef USE_SUB
      if (osd_show_sub_changed) {
	  char *tmp2;
          tmp = subdata->filename;
	  if ((tmp2 = strrchr(tmp, '/'))) {
	      tmp = tmp2+1;
	  }
	  snprintf(osd_text_tmp, 63, "Sub: (%d) %s%s", 
                                  set_of_sub_pos + 1,
                                  strlen(tmp) < 20 ? "" : "...",
                                  strlen(tmp) < 20 ? tmp : tmp+strlen(tmp)-19);
	  osd_show_sub_changed--;
      } else
#endif
      if (osd_show_sub_delay) {
	  snprintf(osd_text_tmp, 63, "Sub delay: %d ms", ROUND(sub_delay*1000));
	  osd_show_sub_delay--;
      } else
      if (osd_show_sub_pos) {
         snprintf(osd_text_tmp, 63, "Sub position: %d/100", sub_pos);
         osd_show_sub_pos--;
      } else
      if (osd_show_sub_alignment) {
         snprintf(osd_text_tmp, 63, "Sub alignment: %s",
	    (sub_alignment == 2 ? "bottom" :
	    (sub_alignment == 1 ? "center" : "top")));
         osd_show_sub_alignment--;
      } else
      if (osd_show_av_delay) {
	  snprintf(osd_text_tmp, 63, "A-V delay: %d ms", ROUND(audio_delay*1000));
	  osd_show_av_delay--;
      } else if (osd_show_speed) {
	  snprintf(osd_text_tmp, 63, "Speed: x %6.2f", playback_speed);
	  osd_show_speed--;
      } else if (osd_show_ontop) {
	  snprintf(osd_text_tmp, 63, "Stay on top: %sabled", vo_ontop?"en":"dis");
	  osd_show_ontop--;
      } else if (osd_show_rootwin) {
	  snprintf(osd_text_tmp, 63, "Rootwin: %sabled", vo_rootwin?"en":"dis");
	  osd_show_rootwin--;
      } else if (osd_show_framedropping) {
	  snprintf(osd_text_tmp, 63, "Framedropping: %s",
	     (frame_dropping == 1 ? "on" :
	     (frame_dropping == 2 ? "hard"  : "off")));
	  osd_show_framedropping--;
      } else if(osd_level>=2) {
          int len = demuxer_get_time_length(demuxer);
          int percentage = -1;
          char percentage_text[10];
          if (osd_show_percentage) {
            percentage = demuxer_get_percent_pos(demuxer);
            osd_show_percentage--;
          }
          if (percentage >= 0)
            snprintf(percentage_text, 9, " (%d%%)", percentage);
	  else
	    percentage_text[0] = 0;
          if (osd_level == 3) 
            snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d / %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,len/3600,(len/60)%60,len%60,percentage_text);
          else
            snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,percentage_text);
      } else osd_text_tmp[0]=0;
      
      if(strcmp(vo_osd_text, osd_text_tmp)) {
	      strncpy(vo_osd_text, osd_text_tmp, 63);
	      vo_osd_changed(OSDTYPE_OSD);
      }
  } else {
      if(vo_osd_text) {
      vo_osd_text=NULL;
	  vo_osd_changed(OSDTYPE_OSD);
      }
  }
//  for(i=1;i<=11;i++) osd_text_buffer[10+i]=i;osd_text_buffer[10+i]=0;
//  vo_osd_text=osd_text_buffer;
#endif
  
#ifdef USE_SUB
  // find sub
  if(subdata &&  sh_video && sh_video->pts>0){
      float pts=sh_video->pts;
      if(sub_fps==0) sub_fps=sh_video->fps;
      current_module="find_sub";
      if (pts > sub_last_pts || pts < sub_last_pts-1.0 ) {
         find_sub(subdata, (pts+sub_delay) * 
				 (subdata->sub_uses_time ? 100. : sub_fps)); 
	 if (vo_sub) vo_sub_last = vo_sub;
	 // FIXME! frame counter...
         sub_last_pts = pts;
      }
      current_module=NULL;
  }
#endif

#ifdef HAVE_X11
if (stop_xscreensaver && sh_video) {
  current_module="stop_xscreensaver";
  xscreensaver_heartbeat();
  current_module=NULL;
}
#endif
  
  // DVD sub:
if(vo_config_count && vo_spudec) {
  unsigned char* packet=NULL;
  int len,timestamp;
  current_module="spudec";
  spudec_heartbeat(vo_spudec,90000*sh_video->timer);
    // Get a sub packet from the dvd or a vobsub and make a timestamp relative to sh_video->timer
  while(1) {
    // Vobsub
    len = 0;
    if(vo_vobsub) {
      if(sh_video->pts+sub_delay>=0) {
	// The + next_frame_time is there because we'll display the sub at the next frame
	len = vobsub_get_packet(vo_vobsub,sh_video->pts+sub_delay+next_frame_time,(void**)&packet,&timestamp);
	if(len > 0) {
	  timestamp -= (sh_video->pts + sub_delay - sh_video->timer)*90000;
	  mp_dbg(MSGT_CPLAYER,MSGL_V,"\rVOB sub: len=%d v_pts=%5.3f v_timer=%5.3f sub=%5.3f ts=%d \n",len,sh_video->pts,sh_video->timer,timestamp / 90000.0,timestamp);
	}
      }
    } else {
      // DVD sub
      len = ds_get_packet_sub(d_dvdsub,(unsigned char**)&packet);
      if(len > 0) {
	float x = d_dvdsub->pts - sh_video->pts;
	if (x < -10 || x > 10) // prevent missing subs on pts reset
	  timestamp = 90000*(sh_video->timer + d_dvdsub->pts + sub_delay - sh_video->pts);
	else timestamp = 90000*(sh_video->timer + sub_delay);
	mp_dbg(MSGT_CPLAYER,MSGL_V,"\rDVD sub: len=%d  v_pts=%5.3f  s_pts=%5.3f  ts=%d \n",len,sh_video->pts,d_dvdsub->pts,timestamp);
      }
    }
      if(len<=0 || !packet) break;
      if(timestamp < 0) timestamp = 0;
      else spudec_assemble(vo_spudec,packet,len,timestamp);
  }
  
  /* detect wether the sub has changed or not */
  if(spudec_changed(vo_spudec))
    vo_osd_changed(OSDTYPE_SPU);
  current_module=NULL;
}
  
} // while(!eof)

mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d  \n",eof);

}

goto_next_file:  // don't jump here after ao/vo/getch initialization!

mp_msg(MSGT_CPLAYER,MSGL_INFO,"\n");

if(benchmark){
  double tot=video_time_usage+vout_time_usage+audio_time_usage;
  double total_time_usage;
  total_time_usage_start=GetTimer()-total_time_usage_start;
  total_time_usage = (float)total_time_usage_start*0.000001;
  mp_msg(MSGT_CPLAYER,MSGL_INFO,"\nBENCHMARKs: VC:%8.3fs VO:%8.3fs A:%8.3fs Sys:%8.3fs = %8.3fs\n",
	 video_time_usage,vout_time_usage,audio_time_usage,
	 total_time_usage-tot,total_time_usage);
  if(total_time_usage>0.0)
    mp_msg(MSGT_CPLAYER,MSGL_INFO,"BENCHMARK%%: VC:%8.4f%% VO:%8.4f%% A:%8.4f%% Sys:%8.4f%% = %8.4f%%\n",
	   100.0*video_time_usage/total_time_usage,
	   100.0*vout_time_usage/total_time_usage,
	   100.0*audio_time_usage/total_time_usage,
	   100.0*(total_time_usage-tot)/total_time_usage,
	   100.0);
  if(total_frame_cnt && frame_dropping)
    mp_msg(MSGT_CPLAYER,MSGL_INFO,"BENCHMARKn: disp: %d (%3.2f fps)  drop: %d (%d%%)  total: %d (%3.2f fps)\n",
	total_frame_cnt-drop_frame_cnt,
	(total_time_usage>0.5)?((total_frame_cnt-drop_frame_cnt)/total_time_usage):0,
	drop_frame_cnt,
	100*drop_frame_cnt/total_frame_cnt,
	total_frame_cnt,
	(total_time_usage>0.5)?(total_frame_cnt/total_time_usage):0);
  
}

// time to uninit all, except global stuff:
uninit_player(INITED_ALL-(INITED_GUI+INITED_INPUT+(fixed_vo?INITED_VO:0)));

#ifdef USE_SUB  
  if ( set_of_sub_size > 0 ) 
   {
    current_module="sub_free";
    for (i = 0; i < set_of_sub_size; ++i)
        sub_free( set_of_subtitles[i] );
    set_of_sub_size = 0;
    vo_sub_last = vo_sub=NULL;
    subdata=NULL;
   }
#endif

if(eof == PT_NEXT_ENTRY || eof == PT_PREV_ENTRY) {
  eof = eof == PT_NEXT_ENTRY ? 1 : -1;
  if(play_tree_iter_step(playtree_iter,play_tree_step,0) == PLAY_TREE_ITER_ENTRY) {
    eof = 1;
  } else {
    play_tree_iter_free(playtree_iter);
    playtree_iter = NULL;
  }
  play_tree_step = 1;
} else if (eof == PT_UP_NEXT || eof == PT_UP_PREV) {
  eof = eof == PT_UP_NEXT ? 1 : -1;
  if ( playtree_iter ) {
    if(play_tree_iter_up_step(playtree_iter,eof,0) == PLAY_TREE_ITER_ENTRY) {
     eof = 1;
    } else {
      play_tree_iter_free(playtree_iter);
      playtree_iter = NULL;
    }
   }
} else { // NEXT PREV SRC
     eof = eof == PT_PREV_SRC ? -1 : 1;
}

if(eof == 0) eof = 1;

while(playtree_iter != NULL) {
  filename = play_tree_iter_get_file(playtree_iter,eof);
  if(filename == NULL) {
    if( play_tree_iter_step(playtree_iter,eof,0) != PLAY_TREE_ITER_ENTRY) {
      play_tree_iter_free(playtree_iter);
      playtree_iter = NULL;
    };
  } else
    break;
} 

#ifdef HAVE_NEW_GUI
 if( use_gui && !playtree_iter ) 
  {
#ifdef USE_DVDREAD
   if ( !guiIntfStruct.DiskChanged ) 
#endif
   mplEnd();
  }	
#endif

if(use_gui || playtree_iter != NULL){

  eof = 0;
  goto play_next_file;
}


exit_player_with_rc(MSGTR_Exit_eof, 0);

return 1;
}

4185 #ifdef HAVE_NEW_GUI
4186  if( use_gui && !playtree_iter )

... quasiment à la fin du fichier.

Dernière modification par bishop (Le 29/04/2006, à 13:27)


La plus grande surprise que puisse faire un con c'est de faire une pause.

Hors ligne

#10 Le 29/04/2006, à 14:39

fran.b

Re : Compilation de mplayer probléme !!

Regardez la version de gcc...

Hors ligne

#11 Le 29/04/2006, à 14:51

Kanor

Re : Compilation de mplayer probléme !!

Salut
merci pour votre aide
voila ma ligne 4184 et 4185 de mplayer.c

     /* Use m_option_print directly to get easily parseable values. */
        val = calloc(1,prop->type->size);

pour ma version de gcc

tyrus@totem:~/prog/CVS/mplayer/main$ gcc-4.0 -v
Utilisation des specs internes.
Target: i486-linux-gnu
Configuré avec: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --with-gxx-include-dir=/usr/include/c++/4.0.2 --enable-shared --with-system-zlib --libexecdir=/usr/lib --enable-nls --without-included-gettext --enable-threads=posix --program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu
Modèle de thread: posix
version gcc 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)

je vient de refaire une mise a jour de cvs aucun changement roll

Hors ligne

#12 Le 29/04/2006, à 15:45

fran.b

Re : Compilation de mplayer probléme !!

Il faut attendre je pense, la version cvs doit être mal en point...

Hors ligne

#13 Le 29/04/2006, à 21:29

bishop

Re : Compilation de mplayer probléme !!

Kanor
fran.b dit:

Regardez la version de gcc...

En ce qui me concerne pour la compilation c' est gcc 3.4 qui a été utilisé.
Tu peux essayer de compiler avec cette version de gcc.

Si tu veux essayer une version antérieure: MPlayer-1.0pre7try2.tar.bz2

(01-05-2006 - Modification du lien car j' ai enlever le paquet...)
http://www.mplayerhq.hu/MPlayer/release … y2.tar.bz2

Dernière modification par bishop (Le 01/05/2006, à 01:01)


La plus grande surprise que puisse faire un con c'est de faire une pause.

Hors ligne

#14 Le 30/04/2006, à 00:56

Kanor

Re : Compilation de mplayer probléme !!

donc voila les nouvelle :
merci bishop le fichier marche parfaitment ..
j'ai essayé sur le cvs de le compiler avec le gcc3.4 j'ai réussi seulment a faire compiler seulment une dizaine de ligne de plus sad
si je trouve une solution pour la cvs je reposte

Hors ligne

#15 Le 30/04/2006, à 10:31

fran.b

Re : Compilation de mplayer probléme !!

Pareil, j'ai essayé gcc version 3.3 3.4 et 4.0. Sans succès... Il y a des changements de structure...

Pour MPlayer-1.0pre7try2.tar.bz2, elle date d'août 2005, ça n'est pas tout à fait 10 jours smile

-rw-r--r--   1 francois francois 6868786 2005-08-27 08:23 MPlayer-1.0pre7try2.tar.bz2

Hors ligne

#16 Le 30/04/2006, à 13:38

bishop

Re : Compilation de mplayer probléme !!

fran.b

Oup's
J' ai mal formulé ma phrase.
J' aurai dû dire...  J' ai téléchargé cette version il y a 10 jours.

Et comme je n' ai pas trouvé la date de sortie de cette version je me suis fié à...
"...les sources de la dernière version de MPlayer"

Enfin merci de la précision.


Et puis pour ceux qui ne veulent pas se lancer dans la compilation, il y a un .deb (pour ubuntu) de cette version içi:

http://ubuntu-debs.de/component/option, … nfo/id,25/

Je n' ai pas essayé ce paquet, je ne peux donc rien en dire.

Dernière modification par bishop (Le 30/04/2006, à 13:47)


La plus grande surprise que puisse faire un con c'est de faire une pause.

Hors ligne