DirectShow开发

Directshow中的视频捕捉 本篇文档主要描述关于用Directshow进行视频开发的一些技术主要包括下面内容1关于视频捕捉(About Video Capture in Dshow) 2选择一个视频捕捉设备(Select capture device) 3预览视频(Previewing Video) 4如何捕捉视频流并保存到文件(Capture video to File) 5将设备从系统中移走时的事件通知(Device r 阅读详情

DirectShow在枚举的过程中,去得到设备标识对象的一些属性(调用设备标识对象上的接口方法IMoniker::BindToStorage后我们能够得到一个IPropertyBag接口,通过IPropertyBag::Read调用就可以读取各个属性了)。

 

常用的属性如下:
属性名 含义
FriendlyName 设备的友善名字(用户能够理解)
Description 设备的补充描述(用户能够理解)
DevicePath 一种设备唯一的字符串(用户很难理解)

提示:

FriendlyName是每个设备都支持的属性;

Description仅仅对DV或D-VHS/MPEG摄像机有效,而且必须在Windows   ME或Windows   XP操作系统下,它描述的内容比FriendlyName更具体,比如可以得到摄像机的生产厂商信息等;

DevicePath用于唯一地标识设备实例,一般只在程序中使用,用户一般不能理解字符串的含义。

基于Delphi的DirectShow开发概述 第一部分:背景知识DirectShow是微软公司提供的一套在Windows平台上进行流媒体处理的开发包,与DirectX开发包一起发布。它经过DirectX 6.0中的DirectX Media发展而来,集成了DirectX家族中的其他成员(DirectDraw、DirectSound等),可以说是一位“集大成者”。             DirectShow能做些什么? Dire 阅读详情

相关推荐

Directshow的Filter开发简要步骤

本文以一个Transform Filter为例,一步步整理Transform Filter一般开发步骤。本文的Filter名为GrayFilter,把YUV视频信号转化为灰度信号,造成黑白电视的效果。 1. 配置开发环境    1. VC中在Tools->Options->Directories 设置好DirectX SDK的头文件和库文件路径      2. 编译了基类源

1199

COM组件设计与应用(十八)——属性包

 下载源代码一、前言  书接上回,本回着落在介绍属性包 IPersistPropertyBag 接口的实现方法和调用方式。属性包,是以“名称 -值”的方式提供组件持续性的支持,而“名称 - 值”恰恰又适合于用文本方式来表现。下面的片段是在 HTML 中插入 MicrosoftMonthView Control ActiveX 控件后的样式: 以文本方式保存组

Welcom to zougangx's blog 583

虚拟摄像头之DirectShow虚拟摄像头开发

by fanxiushu 2018-04-06 转载或引用请注明原始作者。之前优快云上的博客,较多的文章阐述了虚拟摄像头的开发,而且是两种类别的。1,比如使用老的内核流框架开发WDM虚拟摄像头驱动,博客链接:https://blog.youkuaiyun.com/fanxiushu/article/d...

fanxiushu的专栏 1万+

Windows UVC DShow IMoniker对象获取位置等属性的方法

(1)获取设备路径 通过IMoniker的BindToStorage(0, 0, IID_IPropertyBag, (void **)&pBag)方法可以获取IPropertyBag对象,然后通过IPropertyBag对象的Read(L"DevicePath", &varDevPath, NULL)方法获取设备路径。 void GetMonikerDeviceInfo(IMoniker *pM) { HRESULT hr; IPropertyBag *pBag = 0; U

haart的专栏 892

directshow USB摄像头预览

//指定视频采集设备的友好名字,为它创建一个Filter IBaseFilter * CTestPreviewDlg::CreateVideoDevice(const char * inFriendlyName) { return CreateHardwareFilter(CLSID_VideoInputDeviceCategory,inFriendlyName); } //根据设备的友好名字,创建一个代表该设备的Filter IBaseFilter * CTestPreviewDlg::CreateHardwareFilter(GUID inCategory,const char * inFriendlyName) { //创建一个系统枚举组件对象 ICreateDevEnum * enumHardware = NULL; HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum,NULL,CLSCTX_ALL, IID_ICreateDevEnum,(void**)&enumHardware); if(FAILED(hr)) { return NULL; } IBaseFilter * hardwareFilter = NULL; IEnumMoniker * enumMoniker = NULL; //为指定的目录创建枚举器 hr = enumHardware->CreateClassEnumerator(inCategory,&enumMoniker,0); if(enumMoniker) { enumMoniker->Reset(); ULONG fetched = 0; IMoniker * moniker = NULL; char friendlyName[256]; //枚举得到该目录下所有的设备,逐个进行名字匹配 while(!hardwareFilter && SUCCEEDED(enumMoniker->Next(1,&moniker, &fetched)) && fetched) { if(moniker) { IPropertyBag * propertyBag = NULL; VARIANT name; friendlyName[0] = 0; hr = moniker->BindToStorage(0,0,IID_IPropertyBag,(void**)&propertyBag); //读取设备的友好名字 if(SUCCEEDED(hr)) { name.vt = VT_BSTR; hr = propertyBag->Read(L"Friendlyname",&name,NULL); } if(SUCCEEDED(hr)) { WideCharToMultiByte(CP_ACP,0,name.bstrVal,-1, friendlyName,256,NULL,NULL); //如果当前设备的友好名字与用户指定的设备名字相同, //则将当前设备标识绑定为Filter形式 if(strcmp(friendlyName,inFriendlyName) == 0) { moniker->BindToObject(0,0,IID_IBaseFilter, (void**)&hardwareFilter); } } //释放使用过的接口 if(propertyBag) { propertyBag->Release(); propertyBag = NULL; } moniker->Release(); } } enumMoniker->Release(); } enumHardware->Release(); return hardwareFilter; }

AI报告撰写实战指南:从提示词工程到全流程优化的底层逻辑与实践突破

传统AI写作常被诟病为“信息拼贴”——模型虽能生成文本,却常出现逻辑断裂、数据矛盾、风格不符等问题。而“全流程优化”则是通过系统化设计,将报告生成拆解为需求解析→数据对齐→提示词设计→初稿生成→迭代优化→格式适配六大环节,每个环节均通过技术手段提升输出质量。提示词工程:本质是通过结构化指令(如角色设定、任务分解、格式约束、示例引导)精准控制模型输出方向,是连接用户需求与模型能力的“翻译器”。全流程优化。

2501_92808811的博客 886

第一篇: DirectShow视频采集

1)、DriectShow是windows基础的采集模块,支持xp、win7、vista 以及更新的wIndows版本。2)、在win8之后 建议使用和但由于部分虚拟摄像头 并不支持MediaFoundation,所以DirectShow在采集领域仍然占领一席之地3)、DriectShow也有一定的局限性,能识别的采集格式相对较少,在部分摄像头(HD Web Camera)测试出在部分分辨率的情况下会出现卡顿。

