directshow

Directshow in c# compact framework: trigger handling problems for a Filtergraph's IMediaEvent

Hi- I'm working on implementing directshow capability in a C# dll. I'm basing my work off of the C++ based "CameraCapture" example Microsoft provides with the Windows Mobile 6 sdk. Things were going well (thanks to earlier help on this site), but I've run into a bit of a snag while trying to listen for directshow events in C# land: I ...

Image capture (photograph) in Directshow on Windows Mobile is too slow- suggestions?

Hi- I'm using Directshow to capture images on a winmo device. I've based my native code on the "CameraCapture" example found in the Windows Mobile 6 sdk, with a few minor tweaks (simplified the graph, added a live preview window, upped the photo resolution, etc...). My problem is that the call to IAMVideoControl::SetMode() to actually...

Detect movie being played (Windows)

Watching a movie is quite a different user activity. User doesn't touch neither mouse nor keyboard. Yet he 'actively' uses the computer. Thus, screensaver shouldn't run, indexing should be performed with care etc. On the other side, playing video requires either using direct write to video memory, or DirectShow, or some other API. This...

Visual C++ AVI writer function to push bitmaps (640x480) to AVI file?

I have a video capture card with SDK for Visual C++. Color frames (640 x 480) become available to me at 30 fps in a callback from the SDK. Currently, I am writing the entire image sequence out one at a time as individual bmp files in a separate thread -- that's 108,000 files in an hour, or about 100 GB per hour, which is not manageabl...

Is there any example to show how to write a DirectShow transform filter?

I want to capture a current frame and its previous one to do analysis and produce a new frame to show. Is it to say I must write a transform DirectShow filter? But I am a newbie to DirectShow. I was confused by MSDN's lots of documents. So I wonder if there is any simple example to show how to do it. Thanks. Cook ...

How to play multiple videos in sync over multiple monitors using directshow?

Hi all. I´ve successfully managed to play up to 8 videos in sync using a single video window with multiple streams using the directshowlib for c#. The problem is the video window plays only on a single screen - when I try to have it span over many screens it does not work. The app window spans correctly, but the video plays only on one s...

Why the buffer size of the output IMediaSample is smaller than one of the input?

I have built the ezrgb24 sample project successfully, which is in the DirectShow SDK. But I encountered a confused problem when I debug it. The following Copy method was called by the Transform method. HRESULT CEZrgb24::Copy(IMediaSample *pSource, IMediaSample *pDest) const { ... // Copy the sample data BYTE *pSourceBuffer...

COM : Can IBindCtx* parameter of IMoniker::BindToObject be NULL?

Hi, I am using IMoniker::BindToObject function, and I have read the article on MSDN. The article doen't say the first parameter can be NULL, but the example code on the following page uses NULL as the argument : http://msdn.microsoft.com/en-us/library/dd407292%28VS.85%29.aspx (hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (voi...

Videomemory/DirectX: How to get amount of shared and real memory?

Possible Duplicate: Report Direct3D memory usage I want to know how much video memory a graphic card has. I want to preload textures based on that information. There are many cards which don't have own memory (or very little) and share systems RAM. Those cards sometimes return gigantic numbers (>1GB) but that is misleading becau...

DShow : How to get a particular filter?

Hi, I am trying to connect filters in DShow, there are two filters I want to add to my filter graph. I know I can use system device enumerator (ICreateDevEnum) to enum all the filters in a category. But, This method is not very convenient, because I have to enum all the category to get a particular filter. Is there a better (faster o...

The second parameter of MFCreateAttributes function

Hi, I am learning Media Foundation, and there is a parameter in MFCreateAttributes function I don't quite understand. The sample code as the following : IMFAttributes *pAttributes = NULL; const UINT32 cElements = 10; // Starting size. <<<<<<<< I don't understand this parameter // Create an empty attribute store HRESULT hr = MFCreate...

Directshow & .Net - Bitmap shows stripe from right on left side of image?

Sample Image: I'm using DirectShow.net to get webcam footage into my program. To accomplish this, I'm adding the source camera to the graph, and a VideoMixingRenderer9. That part is all working swimmingly, but the part where I extract a frame using GetCurrentImage(out lpDib) is having what I can only describe as an odd issue. What I ...

Quick way to migrate DirectShow filters to Media Foundation MFTs.

Hi, I have some custom DirectShow filters (for Encoding / Deconding / Mux / Demux). and I want to use them on Media Foundation as MFTs. I have heard some people say: "Microsoft claims all DirectShow filters only have to add a few code to migrate to MFTs" acturally, I doubt there is a quick way. because the methods, APIs between DShow...

Is IOverlay interface available in DirectShow.Net

Hi I am pretty new to DirectShow and really just feeling my way round at the moment. I am wanting to host the directshow renderer window of a directshow graph within a WPF app and am currently using the HwndHost class to try to achieve this. What I need though for HwndHost is a handle to the window which is rendering the video. I have f...

"Fake" DirectShow video capture device

This is tangential to the last few questions I've asked. I need to get video from an IP webcam (SNC-RZ25N) to Flash Media Server. I'd rather not have to use Windows, but if it makes things easier, I will. (Flash Media Live Encoder is a Windows only program.) I've considered many different routes from point A to point B, but it seems li...

Media Foundation: The MFPlay object doesn't have to use MFStartup for the initialization?

Hi, Here is a question about MFStartup function in Media Foundation: According to the article "Initializing Media Foundation" (http://msdn.microsoft.com/en-us/library/ms704682%28VS.85%29.aspx), before using any Microsoft Media Foundation objects or interfaces, you must call the MFStartup function. But there is a sample from "MFPlay Tu...

Media Foundation: another way to call IMFActivate::ShutdownObject?

Hi, Here is a question about IMFActivate::ActivateObject and IMFActivate::ShutdownObject in Media Foundation. According to MSDN, the component that calls ActivateObject is responsible for calling ShutdownObject. But there are two examples not following this rule: http://msdn.microsoft.com/en-us/library/dd388503%28VS.85%29.aspx and ...

Root include file for Media Foundation

Is there a root include file for Media Foundation?  Every time when I have to use IMFMediaSource, I have to add this to my code : #include <Mfidl.h> // for IMFMediaSource #pragma comment (lib, "Mfuuid.lib") // for IMFMediaSource And, when I have to use MFCreateAttributes, I have to add this to my ...

Custom DirectShow graph source filter

All I need to do is play an AVI video from memory. I can't write it to disk for security reasons. As far as I know, the built-in AVI playing graph you get from calling RenderFile will only play files. Is there a DirectShow graph that will play an AVI from memory? If not, how can I modify or create a graph that will do so? ...

encoding camera with audio source in realtime with WMAsfWriter - jitter problem

Hello I build a DirectShow graph consisting of my video capture filter (grabbing the screen), default audio input filter both connected through spliiter to WM Asf Writter output filter and to VMR9 renderer. This means I want to have realtime audio/video encoding to disk together with preview. The problem is that no matter what WM profil...