IMMDevice::Activate and specifying IID_IBaseFilter as the interface identifier

本文介绍如何使用IMMDevice指针激活DirectShow音频流API并准备进行流传输。通过调用IMMDevice::Activate并指定IID_IBaseFilter作为接口标识来创建DirectShow COM对象。然后利用此COM对象构建DirectShow过滤器图表。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Use the IMMDevice pointer to the endpoint returned by the enumeration process to activate the desired audio streaming API and prepare for streaming. Different audio APIs require slightly different preparation.
For DShow audio applications:
Create a DirectShow COM object by calling IMMDevice::Activate and specifying IID_IBaseFilter as the interface identifier.

IUnknown *pDShowFilter = NULL;
...
hr = pDevice->Activate (
                  IID_IBaseFilter,
                  CLSCTX_INPROC_SERVER, NULL,
                  reinterpret_cast<void **>(&pDShowFilter));


Build a DirectShow filter graph with this COM object activated by the device. For more information about this process, see "Building the Filter Graph" in DirectShow SDK documentation.

https://msdn.microsoft.com/zh-cn/library/windows/hardware/dd756608(v=vs.85).aspx

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值