Wakeup display to show OSD for remote learning.

This commit is contained in:
Johns 2012-03-09 12:08:56 +01:00
parent d65fe88c83
commit c2938c7ef3
4 changed files with 39 additions and 5 deletions

View File

@ -1,6 +1,7 @@
User johns User johns
Date: Date:
Wakeup display to show OSD for remote learning mode.
Support switching the primary device with svdrp. Support switching the primary device with svdrp.
Disable and reenable screen saver and DPMS. Disable and reenable screen saver and DPMS.
Video source code cleanup. Video source code cleanup.

3
Todo
View File

@ -26,8 +26,7 @@ missing:
Option deinterlace off / deinterlace force! Option deinterlace off / deinterlace force!
ColorSpace aren't configurable with the gui. ColorSpace aren't configurable with the gui.
Replay of old vdr 1.6 recordings. Replay of old vdr 1.6 recordings.
Remote learning support. works for me: restart vdr not working, when started x11 was killed.
restart vdr not working, when started x11 was killed.
crash: crash:
AudioPlayHandlerThread -> pthread_cond_wait AudioPlayHandlerThread -> pthread_cond_wait

View File

@ -2029,6 +2029,10 @@ int Flush(int timeout)
/** /**
** Get OSD size and aspect. ** Get OSD size and aspect.
**
** @param width[OUT] width of OSD
** @param height[OUT] height of OSD
** @param aspect[OUT] aspect ratio (4/3, 16/9, ...) of OSD
*/ */
void GetOsdSize(int *width, int *height, double *aspect) void GetOsdSize(int *width, int *height, double *aspect)
{ {
@ -2060,9 +2064,17 @@ void OsdClose(void)
/** /**
** Draw an OSD pixmap. ** Draw an OSD pixmap.
**
** @param x x-coordinate on screen of argb image
** @param y y-coordinate on screen of argb image
** @paran height height in pixel of argb image
** @paran width width in pixel of argb image
** @param argb height * width 32bit ARGB image data
*/ */
void OsdDrawARGB(int x, int y, int height, int width, const uint8_t * argb) void OsdDrawARGB(int x, int y, int height, int width, const uint8_t * argb)
{ {
// wakeup display for showing remote learning dialog
VideoDisplayWakeup();
VideoOsdDrawARGB(x, y, height, width, argb); VideoOsdDrawARGB(x, y, height, width, argb);
} }

View File

@ -114,18 +114,42 @@ static char SuspendMode; ///< suspend mode
// C Callbacks // C Callbacks
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
/**
** Soft device plugin remote class.
*/
class cSoftRemote:public cRemote class cSoftRemote:public cRemote
{ {
public: public:
/**
** Soft device remote class constructor.
**
** @param name remote name
*/
cSoftRemote(const char *name):cRemote(name) cSoftRemote(const char *name):cRemote(name)
{ {
} }
/**
** Put keycode into vdr event queue.
**
** @param code key code
** @param repeat flag key repeated
** @param release flag key released
*/
bool Put(const char *code, bool repeat = false, bool release = false) { bool Put(const char *code, bool repeat = false, bool release = false) {
return cRemote::Put(code, repeat, release); return cRemote::Put(code, repeat, release);
} }
}; };
/**
** Feed key press as remote input (called from C part).
**
** @param keymap target keymap "XKeymap" name
** @param key pressed/released key name
** @param repeat repeated key flag
** @param release released key flag
*/
extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat, extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat,
int release) int release)
{ {
@ -141,7 +165,7 @@ extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat,
break; break;
} }
} }
// if remote not already exists, create it
if (remote) { if (remote) {
csoft = (cSoftRemote *) remote; csoft = (cSoftRemote *) remote;
} else { } else {
@ -167,8 +191,6 @@ extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat,
*/ */
class cSoftOsd:public cOsd class cSoftOsd:public cOsd
{ {
//int Level; ///< level: subtitle
public: public:
cSoftOsd(int, int, uint); cSoftOsd(int, int, uint);
virtual ~ cSoftOsd(void); virtual ~ cSoftOsd(void);