Re: About capture stream data in bda
- From: WilliamX <fantast_xue@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Apr 2005 11:16:19 +0800
I coded the process routine as following:
Is there something wrong with my codes?
NTSTATUS
CCapturePin::DispatchProcess(IN PKSPIN p_ks_pin)
{
NTSTATUS status = STATUS_SUCCESS;
PKSSTREAM_POINTER p_ks_sp_leading =
KsPinGetLeadingEdgeStreamPointer(p_ks_pin,
KSSTREAM_POINTER_STATE_LOCKED);
PKSSTREAM_POINTER p_ks_sp_clone;
status = KsStreamPointerClone(p_ks_sp_leading,
NULL,
0,//sizeof(STREAM_POINTER_CONTEXT),
&p_ks_sp_clone);
KsStreamPointerUnlock(p_ks_sp_leading, FALSE);
KsStreamPointerAdvance(p_ks_sp_leading);
m_p_smaple_buf = p_ks_sp_clone->StreamHeader->Data;
ULONG ul_data_Len = 0;
while (NT_SUCCESS(status) && p_ks_sp_clone != NULL
&& ul_data_Len < p_ks_sp_clone->OffsetOut.Count)
{
if (m_p_dev_obj == NULL)
{
break;
}
ReadDataFromUsb(m_p_dev_obj,
PIPE_DATA,
m_p_smaple_buf,
READ_DATA_SIZE);
ul_data_Len += READ_DATA_SIZE;
m_p_smaple_buf = (PVOID)((PUCHAR)m_p_smaple_buf + READ_DATA_SIZE);
p_ks_sp_clone->StreamHeader->DataUsed += READ_DATA_SIZE;
LARGE_INTEGER li_wait;
li_wait.QuadPart = -(10000); // 1 ms
KeDelayExecutionThread(KernelMode,
FALSE,
&li_wait);
}
return status;
}
"Max Paklin" <mpaklin@xxxxxxxxxxx> writes:
> Did you put the size of the data in DataUsed?
>
>
> "WilliamX" <fantast_xue@xxxxxxxxxxxxxxxxxxx> wrote in message
> news:ufyxdin57.fsf@xxxxxxxxxxxxxxxxxxxxxx
>>
>> I have studied the ddk samples and it seems to use stream pointer to
>> transmit the data in routine 'Process'.
>> If it is true, how to fill the stream pointer? The sample is using DMA
>> and mapping, but my driver is without DMA.
>> I filled the parameter 'data' of 'stream header' of 'stream pointer',
>> but it seems that nothing happened.
>>
>> And, my driver is a pin-centric minidriver.
>>
>> So, how to transmit the data to the next filter?
>>
>> Thanks!
>>
>> WilliamX <fantast_xue@xxxxxxxxxxxxxxxxxxx> writes:
>>
>>> Hi,
>>> I wrote two bda filters (tuner/demod, and capture), but now, I puzzled
>>> where could I capture the stream from device.
>>>
>>> First, I thought that it should be in tuner/demod filter. So I
>>> reviewed the generictuner, the sample with ddk, but I failed to find
>>> any usefull information whithin it.
>>>
>>> And I reviewed the capturesample too, it seemed that the routine
>>> Process dealt with the stream data, but I don't know where the stream
>>> came from.
>>>
>>> Could you give me some instructions?
>>>
>>> Any comments are welcome!
>>>
>>> Advance thanks!
>>> William
.
- Follow-Ups:
- Re: About capture stream data in bda
- From: Max Paklin
- Re: About capture stream data in bda
- References:
- About capture stream data in bda
- From: WilliamX
- Re: About capture stream data in bda
- From: WilliamX
- Re: About capture stream data in bda
- From: Max Paklin
- About capture stream data in bda
- Prev by Date: Re: Calling NTKERNEL Mm functions from D3D Driver
- Next by Date: Re: Calling NTKERNEL Mm functions from D3D Driver
- Previous by thread: Re: About capture stream data in bda
- Next by thread: Re: About capture stream data in bda
- Index(es):
Relevant Pages
|
Loading