?? pindriver.h.svn-base
字號:
/**************************************************************************
** INTEL CONFIDENTIAL
** Copyright 2000-2004 Intel Corporation. All Rights Reserved.
**
** The source code contained or described herein and all documents
** related to the source code (Material) are owned by Intel Corporation
** or its suppliers or licensors. Title to the Material remains with
** Intel Corporation or its suppliers and licensors. The Material contains
** trade secrets and proprietary and confidential information of Intel
** or its suppliers and licensors. The Material is protected by worldwide
** copyright and trade secret laws and treaty provisions. No part of the
** Material may be used, copied, reproduced, modified, published, uploaded,
** posted, transmitted, distributed, or disclosed in any way without Intel抯
** prior express written permission.
** No license under any patent, copyright, trade secret or other intellectual
** property right is granted to or conferred upon you by disclosure or
** delivery of the Materials, either expressly, by implication, inducement,
** estoppel or otherwise. Any license under such intellectual property rights
** must be express and approved by Intel in writing.
********************************************************************************/
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
#ifndef __PIN_DD
#define __PIN_DD
#ifdef __cplusplus
extern "C" {
#endif
#define PIN_TIMEOUT 250
#define BUFFER_COUNT 3
#define MAX_BUFFER_COUNT 100
typedef struct _tagStreamDescriptorShadow
{
PCS_STREAM_DESCRIPTOR pCsStreamDescriptorExternal;
CS_STREAM_DESCRIPTOR csStreamDescriptorShadow;
BOOL m_fBusy;
} CS_STREAM_DESCRIPTOR_SHADOW, * PCS_STREAM_DESCRIPTOR_SHADOW;
typedef class CPinDevice
{
public:
CPinDevice( );
~CPinDevice( );
bool
InitializeSubDevice(
PCAMERADEVICE pCamDevice
);
DWORD
StreamInstantiate(
PCSPROPERTY_STREAMEX_S pCsPropStreamEx,
__out_bcount(OutBufLen) PUCHAR pOutBuf,
DWORD OutBufLen,
PDWORD pdwBytesTransferred
);
DWORD
PinHandleConnectionRequests(
PCSPROPERTY pCsProp,
__out_bcount(OutBufLen) PUCHAR pOutBuf,
DWORD OutBufLen,
PDWORD pdwBytesTransferred
);
DWORD
PinHandleVPConfigRequests(
PCSPROPERTY pCsProp,
__out_bcount(OutBufLen) PUCHAR pOutBuf,
DWORD OutBufLen,
PDWORD pdwBytesTransferred
);
DWORD
PinHandleBufferRequest(
DWORD dwCommand,
__out_bcount(OutBufLen) PUCHAR pOutBuf,
DWORD OutBufLen
);
void
HandlePinIO( );
void
FlushBufferQueue();
void
SetState(
CSSTATE CsState,
CSSTATE * CsPrevState
);
CSSTATE GetState();
bool
CloseSubDevice( );
ULONG
PictureNumber( ) const;
ULONG
FramesDropped( ) const;
ULONG
FrameSize( ) const;
private:
DWORD
AllocateBuffer(
LPVOID pOutBuf
);
DWORD
DeallocateBuffer(
LPVOID pOutBuf
);
DWORD
EnqueueDescriptor(
LPVOID pOutBuf
);
bool
RemoveBufferFromList(
PCS_STREAM_DESCRIPTOR * ppCsStreamDesc,
PVOID * ppMappedData,
PVOID * ppUnmappedData
);
bool
ResetBufferList( );
DWORD
PinHandleConnStateSubReqs(
ULONG ulReqFlags,
__out_bcount(OutBufLen) PUCHAR pOutBuf,
DWORD OutBufLen,
PDWORD pdwBytesTransferred
);
DWORD
PinHandleConnDataFormatSubReqs(
ULONG ulReqFlags,
PCS_DATAFORMAT_VIDEOINFOHEADER pCsDataFormatVidInfoHdr,
PDWORD pdwBytesTransferred
);
BOOL InitMsgQueueDescriptor(
PCS_MSGQUEUE_BUFFER pCsMsgQBuff,
PCS_STREAM_DESCRIPTOR pCsStreamDesc,
PVOID pMappedData,
PVOID pUnmappedData,
BOOL bFillBuffer);
DWORD
GetIndexFromHandle(
DWORD dwHandle,
LPVOID pBuffer
);
DWORD
CreateHandle(
DWORD dwIndex,
LPVOID pBuffer
);
DWORD
SwSetupStreamDescriptor(
DWORD dwIndex,
PCS_STREAM_DESCRIPTOR pCsStreamDesc,
LPVOID pBuffer
);
DWORD
HwSetupStreamDescriptor(
DWORD dwIndex
);
CSPROPERTY_BUFFER_MODE GetCurrentMemoryModel(
);
DWORD GetMaxBufferCount(
);
DWORD StreamBufferFill(
PUCHAR pImage
);
bool ReadMemoryModelFromRegistry();
ULONG m_ulPinId;
ULONG m_ulMaxNumOfBuffers;
ULONG m_ulFrameSize;
ULONG m_ulFramesDropped;
ULONG m_ulPictureNumber;
PCAMERADEVICE m_pCamAdapter;
CS_DATARANGE_VIDEO m_CsDataRangeVideo;
DWORD m_dwBufferCount;
PCS_STREAM_DESCRIPTOR_SHADOW m_pStreamDescriptorList;
REFERENCE_TIME m_RtAveTimePerFrame;
DWORD m_msStart;
DWORD m_msLastPT;
HANDLE m_hMsgQ;
CRITICAL_SECTION m_csStreamBuffer;
CSSTATE m_CsState;
bool m_fDiscontinuity;
CSPROPERTY_BUFFER_MODE m_dwMemoryModel;
} PINDEVICE, * PPINDEVICE;
typedef struct CPinInitHandle
{
PCAMERADEVICE pCamDevice;
} PININITHANDLE, * PPININITHANDLE;
#ifdef __cplusplus
}
#endif
#endif //__PIN_DD
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -