From a747829ffb807a7e75b6a11128e1dfe5d95948f9 Mon Sep 17 00:00:00 2001 From: cyril <> Date: Wed, 6 Mar 2013 17:07:30 +0100 Subject: [PATCH] Adds raise softhddevice video window support. --- ChangeLog | 9 +++++++++ softhddev.c | 2 +- softhddevice.cpp | 12 ++++++++++++ video.c | 13 +++++++++++++ video.h | 4 ++++ 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ecdccca..2dc68ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,15 @@ User johns Date: Release Version 0.6.0 + +User cyril +Date: Wed Mar 6 17:05:10 CET 2013 + + Adds raise softhddevice video window support. + +User johns +Date: Wed Mar 6 10:30:27 CET 2013 + Adds optional only complete mpeg packets support. Fixes text of EAC-3 pass-through setup. Try to start or connect to X11 server with -xx. diff --git a/softhddev.c b/softhddev.c index 1bb7f2e..209d8d2 100644 --- a/softhddev.c +++ b/softhddev.c @@ -69,9 +69,9 @@ static char VdpauDecoder = 1; ///< vdpau decoder used #endif extern int ConfigAudioBufferTime; ///< config size ms of audio buffer +char ConfigStartX11Server; ///< flag start the x11 server static char ConfigStartSuspended; ///< flag to start in suspend mode static char ConfigFullscreen; ///< fullscreen modus -static char ConfigStartX11Server; ///< flag start the x11 server static const char *X11ServerArguments; ///< default command arguments static char ConfigStillDecoder; ///< hw/sw decoder for still picture diff --git a/softhddevice.cpp b/softhddevice.cpp index ebaaa0f..1f7dadb 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -3186,6 +3186,9 @@ static const char *SVDRPHelpText[] = { "3DOF\n" "\040 3D OSD off.\n", "3DTB\n" "\040 3D OSD Top and Bottom.\n", "3DSB\n" "\040 3D OSD Side by Side.\n", + "RAIS\n" "\040 Raise softhddevice window\n\n" + " If Xserver is not started by softhddevice, the window which\n" + " contains the softhddevice frontend will be raised to the front.\n", NULL }; @@ -3366,6 +3369,15 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command, return "3d tb"; } + if (!strcasecmp(command, "RAIS")) { + if (!ConfigStartX11Server) { + VideoRaiseWindow(); + } else { + return "Raise not possible"; + } + return "Window raised"; + } + return NULL; } diff --git a/video.c b/video.c index baddb81..aabe4ab 100644 --- a/video.c +++ b/video.c @@ -10821,6 +10821,19 @@ void VideoSetAutoCrop(int interval, int delay, int tolerance) #endif } +/// +/// Raise video window. +/// +int VideoRaiseWindow(void) +{ + const static uint32_t values[] = { XCB_STACK_MODE_ABOVE }; + + xcb_configure_window(Connection, VideoWindow, XCB_CONFIG_WINDOW_STACK_MODE, + values); + + return 1; +} + /// /// Initialize video output module. /// diff --git a/video.h b/video.h index e8cf330..5e27b73 100644 --- a/video.h +++ b/video.h @@ -40,6 +40,7 @@ typedef struct __video_stream__ VideoStream; extern char VideoHardwareDecoder; ///< flag use hardware decoder extern char VideoIgnoreRepeatPict; ///< disable repeat pict warning extern int VideoAudioDelay; ///< audio/video delay +extern char ConfigStartX11Server; ///< flag start the x11 server //---------------------------------------------------------------------------- // Prototypes @@ -220,4 +221,7 @@ extern int VideoDecodeInput(VideoStream *); /// Get number of input buffers. extern int VideoGetBuffers(const VideoStream *); + /// Raise the frontend window +extern int VideoRaiseWindow(); + /// @}