本文整理汇总了C++中CInterfaceList类的典型用法代码示例。如果您正苦于以下问题:C++ CInterfaceList类的具体用法?C++ CInterfaceList怎么用?C++ CInterfaceList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CInterfaceList类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool CMpeg2DecSettingsWnd::OnConnect(const CInterfaceList<IUnknown, &IID_IUnknown>& pUnks)
{
ASSERT(!m_pM2DF);
m_pM2DF.Release();
POSITION pos = pUnks.GetHeadPosition();
while (pos && !(m_pM2DF = pUnks.GetNext(pos))) {
;
}
if (!m_pM2DF) {
return false;
}
m_ditype = m_pM2DF->GetDeinterlaceMethod();
m_procamp[0] = m_pM2DF->GetBrightness();
m_procamp[1] = m_pM2DF->GetContrast();
m_procamp[2] = m_pM2DF->GetHue();
m_procamp[3] = m_pM2DF->GetSaturation();
m_forcedsubs = m_pM2DF->IsForcedSubtitlesEnabled();
m_planaryuv = m_pM2DF->IsPlanarYUVEnabled();
m_interlaced = m_pM2DF->IsInterlacedEnabled();
m_readARFromStream = m_pM2DF->IsReadARFromStreamEnabled();
return true;
}
示例2: OnConnect
bool CMpaDecSettingsWnd::OnConnect(const CInterfaceList<IUnknown, &IID_IUnknown>& pUnks)
{
ASSERT(!m_pMDF);
m_pMDF.Release();
POSITION pos = pUnks.GetHeadPosition();
while(pos && !(m_pMDF = pUnks.GetNext(pos))) {
;
}
if(!m_pMDF) {
return false;
}
m_outputformat = m_pMDF->GetSampleFormat();
m_ac3spkcfg = m_pMDF->GetSpeakerConfig(IMpaDecFilter::ac3);
m_ac3drc = m_pMDF->GetDynamicRangeControl(IMpaDecFilter::ac3);
m_dtsspkcfg = m_pMDF->GetSpeakerConfig(IMpaDecFilter::dts);
m_dtsdrc = m_pMDF->GetDynamicRangeControl(IMpaDecFilter::dts);
m_aacdownmix = !!m_pMDF->GetSpeakerConfig(IMpaDecFilter::aac);
m_ddmode = m_pMDF->GetDolbyDigitalMode();
return true;
}
示例3: OnConnect
bool CMpaDecSettingsWnd::OnConnect(const CInterfaceList<IUnknown, &IID_IUnknown>& pUnks)
{
ASSERT(!m_pMDF);
m_pMDF.Release();
POSITION pos = pUnks.GetHeadPosition();
while (pos && !(m_pMDF = pUnks.GetNext(pos))) {
;
}
if (!m_pMDF) {
return false;
}
m_outfmt_i16 = m_pMDF->GetSampleFormat(SF_PCM16);
m_outfmt_i24 = m_pMDF->GetSampleFormat(SF_PCM24);
m_outfmt_i32 = m_pMDF->GetSampleFormat(SF_PCM32);
m_outfmt_flt = m_pMDF->GetSampleFormat(SF_FLOAT);
m_mixer = m_pMDF->GetMixer();
m_mixer_layout = m_pMDF->GetMixerLayout();
m_drc = m_pMDF->GetDynamicRangeControl();
m_spdif_ac3 = m_pMDF->GetSPDIF(IMpaDecFilter::ac3);
m_spdif_dts = m_pMDF->GetSPDIF(IMpaDecFilter::dts);
m_spdif_dtshd = m_pMDF->GetSPDIF(IMpaDecFilter::dtshd);
return true;
}
示例4: OnConnect
bool CMPCVideoDecSettingsWnd::OnConnect(const CInterfaceList<IUnknown, &IID_IUnknown>& pUnks)
{
ASSERT(!m_pMDF);
m_pMDF.Release();
POSITION pos = pUnks.GetHeadPosition();
while(pos && !(m_pMDF = pUnks.GetNext(pos)));
if(!m_pMDF) return false;
return true;
}
示例5: OnConnect
bool CMpcAudioRendererSettingsWnd::OnConnect(const CInterfaceList<IUnknown, &IID_IUnknown>& pUnks)
{
ASSERT(!m_pMAR);
m_pMAR.Release();
POSITION pos = pUnks.GetHeadPosition();
while (pos && !(m_pMAR = pUnks.GetNext(pos))) {
;
}
if (!m_pMAR) {
return false;
}
return true;
}
示例6: OnConnect
bool CAviSplitterSettingsWnd::OnConnect(const CInterfaceList<IUnknown, &IID_IUnknown>& pUnks)
{
ASSERT(!m_pMSF);
m_pMSF.Release();
POSITION pos = pUnks.GetHeadPosition();
while (pos && !(m_pMSF = pUnks.GetNext(pos))) {
;
}
if (!m_pMSF) {
return false;
}
return true;
}
示例7: Muxer
void CDSMMuxerFilter::MuxHeader(IBitStream* pBS)
{
CString muxer;
muxer.Format(_T("DSM Muxer (%s)"), CString(__TIMESTAMP__));
SetProperty(L"MUXR", CStringW(muxer));
SetProperty(L"DATE", CStringW(CTime::GetCurrentTime().FormatGmt(_T("%Y-%m-%d %H:%M:%S"))));
MuxFileInfo(pBS);
POSITION pos = m_pPins.GetHeadPosition();
while (pos) {
CBaseMuxerInputPin* pPin = m_pPins.GetNext(pos);
const CMediaType& mt = pPin->CurrentMediaType();
ASSERT((mt.lSampleSize >> 30) == 0); // you don't need >1GB samples, do you?
MuxPacketHeader(pBS, DSMP_MEDIATYPE, 5 + sizeof(GUID) * 3 + mt.FormatLength());
pBS->BitWrite(pPin->GetID(), 8);
pBS->ByteWrite(&mt.majortype, sizeof(mt.majortype));
pBS->ByteWrite(&mt.subtype, sizeof(mt.subtype));
pBS->BitWrite(mt.bFixedSizeSamples, 1);
pBS->BitWrite(mt.bTemporalCompression, 1);
pBS->BitWrite(mt.lSampleSize, 30);
pBS->ByteWrite(&mt.formattype, sizeof(mt.formattype));
pBS->ByteWrite(mt.Format(), mt.FormatLength());
MuxStreamInfo(pBS, pPin);
}
// resources & chapters
CInterfaceList<IDSMResourceBag> pRBs;
pRBs.AddTail(this);
CComQIPtr<IDSMChapterBag> pCB = (IUnknown*)(INonDelegatingUnknown*)this;
pos = m_pPins.GetHeadPosition();
while (pos) {
for (CComPtr<IPin> pPin = m_pPins.GetNext(pos)->GetConnected(); pPin; pPin = GetUpStreamPin(GetFilterFromPin(pPin))) {
if (m_fAutoRes) {
CComQIPtr<IDSMResourceBag> pPB = GetFilterFromPin(pPin);
if (pPB && !pRBs.Find(pPB)) {
pRBs.AddTail(pPB);
}
}
if (m_fAutoChap) {
if (!pCB || pCB->ChapGetCount() == 0) {
pCB = GetFilterFromPin(pPin);
}
}
}
}
// resources
pos = pRBs.GetHeadPosition();
while (pos) {
IDSMResourceBag* pRB = pRBs.GetNext(pos);
for (DWORD i = 0, j = pRB->ResGetCount(); i < j; i++) {
CComBSTR name, desc, mime;
BYTE* pData = NULL;
DWORD len = 0;
if (SUCCEEDED(pRB->ResGet(i, &name, &desc, &mime, &pData, &len, NULL))) {
CStringA utf8_name = UTF16To8(name);
CStringA utf8_desc = UTF16To8(desc);
CStringA utf8_mime = UTF16To8(mime);
MuxPacketHeader(pBS, DSMP_RESOURCE,
1 +
utf8_name.GetLength() + 1 +
utf8_desc.GetLength() + 1 +
utf8_mime.GetLength() + 1 +
len);
pBS->BitWrite(0, 2);
pBS->BitWrite(0, 6); // reserved
pBS->ByteWrite(utf8_name, utf8_name.GetLength() + 1);
pBS->ByteWrite(utf8_desc, utf8_desc.GetLength() + 1);
pBS->ByteWrite(utf8_mime, utf8_mime.GetLength() + 1);
pBS->ByteWrite(pData, len);
CoTaskMemFree(pData);
}
}
}
// chapters
if (pCB) {
CAtlList<CDSMChapter> chapters;
REFERENCE_TIME rtPrev = 0;
int len = 0;
pCB->ChapSort();
for (DWORD i = 0; i < pCB->ChapGetCount(); i++) {
CDSMChapter c;
//.........这里部分代码省略.........