Skip to content

Commit

Permalink
drop codecInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Mar 7, 2016
1 parent 2fd48c0 commit be5d1b7
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 66 deletions.
7 changes: 0 additions & 7 deletions xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2132,13 +2132,6 @@ bool CApplication::OnAction(const CAction &action)
return true;
}

// codec info : Shows the current song, video or picture codec information
if (action.GetID() == ACTION_SHOW_CODEC)
{
g_infoManager.ToggleShowCodec();
return true;
}

if ((action.GetID() == ACTION_INCREASE_RATING || action.GetID() == ACTION_DECREASE_RATING) && m_pPlayer->IsPlayingAudio())
{
const CMusicInfoTag *tag = g_infoManager.GetCurrentSongTag();
Expand Down
3 changes: 0 additions & 3 deletions xbmc/GUIInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ CGUIInfoManager::CGUIInfoManager(void) :
m_frameCounter = 0;
m_lastFPSTime = 0;
m_playerShowTime = false;
m_playerShowCodec = false;
m_playerShowInfo = false;
m_fps = 0.0f;
ResetLibraryBools();
Expand Down Expand Up @@ -2586,8 +2585,6 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI

else if (condition == PLAYER_SHOWINFO)
bReturn = m_playerShowInfo;
else if (condition == PLAYER_SHOWCODEC)
bReturn = m_playerShowCodec;
else if (condition == PLAYER_IS_CHANNEL_PREVIEW_ACTIVE)
bReturn = IsPlayerChannelPreviewActive();
else if (condition >= MULTI_INFO_START && condition <= MULTI_INFO_END)
Expand Down
3 changes: 0 additions & 3 deletions xbmc/GUIInfoManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,8 @@ friend CSetCurrentItemJob;
bool GetDisplayAfterSeek();
void SetDisplayAfterSeek(unsigned int timeOut = 2500, int seekOffset = 0);
void SetShowTime(bool showtime) { m_playerShowTime = showtime; };
void SetShowCodec(bool showcodec) { m_playerShowCodec = showcodec; };
void SetShowInfo(bool showinfo) { m_playerShowInfo = showinfo; };
bool GetShowInfo() const { return m_playerShowInfo; }
void ToggleShowCodec() { m_playerShowCodec = !m_playerShowCodec; };
bool ToggleShowInfo() { m_playerShowInfo = !m_playerShowInfo; return m_playerShowInfo; };
bool IsPlayerChannelPreviewActive() const;

Expand Down Expand Up @@ -325,7 +323,6 @@ friend CSetCurrentItemJob;
unsigned int m_AfterSeekTimeout;
int m_seekOffset;
bool m_playerShowTime;
bool m_playerShowCodec;
bool m_playerShowInfo;

// FPS counters
Expand Down
2 changes: 1 addition & 1 deletion xbmc/input/Key.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
#define ACTION_SHOW_OSD 24 //!< show/hide OSD. Can b used in videoFullScreen.xml window id=2005
#define ACTION_SHOW_SUBTITLES 25 //!< turn subtitles on/off. Can b used in videoFullScreen.xml window id=2005
#define ACTION_NEXT_SUBTITLE 26 //!< switch to next subtitle of movie. Can b used in videoFullScreen.xml window id=2005
#define ACTION_SHOW_CODEC 27 //!< show information about file. Can b used in videoFullScreen.xml window id=2005 and in slideshow.xml window id=2007
#define ACTION_SHOW_CODEC 27 //!< show debug info for VideoPlayer
#define ACTION_NEXT_PICTURE 28 //!< show next picture of slideshow. Can b used in slideshow.xml window id=2007
#define ACTION_PREV_PICTURE 29 //!< show previous picture of slideshow. Can b used in slideshow.xml window id=2007
#define ACTION_ZOOM_OUT 30 //!< zoom in picture during slideshow. Can b used in slideshow.xml window id=2007
Expand Down
7 changes: 0 additions & 7 deletions xbmc/music/windows/GUIWindowVisualisation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ bool CGUIWindowVisualisation::OnAction(const CAction &action)
if (!m_bShowPreset)
{
m_lockedTimer.StartZero();
g_infoManager.SetShowCodec(true);
}
passToVis = true;
}
Expand All @@ -101,7 +100,6 @@ bool CGUIWindowVisualisation::OnAction(const CAction &action)
{
if (!m_lockedTimer.IsRunning() || m_bShowPreset)
m_bShowPreset = !m_bShowPreset;
g_infoManager.SetShowCodec(m_bShowPreset);
return true;
}
break;
Expand Down Expand Up @@ -180,7 +178,6 @@ bool CGUIWindowVisualisation::OnMessage(CGUIMessage& message)
}

