mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Add support to start the plugin in suspended mode.
This commit is contained in:
parent
dab31e2367
commit
ec4a899bb8
@ -1,5 +1,10 @@
|
|||||||
|
User HelAu
|
||||||
|
Date: Mon Jan 30 16:54:47 CET 2012
|
||||||
|
|
||||||
|
Add support to start the plugin in suspended mode.
|
||||||
|
|
||||||
User johns
|
User johns
|
||||||
Date:
|
Date: Mon Jan 30 15:58:21 CET 2012
|
||||||
|
|
||||||
Finished rewrite of video code, to support output modules.
|
Finished rewrite of video code, to support output modules.
|
||||||
Add aspect change support to software decoder path.
|
Add aspect change support to software decoder path.
|
||||||
|
21
softhddev.c
21
softhddev.c
@ -61,6 +61,8 @@ static char ConfigVdpauDecoder = 1; ///< use vdpau decoder, if possible
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char ConfigFullscreen; ///< fullscreen modus
|
static char ConfigFullscreen; ///< fullscreen modus
|
||||||
|
static char ConfigStartSuspended; ///< flag to start in suspend mode
|
||||||
|
static char ConfigStartX11Server; ///< flag start the x11 server
|
||||||
|
|
||||||
static pthread_mutex_t SuspendLockMutex; ///< suspend lock mutex
|
static pthread_mutex_t SuspendLockMutex; ///< suspend lock mutex
|
||||||
|
|
||||||
@ -894,6 +896,10 @@ uint8_t *GrabImage(int *size, int jpeg, int quality, int width, int height)
|
|||||||
*/
|
*/
|
||||||
void SetPlayMode(void)
|
void SetPlayMode(void)
|
||||||
{
|
{
|
||||||
|
if (ConfigStartSuspended) { // ignore first call, if start suspended
|
||||||
|
ConfigStartSuspended = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
Resume();
|
Resume();
|
||||||
if (MyVideoDecoder) {
|
if (MyVideoDecoder) {
|
||||||
if (VideoCodecID != CODEC_ID_NONE) {
|
if (VideoCodecID != CODEC_ID_NONE) {
|
||||||
@ -1079,8 +1085,6 @@ void OsdDrawARGB(int x, int y, int height, int width, const uint8_t * argb)
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static char ConfigStartX11Server; ///< flag start the x11 server
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** Return command line help string.
|
** Return command line help string.
|
||||||
*/
|
*/
|
||||||
@ -1091,7 +1095,7 @@ const char *CommandLineHelp(void)
|
|||||||
" -d display\tdisplay of x11 server (fe. :0.0)\n"
|
" -d display\tdisplay of x11 server (fe. :0.0)\n"
|
||||||
" -f\t\tstart with fullscreen window (only with window manager)\n"
|
" -f\t\tstart with fullscreen window (only with window manager)\n"
|
||||||
" -g geometry\tx11 window geometry wxh+x+y\n"
|
" -g geometry\tx11 window geometry wxh+x+y\n"
|
||||||
" -x\t\tstart x11 server\n";
|
" -x\t\tstart x11 server\n" " -s\t\tstart in suspended mode\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1106,7 +1110,7 @@ int ProcessArgs(int argc, char *const argv[])
|
|||||||
// Parse arguments.
|
// Parse arguments.
|
||||||
//
|
//
|
||||||
for (;;) {
|
for (;;) {
|
||||||
switch (getopt(argc, argv, "-a:p:d:fg:x")) {
|
switch (getopt(argc, argv, "-a:p:d:fg:xs")) {
|
||||||
case 'a': // audio device
|
case 'a': // audio device
|
||||||
AudioSetDevice(optarg);
|
AudioSetDevice(optarg);
|
||||||
continue;
|
continue;
|
||||||
@ -1130,6 +1134,9 @@ int ProcessArgs(int argc, char *const argv[])
|
|||||||
case 'x': // x11 server
|
case 'x': // x11 server
|
||||||
ConfigStartX11Server = 1;
|
ConfigStartX11Server = 1;
|
||||||
continue;
|
continue;
|
||||||
|
case 's': // start in suspend mode
|
||||||
|
ConfigStartSuspended = 1;
|
||||||
|
continue;
|
||||||
case EOF:
|
case EOF:
|
||||||
break;
|
break;
|
||||||
case '-':
|
case '-':
|
||||||
@ -1311,6 +1318,7 @@ void Start(void)
|
|||||||
}
|
}
|
||||||
CodecInit();
|
CodecInit();
|
||||||
|
|
||||||
|
if (!ConfigStartSuspended) {
|
||||||
// FIXME: AudioInit for HDMI after X11 startup
|
// FIXME: AudioInit for HDMI after X11 startup
|
||||||
AudioInit();
|
AudioInit();
|
||||||
MyAudioDecoder = CodecAudioNewDecoder();
|
MyAudioDecoder = CodecAudioNewDecoder();
|
||||||
@ -1319,7 +1327,10 @@ void Start(void)
|
|||||||
if (!ConfigStartX11Server) {
|
if (!ConfigStartX11Server) {
|
||||||
StartVideo();
|
StartVideo();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SkipVideo = 1;
|
||||||
|
SkipAudio = 1;
|
||||||
|
}
|
||||||
pthread_mutex_init(&SuspendLockMutex, NULL);
|
pthread_mutex_init(&SuspendLockMutex, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user