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

Previously on the topic:

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 output buffer, but instead processing the same buffer before it is passed further downstream.

DMO API offers additional optional IMediaObjectInPlace interface to be implemented on the DMO which the hosting object might prefer to regular IMediaObject.

The interface itself is simple with basically the only Process method to actually handle the processing:

// IMediaObjectInPlace
	STDMETHOD(Process)(ULONG nSize, BYTE* pnData, REFERENCE_TIME nStartTime, DWORD nFlags)
	STDMETHOD(Clone)(IMediaObjectInPlace** ppMediaObject)
	STDMETHOD(GetLatency)(REFERENCE_TIME* pnLatencyTime)

Continue reading →

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

Previously on the topic:

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 AVI file through Infinite Tee Pin Filter:

The problem is that DirectShow auto-inserts our Brightness/Contrast filter into the graph while it is obviously not expected, wanted or necessary:

The problem is high filter/DMO merit value and a popular YUY2 video format the filter is advertised to accept on input during DMO registration.

Continue reading →

Visual Studio .NET 2005 Service Pack 1 Freeze

Visual Studio .NET 2005 Service Pack 1 started freezing on a solution it opened and compiled just recently. Deletion of *.ncb, *.aps, *.suo and intermediate/output files did not fix the problem, however what appeared to be a workaround was a rename of a subdirectory with a Cabinet (CAB) project .vdproj, which was one of the solution’s projects.

Installation of Visual Stuidio .NET 2008 might be the cause, but anyway I love this game <grrr>

ATL and Visual Studio C++.NET 2008 Goodies

This seems to be undocumented (Google does not know anything on this): ATL server executables may be run with /RegServerPerUser and /UnregServerPerUser switches to hopefully (this what would expect this to do without checking) register contained COM classes under HKEY_CURRENT_USER rather than HKEY_LOCAL_MACHINE and thus allow COM server run under credentials of non-administrative user. See Also: Merged View of HKEY_CLASSES_ROOT.

Good bye _ATL_MIN_CRT: this mode is retired with Visual Studio .NET 2008.

PROP_ENTRY and PROP_ENTRY_EX are deprecated and replaced with PROP_ENTRY_TYPE and PROP_ENTRY_TYPE_EX. Note that property pages have to be mentioned in property map explicitly using PROP_PAGE as opposed to old behavior when they were referenced as a part of property declaration.

ATL Server is taken out of the product and moved to open source project at CodePlex.

Many small fixes, including for example for CenterWindow.

Software we make and Support we do

Customer quote:

***,

*** is working fine now. Both the J*** and the A*** camera are properly integrated. In the nereby future I will also connect a 5 megapix D/N A*** camera to the system. I guess I’ll find no problems there.

I acquired the cameras and the ***-software as a demonstration-tool for my clients. My customers will now be able to see the difference and make a choice.

Thank you very much for your support. Best support I ever had on any software!

Kind regards,

***
N***
The Netherlands

How To: Implement DirectShow Filter using DirectX Media Object DMO (Part 3: Persistence, Automation and Property Pages)

Previously on the topic:

The principal task of video processing is done but there are still things mandatory for the filter to be usable. First of all, a custom interface is required to be able to control the filter from higher level application and to adjust brightness and constract correction values on the run time. Additionally, persistence would not hurt at all to be able to store correction settings along with other graph settings in GraphEdit graph file or anywhere else. Additionally, it would also be convenient to have a property page for the filter to be able to adjust the correction settings through GUI, both on graph composition and while the graph is running.

All the mentioned tasks are interconnected and ATL has an answer in implementation of:

Continue reading →