亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? capmain.h

?? 《Windows驅動開發技術詳解》TestCap樣例修正(VC++ 6.0編譯版)
?? H
字號:
//==========================================================================;
//
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
//  PURPOSE.
//
//  Copyright (c) 1992 - 1999  Microsoft Corporation.  All Rights Reserved.
//
//==========================================================================;

#ifndef __CAPMAIN_H__
#define __CAPMAIN_H__

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

// ------------------------------------------------------------------------
// The master list of all streams supported by this driver
// ------------------------------------------------------------------------

// Warning:  The stream numbers below MUST be the same as its position
//           in the Streams[] array in the capstrm.h file.
typedef enum {
    STREAM_Capture = 0,
    STREAM_Preview,
    STREAM_VBI,
    STREAM_CC,
    STREAM_NABTS,
    STREAM_AnalogVideoInput,
    MAX_TESTCAP_STREAMS         // This entry MUST be last; it's the size
}; 

// ------------------------------------------------------------------------
//  Other misc stuff
// ------------------------------------------------------------------------

#ifndef FIELDOFFSET
#define FIELDOFFSET(type, field)        ((LONG_PTR)(&((type *)1)->field)-1)
#endif

#ifndef mmioFOURCC    
#define mmioFOURCC( ch0, ch1, ch2, ch3 )                \
        ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) |    \
        ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
#endif
  
#define FOURCC_YUV422       mmioFOURCC('U', 'Y', 'V', 'Y')

typedef struct _STREAMX;
typedef struct _STREAMX *PSTREAMX;

typedef struct _COMPRESSION_SETTINGS {
    LONG                     CompressionKeyFrameRate;
    LONG                     CompressionPFramesPerKeyFrame;
    LONG                     CompressionQuality;
} COMPRESSION_SETTINGS, *PCOMPRESSION_SETTINGS;

//
// definition of the full HW device extension structure This is the structure
// that will be allocated in HW_INITIALIZATION by the stream class driver
// Any information that is used in processing a device request (as opposed to
// a STREAM based request) should be in this structure.  A pointer to this
// structure will be passed in all requests to the minidriver. (See
// HW_STREAM_REQUEST_BLOCK in STRMINI.H)
//

typedef struct _HW_DEVICE_EXTENSION {
    PULONG                   ioBaseLocal;                           // board base address
    USHORT                   Irq;                                   // IRQ level
    BOOLEAN                  IRQExpected;                           // IRQ expected
    PSTREAMX                 pStrmEx [MAX_TESTCAP_STREAMS];         // Pointers to each stream
    UINT                     ActualInstances [MAX_TESTCAP_STREAMS]; // Counter of instances per stream
    PDEVICE_OBJECT           PDO;                                   // Physical Device Object
    DEVICE_POWER_STATE       DeviceState;                           // D0 ... D3

    // Spinlock and Queue for the Adapter
    BOOL                     AdapterQueueInitialized;               // Stays TRUE after first init
    KSPIN_LOCK               AdapterSpinLock;                       // Multiprocessor safe access to AdapterSRBList
    LIST_ENTRY               AdapterSRBList;                        // List of pending adapter commands
    BOOL                     ProcessingAdapterSRB;                  // Master flag which prevents reentry

    // Spinlocks and Queues for each data stream
    LIST_ENTRY               StreamSRBList[MAX_TESTCAP_STREAMS];    // List of pending read requests
    KSPIN_LOCK               StreamSRBSpinLock[MAX_TESTCAP_STREAMS];// Multiprocessor safe access to StreamSRBList
    int                      StreamSRBListSize[MAX_TESTCAP_STREAMS];// Number of entries in the list

    // Control Queues for each data stream
    LIST_ENTRY               StreamControlSRBList[MAX_TESTCAP_STREAMS];
    BOOL                     ProcessingControlSRB[MAX_TESTCAP_STREAMS];

    // Unique identifier for the analog video input pin
    KSPIN_MEDIUM             AnalogVideoInputMedium;
    UINT                     DriverMediumInstanceCount;             // Unique Medium.Id for multiple cards

    // VideoProcAmp settings
    LONG                     Brightness;
    LONG                     BrightnessFlags;
    LONG                     Contrast;
    LONG                     ContrastFlags;
    LONG                     ColorEnable;
    LONG                     ColorEnableFlags;
    
    // CameraControl settings
    LONG                     Focus;
    LONG                     FocusFlags;
    LONG                     Zoom;
    LONG                     ZoomFlags;
    
    // VideoControl settings (these are set if a pin is not opened,
    // otherwise, the STREAMEX values are used.
    LONG                     VideoControlMode;

    // Compressor settings (these are set if a pin is not opened,
    // otherwise, the STREAMEX values are used.
    COMPRESSION_SETTINGS     CompressionSettings;

    // Bits indicating protection status; eg, has Macrovision been detected?
    ULONG                    ProtectionStatus;

} HW_DEVICE_EXTENSION, *PHW_DEVICE_EXTENSION;

