How to add audio capture pin using avstream

Hi

I want to write an avstream minidriver to capture audio,

are there some examples to study?

On Mar 29, 2015, at 8:35 AM, pccq_2002@126.com wrote:

I want to write an avstream minidriver to capture audio,

From what type of device?

are there some examples to study?

The AVSSAMP sample shows a video camera with a microphone. It is “filter-centric”, which is usually not what you want for an audio-only device, although it is possible to just remove the video pin. The AVSHWS sample is a pin-centric video-only sample.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi Tim

Thank you for your reply

I want to add an audio pin to the filter of AVSHWS sample

pccq_2002@126.com wrote:

Thank you for your reply

I want to add an audio pin to the filter of AVSHWS sample

OK, and what have you done so far?

You need to add a pin descriptor for the audio pin, with its own set of
data ranges. So you’ll have an array of two pins instead of an array of
just one. You’ll need to create an audio pin class, similar to the
video CCapturePin class. If you look at the avssamp sample, you’ll see
they have CCapturePin as a base class with common functions, and then
they derive CVideoCapturePin and CAudioCapturePin from it.

Much of the audio-specific stuff can be gleaned from the avssamp
sample. The only real difference between them is the callbacks.
Avssamp, being filter-centric, has one Process callback in
CCaptureFilter. If you are doing pin-centric, you’ll need Process
callbacks in the two pin classes.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.