qq_15821883的博客 2085

Python自然语言处理 NLTK 库用法入门教程【经典】

@本文来源于公众号:csdn2299,喜欢可以关注公众号 程序员学府 本文实例讲述了Python自然语言处理 NLTK 库用法。分享给大家供大家参考,具体如下: 在这篇文章中,我们将基于 Python 讨论自然语言处理(NLP)。本教程将会使用 Python NLTK 库。NLTK 是一个当下流行的,用于自然语言处理的 Python 库。 那么 NLP 到底是什么?学习 NLP 能带来什么好处? ...

python函数基础教程 1万+

音频采集(VC++ SDK实现)

当根据DirectShow程序包中AudioCap例子写了自己的MyAudioMFC程序后,虽然程序本身可以很好的运行,也可以实现“边录边听”,并实现播放;但感觉还是很有必要把思路理清一下;将其MFC改写为普通函数API的SDK方式后,一般理解起来就更容易些。且程序界面也简单的改

philip_liu的专栏 2475

Intel Arc显卡玩《三角洲行动》报错?手把手教你修改注册表跳过验证

本文针对Intel Arc显卡用户在运行《三角洲行动》时遇到的驱动验证报错问题,提供了详细的解决方案。通过安全修改Windows注册表,添加特定键值以跳过游戏驱动兼容性验证,并结合游戏内图形设置与Intel驱动面板的优化建议,旨在帮助玩家顺利进入游戏并提升游戏帧率与运行稳定性。

weixin_29310605的博客 696

Triton server的部署、构建、backend插件机制代码梳理、模型加载、自定义C++backend流程

Triton inference server的部署、构建、backend机制代码详细梳理、模型加载过程、自定义C++backend流程.

C/C++、嵌入式开发、深度学习算法、模型部署与推理优化 473

DirectShow学习之一在vs2005中配置directshow开发环境

作者:liguisenBlog:http://blog.youkuaiyun.com/liguisen先介绍系统环境:XP Professional sp2visual studio 2005 version 8.0.50727.42DirectX 9.0(9.0b) SDK Update - (Summer 2003)首先,就是编译baseclasses,什么是baseclasses?打开你的d

LGS的BLOG 8441

SA8155P QCOM 车载系统介绍

高通车载相机开发

qq_37057338的博客 5230

Directshow开发的基本技巧

Directshow开发的基本技巧 摘要:本篇文档主要讲述了Directshow开发的一些基本概念和技巧 1视频播放(Video Rendering) dshow的视频提交过滤器可以在窗口模式和无窗口模式下工作。在窗口模式下,过滤器创建一个自己的窗口,在里面播放视频。在无窗口模式下,过滤器直接将视频在应用程序提供的窗口上显示,过滤器本身不创建窗口。窗口模式在窗口模式下,视频提交过滤器创建一个窗口,

