diff options
author | Andreas Auras <yak54@gmx.net> | 2010-06-15 17:09:29 +0200 |
---|---|---|
committer | Andreas Auras <yak54@gmx.net> | 2010-06-15 17:09:29 +0200 |
commit | 9e6108ef3d8f8ea43b55f67955a15fe58745ccd8 (patch) | |
tree | cbcd5f3b28b686b00d6b987c8b1a812776882b37 | |
parent | 54af3235eb11093e54063f52bbcd7a2afd5e2117 (diff) | |
download | xine-lib-atmolight-9e6108ef3d8f8ea43b55f67955a15fe58745ccd8.tar.gz xine-lib-atmolight-9e6108ef3d8f8ea43b55f67955a15fe58745ccd8.tar.bz2 |
Added xineliboutput atmolight switch patch
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | README | 9 | ||||
-rw-r--r-- | patches/xineliboutput-atmolight-switch.patch | 109 |
3 files changed, 119 insertions, 0 deletions
@@ -1,5 +1,6 @@ --- Version 0.6 Add xine-ui-atmolight-switch patch. +Add xineliboutput-atmolight-switch patch. --- Version 0.5 @@ -229,3 +229,12 @@ to switch the Atmolight on/off. The command can be bound to keyboard or LIRC keys but it is not supported by the remote interface. +xineliboutput-atmolight-switch.patch + +This is a patch for the xineliboutput player that extends the player with a 'Atmolight' command +to switch the Atmolight on/off. +Send remote command "Atmolight" for toggling on/off, "Atmolight 0" for switching off or "Atmolight 1" +for switching on. +Also pressing keyboard key 'a' or sending LIRC command 'Atmolight' toggels the Atmolight. + + diff --git a/patches/xineliboutput-atmolight-switch.patch b/patches/xineliboutput-atmolight-switch.patch new file mode 100644 index 0000000..2333cd9 --- /dev/null +++ b/patches/xineliboutput-atmolight-switch.patch @@ -0,0 +1,109 @@ +Index: xine_frontend_lirc.c +=================================================================== +RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/xine_frontend_lirc.c,v +retrieving revision 1.24 +diff -u -r1.24 xine_frontend_lirc.c +--- xine_frontend_lirc.c 3 Jan 2010 09:54:39 -0000 1.24 ++++ xine_frontend_lirc.c 15 Jun 2010 14:57:32 -0000 +@@ -226,6 +226,11 @@ + fe->send_event(fe, "TOGGLE_DEINTERLACE"); + continue; + } ++ if (!strcmp(KeyName, "Atmolight")) { ++ if (!repeat) ++ fe->send_event(fe, "ATMOLIGHT"); ++ continue; ++ } + } + + alarm(3); +Index: xine_frontend.c +=================================================================== +RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/xine_frontend.c,v +retrieving revision 1.117 +diff -u -r1.117 xine_frontend.c +--- xine_frontend.c 22 May 2010 11:59:28 -0000 1.117 ++++ xine_frontend.c 15 Jun 2010 14:57:31 -0000 +@@ -1420,6 +1420,41 @@ + } else if (!strcmp(data, "POWER_OFF")) { + shutdown_system(this->shutdown_cmd, 1); + ++ } else if (!strncasecmp(data, "ATMOLIGHT", 9)) { ++ if (this->postplugins) { ++ int i; ++ for (i = 0; i < this->postplugins->post_video_elements_num; ++i) { ++ post_element_t *pve = this->postplugins->post_video_elements[i]; ++ if (pve->enable && !strcmp(pve->name, "atmo")) { ++ xine_post_in_t *input_api = (xine_post_in_t *) xine_post_input(pve->post, "parameters"); ++ if (input_api) { ++ xine_post_api_t *post_api = (xine_post_api_t *) input_api->data; ++ xine_post_api_descr_t *api_descr = post_api->get_param_descr(); ++ xine_post_api_parameter_t *parm = api_descr->parameter; ++ while(parm->type != POST_PARAM_TYPE_LAST) { ++ if (!strcmp(parm->name, "enabled")) { ++ uint8_t *param_data = malloc(api_descr->struct_size); ++ if (param_data) { ++ post_api->get_parameters(pve->post, param_data); ++ int *enabled = (int *)(param_data + parm->offset); ++ char *p = strpbrk(data + 9, "01"); ++ if (p) ++ *enabled = (atoi(p)) ? 1: 0; ++ else ++ *enabled = (*enabled) ? 0: 1; ++ post_api->set_parameters(pve->post, param_data); ++ free(param_data); ++ } ++ break; ++ } ++ parm++; ++ } ++ } ++ break; ++ } ++ } ++ } ++ + } else { + + LOGDBG("Event: %s", data); +Index: xine_frontend_main.c +=================================================================== +RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/xine_frontend_main.c,v +retrieving revision 1.88 +diff -u -r1.88 xine_frontend_main.c +--- xine_frontend_main.c 26 May 2010 12:10:02 -0000 1.88 ++++ xine_frontend_main.c 15 Jun 2010 14:57:32 -0000 +@@ -214,6 +214,10 @@ + fe->send_event(fe, "TOGGLE_DEINTERLACE"); + continue; + } ++ if (code == 'a' || code == 'A') { ++ fe->send_event(fe, "ATMOLIGHT"); ++ continue; ++ } + } + + snprintf(str, sizeof(str), "%016" PRIX64, code); +@@ -284,6 +288,10 @@ + fe->send_input_event(fe, NULL, str+5, 0, 0); + continue; + } ++ if (!strncasecmp(str, "ATMOLIGHT", 9)) { ++ fe->send_event(fe, str); ++ continue; ++ } + + LOGMSG("Unknown slave mode command: %s", str); + +@@ -650,9 +658,11 @@ + " mapping keyboard f,F -> fullscreen toggle\n" + " keyboard d,D -> deinterlace toggle\n" + " keyboard p,P -> power off\n" ++ " keyboard a,A -> atmolight toggle\n" + " LIRC Deinterlace -> deinterlace toggle\n" + " LIRC Fullscreen -> fullscreen toggle\n" + " LIRC PowerOff -> power off\n" ++ " LIRC Atmolight -> atmolight toggle\n" + " LIRC Quit -> exit\n"); + break; + case 'b': nokbd = daemon_mode = 1; |