mirror of
https://github.com/mpv-player/mpv
synced 2025-04-17 04:40:09 +00:00
small bug fixed and workarounds :(
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4975 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
eb57e0fd47
commit
d751518e07
@ -102,6 +102,7 @@ extern guiInterface_t guiIntfStruct;
|
|||||||
#define guiSetPause 2
|
#define guiSetPause 2
|
||||||
|
|
||||||
extern void guiInit( int argc,char* argv[], char *envp[] );
|
extern void guiInit( int argc,char* argv[], char *envp[] );
|
||||||
|
extern void guiDone( void );
|
||||||
extern void guiGetEvent( int type,char * arg );
|
extern void guiGetEvent( int type,char * arg );
|
||||||
extern void guiEventHandling( void );
|
extern void guiEventHandling( void );
|
||||||
|
|
||||||
|
@ -208,7 +208,6 @@ void mplEventHandling( int msg,float param )
|
|||||||
{
|
{
|
||||||
// --- user events
|
// --- user events
|
||||||
case evExit:
|
case evExit:
|
||||||
wsDoExit(); // sets wsTrue=False;
|
|
||||||
exit_player( "Exit" );
|
exit_player( "Exit" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -473,9 +473,16 @@ int vo_x11_check_events(Display *mydisplay){
|
|||||||
ret|=VO_EVENT_RESIZE;
|
ret|=VO_EVENT_RESIZE;
|
||||||
break;
|
break;
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
XLookupString( &Event.xkey,buf,sizeof(buf),&keySym,&stat );
|
{
|
||||||
vo_x11_putkey( ( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ) );
|
int key;
|
||||||
ret|=VO_EVENT_KEYPRESS;
|
XLookupString( &Event.xkey,buf,sizeof(buf),&keySym,&stat );
|
||||||
|
key=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) );
|
||||||
|
#ifdef HAVE_NEW_GUI
|
||||||
|
if ( ( use_gui )&&( key == wsEnter ) ) break;
|
||||||
|
#endif
|
||||||
|
vo_x11_putkey( key );
|
||||||
|
ret|=VO_EVENT_KEYPRESS;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_NEW_INPUT
|
#ifdef HAVE_NEW_INPUT
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
|
52
mplayer.c
52
mplayer.c
@ -749,7 +749,7 @@ current_module = NULL;
|
|||||||
if(use_gui){
|
if(use_gui){
|
||||||
guiInit( argc,argv,envp );
|
guiInit( argc,argv,envp );
|
||||||
inited_flags|=INITED_GUI;
|
inited_flags|=INITED_GUI;
|
||||||
guiGetEvent( guiCEvent,(gui_no_filename) ? 0 : 1 );
|
guiGetEvent( guiCEvent,(char *)((gui_no_filename) ? 0 : 1) );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -769,7 +769,7 @@ if(!use_stdin && !slave_mode){
|
|||||||
if ( guiIntfStruct.DVDChanged )
|
if ( guiIntfStruct.DVDChanged )
|
||||||
{
|
{
|
||||||
guiIntfStruct.DVDChanged=0;
|
guiIntfStruct.DVDChanged=0;
|
||||||
guiGetEvent( guiCEvent,guiSetPlay );
|
guiGetEvent( guiCEvent,(char *)guiSetPlay );
|
||||||
filename="/dev/dvd";
|
filename="/dev/dvd";
|
||||||
goto play_dvd;
|
goto play_dvd;
|
||||||
}
|
}
|
||||||
@ -795,21 +795,12 @@ play_dvd:
|
|||||||
{
|
{
|
||||||
play_tree_t * entry = play_tree_new();
|
play_tree_t * entry = play_tree_new();
|
||||||
play_tree_add_file( entry,guiIntfStruct.Filename );
|
play_tree_add_file( entry,guiIntfStruct.Filename );
|
||||||
if ( playtree )
|
if ( playtree ) play_tree_free_list( playtree->child,1 );
|
||||||
|
else playtree=play_tree_new();
|
||||||
|
play_tree_set_child( playtree,entry );
|
||||||
|
if(playtree)
|
||||||
{
|
{
|
||||||
play_tree_free_list( playtree->child,1 );
|
playtree_iter = play_tree_iter_new(playtree,mconfig);
|
||||||
play_tree_set_child( playtree,entry );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fprintf( stderr,"[mplayer] new playtree created.\n" );
|
|
||||||
if ( !playtree ) playtree=play_tree_new();
|
|
||||||
play_tree_set_child( playtree,entry );
|
|
||||||
}
|
|
||||||
|
|
||||||
if(playtree->child)
|
|
||||||
{
|
|
||||||
playtree_iter = play_tree_iter_new(playtree->child,mconfig);
|
|
||||||
if(playtree_iter)
|
if(playtree_iter)
|
||||||
{
|
{
|
||||||
if(play_tree_iter_step(playtree_iter,0,0) != PLAY_TREE_ITER_ENTRY)
|
if(play_tree_iter_step(playtree_iter,0,0) != PLAY_TREE_ITER_ENTRY)
|
||||||
@ -820,8 +811,9 @@ play_dvd:
|
|||||||
filename = play_tree_iter_get_file(playtree_iter,1);
|
filename = play_tree_iter_get_file(playtree_iter,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// filename=playtree->child->files[0];
|
||||||
guiIntfStruct.FilenameChanged=0;
|
guiIntfStruct.FilenameChanged=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2034,7 +2026,7 @@ read_input:
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_NEW_GUI
|
#ifdef HAVE_NEW_GUI
|
||||||
if(use_gui) guiGetEvent( guiCEvent,guiSetPause );
|
if(use_gui) guiGetEvent( guiCEvent,(char *)guiSetPause );
|
||||||
#endif
|
#endif
|
||||||
if (video_out && sh_video)
|
if (video_out && sh_video)
|
||||||
video_out->control(VOCTRL_PAUSE, NULL);
|
video_out->control(VOCTRL_PAUSE, NULL);
|
||||||
@ -2091,7 +2083,7 @@ read_input:
|
|||||||
video_out->control(VOCTRL_RESUME, NULL); // resume video
|
video_out->control(VOCTRL_RESUME, NULL); // resume video
|
||||||
(void)GetRelativeTime(); // keep TF around FT in next cycle
|
(void)GetRelativeTime(); // keep TF around FT in next cycle
|
||||||
#ifdef HAVE_NEW_GUI
|
#ifdef HAVE_NEW_GUI
|
||||||
if (use_gui) guiGetEvent( guiCEvent,guiSetPlay );
|
if (use_gui) guiGetEvent( guiCEvent,(char *)guiSetPlay );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2903,6 +2895,18 @@ if(benchmark){
|
|||||||
,our_n_frames,bench_dropped_frames);
|
,our_n_frames,bench_dropped_frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_NEW_GUI
|
||||||
|
if( use_gui )
|
||||||
|
{
|
||||||
|
#ifdef USE_DVDREAD
|
||||||
|
if ( !guiIntfStruct.DVDChanged )
|
||||||
|
#endif
|
||||||
|
mplStop();
|
||||||
|
#warning workaround for kiba playtree with gui ... if i dont play the prev/next file, then playtree sig6 (assert)
|
||||||
|
eof=0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(eof == PT_NEXT_ENTRY || eof == PT_PREV_ENTRY) {
|
if(eof == PT_NEXT_ENTRY || eof == PT_PREV_ENTRY) {
|
||||||
eof = eof == PT_NEXT_ENTRY ? 1 : -1;
|
eof = eof == PT_NEXT_ENTRY ? 1 : -1;
|
||||||
if(play_tree_iter_step(playtree_iter,eof,0) == PLAY_TREE_ITER_ENTRY) {
|
if(play_tree_iter_step(playtree_iter,eof,0) == PLAY_TREE_ITER_ENTRY) {
|
||||||
@ -2930,16 +2934,6 @@ uninit_player(INITED_VO);
|
|||||||
|
|
||||||
if(eof == 0) eof = 1;
|
if(eof == 0) eof = 1;
|
||||||
|
|
||||||
#ifdef HAVE_NEW_GUI
|
|
||||||
if(use_gui)
|
|
||||||
{
|
|
||||||
#ifdef USE_DVDREAD
|
|
||||||
if ( !guiIntfStruct.DVDChanged )
|
|
||||||
#endif
|
|
||||||
mplStop();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while(playtree_iter != NULL) {
|
while(playtree_iter != NULL) {
|
||||||
filename = play_tree_iter_get_file(playtree_iter,eof);
|
filename = play_tree_iter_get_file(playtree_iter,eof);
|
||||||
if(filename == NULL) {
|
if(filename == NULL) {
|
||||||
|
@ -442,7 +442,6 @@ play_tree_iter_new(play_tree_t* pt,m_config_t* config) {
|
|||||||
void
|
void
|
||||||
play_tree_iter_free(play_tree_iter_t* iter) {
|
play_tree_iter_free(play_tree_iter_t* iter) {
|
||||||
|
|
||||||
if ( !iter ) return;
|
|
||||||
#ifdef MP_DEBUG
|
#ifdef MP_DEBUG
|
||||||
assert(iter != NULL);
|
assert(iter != NULL);
|
||||||
#endif
|
#endif
|
||||||
@ -461,7 +460,6 @@ int
|
|||||||
play_tree_iter_step(play_tree_iter_t* iter, int d,int with_nodes) {
|
play_tree_iter_step(play_tree_iter_t* iter, int d,int with_nodes) {
|
||||||
play_tree_t* pt;
|
play_tree_t* pt;
|
||||||
|
|
||||||
if ( !iter ) return PLAY_TREE_ITER_ERROR;
|
|
||||||
#ifdef MP_DEBUG
|
#ifdef MP_DEBUG
|
||||||
assert(iter != NULL);
|
assert(iter != NULL);
|
||||||
assert(iter->root != NULL);
|
assert(iter->root != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user