diff options
| author | Andreas Auras <yak54@gmx.net> | 2010-04-15 13:36:05 +0200 |
|---|---|---|
| committer | Andreas Auras <yak54@gmx.net> | 2010-04-15 13:36:05 +0200 |
| commit | 54af3235eb11093e54063f52bbcd7a2afd5e2117 (patch) | |
| tree | 671dd0e39a86d212455ff033424f9fa894c20c6f | |
| parent | 35b1664c8cb7326b380aee53e2aeefcf893d9277 (diff) | |
| download | xine-lib-atmolight-54af3235eb11093e54063f52bbcd7a2afd5e2117.tar.gz xine-lib-atmolight-54af3235eb11093e54063f52bbcd7a2afd5e2117.tar.bz2 | |
Add xine-ui-atmolight-switch patch.
| -rw-r--r-- | HISTORY | 3 | ||||
| -rw-r--r-- | README | 14 | ||||
| -rw-r--r-- | patches/xine-ui-atmolight-switch.patch | 68 |
3 files changed, 84 insertions, 1 deletions
@@ -1,3 +1,6 @@ +--- Version 0.6 +Add xine-ui-atmolight-switch patch. + --- Version 0.5 Added storage of actual plugin parameters into xine configuration key 'post.atmo.parameters'. @@ -216,4 +216,16 @@ start_delay * 250 Delay after stream start before first output Valid values 0 ... 5000. enabled * 1 Enable/Disable output of color values to atmolight controller. -
\ No newline at end of file + + + +Additional patches located in subdirectory 'patches': +----------------------------------------------------- + +xine-ui-atmolight-switch.patch + +This is a patch for the xine-ui player that extends the player with a 'AtmolightEnable' command +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. + + diff --git a/patches/xine-ui-atmolight-switch.patch b/patches/xine-ui-atmolight-switch.patch new file mode 100644 index 0000000..29c0aa2 --- /dev/null +++ b/patches/xine-ui-atmolight-switch.patch @@ -0,0 +1,68 @@ +diff -r 3f5b3fe4a1d7 src/xitk/event.c +--- a/src/xitk/event.c Tue Apr 13 10:06:41 2010 +0200 ++++ b/src/xitk/event.c Thu Apr 15 13:21:15 2010 +0200 +@@ -1208,6 +1208,41 @@ void gui_execute_action_id(action_id_t a + } + break; + ++ case ACTID_ATMOLIGHT_ENABLE: ++ if (gGui->post_video_elements_num) { ++ int i; ++ for (i = 0; i < gGui->post_video_elements_num; ++i) { ++ post_element_t *pve = gGui->post_video_elements[i]; ++ if (!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); ++ if (gGui->numeric.set) ++ *enabled = (gGui->numeric.arg) ? 1: 0; ++ else ++ *enabled = (*enabled) ? 0: 1; ++ post_api->set_parameters(pve->post, param_data); ++ free(param_data); ++ } ++ break; ++ } ++ parm++; ++ } ++ } ++ break; ++ } ++ } ++ } ++ break; ++ + default: + break; + } +diff -r 3f5b3fe4a1d7 src/xitk/kbindings.h +--- a/src/xitk/kbindings.h Tue Apr 13 10:06:41 2010 +0200 ++++ b/src/xitk/kbindings.h Thu Apr 15 13:21:15 2010 +0200 +@@ -157,6 +157,7 @@ typedef enum { + ACTID_PVR_SETMARK, + ACTID_PVR_SETNAME, + ACTID_PVR_SAVE, ++ ACTID_ATMOLIGHT_ENABLE, + + /* + * The below events map one-to-one with definitions in xine-lib's events.h +diff -r 3f5b3fe4a1d7 src/xitk/kbindings_common.c +--- a/src/xitk/kbindings_common.c Tue Apr 13 10:06:41 2010 +0200 ++++ b/src/xitk/kbindings_common.c Thu Apr 15 13:21:15 2010 +0200 +@@ -325,6 +325,8 @@ static const kbinding_entry_t default_bi + "PVRSetName", ACTID_PVR_SETNAME , "VOID", KEYMOD_NOMOD , 0 , 0}, + { "input_pvr: save the stream section", + "PVRSave", ACTID_PVR_SAVE , "VOID", KEYMOD_NOMOD , 0 , 0}, ++ { "atmolight: switch on/off", ++ "AtmolightEnable", ACTID_ATMOLIGHT_ENABLE , "VOID", KEYMOD_NOMOD , 0 , 0}, + #ifdef ENABLE_VDR_KEYS + { "VDR Red button", + "VDRButtonRed", ACTID_EVENT_VDR_RED , "VOID", KEYMOD_NOMOD , 0 , 0}, |
