打印捕获设备c++的示例

HRESULT PrintDevice (LPCTSTR标题、IltmsDevice *设备){HRESULT人力资源;/ /打印设备属性_tprintf (_T (“- - - - - - % s设备- - - - - - \ n \ n”),标题);{CComBSTR v;hr =设备- > get_Name(增加了);如果(失败(人力资源)转到错误;_tprintf (_T (“Name = \ " % s \“\ n”),因为(LPCTSTR)字符串(v));}{CComBSTR v;hr =设备- > get_FriendlyName(增加了);如果(失败(人力资源)转到错误;_tprintf (_T (" FriendlyName = \ " % s \“\ n”),因为(LPCTSTR)字符串(v));}{VARIANT_BOOL v;hr =设备- > get_Selected(增加了);如果(失败(人力资源)转到错误;_tprintf (_T (“选择= % s \ n”),(v = = VARIANT_TRUE) ?_T (“真正的”):_T (“假”));}错误:_tprintf (_T (“\ n”));返回人力资源;}HRESULT PrintDevices (LPCTSTR标题、IltmsDevices *设备){HRESULT人力资源;计数;_tprintf (_T (“- - - - - - % s设备- - - - - - \ n \ n”),标题);hr =设备- > Refresh ();如果(失败(人力资源)转到错误;hr =设备- > get_Count(数);如果(失败(人力资源)转到错误;(指数= 0;指数<计数;指数+ +){CComPtr < IltmsDevice >设备;人力资源- > =设备项目(指数及器具);如果(失败(人力资源)转到错误;hr = PrintDevice(标题、设备);如果(失败(人力资源)转到错误;}错误:_tprintf (_T (“\ n”));返回人力资源;}HRESULT PrintLiveStreamDevices (IltmsLiveStream *流){HRESULT人力资源;/ /打印捕获设备发送到stdout_tprintf (_T (“——直播设备- - - - - - \ n \ n”));{CComPtr < IltmsDevices >设备;人力资源- > =流get_VideoDevices(设备);如果(失败(人力资源)转到错误;hr = PrintDevices (_T (“视频”),设备);如果(失败(人力资源)转到错误;}{CComPtr < IltmsDevices >设备;人力资源- > =流get_AudioDevices(设备);如果(失败(人力资源)转到错误;hr = PrintDevices (_T (“音频”),设备);如果(失败(人力资源)转到错误;}错误:_tprintf (_T (“\ n”));返回人力资源;}HRESULT PrintCaptureDevices (IltmsServer *服务器){HRESULT人力资源;CComPtr < IltmsLiveStreams >流;CComPtr < IltmsLiveStream >流;/ /创建直播只是枚举设备hr =服务器- > GetLiveStreams(流);如果(失败(人力资源)转到错误;人力资源- > =流CreateLiveStream(流);如果(失败(人力资源)转到错误;hr = PrintLiveStreamDevices(流);如果(失败(人力资源)转到错误;错误:返回人力资源;}
LEADTOOLS流媒体C API的帮助
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。