//
// this structure is our per stream extension structure.  This stores
// information that is relevant on a per stream basis.  Whenever a new stream
// is opened, the stream class driver will allocate whatever extension size
// is specified in the HwInitData.PerStreamExtensionSize.
//
 
typedef struct _STREAMEX {
    PHW_DEVICE_EXTENSION        pHwDevExt;          // For timer use
    PHW_STREAM_OBJECT           pStreamObject;      // For timer use
    KS_VIDEOINFOHEADER         *pVideoInfoHeader;   // format (variable size!)
    KS_DATARANGE_VIDEO_VBI     *pVBIStreamFormat;
    KS_FRAME_INFO               FrameInfo;          // PictureNumber, etc.
    KS_VBI_FRAME_INFO           VBIFrameInfo;       // PictureNumber, etc.
    ULONG                       fDiscontinuity;     // Discontinuity since last valid
    KSSTATE                     KSState;            // Run, Stop, Pause
    UCHAR                       LineBuffer[720 * 3];// working buffer (RGB24)

    // Clock 
    HANDLE                      hMasterClock;       // Master clock to use
    REFERENCE_TIME              QST_Now;            // KeQuerySystemTime currently
    REFERENCE_TIME              QST_NextFrame;      // When to capture the next frame
    REFERENCE_TIME              QST_StreamTime;     // Stream time reported by master clock

    REFERENCE_TIME              AvgTimePerFrame;    // Extracted from pVideoInfoHeader

    // Compressor settings (note these are duplicated in the 
    // HW_DEVICE_EXTENSION to allow setting these before a pin is created)
    COMPRESSION_SETTINGS        CompressionSettings;

    // VideoControl settings (note these are duplicated in the 
    // HW_DEVICE_EXTENSION to allow setting these before a pin is created)
    LONG                        VideoControlMode;

    // Kernel DDraw interface
    BOOL                        KernelDirectDrawRegistered;
    HANDLE                      UserDirectDrawHandle;       // DD itself
    HANDLE                      KernelDirectDrawHandle;
    BOOL                        PreEventOccurred;
    BOOL                        PostEventOccurred;

    BOOL                        SentVBIInfoHeader;
} STREAMEX, *PSTREAMEX;

//
// this structure defines the per request extension.  It defines any storage
// space that the mini driver may need in each request packet.
//

typedef struct _SRB_EXTENSION {
    LIST_ENTRY                  ListEntry;
    PHW_STREAM_REQUEST_BLOCK    pSrb;
    HANDLE                      UserSurfaceHandle;      // DDraw
    HANDLE                      KernelSurfaceHandle;    // DDraw
} SRB_EXTENSION, * PSRB_EXTENSION;

// -------------------------------------------------------------------
//
// Adapter level prototypes
//
// These functions affect the device as a whole, as opposed to 
// affecting individual streams.
//
// -------------------------------------------------------------------

//
// DriverEntry:
//
// This routine is called when the mini driver is first loaded.  The driver
// should then call the StreamClassRegisterAdapter function to register with
// the stream class driver
//

ULONG DriverEntry (PVOID Context1, PVOID Context2);

//
// This routine is called by the stream class driver with configuration
// information for an adapter that the mini driver should load on.  The mini
// driver should still perform a small verification to determine that the
// adapter is present at the specified addresses, but should not attempt to
// find an adapter as it would have with previous NT miniports.
//
// All initialization of the adapter should also be performed at this time.
//

BOOLEAN STREAMAPI HwInitialize (IN OUT PHW_STREAM_REQUEST_BLOCK pSrb);