智慧的鱼 8202

2020计算机专业保研夏令营面经:中科院计算所网数机试题目

计算所网络数据科学与技术重点实验室的第一阶段是机试。机试不限程序语言,要求提交源代码。

乔卿的博客 2957

Android CCodec (十七) 硬件解码调用分析-1(基于V4l2)

简单的分析V4L2DecodeComponent和其相关内容,后续针对解码调用单独分析。

给大佬递杯卡布奇诺的博客 6594

设置DirectShow开发的编译环境

这个章节的内容主要是编写 DirectShow应用所需的一些基本概念,可以把它当作一个高级介绍,理解这些内容只需具备一般的编程和有关多媒体的知识。2.1. 设置DirectShow开发的编译环境 这节内容描述了如何来编译DirectShow应用。你可以使用命令行形式来编译一个工程,也可以在Microsoft Visual Studio集成环境下(包含VC++)实现。 头文件:...

m0_37346206的博客 1187

PCIe协议之 Equalization篇 之 理论篇 之 FFE

作为最后一道“精加工”工序,DFE利用其不放大噪声的优势,精准地消除残余的、强烈的后光标ISI,最终得到一个非常干净、张得很开的眼图,供判决器使用。信号经过信道衰减后变得模糊,首先由CTLE进行“粗调”,提供一个宽频带的增益,将眼图初步打开,为后面的DFE创造一个可以正常工作的信号环境。,它通过将输入信号在不同时间点上的多个副本(称为“抽头”)进行加权求和,来直接塑造或“整形”输出信号的波形。:这是最主要的信号路径,通常系数为正值,决定了信号的幅度。:将所有加权后的信号相加,产生最终的均衡输出。

那么菜的博客 756

建立directshow开发环境

DirectX 9.0c已经不包含DirectShow了,相应的在windows SDK中加入了DirectShow。为了方便开发,我下载了DirectX 9.0b的版本,安装到PC中。安装完后就是配置EVC的开发环境和Visual Stidio2008的开发环境。我发现我似乎已经抛弃了VC6,然而做起Wince的开发,还是习惯VC6风格的EVC,尽管2008也能够做这些事情。 一、首先配

guoyang1007的专栏 3505

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

DirectShow项目开发经验

 DirectShow项目开发经验一、              开发环境开发平台:PPC/SP MicrosoftR Windows Mobile 5.0、MicrosoftR Windows Mobile 6.0;开发工具:Visual Studio 2005;开发文档:magneto documentation may 18, 2006.chm,directshow.chm,Wi

SuperKan的专栏 3030

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

利用DirectShow开发自己的Filter

用DirectShow开发自己的Filter         学习directshow已经有几天了,下面将自己的学习心得写下来,希望对其他的人有帮助。Filter实质是个COM组件,所以学习开发Filter之前你应该对com的知识有点了解。Com组件的实质是一个实现了纯虚指针接口的C++对象。关于com的东西,这里不多讲。1 给vc配置DShow的开发环境  无论开发Fil

智慧的鱼 2289

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

利用 DirectShow 开发自己的 Filter

学习directshow已经有几天了,下面将自己的学习心得写下来,希望对其他的人有帮助。 Filter实质是个COM组件,所以学习开发Filter之前你应该对com的知识有点了解。Com组件的实质是一个实现了纯虚指针接口的C++对象。关于com的东西,这里不多讲。  一、给vc配置DirectShow的开发环境  无论开发Filter还是开发Dshow的应用程序都要配置一下开发环境的,其实

kasdmn的专栏 783

DirectShow Filter开发学习总结

学习DShow Filter的开发,主要针对于SourceFilter、TransInPlaceFilter和RenderFilter方面。Filter的开发并不需要我们从头到尾的编写代码,DShow为我们提供了许多类,通过这些类我们可以快速开发出良好的Filter。下面就这几种Filter的学习总结如下。 在DirectShow中,Filter一般被分成三类:SourceFilter、TransformFilter和RenderFilter。区分这三种Filter最直观的是区分它们所包含的Pin。.

翻肚鱼儿的博客 723

利用directshow进行摄像头的开发

<br />     首先,我的系统是win7的,据说win7自带directX 所以不用再另外下载directX。<br />在头文件中添加 #pragma comment (lib,"Strmiids") #pragma comment (lib,"quartz") #include <Dshow.h>//// 所有DirectShow应用程序必备 <br />首先:查找视频设备列表<br />void CCameraDlg::GetAllCapDevices() { UINT uIndex

老衣的专栏 3510
上一篇: 如何在VC下单步调试Release版本
下一篇: VS2008开发64位应用
dsc
dsc
博客等级 码龄26年 14粉丝 14原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值