directshow

C++ and DirectShow

白昼怎懂夜的黑 提交于 2020-01-01 17:06:30
问题 I'm just getting started with DirectShow programming, and the 'C' nature of the DirectShow API is making my skin crawl. Endless return codes instead of exceptions, addref/release all over the place, functions taking pointer to pointers... Are there any 'C++ friendly' wrappers for DirectShow programming that hide all the COM ugliness underneath.? 回答1: For 98% of DirectShow code, you should never see a call to AddRef or Release. Always use CComPtr<>. There are a few minor exceptions to this

Audio Sync problems using DirectShow.NET

99封情书 提交于 2020-01-01 14:25:35
问题 I have started a thread on this at DirectShow.NET's forum, here is the link http://sourceforge.net/projects/directshownet/forums/forum/460697/topic/5194414/index/page/1 but unfortunately the problem still persists... I have an application that captures video from a webcam and audio from the microphone and save it to a file, for some reason the audio and video are never in-sync, i tried the following: 1. Started with ffdshow encoder and changed to AVI Mux - problem persists, audio is delayed

Create COM object from file without regsvr32

一世执手 提交于 2020-01-01 10:00:36
问题 Is it possible to create an instance of a COM object with just the dll and no regsvr32? My main goal here is to create an instance of a directshow filter and insert it into my graph-but I don't want to us regsvr32 to register the filter. The filter will be in a dll/ax that will be distributed with my application and will be present in my path. I will know the CLSID as well. So basically all I need is a way to create an instance of the type while just having the dll/ax and the CLSID. Is this

Create COM object from file without regsvr32

◇◆丶佛笑我妖孽 提交于 2020-01-01 10:00:04
问题 Is it possible to create an instance of a COM object with just the dll and no regsvr32? My main goal here is to create an instance of a directshow filter and insert it into my graph-but I don't want to us regsvr32 to register the filter. The filter will be in a dll/ax that will be distributed with my application and will be present in my path. I will know the CLSID as well. So basically all I need is a way to create an instance of the type while just having the dll/ax and the CLSID. Is this

Cross-Platform webcam access [closed]

柔情痞子 提交于 2020-01-01 03:06:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm looking for a cross-platform video capture library, for webcam access. One that wraps V4L/V4L2 on Linux, DirectShow on Windows, and QuickTime on the Mac. C or C++ is preferred, but I can work in Java or Python if those have better options for libraries. 回答1: The OpenCV (Open Source Computer Vision) works

When changing a file name, Recording Start is overdue for 3 seconds.

℡╲_俬逩灬. 提交于 2019-12-31 06:53:06
问题 Using Two ASFWriter Filters in a graph.One is making wmv file, Anather is for live streaming. Carrying out streaming, When changing a file name, Recording Start is overdue for 3 seconds. so,The head of a New WMV is missing. It's troubled. CAMERA ------ InfTee Filter --- --- AsfWriter Filter → WMV FIle X Microphone --- InfTee Filter2 --- --- AsfWriter Filter2 → Live Streaming void RecStart() { ... ConnectFilters(pInfTee,"Infinite Pin Tee Filter(1)",L"Output1",pASFWriter,"ASFWriter",L"Video

Text overlay when video is recording using Directshow and C#

删除回忆录丶 提交于 2019-12-31 06:51:07
问题 By using DirectShowLib i can able to record the video by using ASF writter here is the code to start recording try { IBaseFilter capFilter = null; IBaseFilter asfWriter = null; IFileSinkFilter pTmpSink = null; ICaptureGraphBuilder2 captureGraph = null; GetVideoDevice(); if (availableVideoInputDevices.Count > 0) { // //init capture graph // graphBuilder = (IFilterGraph2)new FilterGraph(); captureGraph = (ICaptureGraphBuilder2)new CaptureGraphBuilder2(); // //sets filter object from graph //

DirectShow capturing to multiple files

寵の児 提交于 2019-12-31 05:16:10
问题 I have a problem: I need to capture live source to file, but with every-minute slice (without loosing any frames). I think, I need some filter that can receive raw video at input pin, output the same, but it should be able to stop transfering through itself (with saving incoming samples in some buffer). So I can stop and delete filters after that filter (encoder and file-writer) with IFilterChain without stopping the entire graph, create it again and continue capturing. Well, my question is:

Pins avaiable in graphstudio not there in code

雨燕双飞 提交于 2019-12-31 04:35:14
问题 I am using a source filter of a webcam. When I use the filter in graphstudio it has two output pins. However in code the call to IEnumPins->next always returns S_FALSE. I also looked for another interface that could create pins but didn't find such a thing. How do I add pins to the webcam filter? If they're available in graphstudio they should be in code too, right? Here is my code.. I checked for return values and returned them if they are not ok. But everything seems to work fine except

Grab Video Stream from FireWire

走远了吗. 提交于 2019-12-30 14:45:46
问题 I'm trying to stream a video from a camera ( Sony HVR-Z1E ) over FireWire to my Computer. The incoming pictures/stream shall be processed further by some functions which expect the CVMat format ( from openCV ). Well my problem is now that I have no idea how to grab the stream. Okay openCV 2.1 offers me some methods ( cvCapturefromCam ) , but no matter which parameter I give him, it always gets the stream from the webcam of the laptop and not from the firewire. I heard I need to switch the