Re: About capture stream data in bda




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
.



Relevant Pages

  • Re: sound rendering problem
    ... What part needs to be modified (kernel msvad, or some user mode filter ... between capture and renderer). ... real waveOut device (or some other stream interface) and send a continuous ... replicate the identical interval in your driver source to hand out your ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: AVStream : How to save a MPEG2-PS stream to a file?
    ... > I find it very hard to believe that a memory copy for PS stream will yeild ... > memory copy of data on Capture pin for my Still-Frame pin. ... > testing purposes to try to beat the heck out of my driver. ... >> I use RtlCopyMemory to copy frame buffers of PREVIEW pin to CAPTURE ...
    (microsoft.public.development.device.drivers)
  • Need help writing coroutine
    ... emits chunks in pieces. ... The other routine takes each chunk, ... it can make a copy of the stream with the score appended on. ... def is_odd: ...
    (comp.lang.python)
  • Re: Binary serialization
    ... Previously I would use a file write routine that worked ... DATA members from the class in question the method of writing each ... the base class where you collect the data in to a byte array which is ... then written to the stream by the base class. ...
    (microsoft.public.dotnet.general)
  • Re: Binary or Ascii Text?
    ... interactive scanf and other routines, because the C stream is never ... sure whether the field terminating char has been used or is still ... some other input routine and doesn't have the discipline to define ...
    (comp.lang.c)

Loading