// hide or show the preset button(s)
g_infoManager.SetShowCodec(m_bShowPreset);
g_infoManager.SetShowInfo(true); // always show the info initially.
CGUIWindow::OnMessage(message);
if (g_infoManager.GetCurrentSongTag())
Expand Down Expand Up @@ -246,10 +243,6 @@ void CGUIWindowVisualisation::FrameMove()
if (m_lockedTimer.IsRunning() && m_lockedTimer.GetElapsedSeconds() > START_FADE_LENGTH)
{
m_lockedTimer.Stop();
if (!m_bShowPreset)
{
g_infoManager.SetShowCodec(false);
}
}
CGUIWindow::FrameMove();
}
1 change: 0 additions & 1 deletion xbmc/pictures/GUIWindowSlideShow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ bool CGUIWindowSlideShow::IsPlaying() const

void CGUIWindowSlideShow::Reset()
{
g_infoManager.SetShowCodec(false);
m_bSlideShow = false;
m_bShuffled = false;
m_bPause = false;
Expand Down
44 changes: 1 addition & 43 deletions xbmc/video/windows/GUIWindowFullScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ void CGUIWindowFullScreen::OnWindowLoaded()
pLabel->SetVisible(true);
pLabel->SetLabel("$INFO(VIDEOPLAYER.TIME) / $INFO(VIDEOPLAYER.DURATION)");
}

m_showCodec.Parse("player.showcodec", GetID());
}

bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
Expand All @@ -305,7 +303,6 @@ bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
return true;
}
g_infoManager.SetShowInfo(false);
g_infoManager.SetShowCodec(false);
m_bShowCurrentTime = false;
g_infoManager.SetDisplayAfterSeek(0); // Make sure display after seek is off.

Expand Down Expand Up @@ -375,45 +372,6 @@ void CGUIWindowFullScreen::FrameMove()
g_infoManager.SetDisplayAfterSeek(0); //Make sure these stuff aren't visible now
}

//------------------------
m_showCodec.Update();
if (m_showCodec)
{
// show audio codec info
std::string strGeneral;
// show general info
g_application.m_pPlayer->GetGeneralInfo(strGeneral);
{
std::string strGeneralFPS;
#if defined(TARGET_DARWIN)
// We show CPU usage for the entire process, as it's arguably more useful.
double dCPU = m_resourceCounter.GetCPUUsage();
std::string strCores;
strCores = StringUtils::Format("cpu:%.0f%%", dCPU);
#else
std::string strCores = g_cpuInfo.GetCoresUsageString();
#endif
int missedvblanks;
double refreshrate;
double clockspeed;
std::string strClock;

if (g_VideoReferenceClock.GetClockInfo(missedvblanks, clockspeed, refreshrate))
strClock = StringUtils::Format("S( refresh:%.3f missed:%i speed:%+.3f%% %s )"
, refreshrate
, missedvblanks
, clockspeed - 100.0
, g_application.m_pPlayer->GetRenderVSyncState().c_str());

strGeneralFPS = StringUtils::Format("%s\nW( %s )\n%s"
, strGeneral.c_str()
, strCores.c_str(), strClock.c_str() );

CGUIMessage msg(GUI_MSG_LABEL_SET, GetID(), LABEL_ROW3);
msg.SetLabel(strGeneralFPS);
OnMessage(msg);
}
}
//----------------------
// ViewMode Information
//----------------------
Expand Down Expand Up @@ -503,7 +461,7 @@ void CGUIWindowFullScreen::FrameMove()
OnMessage(msg);
}

if (m_showCodec || m_bShowViewModeInfo)
if (m_bShowViewModeInfo)
{
SET_CONTROL_VISIBLE(LABEL_ROW1);
SET_CONTROL_VISIBLE(LABEL_ROW2);
Expand Down
1 change: 0 additions & 1 deletion xbmc/video/windows/GUIWindowFullScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class CGUIWindowFullScreen : public CGUIWindow

bool m_bShowViewModeInfo;
unsigned int m_dwShowViewModeTimeout;
CGUIInfoBool m_showCodec;

bool m_bShowCurrentTime;

Expand Down

0 comments on commit be5d1b7

Please sign in to comment.