[wdmaudiodev] Re: Few Questions on AVStream

  • From: "swapnil kamble" <swap.kamble@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 8 Jan 2009 10:18:54 +0530

On Thu, Jan 8, 2009 at 12:06 AM, Tim Roberts <timr@xxxxxxxxx> wrote:

> swapnil kamble wrote:
> >
> >                   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.
>
> I don't understand this.  Is it a capture filter (which has a source
> pin) or a render filter (which has a sink pin)?
>
Actually I am writing both filters. But, lets discuss right now about
Capture only.

>
>
> > 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
> >         },
> Bridge
> A sink pin will not have dataflow going OUT.  Sinks have data coming
> IN.  The name comes from plumbing.  Your sink has water coming IN.  The
> faucet is the source.

This sounds logical.But I saw the topology of my Sound Card on Virtual PC
i.e. "Sound Blaster 16" (its with topology filter). I tried to follow its
wave Filter design.
Its something like this.
//                    --------------------------
//                   |                                 |
//                   |     (1) ------------ (0)  |
//Bridge 1 o--|-->o--|Vol Node|--o>--|--o 0  Sink Pin
//                   |           ------------       |      (WaveIn 1,2)
//                   |                                 |
//                   |  (1) ------------ (0)     |
//           2 o--|-->o--|Vol Node|--o>--|--o 3  Bridge Pin
//  SinkPin     |      ------------            |
//                   |                                 |
//                   --------------------------

I used it, becuase that helped me to get my filter registered under "Audio
Capture Source" Catagory. Is this the correct way ? In graphedit I get one
pin of my capture filter which is obviously capture pin. How do I know which
pin is it of my filter ? I don't think it is out of 4 that I added. There is
no pin with name "capture" in my filter. Is it the default given to us when
registered under "Audio Capture Source" ? Because I did not got such pin
when my filter was under "WDM Streaming Capture Sources".

>
>
>
> > 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".
>
> For an audio capture source, you do not want KSPIN_COMMUNICATION_SINK.
> Use either SOURCE or BOTH.

I have tried both options earlier too. But still same problem is there.

>
>
>
> > 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)"
>
> That's VFW_E_NO_AUDIO_HARDWARE.  Do you actually have a sound card in
> this computer?

Yes I do have a sound card. Infact as I mentioned, it connects to that sound
card when I manually insert the renderer sound card filter and then says
"Render this Pin" my filter automatically connects to it. But then does not
reaches to driver for DispatchSetState when pressed "Play Button".

>
>
> --
> Tim Roberts, timr@xxxxxxxxx
> Providenza & Boekelheide, Inc.
>
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
>
>


-- 
...Swapnil

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

Other related posts: