diff options
author | kinddragon <kinddragon@users.sourceforge.net> | 2010-05-09 03:08:00 +0400 |
---|---|---|
committer | kinddragon <kinddragon@users.sourceforge.net> | 2010-05-09 03:08:00 +0400 |
commit | efca6710e177e29b59b0088417e3b44d1d9afa51 (patch) | |
tree | 5cb668a985930dff0d44af1ffd6f5a98d31a55a0 /src | |
parent | 8ff61506955115d818cb92114606d2ca23c320c5 (diff) |
Graph with EVR renderer fixed
Minor fixes
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/branches/videorenderslib@1867 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r-- | src/DSUtil/NullRenderers.h | 1 | ||||
-rw-r--r-- | src/apps/mplayerc/stdafx.h | 3 | ||||
-rw-r--r-- | src/filters/BaseClasses/streams.h | 4 | ||||
-rw-r--r-- | src/filters/filters.h | 2 | ||||
-rw-r--r-- | src/filters/renderer/VideoRenderers/SyncRenderer.cpp | 6 | ||||
-rw-r--r-- | src/filters/renderer/VideoRenderers/VideoRenderers.vcproj | 6 | ||||
-rw-r--r-- | src/filters/renderer/VideoRenderers/stdafx.h | 42 |
7 files changed, 19 insertions, 45 deletions
diff --git a/src/DSUtil/NullRenderers.h b/src/DSUtil/NullRenderers.h index 3fdbe6ea2..bf3581f42 100644 --- a/src/DSUtil/NullRenderers.h +++ b/src/DSUtil/NullRenderers.h @@ -22,6 +22,7 @@ #pragma once
#include <atlcoll.h>
+#include <streams.h>
class CNullRenderer : public CBaseRenderer
{
diff --git a/src/apps/mplayerc/stdafx.h b/src/apps/mplayerc/stdafx.h index 350766bd7..2e06958f9 100644 --- a/src/apps/mplayerc/stdafx.h +++ b/src/apps/mplayerc/stdafx.h @@ -68,8 +68,7 @@ #include <streams.h>
#include <dvdmedia.h>
#include <mpconfig.h>
-#ifdef _WIN64
-#else
+#ifndef _WIN64
#include <qt/qt.h>
#endif
diff --git a/src/filters/BaseClasses/streams.h b/src/filters/BaseClasses/streams.h index 7d1afd0d5..2defce3bc 100644 --- a/src/filters/BaseClasses/streams.h +++ b/src/filters/BaseClasses/streams.h @@ -10,6 +10,10 @@ #ifndef __STREAMS__
#define __STREAMS__
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
#ifdef _MSC_VER
// disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
diff --git a/src/filters/filters.h b/src/filters/filters.h index 2cca1d751..5a7e8b282 100644 --- a/src/filters/filters.h +++ b/src/filters/filters.h @@ -16,6 +16,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
// http://www.gnu.org/copyleft/gpl.html
+#pragma once
+
#include "./reader/CDDAReader/CDDAReader.h"
#include "./reader/CDXAReader/CDXAReader.h"
#include "./reader/UDPReader/UDPReader.h"
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp index 6c5bc8de4..c3ec0e813 100644 --- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp +++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp @@ -1600,7 +1600,8 @@ HRESULT CBaseAP::AlphaBlt(RECT* pSrc, RECT* pDst, IDirect3DTexture9* pTexture) void CBaseAP::SyncStats(LONGLONG syncTime)
{
m_nNextJitter = (m_nNextJitter+1) % NB_JITTER;
- m_pllJitter[m_nNextJitter] = syncTime - m_llLastSyncTime;
+ LONGLONG jitter = syncTime - m_llLastSyncTime;
+ m_pllJitter[m_nNextJitter] = jitter;
double syncDeviation = ((double)m_pllJitter[m_nNextJitter] - m_fJitterMean) / 10000.0;
if (abs(syncDeviation) > (GetDisplayCycle() / 2))
m_uSyncGlitches++;
@@ -1705,7 +1706,8 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool fAll) m_pD3DDev->GetRasterStatus(0, &rasterStatus);
m_uScanLineEnteringPaint = rasterStatus.ScanLine;
if (m_pRefClock) m_pRefClock->GetTime(&llCurRefTime);
- dSyncOffset = (m_ScreenSize.cy - m_uScanLineEnteringPaint) * m_dDetectedScanlineTime; // ms
+ int dScanLines = max((int)m_ScreenSize.cy - m_uScanLineEnteringPaint, 0);
+ dSyncOffset = dScanLines * m_dDetectedScanlineTime; // ms
llSyncOffset = REFERENCE_TIME(10000.0 * dSyncOffset); // Reference time units (100 ns)
m_llEstVBlankTime = llCurRefTime + llSyncOffset; // Estimated time for the start of next vblank
diff --git a/src/filters/renderer/VideoRenderers/VideoRenderers.vcproj b/src/filters/renderer/VideoRenderers/VideoRenderers.vcproj index 2beebbc58..29b8ac30f 100644 --- a/src/filters/renderer/VideoRenderers/VideoRenderers.vcproj +++ b/src/filters/renderer/VideoRenderers/VideoRenderers.vcproj @@ -128,7 +128,7 @@ <Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\include\dx;..\..\..\include\atl;..\..\BaseClasses;..\..\..\zlib"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\include\dx;..\..\..\..\include\atl;..\..\BaseClasses;..\..\..\zlib"
PreprocessorDefinitions="_WIN64;NDEBUG;_WINDOWS;DETOURS_X64"
BufferSecurityCheck="true"
EnableEnhancedInstructionSet="0"
@@ -201,7 +201,7 @@ <Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\include\dx;..\..\..\include\atl;..\..\BaseClasses;..\..\..\zlib"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\include\dx;..\..\..\..\include\atl;..\..\BaseClasses;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DETOURS_X32"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
@@ -271,7 +271,7 @@ <Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\include\dx;..\..\..\include\atl;..\..\BaseClasses;..\..\..\zlib"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\include\dx;..\..\..\..\include\atl;..\..\BaseClasses;..\..\..\zlib"
PreprocessorDefinitions="_WIN64;_DEBUG;_WINDOWS;DETOURS_X64"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
diff --git a/src/filters/renderer/VideoRenderers/stdafx.h b/src/filters/renderer/VideoRenderers/stdafx.h index d1cc4cb4c..f7470f231 100644 --- a/src/filters/renderer/VideoRenderers/stdafx.h +++ b/src/filters/renderer/VideoRenderers/stdafx.h @@ -24,45 +24,24 @@ *
*/
-#if !defined(AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_)
-#define AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_
+#if !defined(AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07225__INCLUDED_)
+#define AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07225__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "../../../DSUtil/SharedInclude.h"
-// VS2005 changed result of OnNCHitTest
-#if _MSC_VER >= 1400
-#define HITTEST_RET LRESULT
-#else
-#define HITTEST_RET UINT
-#endif
-
//#define _WIN32_IE 0x0600
#define WINVER 0x0600
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#include <afxwin.h> // MFC core and standard components
-#include <afxext.h> // MFC extensions
-#include <afxdisp.h> // MFC Automation classes
-#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
-#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-#include <afxdlgs.h>
-
#define ResStr(id) CString(MAKEINTRESOURCE(id))
#include <afxdisp.h>
#include <afxole.h>
-#include <Shlwapi.h>
-
-#include <atlcoll.h>
-#include <atlpath.h>
-
#include <streams.h>
#include <dvdmedia.h>
#include <mpconfig.h>
@@ -70,22 +49,9 @@ #include <qt/qt.h>
#endif
-#include "../../ui/ui.h"
-#include "../DSUtil/DSUtil.h"
-
-#include <gdiplus.h>
-#pragma comment(lib, "gdiplus.lib")
-
-template <class T = CString, class S = CString>
-class CAtlStringMap : public CAtlMap<S, T, CStringElementTraits<S> > {};
-
-#define CheckAndLog(x, msg) hr = ##x; if (FAILED (hr)) { TRACE(msg" : 0x%08x\n", hr); return hr; }
-#define CheckNoLog(x) hr = ##x; if (FAILED (hr)) { return hr; }
-
-
-//#define BCM_SETSHIELD 0x0000160C // Shield style for button (elevated privilege)
+#include "../../../DSUtil/DSUtil.h"
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-#endif // !defined(AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_)
+#endif // !defined(AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07225__INCLUDED_)
|