Dear All,

I met some AVStream questions and described them as following

Q1: How to change raw audio sampling rate in AVStream driver?
I want to make sure my understanding is correct or not.
step1 : receive a IO control from application program.
step2 : use KsEdit to modify the datarange infos in this pin
descriptor.
step3 : reconnect this connection.
Am I correct? Please let me know if I lost some points.

Q2: How to support "dynamic format change" capability on one pin of an
AVStream filter? Do I need to implement KSPROPSETID_Connection? What its
items should (or MUST) I implement if the previous answer is YES?
For example,
KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT,
KSPROPERTY_CONNECTION_DATAFORMAT,...

Any commnet and suggestion are very welcome and appreciated.

Thanks,
Edward

Re: AVStream : dynamic format change by Max

Max
Mon Dec 13 13:58:34 CST 2004

> Q1: How to change raw audio sampling rate in AVStream driver?
> I want to make sure my understanding is correct or not.
> step1 : receive a IO control from application program.
> step2 : use KsEdit to modify the datarange infos in this pin
> descriptor.
> step3 : reconnect this connection.
> Am I correct? Please let me know if I lost some points.

This should work.


> Q2: How to support "dynamic format change" capability on one pin of an
> AVStream filter? Do I need to implement KSPROPSETID_Connection? What its
> items should (or MUST) I implement if the previous answer is YES?
> For example,
> KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT,
> KSPROPERTY_CONNECTION_DATAFORMAT,...

Normally you don't need to implement KSPROPERTYSETID_Connection.
Can you define how you understand dynamic format changes? To me it is
something that is done when the graph is streaming. Are we on the same page?

-- Max.



Re: AVStream : dynamic format change by EdwardHsu

EdwardHsu
Wed Dec 15 19:29:03 CST 2004

Hi Max,

Thanks your comments.

I could change audio sampling rate now but I met another problem. I
could only change audio sampling rate when the raw audio pin instance is
created (DispatchCreate is called.) Because I used KsFilterGetFirstChildPin
function to get PKSPIN structure of a raw audio pin. Is it possible to change
audio sampling rate when no raw audio pin is instantiated (before
DispatchCreate is called.)? How to do it if it is possible?

Regarding to dynamic format change issue, I think perhaps Video Renderer
filter will ask my raw video pin to change format when start streaming. So I
think maybe I need to implement KSPROPERTYSETID_Connection for "Video
Renderer" filter to propose format and set format. Is my concept correct?

Thanks,
Edward

"Max Paklin" wrote:

> > Q1: How to change raw audio sampling rate in AVStream driver?
> > I want to make sure my understanding is correct or not.
> > step1 : receive a IO control from application program.
> > step2 : use KsEdit to modify the datarange infos in this pin
> > descriptor.
> > step3 : reconnect this connection.
> > Am I correct? Please let me know if I lost some points.
>
> This should work.
>
>
> > Q2: How to support "dynamic format change" capability on one pin of an
> > AVStream filter? Do I need to implement KSPROPSETID_Connection? What its
> > items should (or MUST) I implement if the previous answer is YES?
> > For example,
> > KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT,
> > KSPROPERTY_CONNECTION_DATAFORMAT,...
>
> Normally you don't need to implement KSPROPERTYSETID_Connection.
> Can you define how you understand dynamic format changes? To me it is
> something that is done when the graph is streaming. Are we on the same page?
>
> -- Max.
>
>
>

Re: AVStream : dynamic format change by Max

Max
Fri Dec 17 00:54:29 CST 2004

> I could change audio sampling rate now but I met another problem. I
> could only change audio sampling rate when the raw audio pin instance is
> created (DispatchCreate is called.) Because I used
> KsFilterGetFirstChildPin
> function to get PKSPIN structure of a raw audio pin. Is it possible to
> change
> audio sampling rate when no raw audio pin is instantiated (before
> DispatchCreate is called.)? How to do it if it is possible?

No, I don't think it is possible.
Between the time when you register filters/pins (usually from DriverEntry)
and the time when KS creates a pin things are out of your reach.



> Regarding to dynamic format change issue, I think perhaps Video
> Renderer
> filter will ask my raw video pin to change format when start streaming. So
> I
> think maybe I need to implement KSPROPERTYSETID_Connection for "Video
> Renderer" filter to propose format and set format. Is my concept correct?

I already asked you more than once what dynamic format change means for you.
Given the fact that you don't specify what exactly you mean by that it's
hard to guess what can and can not help you.
KSPROPERTYSETID_Connection? It is not defined anywhere...

-- Max.