1
mirror of https://github.com/mpv-player/mpv synced 2025-01-20 21:07:29 +01:00

- fix equ handling

- fix dvd pos bar
- fix 10l bug in evLoadPlay bugfix :)
- mittomen


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6913 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-08-05 01:14:14 +00:00
parent 8d45b64a65
commit a04e780da0
9 changed files with 27 additions and 27 deletions

View File

@ -18,7 +18,6 @@
// --- params
int gtkEnableAudioEqualizer = 0;
int gtkEnableVideoEqualizer = 0;
char * gtkVODriver = NULL;
int gtkVODoubleBuffer = 1;
@ -61,7 +60,6 @@ static m_config_t * gui_conf;
static config_t gui_opts[] =
{
{ "enable_audio_equ",&gtkEnableAudioEqualizer,CONF_TYPE_FLAG,0,0,1,NULL },
{ "enable_video_equ",&gtkEnableVideoEqualizer,CONF_TYPE_FLAG,0,0,1,NULL },
{ "vo_driver",&gtkVODriver,CONF_TYPE_STRING,0,0,0,NULL },
{ "vo_panscan",&vo_panscan,CONF_TYPE_FLOAT,CONF_RANGE,0.0,1.0,NULL },

View File

@ -3,7 +3,6 @@
#define __CFG_H
extern int gtkEnableAudioEqualizer;
extern int gtkEnableVideoEqualizer;
extern char * gtkVODriver;
extern int gtkVODoubleBuffer;

View File

@ -87,7 +87,8 @@ void guiInit( void )
gtkAOOSSDevice=strdup( PATH_DEV_DSP );
gtkInit();
wsXInit( (void *)mDisplay );
cfg_read();
appInit( (void*)mDisplay );
@ -298,6 +299,18 @@ void guiGetEvent( int type,char * arg )
}
break;
case guiSetValues:
// -- video
if ( arg )
{
if ( vo_gamma_brightness == 1000 )
{ vo_gamma_brightness=0; get_video_colors( (void *)arg,"brightness",&vo_gamma_brightness ); }
if ( vo_gamma_contrast == 1000 )
{ vo_gamma_contrast=0; get_video_colors( (void *)arg,"contrast",&vo_gamma_contrast ); }
if ( vo_gamma_hue == 1000 )
{ vo_gamma_hue=0; get_video_colors( (void *)arg,"hue",&vo_gamma_hue ); }
if ( vo_gamma_saturation == 1000 )
{ vo_gamma_saturation=0; get_video_colors( (void *)arg,"saturation",&vo_gamma_saturation ); }
}
// -- audio
if ( audio_out )
{

View File

@ -116,7 +116,7 @@ void ShowEqualizer( void )
VHueadj->value=(float)vo_gamma_hue;
VSaturationadj->value=(float)vo_gamma_saturation;
if ( !guiIntfStruct.Playing || !gtkEnableVideoEqualizer )
if ( !guiIntfStruct.Playing )
{
gtk_widget_set_sensitive( VContrast,FALSE );
gtk_widget_set_sensitive( VBrightness,FALSE );
@ -210,7 +210,7 @@ static void eqButtonReleased( GtkButton * button,gpointer user_data )
}
else
{
if ( !guiIntfStruct.Playing || !gtkEnableVideoEqualizer ) break;
if ( !guiIntfStruct.Playing ) break;
gtkSet( gtkSetContrast,0.0f,NULL );
gtkSet( gtkSetBrightness,0.0f,NULL );
gtkSet( gtkSetHue,0.0f,NULL );

View File

@ -455,7 +455,7 @@ void fs_Ok_released( GtkButton * button,gpointer user_data )
item=item->next;
}
if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() );
if ( mplMainAutoPlay ) mplEventHandling( evPlay,0 );
if ( mplMainAutoPlay ) { mplMainAutoPlay=0; mplEventHandling( evPlay,0 ); }
}
void fs_Cancel_released( GtkButton * button,gpointer user_data )

View File

