directshow

Unreleased DirectShow CSource filter makes program crash at process shutdown

左心房为你撑大大i 提交于 2019-12-01 07:58:57
问题 I'm developing a DirectShow CSource capture filter. It works fine, but when I close the program that is using the filter (in this case I'm testing with VLC, but the same happens with other programs), the program crashes (if I'm debugging it in Visual Studio then a breakpoint is triggered). I've been hunting down this problem for some time now and found that both, my source filter and my source stream are not being released; this is, their reference counter is 1 at the end of the program,

How to convert yuy2 to a BITMAP in C++

守給你的承諾、 提交于 2019-12-01 05:19:54
I'm using a security camera DLL to retreive the image from the camera. The DLL call a function of my program passing the image buffer as a parameter, but the image is in yuy2 format. I need to convert this buffer to RGB, but I tried every formula I found on Internet with no success. Every example I tried (including http://msdn.microsoft.com/en-us/library/aa904813(VS.80).aspx#yuvformats_2 ) gives me wrong colors. I'm able to convert the buffer to a BW image using only the Y component of the pixel, but I really need the color picture. I debugged (assembly only) the DLL that shows the image in

Writing custom DirectShow RTSP/RTP Source push filter - timestamping data coming from live sources

我是研究僧i 提交于 2019-12-01 04:08:38
问题 I'm writing custom DirectShow source push filter which is supposed to receive RTP data from video server and push them to the renderer. I wrote a CVideoPushPin class which inherits from CSourceStream and CVideoReceiverThread class which is a wrapper for a thread that receive RTP packets from video server. The receiver thread essentially does three things: receives raw RTP packets and collects some data that is needed for Receiver Reports assembles frames, copies them to the buffer and stores

DirectShow introduction material [closed]

亡梦爱人 提交于 2019-12-01 02:04:01
I'm looking for some DirectShow introduction material. Can you please point me to some (web-enabled) presentations\ books\ sites etc.? Thank you. Links to DirectShow and Multimedia Information DirectShow in Windows SDK Docs Book: Programming Microsoft® DirectShow® for Digital Video and Television 来源: https://stackoverflow.com/questions/8121713/directshow-introduction-material

best way to build graph for MPEG2 transport stream

怎甘沉沦 提交于 2019-11-30 23:33:57
on windows 7 the windows media player supports .ts files very well, in the sense that windows media player knows how to handle such files without any additional codec packs. however if I try to use graphedit to "render" a .ts file, it complains it doesnt know how to build a graph for it. what method does windows media player use to demux/decode these files? is it directshow? windows media foundation? BDA? Microsoft TV Technologies? unified tuning model? whatever the method they use, is available as an API to be used in my custom application? In DirectShow using only Microsoft filters it can be

Am I using the GMFBridge.DLL to preview/capture a stream correctly?

孤人 提交于 2019-11-30 18:12:53
问题 I am trying to use the GMFBuilder so that i can preview a stream from a webcam and save it periodically without restarting the whole graph. However Im not sure if this is correct or not, I was trying to follow examples but the codes been updated and things have changed. I try and create: WEbcam -> Smart Tee (preview) -> AVI Decompressor -> Video Renderer Smart Tee (Capture) -> BridgeSinkFilter and also: BridgeSourceFilter -> ffdshow video encoder -> haali mastroska muxer (just cause its easy

Preview a camera in DirectShow and capture a still image - in VB.net

我只是一个虾纸丫 提交于 2019-11-30 16:14:46
I am trying to write a program in Visual Studio 2008 that will access a webcam, show a preview on the screen and then save a still snapshot (.jpg) when the button is pushed. Later I am going to integrate it with a database, but I shouldn't have a problem with that part. After doing some research, it looks like DirectShow is the best bet, because WIA didn't work on the camera I had (and I'm not sure it will continue to work into the future). Preferably, I need my solution to work from Windows XP to Windows 7. I have never used DirectShow (or similar) before. One problem I am running into is

Using a DirectShow filter without registering it, via a private CoCreateInstance

我是研究僧i 提交于 2019-11-30 15:37:39
问题 So basiclly I read this, http://www.gdcl.co.uk/2011/June/UnregisteredFilters.htm. Which tells you how to use filters without registering them. There are two methods, new and using a private CoCreateInstance. Im trying to use the CoCreateInstance method. In the sample from the site the code is listed as, IUnknownPtr pUnk; HRESULT hr = CreateObjectFromPath(TEXT("c:\\path\\to\\myfilter.dll"), IID_MyFilter, &pUnk); if (SUCCEEDED(hr)) { IBaseFilterPtr pFilter = pUnk; pGraph->AddFilter(pFilter, L

Using a DirectShow filter without registering it, via a private CoCreateInstance

安稳与你 提交于 2019-11-30 14:59:26
So basiclly I read this, http://www.gdcl.co.uk/2011/June/UnregisteredFilters.htm . Which tells you how to use filters without registering them. There are two methods, new and using a private CoCreateInstance. Im trying to use the CoCreateInstance method. In the sample from the site the code is listed as, IUnknownPtr pUnk; HRESULT hr = CreateObjectFromPath(TEXT("c:\\path\\to\\myfilter.dll"), IID_MyFilter, &pUnk); if (SUCCEEDED(hr)) { IBaseFilterPtr pFilter = pUnk; pGraph->AddFilter(pFilter, L"Private Filter"); pGraph->RenderFile(pMediaClip, NULL); } My code as follows, IUnknownPtr pUnk; HRESULT

How to access an audio stream using DirectShow.NET C#

我的未来我决定 提交于 2019-11-30 10:12:36
What I would like to do is to pass an arbitrary audio file to a DirectShow filtergraph and receive a (PCM audio) stream object in the end using .NET 3.5 C# and DirectShow.NET. I would like to reach the point that I can just say: Stream OpenFile(string filename) {...} and stream.Read(...) I have been reading up on DirectShow for a couple of days and think I have started to grasp the idea of filters and filtergraphs. I found examples ( to file / to device ) how to play audio or write it to a file, but cannot seem to find the solution for a Stream object. Is this even possible? Could you point me