comparison Gui/mplayer/gtk/opts.c @ 8284:f7d0ac887455

cache (buzeralas)
author pontscho
date Mon, 25 Nov 2002 18:18:45 +0000
parents f9c18cda60b2
children 5b67aed0fc28
comparison
equal deleted inserted replaced
8283:f73469b47ede 8284:f7d0ac887455
175 const ao_info_t *info = audio_out_drivers[i++]->info; 175 const ao_info_t *info = audio_out_drivers[i++]->info;
176 if ( !strcmp( info->short_name,"plugin" ) ) continue; 176 if ( !strcmp( info->short_name,"plugin" ) ) continue;
177 if ( audio_driver_list ) 177 if ( audio_driver_list )
178 { 178 {
179 char * name = gstrdup( audio_driver_list[0] ); 179 char * name = gstrdup( audio_driver_list[0] );
180 char * sep = strchr( audio_driver_list[0],':' ); 180 char * sep = gstrchr( audio_driver_list[0],':' );
181 if ( sep ) *sep=0; 181 if ( sep ) *sep=0;
182 if ( !gstrcmp( name,(char *)info->short_name ) ) old_audio_driver=i - 1; 182 if ( !gstrcmp( name,(char *)info->short_name ) ) old_audio_driver=i - 1;
183 free( name );
183 } 184 }
184 tmp[0]=(char *)info->short_name; tmp[1]=(char *)info->name; gtk_clist_append( GTK_CLIST( CLADrivers ),tmp ); 185 tmp[0]=(char *)info->short_name; tmp[1]=(char *)info->name; gtk_clist_append( GTK_CLIST( CLADrivers ),tmp );
185 } 186 }
186 if ( old_audio_driver > -1 ) 187 if ( old_audio_driver > -1 )
187 { 188 {
309 g_list_free( Items ); 310 g_list_free( Items );
310 if ( name ) gtk_entry_set_text( GTK_ENTRY( EAFM ),name ); 311 if ( name ) gtk_entry_set_text( GTK_ENTRY( EAFM ),name );
311 } 312 }
312 313
313 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),0 ); 314 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),0 );
314 if ( stream_cache_size > 0 ) 315 gtk_adjustment_set_value( SBCacheadj,(float)gtkCacheSize );
315 { 316 if ( !gtkCacheOn ) gtk_widget_set_sensitive( SBCache,FALSE );
316 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),1 ); 317 else gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),1 );
317 gtk_adjustment_set_value( SBCacheadj,(float)stream_cache_size );
318 } else gtk_widget_set_sensitive( SBCache,FALSE );
319 318
320 // -- disables 319 // -- disables
321 #ifndef USE_SUB 320 #ifndef USE_SUB
322 gtk_widget_set_sensitive( AConfig,FALSE ); 321 gtk_widget_set_sensitive( AConfig,FALSE );
323 gtk_widget_set_sensitive( CBNoAutoSub,FALSE ); 322 gtk_widget_set_sensitive( CBNoAutoSub,FALSE );
477 index_mode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ); 476 index_mode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) );
478 gtkVopPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); 477 gtkVopPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) );
479 gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) ); 478 gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) );
480 gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); 479 gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL );
481 480
482 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) stream_cache_size=(int)SBCacheadj->value; 481 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=1; }
483 else stream_cache_size=-1; 482 else gtkCacheOn=0;
484 483
485 { 484 {
486 int i; 485 int i;
487 char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); 486 char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) );
488 for( i=0;mpcodecs_vd_drivers[i];i++ ) 487 for( i=0;mpcodecs_vd_drivers[i];i++ )