@ -35,7 +35,6 @@ static GtkWidget * EVFM;
static GtkWidget * CBVFM;
static GtkWidget * CBAudioEqualizer;
static GtkWidget * CBVideoEqualizer;
//static GtkWidget * CBSurround;
static GtkWidget * CBExtraStereo;
static GtkWidget * CBNoSound;
@ -122,7 +121,7 @@ void ShowPreferences( void )
{
const ao_info_t *info = audio_out_drivers[i++]->info;
if ( !strcmp( info->short_name,"plugin" ) ) continue;
if ( !strcmp( gtkAODriver,info->short_name ) ) old_audio_driver=i - 1;
if ( !gstrcmp( gtkAODriver,info->short_name ) ) old_audio_driver=i - 1;
tmp[0]=(char *)info->short_name; tmp[1]=(char *)info->name; gtk_clist_append( GTK_CLIST( CLADrivers ),tmp );
}
gtk_clist_select_row( GTK_CLIST( CLADrivers ),old_audio_driver,0 );
@ -132,7 +131,6 @@ void ShowPreferences( void )
}
// -- 2. page
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBVideoEqualizer ),gtkEnableVideoEqualizer );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ),gtkVODoubleBuffer );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDR ),gtkVODirectRendering );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFramedrop ),gtkVFrameDrop );
@ -282,7 +280,6 @@ void prButton( GtkButton * button,gpointer user_data )
gtkVODriver=gstrdup( vo_driver[0] );
// -- 2. page
gtkEnableVideoEqualizer=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBVideoEqualizer ) );
gtkVODoubleBuffer=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ) );
gtkVODirectRendering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDR ) );
gtkVFrameDrop=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFramedrop ) );
@ -822,13 +819,6 @@ GtkWidget * create_Preferences( void )
gtk_container_add( GTK_CONTAINER( frame ),vbox5 );
gtk_widget_set_usize( vbox5,250,-2 );
CBVideoEqualizer=gtk_check_button_new_with_label( MSGTR_PREFERENCES_VideoEqu );
gtk_widget_set_name( CBVideoEqualizer,"CBVideoEqualizer" );
gtk_widget_ref( CBVideoEqualizer );
gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBVideoEqualizer",CBVideoEqualizer,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( CBVideoEqualizer );
gtk_box_pack_start( GTK_BOX( vbox5 ),CBVideoEqualizer,FALSE,FALSE,0 );
CBDoubleBuffer=gtk_check_button_new_with_label( MSGTR_PREFERENCES_DoubleBuffer );
gtk_widget_set_name( CBDoubleBuffer,"CBDoubleBuffer" );
gtk_widget_ref( CBDoubleBuffer );

View File

@ -54,10 +54,10 @@ void mplInit( void * disp )
// read gui.conf, gui.pl
cfg_read();
#endif
// opens X display, checks for extensions (XShape, DGA etc)
wsXInit( disp );
#endif
if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
{

View File

@ -102,11 +102,14 @@ void mplEnd( void )
}
else
{
if ( mplMainAutoPlay ) { mplMainAutoPlay=0; return; }
if ( guiIntfStruct.FilenameChanged ) return;
guiIntfStruct.TimeSec=0;
guiIntfStruct.Position=0;
guiIntfStruct.AudioType=0;
guiIntfStruct.DVD.current_title=1;
guiIntfStruct.DVD.current_chapter=1;
guiIntfStruct.DVD.current_angle=1;
if ( !appMPlayer.subWindow.isFullScreen )
{

View File

@ -1358,7 +1358,7 @@ fflush(stdout);
guiGetEvent( guiSetFileName,filename );
if ( sh_audio ) guiIntfStruct.AudioType=sh_audio->channels; else guiIntfStruct.AudioType=0;
if ( !sh_video && sh_audio ) guiGetEvent( guiSetAudioOnly,(char *)1 ); else guiGetEvent( guiSetAudioOnly,(char *)0 );
guiGetEvent( guiSetValues,NULL );
guiGetEvent( guiSetValues,(char *)sh_video );
}
#endif
@ -2920,12 +2920,9 @@ if(rel_seek_secs || abs_seek_pos){
// get pos from frame number / total frames
guiIntfStruct.Position=(float)d_video->pack_no*100.0f/sh_video->video.dwLength;
} else {
// get pos from file position / filesize
int len=((demuxer->movi_end-demuxer->movi_start));
int pos;
if ( demuxer->file_format==DEMUXER_TYPE_AUDIO ) pos=stream->pos;
else pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos;
guiIntfStruct.Position=(len<=0)?0:((float)(pos-demuxer->movi_start) / len * 100.0f);
int len = ( ( demuxer->movi_end - demuxer->movi_start ) >> 8 );
int pos = ( demuxer->file_format == DEMUXER_TYPE_AUDIO?stream->pos:demuxer->filepos );
guiIntfStruct.Position=(len <= 0? 0.0f : ( pos - demuxer->movi_start ) / len / 2.56f /* / 256.0f * 100.0f */ );
}
if ( sh_video ) guiIntfStruct.TimeSec=d_video->pts;
else if ( sh_audio ) guiIntfStruct.TimeSec=sh_audio->timer;