Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Thu, 19 May 2005 19:49:46 -0700
yinmun <yinmun@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>I have tried the method you proposed, but when I tried to retrieve the pin
>properties of my filter loaded using GraphEdit, it'll prompt me KSPROXY.AX
>encountered Access Violation error.
>
>My approach is as follows, please advise and point out my mistake, thanks.
Well, I see a mistake, but I'm not sure it's related. You don't set
IoStatus.Information in the "success" case.
I'm still confused as to why you have to do this. If you have your data
structures set up properly, AVStream should be handling this property for
you automatically.
> PKSMULTIPLE_ITEM pItem;
> PKSDATAFORMAT pDataRangePtr;
> switch(pKsProperty->Id)
> {
> case KSPROPERTY_PIN_CONSTRAINEDDATARANGES:
> {
> ULONG ulOutputSize = IoGetCurrentIrpStackLocation(pIrp) ->
>
>Parameters.DeviceIoControl.OutputBufferLength;
>
> int nCount = 1;
> int nMinBufferSize = sizeof(KSMULTIPLE_ITEM) +
> (nCount *
>(sizeof(KSDATAFORMAT)));
>
> if(pData != NULL && ulOutputSize >= nMinBufferSize)
> {
> pItem = (PKSMULTIPLE_ITEM)pData;
> pItem->Count = nCount;
> pItem->Size = nMinBufferSize;
>
> pDataRangePtr = (PKSDATAFORMAT)(pItem + 1);
> for(i = 0; i < nCount; i++)
> {
> RtlCopyMemory(pDataRangePtr,
> PinDefaultDataRanges[i],
> sizeof(KSDATAFORMAT));
> pDataRangePtr++;
> }
pIrp->IoStatus.Information = nMinBufferSize;
> Status = STATUS_SUCCESS;
> }
> else
> {
> pIrp->IoStatus.Information = nMinBufferSize;
> Status = STATUS_BUFFER_OVERFLOW;
> }
> }
> break;
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc
.
- Follow-Ups:
- References:
- Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream.
- From: yinmun
- Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream.
- From: Tim Roberts
- Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream
- From: yinmun
- Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream
- From: Tim Roberts
- Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream
- From: yinmun
- Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream.
- Prev by Date: Re: ATA device configuration overlay
- Next by Date: Re: After installing windows updates, we begin getting an error on boo
- Previous by thread: Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream
- Next by thread: Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream
- Index(es):
Relevant Pages
|
Loading