//
// This routine is called when the system is going to remove or disable the
// device.
//
// The mini-driver should free any system resources that it allocated at this
// time.  Note that system resources allocated for the mini-driver by the
// stream class driver will be free'd by the stream driver, and should not be
// free'd in this routine.  (Such as the HW_DEVICE_EXTENSION)
//

BOOLEAN STREAMAPI HwUnInitialize ( PHW_STREAM_REQUEST_BLOCK pSrb);

//
// This is the prototype for the Hardware Interrupt Handler.  This routine
// will be called whenever the minidriver receives an interrupt
//

BOOLEAN HwInterrupt ( IN PHW_DEVICE_EXTENSION pDeviceExtension );

//
// This is the prototype for the stream enumeration function.  This routine
// provides the stream class driver with the information on data stream types
// supported
//

VOID STREAMAPI AdapterStreamInfo(PHW_STREAM_REQUEST_BLOCK pSrb);

//
// This is the prototype for the stream open function
//

VOID STREAMAPI AdapterOpenStream(PHW_STREAM_REQUEST_BLOCK pSrb);

//
// This is the prototype for the stream close function
//

VOID STREAMAPI AdapterCloseStream(PHW_STREAM_REQUEST_BLOCK pSrb);

//
// This is the prototype for the AdapterReceivePacket routine.  This is the
// entry point for command packets that are sent to the adapter (not to a
// specific open stream)
//

VOID STREAMAPI AdapterReceivePacket(IN PHW_STREAM_REQUEST_BLOCK Srb);

//
// This is the protoype for the cancel packet routine.  This routine enables
// the stream class driver to cancel an outstanding packet.
//

VOID STREAMAPI AdapterCancelPacket(IN PHW_STREAM_REQUEST_BLOCK Srb);

//
// This is the packet timeout function.  The adapter may choose to ignore a
// packet timeout, or rest the adapter and cancel the requests, as required.
//

VOID STREAMAPI AdapterTimeoutPacket(IN PHW_STREAM_REQUEST_BLOCK Srb);

//
// Adapter level property set handling
//

VOID STREAMAPI AdapterSetVideoProcAmpProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterGetVideoProcAmpProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterSetCameraControlProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterGetCameraControlProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterSetVideoControlProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterGetVideoControlProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterGetVideoCompressionProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterSetVideoCompressionProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterSetProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI AdapterGetProperty(IN PHW_STREAM_REQUEST_BLOCK pSrb);

BOOL
STREAMAPI 
AdapterVerifyFormat(
        PKSDATAFORMAT pKSDataFormatToVerify, 
        int StreamNumber);

BOOL
STREAMAPI 
AdapterFormatFromRange(
        IN PHW_STREAM_REQUEST_BLOCK pSrb);

VOID
STREAMAPI 
CompleteDeviceSRB (
         IN PHW_STREAM_REQUEST_BLOCK pSrb
        );

//
// prototypes for general queue management using a busy flag
//

BOOL
STREAMAPI 
AddToListIfBusy (
    IN PHW_STREAM_REQUEST_BLOCK pSrb,
    IN KSPIN_LOCK              *SpinLock,
    IN OUT BOOL                *BusyFlag,
    IN LIST_ENTRY              *ListHead
    );

BOOL
STREAMAPI 
RemoveFromListIfAvailable (
    IN OUT PHW_STREAM_REQUEST_BLOCK *pSrb,
    IN KSPIN_LOCK                   *SpinLock,
    IN OUT BOOL                     *BusyFlag,
    IN LIST_ENTRY                   *ListHead
    );


// -------------------------------------------------------------------
//
// Stream level prototypes
//
// These functions affect individual streams, as opposed to
// affecting the device as a whole.
//
// -------------------------------------------------------------------

//
// Routines to manage the SRB queue on a per stream basis
//

VOID
STREAMAPI 
VideoQueueAddSRB (
    IN PHW_STREAM_REQUEST_BLOCK pSrb
    );

PHW_STREAM_REQUEST_BLOCK 
STREAMAPI 
VideoQueueRemoveSRB (
    PHW_DEVICE_EXTENSION pHwDevExt,
    int StreamNumber
    );

