Tag: howto

How To: Save image to BMP file from IBasicVideo or VMR windowless interface

A simple question being asked all over again. Given IBasicVideo, IBasicVideo2, IVMRWindowlessControl or IVMRWindowlessControl9, how to save image to file? It is easy. It is a bit easier with IBasicVideo because it is possible to query this interface directly from graph’s interface, such as IGraphBuilder, and the call will be forwarded to video renderer. This…

Read the full article

How To: Dump CAtlRegExp regular expression variable on parse error

ATL regular expression code adds dump/debug capabilities with ATL_REGEXP_DUMP preprocessor definition defined (undocumented). Dump output is directed to stdout, so if the application is not console, it has to be redirected in advance, e.g. into a $(BinaryPath)$(BinaryName)-atlrx.h file. CAtlRegExp<> Expression; LPCTSTR pszPattern; BOOL bCaseSensitive; #if defined(ATL_REGEXP_DUMP) REParseError Error = Expression.Parse(pszPattern, bCaseSensitive); if(Error != REPARSE_ERROR_OK) {…

Read the full article

How To: Dump DirectShow media samples

Given a DirectShow filter graph, what media samples are being sent through particular graph point? DumpMediaSamples utility gives a fast answer to this question. It prints out connection media type details (with details of VIDEOINFOHEADER, VIDEOINFOHEADER2 and WAVEFORMATEX structures corresponding to FORMAT_VideoInfo, FORMAT_VideoInfo2 and FORMAT_WaveFormatEx format types) and IMediaSample details obtained through AM_SAMPLE2_PROPERTIES structure. First…

Read the full article

How To: Implement DirectShow Filter using DirectX Media Object DMO (Part 5: In-Place Processing)

Previously on the topic: Part 1: Starting the Project Part 2: Video Processing Part 3: Persistence, Automation and Property Pages Part 4: Merit Due to the nature of the brightness and constract correction processing, it would make sense to combine and simplify processing to apply correction “in-place”, that is without copying data from input to…

Read the full article

How To: Implement DirectShow Filter using DirectX Media Object DMO (Part 4: Merit)

Previously on the topic: Part 1: Starting the Project Part 2: Video Processing Part 3: Persistence, Automation and Property Pages The implemented so far filter/DMO shown a problem related to its unexpectedly high “importance” in the system with the symptom of “auto-insertion” the filter when it is not necessary. For example, let us render an…

Read the full article