[wdmaudiodev] Few Questions on AVStream

  • From: "swapnil kamble" <swap.kamble@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 7 Jan 2009 19:48:26 +0530

Hello Sam,
                  I have capture filter with orphan pin that is used as a
capture pin. Now I made this filter registered under "Audio Capture
Sources". It appears there too.
 Correct me, if I am wrong.
                  I am trying get the sink pin of the filter that we built,
as capture pin. Because that's the only pin that appears in the Capture
Filter. So Pin Struct is

Sink Pin =
     {
        &AudioCapturePinDispatch,
        NULL,
        {
            SIZEOF_ARRAY( PinInterfaces_Wave ),
            (KSPIN_INTERFACE*) &PinInterfaces_Wave,
            SIZEOF_ARRAY( PinMediums_Wave ),
            (KSPIN_MEDIUM*) &PinMediums_Wave,
            SIZEOF_ARRAY( PinAudioFormatRanges_WaveSink ),
            PinAudioFormatRanges_WaveSink,
            KSPIN_DATAFLOW_OUT,
            KSPIN_COMMUNICATION_SINK,
            &KSCATEGORY_AUDIO,                  // Category
            &g_PINNAME_AUDIO_CAPTURE,           // Name
            0
        },
            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,    //InstancesPossible
        0,    //InstancesNecessary
        &AllocatorFraming_Wave,
       reinterpret_cast <PFNKSINTERSECTHANDLEREX> // Intersect Handler
            (CAudioCapturePin::IntersectHandler)
    },

But with same dispatch table and same code except for few diff. i.e.

1. Size_ARRAY made to 0 & FilterDescriptor made to NULL

                 KSDEVICE_DESCRIPTOR
                 CaptureDeviceDescriptor = {

                  &CaptureDeviceDispatch,
                  0,        //SIZEOF_ARRAY (FilterDescriptors),
                  NULL,        //FilterDescriptors,
                   KSDEVICE_DESCRIPTOR_VERSION
                };

2.from  KSPIN_COMMUNICATION_BOTH       to
KSPIN_COMMUNICATION_SINK,

3. from NULL to
             SIZEOF_ARRAY( PinInterfaces_Wave ),
            (KSPIN_INTERFACE*) &PinInterfaces_Wave,
            SIZEOF_ARRAY( PinMediums_Wave ),
            (KSPIN_MEDIUM*) &PinMediums_Wave,

These are basically must for getting driver under "Audio Capture Sources".

My Problem is

1. when I right click on my Capture Pin and chooses "Render this Pin" my
IntersectHandler and DispatchSetFormat and DispatchSetCreate are invoked
repeatedly. And all call succeeds to return SUCSESS. But error comes as
"Filter Graph Can't Render this pin....No h/w avaialable with error code
(0x80040256)"
2. Next I manually insert a Audio Renderer Filter, and after that I say
"Render this Pin" then it connects but without calling a single function
from driver. After that when I press play, next prob arises,
DispatchSetState routine is not getting called. Even if the pointer is
correctly specified is Dispatch Table.

My same code works perfectly under "avssamp" sample but not when registered
under "Audio Capture Sources" with specified differences.

Thanks.
-- 
...Swapnil

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

Other related posts: