Skip to content

Commit

Permalink
rename OnLostDevice, OnResetDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Sep 21, 2015
1 parent 61f55da commit 82d7b53
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 22 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2721,7 +2721,7 @@ AEAudioFormat CActiveAE::GetCurrentSinkFormat()
return m_stats.GetCurrentSinkFormat();
}

void CActiveAE::OnLostDevice()
void CActiveAE::OnLostDisplay()
{
Message *reply;
if (m_controlPort.SendOutMessageSync(CActiveAEControlProtocol::DISPLAYLOST,
Expand All @@ -2741,7 +2741,7 @@ void CActiveAE::OnLostDevice()
}
}

void CActiveAE::OnResetDevice()
void CActiveAE::OnResetDisplay()
{
m_controlPort.SendOutMessage(CActiveAEControlProtocol::DISPLAYRESET);
}
Expand Down
4 changes: 2 additions & 2 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ class CActiveAE : public IAE, private CThread
virtual void RegisterAudioCallback(IAudioCallback* pCallback);
virtual void UnregisterAudioCallback(IAudioCallback* pCallback);

virtual void OnLostDevice();
virtual void OnResetDevice();
virtual void OnLostDisplay();
virtual void OnResetDisplay();
virtual void OnAppFocusChange(bool focus);

protected:
Expand Down
4 changes: 2 additions & 2 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ void CDecoder::SetWidthHeight(int width, int height)
CLog::Log(LOGDEBUG, "CVDPAU::SetWidthHeight Setting OutWidth: %i OutHeight: %i", m_vdpauConfig.outWidth, m_vdpauConfig.outHeight);
}

void CDecoder::OnLostDevice()
void CDecoder::OnLostDisplay()
{
CLog::Log(LOGNOTICE,"CVDPAU::OnLostDevice event");

Expand All @@ -698,7 +698,7 @@ void CDecoder::OnLostDevice()
g_graphicsContext.restore(count);
}

void CDecoder::OnResetDevice()
void CDecoder::OnResetDisplay()
{
CLog::Log(LOGNOTICE,"CVDPAU::OnResetDevice event");

Expand Down
4 changes: 2 additions & 2 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.h
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ class CDecoder
const VdpPictureInfo *info, uint32_t buffers_used,
const VdpBitstreamBuffer *buffers);

virtual void OnLostDevice();
virtual void OnResetDevice();
virtual void OnLostDisplay();
virtual void OnResetDisplay();

protected:
void SetWidthHeight(int width, int height);
Expand Down
8 changes: 3 additions & 5 deletions xbmc/guilib/DispResource.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2013 Team XBMC
* Copyright (C) 2005-2015 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
Expand All @@ -20,14 +20,12 @@

#pragma once

#if defined(HAS_GLX) || defined(HAS_EGL) || defined(TARGET_DARWIN)
class IDispResource
{
public:
virtual ~IDispResource() {};
virtual void OnLostDevice() {};
virtual void OnResetDevice() {};
virtual void OnLostDisplay() {};
virtual void OnResetDisplay() {};
virtual void OnAppFocusChange(bool focus) {};
};

#endif
2 changes: 1 addition & 1 deletion xbmc/video/videosync/VideoSyncDRM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void CVideoSyncDRM::EventHandler(int fd, unsigned int frame, unsigned int sec,
info->videoSync->UpdateClock(vblanks, now);
}

void CVideoSyncDRM::OnResetDevice()
void CVideoSyncDRM::OnResetDisplay()
{
m_abort = true;
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/video/videosync/VideoSyncDRM.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CVideoSyncDRM : public CVideoSync, IDispResource
virtual void Run(volatile bool& stop);
virtual void Cleanup();
virtual float GetFps();
virtual void OnResetDevice();
virtual void OnResetDisplay();
virtual void RefreshChanged();
private:
static void EventHandler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *data);
Expand Down
4 changes: 2 additions & 2 deletions xbmc/video/videosync/VideoSyncGLX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

Display* CVideoSyncGLX::m_Dpy = NULL;

void CVideoSyncGLX::OnLostDevice()
void CVideoSyncGLX::OnLostDisplay()
{
if (!m_displayLost)
{
Expand All @@ -43,7 +43,7 @@ void CVideoSyncGLX::OnLostDevice()
}
}

void CVideoSyncGLX::OnResetDevice()
void CVideoSyncGLX::OnResetDisplay()
{
m_displayReset = true;
}
Expand Down
4 changes: 2 additions & 2 deletions xbmc/video/videosync/VideoSyncGLX.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class CVideoSyncGLX : public CVideoSync, IDispResource
virtual void Run(volatile bool& stop);
virtual void Cleanup();
virtual float GetFps();
virtual void OnLostDevice();
virtual void OnResetDevice();
virtual void OnLostDisplay();
virtual void OnResetDisplay();

private:
int (*m_glXWaitVideoSyncSGI) (int, int, unsigned int*);
Expand Down
2 changes: 1 addition & 1 deletion xbmc/windowing/X11/WinSystemX11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ void CWinSystemX11::OnLostDevice()

{ CSingleLock lock(m_resourceSection);
for (std::vector<IDispResource *>::iterator i = m_resources.begin(); i != m_resources.end(); ++i)
(*i)->OnLostDevice();
(*i)->OnLostDisplay();
}

CWinEventsX11Imp::SetXRRFailSafeTimer(3000);
Expand Down
2 changes: 1 addition & 1 deletion xbmc/windowing/X11/WinSystemX11GLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool CWinSystemX11GLContext::SetWindow(int width, int height, bool fullscreen, c
CSingleLock lock(m_resourceSection);
// tell any shared resources
for (std::vector<IDispResource *>::iterator i = m_resources.begin(); i != m_resources.end(); ++i)
(*i)->OnResetDevice();
(*i)->OnResetDisplay();
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/windowing/egl/WinSystemEGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ bool CWinSystemEGL::CreateNewWindow(const std::string& name, bool fullScreen, RE
CSingleLock lock(m_resourceSection);
// tell any shared resources
for (std::vector<IDispResource *>::iterator i = m_resources.begin(); i != m_resources.end(); ++i)
(*i)->OnResetDevice();
(*i)->OnResetDisplay();

return true;
}
Expand Down

0 comments on commit 82d7b53

Please sign in to comment.