www.pudn.com > SetText.rar > ShowCameraName.h
// ShowCameraname.h
// Define new GUID CLSID_SetText
// {A5EFF4DE-434C-4a78-B5FB-B2B1D4155998}
DEFINE_GUID(CLSID_SetText,
0xa5eff4de, 0x434c, 0x4a78, 0xb5, 0xfb, 0xb2, 0xb1, 0xd4, 0x15, 0x59, 0x98);
class CShowText : public CTransInPlaceFilter,
public ISetText,
public ISetColor
{
public:
static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
DECLARE_IUNKNOWN;
HRESULT Transform(IMediaSample *pSample);
HRESULT CheckInputType(const CMediaType *mtIn);
HRESULT SetMediaType( PIN_DIRECTION pindir, const CMediaType *pMediaType);
int GetPinCount();
CBasePin *GetPin(IN int Index);
STDMETHODIMP SetCameraName(char *CameraName);
STDMETHODIMP SetMotion(bool bMotion);
STDMETHODIMP SetSchedule(bool bSchedule);
STDMETHODIMP SetShowTime(bool bShowTime);
STDMETHODIMP SetShowCameraName(bool bShowCameraName);
STDMETHODIMP SetBrightness(int BrightnessValue);
private:
CShowText(LPUNKNOWN punk, HRESULT *phr);
~CShowText();
void IncreateBrightness(RGBTRIPLE *pBufferBrightness);
void DecreaseBrightness(RGBTRIPLE *pBufferBrightness);
int m_nWidth;
int m_nHeight;
HBITMAP m_DibSection;
HDC m_DC;
void * m_pDibBits;
HGDIOBJ m_OldObject;
HBRUSH m_hBrushMotion;
HBRUSH m_hBrushSchedule;
bool m_bMotion;
bool m_bSchedule;
bool m_bShowTime;
bool m_bShowCameraName;
char m_CameraName[256];
CCritSec m_ShowTextLock;
int m_BrightnessValue;
int ChageBrightState;
char *ImageStore;
};