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:
authoralexwild <alexwild@users.sourceforge.net>2007-09-09 13:12:21 +0400
committeralexwild <alexwild@users.sourceforge.net>2007-09-09 13:12:21 +0400
commitffe9a6463e4db2a909f04b62d783afc30791a45e (patch)
tree0cd1ca7a0d425fd630c546f28f0efa39fc8bf341 /src/apps/mplayerc/RealMediaGraph.h
parent3004a5dca031c9bcf99afab3161db5590b823f6e (diff)
license update; whitespace cleanup
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@193 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/RealMediaGraph.h')
-rw-r--r--src/apps/mplayerc/RealMediaGraph.h353
1 files changed, 178 insertions, 175 deletions
diff --git a/src/apps/mplayerc/RealMediaGraph.h b/src/apps/mplayerc/RealMediaGraph.h
index 7419c9d97..58a02f02d 100644
--- a/src/apps/mplayerc/RealMediaGraph.h
+++ b/src/apps/mplayerc/RealMediaGraph.h
@@ -1,21 +1,23 @@
-/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
+/*
+ * $Id$
*
- * 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 GNU Make; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
+ * (C) 2003-2006 Gabest
+ * (C) 2006-2007 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc 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 this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -43,187 +45,188 @@
#include <RealMedia\rmaausvc.h>
#include <RealMedia\rmavsurf.h>
+
namespace DSObjects
{
-class CRealMediaGraph;
+ class CRealMediaGraph;
-class CRealMediaPlayer
- : public CUnknown
- , public IRMAErrorSink
- , public IRMAClientAdviseSink
- , public IRMAAuthenticationManager
- , public IRMASiteSupplier
- , public IRMAPassiveSiteWatcher
- , public IRMAAudioHook
+ class CRealMediaPlayer
+ : public CUnknown
+ , public IRMAErrorSink
+ , public IRMAClientAdviseSink
+ , public IRMAAuthenticationManager
+ , public IRMASiteSupplier
+ , public IRMAPassiveSiteWatcher
+ , public IRMAAudioHook
+
+ {
+ protected:
+ friend class CRealMediaGraph;
+ CRealMediaGraph* m_pRMG; // IMPORTANT: do not ever AddRef on this from here
+
+ HWND m_hWndParent;
+ CSize m_VideoSize;
+ bool m_fVideoSizeChanged;
+
+ //
+
+ DWORD m_wndStyle;
+ CPlayerWindow m_wndWindowFrame, m_wndDestFrame;
+
+ //
+
+ FPRMCREATEENGINE m_fpCreateEngine;
+ FPRMCLOSEENGINE m_fpCloseEngine;
+ FPRMSETDLLACCESSPATH m_fpSetDLLAccessPath;
+ HMODULE m_hRealMediaCore;
+
+ CComPtr<IRMAClientEngine> m_pEngine;
+ CComPtr<IRMAPlayer> m_pPlayer;
+ CComQIPtr<IRMAAudioPlayer, &IID_IRMAAudioPlayer> m_pAudioPlayer;
+ CComPtr<IRMAVolume> m_pVolume;
+ CComQIPtr<IRMASiteManager, &IID_IRMASiteManager> m_pSiteManager;
+ CComQIPtr<IRMACommonClassFactory, &IID_IRMACommonClassFactory> m_pCommonClassFactory;
-{
-protected:
- friend class CRealMediaGraph;
- CRealMediaGraph* m_pRMG; // IMPORTANT: do not ever AddRef on this from here
-
- HWND m_hWndParent;
- CSize m_VideoSize;
- bool m_fVideoSizeChanged;
-
- //
-
- DWORD m_wndStyle;
- CPlayerWindow m_wndWindowFrame, m_wndDestFrame;
-
- //
-
- FPRMCREATEENGINE m_fpCreateEngine;
- FPRMCLOSEENGINE m_fpCloseEngine;
- FPRMSETDLLACCESSPATH m_fpSetDLLAccessPath;
- HMODULE m_hRealMediaCore;
-
- CComPtr<IRMAClientEngine> m_pEngine;
- CComPtr<IRMAPlayer> m_pPlayer;
- CComQIPtr<IRMAAudioPlayer, &IID_IRMAAudioPlayer> m_pAudioPlayer;
- CComPtr<IRMAVolume> m_pVolume;
- CComQIPtr<IRMASiteManager, &IID_IRMASiteManager> m_pSiteManager;
- CComQIPtr<IRMACommonClassFactory, &IID_IRMACommonClassFactory> m_pCommonClassFactory;
-
- CComQIPtr<IRMASite, &IID_IRMASite> m_pTheSite;
- CComQIPtr<IRMASite2, &IID_IRMASite2> m_pTheSite2;
- CMap<UINT32, UINT32&, IRMASite*, IRMASite*&> m_CreatedSites;
-
- //
-
- OAFilterState m_State, m_UserState;
- REFERENCE_TIME m_nCurrent, m_nDuration;
-
- UINT16 m_unPercentComplete;
-
- //
-
-public:
- CRealMediaPlayer(HWND hWndParent, CRealMediaGraph* pRMG);
- virtual ~CRealMediaPlayer();
-
- DECLARE_IUNKNOWN;
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
-
- bool Init();
- void Deinit();
-
- virtual CSize GetVideoSize() {return(m_VideoSize);}
- virtual void SetWindowRect(CRect r) {}
- virtual void SetDestRect(CRect r) {}
- virtual bool CreateSite(IRMASite** pSite) = 0;
- virtual void DestroySite(IRMASite* pSite) = 0;
-
- // IRMAErrorSink
- STDMETHODIMP ErrorOccurred(const UINT8 unSeverity, const UINT32 ulRMACode, const UINT32 ulUserCode, const char* pUserString, const char* pMoreInfoURL);
-
- // IRMAClientAdviseSink
- STDMETHODIMP OnPosLength(UINT32 ulPosition, UINT32 ulLength);
- STDMETHODIMP OnPresentationOpened();
- STDMETHODIMP OnPresentationClosed();
- STDMETHODIMP OnStatisticsChanged();
- STDMETHODIMP OnPreSeek(UINT32 ulOldTime, UINT32 ulNewTime);
- STDMETHODIMP OnPostSeek(UINT32 ulOldTime, UINT32 ulNewTime);
- STDMETHODIMP OnStop();
- STDMETHODIMP OnPause(UINT32 ulTime);
- STDMETHODIMP OnBegin(UINT32 ulTime);
- STDMETHODIMP OnBuffering(UINT32 ulFlags, UINT16 unPercentComplete);
- STDMETHODIMP OnContacting(const char* pHostName);
-
- // IRMAAuthenticationManager
- STDMETHODIMP HandleAuthenticationRequest(IRMAAuthenticationManagerResponse* pResponse);
-
- // IRMASiteSupplier
- STDMETHODIMP SitesNeeded(UINT32 uRequestID, IRMAValues* pSiteProps);
- STDMETHODIMP SitesNotNeeded(UINT32 uRequestID);
- STDMETHODIMP BeginChangeLayout();
- STDMETHODIMP DoneChangeLayout();
-
- // IRMAPassiveSiteWatcher
- STDMETHODIMP PositionChanged(PNxPoint* pos);
- STDMETHODIMP SizeChanged(PNxSize* size);
-
- // IRMAAudioHook
- STDMETHODIMP OnBuffer(RMAAudioData* pAudioInData, RMAAudioData* pAudioOutData);
- STDMETHODIMP OnInit(RMAAudioFormat* pFormat);
-};
-
-class CRealMediaPlayerWindowed
- : public CRealMediaPlayer
-{
-public:
- CRealMediaPlayerWindowed(HWND hWndParent, CRealMediaGraph* pRMG);
- virtual ~CRealMediaPlayerWindowed();
+ CComQIPtr<IRMASite, &IID_IRMASite> m_pTheSite;
+ CComQIPtr<IRMASite2, &IID_IRMASite2> m_pTheSite2;
+ CMap<UINT32, UINT32&, IRMASite*, IRMASite*&> m_CreatedSites;
- void SetWindowRect(CRect r);
- void SetDestRect(CRect r);
+ //
- bool CreateSite(IRMASite** pSite);
- void DestroySite(IRMASite* pSite);
-};
+ OAFilterState m_State, m_UserState;
+ REFERENCE_TIME m_nCurrent, m_nDuration;
-class CRealMediaPlayerWindowless
- : public CRealMediaPlayer
-{
- CComPtr<ISubPicAllocatorPresenter> m_pRMAP;
+ UINT16 m_unPercentComplete;
-public:
- CRealMediaPlayerWindowless(HWND hWndParent, CRealMediaGraph* pRMG);
- virtual ~CRealMediaPlayerWindowless();
+ //
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
+ public:
+ CRealMediaPlayer(HWND hWndParent, CRealMediaGraph* pRMG);
+ virtual ~CRealMediaPlayer();
- bool CreateSite(IRMASite** pSite);
- void DestroySite(IRMASite* pSite);
+ DECLARE_IUNKNOWN;
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
+
+ bool Init();
+ void Deinit();
- STDMETHODIMP SizeChanged(PNxSize* size);
-};
+ virtual CSize GetVideoSize() {return(m_VideoSize);}
+ virtual void SetWindowRect(CRect r) {}
+ virtual void SetDestRect(CRect r) {}
+ virtual bool CreateSite(IRMASite** pSite) = 0;
+ virtual void DestroySite(IRMASite* pSite) = 0;
-class CRealMediaGraph : public CBaseGraph
-{
- CRealMediaPlayer* m_pRMP; // TODO: access m_pRMP through a private interface
+ // IRMAErrorSink
+ STDMETHODIMP ErrorOccurred(const UINT8 unSeverity, const UINT32 ulRMACode, const UINT32 ulUserCode, const char* pUserString, const char* pMoreInfoURL);
+
+ // IRMAClientAdviseSink
+ STDMETHODIMP OnPosLength(UINT32 ulPosition, UINT32 ulLength);
+ STDMETHODIMP OnPresentationOpened();
+ STDMETHODIMP OnPresentationClosed();
+ STDMETHODIMP OnStatisticsChanged();
+ STDMETHODIMP OnPreSeek(UINT32 ulOldTime, UINT32 ulNewTime);
+ STDMETHODIMP OnPostSeek(UINT32 ulOldTime, UINT32 ulNewTime);
+ STDMETHODIMP OnStop();
+ STDMETHODIMP OnPause(UINT32 ulTime);
+ STDMETHODIMP OnBegin(UINT32 ulTime);
+ STDMETHODIMP OnBuffering(UINT32 ulFlags, UINT16 unPercentComplete);
+ STDMETHODIMP OnContacting(const char* pHostName);
+
+ // IRMAAuthenticationManager
+ STDMETHODIMP HandleAuthenticationRequest(IRMAAuthenticationManagerResponse* pResponse);
+
+ // IRMASiteSupplier
+ STDMETHODIMP SitesNeeded(UINT32 uRequestID, IRMAValues* pSiteProps);
+ STDMETHODIMP SitesNotNeeded(UINT32 uRequestID);
+ STDMETHODIMP BeginChangeLayout();
+ STDMETHODIMP DoneChangeLayout();
+
+ // IRMAPassiveSiteWatcher
+ STDMETHODIMP PositionChanged(PNxPoint* pos);
+ STDMETHODIMP SizeChanged(PNxSize* size);
+
+ // IRMAAudioHook
+ STDMETHODIMP OnBuffer(RMAAudioData* pAudioInData, RMAAudioData* pAudioOutData);
+ STDMETHODIMP OnInit(RMAAudioFormat* pFormat);
+ };
+
+ class CRealMediaPlayerWindowed
+ : public CRealMediaPlayer
+ {
+ public:
+ CRealMediaPlayerWindowed(HWND hWndParent, CRealMediaGraph* pRMG);
+ virtual ~CRealMediaPlayerWindowed();
+
+ void SetWindowRect(CRect r);
+ void SetDestRect(CRect r);
+
+ bool CreateSite(IRMASite** pSite);
+ void DestroySite(IRMASite* pSite);
+ };
- CStringW m_fn;
+ class CRealMediaPlayerWindowless
+ : public CRealMediaPlayer
+ {
+ CComPtr<ISubPicAllocatorPresenter> m_pRMAP;
-public:
- CRealMediaGraph(HWND hWndParent, HRESULT& hr); // in windowless mode IVideoWindow::* will return E_NOTIMPL, use ISubPicAllocatorPresenter instead
- virtual ~CRealMediaGraph();
+ public:
+ CRealMediaPlayerWindowless(HWND hWndParent, CRealMediaGraph* pRMG);
+ virtual ~CRealMediaPlayerWindowless();
- DECLARE_IUNKNOWN;
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
-protected:
- // IGraphBuilder
- STDMETHODIMP RenderFile(LPCWSTR lpcwstrFile, LPCWSTR lpcwstrPlayList);
+ bool CreateSite(IRMASite** pSite);
+ void DestroySite(IRMASite* pSite);
- // IMediaControl
- STDMETHODIMP Run();
- STDMETHODIMP Pause();
- STDMETHODIMP Stop();
- STDMETHODIMP GetState(LONG msTimeout, OAFilterState* pfs);
+ STDMETHODIMP SizeChanged(PNxSize* size);
+ };
- // IMediaSeeking
- STDMETHODIMP GetDuration(LONGLONG* pDuration);
- STDMETHODIMP GetCurrentPosition(LONGLONG* pCurrent);
- STDMETHODIMP SetPositions(LONGLONG* pCurrent, DWORD dwCurrentFlags, LONGLONG* pStop, DWORD dwStopFlags);
+ class CRealMediaGraph : public CBaseGraph
+ {
+ CRealMediaPlayer* m_pRMP; // TODO: access m_pRMP through a private interface
- // IVideoWindow
- STDMETHODIMP SetWindowPosition(long Left, long Top, long Width, long Height);
+ CStringW m_fn;
- // IBasicVideo
- STDMETHODIMP SetDestinationPosition(long Left, long Top, long Width, long Height);
- STDMETHODIMP GetVideoSize(long* pWidth, long* pHeight);
+ public:
+ CRealMediaGraph(HWND hWndParent, HRESULT& hr); // in windowless mode IVideoWindow::* will return E_NOTIMPL, use ISubPicAllocatorPresenter instead
+ virtual ~CRealMediaGraph();
- // IBasicAudio
- STDMETHODIMP put_Volume(long lVolume);
- STDMETHODIMP get_Volume(long* plVolume);
+ DECLARE_IUNKNOWN;
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
- // IAMOpenProgress
- STDMETHODIMP QueryProgress(LONGLONG* pllTotal, LONGLONG* pllCurrent);
+ protected:
+ // IGraphBuilder
+ STDMETHODIMP RenderFile(LPCWSTR lpcwstrFile, LPCWSTR lpcwstrPlayList);
- // IGraphEngine
- STDMETHODIMP_(engine_t) GetEngine();
-};
+ // IMediaControl
+ STDMETHODIMP Run();
+ STDMETHODIMP Pause();
+ STDMETHODIMP Stop();
+ STDMETHODIMP GetState(LONG msTimeout, OAFilterState* pfs);
+
+ // IMediaSeeking
+ STDMETHODIMP GetDuration(LONGLONG* pDuration);
+ STDMETHODIMP GetCurrentPosition(LONGLONG* pCurrent);
+ STDMETHODIMP SetPositions(LONGLONG* pCurrent, DWORD dwCurrentFlags, LONGLONG* pStop, DWORD dwStopFlags);
+
+ // IVideoWindow
+ STDMETHODIMP SetWindowPosition(long Left, long Top, long Width, long Height);
+
+ // IBasicVideo
+ STDMETHODIMP SetDestinationPosition(long Left, long Top, long Width, long Height);
+ STDMETHODIMP GetVideoSize(long* pWidth, long* pHeight);
+
+ // IBasicAudio
+ STDMETHODIMP put_Volume(long lVolume);
+ STDMETHODIMP get_Volume(long* plVolume);
+
+ // IAMOpenProgress
+ STDMETHODIMP QueryProgress(LONGLONG* pllTotal, LONGLONG* pllCurrent);
+
+ // IGraphEngine
+ STDMETHODIMP_(engine_t) GetEngine();
+ };
}
-using namespace DSObjects; \ No newline at end of file
+using namespace DSObjects;