diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-04-09 18:12:59 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-04-09 18:12:59 +0400 |
commit | efbc9d9043ff8ff92716ddd00a5f61412d535593 (patch) | |
tree | 8f3e621f756cf1f5b4d64d97964c7e7abd8aaf08 /src/filters/parser/BaseSplitter/AsyncReader.h | |
parent | df6b139a6d9027156f614b68687e039e3a5854db (diff) |
revert r1783
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1785 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/BaseSplitter/AsyncReader.h')
-rw-r--r-- | src/filters/parser/BaseSplitter/AsyncReader.h | 130 |
1 files changed, 49 insertions, 81 deletions
diff --git a/src/filters/parser/BaseSplitter/AsyncReader.h b/src/filters/parser/BaseSplitter/AsyncReader.h index 8f9cdfcf0..d26552f0e 100644 --- a/src/filters/parser/BaseSplitter/AsyncReader.h +++ b/src/filters/parser/BaseSplitter/AsyncReader.h @@ -1,4 +1,4 @@ -/*
+/*
* Copyright (C) 2003-2006 Gabest
* http://www.gabest.org
*
@@ -6,15 +6,15 @@ * 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.
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
* http://www.gnu.org/copyleft/gpl.html
*
*/
@@ -24,105 +24,73 @@ #include "MultiFiles.h"
[uuid("6DDB4EE7-45A0-4459-A508-BD77B32C91B2")]
-interface ISyncReader :
-public IUnknown
+interface ISyncReader : public IUnknown
{
- STDMETHOD_(void, SetBreakEvent)(HANDLE hBreakEvent) = 0;
- STDMETHOD_(bool, HasErrors)() = 0;
- STDMETHOD_(void, ClearErrors)() = 0;
- STDMETHOD_(void, SetPTSOffset)(REFERENCE_TIME* rtPTSOffset) = 0;
+ STDMETHOD_(void, SetBreakEvent) (HANDLE hBreakEvent) = 0;
+ STDMETHOD_(bool, HasErrors) () = 0;
+ STDMETHOD_(void, ClearErrors) () = 0;
+ STDMETHOD_(void, SetPTSOffset) (REFERENCE_TIME* rtPTSOffset) = 0;
};
[uuid("7D55F67A-826E-40B9-8A7D-3DF0CBBD272D")]
-interface IFileHandle :
-public IUnknown
+interface IFileHandle : public IUnknown
{
- STDMETHOD_(HANDLE, GetFileHandle)() = 0;
- STDMETHOD_(LPCTSTR, GetFileName)() = 0;
+ STDMETHOD_(HANDLE, GetFileHandle)() = 0;
+ STDMETHOD_(LPCTSTR, GetFileName)() = 0;
};
class CAsyncFileReader : public CUnknown, public CMultiFiles, public IAsyncReader, public ISyncReader, public IFileHandle
{
protected:
- ULONGLONG m_len;
- HANDLE m_hBreakEvent;
- LONG m_lOsError; // CFileException::m_lOsError
+ ULONGLONG m_len;
+ HANDLE m_hBreakEvent;
+ LONG m_lOsError; // CFileException::m_lOsError
public:
- CAsyncFileReader(CString fn, HRESULT& hr);
- CAsyncFileReader(CAtlList<CHdmvClipInfo::PlaylistItem>& Items, HRESULT& hr);
-
- DECLARE_IUNKNOWN;
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
-
- // IAsyncReader
-
- STDMETHODIMP RequestAllocator(IMemAllocator* pPreferred, ALLOCATOR_PROPERTIES* pProps, IMemAllocator** ppActual)
- {
- return E_NOTIMPL;
- }
- STDMETHODIMP Request(IMediaSample* pSample, DWORD_PTR dwUser)
- {
- return E_NOTIMPL;
- }
- STDMETHODIMP WaitForNext(DWORD dwTimeout, IMediaSample** ppSample, DWORD_PTR* pdwUser)
- {
- return E_NOTIMPL;
- }
- STDMETHODIMP SyncReadAligned(IMediaSample* pSample)
- {
- return E_NOTIMPL;
- }
- STDMETHODIMP SyncRead(LONGLONG llPosition, LONG lLength, BYTE* pBuffer);
- STDMETHODIMP Length(LONGLONG* pTotal, LONGLONG* pAvailable);
- STDMETHODIMP BeginFlush()
- {
- return E_NOTIMPL;
- }
- STDMETHODIMP EndFlush()
- {
- return E_NOTIMPL;
- }
-
- // ISyncReader
-
- STDMETHODIMP_(void) SetBreakEvent(HANDLE hBreakEvent)
- {
- m_hBreakEvent = hBreakEvent;
- }
- STDMETHODIMP_(bool) HasErrors()
- {
- return m_lOsError != 0;
- }
- STDMETHODIMP_(void) ClearErrors()
- {
- m_lOsError = 0;
- }
- STDMETHODIMP_(void) SetPTSOffset(REFERENCE_TIME* rtPTSOffset)
- {
- m_pCurrentPTSOffset = rtPTSOffset;
- };
-
- // IFileHandle
-
- STDMETHODIMP_(HANDLE) GetFileHandle();
- STDMETHODIMP_(LPCTSTR) GetFileName();
+ CAsyncFileReader(CString fn, HRESULT& hr);
+ CAsyncFileReader(CAtlList<CHdmvClipInfo::PlaylistItem>& Items, HRESULT& hr);
+
+ DECLARE_IUNKNOWN;
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
+
+ // IAsyncReader
+
+ STDMETHODIMP RequestAllocator(IMemAllocator* pPreferred, ALLOCATOR_PROPERTIES* pProps, IMemAllocator** ppActual) {return E_NOTIMPL;}
+ STDMETHODIMP Request(IMediaSample* pSample, DWORD_PTR dwUser) {return E_NOTIMPL;}
+ STDMETHODIMP WaitForNext(DWORD dwTimeout, IMediaSample** ppSample, DWORD_PTR* pdwUser) {return E_NOTIMPL;}
+ STDMETHODIMP SyncReadAligned(IMediaSample* pSample) {return E_NOTIMPL;}
+ STDMETHODIMP SyncRead(LONGLONG llPosition, LONG lLength, BYTE* pBuffer);
+ STDMETHODIMP Length(LONGLONG* pTotal, LONGLONG* pAvailable);
+ STDMETHODIMP BeginFlush() {return E_NOTIMPL;}
+ STDMETHODIMP EndFlush() {return E_NOTIMPL;}
+
+ // ISyncReader
+
+ STDMETHODIMP_(void) SetBreakEvent(HANDLE hBreakEvent) {m_hBreakEvent = hBreakEvent;}
+ STDMETHODIMP_(bool) HasErrors() {return m_lOsError != 0;}
+ STDMETHODIMP_(void) ClearErrors() {m_lOsError = 0;}
+ STDMETHODIMP_(void) SetPTSOffset (REFERENCE_TIME* rtPTSOffset) { m_pCurrentPTSOffset = rtPTSOffset;};
+
+ // IFileHandle
+
+ STDMETHODIMP_(HANDLE) GetFileHandle();
+ STDMETHODIMP_(LPCTSTR) GetFileName();
};
class CAsyncUrlReader : public CAsyncFileReader, protected CAMThread
{
- CString m_url, m_fn;
+ CString m_url, m_fn;
protected:
- enum {CMD_EXIT, CMD_INIT};
+ enum {CMD_EXIT, CMD_INIT};
DWORD ThreadProc();
public:
- CAsyncUrlReader(CString url, HRESULT& hr);
- virtual ~CAsyncUrlReader();
+ CAsyncUrlReader(CString url, HRESULT& hr);
+ virtual ~CAsyncUrlReader();
- // IAsyncReader
+ // IAsyncReader
- STDMETHODIMP Length(LONGLONG* pTotal, LONGLONG* pAvailable);
+ STDMETHODIMP Length(LONGLONG* pTotal, LONGLONG* pAvailable);
};
|