Matthew van Eerde's web log

  • Matthew van Eerde's web log

    How to enumerate DirectSound DirectX Media Objects (DMOs) on your system

    • 0 Comments

    Source and binaries (amd64 and x86) attached.

    Pseudocode:

    GUID dmo_categories[] = { ... }
    for (each guid in dmo_categories) {
        IEnumDMO = DMOEnum(guid, DMO_ENUMF_INCLUDE_KEYED, ...);
        while (0 != items fetched by IEnumDMO::Next(&iid, &szName...)) {
           print iid, szName
        }
    }

    Output on my system:

    >dmoenum.exe
    -- Audio decoders ({57F2DB8B-E6BB-4513-9D43-DCD2A6593125}) --
    WMAudio Decoder DMO ({2EEB4ADF-4578-4D10-BCA7-BB955F56320A})
    WMAPro over S/PDIF DMO ({5210F8E4-B0BB-47C3-A8D9-7B2282CC79ED})
    WMSpeech Decoder DMO ({874131CB-4ECC-443B-8948-746B89595D20})
    MP3 Decoder DMO ({BBEEA841-0A63-4F52-A7AB-A9B3A84ED38A})

    -- Audio effects ({F3602B3F-0592-48DF-A4CD-674721E7EBEB}) --
    ParamEq ({120CED89-3BF4-4173-A132-3CB406CF3231})
    AEC ({745057C7-F353-4F2D-A7EE-58434477730E})
    WavesReverb ({87FC0268-9A55-4360-95AA-004A1D9DE26C})
    Gargle ({DAFD8210-5711-4B91-9FE3-F75B7AE279BF})
    Compressor ({EF011F79-4000-406D-87AF-BFFB3FC39D57})
    Distortion ({EF114C90-CD1D-484E-96E5-09CFAF912A21})
    Echo ({EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D})
    I3DL2Reverb ({EF985E71-D5C7-42D4-BA4D-2D073E2E96F4})
    Flanger ({EFCA3D92-DFD8-4672-A603-7420894BAD98})
    Chorus ({EFE6629C-81F7-4281-BD91-C9D604A95AF6})
    Resampler DMO ({F447B69E-1884-4A7E-8055-346F74D6EDB3})

    -- Audio encoders ({33D9A761-90C8-11D0-BD43-00A0C911CE86}) --
    WM Speech Encoder DMO ({1F1F4E1A-2252-4063-84BB-EEE75F8856D5})
    WMAudio Encoder DMO ({70F598E9-F4AB-495A-99E2-A7C4D3D89ABF})

    -- Video decoders ({4A69B442-28BE-4991-969C-B500ADF5D8A8}) --
    Mpeg4s Decoder DMO ({2A11BAE2-FE6E-4249-864B-9E9ED6E8DBC2})
    WMV Screen decoder DMO ({7BAFB3B1-D8F4-4279-9253-27DA423108DE})
    WMVideo Decoder DMO ({82D353DF-90BD-4382-8BC2-3F6192B76E34})
    Mpeg43 Decoder DMO ({CBA9E78B-49A3-49EA-93D4-6BCBA8C4DE07})
    MS ATC Screen Decoder 1 ({F1931D8E-51D3-496F-BE8A-3D08AEE9C9DB})
    Mpeg4 Decoder DMO ({F371728A-6052-4D47-827C-D039335DFE0A})

    -- Video effects ({D990EE14-776C-4723-BE46-3DA2F56F10B9}) --
    Frame Rate Converter ({01F36CE2-0907-4D8B-979D-F151BE91C883})
    Resizer DMO ({1EA1EA14-48F4-4054-AD1A-E8AEE10AC805})
    TOC Generator ({4DDA1941-77A0-4FB1-A518-E2185041D70C})
    Thumbnail Generator ({559C6BAD-1EA8-4963-A087-8A6810F9218B})
    Color Control ({798059F0-89CA-4160-B325-AEB48EFE4F9A})
    Color Converter DMO ({98230571-0087-4204-B020-3282538E57D3})

    -- Video encoders ({33D9A760-90C8-11D0-BD43-00A0C911CE86}) --
    WMVideo8 Encoder DMO ({7E320092-596A-41B2-BBEB-175D10504EB6})
    WMVideo9 Encoder DMO ({D23B90D0-144F-46BD-841D-59E4EB19DC59})
    MSScreen 9 encoder DMO ({F7FFE0A0-A4F5-44B5-949E-15ED2BC66F9D})

    -- Audio capture effects ({F665AABA-3E09-4920-AA5F-219811148F09}) --

     

  • Matthew van Eerde's web log

    How to enumerate DirectShow filters on your system

    • 3 Comments

    Last time I showed how to enumerate Media Foundation transforms.  This time, DirectShow filters.  Source and binaries attached.

    In pseudocode:

    GUID directshow_categories[] = { ... }; // static list
    ICreateDevEnum = CoCreate(...);
    for (each category in directshow_categories) {
        display the category name and GUID

        IEnumMoniker = ICreateDevEnum::CreateClassEnumerator(category);

        for (each IMoniker that IEnumMoniker finds) {
            IBindCtx = CreateBindCtx(...);
            IPropertyBag = IMoniker::BindToStorage(IBindCtx);

            pull the friendly name from the IPropertyBag and display it
        }
    }

    Output of the tool on my system:

    >devenum.exe
    -- Audio Capture Sources ({33D9A762-90C8-11D0-BD43-00A0C911CE86}) --
        Front Microphone (High Definiti
        Line In (High Definition Audio
        Rear Microphone (High Definitio

    -- Audio Compressors ({33D9A761-90C8-11D0-BD43-00A0C911CE86}) --
        WM Speech Encoder DMO
        WMAudio Encoder DMO
        IMA ADPCM
        PCM
        Microsoft ADPCM
        GSM 6.10
        CCITT A-Law
        CCITT u-Law
        MPEG Layer-3

    -- Audio Renderers ({E0F158E1-CB04-11D0-BD4E-00A0C911CE86}) --
        Speakers (High Definition Audio
        Default DirectSound Device
        Default WaveOut Device
        DirectSound: Speakers (High Definition Audio Device)

    -- Device Control Filters ({CC7BFB46-F175-11D1-A392-00E0291F3959}) --

    -- DirectShow Filters ({083863F1-70DE-11D0-BD40-00A0C911CE86}) --
        WMAudio Decoder DMO
        WMAPro over S/PDIF DMO
        WMSpeech Decoder DMO
        MP3 Decoder DMO
        Mpeg4s Decoder DMO
        WMV Screen decoder DMO
        WMVideo Decoder DMO
        Mpeg43 Decoder DMO
        Mpeg4 Decoder DMO
        DV Muxer
        Color Space Converter
        WM ASF Reader
        AVI Splitter
        VGA 16 Color Ditherer
        SBE2MediaTypeProfile
        Microsoft DTV-DVD Video Decoder
        AC3 Parser Filter
        StreamBufferSink
        Microsoft TV Captions Decoder
        MJPEG Decompressor
        CBVA DMO wrapper filter
        MPEG-I Stream Splitter
        SAMI (CC) Parser
        VBI Codec
        MPEG-2 Splitter
        Closed Captions Analysis Filter
        SBE2FileScan
        Microsoft MPEG-2 Video Encoder
        Internal Script Command Renderer
        MPEG Audio Decoder
        DV Splitter
        Video Mixing Renderer 9
        Microsoft MPEG-2 Encoder
        ACM Wrapper
        Video Renderer
        MPEG-2 Video Stream Analyzer
        Line 21 Decoder
        Video Port Manager
        Video Renderer
        VPS Decoder
        WM ASF Writer
        VBI Surface Allocator
        File writer
        iTV Data Sink
        iTV Data Capture filter
        DVD Navigator
        Microsoft TV Subtitles Decoder
        Overlay Mixer2
        AVI Draw
        RDP DShow Redirection Filter
        Microsoft MPEG-2 Audio Encoder
        WST Pager
        MPEG-2 Demultiplexer
        DV Video Decoder
        SampleGrabber
        Null Renderer
        MPEG-2 Sections and Tables
        Microsoft AC3 Encoder
        StreamBufferSource
        Smart Tee
        Overlay Mixer
        AVI Decompressor
        NetBridge
        AVI/WAV File Source
        Wave Parser
        MIDI Parser
        Multi-file Parser
        File stream renderer
        Microsoft DTV-DVD Audio Decoder
        StreamBufferSink2
        AVI Mux
        Line 21 Decoder 2
        File Source (Async.)
        File Source (URL)
        Media Center Extender Encryption Filter
        AudioRecorder WAV Dest
        AudioRecorder Wave Form
        SoundRecorder Null Renderer
        Infinite Pin Tee Filter
        Enhanced Video Renderer
        BDA MPEG2 Transport Information Filter
        MPEG Video Decoder

    -- External Renderers ({CC7BFB41-F175-11D1-A392-00E0291F3959}) --

    -- Midi Renderers ({4EFE2452-168A-11D1-BC76-00C04FB9453B}) --
        Default MidiOut Device
        Microsoft GS Wavetable Synth

    -- Video Capture Sources ({860BB310-5D01-11D0-BD3B-00A0C911CE86}) --

    -- Video Compressors ({33D9A760-90C8-11D0-BD43-00A0C911CE86}) --
        WMVideo8 Encoder DMO
        WMVideo9 Encoder DMO
        MSScreen 9 encoder DMO
        DV Video Encoder
        MJPEG Compressor
        Cinepak Codec by Radius
        Intel IYUV codec
        Intel IYUV codec
        Microsoft RLE
        Microsoft Video 1

    -- WDM Stream Decompression Devices ({2721AE20-7E70-11D0-A5D6-28DB04C10000}) --

    -- WDM Streaming Capture Devices ({65E8773D-8F56-11D0-A3B9-00A0C9223196}) --
        HD Audio Microphone
        HD Audio Muxed capture

    -- WDM Streaming Crossbar Devices ({A799A801-A46D-11D0-A18C-00A02401DCD4}) --

    -- WDM Streaming Rendering Devices ({65E8773E-8F56-11D0-A3B9-00A0C9223196}) --
        HD Audio Speaker

    -- WDM Streaming Tee/Splitter Devices ({0A4252A0-7E70-11D0-A5D6-28DB04C10000}) --
        Tee/Sink-to-Sink Converter

    -- WDM Streaming TV Audio Devices ({A799A802-A46D-11D0-A18C-00A02401DCD4}) --

    -- WDM Streaming TV Tuner Devices ({A799A800-A46D-11D0-A18C-00A02401DCD4}) --

    -- WDM Streaming VBI Codecs ({07DAD660-22F1-11D1-A9F4-00C04FBBDE8F}) --

    -- WDM Streaming Communication Transforms ({CF1DDA2C-9743-11D0-A3EE-00A0C9223196}) --
        Tee/Sink-to-Sink Converter

    -- WDM Streaming Data Transforms ({2EB07EA0-7E70-11D0-A5D6-28DB04C10000}) --

    -- WDM Streaming Interface Transforms ({CF1DDA2D-9743-11D0-A3EE-00A0C9223196}) --

    -- WDM Streaming Mixer Devices ({AD809C00-7B88-11D0-A5D6-28DB04C10000}) --

    -- BDA Network Providers ({71985F4B-1CA1-11D3-9CC8-00C04F7971E0}) --
        Microsoft ATSC Network Provider
        Microsoft DVBC Network Provider
        Microsoft DVBS Network Provider
        Microsoft DVBT Network Provider
        Microsoft Network Provider

    -- BDA Receiver Components ({FD0A5AF4-B41D-11D2-9C95-00C04F7971E0}) --

    -- BDA Rendering Filters ({71985F4A-1CA1-11D3-9CC8-00C04F7971E0}) --

    -- BDA Source Filters ({71985F48-1CA1-11D3-9CC8-00C04F7971E0}) --

    -- BDA Transport Information Renderers ({A2E3074F-6C3D-11D3-B653-00C04F79498E}) --
        BDA MPEG2 Transport Information Filter
        MPEG-2 Sections and Tables

    -- Video Effects (1 input) ({CC7BFB42-F175-11D1-A392-00E0291F3959}) --
        Fade
        BasicImage
        Convolution
        Chroma
        Matrix
        Pixelate
        DxtAlphaSetter Class
        Text Label Class
        Scale
        Blur
        Glow
        ICMFilter
        Alpha
        DropShadow
        Wave
        MotionBlur
        Shadow
        Emboss
        Engrave
        Light

    -- Video Effects (2 inputs) ({CC7BFB43-F175-11D1-A392-00E0291F3959}) --
        CrBlinds
        Iris
        RadialWipe
        Fade
        ZigZag
        RandomBars
        CrIris
        CrRadialWipe
        Spiral
        Pixelate
        Wheel
        Strips
        CrStretch
        Inset
        CrSlide
        CrInset
        Compositor
        Blinds
        CrSpiral
        Wipe
        CheckerBoard
        GradientWipe
        DxtCompositor Class
        CrBarn
        DxtKey Class
        Slide
        DxtJpeg Class
        CrZigzag
        Barn
        Stretch
        RandomDissolve

    -- EncAPI Encoders ({7D22E920-5CA9-4787-8C2B-A6779BD11781}) --
        Microsoft MPEG-2 Audio Encoder
        Microsoft MPEG-2 Video Encoder

    -- EncAPI Multiplexers ({236C9559-ADCE-4736-BF72-BAB34E392196}) --
        Microsoft MPEG-2 Encoder

     

  • Matthew van Eerde's web log

    Wheel of Fortune conundrum

    • 1 Comments
    What happens if Pat gets a Bankrupt on the Final Spin?
  • Matthew van Eerde's web log

    How to enumerate Media Foundation transforms on your system

    • 0 Comments

    This mini-application (source and binaries attached) uses MFTEnumEx to get a list of all the registered IMFTransform classes on the system.  If you're writing a Media Foundation app, you're likely going to use different flags than I used... see the documentation for sets of flags that match three different scenarios.

    In my case I wanted as exhaustive a list of transforms as possible - so I include asynchronous MFTs, disabled MFTs, etc:

    DWORD dwFlags = 0
        // enumerate all three kinds of data flow
        | MFT_ENUM_FLAG_SYNCMFT
        | MFT_ENUM_FLAG_ASYNCMFT
        | MFT_ENUM_FLAG_HARDWARE
           
        // include not-usually-included kinds of MFTs
        | MFT_ENUM_FLAG_FIELDOFUSE
        | MFT_ENUM_FLAG_LOCALMFT
        | MFT_ENUM_FLAG_TRANSCODE_ONLY
       
        // DO NOT filter or sort the results
        // we want to include even blocked MFTs in this list
        // EXPLICITLY NOT SETTING MFT_ENUM_FLAG_SORTANDFILTER
    ;

    Opportunities for later improvement - I only print out the friendly name and the CLSID for each found transform.  I could add things like the MF_TRANSFORM_FLAGS_Attribute, the MF_SUPPORT_DYNAMIC_FORMAT_CHANGE attribute, the supported input types and output types, etc.  But this is good enough for now.

    Output of the tool on my machine:

    > MFTEnum.exe

    -- Audio decoders ({9EA73FB4-EF7A-4559-8D5D-719D8F0426C7}) --
    WMAudio Decoder MFT ({2EEB4ADF-4578-4D10-BCA7-BB955F56320A})
    Microsoft AAC Audio Decoder MFT ({32D186A7-218F-4C75-8876-DD77273A8999})
    GSM ACM Wrapper MFT ({4A76B469-7B66-4DD4-BA2D-DDF244C766DC})
    WMAPro over S/PDIF MFT ({5210F8E4-B0BB-47C3-A8D9-7B2282CC79ED})
    WMSpeech Decoder DMO ({874131CB-4ECC-443B-8948-746B89595D20})
    G711 Wrapper MFT ({92B66080-5E2D-449E-90C4-C41F268E5514})
    IMA ADPCM ACM Wrapper MFT ({A16E1BFF-A80D-48AD-AECD-A35C005685FE})
    MP3 Decoder MFT ({BBEEA841-0A63-4F52-A7AB-A9B3A84ED38A})
    ADPCM ACM Wrapper MFT ({CA34FE0A-5722-43AD-AF23-05F7650257DD})

    -- Audio effects ({11064C48-3648-4ED0-932E-05CE8AC811B7}) --
    AEC ({745057C7-F353-4F2D-A7EE-58434477730E})
    Resampler MFT ({F447B69E-1884-4A7E-8055-346F74D6EDB3})

    -- Audio encoders ({91C64BD0-F91E-4D8C-9276-DB248279D975}) --
    WM Speech Encoder DMO ({1F1F4E1A-2252-4063-84BB-EEE75F8856D5})
    WMAudio Encoder MFT ({70F598E9-F4AB-495A-99E2-A7C4D3D89ABF})
    Microsoft AAC Audio Encoder MFT ({93AF0C51-2275-45D2-A35B-F2BA21CAED00})

    -- Demultiplexers ({A8700A7A-939B-44C5-99D7-76226B23B3F1}) --
    No IMFTransforms found.

    -- Multiplexers ({059C561E-05AE-4B61-B69D-55B61EE54A7B}) --
    No IMFTransforms found.

    -- Miscellaneous ({90175D57-B7EA-4901-AEB3-933A8747756F}) --
    No IMFTransforms found.

    -- Video decoders ({D6C02D4B-6833-45B4-971A-05A4B04BAB91}) --
    DV Decoder MFT ({404A6DE5-D4D6-4260-9BC7-5A6CBD882432})
    Mpeg4s Decoder MFT ({5686A0D9-FE39-409F-9DFF-3FDBC849F9F5})
    Microsoft H264 Video Decoder MFT ({62CE7E72-4C71-4D20-B15D-452831A87D9D})
    WMV Screen decoder MFT ({7BAFB3B1-D8F4-4279-9253-27DA423108DE})
    WMVideo Decoder MFT ({82D353DF-90BD-4382-8BC2-3F6192B76E34})
    NVIDIA Video Decoder MFT ({ACAE6A3C-3DB0-4F71-B783-CDBD2AC6FDE8})
    MJPEG Decoder MFT ({CB17E772-E1CC-4633-8450-5617AF577905})
    Mpeg43 Decoder MFT ({CBA9E78B-49A3-49EA-93D4-6BCBA8C4DE07})
    Mpeg4 Decoder MFT ({F371728A-6052-4D47-827C-D039335DFE0A})

    -- Video effects ({12E17C21-532C-4A6E-8A1C-40825A736397}) --
    Frame Rate Converter ({01F36CE2-0907-4D8B-979D-F151BE91C883})
    Resizer MFT ({1EA1EA14-48F4-4054-AD1A-E8AEE10AC805})
    Color Control ({798059F0-89CA-4160-B325-AEB48EFE4F9A})
    Color Converter MFT ({98230571-0087-4204-B020-3282538E57D3})

    -- Video encoders ({F79EAC7D-E545-4387-BDEE-D647D7BDE42A}) --
    NVIDIA Video Encoder MFT ({305AFD76-ADD0-417E-AA99-3AC4FDB22B21})
    H264 Encoder MFT ({6CA50344-051A-4DED-9779-A43305165E35})
    WMVideo8 Encoder MFT ({7E320092-596A-41B2-BBEB-175D10504EB6})
    WMVideo9 Encoder MFT ({D23B90D0-144F-46BD-841D-59E4EB19DC59})

    -- Video processors ({302EA3FC-AA5F-47F9-9F7A-C2188BB16302}) --
    NVIDIA Video Processor MFT ({6A8C0482-4A25-48A1-AFD1-0A7C1629352A})

    -- KS data compressors ({1E84C900-7E70-11D0-A5D6-28DB04C10000}) --
    No IMFTransforms found.

    -- KS data decompressors ({2721AE20-7E70-11D0-A5D6-28DB04C10000}) --
    No IMFTransforms found.

    EDIT: the IMFAttributes::GetAllocatedString call in this app is incorrect.  I pass a NULL for the "length" output parameter.  As it turns out, this must not be NULL because the call may be marshaled out-of-proc.

Page 1 of 1 (4 items)

May, 2010