2002-08-26 22:20:58 +00:00
|
|
|
|
2002-01-31 08:39:21 +00:00
|
|
|
#include <inttypes.h>
|
2001-08-25 21:04:29 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
2002-08-26 22:20:58 +00:00
|
|
|
#include <string.h>
|
2001-08-25 21:04:29 +00:00
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <signal.h>
|
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
#include "../wm/ws.h"
|
|
|
|
#include "../../config.h"
|
|
|
|
#include "../../help_mp.h"
|
|
|
|
#include "../../libvo/x11_common.h"
|
2002-04-17 21:12:12 +00:00
|
|
|
#include "../../input/input.h"
|
2001-08-28 15:55:02 +00:00
|
|
|
|
2001-08-25 21:04:29 +00:00
|
|
|
#include "../app.h"
|
|
|
|
|
|
|
|
#include "../wm/wskeys.h"
|
|
|
|
#include "../wm/widget.h"
|
2002-02-23 15:12:55 +00:00
|
|
|
#include "../interface.h"
|
2001-08-25 21:04:29 +00:00
|
|
|
|
|
|
|
#include "widgets.h"
|
|
|
|
#include "./mplayer.h"
|
|
|
|
#include "play.h"
|
|
|
|
|
2001-08-31 12:59:04 +00:00
|
|
|
#include "../skin/skin.h"
|
2002-02-23 15:12:55 +00:00
|
|
|
#include "../skin/font.h"
|
2001-08-25 21:04:29 +00:00
|
|
|
|
2002-08-14 23:02:45 +00:00
|
|
|
#include "../libmpdemux/stream.h"
|
|
|
|
|
2001-08-27 23:56:44 +00:00
|
|
|
extern float rel_seek_secs;
|
|
|
|
extern int abs_seek_pos;
|
|
|
|
|
2002-07-12 00:53:26 +00:00
|
|
|
static int mplGotoTheNext = 1;
|
|
|
|
|
2001-08-25 21:04:29 +00:00
|
|
|
void mplFullScreen( void )
|
|
|
|
{
|
2002-08-29 23:15:24 +00:00
|
|
|
if ( guiIntfStruct.NoWindow && guiIntfStruct.Playing ) return;
|
2002-04-29 22:00:50 +00:00
|
|
|
#if 0
|
2002-08-26 22:20:58 +00:00
|
|
|
static int sx,sy;
|
2002-03-10 23:20:01 +00:00
|
|
|
// if ( !guiIntfStruct.Playing )
|
2001-10-01 12:28:39 +00:00
|
|
|
{
|
2002-03-07 17:50:25 +00:00
|
|
|
wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
|
|
|
|
if ( appMPlayer.subWindow.isFullScreen )
|
|
|
|
{
|
|
|
|
wsResizeWindow( &appMPlayer.subWindow,sx,sy );
|
|
|
|
wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
|
|
|
|
wsWindowDecoration( &appMPlayer.subWindow,appMPlayer.subWindow.Decorations );
|
|
|
|
appMPlayer.subWindow.isFullScreen=0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sx=appMPlayer.subWindow.Width; sy=appMPlayer.subWindow.Height;
|
|
|
|
wsResizeWindow( &appMPlayer.subWindow,wsMaxX,wsMaxY );
|
|
|
|
wsMoveWindow( &appMPlayer.subWindow,True,0,0 );
|
|
|
|
wsWindowDecoration( &appMPlayer.subWindow,0 );
|
|
|
|
appMPlayer.subWindow.isFullScreen=1;
|
|
|
|
}
|
2002-03-10 23:20:01 +00:00
|
|
|
vo_fs=appMPlayer.subWindow.isFullScreen;
|
2002-03-07 17:50:25 +00:00
|
|
|
wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
|
2002-03-10 23:20:01 +00:00
|
|
|
}// else { vo_x11_fullscreen(); appMPlayer.subWindow.isFullScreen=vo_fs; }
|
2002-04-29 22:00:50 +00:00
|
|
|
#else
|
2002-05-06 15:05:07 +00:00
|
|
|
if ( ( guiIntfStruct.Playing )&&( appMPlayer.subWindow.isFullScreen ) )
|
|
|
|
{
|
|
|
|
appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight;
|
|
|
|
switch ( appMPlayer.sub.x )
|
|
|
|
{
|
|
|
|
case -1: appMPlayer.subWindow.OldX=( wsMaxX / 2 ) - ( appMPlayer.subWindow.OldWidth / 2 ); break;
|
|
|
|
case -2: appMPlayer.subWindow.OldX=wsMaxX - appMPlayer.subWindow.OldWidth; break;
|
|
|
|
default: appMPlayer.subWindow.OldX=appMPlayer.sub.x; break;
|
|
|
|
}
|
|
|
|
switch ( appMPlayer.sub.y )
|
|
|
|
{
|
|
|
|
case -1: appMPlayer.subWindow.OldY=( wsMaxY / 2 ) - ( appMPlayer.subWindow.OldHeight / 2 ); break;
|
|
|
|
case -2: appMPlayer.subWindow.OldY=wsMaxY - appMPlayer.subWindow.OldHeight; break;
|
|
|
|
default: appMPlayer.subWindow.OldY=appMPlayer.sub.y; break;
|
|
|
|
}
|
|
|
|
}
|
2002-04-29 22:00:50 +00:00
|
|
|
wsFullScreen( &appMPlayer.subWindow );
|
2002-05-06 15:05:07 +00:00
|
|
|
vo_fs=appMPlayer.subWindow.isFullScreen;
|
|
|
|
wsSetLayer( wsDisplay,appMPlayer.mainWindow.WindowID,appMPlayer.subWindow.isFullScreen );
|
|
|
|
wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,appMPlayer.subWindow.isFullScreen );
|
2002-04-29 22:00:50 +00:00
|
|
|
#endif
|
|
|
|
|
2002-03-07 17:50:25 +00:00
|
|
|
fullscreen=appMPlayer.subWindow.isFullScreen;
|
2002-02-23 15:12:55 +00:00
|
|
|
if ( guiIntfStruct.Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
|
2001-10-02 15:01:56 +00:00
|
|
|
else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extern int mplSubRender;
|
|
|
|
|
2002-07-12 00:53:26 +00:00
|
|
|
void mplEnd( void )
|
|
|
|
{
|
|
|
|
plItem * next;
|
|
|
|
|
|
|
|
if ( !mplGotoTheNext ) { mplGotoTheNext=1; return; }
|
|
|
|
|
2002-07-25 20:26:38 +00:00
|
|
|
if ( guiIntfStruct.Playing && (next=gtkSet( gtkGetNextPlItem,0,NULL )) && plLastPlayed != next )
|
2002-07-12 00:53:26 +00:00
|
|
|
{
|
|
|
|
plLastPlayed=next;
|
|
|
|
guiSetDF( guiIntfStruct.Filename,next->path,next->name );
|
|
|
|
guiIntfStruct.StreamType=STREAMTYPE_FILE;
|
|
|
|
guiIntfStruct.FilenameChanged=1;
|
2002-07-31 13:26:46 +00:00
|
|
|
gfree( (void **)&guiIntfStruct.AudioFile );
|
|
|
|
gfree( (void **)&guiIntfStruct.Subtitlename );
|
2002-07-25 20:26:38 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-08-05 01:14:14 +00:00
|
|
|
if ( guiIntfStruct.FilenameChanged ) return;
|
2002-08-04 19:23:58 +00:00
|
|
|
|
2002-07-25 20:26:38 +00:00
|
|
|
guiIntfStruct.TimeSec=0;
|
|
|
|
guiIntfStruct.Position=0;
|
|
|
|
guiIntfStruct.AudioType=0;
|
2002-08-14 12:17:04 +00:00
|
|
|
#ifdef USE_DVDREAD
|
2002-08-05 01:14:14 +00:00
|
|
|
guiIntfStruct.DVD.current_title=1;
|
|
|
|
guiIntfStruct.DVD.current_chapter=1;
|
|
|
|
guiIntfStruct.DVD.current_angle=1;
|
2002-08-14 12:17:04 +00:00
|
|
|
#endif
|
2002-07-25 20:26:38 +00:00
|
|
|
|
|
|
|
if ( !appMPlayer.subWindow.isFullScreen )
|
|
|
|
{
|
|
|
|
wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
|
|
|
|
wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
|
|
|
|
}
|
|
|
|
guiGetEvent( guiCEvent,guiSetStop );
|
|
|
|
mplSubRender=1;
|
|
|
|
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
|
|
|
wsClearWindow( appMPlayer.subWindow );
|
|
|
|
wsPostRedisplay( &appMPlayer.subWindow );
|
|
|
|
}
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void mplPlay( void )
|
|
|
|
{
|
2002-02-23 15:12:55 +00:00
|
|
|
if ( ( !guiIntfStruct.Filename )||
|
|
|
|
( guiIntfStruct.Filename[0] == 0 )||
|
|
|
|
( guiIntfStruct.Playing == 1 ) ) return;
|
|
|
|
if ( guiIntfStruct.Playing == 2 ) { mplPause(); return; }
|
2002-07-25 20:26:38 +00:00
|
|
|
guiGetEvent( guiCEvent,(void *)guiSetPlay );
|
2001-08-30 22:07:19 +00:00
|
|
|
mplSubRender=0;
|
2001-09-05 18:17:22 +00:00
|
|
|
wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
|
2002-02-23 15:12:55 +00:00
|
|
|
wsClearWindow( appMPlayer.subWindow );
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void mplPause( void )
|
|
|
|
{
|
2002-07-25 20:26:38 +00:00
|
|
|
if ( !guiIntfStruct.Playing ) return;
|
|
|
|
if ( guiIntfStruct.Playing == 1 )
|
|
|
|
{
|
|
|
|
mp_cmd_t * cmd = (mp_cmd_t *)calloc( 1,sizeof( *cmd ) );
|
|
|
|
cmd->id=MP_CMD_PAUSE;
|
|
|
|
cmd->name=strdup("pause");
|
|
|
|
mp_input_queue_cmd(cmd);
|
|
|
|
} else guiIntfStruct.Playing=1;
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
|
|
|
|
2002-02-01 16:34:22 +00:00
|
|
|
void mplState( void )
|
|
|
|
{
|
2002-02-23 15:12:55 +00:00
|
|
|
if ( ( guiIntfStruct.Playing == 0 )||( guiIntfStruct.Playing == 2 ) )
|
2002-02-01 16:34:22 +00:00
|
|
|
{
|
|
|
|
btnModify( evPlaySwitchToPause,btnReleased );
|
|
|
|
btnModify( evPauseSwitchToPlay,btnDisabled );
|
|
|
|
}
|
2002-02-23 15:12:55 +00:00
|
|
|
else
|
2002-02-01 16:34:22 +00:00
|
|
|
{
|
|
|
|
btnModify( evPlaySwitchToPause,btnDisabled );
|
|
|
|
btnModify( evPauseSwitchToPlay,btnReleased );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-25 21:04:29 +00:00
|
|
|
float mplGetPosition( void )
|
|
|
|
{ // return 0.0 ... 100.0
|
2002-02-23 15:12:55 +00:00
|
|
|
return guiIntfStruct.Position;
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void mplRelSeek( float s )
|
|
|
|
{ // -+s
|
2001-08-27 23:56:44 +00:00
|
|
|
rel_seek_secs=s; abs_seek_pos=0;
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void mplAbsSeek( float s )
|
|
|
|
{ // 0.0 ... 100.0
|
2001-08-27 23:56:44 +00:00
|
|
|
rel_seek_secs=0.01*s; abs_seek_pos=3;
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
|
|
|
|
2001-08-31 12:59:04 +00:00
|
|
|
listItems tmpList;
|
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
void ChangeSkin( char * name )
|
2001-08-31 12:59:04 +00:00
|
|
|
{
|
2001-09-17 21:16:00 +00:00
|
|
|
int ret;
|
2002-04-18 21:24:42 +00:00
|
|
|
|
2001-09-17 21:16:00 +00:00
|
|
|
mainVisible=0;
|
2001-08-31 12:59:04 +00:00
|
|
|
|
2001-09-17 21:16:00 +00:00
|
|
|
appInitStruct( &tmpList );
|
|
|
|
skinAppMPlayer=&tmpList;
|
|
|
|
fntFreeFont();
|
2002-02-23 15:12:55 +00:00
|
|
|
ret=skinRead( name );
|
2001-08-31 12:59:04 +00:00
|
|
|
|
2001-09-17 21:16:00 +00:00
|
|
|
appInitStruct( &tmpList );
|
|
|
|
skinAppMPlayer=&appMPlayer;
|
|
|
|
appInitStruct( &appMPlayer );
|
2002-02-23 15:12:55 +00:00
|
|
|
if ( ret ) name=skinName;
|
|
|
|
if ( skinRead( name ) )
|
2001-09-17 21:16:00 +00:00
|
|
|
{
|
|
|
|
mainVisible=1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ( appMPlayer.menuBase.Bitmap.Image )
|
|
|
|
{
|
|
|
|
if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer );
|
|
|
|
if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL )
|
2002-02-23 15:12:55 +00:00
|
|
|
{ mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
|
2001-09-17 21:16:00 +00:00
|
|
|
wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
|
|
|
|
wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
|
2002-05-28 14:12:33 +00:00
|
|
|
wsSetShape( &appMPlayer.menuWindow,appMPlayer.menuBase.Mask.Image );
|
2002-05-14 11:41:02 +00:00
|
|
|
wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow );
|
2001-09-17 21:16:00 +00:00
|
|
|
}
|
2001-08-31 12:59:04 +00:00
|
|
|
|
2001-10-16 21:23:59 +00:00
|
|
|
if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
|
2002-02-23 15:12:55 +00:00
|
|
|
if ( ( !appMPlayer.subWindow.isFullScreen )&&( !guiIntfStruct.Playing ) )
|
2001-10-16 21:23:59 +00:00
|
|
|
{
|
|
|
|
wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
|
2001-11-12 15:16:13 +00:00
|
|
|
wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
|
2002-02-23 15:12:55 +00:00
|
|
|
}
|
2001-10-16 21:23:59 +00:00
|
|
|
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
2002-02-23 15:12:55 +00:00
|
|
|
if ( !guiIntfStruct.Playing )
|
2001-10-16 21:23:59 +00:00
|
|
|
{
|
2002-02-23 15:12:55 +00:00
|
|
|
mplSubRender=1;
|
2001-11-14 23:47:08 +00:00
|
|
|
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
2001-10-16 21:23:59 +00:00
|
|
|
wsClearWindow( appMPlayer.subWindow );
|
|
|
|
wsPostRedisplay( &appMPlayer.subWindow );
|
|
|
|
}
|
2001-08-31 12:59:04 +00:00
|
|
|
|
2001-09-17 21:16:00 +00:00
|
|
|
if ( mplDrawBuffer ) free( mplDrawBuffer );
|
|
|
|
if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
|
2002-02-23 15:12:55 +00:00
|
|
|
{ mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
|
2002-05-20 13:56:16 +00:00
|
|
|
|
|
|
|
if ( wsWMType == wsWMUnknown ) wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
|
2001-09-17 21:16:00 +00:00
|
|
|
wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
|
2001-11-12 15:16:13 +00:00
|
|
|
wsMoveWindow( &appMPlayer.mainWindow,True,appMPlayer.main.x,appMPlayer.main.y );
|
2001-09-17 21:16:00 +00:00
|
|
|
wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
|
|
|
|
wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
|
|
|
|
wsWindowDecoration( &appMPlayer.mainWindow,appMPlayer.mainDecoration );
|
2001-11-18 19:19:57 +00:00
|
|
|
mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
|
2001-09-17 21:16:00 +00:00
|
|
|
wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
btnModify( evSetVolume,guiIntfStruct.Volume );
|
|
|
|
btnModify( evSetBalance,guiIntfStruct.Balance );
|
|
|
|
btnModify( evSetMoviePosition,guiIntfStruct.Position );
|
2001-12-13 00:25:08 +00:00
|
|
|
btnModify( evFullScreen,!appMPlayer.subWindow.isFullScreen );
|
2001-08-31 14:16:28 +00:00
|
|
|
}
|
|
|
|
|
2002-08-14 23:02:45 +00:00
|
|
|
void mplSetFileName( char * dir,char * name,int type )
|
2001-11-12 15:16:13 +00:00
|
|
|
{
|
2002-08-11 13:12:38 +00:00
|
|
|
if ( !name ) return;
|
|
|
|
|
|
|
|
if ( !dir ) guiSetFilename( guiIntfStruct.Filename,name )
|
|
|
|
else guiSetDF( guiIntfStruct.Filename,dir,name )
|
|
|
|
|
2002-08-14 23:02:45 +00:00
|
|
|
guiIntfStruct.StreamType=type;
|
2002-07-25 20:26:38 +00:00
|
|
|
guiIntfStruct.FilenameChanged=1;
|
|
|
|
gfree( (void **)&guiIntfStruct.AudioFile );
|
|
|
|
gfree( (void **)&guiIntfStruct.Subtitlename );
|
2001-11-12 15:16:13 +00:00
|
|
|
}
|
2002-04-18 18:24:08 +00:00
|
|
|
|
|
|
|
void mplPrev( void )
|
|
|
|
{
|
2002-07-12 00:53:26 +00:00
|
|
|
plItem * prev;
|
|
|
|
int stop = 0;
|
2002-06-03 15:06:32 +00:00
|
|
|
|
|
|
|
if ( guiIntfStruct.Playing == 2 ) return;
|
2002-04-18 18:24:08 +00:00
|
|
|
switch ( guiIntfStruct.StreamType )
|
|
|
|
{
|
2002-04-19 10:56:26 +00:00
|
|
|
#ifdef USE_DVDREAD
|
2002-04-18 18:24:08 +00:00
|
|
|
case STREAMTYPE_DVD:
|
|
|
|
if ( --guiIntfStruct.DVD.current_chapter == 0 )
|
|
|
|
{
|
|
|
|
guiIntfStruct.DVD.current_chapter=1;
|
|
|
|
if ( --guiIntfStruct.DVD.current_title <= 0 ) { guiIntfStruct.DVD.current_title=1; stop=1; }
|
|
|
|
}
|
|
|
|
guiIntfStruct.Track=guiIntfStruct.DVD.current_title;
|
|
|
|
break;
|
2002-04-19 10:56:26 +00:00
|
|
|
#endif
|
2002-06-03 15:06:32 +00:00
|
|
|
#ifdef HAVE_VCD
|
|
|
|
case STREAMTYPE_VCD:
|
|
|
|
if ( --guiIntfStruct.Track == 0 ) { guiIntfStruct.Track=1; stop=1; }
|
|
|
|
break;
|
|
|
|
#endif
|
2002-07-12 00:53:26 +00:00
|
|
|
default:
|
2002-07-25 20:26:38 +00:00
|
|
|
if ( (prev=gtkSet( gtkGetPrevPlItem,0,NULL)) )
|
|
|
|
{
|
2002-08-14 23:02:45 +00:00
|
|
|
mplSetFileName( prev->path,prev->name,STREAMTYPE_FILE );
|
2002-07-25 20:26:38 +00:00
|
|
|
mplGotoTheNext=0;
|
|
|
|
break;
|
|
|
|
}
|
2002-07-12 00:53:26 +00:00
|
|
|
return;
|
2002-04-18 18:24:08 +00:00
|
|
|
}
|
2002-06-03 15:06:32 +00:00
|
|
|
if ( stop ) mplEventHandling( evStop,0 );
|
|
|
|
if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 );
|
2002-04-18 18:24:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void mplNext( void )
|
|
|
|
{
|
2002-07-12 00:53:26 +00:00
|
|
|
int stop = 0;
|
|
|
|
plItem * next;
|
2002-06-03 15:06:32 +00:00
|
|
|
|
|
|
|
if ( guiIntfStruct.Playing == 2 ) return;
|
2002-04-18 18:24:08 +00:00
|
|
|
switch ( guiIntfStruct.StreamType )
|
|
|
|
{
|
2002-04-19 10:56:26 +00:00
|
|
|
#ifdef USE_DVDREAD
|
2002-04-18 18:24:08 +00:00
|
|
|
case STREAMTYPE_DVD:
|
|
|
|
if ( guiIntfStruct.DVD.current_chapter++ == guiIntfStruct.DVD.chapters )
|
|
|
|
{
|
|
|
|
guiIntfStruct.DVD.current_chapter=1;
|
|
|
|
if ( ++guiIntfStruct.DVD.current_title > guiIntfStruct.DVD.titles ) { guiIntfStruct.DVD.current_title=guiIntfStruct.DVD.titles; stop=1; }
|
|
|
|
}
|
|
|
|
guiIntfStruct.Track=guiIntfStruct.DVD.current_title;
|
|
|
|
break;
|
2002-04-19 10:56:26 +00:00
|
|
|
#endif
|
2002-06-03 15:06:32 +00:00
|
|
|
#ifdef HAVE_VCD
|
|
|
|
case STREAMTYPE_VCD:
|
|
|
|
if ( ++guiIntfStruct.Track > guiIntfStruct.VCDTracks ) { guiIntfStruct.Track=guiIntfStruct.VCDTracks; stop=1; }
|
|
|
|
break;
|
|
|
|
#endif
|
2002-07-12 00:53:26 +00:00
|
|
|
default:
|
2002-07-25 20:26:38 +00:00
|
|
|
if ( (next=gtkSet( gtkGetNextPlItem,0,NULL)) )
|
|
|
|
{
|
2002-08-14 23:02:45 +00:00
|
|
|
mplSetFileName( next->path,next->name,STREAMTYPE_FILE );
|
2002-07-25 20:26:38 +00:00
|
|
|
mplGotoTheNext=0;
|
|
|
|
break;
|
|
|
|
}
|
2002-07-12 00:53:26 +00:00
|
|
|
return;
|
2002-04-18 18:24:08 +00:00
|
|
|
}
|
2002-06-03 15:06:32 +00:00
|
|
|
if ( stop ) mplEventHandling( evStop,0 );
|
|
|
|
if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 );
|
2002-04-18 18:24:08 +00:00
|
|
|
}
|