[wdmaudiodev] Re: AVStream - Dynamically constraining to a specific DataRange based on HW.

  • From: "Frank Berreth" <fberreth@xxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 10 Jul 2003 15:41:36 -0700

Wade,

 

There are cases where the data range intersection handler is not called.
It's when an application uses directks to open the pin directly.

In the normal case, when your pin gets opened with a data format that
doesn't match, once you return no_match the intersection handler should
be called and the pin opened again this time with the data format you
returned in the intersection handler.

 

-Frank.

 

This posting is provided "AS IS" with no warranties, and confers no
rights.

 

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Harry Graham
Sent: Thursday, July 10, 2003 2:59 PM
To: 'wdmaudiodev@xxxxxxxxxxxxx'
Subject: [wdmaudiodev] Re: AVStream - Dynamically constraining to a
specific DataRange based on HW.

 

Wade,

 

You should validate the format when the SetDataFormat dispatch is
invoked, and return STATUS_NO_MATCH if it does not correspond to the
currently available settings.  Also note that unless pOldFormat (the
second parameter) is set, then SetDataFormat only validates the format,
but does not actually set the format for the pin.

 

Whenever the format is actually set (either by SetDataFormat with
pOldFormat, or when the pin is created) you must also update the
allocator framing.

 

I don't think that you should ever need to KsEdit the
KSPIN_DESCRIPTOR_EX to remove formats that are not currently supported,
but it shouldn't hurt either.

 

Harry

 

-----Original Message-----
From: wade [mailto:wdawson61@xxxxxxxxx] 
Sent: Thursday, July 10, 2003 12:25 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] AVStream - Dynamically constraining to a specific
DataRange based on HW.

 

Hi:

 

I have a capture-only, pin-centric AVStreams capture driver. I need to
force clients of the driver to accept a specific bit-depth and sample
rate as dictated by the bitsream connect to my hardware. Does anyone
know the best way to do this?

I am attempting to KsEdit the KSPIN_DESCRIPTOR_EX datarange on the fly
to reflect ONLY the curent sample rate and bit depth, but don't know if
this is the right procedure.  I have also tried supplying an
IntersectHandler function through the IntersectHandler member of the
pin's KSPIN_DESCRIPTOR_EX structure.  I was hoping I could just return a
WAVEFORMATPCMEX structure which refelcts my current hardware reported
sample rate and bit depth.  Unfortunately, my IntersectHandler function
is never getting called.

Do I have to return STATUS_NO_MATCH from the pin's SetDataFormat()
dispatch at least once to force a format negotiation or something? I'm
curently returning STATUS_SUCESS form this dispatch.

 

Thanks for any help.

________________________________

Do you Yahoo!?
SBC Yahoo! DSL
<http://pa.yahoo.com/*http:/rd.yahoo.com/evt=1207/*http:/promo.yahoo.com
/sbc/>  - Now only $29.95 per month!

Other related posts: