www.pudn.com > camera.rar > ov2630.h


// 
// Copyright (c) Microsoft Corporation.  All rights reserved. 
// 
// 
// Use of this sample source code is subject to the terms of the Microsoft 
// license agreement under which you licensed this sample source code. If 
// you did not accept the terms of the license agreement, you are not 
// authorized to use this sample source code. For the terms of the license, 
// please see the license agreement between you and Microsoft or, if applicable, 
// see the LICENSE.RTF on your install media or the root of your tools installation. 
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 
// 
// 
// (C) Copyright 2006 Marvell International Ltd. 
// All Rights Reserved 
// 
 
#ifndef __OV2630_H__ 
#define __OV2630_H__ 
 
#include "sensor.h" 
 
class Ov2630 : public Sensor 
{ 
public: 
    Ov2630(); 
    bool detect(); 
    UINT32 get_formats(ULONG type, PCS_DATARANGE_VIDEO** formats); 
    void set_power_mode(bool is_on); 
    void set_frame_format(int format, FrameSize size); 
    void start_capture(); 
    void stop_capture(); 
    camera_cfg_t* get_camera_cfg(PCS_VIDEOINFOHEADER pCsVideoInfoHdr, ULONG mode); 
    void handle_frame_interrupt(PUCHAR buf, 
                                CS_BITMAPINFOHEADER* info_header, 
                                frame_t* frame); 
    void handle_frame_raw10(PUCHAR buf, frame_t* frame); 
private: 
    FrameSize frame_size; 
    IppiRawPixProcSpec_P3R* rpp_uxga; 
    IppiRawPixProcSpec_P3R* rpp_cif; 
    void write_sensor_reg(UCHAR addr, UCHAR data); 
    void set_exposure_gain(UINT16 time, UINT16 gain); 
}; 
 
#endif