From a1d7d8f25feed77c2e710b6e471fa1a306f5c40d Mon Sep 17 00:00:00 2001 From: oioitff Date: Tue, 14 May 2013 16:59:36 +0800 Subject: [PATCH] Add a stream source filter project. --- filter/asyncStreamflt/asyncflt.cpp | 149 ++++ filter/asyncStreamflt/asyncflt.def | 13 + filter/asyncStreamflt/asyncflt.h | 305 ++++++++ filter/asyncStreamflt/asyncflt.rc | 53 ++ filter/asyncStreamflt/asyncflt.sln | 21 + filter/asyncStreamflt/asyncflt.vcxproj | 305 ++++++++ .../asyncStreamflt/asyncflt.vcxproj.filters | 52 ++ filter/asyncStreamflt/asyncio.cpp | 708 ++++++++++++++++++ filter/asyncStreamflt/asyncio.h | 273 +++++++ filter/asyncStreamflt/asyncrdr.cpp | 436 +++++++++++ filter/asyncStreamflt/asyncrdr.h | 228 ++++++ filter/include/StreamSourceflt.h | 26 + filter/lib/AsyncStreamflt.ax | Bin 0 -> 49152 bytes filter/lib/register.bat | 1 + filter/lib/unregister.bat | 1 + 15 files changed, 2571 insertions(+) create mode 100644 filter/asyncStreamflt/asyncflt.cpp create mode 100644 filter/asyncStreamflt/asyncflt.def create mode 100644 filter/asyncStreamflt/asyncflt.h create mode 100644 filter/asyncStreamflt/asyncflt.rc create mode 100644 filter/asyncStreamflt/asyncflt.sln create mode 100644 filter/asyncStreamflt/asyncflt.vcxproj create mode 100644 filter/asyncStreamflt/asyncflt.vcxproj.filters create mode 100644 filter/asyncStreamflt/asyncio.cpp create mode 100644 filter/asyncStreamflt/asyncio.h create mode 100644 filter/asyncStreamflt/asyncrdr.cpp create mode 100644 filter/asyncStreamflt/asyncrdr.h create mode 100644 filter/include/StreamSourceflt.h create mode 100644 filter/lib/AsyncStreamflt.ax create mode 100644 filter/lib/register.bat create mode 100644 filter/lib/unregister.bat diff --git a/filter/asyncStreamflt/asyncflt.cpp b/filter/asyncStreamflt/asyncflt.cpp new file mode 100644 index 0000000000..433052e166 --- /dev/null +++ b/filter/asyncStreamflt/asyncflt.cpp @@ -0,0 +1,149 @@ +// A simple stream source filter based on the sample code +// It requires DirectShow BasicClass for compiling + +#include + +#include "asyncio.h" +#include "asyncrdr.h" + +#pragma warning(disable:4710) // 'function' not inlined (optimization) +#include "asyncflt.h" + +// +// Setup data for filter registration +// +const AMOVIESETUP_MEDIATYPE sudOpPinTypes = +{ &MEDIATYPE_Stream // clsMajorType +, &MEDIASUBTYPE_NULL }; // clsMinorType + +const AMOVIESETUP_PIN sudOpPin = +{ L"Output" // strName +, FALSE // bRendered +, TRUE // bOutput +, FALSE // bZero +, FALSE // bMany +, &CLSID_NULL // clsConnectsToFilter +, L"Input" // strConnectsToPin +, 1 // nTypes +, &sudOpPinTypes }; // lpTypes + +const AMOVIESETUP_FILTER sudAsync = +{ &CLSID_AsyncStreamSource // clsID +, L"Stream/File Source (Async.)" // strName +, MERIT_UNLIKELY // dwMerit +, 1 // nPins +, &sudOpPin }; // lpPin + + +// +// Object creation template +// +CFactoryTemplate g_Templates[1] = { + { L"Stream/File Source (Async.)" + , &CLSID_AsyncStreamSource + , CAsyncFilter::CreateInstance + , NULL + , &sudAsync } +}; + +int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]); + + +//////////////////////////////////////////////////////////////////////// +// +// Exported entry points for registration and unregistration +// (in this case they only call through to default implementations). +// +//////////////////////////////////////////////////////////////////////// + +STDAPI DllRegisterServer() +{ + return AMovieDllRegisterServer2(TRUE); +} + +STDAPI DllUnregisterServer() +{ + return AMovieDllRegisterServer2(FALSE); +} + +// +// DllEntryPoint +// +extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID); + +BOOL APIENTRY DllMain(HANDLE hModule, + DWORD dwReason, + LPVOID lpReserved) +{ + return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved); +} + + +//* Create a new instance of this class +CUnknown * WINAPI CAsyncFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *phr) +{ + ASSERT(phr); + + // DLLEntry does the right thing with the return code and + // the returned value on failure + + return new CAsyncFilter(pUnk, phr); +} + + +BOOL CAsyncFilter::ReadTheFile(LPCTSTR lpszFileName) +{ + DWORD dwBytesRead; + + // Open the requested file + HANDLE hFile = CreateFile(lpszFileName, + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + 0, + NULL); + if (hFile == INVALID_HANDLE_VALUE) + { + DbgLog((LOG_TRACE, 2, TEXT("Could not open %s\n"), lpszFileName)); + return FALSE; + } + + // Determine the file size + ULARGE_INTEGER uliSize; + uliSize.LowPart = GetFileSize(hFile, &uliSize.HighPart); + + PBYTE pbMem = new BYTE[uliSize.LowPart]; + if (pbMem == NULL) + { + CloseHandle(hFile); + return FALSE; + } + + // Read the data from the file + if (!ReadFile(hFile, + (LPVOID) pbMem, + uliSize.LowPart, + &dwBytesRead, + NULL) || + (dwBytesRead != uliSize.LowPart)) + { + DbgLog((LOG_TRACE, 1, TEXT("Could not read file\n"))); + + delete [] pbMem; + CloseHandle(hFile); + return FALSE; + } + + // Save a pointer to the data that was read from the file + if (m_pbData) + delete [] m_pbData; + m_pbData = pbMem; + m_llSize = (LONGLONG)uliSize.QuadPart; + + // Close the file + CloseHandle(hFile); + + return TRUE; +} + diff --git a/filter/asyncStreamflt/asyncflt.def b/filter/asyncStreamflt/asyncflt.def new file mode 100644 index 0000000000..b3ada7e395 --- /dev/null +++ b/filter/asyncStreamflt/asyncflt.def @@ -0,0 +1,13 @@ +;=========================================================================== +; Copyright (c) 1992-2002 Microsoft Corporation. All Rights Reserved. +;=========================================================================== + +LIBRARY AsyncStreamflt.ax + +EXPORTS + DllMain PRIVATE + DllGetClassObject PRIVATE + DllCanUnloadNow PRIVATE + DllRegisterServer PRIVATE + DllUnregisterServer PRIVATE + diff --git a/filter/asyncStreamflt/asyncflt.h b/filter/asyncStreamflt/asyncflt.h new file mode 100644 index 0000000000..d4deefdd4d --- /dev/null +++ b/filter/asyncStreamflt/asyncflt.h @@ -0,0 +1,305 @@ +// A simple stream source filter based on the sample code + +#include "StreamSourceflt.h" + +// NOTE: This filter does NOT support AVI format + +// +// Define an internal filter that wraps the base CBaseReader stuff +// + +class CMemStream : public CAsyncStream +{ +public: + CMemStream() : + m_llPosition(0) + { + } + + /* Initialization */ + void Init(LPBYTE pbData, LONGLONG llLength, DWORD dwKBPerSec = INFINITE) + { + m_pbData = pbData; + m_llLength = llLength; + m_dwKBPerSec = dwKBPerSec; + m_dwTimeStart = timeGetTime(); + m_llreadSize = llLength; + m_bisReadPassEnd = FALSE; + } + + HRESULT SetPointer(LONGLONG llPos) + { + if (llPos < 0 || llPos > m_llLength) { + return S_FALSE; + } else { + m_llPosition = llPos; + return S_OK; + } + } + + HRESULT Read(PBYTE pbBuffer, + DWORD dwBytesToRead, + BOOL bAlign, + LPDWORD pdwBytesRead) + { + CAutoLock lck(&m_csLock); + DWORD dwReadLength; + + /* Wait until the bytes are here! */ + DWORD dwTime = timeGetTime(); + + if (m_llPosition + dwBytesToRead > m_llLength) { + dwReadLength = (DWORD)(m_llLength - m_llPosition); + } else { + dwReadLength = dwBytesToRead; + } + DWORD dwTimeToArrive = + ((DWORD)m_llPosition + dwReadLength) / m_dwKBPerSec; + + if (dwTime - m_dwTimeStart < dwTimeToArrive) { + Sleep(dwTimeToArrive - dwTime + m_dwTimeStart); + } + + CopyMemory((PVOID)pbBuffer, (PVOID)(m_pbData + m_llPosition), + dwReadLength); + + m_llPosition += dwReadLength; + *pdwBytesRead = dwReadLength; + if (m_llPosition >= m_llreadSize) + m_bisReadPassEnd = TRUE; + else + m_bisReadPassEnd = FALSE; + return S_OK; + } + + LONGLONG Size(LONGLONG *pSizeAvailable) + { + LONGLONG llCurrentAvailable = + static_cast (UInt32x32To64((timeGetTime() - m_dwTimeStart),m_dwKBPerSec)); + + *pSizeAvailable = min(m_llLength, llCurrentAvailable); + return m_llLength; + } + + DWORD Alignment() + { + return 1; + } + + void Lock() + { + m_csLock.Lock(); + } + + void Unlock() + { + m_csLock.Unlock(); + } + +private: + CCritSec m_csLock; + PBYTE m_pbData; + LONGLONG m_llLength; + LONGLONG m_llPosition; + DWORD m_dwKBPerSec; + DWORD m_dwTimeStart; +public: + LONGLONG m_llreadSize; + BOOL m_bisReadPassEnd; +}; + +class CAsyncFilter : public CAsyncReader, public IStreamSourceFilter +{ +public: + CAsyncFilter(LPUNKNOWN pUnk, HRESULT *phr) : + CAsyncReader(NAME("Mem Reader"), pUnk, &m_Stream, phr), + m_pFileName(NULL), + m_pbData(NULL) + { + } + + ~CAsyncFilter() + { + delete [] m_pbData; + delete [] m_pFileName; + } + + static CUnknown * WINAPI CreateInstance(LPUNKNOWN, HRESULT *); + + DECLARE_IUNKNOWN + + STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv) + { + if (riid == IID_IStreamSourceFilter) { + return GetInterface((IStreamSourceFilter *)this, ppv); + } else if (riid == IID_IFileSourceFilter) { + return GetInterface((IFileSourceFilter *)this, ppv); + } else { + return CAsyncReader::NonDelegatingQueryInterface(riid, ppv); + } + } + + /* IFileSourceFilter methods */ + + // Load a (new) file + STDMETHODIMP Load(LPCOLESTR lpwszFileName, const AM_MEDIA_TYPE *pmt) + { + CheckPointer(lpwszFileName, E_POINTER); + + // lstrlenW is one of the few Unicode functions that works on win95 + int cch = lstrlenW(lpwszFileName) + 1; + +#ifndef UNICODE + TCHAR *lpszFileName=0; + lpszFileName = new char[cch * 2]; + if (!lpszFileName) { + return E_OUTOFMEMORY; + } + WideCharToMultiByte(GetACP(), 0, lpwszFileName, -1, + lpszFileName, cch, NULL, NULL); +#else + TCHAR lpszFileName[MAX_PATH]={0}; + (void)StringCchCopy(lpszFileName, NUMELMS(lpszFileName), lpwszFileName); +#endif + CAutoLock lck(&m_csFilter); + + /* Check the file type */ + CMediaType cmt; + if (NULL == pmt) { + cmt.SetType(&MEDIATYPE_Stream); + cmt.SetSubtype(&MEDIASUBTYPE_NULL); + } else { + cmt = *pmt; + } + + if (!ReadTheFile(lpszFileName)) { +#ifndef UNICODE + delete [] lpszFileName; +#endif + return E_FAIL; + } + + m_Stream.Init(m_pbData, m_llSize); + + if (m_pFileName) + delete [] m_pFileName; + m_pFileName = new WCHAR[cch]; + + if (m_pFileName!=NULL) + CopyMemory(m_pFileName, lpwszFileName, cch*sizeof(WCHAR)); + + // this is not a simple assignment... pointers and format + // block (if any) are intelligently copied + m_mt = cmt; + + /* Work out file type */ + cmt.bTemporalCompression = TRUE; //??? + cmt.lSampleSize = 1; + + return S_OK; + } + + // Modeled on IPersistFile::Load + // Caller needs to CoTaskMemFree or equivalent. + + STDMETHODIMP GetCurFile(LPOLESTR * ppszFileName, AM_MEDIA_TYPE *pmt) + { + CheckPointer(ppszFileName, E_POINTER); + *ppszFileName = NULL; + + if (m_pFileName!=NULL) { + DWORD n = sizeof(WCHAR)*(1+lstrlenW(m_pFileName)); + + *ppszFileName = (LPOLESTR) CoTaskMemAlloc( n ); + if (*ppszFileName!=NULL) { + CopyMemory(*ppszFileName, m_pFileName, n); + } + } + + if (pmt!=NULL) { + CopyMediaType(pmt, &m_mt); + } + + return NOERROR; + } + + STDMETHODIMP LoadStream(void *stream, LONGLONG readSize, LONGLONG streamSize, AM_MEDIA_TYPE *pmt ) + { + CAutoLock lck(&m_csFilter); + + /* Check the file type */ + CMediaType cmt; + if (NULL == pmt) { + cmt.SetType(&MEDIATYPE_Stream); + cmt.SetSubtype(&MEDIASUBTYPE_NULL); + } else { + cmt = *pmt; + } + + if (m_pFileName) + delete [] m_pFileName; + m_pFileName = NULL; + PBYTE pbMem = new BYTE[streamSize]; + if (pbMem == NULL) + return E_FAIL; + CopyMemory(pbMem, stream, readSize); + if (m_pbData) + delete [] m_pbData; + m_pbData = pbMem; + m_llSize = streamSize; + + m_Stream.Init(m_pbData, m_llSize); + m_Stream.m_llreadSize = readSize; + + // this is not a simple assignment... pointers and format + // block (if any) are intelligently copied + m_mt = cmt; + + /* Work out file type */ + cmt.bTemporalCompression = TRUE; //??? + cmt.lSampleSize = 1; + + return S_OK; + } + + STDMETHODIMP AddStreamData(LONGLONG offset, void *stream, LONGLONG addSize) + { + if (m_pbData == NULL) + return E_FAIL; + if (addSize > m_llSize - offset) + addSize = m_llSize - offset; + CopyMemory(m_pbData + offset, stream, addSize); + if (offset + addSize > m_Stream.m_llreadSize) + m_Stream.m_llreadSize = offset + addSize; + return S_OK; + } + + STDMETHODIMP GetStreamInfo(LONGLONG *readSize, LONGLONG *streamSize) + { + if (readSize) + *readSize = m_Stream.m_llreadSize; + if (streamSize) + *streamSize = m_llSize; + return S_OK; + } + + STDMETHODIMP SetReadSize(LONGLONG readSize) + { + m_Stream.m_llreadSize = readSize; + return S_OK; + } + + BOOL STDMETHODCALLTYPE IsReadPassEnd() + { + return m_Stream.m_bisReadPassEnd; + } + +private: + BOOL CAsyncFilter::ReadTheFile(LPCTSTR lpszFileName); + +private: + LPWSTR m_pFileName; + LONGLONG m_llSize; + PBYTE m_pbData; + CMemStream m_Stream; +}; diff --git a/filter/asyncStreamflt/asyncflt.rc b/filter/asyncStreamflt/asyncflt.rc new file mode 100644 index 0000000000..02ab017ddf --- /dev/null +++ b/filter/asyncStreamflt/asyncflt.rc @@ -0,0 +1,53 @@ +//==========================================================================; +// +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR +// PURPOSE. +// +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// +//--------------------------------------------------------------------------; + +#include + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 9,0,0,0 + PRODUCTVERSION 9,0,0,0 + FILEFLAGSMASK 0x30003fL +#ifdef _DEBUG + FILEFLAGS 0xbL +#else + FILEFLAGS 0xaL +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "ActiveMovie", "Filter dll" + VALUE "Comment", "Async Stream/File Source Filter" + VALUE "CompanyName", "NULL" + VALUE "FileDescription", "Stream/File Source (Async.)" + VALUE "FileVersion", "9.00" + VALUE "InternalName", "AsyncStreamflt.ax" + VALUE "LegalCopyright", "NULL" + VALUE "OLESelfRegister", "AM20" + VALUE "OriginalFilename", "AsyncStreamflt.ax" + VALUE "ProductName", "Async Stream/File Source Filter" + VALUE "ProductVersion", "9.00" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END \ No newline at end of file diff --git a/filter/asyncStreamflt/asyncflt.sln b/filter/asyncStreamflt/asyncflt.sln new file mode 100644 index 0000000000..323946fa5b --- /dev/null +++ b/filter/asyncStreamflt/asyncflt.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "async", "asyncflt.vcxproj", "{0413A576-4B1B-7294-5FA3-3F839282D877}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug Unicode|Win32 = Debug Unicode|Win32 + Debug|Win32 = Debug|Win32 + Release Unicode|Win32 = Release Unicode|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0413A576-4B1B-7294-5FA3-3F839282D877}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {0413A576-4B1B-7294-5FA3-3F839282D877}.Debug|Win32.ActiveCfg = Debug|Win32 + {0413A576-4B1B-7294-5FA3-3F839282D877}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {0413A576-4B1B-7294-5FA3-3F839282D877}.Release|Win32.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/filter/asyncStreamflt/asyncflt.vcxproj b/filter/asyncStreamflt/asyncflt.vcxproj new file mode 100644 index 0000000000..40a56890b7 --- /dev/null +++ b/filter/asyncStreamflt/asyncflt.vcxproj @@ -0,0 +1,305 @@ + + + + + Debug Unicode + Win32 + + + Debug + Win32 + + + Release Unicode + Win32 + + + Release + Win32 + + + + async + + + + + + DynamicLibrary + false + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + MultiByte + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\lib + .\Release\ + true + false + .\Debug_Unicode\ + .\Debug_Unicode\ + true + true + ..\lib + .\Release_Unicode\ + true + false + .\Debug\ + .\Debug\ + true + true + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + $(IncludePath) + $(LibraryPath) + $(IncludePath) + $(LibraryPath) + $(IncludePath) + $(LibraryPath) + $(IncludePath) + $(LibraryPath) + AsyncStreamflt.ax + AsyncStreamflt_u.ax + + + + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_USRDLL;ASYNC_EXPORTS;INC_OLE2;STRICT;_WIN32_WINNT=0x0403;WIN32;_WIN32;_MT;_DLL;_X86_=1;WINVER=0x0403;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + streams.h + .\Release/asyncflt.pch + .\Release/ + .\Release/ + .\Release/ + Level4 + true + StdCall + Default + + + /MACHINE:I386 /IGNORE:4089 /IGNORE:4098 %(AdditionalOptions) + strmbase.lib;quartz.lib;winmm.lib;msvcrt.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\lib\AsyncStreamflt.ax + true + %(AdditionalLibraryDirectories) + false + .\asyncflt.def + .\Release/asyncflt.pdb + + + true + .\Release/asyncflt.lib + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/asyncflt.tlb + + + NDEBUG;WIN32;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\BaseClasses;%(AdditionalIncludeDirectories) + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + INC_OLE2;STRICT;_WIN32_WINNT=0x0403;_WIN32;_MT;_DLL;_X86_=1;WINVER=0x0403;DBG=1;DEBUG;_DEBUG;WIN32;UNICODE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + streams.h + .\Debug_Unicode/asyncflt.pch + .\Debug_Unicode/ + .\Debug_Unicode/ + .\Debug_Unicode/ + Level4 + true + ProgramDatabase + StdCall + Default + + + /MACHINE:I386 /IGNORE:4089 /IGNORE:4098 %(AdditionalOptions) + strmbasd.lib;quartz.lib;winmm.lib;msvcrtd.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + Debug_Unicode/asyncflt.ax + true + %(AdditionalLibraryDirectories) + false + .\asyncflt.def + true + .\Debug_Unicode/asyncflt.lib + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug_Unicode/asyncflt.tlb + + + _DEBUG;WIN32;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\BaseClasses;%(AdditionalIncludeDirectories) + + + + + OnlyExplicitInline + ..\include;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_MBCS;_USRDLL;ASYNC_EXPORTS;INC_OLE2;STRICT;_WIN32_WINNT=0x0403;_WIN32;_MT;_DLL;_X86_=1;WINVER=0x0403;WIN32;UNICODE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + streams.h + .\Release_Unicode/asyncflt.pch + .\Release_Unicode/ + .\Release_Unicode/ + .\Release_Unicode/ + Level4 + true + StdCall + Default + + + /MACHINE:I386 /IGNORE:4089 /IGNORE:4098 %(AdditionalOptions) + strmbase.lib;quartz.lib;winmm.lib;msvcrt.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + Release_Unicode/asyncflt.ax + true + %(AdditionalLibraryDirectories) + false + .\asyncflt.def + .\Release_Unicode/asyncflt.pdb + + + true + .\Release_Unicode/asyncflt.lib + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release_Unicode/asyncflt.tlb + + + NDEBUG;WIN32;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\BaseClasses;%(AdditionalIncludeDirectories) + + + + + Disabled + ..\include;%(AdditionalIncludeDirectories) + INC_OLE2;STRICT;_WIN32_WINNT=0x0403;WIN32;_WIN32;_MT;_DLL;_X86_=1;WINVER=0x0403;DBG=1;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + streams.h + .\Debug/asyncflt.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level4 + true + ProgramDatabase + StdCall + Default + + + /MACHINE:I386 /IGNORE:4089 /IGNORE:4098 %(AdditionalOptions) + strmbasd.lib;quartz.lib;winmm.lib;msvcrtd.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + Debug/asyncflt.ax + true + %(AdditionalLibraryDirectories) + false + .\asyncflt.def + true + .\Debug/asyncflt.lib + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/asyncflt.tlb + + + _DEBUG;WIN32;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\BaseClasses;%(AdditionalIncludeDirectories) + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/filter/asyncStreamflt/asyncflt.vcxproj.filters b/filter/asyncStreamflt/asyncflt.vcxproj.filters new file mode 100644 index 0000000000..9cfe53cf50 --- /dev/null +++ b/filter/asyncStreamflt/asyncflt.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {2cb60d77-18ca-45ad-a4f3-0d736ca63aac} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {1aece6a2-e345-4279-81ae-993564c5b48a} + h;hpp;hxx;hm;inl + + + {56fe04f5-c6f6-43c9-95e2-a95245afadd0} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/filter/asyncStreamflt/asyncio.cpp b/filter/asyncStreamflt/asyncio.cpp new file mode 100644 index 0000000000..1532796d4a --- /dev/null +++ b/filter/asyncStreamflt/asyncio.cpp @@ -0,0 +1,708 @@ +//------------------------------------------------------------------------------ +// File: AsyncIo.cpp +// +// Desc: DirectShow sample code - base library with I/O functionality. +// +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#include +#include "asyncio.h" + +// --- CAsyncRequest --- + + +// implementation of CAsyncRequest representing a single +// outstanding request. All the i/o for this object is done +// in the Complete method. + + +// init the params for this request. +// Read is not issued until the complete call +HRESULT +CAsyncRequest::Request( + CAsyncIo *pIo, + CAsyncStream *pStream, + LONGLONG llPos, + LONG lLength, + BOOL bAligned, + BYTE* pBuffer, + LPVOID pContext, // filter's context + DWORD_PTR dwUser) // downstream filter's context +{ + m_pIo = pIo; + m_pStream = pStream; + m_llPos = llPos; + m_lLength = lLength; + m_bAligned = bAligned; + m_pBuffer = pBuffer; + m_pContext = pContext; + m_dwUser = dwUser; + m_hr = VFW_E_TIMEOUT; // not done yet + + return S_OK; +} + + +// issue the i/o if not overlapped, and block until i/o complete. +// returns error code of file i/o +// +// +HRESULT +CAsyncRequest::Complete() +{ + m_pStream->Lock(); + + m_hr = m_pStream->SetPointer(m_llPos); + if(S_OK == m_hr) + { + DWORD dwActual; + + m_hr = m_pStream->Read(m_pBuffer, m_lLength, m_bAligned, &dwActual); + if(m_hr == OLE_S_FIRST) + { + if(m_pContext) + { + IMediaSample *pSample = reinterpret_cast(m_pContext); + pSample->SetDiscontinuity(TRUE); + m_hr = S_OK; + } + } + + if(FAILED(m_hr)) + { + } + else if(dwActual != (DWORD)m_lLength) + { + // tell caller size changed - probably because of EOF + m_lLength = (LONG) dwActual; + m_hr = S_FALSE; + } + else + { + m_hr = S_OK; + } + } + + m_pStream->Unlock(); + return m_hr; +} + + +// --- CAsyncIo --- + +// note - all events created manual reset + +CAsyncIo::CAsyncIo(CAsyncStream *pStream) + : m_hThread(NULL), + m_evWork(TRUE), + m_evDone(TRUE), + m_evStop(TRUE), + m_listWork(NAME("Work list")), + m_listDone(NAME("Done list")), + m_bFlushing(FALSE), + m_cItemsOut(0), + m_bWaiting(FALSE), + m_pStream(pStream) +{ + +} + + +CAsyncIo::~CAsyncIo() +{ + // move everything to the done list + BeginFlush(); + + // shutdown worker thread + CloseThread(); + + // empty the done list + POSITION pos = m_listDone.GetHeadPosition(); + while(pos) + { + CAsyncRequest* pRequest = m_listDone.GetNext(pos); + delete pRequest; + } + + m_listDone.RemoveAll(); +} + + +// ready for async activity - call this before calling Request. +// +// start the worker thread if we need to +// +// !!! use overlapped i/o if possible +HRESULT +CAsyncIo::AsyncActive(void) +{ + return StartThread(); +} + +// call this when no more async activity will happen before +// the next AsyncActive call +// +// stop the worker thread if active +HRESULT +CAsyncIo::AsyncInactive(void) +{ + return CloseThread(); +} + + +// add a request to the queue. +HRESULT +CAsyncIo::Request( + LONGLONG llPos, + LONG lLength, + BOOL bAligned, + BYTE * pBuffer, + LPVOID pContext, + DWORD_PTR dwUser) +{ + if(bAligned) + { + if(!IsAligned(llPos) || + !IsAligned(lLength) || + !IsAligned((LONG_PTR) pBuffer)) + { + return VFW_E_BADALIGN; + } + } + + CAsyncRequest* pRequest = new CAsyncRequest; + if (!pRequest) + return E_OUTOFMEMORY; + + HRESULT hr = pRequest->Request(this, + m_pStream, + llPos, + lLength, + bAligned, + pBuffer, + pContext, + dwUser); + if(SUCCEEDED(hr)) + { + // might fail if flushing + hr = PutWorkItem(pRequest); + } + + if(FAILED(hr)) + { + delete pRequest; + } + + return hr; +} + + +// wait for the next request to complete +HRESULT +CAsyncIo::WaitForNext( + DWORD dwTimeout, + LPVOID * ppContext, + DWORD_PTR * pdwUser, + LONG * pcbActual) +{ + CheckPointer(ppContext,E_POINTER); + CheckPointer(pdwUser,E_POINTER); + CheckPointer(pcbActual,E_POINTER); + + // some errors find a sample, others don't. Ensure that + // *ppContext is NULL if no sample found + *ppContext = NULL; + + // wait until the event is set, but since we are not + // holding the critsec when waiting, we may need to re-wait + for(;;) + { + if(!m_evDone.Wait(dwTimeout)) + { + // timeout occurred + return VFW_E_TIMEOUT; + } + + // get next event from list + CAsyncRequest* pRequest = GetDoneItem(); + if(pRequest) + { + // found a completed request + + // check if ok + HRESULT hr = pRequest->GetHResult(); + if(hr == S_FALSE) + { + // this means the actual length was less than + // requested - may be ok if he aligned the end of file + if((pRequest->GetActualLength() + + pRequest->GetStart()) == Size()) + { + hr = S_OK; + } + else + { + // it was an actual read error + hr = E_FAIL; + } + } + + // return actual bytes read + *pcbActual = pRequest->GetActualLength(); + + // return his context + *ppContext = pRequest->GetContext(); + *pdwUser = pRequest->GetUser(); + + delete pRequest; + return hr; + } + else + { + // Hold the critical section while checking the list state + CAutoLock lck(&m_csLists); + if(m_bFlushing && !m_bWaiting) + { + // can't block as we are between BeginFlush and EndFlush + + // but note that if m_bWaiting is set, then there are some + // items not yet complete that we should block for. + + return VFW_E_WRONG_STATE; + } + } + + // done item was grabbed between completion and + // us locking m_csLists. + } +} + + +// perform a synchronous read request on this thread. +// Need to hold m_csFile while doing this (done in request object) +HRESULT +CAsyncIo::SyncReadAligned( + LONGLONG llPos, + LONG lLength, + BYTE * pBuffer, + LONG * pcbActual, + PVOID pvContext) +{ + CheckPointer(pcbActual,E_POINTER); + + if(!IsAligned(llPos) || + !IsAligned(lLength) || + !IsAligned((LONG_PTR) pBuffer)) + { + return VFW_E_BADALIGN; + } + + CAsyncRequest request; + + HRESULT hr = request.Request(this, + m_pStream, + llPos, + lLength, + TRUE, + pBuffer, + pvContext, + 0); + if(FAILED(hr)) + return hr; + + hr = request.Complete(); + + // return actual data length + *pcbActual = request.GetActualLength(); + return hr; +} + + +HRESULT +CAsyncIo::Length(LONGLONG *pllTotal, LONGLONG *pllAvailable) +{ + CheckPointer(pllTotal,E_POINTER); + + *pllTotal = m_pStream->Size(pllAvailable); + return S_OK; +} + + +// cancel all items on the worklist onto the done list +// and refuse further requests or further WaitForNext calls +// until the end flush +// +// WaitForNext must return with NULL only if there are no successful requests. +// So Flush does the following: +// 1. set m_bFlushing ensures no more requests succeed +// 2. move all items from work list to the done list. +// 3. If there are any outstanding requests, then we need to release the +// critsec to allow them to complete. The m_bWaiting as well as ensuring +// that we are signalled when they are all done is also used to indicate +// to WaitForNext that it should continue to block. +// 4. Once all outstanding requests are complete, we force m_evDone set and +// m_bFlushing set and m_bWaiting false. This ensures that WaitForNext will +// not block when the done list is empty. +HRESULT +CAsyncIo::BeginFlush() +{ + // hold the lock while emptying the work list + { + CAutoLock lock(&m_csLists); + + // prevent further requests being queued. + // Also WaitForNext will refuse to block if this is set + // unless m_bWaiting is also set which it will be when we release + // the critsec if there are any outstanding). + m_bFlushing = TRUE; + + CAsyncRequest * preq; + while((preq = GetWorkItem()) != 0) + { + preq->Cancel(); + PutDoneItem(preq); + } + + // now wait for any outstanding requests to complete + if(m_cItemsOut > 0) + { + // can be only one person waiting + ASSERT(!m_bWaiting); + + // this tells the completion routine that we need to be + // signalled via m_evAllDone when all outstanding items are + // done. It also tells WaitForNext to continue blocking. + m_bWaiting = TRUE; + } + else + { + // all done + + // force m_evDone set so that even if list is empty, + // WaitForNext will not block + // don't do this until we are sure that all + // requests are on the done list. + m_evDone.Set(); + return S_OK; + } + } + + ASSERT(m_bWaiting); + + // wait without holding critsec + for(;;) + { + m_evAllDone.Wait(); + { + // hold critsec to check + CAutoLock lock(&m_csLists); + + if(m_cItemsOut == 0) + { + // now we are sure that all outstanding requests are on + // the done list and no more will be accepted + m_bWaiting = FALSE; + + // force m_evDone set so that even if list is empty, + // WaitForNext will not block + // don't do this until we are sure that all + // requests are on the done list. + m_evDone.Set(); + + return S_OK; + } + } + } +} + + +// end a flushing state +HRESULT +CAsyncIo::EndFlush() +{ + CAutoLock lock(&m_csLists); + + m_bFlushing = FALSE; + + ASSERT(!m_bWaiting); + + // m_evDone might have been set by BeginFlush - ensure it is + // set IFF m_listDone is non-empty + if(m_listDone.GetCount() > 0) + { + m_evDone.Set(); + } + else + { + m_evDone.Reset(); + } + + return S_OK; +} + + +// start the thread +HRESULT +CAsyncIo::StartThread(void) +{ + if(m_hThread) + { + return S_OK; + } + + // clear the stop event before starting + m_evStop.Reset(); + + DWORD dwThreadID; + m_hThread = CreateThread(NULL, + 0, + InitialThreadProc, + this, + 0, + &dwThreadID); + if(!m_hThread) + { + DWORD dwErr = GetLastError(); + return HRESULT_FROM_WIN32(dwErr); + } + + return S_OK; +} + + +// stop the thread and close the handle +HRESULT +CAsyncIo::CloseThread(void) +{ + // signal the thread-exit object + m_evStop.Set(); + + if(m_hThread) + { + WaitForSingleObject(m_hThread, INFINITE); + CloseHandle(m_hThread); + m_hThread = NULL; + } + + return S_OK; +} + + +// manage the list of requests. hold m_csLists and ensure +// that the (manual reset) event hevList is set when things on +// the list but reset when the list is empty. +// returns null if list empty +CAsyncRequest* +CAsyncIo::GetWorkItem() +{ + CAutoLock lck(&m_csLists); + CAsyncRequest * preq = m_listWork.RemoveHead(); + + // force event set correctly + if(m_listWork.GetCount() == 0) + { + m_evWork.Reset(); + } + + return preq; +} + + +// get an item from the done list +CAsyncRequest* +CAsyncIo::GetDoneItem() +{ + CAutoLock lock(&m_csLists); + CAsyncRequest * preq = m_listDone.RemoveHead(); + + // force event set correctly if list now empty + // or we're in the final stages of flushing + // Note that during flushing the way it's supposed to work is that + // everything is shoved on the Done list then the application is + // supposed to pull until it gets nothing more + // + // Thus we should not set m_evDone unconditionally until everything + // has moved to the done list which means we must wait until + // cItemsOut is 0 (which is guaranteed by m_bWaiting being TRUE). + + if(m_listDone.GetCount() == 0 && + (!m_bFlushing || m_bWaiting)) + { + m_evDone.Reset(); + } + + return preq; +} + + +// put an item on the work list - fail if bFlushing +HRESULT +CAsyncIo::PutWorkItem(CAsyncRequest* pRequest) +{ + CAutoLock lock(&m_csLists); + HRESULT hr; + + if(m_bFlushing) + { + hr = VFW_E_WRONG_STATE; + } + else if(m_listWork.AddTail(pRequest)) + { + // event should now be in a set state - force this + m_evWork.Set(); + + // start the thread now if not already started + hr = StartThread(); + + } + else + { + hr = E_OUTOFMEMORY; + } + + return(hr); +} + + +// put an item on the done list - ok to do this when +// flushing +HRESULT +CAsyncIo::PutDoneItem(CAsyncRequest* pRequest) +{ + ASSERT(CritCheckIn(&m_csLists)); + + if(m_listDone.AddTail(pRequest)) + { + // event should now be in a set state - force this + m_evDone.Set(); + return S_OK; + } + else + { + return E_OUTOFMEMORY; + } +} + + +// called on thread to process any active requests +void +CAsyncIo::ProcessRequests(void) +{ + // lock to get the item and increment the outstanding count + CAsyncRequest * preq = NULL; + + for(;;) + { + { + CAutoLock lock(&m_csLists); + + preq = GetWorkItem(); + if(preq == NULL) + { + // done + return; + } + + // one more item not on the done or work list + m_cItemsOut++; + + // release critsec + } + + preq->Complete(); + + // regain critsec to replace on done list + { + CAutoLock l(&m_csLists); + + PutDoneItem(preq); + + if(--m_cItemsOut == 0) + { + if(m_bWaiting) + m_evAllDone.Set(); + } + } + } +} + + +// the thread proc - assumes that DWORD thread param is the +// this pointer +DWORD +CAsyncIo::ThreadProc(void) +{ + HANDLE ahev[] = {m_evStop, m_evWork}; + + for(;;) + { + DWORD dw = WaitForMultipleObjects(2, + ahev, + FALSE, + INFINITE); + if(dw == WAIT_OBJECT_0+1) + { + // requests need processing + ProcessRequests(); + } + else + { + // any error or stop event - we should exit + return 0; + } + } +} + + +// perform a synchronous read request on this thread. +// may not be aligned - so we will have to buffer. +HRESULT +CAsyncIo::SyncRead( + LONGLONG llPos, + LONG lLength, + BYTE * pBuffer) +{ + if(IsAligned(llPos) && + IsAligned(lLength) && + IsAligned((LONG_PTR) pBuffer)) + { + LONG cbUnused; + return SyncReadAligned(llPos, lLength, pBuffer, &cbUnused, NULL); + } + + // not aligned with requirements - use buffered file handle. + //!!! might want to fix this to buffer the data ourselves? + + CAsyncRequest request; + + HRESULT hr = request.Request(this, + m_pStream, + llPos, + lLength, + FALSE, + pBuffer, + NULL, + 0); + + if(FAILED(hr)) + { + return hr; + } + + return request.Complete(); +} + + +// Return the alignment +HRESULT +CAsyncIo::Alignment(LONG *pAlignment) +{ + CheckPointer(pAlignment,E_POINTER); + + *pAlignment = Alignment(); + return S_OK; +} + + diff --git a/filter/asyncStreamflt/asyncio.h b/filter/asyncStreamflt/asyncio.h new file mode 100644 index 0000000000..a7b69d0682 --- /dev/null +++ b/filter/asyncStreamflt/asyncio.h @@ -0,0 +1,273 @@ +//------------------------------------------------------------------------------ +// File: AsyncIo.h +// +// Desc: DirectShow sample code - base library for I/O functionality. +// +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __ASYNCIO_H__ +#define __ASYNCIO_H__ + +// +// definition of CAsyncFile object that performs file access. It provides +// asynchronous, unbuffered, aligned reads from a file, using a worker thread +// on win95 and potentially overlapped i/o if available. + +// !!! Need to use real overlapped i/o if available +// currently only uses worker thread, not overlapped i/o + + +class CAsyncIo; +class CAsyncStream; + +// +// Model the stream we read from based on a file-like interface +// +class CAsyncStream +{ +public: + virtual ~CAsyncStream() {}; + virtual HRESULT SetPointer(LONGLONG llPos) = 0; + virtual HRESULT Read(PBYTE pbBuffer, + DWORD dwBytesToRead, + BOOL bAlign, + LPDWORD pdwBytesRead) = 0; + + virtual LONGLONG Size(LONGLONG *pSizeAvailable = NULL) = 0; + virtual DWORD Alignment() = 0; + virtual void Lock() = 0; + virtual void Unlock() = 0; + //virtual void SetStopHandle(HANDLE hevStop) {} +}; + +// represents a single request and performs the i/o. Can be called on either +// worker thread or app thread, but must hold pcsFile across file accesses. +// (ie across SetFilePointer/ReadFile pairs) +class CAsyncRequest +{ + CAsyncIo *m_pIo; + CAsyncStream *m_pStream; + LONGLONG m_llPos; + BOOL m_bAligned; + LONG m_lLength; + BYTE* m_pBuffer; + LPVOID m_pContext; + DWORD_PTR m_dwUser; + HRESULT m_hr; + +public: + // init the params for this request. Issue the i/o + // if overlapped i/o is possible. + HRESULT Request( + CAsyncIo *pIo, + CAsyncStream *pStream, + LONGLONG llPos, + LONG lLength, + BOOL bAligned, + BYTE* pBuffer, + LPVOID pContext, // filter's context + DWORD_PTR dwUser); // downstream filter's context + + // issue the i/o if not overlapped, and block until i/o complete. + // returns error code of file i/o + HRESULT Complete(); + + // cancels the i/o. blocks until i/o is no longer pending + HRESULT Cancel() + { + return S_OK; + }; + + // accessor functions + LPVOID GetContext() + { + return m_pContext; + }; + + DWORD_PTR GetUser() + { + return m_dwUser; + }; + + HRESULT GetHResult() { + return m_hr; + }; + + // we set m_lLength to the actual length + LONG GetActualLength() { + return m_lLength; + }; + + LONGLONG GetStart() { + return m_llPos; + }; +}; + + +typedef CGenericList CRequestList; + +// this class needs a worker thread, but the ones defined in classes\base +// are not suitable (they assume you have one message sent or posted per +// request, whereas here for efficiency we want just to set an event when +// there is work on the queue). +// +// we create CAsyncRequest objects and queue them on m_listWork. The worker +// thread pulls them off, completes them and puts them on m_listDone. +// The events m_evWork and m_evDone are set when the corresponding lists are +// not empty. +// +// Synchronous requests are done on the caller thread. These should be +// synchronised by the caller, but to make sure we hold m_csFile across +// the SetFilePointer/ReadFile code. +// +// Flush by calling BeginFlush. This rejects all further requests (by +// setting m_bFlushing within m_csLists), cancels all requests and moves them +// to the done list, and sets m_evDone to ensure that no WaitForNext operations +// will block. Call EndFlush to cancel this state. +// +// we support unaligned calls to SyncRead. This is done by opening the file +// twice if we are using unbuffered i/o (m_dwAlign > 1). +// !!!fix this to buffer on top of existing file handle? +class CAsyncIo +{ + + CCritSec m_csReader; + CAsyncStream *m_pStream; + + CCritSec m_csLists; // locks access to the list and events + BOOL m_bFlushing; // true if between BeginFlush/EndFlush + + CRequestList m_listWork; + CRequestList m_listDone; + + CAMEvent m_evWork; // set when list is not empty + CAMEvent m_evDone; + + // for correct flush behaviour: all protected by m_csLists + LONG m_cItemsOut; // nr of items not on listDone or listWork + BOOL m_bWaiting; // TRUE if someone waiting for m_evAllDone + CAMEvent m_evAllDone; // signal when m_cItemsOut goes to 0 if m_cWaiting + + + CAMEvent m_evStop; // set when thread should exit + HANDLE m_hThread; + + LONGLONG Size() { + ASSERT(m_pStream != NULL); + return m_pStream->Size(); + }; + + // start the thread + HRESULT StartThread(void); + + // stop the thread and close the handle + HRESULT CloseThread(void); + + // manage the list of requests. hold m_csLists and ensure + // that the (manual reset) event hevList is set when things on + // the list but reset when the list is empty. + // returns null if list empty + CAsyncRequest* GetWorkItem(); + + // get an item from the done list + CAsyncRequest* GetDoneItem(); + + // put an item on the work list + HRESULT PutWorkItem(CAsyncRequest* pRequest); + + // put an item on the done list + HRESULT PutDoneItem(CAsyncRequest* pRequest); + + // called on thread to process any active requests + void ProcessRequests(void); + + // initial static thread proc calls ThreadProc with DWORD + // param as this + static DWORD WINAPI InitialThreadProc(LPVOID pv) { + CAsyncIo * pThis = (CAsyncIo*) pv; + return pThis->ThreadProc(); + }; + + DWORD ThreadProc(void); + +public: + + CAsyncIo(CAsyncStream *pStream); + ~CAsyncIo(); + + // open the file + HRESULT Open(LPCTSTR pName); + + // ready for async activity - call this before + // calling Request + HRESULT AsyncActive(void); + + // call this when no more async activity will happen before + // the next AsyncActive call + HRESULT AsyncInactive(void); + + // queue a requested read. must be aligned. + HRESULT Request( + LONGLONG llPos, + LONG lLength, + BOOL bAligned, + BYTE* pBuffer, + LPVOID pContext, + DWORD_PTR dwUser); + + // wait for the next read to complete + HRESULT WaitForNext( + DWORD dwTimeout, + LPVOID *ppContext, + DWORD_PTR * pdwUser, + LONG * pcbActual); + + // perform a read of an already aligned buffer + HRESULT SyncReadAligned( + LONGLONG llPos, + LONG lLength, + BYTE* pBuffer, + LONG* pcbActual, + PVOID pvContext); + + // perform a synchronous read. will be buffered + // if not aligned. + HRESULT SyncRead( + LONGLONG llPos, + LONG lLength, + BYTE* pBuffer); + + // return length + HRESULT Length(LONGLONG *pllTotal, LONGLONG* pllAvailable); + + // all Reader positions, read lengths and memory locations must + // be aligned to this. + HRESULT Alignment(LONG* pl); + + HRESULT BeginFlush(); + HRESULT EndFlush(); + + LONG Alignment() + { + return m_pStream->Alignment(); + }; + + BOOL IsAligned(LONG l) { + if ((l & (Alignment() -1)) == 0) { + return TRUE; + } else { + return FALSE; + } + }; + + BOOL IsAligned(LONGLONG ll) { + return IsAligned( (LONG) (ll & 0xffffffff)); + }; + + // Accessor + HANDLE StopEvent() const { return m_evDone; } +}; + +#endif // __ASYNCIO_H__ diff --git a/filter/asyncStreamflt/asyncrdr.cpp b/filter/asyncStreamflt/asyncrdr.cpp new file mode 100644 index 0000000000..a9061512d6 --- /dev/null +++ b/filter/asyncStreamflt/asyncrdr.cpp @@ -0,0 +1,436 @@ +//------------------------------------------------------------------------------ +// File: AsyncRdr.cpp +// +// Desc: DirectShow sample code - base library with I/O functionality. +// This file implements I/O source filter methods and output pin +// methods for CAsyncReader and CAsyncOutputPin. +// +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#include +#include "asyncio.h" +#include "asyncrdr.h" + +#include + +#include "asyncflt.h" + +// --- CAsyncOutputPin implementation --- + +CAsyncOutputPin::CAsyncOutputPin( + HRESULT * phr, + CAsyncReader *pReader, + CAsyncIo *pIo, + CCritSec * pLock) + : CBasePin( + NAME("Async output pin"), + pReader, + pLock, + phr, + L"Output", + PINDIR_OUTPUT), + m_pReader(pReader), + m_pIo(pIo) +{ +} + +CAsyncOutputPin::~CAsyncOutputPin() +{ +} + + +STDMETHODIMP CAsyncOutputPin::NonDelegatingQueryInterface(REFIID riid, void** ppv) +{ + CheckPointer(ppv,E_POINTER); + + if(riid == IID_IAsyncReader) + { + m_bQueriedForAsyncReader = TRUE; + return GetInterface((IAsyncReader*) this, ppv); + } + else + { + return CBasePin::NonDelegatingQueryInterface(riid, ppv); + } +} + + +HRESULT CAsyncOutputPin::GetMediaType(int iPosition, CMediaType *pMediaType) +{ + if(iPosition < 0) + { + return E_INVALIDARG; + } + if(iPosition > 0) + { + return VFW_S_NO_MORE_ITEMS; + } + + CheckPointer(pMediaType,E_POINTER); + CheckPointer(m_pReader,E_UNEXPECTED); + + *pMediaType = *m_pReader->LoadType(); + + return S_OK; +} + + +HRESULT CAsyncOutputPin::CheckMediaType(const CMediaType* pType) +{ + CAutoLock lck(m_pLock); + + /* We treat MEDIASUBTYPE_NULL subtype as a wild card */ + if((m_pReader->LoadType()->majortype == pType->majortype) && + (m_pReader->LoadType()->subtype == MEDIASUBTYPE_NULL || + m_pReader->LoadType()->subtype == pType->subtype)) + { + return S_OK; + } + + return S_FALSE; +} + + +HRESULT CAsyncOutputPin::InitAllocator(IMemAllocator **ppAlloc) +{ + CheckPointer(ppAlloc,E_POINTER); + + HRESULT hr = NOERROR; + CMemAllocator *pMemObject = NULL; + + *ppAlloc = NULL; + + /* Create a default memory allocator */ + pMemObject = new CMemAllocator(NAME("Base memory allocator"), NULL, &hr); + if(pMemObject == NULL) + { + return E_OUTOFMEMORY; + } + if(FAILED(hr)) + { + delete pMemObject; + return hr; + } + + /* Get a reference counted IID_IMemAllocator interface */ + hr = pMemObject->QueryInterface(IID_IMemAllocator,(void **)ppAlloc); + if(FAILED(hr)) + { + delete pMemObject; + return E_NOINTERFACE; + } + + ASSERT(*ppAlloc != NULL); + return NOERROR; +} + + +// we need to return an addrefed allocator, even if it is the preferred +// one, since he doesn't know whether it is the preferred one or not. +STDMETHODIMP +CAsyncOutputPin::RequestAllocator( + IMemAllocator* pPreferred, + ALLOCATOR_PROPERTIES* pProps, + IMemAllocator ** ppActual) +{ + CheckPointer(pPreferred,E_POINTER); + CheckPointer(pProps,E_POINTER); + CheckPointer(ppActual,E_POINTER); + ASSERT(m_pIo); + + // we care about alignment but nothing else + if(!pProps->cbAlign || !m_pIo->IsAligned(pProps->cbAlign)) + { + m_pIo->Alignment(&pProps->cbAlign); + } + + ALLOCATOR_PROPERTIES Actual; + HRESULT hr; + + if(pPreferred) + { + hr = pPreferred->SetProperties(pProps, &Actual); + + if(SUCCEEDED(hr) && m_pIo->IsAligned(Actual.cbAlign)) + { + pPreferred->AddRef(); + *ppActual = pPreferred; + return S_OK; + } + } + + // create our own allocator + IMemAllocator* pAlloc; + hr = InitAllocator(&pAlloc); + if(FAILED(hr)) + { + return hr; + } + + //...and see if we can make it suitable + hr = pAlloc->SetProperties(pProps, &Actual); + if(SUCCEEDED(hr) && m_pIo->IsAligned(Actual.cbAlign)) + { + // we need to release our refcount on pAlloc, and addref + // it to pass a refcount to the caller - this is a net nothing. + *ppActual = pAlloc; + return S_OK; + } + + // failed to find a suitable allocator + pAlloc->Release(); + + // if we failed because of the IsAligned test, the error code will + // not be failure + if(SUCCEEDED(hr)) + { + hr = VFW_E_BADALIGN; + } + return hr; +} + + +// queue an aligned read request. call WaitForNext to get +// completion. +STDMETHODIMP CAsyncOutputPin::Request( + IMediaSample* pSample, + DWORD_PTR dwUser) // user context +{ + CheckPointer(pSample,E_POINTER); + + REFERENCE_TIME tStart, tStop; + HRESULT hr = pSample->GetTime(&tStart, &tStop); + if(FAILED(hr)) + { + return hr; + } + + LONGLONG llPos = tStart / UNITS; + LONG lLength = (LONG) ((tStop - tStart) / UNITS); + + LONGLONG llTotal=0, llAvailable=0; + + hr = m_pIo->Length(&llTotal, &llAvailable); + if(llPos + lLength > llTotal) + { + // the end needs to be aligned, but may have been aligned + // on a coarser alignment. + LONG lAlign; + m_pIo->Alignment(&lAlign); + + llTotal = (llTotal + lAlign -1) & ~(lAlign-1); + + if(llPos + lLength > llTotal) + { + lLength = (LONG) (llTotal - llPos); + + // must be reducing this! + ASSERT((llTotal * UNITS) <= tStop); + tStop = llTotal * UNITS; + pSample->SetTime(&tStart, &tStop); + } + } + + BYTE* pBuffer; + hr = pSample->GetPointer(&pBuffer); + if(FAILED(hr)) + { + return hr; + } + + return m_pIo->Request(llPos, + lLength, + TRUE, + pBuffer, + (LPVOID)pSample, + dwUser); +} + + +// sync-aligned request. just like a request/waitfornext pair. +STDMETHODIMP +CAsyncOutputPin::SyncReadAligned( + IMediaSample* pSample) +{ + CheckPointer(pSample,E_POINTER); + + REFERENCE_TIME tStart, tStop; + HRESULT hr = pSample->GetTime(&tStart, &tStop); + if(FAILED(hr)) + { + return hr; + } + + LONGLONG llPos = tStart / UNITS; + LONG lLength = (LONG) ((tStop - tStart) / UNITS); + + LONGLONG llTotal; + LONGLONG llAvailable; + + hr = m_pIo->Length(&llTotal, &llAvailable); + if(llPos + lLength > llTotal) + { + // the end needs to be aligned, but may have been aligned + // on a coarser alignment. + LONG lAlign; + m_pIo->Alignment(&lAlign); + + llTotal = (llTotal + lAlign -1) & ~(lAlign-1); + + if(llPos + lLength > llTotal) + { + lLength = (LONG) (llTotal - llPos); + + // must be reducing this! + ASSERT((llTotal * UNITS) <= tStop); + tStop = llTotal * UNITS; + pSample->SetTime(&tStart, &tStop); + } + } + + BYTE* pBuffer; + hr = pSample->GetPointer(&pBuffer); + if(FAILED(hr)) + { + return hr; + } + + LONG cbActual; + hr = m_pIo->SyncReadAligned(llPos, + lLength, + pBuffer, + &cbActual, + pSample); + + pSample->SetActualDataLength(cbActual); + return hr; +} + + +// +// collect the next ready sample +STDMETHODIMP +CAsyncOutputPin::WaitForNext( + DWORD dwTimeout, + IMediaSample** ppSample, // completed sample + DWORD_PTR * pdwUser) // user context +{ + CheckPointer(ppSample,E_POINTER); + + LONG cbActual; + IMediaSample* pSample=0; + + HRESULT hr = m_pIo->WaitForNext(dwTimeout, + (LPVOID*) &pSample, + pdwUser, + &cbActual); + + if(SUCCEEDED(hr)) + { + pSample->SetActualDataLength(cbActual); + } + + *ppSample = pSample; + return hr; +} + + +// +// synchronous read that need not be aligned. +STDMETHODIMP +CAsyncOutputPin::SyncRead( + LONGLONG llPosition, // absolute Io position + LONG lLength, // nr bytes required + BYTE* pBuffer) // write data here +{ + return m_pIo->SyncRead(llPosition, lLength, pBuffer); +} + + +// return the length of the file, and the length currently +// available locally. We only support locally accessible files, +// so they are always the same +STDMETHODIMP +CAsyncOutputPin::Length( + LONGLONG* pTotal, + LONGLONG* pAvailable) +{ + return m_pIo->Length(pTotal, pAvailable); +} + + +STDMETHODIMP +CAsyncOutputPin::BeginFlush(void) +{ + return m_pIo->BeginFlush(); +} + + +STDMETHODIMP +CAsyncOutputPin::EndFlush(void) +{ + return m_pIo->EndFlush(); +} + + +STDMETHODIMP +CAsyncOutputPin::Connect( + IPin * pReceivePin, + const AM_MEDIA_TYPE *pmt // optional media type +) +{ + return m_pReader->Connect(pReceivePin, pmt); +} + + + +// --- CAsyncReader implementation --- + +#pragma warning(disable:4355) + +CAsyncReader::CAsyncReader( + TCHAR *pName, + LPUNKNOWN pUnk, + CAsyncStream *pStream, + HRESULT *phr) + : CBaseFilter( + pName, + pUnk, + &m_csFilter, + CLSID_AsyncStreamSource, + NULL + ), + m_OutputPin( + phr, + this, + &m_Io, + &m_csFilter), + m_Io(pStream) +{ +} + +CAsyncReader::~CAsyncReader() +{ +} + +int CAsyncReader::GetPinCount() +{ + return 1; +} + +CBasePin * CAsyncReader::GetPin(int n) +{ + if((GetPinCount() > 0) && (n == 0)) + { + return &m_OutputPin; + } + else + { + return NULL; + } +} + + + diff --git a/filter/asyncStreamflt/asyncrdr.h b/filter/asyncStreamflt/asyncrdr.h new file mode 100644 index 0000000000..11f57c3cd6 --- /dev/null +++ b/filter/asyncStreamflt/asyncrdr.h @@ -0,0 +1,228 @@ +//------------------------------------------------------------------------------ +// File: AsyncRdr.h +// +// Desc: DirectShow sample code - base library for I/O functionality. +// +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __ASYNCRDR_H__ +#define __ASYNCRDR_H__ + + +// +// AsyncRdr +// +// Defines an IO source filter. +// +// This filter (CAsyncReader) supports IBaseFilter and IFileSourceFilter interfaces from the +// filter object itself. It has a single output pin (CAsyncOutputPin) +// which supports IPin and IAsyncReader. +// +// This filter is essentially a wrapper for the CAsyncFile class that does +// all the work. +// + + +// the filter class (defined below) +class CAsyncReader; + + +// the output pin class +class CAsyncOutputPin + : public IAsyncReader, + public CBasePin +{ +protected: + CAsyncReader* m_pReader; + CAsyncIo * m_pIo; + + // This is set every time we're asked to return an IAsyncReader + // interface + // This allows us to know if the downstream pin can use + // this transport, otherwise we can hook up to thinks like the + // dump filter and nothing happens + BOOL m_bQueriedForAsyncReader; + + HRESULT InitAllocator(IMemAllocator **ppAlloc); + +public: + // constructor and destructor + CAsyncOutputPin( + HRESULT * phr, + CAsyncReader *pReader, + CAsyncIo *pIo, + CCritSec * pLock); + + ~CAsyncOutputPin(); + + // --- CUnknown --- + + // need to expose IAsyncReader + DECLARE_IUNKNOWN + STDMETHODIMP NonDelegatingQueryInterface(REFIID, void**); + + // --- IPin methods --- + STDMETHODIMP Connect( + IPin * pReceivePin, + const AM_MEDIA_TYPE *pmt // optional media type + ); + + // --- CBasePin methods --- + + // return the types we prefer - this will return the known + // file type + HRESULT GetMediaType(int iPosition, CMediaType *pMediaType); + + // can we support this type? + HRESULT CheckMediaType(const CMediaType* pType); + + // Clear the flag so we see if IAsyncReader is queried for + HRESULT CheckConnect(IPin *pPin) + { + m_bQueriedForAsyncReader = FALSE; + return CBasePin::CheckConnect(pPin); + } + + // See if it was asked for + HRESULT CompleteConnect(IPin *pReceivePin) + { + if (m_bQueriedForAsyncReader) { + return CBasePin::CompleteConnect(pReceivePin); + } else { + +#ifdef VFW_E_NO_TRANSPORT + return VFW_E_NO_TRANSPORT; +#else + return E_FAIL; +#endif + } + } + + // Remove our connection status + HRESULT BreakConnect() + { + m_bQueriedForAsyncReader = FALSE; + return CBasePin::BreakConnect(); + } + + // --- IAsyncReader methods --- + // pass in your preferred allocator and your preferred properties. + // method returns the actual allocator to be used. Call GetProperties + // on returned allocator to learn alignment and prefix etc chosen. + // this allocator will be not be committed and decommitted by + // the async reader, only by the consumer. + STDMETHODIMP RequestAllocator( + IMemAllocator* pPreferred, + ALLOCATOR_PROPERTIES* pProps, + IMemAllocator ** ppActual); + + // queue a request for data. + // media sample start and stop times contain the requested absolute + // byte position (start inclusive, stop exclusive). + // may fail if sample not obtained from agreed allocator. + // may fail if start/stop position does not match agreed alignment. + // samples allocated from source pin's allocator may fail + // GetPointer until after returning from WaitForNext. + STDMETHODIMP Request( + IMediaSample* pSample, + DWORD_PTR dwUser); // user context + + // block until the next sample is completed or the timeout occurs. + // timeout (millisecs) may be 0 or INFINITE. Samples may not + // be delivered in order. If there is a read error of any sort, a + // notification will already have been sent by the source filter, + // and STDMETHODIMP will be an error. + STDMETHODIMP WaitForNext( + DWORD dwTimeout, + IMediaSample** ppSample, // completed sample + DWORD_PTR * pdwUser); // user context + + // sync read of data. Sample passed in must have been acquired from + // the agreed allocator. Start and stop position must be aligned. + // equivalent to a Request/WaitForNext pair, but may avoid the + // need for a thread on the source filter. + STDMETHODIMP SyncReadAligned( + IMediaSample* pSample); + + + // sync read. works in stopped state as well as run state. + // need not be aligned. Will fail if read is beyond actual total + // length. + STDMETHODIMP SyncRead( + LONGLONG llPosition, // absolute file position + LONG lLength, // nr bytes required + BYTE* pBuffer); // write data here + + // return total length of stream, and currently available length. + // reads for beyond the available length but within the total length will + // normally succeed but may block for a long period. + STDMETHODIMP Length( + LONGLONG* pTotal, + LONGLONG* pAvailable); + + // cause all outstanding reads to return, possibly with a failure code + // (VFW_E_TIMEOUT) indicating they were cancelled. + // these are defined on IAsyncReader and IPin + STDMETHODIMP BeginFlush(void); + STDMETHODIMP EndFlush(void); + +}; + + +// +// The filter object itself. Supports IBaseFilter through +// CBaseFilter and also IFileSourceFilter directly in this object + +class CAsyncReader : public CBaseFilter +{ + +protected: + // filter-wide lock + CCritSec m_csFilter; + + // all i/o done here + CAsyncIo m_Io; + + // our output pin + CAsyncOutputPin m_OutputPin; + + // Type we think our data is + CMediaType m_mt; + +public: + + // construction / destruction + + CAsyncReader( + TCHAR *pName, + LPUNKNOWN pUnk, + CAsyncStream *pStream, + HRESULT *phr); + + ~CAsyncReader(); + + + // --- CBaseFilter methods --- + int GetPinCount(); + CBasePin *GetPin(int n); + + // --- Access our media type + const CMediaType *LoadType() const + { + return &m_mt; + } + + virtual HRESULT Connect( + IPin * pReceivePin, + const AM_MEDIA_TYPE *pmt // optional media type + ) + { + return m_OutputPin.CBasePin::Connect(pReceivePin, pmt); + } +}; + + + +#endif //__ASYNCRDR_H__ diff --git a/filter/include/StreamSourceflt.h b/filter/include/StreamSourceflt.h new file mode 100644 index 0000000000..326d3735be --- /dev/null +++ b/filter/include/StreamSourceflt.h @@ -0,0 +1,26 @@ +// This is a header file for the stream/file source filter + +#ifndef __ASYNC_STREAMSOURCE_H__ +#define __ASYNC_STREAMSOURCE_H__ + +// {2AE44C10-B451-4B01-9BBE-A5FBEF68C9D4} +DEFINE_GUID(CLSID_AsyncStreamSource, +0x2ae44c10, 0xb451, 0x4b01, 0x9b, 0xbe, 0xa5, 0xfb, 0xef, 0x68, 0xc9, 0xd4); + +// {268424D1-B6E9-4B28-8751-B7774F5ECF77} +DEFINE_GUID(IID_IStreamSourceFilter, +0x268424d1, 0xb6e9, 0x4b28, 0x87, 0x51, 0xb7, 0x77, 0x4f, 0x5e, 0xcf, 0x77); + +// We define the interface the app can use to program us +MIDL_INTERFACE("268424D1-B6E9-4B28-8751-B7774F5ECF77") +IStreamSourceFilter : public IFileSourceFilter +{ +public: + virtual STDMETHODIMP LoadStream(void *stream, LONGLONG readSize, LONGLONG streamSize, AM_MEDIA_TYPE *pmt ) = 0; + virtual STDMETHODIMP AddStreamData(LONGLONG offset, void *stream, LONGLONG addSize) = 0; + virtual STDMETHODIMP GetStreamInfo(LONGLONG *readSize, LONGLONG *streamSize) = 0; + virtual STDMETHODIMP SetReadSize(LONGLONG readSize) = 0; + virtual BOOL STDMETHODCALLTYPE IsReadPassEnd() = 0; +}; + +#endif // __ASYNC_STREAMSOURCE_H__ \ No newline at end of file diff --git a/filter/lib/AsyncStreamflt.ax b/filter/lib/AsyncStreamflt.ax new file mode 100644 index 0000000000000000000000000000000000000000..744e7237b167cf6dae6b900ff9efea749164bbed GIT binary patch literal 49152 zcmeFae|%KM)jxidY{CKy*~kW0jW%k)C@I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7bf6?#R0{uO+WPZ%5uY^M0E5dfrIhpY!7K4f&tTzbSt? z=(9S1ZT^OQPyRsuck+LnAIQJjQf~RG2tX70U9u#m?lSXf9f#KJ7P5F){13n3CL zgjh)810h>TkR)g2@zSJCxBdfH=X~EcNAv^o3Hh9SMZO__kuZHhqx5a+(=TY7eoKF% zKht07@AMD)H%&9b411qt*@rC8K4K*#q|4SUft{J~-}pQ55`KhN;M-r?KOiOVIxn5i zobQ}poEJigPeorW#h>Cm`LX<3elK6ix7??tvV(hFm0B#qqAbSZEWwg!X_{T&(=zz1 z96qbS%B;e!*$u0*8mqGg8qj1d)KOK$ij&+sh2;yJ8mffsp+mwAO>^BZ2} zHD2cpe#@J@#oN5YyZFhce8%T|!5{dFula^=`Ht`Tfj{yiKk*QR!NRIVAqH`5TM|-` zh6^A_wFCo~SmrEtCQM>JQoGzB4hu+>h183-roH24eb!N`W zSvwnN>+GDpb8sG=qjPdXA}lNs5mBT*E)vLnN~Do|A^@E?;!n07>Ti%h^d%~xmX|-D^ZjsS(P=}lr7nj z138gX`5>2aB{%XYEjQvO+$2^u?OwRV1y{NT-O9LG^egA)-GW*CTh~=!emU=l+2B( znwn{tuDLTKGsfm`%+~D8-aML!7xmJf^o)1uWxbMD_Uc~CYkNJf?~S~%H}@9a+S_g!k(lw~sa1;0E$Yj^so_)S^k6q6YVo9L>`Ty~ewwL2qdjTXIhabViqS zMc4E|A8D9bXXoSSIp9`M#GaJTcK_>j|LpP#-QAzx!=}tDnt!@@aAQXNS&2?UfvX zP0^Vh`f@~9Ec7IfhGfu)0`h;0tk1;*vc190;UJD8BrO@k{lUnLypjc^y@9;9Gcs_yW6ZpSR;2$xGfxiF% literal 0 HcmV?d00001 diff --git a/filter/lib/register.bat b/filter/lib/register.bat new file mode 100644 index 0000000000..b71d0863a6 --- /dev/null +++ b/filter/lib/register.bat @@ -0,0 +1 @@ +@regsvr32 AsyncStreamflt.ax \ No newline at end of file diff --git a/filter/lib/unregister.bat b/filter/lib/unregister.bat new file mode 100644 index 0000000000..76bb89e792 --- /dev/null +++ b/filter/lib/unregister.bat @@ -0,0 +1 @@ +@regsvr32 /u AsyncStreamflt.ax \ No newline at end of file