aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2016-07-24 13:07:59 +0200
committerKai Sommerfeld <kai.sommerfeld@gmx.com>2016-07-30 09:45:14 +0200
commit206d9c1b1a8f15f67e3f09137a2f947abd4f9422 (patch)
tree5ac3cd054bf726bf79ddb5e0658c99eb4925c5cd
parent81f9cc0abb78e9c8ea70ed8efb019cee7a37a6bd (diff)
Added new dialog for player process and pvr info ('playerprocessinfo'), including new action (ACTION_PLAYER_PROCESS_INFO) to activate this dialog.
-rw-r--r--xbmc/Application.cpp9
-rw-r--r--xbmc/dialogs/CMakeLists.txt2
-rw-r--r--xbmc/dialogs/GUIDialogPlayerProcessInfo.cpp43
-rw-r--r--xbmc/dialogs/GUIDialogPlayerProcessInfo.h32
-rw-r--r--xbmc/dialogs/Makefile1
-rw-r--r--xbmc/guilib/GUIWindowManager.cpp3
-rw-r--r--xbmc/guilib/WindowIDs.h1
-rw-r--r--xbmc/input/ButtonTranslator.cpp2
-rw-r--r--xbmc/input/Key.h1
9 files changed, 94 insertions, 0 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 0ee6ca27a8..7b0b3239e3 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2356,6 +2356,15 @@ bool CApplication::OnAction(const CAction &action)
g_windowManager.ActivateWindow(WINDOW_MUSIC_PLAYLIST);
return true;
}
+ if (action.GetID() == ACTION_PLAYER_PROCESS_INFO)
+ {
+ if (m_pPlayer->GetCurrentPlayer() == "VideoPlayer" &&
+ g_windowManager.GetActiveWindow() != WINDOW_DIALOG_PLAYER_PROCESS_INFO)
+ {
+ g_windowManager.ActivateWindow(WINDOW_DIALOG_PLAYER_PROCESS_INFO);
+ return true;
+ }
+ }
return false;
}
diff --git a/xbmc/dialogs/CMakeLists.txt b/xbmc/dialogs/CMakeLists.txt
index 1c162ae250..1fdffbd99d 100644
--- a/xbmc/dialogs/CMakeLists.txt
+++ b/xbmc/dialogs/CMakeLists.txt
@@ -16,6 +16,7 @@ set(SOURCES GUIDialogBoxBase.cpp
GUIDialogOK.cpp
GUIDialogPlayEject.cpp
GUIDialogPlayerControls.cpp
+ GUIDialogPlayerProcessInfo.cpp
GUIDialogProgress.cpp
GUIDialogSeekBar.cpp
GUIDialogSelect.cpp
@@ -46,6 +47,7 @@ set(HEADERS GUIDialogBoxBase.h
GUIDialogOK.h
GUIDialogPlayEject.h
GUIDialogPlayerControls.h
+ GUIDialogPlayerProcessInfo.h
GUIDialogProgress.h
GUIDialogSeekBar.h
GUIDialogSelect.h
diff --git a/xbmc/dialogs/GUIDialogPlayerProcessInfo.cpp b/xbmc/dialogs/GUIDialogPlayerProcessInfo.cpp
new file mode 100644
index 0000000000..bf6b9a70f0
--- /dev/null
+++ b/xbmc/dialogs/GUIDialogPlayerProcessInfo.cpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2005-2016 Team Kodi
+ * http://kodi.tv
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "GUIDialogPlayerProcessInfo.h"
+
+#include "input/Key.h"
+
+CGUIDialogPlayerProcessInfo::CGUIDialogPlayerProcessInfo(void)
+ : CGUIDialog(WINDOW_DIALOG_PLAYER_PROCESS_INFO, "DialogPlayerProcessInfo.xml")
+{
+ m_loadType = KEEP_IN_MEMORY;
+}
+
+CGUIDialogPlayerProcessInfo::~CGUIDialogPlayerProcessInfo(void)
+{
+}
+
+bool CGUIDialogPlayerProcessInfo::OnAction(const CAction &action)
+{
+ if (action.GetID() == ACTION_PLAYER_PROCESS_INFO)
+ {
+ Close();
+ return true;
+ }
+ return CGUIDialog::OnAction(action);
+} \ No newline at end of file
diff --git a/xbmc/dialogs/GUIDialogPlayerProcessInfo.h b/xbmc/dialogs/GUIDialogPlayerProcessInfo.h
new file mode 100644
index 0000000000..f5063d0ebb
--- /dev/null
+++ b/xbmc/dialogs/GUIDialogPlayerProcessInfo.h
@@ -0,0 +1,32 @@
+#pragma once
+
+/*
+ * Copyright (C) 2005-2016 Team Kodi
+ * http://kodi.tv
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "guilib/GUIDialog.h"
+
+class CGUIDialogPlayerProcessInfo : public CGUIDialog
+{
+public:
+ CGUIDialogPlayerProcessInfo(void);
+ virtual ~CGUIDialogPlayerProcessInfo(void);
+
+ bool OnAction(const CAction &action) override;
+};
diff --git a/xbmc/dialogs/Makefile b/xbmc/dialogs/Makefile
index 5bb886970e..9175e37ff2 100644
--- a/xbmc/dialogs/Makefile
+++ b/xbmc/dialogs/Makefile
@@ -16,6 +16,7 @@ SRCS=GUIDialogBoxBase.cpp \
GUIDialogOK.cpp \
GUIDialogPlayEject.cpp \
GUIDialogPlayerControls.cpp \
+ GUIDialogPlayerProcessInfo.cpp \
GUIDialogProgress.cpp \
GUIDialogSeekBar.cpp \
GUIDialogSelect.cpp \
diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp
index 5835280d07..7de1e9d6f1 100644
--- a/xbmc/guilib/GUIWindowManager.cpp
+++ b/xbmc/guilib/GUIWindowManager.cpp
@@ -106,6 +106,7 @@
#include "dialogs/GUIDialogButtonMenu.h"
#include "dialogs/GUIDialogContextMenu.h"
#include "dialogs/GUIDialogPlayerControls.h"
+#include "dialogs/GUIDialogPlayerProcessInfo.h"
#include "music/dialogs/GUIDialogSongInfo.h"
#include "dialogs/GUIDialogSmartPlaylistEditor.h"
#include "dialogs/GUIDialogSmartPlaylistRule.h"
@@ -213,6 +214,7 @@ void CGUIWindowManager::CreateWindows()
Add(new CGUIDialogGamepad);
Add(new CGUIDialogButtonMenu);
Add(new CGUIDialogPlayerControls);
+ Add(new CGUIDialogPlayerProcessInfo);
Add(new CGUIDialogSlider);
Add(new CGUIDialogMusicOSD);
Add(new CGUIDialogVisualisationPresetList);
@@ -321,6 +323,7 @@ bool CGUIWindowManager::DestroyWindows()
Delete(WINDOW_DIALOG_BUTTON_MENU);
Delete(WINDOW_DIALOG_CONTEXT_MENU);
Delete(WINDOW_DIALOG_PLAYER_CONTROLS);
+ Delete(WINDOW_DIALOG_PLAYER_PROCESS_INFO);
Delete(WINDOW_DIALOG_MUSIC_OSD);
Delete(WINDOW_DIALOG_VIS_PRESET_LIST);
Delete(WINDOW_DIALOG_SELECT);
diff --git a/xbmc/guilib/WindowIDs.h b/xbmc/guilib/WindowIDs.h
index b5ab401b10..a95c48e704 100644
--- a/xbmc/guilib/WindowIDs.h
+++ b/xbmc/guilib/WindowIDs.h
@@ -68,6 +68,7 @@
#define WINDOW_DIALOG_BUTTON_MENU 10111
#define WINDOW_DIALOG_PLAYER_CONTROLS 10114
#define WINDOW_DIALOG_SEEK_BAR 10115
+#define WINDOW_DIALOG_PLAYER_PROCESS_INFO 10116
#define WINDOW_DIALOG_MUSIC_OSD 10120
#define WINDOW_DIALOG_VIS_SETTINGS 10121
#define WINDOW_DIALOG_VIS_PRESET_LIST 10122
diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp
index b877126a44..a37e19ae96 100644
--- a/xbmc/input/ButtonTranslator.cpp
+++ b/xbmc/input/ButtonTranslator.cpp
@@ -88,6 +88,7 @@ static const ActionMapping actions[] =
{ "nextsubtitle" , ACTION_NEXT_SUBTITLE },
{ "cyclesubtitle" , ACTION_CYCLE_SUBTITLE },
{ "codecinfo" , ACTION_SHOW_CODEC },
+ { "playerprocessinfo" , ACTION_PLAYER_PROCESS_INFO },
{ "nextpicture" , ACTION_NEXT_PICTURE },
{ "previouspicture" , ACTION_PREV_PICTURE },
{ "zoomout" , ACTION_ZOOM_OUT },
@@ -349,6 +350,7 @@ static const ActionMapping windows[] =
{ "gamepadinput" , WINDOW_DIALOG_GAMEPAD },
{ "shutdownmenu" , WINDOW_DIALOG_BUTTON_MENU },
{ "playercontrols" , WINDOW_DIALOG_PLAYER_CONTROLS },
+ { "playerprocessinfo" , WINDOW_DIALOG_PLAYER_PROCESS_INFO },
{ "seekbar" , WINDOW_DIALOG_SEEK_BAR },
{ "musicosd" , WINDOW_DIALOG_MUSIC_OSD },
{ "addonsettings" , WINDOW_DIALOG_ADDON_SETTINGS },
diff --git a/xbmc/input/Key.h b/xbmc/input/Key.h
index fc989c580e..1147137a73 100644
--- a/xbmc/input/Key.h
+++ b/xbmc/input/Key.h
@@ -219,6 +219,7 @@
#define REMOTE_9 67
#define ACTION_PLAY 68 //!< Unused at the moment
+#define ACTION_PLAYER_PROCESS_INFO 69 //!< show player process info (video decoder, pixel format, pvr signal strength and the like
#define ACTION_SMALL_STEP_BACK 76 //!< jumps a few seconds back during playback of movie. Can b used in videoFullScreen.xml window id=2005
#define ACTION_PLAYER_FORWARD 77 //!< FF in current file played. global action, can be used anywhere