VOID
STREAMAPI 
VideoQueueCancelAllSRBs (
    PSTREAMEX pStrmEx
    );

BOOL
STREAMAPI 
VideoQueueCancelOneSRB (
    PSTREAMEX pStrmEx,
    PHW_STREAM_REQUEST_BLOCK pSrbToCancel
    );

//
// StreamFormat declarations
//

//
// Data packet handlers
//
//
// prototypes for data handling routines
//
VOID STREAMAPI CompleteStreamSRB (IN PHW_STREAM_REQUEST_BLOCK pSrb);
BOOL STREAMAPI VideoSetFormat(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI VideoReceiveDataPacket(IN PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI VideoReceiveCtrlPacket(IN PHW_STREAM_REQUEST_BLOCK pSrb);

VOID STREAMAPI EnableIRQ(PHW_STREAM_OBJECT pstrm);
VOID STREAMAPI DisableIRQ(PHW_STREAM_OBJECT pstrm);

//
// prototypes for properties and states
//

VOID STREAMAPI VideoSetState(PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI VideoGetState(PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI VideoSetProperty(PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI VideoGetProperty(PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI VideoStreamGetConnectionProperty (PHW_STREAM_REQUEST_BLOCK pSrb);
VOID STREAMAPI VideoStreamGetDroppedFramesProperty(PHW_STREAM_REQUEST_BLOCK pSrb);

// 
// stream clock functions
//
VOID 
STREAMAPI 
VideoIndicateMasterClock (PHW_STREAM_REQUEST_BLOCK pSrb);

//
// The point of it all
// 
VOID 
STREAMAPI 
VideoCaptureRoutine(
    IN PSTREAMEX pStrmEx
    );

#ifdef    __cplusplus
}
#endif // __cplusplus

#endif //__CAPMAIN_H__


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区久久| 一本久久综合亚洲鲁鲁五月天| 亚洲另类在线一区| 国产精品美女久久福利网站| 国产色婷婷亚洲99精品小说| 国产视频一区在线观看 | 亚洲国产精品v| 国产精品激情偷乱一区二区∴| 中文在线免费一区三区高中清不卡| 国产欧美精品在线观看| 中文字幕佐山爱一区二区免费| 综合中文字幕亚洲| 亚洲国产日韩a在线播放性色| 亚洲成人资源在线| 蜜臀91精品一区二区三区 | 亚洲国产精品99久久久久久久久 | 亚洲一区免费观看| 丝袜诱惑亚洲看片| 极品少妇一区二区| 东方aⅴ免费观看久久av| 色视频欧美一区二区三区| 欧美日本免费一区二区三区| 日韩欧美在线不卡| 国产精品乱码人人做人人爱| 一区二区久久久久| 蜜桃视频第一区免费观看| 国产高清成人在线| 日本久久电影网| 久久亚洲免费视频| 亚洲在线视频一区| 国产福利91精品一区| 91国产成人在线| 日韩一级大片在线| 亚洲视频图片小说| 精品中文字幕一区二区| 色综合久久中文字幕| 精品久久久久久久久久久院品网 | 欧美精品一区二区三区在线播放 | 欧美肥妇bbw| 国产日韩欧美a| 日本不卡免费在线视频| 色av一区二区| 26uuu精品一区二区三区四区在线| 亚洲婷婷国产精品电影人久久| 日本三级亚洲精品| 在线观看国产日韩| 日本一区二区久久| 韩日精品视频一区| 555夜色666亚洲国产免| 中文字幕一区免费在线观看| 日本少妇一区二区| 欧美亚洲综合在线| 国产精品成人免费| 国产美女一区二区三区| 欧美一区二区三区不卡| 亚洲午夜久久久久久久久久久| 成人动漫一区二区在线| 精品国产91久久久久久久妲己 | 欧美日韩一区不卡| 亚洲精品中文字幕在线观看| 国产成人精品免费网站| 精品久久国产字幕高潮| 免费观看30秒视频久久| 欧美精品丝袜中出| 爽好多水快深点欧美视频| 91激情五月电影| 玉米视频成人免费看| 99精品久久只有精品| 国产精品天天看| 99久久综合精品| 中文欧美字幕免费| 成人免费高清视频在线观看| 久久久精品欧美丰满| 国产精品一二三四| 国产精品三级视频| www.激情成人| 亚洲男女毛片无遮挡| 欧美最新大片在线看| 亚洲午夜精品久久久久久久久| 91福利社在线观看| 五月天中文字幕一区二区| 在线成人免费观看| 极品美女销魂一区二区三区| 欧美成人精精品一区二区频| 国产精品综合视频| 中文字幕一区二区三区色视频 | 国产精品中文字幕一区二区三区| 久久这里只精品最新地址| 国产精品一区二区久激情瑜伽| 国产女人aaa级久久久级 | 欧美电影影音先锋| 精品在线观看免费| 国产精品区一区二区三区| 91蜜桃网址入口| 视频一区二区中文字幕| 精品久久久久久久久久久久包黑料| 国产精品影视天天线| 亚洲人吸女人奶水| 欧美一级搡bbbb搡bbbb| 成人免费毛片高清视频| 亚洲精品v日韩精品| 日韩精品中文字幕一区| 成人av网站免费| 亚洲高清在线视频| 国产欧美一区视频| 欧美日韩一区二区三区不卡| 国产精品中文有码| 午夜视频在线观看一区二区三区| 久久青草欧美一区二区三区| 99国产精品久| 六月丁香婷婷色狠狠久久| ●精品国产综合乱码久久久久 | 日本高清不卡视频| 激情五月激情综合网| 亚洲午夜在线电影| 欧美国产精品中文字幕| 欧美午夜精品久久久| 国产精品性做久久久久久| 午夜视频一区二区三区| 国产精品久久久久久久久晋中| 欧美老肥妇做.爰bbww| gogo大胆日本视频一区| 精品一区二区久久| 天堂av在线一区| 一区二区三区丝袜| 亚洲婷婷综合久久一本伊一区| 精品理论电影在线观看| 这里只有精品电影| 色妞www精品视频| 国产成人av资源| 国产九色sp调教91| 久久精品国产成人一区二区三区| 亚洲国产精品视频| 亚洲天堂久久久久久久| 久久久久久99精品| 久久人人爽爽爽人久久久| 91精品国产高清一区二区三区| 色婷婷综合久久久中文字幕| 99久久久久免费精品国产| 国产成+人+日韩+欧美+亚洲| 韩国v欧美v亚洲v日本v| 久久爱www久久做| 久久综合综合久久综合| 美女爽到高潮91| 天天综合网 天天综合色| 亚洲一二三四区不卡| 亚洲电影一区二区| 亚洲mv大片欧洲mv大片精品| 亚洲成人精品影院| 亚欧色一区w666天堂| 日韩精品亚洲专区| 日本不卡高清视频| 久久精品免费看| 国产精品一线二线三线| 国产电影精品久久禁18| 大桥未久av一区二区三区中文| 成人免费视频caoporn| 97se狠狠狠综合亚洲狠狠| 日本韩国一区二区| 5858s免费视频成人| 日韩一区二区不卡| 国产欧美日韩精品a在线观看| 亚洲精品ww久久久久久p站| 一区二区三区高清在线| 亚洲午夜激情网站| 免费成人结看片| 国产九色精品成人porny| 99热在这里有精品免费| 欧美亚洲一区二区三区四区| 7777精品久久久大香线蕉| 欧美一区二区不卡视频| 久久精品一区二区三区四区| 中文字幕一区二区三区av| 亚洲国产另类av| 国产一区在线精品| 日本韩国一区二区三区视频| 欧美一区二区三区人| 日本一区二区免费在线观看视频| 亚洲同性同志一二三专区| 免费在线观看一区| 97aⅴ精品视频一二三区| 91精品婷婷国产综合久久性色| 久久精品人人爽人人爽| 一区二区三区鲁丝不卡| 麻豆国产精品一区二区三区| 成人精品视频一区二区三区尤物| 欧美三级一区二区| 久久人人爽人人爽| 天天亚洲美女在线视频| 成人激情午夜影院| 91精品国产aⅴ一区二区| 亚洲人成网站精品片在线观看 | 亚洲美女免费在线| 国产在线视频一区二区| 欧美日韩一级黄| 国产精品久久久久影视| 日韩av电影天堂| 日本精品免费观看高清观看| 国产人成亚洲第一网站在线播放| 天天操天天色综合|