 |
AJA NTV2 SDK
18.0.0.2717
NTV2 SDK 18.0.0.2717
|
Go to the documentation of this file.
30 #define WIDTH(x) ((*(x)).right - (*(x)).left)
31 #define HEIGHT(x) ((*(x)).bottom - (*(x)).top)
32 #define SHOWSTAGE TEXT("WM_SHOWSTAGE")
33 #define SHOWSTAGETOP TEXT("WM_SHOWSTAGETOP")
34 #define REALIZEPALETTE TEXT("WM_REALIZEPALETTE")
66 friend LRESULT CALLBACK
WndProc(HWND hwnd,
71 virtual LRESULT OnPaletteChange(HWND hwnd, UINT Message);
75 CBaseWindow(BOOL bDoGetDC = TRUE,
bool bPostToDestroy =
false);
81 virtual HRESULT DoneWithWindow();
82 virtual HRESULT PrepareWindow();
83 virtual HRESULT InactivateWindow();
84 virtual HRESULT ActivateWindow();
85 virtual BOOL OnSize(LONG Width, LONG Height);
86 virtual BOOL OnClose();
87 virtual RECT GetDefaultRect();
88 virtual HRESULT UninitialiseWindow();
89 virtual HRESULT InitialiseWindow(HWND hwnd);
91 HRESULT CompleteConnect();
92 HRESULT DoCreateWindow();
94 HRESULT PerformanceAlignWindow();
95 HRESULT DoShowWindow(LONG ShowCmd);
96 void PaintWindow(BOOL bErase);
97 void DoSetWindowForeground(BOOL bFocus);
98 virtual HRESULT SetPalette(HPALETTE hPalette);
101 m_bNoRealize = !bRealize;
105 HRESULT SetPalette();
106 void UnsetPalette(
void);
107 virtual HRESULT DoRealisePalette(BOOL bForceBackground = FALSE);
109 void LockPaletteLock();
110 void UnlockPaletteLock();
118 LONG GetWindowWidth();
119 LONG GetWindowHeight();
120 HWND GetWindowHWND();
125 HPALETTE GetPalette();
130 virtual LRESULT OnReceiveMessage(HWND hwnd,
137 virtual LPTSTR GetClassWindowStyles(
138 __out DWORD *pClassStyles,
139 __out DWORD *pWindowStyles,
140 __out DWORD *pWindowStylesEx) PURE;
191 BOOL
DrawImage(IMediaSample *pMediaSample);
193 __in LPRECT lprcSrc, __in LPRECT lprcDst);
260 __in_opt LPCTSTR
pName,
261 __inout HRESULT *phr,
262 __in_bcount(length) LPBYTE pBuffer,
294 STDMETHODIMP
CheckSizes(__in ALLOCATOR_PROPERTIES *pRequest);
313 __in ALLOCATOR_PROPERTIES *pRequest,
314 __out ALLOCATOR_PROPERTIES *pActual);
346 static HPALETTE
MakePalette(
const VIDEOINFOHEADER *pVideoInfo, __in LPSTR szDevice);
348 static HRESULT
MakeIdentityPalette(__inout_ecount_full(iColours) PALETTEENTRY *pEntry,INT iColours, __in LPSTR szDevice);
350 BOOL
ShouldUpdate(
const VIDEOINFOHEADER *pNewInfo,
const VIDEOINFOHEADER *pOldInfo);
353 BOOL
DrawVideoImageHere(HDC hdc, IMediaSample *pMediaSample, __in LPRECT lprcSrc, __in LPRECT lprcDst)
402 const DWORD *
GetBitMasks(
const VIDEOINFO *pVideoInfo);
405 __out DWORD *pMaskGreen,
406 __out DWORD *pMaskBlue);
418 #endif // __WINUTIL__
void GetTargetRect(__out RECT *pTargetRect)
void SetRealize(BOOL bRealize)
virtual RECT ScaleSourceRect(const RECT *pSource)
HRESULT CreateDIB(LONG InSize, DIBDATA &DibData)
virtual CImageSample * CreateImageSample(__in_bcount(Length) LPBYTE pData, LONG Length)
const COLORREF VIDEO_COLOUR
void IncrementPaletteVersion()
HRESULT CheckVideoType(const VIDEOINFO *pInput)
const DWORD * GetBitMasks(const VIDEOINFO *pVideoInfo)
STDMETHODIMP SetProperties(__in ALLOCATOR_PROPERTIES *pRequest, __out ALLOCATOR_PROPERTIES *pActual)
static HPALETTE MakePalette(const VIDEOINFOHEADER *pVideoInfo, __in LPSTR szDevice)
CImagePalette(__inout CBaseFilter *pBaseFilter, __inout CBaseWindow *pBaseWindow, __inout CDrawImage *pDrawImage)
void GetSourceRect(__out RECT *pSourceRect)
CMediaType * m_pMediaType
const VIDEOINFO * GetDisplayFormat()
BOOL GetColourMask(__out DWORD *pMaskRed, __out DWORD *pMaskGreen, __out DWORD *pMaskBlue)
__out DIBDATA * GetDIBData()
HRESULT CopyPalette(const CMediaType *pSrc, __out CMediaType *pDest)
HRESULT RefreshDisplayType(__in_opt LPSTR szDeviceName)
STDAPI CheckVideoInfoType(const AM_MEDIA_TYPE *pmt)
void SetSourceRect(__in RECT *pSourceRect)
static DWORD CountSetBits(const DWORD Field)
BOOL ShouldUpdate(const VIDEOINFOHEADER *pNewInfo, const VIDEOINFOHEADER *pOldInfo)
CDrawImage * m_pDrawImage
LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL DrawVideoImageHere(HDC hdc, IMediaSample *pMediaSample, __in LPRECT lprcSrc, __in LPRECT lprcDst)
CDrawImage(__inout CBaseWindow *pBaseWindow)
static BOOL CheckPaletteHeader(const VIDEOINFO *pInput)
STDMETHODIMP_(ULONG) NonDelegatingAddRef()
CMediaType * m_pMediaType
HRESULT PreparePalette(const CMediaType *pmtNew, const CMediaType *pmtOld, __in LPSTR szDevice)
HRESULT CheckMediaType(const CMediaType *pmtIn)
static BOOL CheckBitFields(const VIDEOINFO *pInput)
STDAPI ConvertVideoInfoToVideoInfo2(__inout AM_MEDIA_TYPE *pmt)
virtual BOOL PossiblyEatMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
CImageAllocator(__inout CBaseFilter *pFilter, __in_opt LPCTSTR pName, __inout HRESULT *phr)
CBaseWindow * m_pBaseWindow
void SetDIBData(__in DIBDATA *pDibData)
void NotifyMediaType(__in CMediaType *pMediaType)
void UpdateColourTable(HDC hdc, __in BITMAPINFOHEADER *pbmi)
HRESULT UpdateFormat(__inout VIDEOINFO *pVideoInfo)
void ResetPaletteVersion()
void DisplaySampleTimes(IMediaSample *pSample)
ULONG(__stdcall *_RegisterTraceGuids)(__in IN WMIDPREQUEST RequestAddress
static HRESULT MakeIdentityPalette(__inout_ecount_full(iColours) PALETTEENTRY *pEntry, INT iColours, __in LPSTR szDevice)
STDMETHODIMP CheckSizes(__in ALLOCATOR_PROPERTIES *pRequest)
static BOOL CheckHeaderValidity(const VIDEOINFO *pInput)
BOOL m_bUsingImageAllocator
void NotifyAllocator(BOOL bUsingImageAllocator)
void SetTargetRect(__in RECT *pTargetRect)
BOOL DrawImage(IMediaSample *pMediaSample)
CImageSample(__inout CBaseAllocator *pAllocator, __in_opt LPCTSTR pName, __inout HRESULT *phr, __in_bcount(length) LPBYTE pBuffer, LONG length)
const LONG PALETTE_VERSION
void NotifyMediaType(__in CMediaType *pMediaType)
static DWORD CountPrefixBits(const DWORD Field)
struct tagDIBDATA DIBDATA
STDAPI CheckVideoInfo2Type(const AM_MEDIA_TYPE *pmt)
void FastRender(IMediaSample *pMediaSample)
void SlowRender(IMediaSample *pMediaSample)
CBaseWindow * m_pBaseWindow
BOOL UsingImageAllocator()
BOOL DrawVideoImageHere(HDC hdc, IMediaSample *pMediaSample, __in LPRECT lprcSrc, __in LPRECT lprcDst)