mirror of https://github.com/mpv-player/mpv
add new sumbols
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1889 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
22e0b7141e
commit
46bf7cce06
|
@ -73,18 +73,17 @@ char * Translate( char * str )
|
||||||
case '6': t=mplShMem->LengthInSec; goto calclengthhhmmss;
|
case '6': t=mplShMem->LengthInSec; goto calclengthhhmmss;
|
||||||
case '1': t=mplShMem->TimeSec;
|
case '1': t=mplShMem->TimeSec;
|
||||||
calclengthhhmmss:
|
calclengthhhmmss:
|
||||||
s=t%60; t=( t - s ) / 60; m=t%60; h=t/60;
|
sprintf( tmp,"%02d:%02d:%02d",t/3600,t/60%60,t%60 ); strcat( trbuf,tmp );
|
||||||
sprintf( tmp,"%02d:%02d:%02d",h,m,s ); strcat( trbuf,tmp );
|
|
||||||
break;
|
break;
|
||||||
case '7': t=mplShMem->LengthInSec; goto calclengthmmmmss;
|
case '7': t=mplShMem->LengthInSec; goto calclengthmmmmss;
|
||||||
case '2': t=mplShMem->TimeSec;
|
case '2': t=mplShMem->TimeSec;
|
||||||
calclengthmmmmss:
|
calclengthmmmmss:
|
||||||
s=t%60; m=( ( t - s ) / 60 ) % 60;
|
sprintf( tmp,"%04d:%02d",t/60,t%60 ); strcat( trbuf,tmp );
|
||||||
sprintf( tmp,"%04d:%02d",m,s ); strcat( trbuf,tmp );
|
|
||||||
break;
|
break;
|
||||||
case '3': sprintf( tmp,"%02d",( mplShMem->TimeSec - ( mplShMem->TimeSec % 60 ) ) / 3600 ); strcat( trbuf,tmp ); break;
|
case '3': sprintf( tmp,"%02d",mplShMem->TimeSec / 3600 ); strcat( trbuf,tmp ); break;
|
||||||
case '4': sprintf( tmp,"%02d",( ( mplShMem->TimeSec - ( mplShMem->TimeSec % 60 ) ) / 60 ) % 60 ); strcat( trbuf,tmp ); break;
|
case '4': sprintf( tmp,"%02d",( ( mplShMem->TimeSec / 60 ) % 60 ) ); strcat( trbuf,tmp ); break;
|
||||||
case '5': sprintf( tmp,"%02d",mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break;
|
case '5': sprintf( tmp,"%02d",mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break;
|
||||||
|
case '8': sprintf( tmp,"%01d:%02d:%02d",mplShMem->TimeSec / 3600,( mplShMem->TimeSec / 60 ) % 60,mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break;
|
||||||
case 'v': sprintf( tmp,"%3.2f%%",mplShMem->Volume ); strcat( trbuf,tmp ); break;
|
case 'v': sprintf( tmp,"%3.2f%%",mplShMem->Volume ); strcat( trbuf,tmp ); break;
|
||||||
case 'V': sprintf( tmp,"%3.1f",mplShMem->Volume ); strcat( trbuf,tmp ); break;
|
case 'V': sprintf( tmp,"%3.1f",mplShMem->Volume ); strcat( trbuf,tmp ); break;
|
||||||
case 'b': sprintf( tmp,"%3.2f%%",mplShMem->Balance ); strcat( trbuf,tmp ); break;
|
case 'b': sprintf( tmp,"%3.2f%%",mplShMem->Balance ); strcat( trbuf,tmp ); break;
|
||||||
|
@ -93,6 +92,14 @@ calclengthmmmmss:
|
||||||
case 's': if ( mplShMem->Playing == 0 ) strcat( trbuf,"s" ); break;
|
case 's': if ( mplShMem->Playing == 0 ) strcat( trbuf,"s" ); break;
|
||||||
case 'l': if ( mplShMem->Playing == 1 ) strcat( trbuf,"p" ); break;
|
case 'l': if ( mplShMem->Playing == 1 ) strcat( trbuf,"p" ); break;
|
||||||
case 'e': if ( mplShMem->Playing == 2 ) strcat( trbuf,"e" ); break;
|
case 'e': if ( mplShMem->Playing == 2 ) strcat( trbuf,"e" ); break;
|
||||||
|
case 'a':
|
||||||
|
switch ( mplShMem->AudioType )
|
||||||
|
{
|
||||||
|
case 0: strcat( trbuf,"n" ); break;
|
||||||
|
case 1: strcat( trbuf,"m" ); break;
|
||||||
|
case 2: strcat( trbuf,"t" ); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case '$': strcat( trbuf,"$" ); break;
|
case '$': strcat( trbuf,"$" ); break;
|
||||||
default: continue;
|
default: continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ void mplStop()
|
||||||
mplShMem->Playing=0;
|
mplShMem->Playing=0;
|
||||||
mplShMem->TimeSec=0;
|
mplShMem->TimeSec=0;
|
||||||
mplShMem->Position=0;
|
mplShMem->Position=0;
|
||||||
|
mplShMem->AudioType=0;
|
||||||
if ( !appMPlayer.subWindow.isFullScreen )
|
if ( !appMPlayer.subWindow.isFullScreen )
|
||||||
{
|
{
|
||||||
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
||||||
|
|
|
@ -870,6 +870,9 @@ if(sh_audio){
|
||||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"AUDIO: srate=%d chans=%d bps=%d sfmt=0x%X ratio: %d->%d\n",sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize,
|
mp_msg(MSGT_CPLAYER,MSGL_INFO,"AUDIO: srate=%d chans=%d bps=%d sfmt=0x%X ratio: %d->%d\n",sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize,
|
||||||
sh_audio->sample_format,sh_audio->i_bps,sh_audio->o_bps);
|
sh_audio->sample_format,sh_audio->i_bps,sh_audio->o_bps);
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_NEW_GUI
|
||||||
|
if ( use_gui ) mplShMem->AudioType=sh_audio->channels;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//================== Init VIDEO (codec & libvo) ==========================
|
//================== Init VIDEO (codec & libvo) ==========================
|
||||||
|
|
Loading…
Reference in New Issue