Why DMOs?
DMOs offer the following advantages:
- They are generally smaller and simpler than DirectShow filters because they support less functionality.
- They are more flexible than DirectShow filters because they do not require a filter graph. You can use them with DirectShow when you need the services that DirectShow provides, such as graph synchronization, intelligent connection, automatic handling of data flow, and thread management. If you do not need these services, you can access the DMO directly.
- DMOs always perform synchronous data processing, which eliminates many of the threading issues that filter developers must consider.
- Unlike ACM and VCM codecs, DMOs are based on the Component Object Model (COM), so they can be extended through QueryInterface.
- DMOs support a more generalized streaming model than ACM or VCM codecs. Like DirectShow filters, DMOs can support multiple inputs and multiple outputs.
For these reasons, DMOs are now recommended as the solution for writing encoders, decoders, and audio effects.
Limitations
For use within DirectShow, DMOs currently have some limitations:
- The DMO Wrapper Filter does not support DMOs with zero inputs, multiple inputs, or zero outputs.
- The DMO Wrapper uses the IMemInputPin . If you need some other transport mechanism within a DirectShow application, you must write a filter. (See Transports.)
- The DMO Wrapper does not support dynamic graph building. If your application performs dynamic graph building, you might need to write your own filter. For example, you might need to control how allocators are created. For more information, see Dynamic Graph Building.
- DirectShow Editing Services currently does not support DMO-based effects.