diff options
| author | Peihsun Yeh <[email protected]> | 2018-08-01 17:14:16 -0700 |
|---|---|---|
| committer | Peihsun Yeh <[email protected]> | 2018-08-01 17:14:16 -0700 |
| commit | 58a4f43a0c75285c30ce4806d011553ebc3f563d (patch) | |
| tree | b05a73141f86e504f44a01ef95cb9df66564d9ea /general/SimpleMediaSource/MediaSource/stdafx.h | |
| parent | edcb51e041d612e3fb8a0c0a9135d989c881ccc9 (diff) | |
fix up of media source
Diffstat (limited to 'general/SimpleMediaSource/MediaSource/stdafx.h')
| -rw-r--r-- | general/SimpleMediaSource/MediaSource/stdafx.h | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/general/SimpleMediaSource/MediaSource/stdafx.h b/general/SimpleMediaSource/MediaSource/stdafx.h index 4702e47e..73bec0b4 100644 --- a/general/SimpleMediaSource/MediaSource/stdafx.h +++ b/general/SimpleMediaSource/MediaSource/stdafx.h @@ -7,12 +7,12 @@ // Windows Header Files: #include <windows.h> -#include <minwindef.h> -#include <ks.h> #include <propvarutil.h> //#include <mfstd.h> // Must be included before <initguid.h>, or else DirectDraw GUIDs will be defined twice. See the comment in <uuids.h>. #include <ole2.h> #include <initguid.h> +#include <ks.h> +#include <ksmedia.h> #include <mfapi.h> #include <mferror.h> #include <mfidl.h> @@ -21,7 +21,56 @@ #include <winmeta.h> #include <wrl.h> #include <d3d9types.h> -#include <ksmedia.h> using namespace Microsoft::WRL; -using namespace Microsoft::WRL::Wrappers;
\ No newline at end of file +using namespace Microsoft::WRL::Wrappers; + +#if !defined(_IKsControl_) +#define _IKsControl_ +interface DECLSPEC_UUID("28F54685-06FD-11D2-B27A-00A0C9223196") IKsControl; +#undef INTERFACE +#define INTERFACE IKsControl +DECLARE_INTERFACE_(IKsControl, IUnknown) +{ + STDMETHOD(KsProperty)( + THIS_ + IN PKSPROPERTY Property, + IN ULONG PropertyLength, + IN OUT LPVOID PropertyData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + STDMETHOD(KsMethod)( + THIS_ + IN PKSMETHOD Method, + IN ULONG MethodLength, + IN OUT LPVOID MethodData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + STDMETHOD(KsEvent)( + THIS_ + IN PKSEVENT Event OPTIONAL, + IN ULONG EventLength, + IN OUT LPVOID EventData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; +}; +#endif // _IKsControl_ + +#include "SimpleMediaStream.h" +#include "SimpleMediaSource.h" + + +// Basic macros to handle HRESULT checks. +// Recommend adding implementation specific logging within the failure case. +#ifndef RETURN_IF_FAILED +#define RETURN_IF_FAILED( val ) \ + hr = (val); \ + if ( FAILED( hr ) ) \ + { \ + return hr; \ + } +#endif + |
