123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- /*
- * Copyright 2004 Christian Costa
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
- import "unknwn.idl";
- import "mmstream.idl";
- import "strmif.idl";
- cpp_quote("#include <ddraw.h>")
- cpp_quote("#include <mmsystem.h>")
- cpp_quote("#include <mmstream.h>")
- cpp_quote("#include <ddstream.h>")
- cpp_quote("#include <austream.h>")
- cpp_quote("#if 0")
- interface IDirectDraw;
- interface IDirectDrawSurface;
- cpp_quote("#endif")
- interface IAMMultiMediaStream;
- interface IAMMediaStream;
- interface IMediaStreamFilter;
- interface IAMMediaTypeStream;
- interface IAMMediaTypeSample;
- enum {
- AMMSF_NOGRAPHTHREAD = 0x00000001
- };
- enum {
- AMMSF_ADDDEFAULTRENDERER = 0x00000001,
- AMMSF_CREATEPEER = 0x00000002,
- AMMSF_STOPIFNOSAMPLES = 0x00000004,
- AMMSF_NOSTALL = 0x00000008
- };
- enum {
- AMMSF_RENDERTYPEMASK = 0x00000003,
- AMMSF_RENDERTOEXISTING = 0x00000000,
- AMMSF_RENDERALLSTREAMS = 0x00000001,
- AMMSF_NORENDER = 0x00000002,
- AMMSF_NOCLOCK = 0x00000004,
- AMMSF_RUN = 0x00000008
- };
- typedef [v1_enum] enum {
- Disabled = 0,
- ReadData = 1,
- RenderData = 2
- } OUTPUT_STATE;
- [
- object,
- uuid(7DB01C96-C0C3-11d0-8FF1-00C04FD9189D),
- dual,
- helpstring("IDirectShowStream Interface"),
- pointer_default(unique)
- ]
- interface IDirectShowStream : IDispatch
- {
- [propget, id(1), helpstring("property FileName")] HRESULT FileName([out, retval] BSTR *pVal);
- [propput, id(1), helpstring("property FileName")] HRESULT FileName([in] BSTR newVal);
- [propget, id(2), helpstring("property Video")] HRESULT Video([out, retval] OUTPUT_STATE *pVal);
- [propput, id(2), helpstring("property Video")] HRESULT Video([in] OUTPUT_STATE newVal);
- [propget, id(3), helpstring("property Audio")] HRESULT Audio([out, retval] OUTPUT_STATE *pVal);
- [propput, id(3), helpstring("property Audio")] HRESULT Audio([in] OUTPUT_STATE newVal);
- }
- [
- object,
- uuid(BEBE595C-9A6F-11d0-8FDE-00C04FD9189D),
- pointer_default(unique)
- ]
- interface IAMMultiMediaStream : IMultiMediaStream
- {
- HRESULT Initialize(
- [in] STREAM_TYPE StreamType,
- [in] DWORD dwFlags,
- [in] IGraphBuilder *pFilterGraph);
- HRESULT GetFilterGraph(
- [out] IGraphBuilder **ppGraphBuilder);
- HRESULT GetFilter(
- [out] IMediaStreamFilter **ppFilter);
- HRESULT AddMediaStream(
- [in] IUnknown *pStreamObject,
- [in] const MSPID *PurposeId,
- [in] DWORD dwFlags,
- [out] IMediaStream **ppNewStream);
- HRESULT OpenFile(
- [in] LPCWSTR pszFileName,
- [in] DWORD dwFlags);
- HRESULT OpenMoniker(
- [in] IBindCtx *pCtx,
- [in] IMoniker *pMoniker,
- [in] DWORD dwFlags);
- HRESULT Render(
- [in] DWORD dwFlags);
- }
- [
- object,
- uuid(BEBE595D-9A6F-11d0-8FDE-00C04FD9189D),
- pointer_default(unique)
- ]
- interface IAMMediaStream : IMediaStream
- {
- HRESULT Initialize(
- [in] IUnknown *pSourceObject,
- [in] DWORD dwFlags,
- [in] REFMSPID PurposeId,
- [in] const STREAM_TYPE StreamType);
- HRESULT SetState(
- [in] FILTER_STATE State);
- HRESULT JoinAMMultiMediaStream(
- [in] IAMMultiMediaStream *pAMMultiMediaStream);
- HRESULT JoinFilter(
- [in] IMediaStreamFilter *pMediaStreamFilter);
- HRESULT JoinFilterGraph(
- [in] IFilterGraph *pFilterGraph);
- }
- [
- object,
- local,
- uuid(BEBE595E-9A6F-11d0-8FDE-00C04FD9189D),
- pointer_default(unique)
- ]
- interface IMediaStreamFilter : IBaseFilter
- {
- HRESULT AddMediaStream(
- [in] IAMMediaStream *pAMMediaStream);
- HRESULT GetMediaStream(
- [in] REFMSPID idPurpose,
- [out] IMediaStream **ppMediaStream);
- HRESULT EnumMediaStreams(
- [in] long Index,
- [out] IMediaStream **ppMediaStream);
- HRESULT SupportSeeking(
- [in] BOOL bRenderer);
- HRESULT ReferenceTimeToStreamTime(
- [in] [out] REFERENCE_TIME *pTime);
- HRESULT GetCurrentStreamTime(
- [out] REFERENCE_TIME *pCurrentStreamTime);
- HRESULT WaitUntil(
- [in] REFERENCE_TIME WaitStreamTime);
- HRESULT Flush(
- [in] BOOL bCancelEOS);
- HRESULT EndOfStream();
- }
- [
- object,
- local,
- uuid(AB6B4AFC-F6E4-11d0-900D-00C04FD9189D),
- pointer_default(unique)
- ]
- interface IDirectDrawMediaSampleAllocator : IUnknown
- {
- HRESULT GetDirectDraw(IDirectDraw **ppDirectDraw);
- }
- [
- object,
- local,
- uuid(AB6B4AFE-F6E4-11d0-900D-00C04FD9189D),
- pointer_default(unique)
- ]
- interface IDirectDrawMediaSample : IUnknown
- {
- HRESULT GetSurfaceAndReleaseLock(
- [out] IDirectDrawSurface **ppDirectDrawSurface,
- [out] RECT * pRect);
- HRESULT LockMediaSamplePointer(void);
- }
- [
- object,
- local,
- uuid(AB6B4AFA-F6E4-11d0-900D-00C04FD9189D),
- pointer_default(unique)
- ]
- interface IAMMediaTypeStream : IMediaStream
- {
- HRESULT GetFormat(
- [out] AM_MEDIA_TYPE * pMediaType,
- [in] DWORD dwFlags);
- HRESULT SetFormat(
- [in] AM_MEDIA_TYPE * pMediaType,
- [in] DWORD dwFlags);
- HRESULT CreateSample(
- [in] long lSampleSize,
- [in] BYTE * pbBuffer,
- [in] DWORD dwFlags,
- [in] IUnknown *pUnkOuter,
- [out] IAMMediaTypeSample ** ppAMMediaTypeSample);
- HRESULT GetStreamAllocatorRequirements(
- [out] ALLOCATOR_PROPERTIES *pProps);
- HRESULT SetStreamAllocatorRequirements(
- [in] ALLOCATOR_PROPERTIES *pProps);
- }
- [
- object,
- local,
- uuid(AB6B4AFB-F6E4-11d0-900D-00C04FD9189D),
- pointer_default(unique)
- ]
- interface IAMMediaTypeSample : IStreamSample
- {
- HRESULT SetPointer(
- [in] BYTE *pBuffer,
- [in] long lSize);
- HRESULT GetPointer(
- [out] BYTE ** ppBuffer);
- long GetSize(void);
- HRESULT GetTime(
- [out] REFERENCE_TIME * pTimeStart,
- [out] REFERENCE_TIME * pTimeEnd);
- HRESULT SetTime(
- [in] REFERENCE_TIME * pTimeStart,
- [in] REFERENCE_TIME * pTimeEnd);
- HRESULT IsSyncPoint(void);
- HRESULT SetSyncPoint(
- BOOL bIsSyncPoint);
- HRESULT IsPreroll(void);
- HRESULT SetPreroll(
- BOOL bIsPreroll);
- long GetActualDataLength(void);
- HRESULT SetActualDataLength(long Len);
- HRESULT GetMediaType(
- AM_MEDIA_TYPE **ppMediaType);
- HRESULT SetMediaType(
- AM_MEDIA_TYPE *pMediaType);
- HRESULT IsDiscontinuity(void);
- HRESULT SetDiscontinuity(
- BOOL bDiscontinuity);
- HRESULT GetMediaTime(
- [out] LONGLONG * pTimeStart,
- [out] LONGLONG * pTimeEnd);
- HRESULT SetMediaTime(
- [in] LONGLONG * pTimeStart,
- [in] LONGLONG * pTimeEnd);
- }
- [
- uuid(49C47CE5-9BA4-11d0-8212-00C04FC32C45)
- ]
- coclass AMMultiMediaStream
- {
- [default] dispinterface IDirectShowStream;
- }
- cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
- cpp_quote("DEFINE_GUID(CLSID_AMAudioStream, 0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
- cpp_quote("DEFINE_GUID(CLSID_AMAudioData, 0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
- cpp_quote("DEFINE_GUID(CLSID_AMMediaTypeStream, 0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0x0d, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
- cpp_quote("DEFINE_GUID(CLSID_MediaStreamFilter, 0x49c47ce0, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
|