Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkinddragon <kinddragon@users.sourceforge.net>2010-05-08 00:02:20 +0400
committerkinddragon <kinddragon@users.sourceforge.net>2010-05-08 00:02:20 +0400
commit5d3957012244f165ff0e800d939a491cef4e43aa (patch)
tree46c0cee9b1da0c72148c5212992c0fb040009a22
parentc9fdac8d20ffe1e82c9707ee1cc6e4478c0b1e33 (diff)
Some fixes
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/branches/videorenderslib@1861 10f7b99b-c216-0410-bff0-8a66a9350fd8
-rw-r--r--src/VideoRenderers/AllocatorCommon.cpp3
-rw-r--r--src/VideoRenderers/AllocatorCommon.h4
-rw-r--r--src/VideoRenderers/AllocatorCommon7.cpp5
-rw-r--r--src/VideoRenderers/AllocatorCommon7.h2
-rw-r--r--src/VideoRenderers/DX7AllocatorPresenter.cpp2
-rw-r--r--src/VideoRenderers/DX9AllocatorPresenter.cpp3
-rw-r--r--src/VideoRenderers/DXRAllocatorPresenter.cpp1
-rw-r--r--src/VideoRenderers/EVRAllocatorPresenter.cpp2
-rw-r--r--src/VideoRenderers/QT9AllocatorPresenter.cpp2
-rw-r--r--src/VideoRenderers/RM9AllocatorPresenter.cpp2
-rw-r--r--src/VideoRenderers/RenderersSettings.h2
-rw-r--r--src/VideoRenderers/SyncAllocatorPresenter.h6
-rw-r--r--src/VideoRenderers/SyncRenderer.cpp17
-rw-r--r--src/VideoRenderers/SyncRenderer.h10
-rw-r--r--src/VideoRenderers/VMR9AllocatorPresenter.cpp2
-rw-r--r--src/VideoRenderers/VideoRenderers.vcproj4
-rw-r--r--src/VideoRenderers/madVRAllocatorPresenter.cpp1
-rw-r--r--src/VideoRenderers/stdafx.h7
-rw-r--r--src/apps/mplayerc/FGManager.cpp30
-rw-r--r--src/apps/mplayerc/MainFrm.cpp5
20 files changed, 56 insertions, 54 deletions
diff --git a/src/VideoRenderers/AllocatorCommon.cpp b/src/VideoRenderers/AllocatorCommon.cpp
index 53667e2ad..311f6bc97 100644
--- a/src/VideoRenderers/AllocatorCommon.cpp
+++ b/src/VideoRenderers/AllocatorCommon.cpp
@@ -21,7 +21,10 @@
*/
#include "stdafx.h"
+#include <initguid.h>
#include "AllocatorCommon.h"
+#include "../DSUtil/DSUtil.h"
+
#include "VMR9AllocatorPresenter.h"
#include "RM9AllocatorPresenter.h"
#include "QT9AllocatorPresenter.h"
diff --git a/src/VideoRenderers/AllocatorCommon.h b/src/VideoRenderers/AllocatorCommon.h
index 7f2d8c663..e132c3c44 100644
--- a/src/VideoRenderers/AllocatorCommon.h
+++ b/src/VideoRenderers/AllocatorCommon.h
@@ -26,8 +26,8 @@
#include <d3d9.h>
#include <d3dx9.h>
#include <Vmr9.h>
-#include "../../SubPic/ISubPic.h"
-#include "../../SubPic/DX9SubPic.h"
+#include "../SubPic/ISubPic.h"
+#include "../SubPic/DX9SubPic.h"
#include "PixelShaderCompiler.h"
// {4E4834FA-22C2-40e2-9446-F77DD05D245E}
diff --git a/src/VideoRenderers/AllocatorCommon7.cpp b/src/VideoRenderers/AllocatorCommon7.cpp
index fb9d1eeb7..f094311dd 100644
--- a/src/VideoRenderers/AllocatorCommon7.cpp
+++ b/src/VideoRenderers/AllocatorCommon7.cpp
@@ -22,9 +22,10 @@
*/
#include "stdafx.h"
-#include "../../DSUtil/DSUtil.h"
-
#include <initguid.h>
+#include "AllocatorCommon7.h"
+#include "../DSUtil/DSUtil.h"
+
#include "DX7AllocatorPresenter.h"
#include "VMR7AllocatorPresenter.h"
#include "RM7AllocatorPresenter.h"
diff --git a/src/VideoRenderers/AllocatorCommon7.h b/src/VideoRenderers/AllocatorCommon7.h
index 38120c13a..fc18ddd4e 100644
--- a/src/VideoRenderers/AllocatorCommon7.h
+++ b/src/VideoRenderers/AllocatorCommon7.h
@@ -23,7 +23,7 @@
#pragma once
-#include "../../SubPic/ISubPic.h"
+#include "../SubPic/ISubPic.h"
// {495CF191-810D-44c7-92C5-E7D46AE00F44}
diff --git a/src/VideoRenderers/DX7AllocatorPresenter.cpp b/src/VideoRenderers/DX7AllocatorPresenter.cpp
index 8f2dd6178..e15e9cf2d 100644
--- a/src/VideoRenderers/DX7AllocatorPresenter.cpp
+++ b/src/VideoRenderers/DX7AllocatorPresenter.cpp
@@ -25,7 +25,7 @@
#include "RenderersSettings.h"
#include "DX7AllocatorPresenter.h"
-#include "../../SubPic/DX7SubPic.h"
+#include "../SubPic/DX7SubPic.h"
using namespace DSObjects;
diff --git a/src/VideoRenderers/DX9AllocatorPresenter.cpp b/src/VideoRenderers/DX9AllocatorPresenter.cpp
index 9e118757e..6b2fd3907 100644
--- a/src/VideoRenderers/DX9AllocatorPresenter.cpp
+++ b/src/VideoRenderers/DX9AllocatorPresenter.cpp
@@ -27,9 +27,8 @@
#include <initguid.h>
#include <utility>
#include "../apps/mplayerc/resource.h"
-#include "../../SubPic/DX9SubPic.h"
+#include "../SubPic/DX9SubPic.h"
#include "IPinHook.h"
-//#include "MainFrm.h"
CCritSec g_ffdshowReceive;
bool queue_ffdshow_support = false;
diff --git a/src/VideoRenderers/DXRAllocatorPresenter.cpp b/src/VideoRenderers/DXRAllocatorPresenter.cpp
index 3b603ab3f..941d1b9ec 100644
--- a/src/VideoRenderers/DXRAllocatorPresenter.cpp
+++ b/src/VideoRenderers/DXRAllocatorPresenter.cpp
@@ -24,7 +24,6 @@
#include "RenderersSettings.h"
#include "DXRAllocatorPresenter.h"
#include <moreuuids.h>
-//#include "MainFrm.h"
using namespace DSObjects;
diff --git a/src/VideoRenderers/EVRAllocatorPresenter.cpp b/src/VideoRenderers/EVRAllocatorPresenter.cpp
index 8e27ef941..6ed708080 100644
--- a/src/VideoRenderers/EVRAllocatorPresenter.cpp
+++ b/src/VideoRenderers/EVRAllocatorPresenter.cpp
@@ -22,12 +22,10 @@
#include "stdafx.h"
-//#include "mplayerc.h"
#include "EVRAllocatorPresenter.h"
#include <Mferror.h>
#include "IPinHook.h"
#include "MacrovisionKicker.h"
-//#include "MainFrm.h"
#if (0) // Set to 1 to activate EVR traces
#define TRACE_EVR TRACE
diff --git a/src/VideoRenderers/QT9AllocatorPresenter.cpp b/src/VideoRenderers/QT9AllocatorPresenter.cpp
index 994a65a6c..115f5b4a3 100644
--- a/src/VideoRenderers/QT9AllocatorPresenter.cpp
+++ b/src/VideoRenderers/QT9AllocatorPresenter.cpp
@@ -21,9 +21,7 @@
*/
#include "stdafx.h"
-//#include "mplayerc.h"
#include "QT9AllocatorPresenter.h"
-//#include "MainFrm.h"
using namespace DSObjects;
diff --git a/src/VideoRenderers/RM9AllocatorPresenter.cpp b/src/VideoRenderers/RM9AllocatorPresenter.cpp
index a2e8a3e58..7d5c25795 100644
--- a/src/VideoRenderers/RM9AllocatorPresenter.cpp
+++ b/src/VideoRenderers/RM9AllocatorPresenter.cpp
@@ -21,9 +21,7 @@
*/
#include "stdafx.h"
-//#include "mplayerc.h"
#include "RM9AllocatorPresenter.h"
-//#include "MainFrm.h"
using namespace DSObjects;
diff --git a/src/VideoRenderers/RenderersSettings.h b/src/VideoRenderers/RenderersSettings.h
index a8bbf0c20..96b28c49b 100644
--- a/src/VideoRenderers/RenderersSettings.h
+++ b/src/VideoRenderers/RenderersSettings.h
@@ -181,8 +181,6 @@ public:
bool m_bResetStats; // Set to reset the presentation statistics
CString m_strD3DX9Version;
- CWnd* m_pMainWnd; // main window (usually same AfxGetApp()->m_pMainWnd)
-
LONGLONG GetPerfCounter();
HINSTANCE GetD3X9Dll();
int GetDXSdkRelease()
diff --git a/src/VideoRenderers/SyncAllocatorPresenter.h b/src/VideoRenderers/SyncAllocatorPresenter.h
index d1fbe6871..9e3caaa0d 100644
--- a/src/VideoRenderers/SyncAllocatorPresenter.h
+++ b/src/VideoRenderers/SyncAllocatorPresenter.h
@@ -26,4 +26,10 @@
// {F9F62627-E3EF-4a2e-B6C9-5D4C0DC3326B}
DEFINE_GUID(CLSID_SyncAllocatorPresenter, 0xf9f62627, 0xe3ef, 0x4a2e, 0xb6, 0xc9, 0x5d, 0x4c, 0xd, 0xc3, 0x32, 0x6b);
+[uuid("F891C2A9-1DFF-45e0-9129-30C0990C5A9F")]
+interface ISyncClockAdviser : public IUnknown
+{
+ STDMETHOD (AdviseSyncClock)(ISyncClock* sC) PURE;
+};
+
HRESULT CreateSyncRenderer(const CLSID& clsid, HWND hWnd, bool bFullscreen, ISubPicAllocatorPresenter** ppAP); \ No newline at end of file
diff --git a/src/VideoRenderers/SyncRenderer.cpp b/src/VideoRenderers/SyncRenderer.cpp
index 3922855e7..13cc62766 100644
--- a/src/VideoRenderers/SyncRenderer.cpp
+++ b/src/VideoRenderers/SyncRenderer.cpp
@@ -23,11 +23,10 @@
#include "stdafx.h"
#include "../../filters/misc/SyncClock/Interfaces.h"
-//#include "mplayerc.h"
#include <atlbase.h>
#include <atlcoll.h>
#include "../apps/mplayerc/resource.h"
-#include "../../DSUtil/DSUtil.h"
+#include "../DSUtil/DSUtil.h"
#include <strsafe.h> // Required in CGenlock
#include <Videoacc.h>
#include <initguid.h>
@@ -38,12 +37,11 @@
#include <mfapi.h>
#include <Mferror.h>
#include <vector>
-#include "../../SubPic/DX9SubPic.h"
+#include "../SubPic/DX9SubPic.h"
#include <moreuuids.h>
#include "MacrovisionKicker.h"
#include "IPinHook.h"
#include "PixelShaderCompiler.h"
-//#include "MainFrm.h"
#include "SyncRenderer.h"
// only for debugging
@@ -2730,7 +2728,9 @@ STDMETHODIMP CSyncAP::NonDelegatingQueryInterface(REFIID riid, void** ppv)
else if(riid == __uuidof(IMFRateSupport))
hr = GetInterface((IMFRateSupport*)this, ppv);
else if(riid == __uuidof(IDirect3DDeviceManager9))
- hr = m_pD3DManager->QueryInterface (__uuidof(IDirect3DDeviceManager9), (void**) ppv);
+ hr = m_pD3DManager->QueryInterface (__uuidof(IDirect3DDeviceManager9), (void**) ppv);
+ else if(riid == __uuidof(ISyncClockAdviser))
+ hr = GetInterface((ISyncClockAdviser*)this, ppv);
else
hr = __super::NonDelegatingQueryInterface(riid, ppv);
@@ -3980,14 +3980,17 @@ void CSyncAP::FlushSamplesInternal()
}
}
+HRESULT CSyncAP::AdviseSyncClock(ISyncClock* sC)
+{
+ return m_pGenlock->AdviseSyncClock(sC);
+}
+
HRESULT CSyncAP::BeginStreaming()
{
CRenderersSettings& s = GetRenderersSettings();
m_pcFramesDropped = 0;
m_pcFramesDrawn = 0;
- //if (s.m_RenderSettings.bSynchronizeVideo)
- // m_pGenlock->AdviseSyncClock(((CMainFrame*)(AfxGetApp()->m_pMainWnd))->m_pSyncClock);
CComPtr<IBaseFilter> pEVR;
FILTER_INFO filterInfo;
ZeroMemory(&filterInfo, sizeof(filterInfo));
diff --git a/src/VideoRenderers/SyncRenderer.h b/src/VideoRenderers/SyncRenderer.h
index 74767c169..cd8c71548 100644
--- a/src/VideoRenderers/SyncRenderer.h
+++ b/src/VideoRenderers/SyncRenderer.h
@@ -22,7 +22,7 @@
*/
#pragma once
-#include "../../SubPic/ISubPic.h"
+#include "../SubPic/ISubPic.h"
#include "RenderersSettings.h"
#include "SyncAllocatorPresenter.h"
#include "AllocatorCommon.h"
@@ -351,7 +351,8 @@ class CSyncAP:
public IQualProp,
public IMFRateSupport,
public IMFVideoDisplayControl,
- public IEVRTrustedVideoPlugin
+ public IEVRTrustedVideoPlugin,
+ public ISyncClockAdviser
{
public:
@@ -515,7 +516,8 @@ private:
HRESULT CheckShutdown() const;
void CompleteFrameStep(bool bCancel);
- void RemoveAllSamples();
+ void RemoveAllSamples();
+ STDMETHODIMP AdviseSyncClock(ISyncClock* sC);
HRESULT BeginStreaming();
HRESULT GetFreeSample(IMFSample** ppSample);
HRESULT GetScheduledSample(IMFSample** ppSample, int &_Count);
@@ -632,7 +634,7 @@ public:
HRESULT GetTargetSyncOffset(DOUBLE *targetD);
HRESULT SetControlLimit(DOUBLE cL);
HRESULT GetControlLimit(DOUBLE *cL);
- HRESULT SetDisplayResolution(UINT columns, UINT lines);
+ HRESULT SetDisplayResolution(UINT columns, UINT lines);
HRESULT AdviseSyncClock(ISyncClock* sC);
HRESULT SetMonitor(UINT mon); // Set the number of the monitor to synchronize
HRESULT ResetStats(); // Reset timing statistics
diff --git a/src/VideoRenderers/VMR9AllocatorPresenter.cpp b/src/VideoRenderers/VMR9AllocatorPresenter.cpp
index d31d9ee3a..ef1ad32f6 100644
--- a/src/VideoRenderers/VMR9AllocatorPresenter.cpp
+++ b/src/VideoRenderers/VMR9AllocatorPresenter.cpp
@@ -21,11 +21,9 @@
*/
#include "stdafx.h"
-//#include "mplayerc.h"
#include "VMR9AllocatorPresenter.h"
#include "IPinHook.h"
#include "MacrovisionKicker.h"
-//#include "MainFrm.h"
// ISubPicAllocatorPresenter
diff --git a/src/VideoRenderers/VideoRenderers.vcproj b/src/VideoRenderers/VideoRenderers.vcproj
index b8cfd05bf..c3d45c701 100644
--- a/src/VideoRenderers/VideoRenderers.vcproj
+++ b/src/VideoRenderers/VideoRenderers.vcproj
@@ -462,10 +462,6 @@
>
</File>
<File
- RelativePath=".\IGraphBuilder2.h"
- >
- </File>
- <File
RelativePath=".\IPinHook.h"
>
</File>
diff --git a/src/VideoRenderers/madVRAllocatorPresenter.cpp b/src/VideoRenderers/madVRAllocatorPresenter.cpp
index ff8f1b8ae..9da9fdeec 100644
--- a/src/VideoRenderers/madVRAllocatorPresenter.cpp
+++ b/src/VideoRenderers/madVRAllocatorPresenter.cpp
@@ -24,7 +24,6 @@
#include "madVRAllocatorPresenter.h"
#include "RenderersSettings.h"
#include <moreuuids.h>
-//#include "MainFrm.h"
using namespace DSObjects;
diff --git a/src/VideoRenderers/stdafx.h b/src/VideoRenderers/stdafx.h
index dbda105d7..2ca72e1ef 100644
--- a/src/VideoRenderers/stdafx.h
+++ b/src/VideoRenderers/stdafx.h
@@ -30,7 +30,7 @@
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
-#include "../../DSUtil/SharedInclude.h"
+#include "../DSUtil/SharedInclude.h"
// VS2005 changed result of OnNCHitTest
#if _MSC_VER >= 1400
@@ -66,13 +66,12 @@
#include <streams.h>
#include <dvdmedia.h>
#include <mpconfig.h>
-#ifdef _WIN64
-#else
+#ifndef _WIN64
#include <qt/qt.h>
#endif
#include "../../ui/ui.h"
-#include "../../DSUtil/DSUtil.h"
+#include "../DSUtil/DSUtil.h"
#include <gdiplus.h>
#pragma comment(lib, "gdiplus.lib")
diff --git a/src/apps/mplayerc/FGManager.cpp b/src/apps/mplayerc/FGManager.cpp
index 67c4d9bab..1484e65f5 100644
--- a/src/apps/mplayerc/FGManager.cpp
+++ b/src/apps/mplayerc/FGManager.cpp
@@ -696,21 +696,21 @@ HRESULT CFGManager::Connect(IPin* pPinOut, IPin* pPinIn, bool bContinueRender)
hr = ConnectFilterDirect(pPinOut, pBF, NULL);
}
/*
- if(FAILED(hr))
- {
- if(types.GetCount() >= 2 && types[0] == MEDIATYPE_Stream && types[1] != GUID_NULL)
- {
- CMediaType mt;
-
- mt.majortype = types[0];
- mt.subtype = types[1];
- mt.formattype = FORMAT_None;
- if(FAILED(hr)) hr = ConnectFilterDirect(pPinOut, pBF, &mt);
-
- mt.formattype = GUID_NULL;
- if(FAILED(hr)) hr = ConnectFilterDirect(pPinOut, pBF, &mt);
- }
- }
+ if(FAILED(hr))
+ {
+ if(types.GetCount() >= 2 && types[0] == MEDIATYPE_Stream && types[1] != GUID_NULL)
+ {
+ CMediaType mt;
+
+ mt.majortype = types[0];
+ mt.subtype = types[1];
+ mt.formattype = FORMAT_None;
+ if(FAILED(hr)) hr = ConnectFilterDirect(pPinOut, pBF, &mt);
+
+ mt.formattype = GUID_NULL;
+ if(FAILED(hr)) hr = ConnectFilterDirect(pPinOut, pBF, &mt);
+ }
+ }
*/
if(SUCCEEDED(hr))
{
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp
index a7c49b96e..e75229f0c 100644
--- a/src/apps/mplayerc/MainFrm.cpp
+++ b/src/apps/mplayerc/MainFrm.cpp
@@ -75,6 +75,7 @@
#include "../../VideoRenderers/AllocatorCommon7.h"
#include "../../VideoRenderers/AllocatorCommon.h"
+#include "../../VideoRenderers/SyncAllocatorPresenter.h"
#include "../../subtitles/SSF.h"
#include "ComPropertySheet.h"
@@ -10185,6 +10186,10 @@ void CMainFrame::OpenCustomizeGraph()
refClock = NULL;
m_pRefClock->QueryInterface(IID_ISyncClock, reinterpret_cast<void**>(&m_pSyncClock));
+
+ CComQIPtr<ISyncClockAdviser> pAdviser = m_pCAP;
+ if (pAdviser)
+ pAdviser->AdviseSyncClock(m_pSyncClock);
}
if(GetPlaybackMode() == PM_DVD)