Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenfilter.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS Kernel Streaming 00004 * FILE: drivers/wdm/audio/filters/splitter/filter.c 00005 * PURPOSE: Filter File Context Handling 00006 * PROGRAMMER: Johannes Anderwald 00007 */ 00008 00009 #include "precomp.h" 00010 00011 NTSTATUS 00012 NTAPI 00013 FilterProcess( 00014 IN PKSFILTER Filter, 00015 IN PKSPROCESSPIN_INDEXENTRY ProcessPinsIndex) 00016 { 00017 ULONG Index; 00018 PKSPROCESSPIN CurPin, Pin; 00019 BOOLEAN PendingFrames = FALSE; 00020 00021 if (ProcessPinsIndex->Count) 00022 { 00023 /* check if there are outstanding frames */ 00024 for(Index = 1; Index < ProcessPinsIndex->Count; Index++) 00025 { 00026 /* get current pin */ 00027 CurPin = ProcessPinsIndex->Pins[Index]; 00028 00029 if (CurPin->BytesAvailable && CurPin->Pin->DeviceState == KSSTATE_RUN) 00030 { 00031 /* pin has pending frames 00032 * to keep all pins synchronized, every pin has to wait untill each chained pin has send its frames downwards 00033 */ 00034 PendingFrames = TRUE; 00035 } 00036 } 00037 } 00038 00039 if (!PendingFrames && ProcessPinsIndex->Count) 00040 { 00041 /* get first pin */ 00042 Pin = ProcessPinsIndex->Pins[0]; 00043 00044 /* check if there is new data available */ 00045 if (Pin->BytesAvailable) 00046 { 00047 for(Index = 1; Index < ProcessPinsIndex->Count; Index++) 00048 { 00049 /* get current pin */ 00050 CurPin = ProcessPinsIndex->Pins[Index]; 00051 00052 /* copy the frame to pin */ 00053 RtlMoveMemory(CurPin->Data, Pin->Data, Pin->BytesAvailable); 00054 CurPin->BytesUsed = Pin->BytesAvailable; 00055 } 00056 } 00057 } 00058 /* done */ 00059 return STATUS_SUCCESS; 00060 } 00061 Generated on Thu May 24 2012 04:25:03 for ReactOS by
1.7.6.1
|