aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/keymaps/keyboard.xml8
-rw-r--r--xbmc/Application.cpp11
-rw-r--r--xbmc/guilib/Key.h3
-rw-r--r--xbmc/input/ButtonTranslator.cpp7
-rw-r--r--xbmc/video/windows/GUIWindowFullScreen.cpp64
-rw-r--r--xbmc/video/windows/GUIWindowFullScreen.h1
6 files changed, 52 insertions, 42 deletions
diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml
index e783145191..bb36a0f5f2 100644
--- a/system/keymaps/keyboard.xml
+++ b/system/keymaps/keyboard.xml
@@ -484,6 +484,14 @@
<backspace>Close</backspace>
</keyboard>
</NumericInput>
+ <FullscreenLiveTV>
+ <keyboard>
+ <left>PreviousChannelGroup</left>
+ <right>NextChannelGroup</right>
+ <up>ChannelUp</up>
+ <down>ChannelDown</down>
+ </keyboard>
+ </FullscreenLiveTV>
<PVROSDChannels>
<keyboard>
<backspace>Close</backspace>
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 70617b86da..21ea392588 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2424,9 +2424,18 @@ bool CApplication::OnKey(const CKey& key)
// if player is in some sort of menu, (ie DVDMENU) map buttons differently
action = CButtonTranslator::GetInstance().GetAction(WINDOW_VIDEO_MENU, key);
}
+ else if (g_PVRManager.IsStarted() && g_application.CurrentFileItem().HasPVRChannelInfoTag())
+ {
+ // check for PVR specific keymaps in FULLSCREEN_VIDEO window
+ action = CButtonTranslator::GetInstance().GetAction(WINDOW_FULLSCREEN_LIVETV, key, false);
+
+ // if no PVR specific action/mapping is found, fall back to default
+ if (action.GetID() == 0)
+ action = CButtonTranslator::GetInstance().GetAction(iWin, key);
+ }
else
{
- // no then use the fullscreen window section of keymap.xml to map key->action
+ // in any other case use the fullscreen window section of keymap.xml to map key->action
action = CButtonTranslator::GetInstance().GetAction(iWin, key);
}
}
diff --git a/xbmc/guilib/Key.h b/xbmc/guilib/Key.h
index ed93d21dae..1015bdbc2c 100644
--- a/xbmc/guilib/Key.h
+++ b/xbmc/guilib/Key.h
@@ -273,6 +273,8 @@
#define ACTION_NEXT_CONTROL 181
#define ACTION_PREV_CONTROL 182
#define ACTION_CHANNEL_SWITCH 183
+#define ACTION_NEXT_CHANNELGROUP 184
+#define ACTION_PREVIOUS_CHANNELGROUP 185
#define ACTION_TOGGLE_FULLSCREEN 199 // switch 2 desktop resolution
#define ACTION_TOGGLE_WATCHED 200 // Toggle watched status (videos)
@@ -416,6 +418,7 @@
#define WINDOW_DIALOG_PVR_OSD_GUIDE 10611
#define WINDOW_DIALOG_PVR_OSD_DIRECTOR 10612
#define WINDOW_DIALOG_PVR_OSD_CUTTER 10613
+#define WINDOW_FULLSCREEN_LIVETV 10614 // virtual window for PVR specific keymap bindings in fullscreen playback (which internally uses WINDOW_FULLSCREEN_VIDEO)
// PVR_WINDOW VIEWS = 10694-10699
//#define WINDOW_VIRTUAL_KEYBOARD 11000
diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp
index 772c548712..63888cd9b5 100644
--- a/xbmc/input/ButtonTranslator.cpp
+++ b/xbmc/input/ButtonTranslator.cpp
@@ -211,6 +211,12 @@ static const ActionMapping actions[] =
{"volampup" , ACTION_VOLAMP_UP},
{"volampdown" , ACTION_VOLAMP_DOWN},
+ // PVR actions
+ {"channelup" , ACTION_NEXT_ITEM}, // more self-explanatory alias for "skipnext"
+ {"channeldown" , ACTION_PREV_ITEM}, // more self-explanatory alias for "skipprevious"
+ {"previouschannelgroup" , ACTION_PREVIOUS_CHANNELGROUP},
+ {"nextchannelgroup" , ACTION_NEXT_CHANNELGROUP},
+
// Mouse actions
{"leftclick" , ACTION_MOUSE_LEFT_CLICK},
{"rightclick" , ACTION_MOUSE_RIGHT_CLICK},
@@ -322,6 +328,7 @@ static const ActionMapping windows[] =
{"movieinformation" , WINDOW_DIALOG_VIDEO_INFO},
{"textviewer" , WINDOW_DIALOG_TEXT_VIEWER},
{"fullscreenvideo" , WINDOW_FULLSCREEN_VIDEO},
+ {"fullscreenlivetv" , WINDOW_FULLSCREEN_LIVETV}, // virtual window/keymap section for PVR specific bindings in fullscreen playback (which internally uses WINDOW_FULLSCREEN_VIDEO)
{"visualisation" , WINDOW_VISUALISATION},
{"slideshow" , WINDOW_SLIDESHOW},
{"filestackingdialog" , WINDOW_DIALOG_FILESTACKING},
diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp
index 06180ea883..ae46b04323 100644
--- a/xbmc/video/windows/GUIWindowFullScreen.cpp
+++ b/xbmc/video/windows/GUIWindowFullScreen.cpp
@@ -169,51 +169,31 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
break;
case ACTION_STEP_BACK:
- if (!g_application.CurrentFileItem().HasPVRChannelInfoTag())
- {
- if (m_timeCodePosition > 0)
- SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_BACKWARD);
- else
- g_application.m_pPlayer->Seek(false, false);
- }
+ if (m_timeCodePosition > 0)
+ SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_BACKWARD);
else
- SeekTV(false, false);
+ g_application.m_pPlayer->Seek(false, false);
return true;
case ACTION_STEP_FORWARD:
- if (!g_application.CurrentFileItem().HasPVRChannelInfoTag())
- {
- if (m_timeCodePosition > 0)
- SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_FORWARD);
- else
- g_application.m_pPlayer->Seek(true, false);
- }
+ if (m_timeCodePosition > 0)
+ SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_FORWARD);
else
- SeekTV(true, false);
+ g_application.m_pPlayer->Seek(true, false);
return true;
case ACTION_BIG_STEP_BACK:
- if (!g_application.CurrentFileItem().HasPVRChannelInfoTag())
- {
- if (m_timeCodePosition > 0)
- SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_BACKWARD);
- else
- g_application.m_pPlayer->Seek(false, true);
- }
+ if (m_timeCodePosition > 0)
+ SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_BACKWARD);
else
- SeekTV(false, true);
+ g_application.m_pPlayer->Seek(false, true);
return true;
case ACTION_BIG_STEP_FORWARD:
- if (!g_application.CurrentFileItem().HasPVRChannelInfoTag())
- {
- if (m_timeCodePosition > 0)
- SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_FORWARD);
- else
- g_application.m_pPlayer->Seek(true, true);
- }
+ if (m_timeCodePosition > 0)
+ SeekToTimeCodeStamp(SEEK_RELATIVE, SEEK_FORWARD);
else
- SeekTV(true, true);
+ g_application.m_pPlayer->Seek(true, true);
return true;
case ACTION_NEXT_SCENE:
@@ -636,6 +616,18 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
break;
}
+ case ACTION_PREVIOUS_CHANNELGROUP:
+ {
+ if (g_application.CurrentFileItem().HasPVRChannelInfoTag())
+ ChangetheTVGroup(false);
+ return true;
+ }
+ case ACTION_NEXT_CHANNELGROUP:
+ {
+ if (g_application.CurrentFileItem().HasPVRChannelInfoTag())
+ ChangetheTVGroup(true);
+ return true;
+ }
default:
break;
}
@@ -1184,14 +1176,6 @@ void CGUIWindowFullScreen::SeekToTimeCodeStamp(SEEK_TYPE type, SEEK_DIRECTION di
m_timeCodeShow = false;
}
-void CGUIWindowFullScreen::SeekTV(bool bPlus, bool bLargeStep)
-{
- if (bLargeStep)
- OnAction(CAction(bPlus ? ACTION_NEXT_ITEM : ACTION_PREV_ITEM));
- else if (!bLargeStep)
- ChangetheTVGroup(bPlus);
-}
-
double CGUIWindowFullScreen::GetTimeCodeStamp()
{
// Convert the timestamp into an integer
diff --git a/xbmc/video/windows/GUIWindowFullScreen.h b/xbmc/video/windows/GUIWindowFullScreen.h
index b1e7f6cf44..a16e477de5 100644
--- a/xbmc/video/windows/GUIWindowFullScreen.h
+++ b/xbmc/video/windows/GUIWindowFullScreen.h
@@ -47,7 +47,6 @@ protected:
private:
void RenderTTFSubtitles();
- void SeekTV(bool bPlus, bool bLargeStep);
void SeekChapter(int iChapter);
void FillInTVGroups();
void ToggleOSD();