windows-nt/Source/XPSP1/NT/multimedia/dshow/vidctl/ccimpl.h

47 lines
1.2 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
//==========================================================================;
//
// closedcaptioningimpl.h : additional infrastructure to support implementing IMSVidClosedCaptionings
// nicely from c++
// Copyright (c) Microsoft Corporation 1999.
//
/////////////////////////////////////////////////////////////////////////////
#pragma once
#ifndef CLOSEDCAPTIONINGIMPL_H
#define CLOSEDCAPTIONINGIMPL_H
#include "featureimpl.h"
namespace MSVideoControl {
template<class T, LPCGUID LibID, LPCGUID KSCategory, class MostDerivedInterface = IMSVidClosedCaptioning>
class DECLSPEC_NOVTABLE IMSVidClosedCaptioningImpl : public IMSVidFeatureImpl<T, LibID, KSCategory, MostDerivedInterface> {
public:
IMSVidClosedCaptioningImpl() : m_fCCEnable(false) {}
bool m_fCCEnable;
STDMETHOD(put_Enable)(VARIANT_BOOL fEnable) {
m_fCCEnable = (fEnable == VARIANT_TRUE);
return NOERROR;
}
STDMETHOD(get_Enable)(VARIANT_BOOL *pfEnable) {
if (!pfEnable) {
return E_POINTER;
}
try {
*pfEnable = m_fCCEnable ? VARIANT_TRUE : VARIANT_FALSE;
return NOERROR;
} catch(...) {
return E_POINTER;
}
}
};
}; /// namespace
#endif
// end of file - closedcaptioningimpl.h