[wdmaudiodev] Re: AVStream driver as a both Capture and Renderer Filter

  • From: "Sam Tertzakian" <sam@xxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>, <dsisolak@xxxxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 14 Jan 2009 06:36:34 -0800

You data flows are wrong.

 

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of swapnil kamble
Sent: Tuesday, January 13, 2009 10:02 PM
To: wdmaudiodev@xxxxxxxxxxxxx; dsisolak@xxxxxxxxxxxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: AVStream driver as a both Capture and Renderer
Filter

 

Hi,
    My pin descriptor looks like this,

const
KSPIN_DESCRIPTOR_EX
FilterPinDescriptors [CAPTURE_FILTER_PIN_COUNT] = {
    //
    // Audio Capture Pin
    //
    {
        &AudioCapturePinDispatch,
        NULL,
        {
            NULL,                               // Interfaces (NULL, 0 ==
default)
            0,
            NULL,                               // Mediums (NULL, 0 ==
default)
            0,
            SIZEOF_ARRAY( PinAudioFormatRanges_Wave ),
            PinAudioFormatRanges_Wave,
            KSPIN_DATAFLOW_OUT,               // Dataflow
            KSPIN_COMMUNICATION_BOTH,           // Communication
            &KSCATEGORY_AUDIO,                  // Category
            &g_PINNAME_AUDIO_CAPTURE,           // Name
            0                                   // Reserved
        },
        KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | // Flags
            KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING |
            KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY |
            KSPIN_FLAG_FIXED_FORMAT,
        1,                                      // Instances Possible
        1,                                      // Instances Necessary
        &AudioDefaultAllocatorFraming,          // Allocator Framing (filled
later)
        reinterpret_cast <PFNKSINTERSECTHANDLEREX> // Intersect Handler
            (CAudioCapturePin::IntersectHandler)
    },
    //Bridge PIN
    {
        NULL,
        NULL,
        {
            NULL,                               // Interfaces (NULL, 0 ==
default)
            0,
            NULL,                               // Mediums (NULL, 0 ==
default)
            0,
            SIZEOF_ARRAY( PinAudioFormatRanges_WaveBridge ),
            PinAudioFormatRanges_WaveBridge,
            KSPIN_DATAFLOW_IN,
            KSPIN_COMMUNICATION_NONE,
            &KSCATEGORY_AUDIO,                  // Category
            &g_PINNAME_AUDIO_CAPTURE,           // Name
            0
        },
        0,
        0,
        0,
        NULL,
        NULL
    },
    //
    // Audio Renderer Pin
    //
    {
        &AudioRenderPinDispatch,
        NULL,
        {
            NULL,                               // Interfaces (NULL, 0 ==
default)
            0,
            NULL,                               // Mediums (NULL, 0 ==
default)
            0,
            SIZEOF_ARRAY( PinAudioFormatRanges_Wave ),
            PinAudioFormatRanges_Wave,
            KSPIN_DATAFLOW_OUT,                 // Dataflow
            KSPIN_COMMUNICATION_SINK,           // Communication
            &KSCATEGORY_AUDIO,                  // Category
            &g_PINNAME_AUDIO_RENDER,           // Name
            0                                   // Reserved
        },
        KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | // Flags
            KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING |
            KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY |
            KSPIN_FLAG_FIXED_FORMAT|
            KSPIN_FLAG_RENDERER,
        1,                                      // Instances Possible
        1,                                      // Instances Necessary
        &AudioDefaultAllocatorFraming,          // Allocator Framing (filled
later)
        reinterpret_cast <PFNKSINTERSECTHANDLEREX> // Intersect Handler
            (CAudioCapturePin::IntersectHandler1)
    },
    //Bridge PIN
    {
        NULL,
        NULL,
        {
            NULL,                               // Interfaces (NULL, 0 ==
default)
            0,
            NULL,                               // Mediums (NULL, 0 ==
default)
            0,
            SIZEOF_ARRAY( PinAudioFormatRanges_WaveBridge ),
            PinAudioFormatRanges_WaveBridge,
            KSPIN_DATAFLOW_IN,
            KSPIN_COMMUNICATION_NONE,
            &KSCATEGORY_AUDIO,                  // Category
            &g_PINNAME_AUDIO_RENDER,           // Name
            0
        },
        0,
        0,
        0,
        NULL,
        NULL
    },
   
};

Along with that I am using two volume nodes. So KsStudio shows my topology
as,
//                    --------------------------
//                   |                            |
//                   |     (1) ------------ (0)  |
//Bridge 1 o--|-->o--|Vol Node|--o>--|--o 0  Comm Both Pin
//                   |           ------------     |      (WaveIn 1,2)
//                   |                                 
//                  |  (1) ------------ (0)      |
//           2 o--|-->o--|Vol Node|--o>--|--o 3  Bridge Pin
//  WaveOut  |         ------------          |
//                 |                               |
//                   --------------------------



This is not true. The driver can have both a render and capture pin on a
single filter. (This is how the USB Audio class driver works.). As to why
this is not working, I am not sure. I would need more info on the topology.
KsStudio.exe may be your friend here if you have the WDK.

 

 

DJ

 

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Tim Roberts
Sent: Tuesday, January 13, 2009 9:39 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: AVStream driver as a both Capture and Renderer
Filter

 

swapnil kamble wrote: 


                     I am having problems in designing topology for my
driver. I have developed Capture/Renderer filter with following topology
works perfectly fine for me.
...

But when I combine both of them and make topology as,


Why are you trying to combine then?




I assume here that my pin 0 will become capture pin and pin 2 will become
renderer pin. Is there anything mismatching between my assumption and my
topology ?


There is certainly one very big problem with this topology:  a single filter
cannot be both a source (capturer) and a sink (renderer).  Are you trying to
make a transform filter?

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.




-- 
...Swapnil

|| Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
|| Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||

Other related posts: