📄 mmidc_win32_simu.c
字号:
/*******************************************************************************
** FileName: DigitalCamera.h *
** Author: Zhemin.Lin&Benny.Zhou *
** Date: 2005/8/04 *
** CopyRight: 2005, Spreadtrum, Incorporated, All right reserved *
** Description: define DCAM interface *
*******************************************************************************
*******************************************************************************
** Edit History *
** -------------------------------------------------------------------------- *
** DATE NAME DESCRIPTION *
** 2005/8/04 Zhemin.Lin&Benny.Zhou Created *
*******************************************************************************/
#ifndef DIGITALCAMERA_C
#define DIGITALCAMERA_C
#ifdef __cplusplus
extern "C"
{
#endif
#include "sci_types.h"
#include "mmidc_win32_simu.h"
#include "guilcd.h"
static DC_OSD_MODE s_osd_mode[7] = {0};
static uint32 s_cr_pallete[64] = {0};
/******************************************************************************/
// Description: create and initialize the dc context
// Author: Zhemin.Lin&Benny.Zhou
// Input: none
// Output: s_pst_context
// Return: 0 successful
// others failed
// Note: this function should be called before all other functions
/******************************************************************************/
int DC_CreateContext(void)
{
return 0;
}
/******************************************************************************/
// Description: regisiter sensor handle to DCAM
// Author: Zhemin.Lin&Benny.Zhou
// Input: pst_sensor point to the structure of the sensor specification
// Output: none
// Return: 0 successful
// others failed
// Note: this function should be called before DC_Open()
/******************************************************************************/
int DC_RegisterSensorSpec(SENSOR_SPEC_T *pst_sensor)
{
return 0;
}
/******************************************************************************/
// Description: regisiter lcd handle to DCAM
// Author: Zhemin.Lin&Benny.Zhou
// Input: i_lcd which lcd, 0 refer to main lcd, 1 refer to sub lcd
// pst_lcd point to the structure of the lcd specification
// Output: none
// Return: 0 successful
// others failed
// Note: this function should be called before DC_Open()
/******************************************************************************/
int DC_RegisterLcdSpec(int i_lcd, LCD_SPEC_T *pst_lcd)
{
return 0;
}
/******************************************************************************/
// Description: open DCAM device
// Author: Zhemin.Lin&Benny.Zhou
// Input: none
// Output: none
// Return: 0 successful
// others failed
// Note: before using DCAM device, be sure you have successful open it
/******************************************************************************/
//int DC_Open(uint32 dw_framebuf_len)
//{
//
//}
/******************************************************************************/
// Description: close DCAM device
// Author: Zhemin.Lin&Benny.Zhou
// Input: none
// Output: none
// Return: 0 successful
// others failed
// Note: none
/******************************************************************************/
//int DC_Close()
//{
//
//}
/******************************************************************************/
// Description: set preview parameters
// Author: Zhemin.Lin&Benny.Zhou
// Input: pst_param point to the preview parameter
// Output: none
// Return: 0 successful
// others failed
// Note: before start preview, call this function to set parameters
/******************************************************************************/
int DC_SetPreviewParam(const *pst_param)
{
return 0;
}
/******************************************************************************/
// Description: start preview
// Author: Zhemin.Lin&Benny.Zhou
// Input: pst_param point to the preview parameter
// Output: none
// Return: 0 successful
// others failed
// Note: if return successful, the LCD will be on bridge mode
/******************************************************************************/
//int DC_StartPreview(void)
//{
//
//}
/******************************************************************************/
// Description: stop preview
// Author: Zhemin.Lin&Benny.Zhou
// Input: none
// Output: none
// Return: 0 successful
// others failed
// Note: the caller will be pended until the last frame be displayed on
// lcd. after calling this function lcd will be on bypass mode
/******************************************************************************/
//int DC_StopPreview(void)
//{
//
//}
/******************************************************************************/
// Description: set capture parameters
// Author: Zhemin.Lin&Benny.Zhou
// Input: pst_param point to the capture parameter
// Output: none
// Return: 0 successful
// others failed
// Note: before start snapshot, be sure the capature parameters has
// been set successfully.
// current target jpeg width must equal to trim.width, target height
// must equal to trim.height
/******************************************************************************/
int DC_SetCaptureParam(const DC_CAPTURE_PARAM_T *pst_param)
{
return 0;
}
/******************************************************************************/
// Description: start snapshot
// Author: Zhemin.Lin&Benny.Zhou
// Input: none
// Output: none
// Return: 0 successful
// others failed
// Note: if return successful, the LCD will be on bridge mode until
// capture is done
/******************************************************************************/
int DC_DoSnapshot(void)
{
return 0;
}
/******************************************************************************/
// Description: get snapshot data
// Author: Zhemin.Lin&Benny.Zhou
// Input: *pp_buf memory start address, where jpeg stream is store
// *pdw_len jpeg stream len, count in bytes
// Output:
// Return: 0 successful
// others failed
// Note: *pp_buf is allocated by DCAM driver, if the data is no longer
// used, app MUST call DC_FreeFrame() to free this buffer
/******************************************************************************/
// uint8 *p_head;
// uint32 dw_head_len;
// uint32 dw_total_section_len;
// struct {uint8 *pbuf; uint32 dw_len;} sections[2];
// uint8 *p_tail;
// uint32 dw_tail_len;
//
const unsigned char midi[1065] = {
0xFF,0xD8,0xFF,0xE0,0x00,0x10,0x4A,0x46,0x49,0x46,0x00,0x01,0x02,0x00,0x00,0x64,
0x00,0x64,0x00,0x00,0xFF,0xEC,0x00,0x11,0x44,0x75,0x63,0x6B,0x79,0x00,0x01,0x00,
0x04,0x00,0x00,0x00,0x29,0x00,0x00,0xFF,0xEE,0x00,0x0E,0x41,0x64,0x6F,0x62,0x65,
0x00,0x64,0xC0,0x00,0x00,0x00,0x01,0xFF,0xDB,0x00,0x84,0x00,0x0C,0x08,0x08,0x08,
0x09,0x08,0x0C,0x09,0x09,0x0C,0x11,0x0B,0x09,0x0B,0x11,0x14,0x0F,0x0C,0x0C,0x0F,
0x14,0x17,0x12,0x12,0x14,0x12,0x12,0x17,0x16,0x11,0x14,0x13,0x13,0x14,0x11,0x16,
0x16,0x1A,0x1B,0x1D,0x1B,0x1A,0x16,0x23,0x23,0x26,0x26,0x23,0x23,0x32,0x32,0x32,
0x32,0x32,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x01,0x0C,0x0B,0x0B,
0x0C,0x0E,0x0C,0x0F,0x0D,0x0D,0x0F,0x14,0x0E,0x0E,0x0E,0x14,0x14,0x0F,0x10,0x10,
0x0F,0x14,0x1C,0x13,0x13,0x14,0x13,0x13,0x1C,0x23,0x1A,0x16,0x16,0x16,0x16,0x1A,
0x23,0x20,0x22,0x1D,0x1D,0x1D,0x22,0x20,0x26,0x26,0x23,0x23,0x26,0x26,0x30,0x30,
0x2E,0x30,0x30,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0xFF,0xC0,0x00,
0x11,0x08,0x00,0x29,0x00,0x29,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11,0x01,
0xFF,0xC4,0x00,0x93,0x00,0x01,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x05,0x03,0x04,0x06,0x01,0x02,0x07,0x01,0x00,0x02,0x03,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x00,
0x02,0x03,0x05,0x10,0x00,0x02,0x01,0x03,0x03,0x01,0x05,0x04,0x08,0x07,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x00,0x11,0x04,0x21,0x12,0x05,0x41,0x31,0x51,
0x22,0x13,0x14,0x61,0x81,0x91,0x06,0x71,0xA1,0xC1,0x32,0x52,0x23,0x73,0x34,0xB1,
0xD1,0x72,0xB2,0x33,0x43,0x35,0x11,0x00,0x01,0x02,0x03,0x04,0x08,0x03,0x09,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x11,0x02,0x00,0x21,0x12,0x51,0x03,0x13,
0x14,0xF0,0x31,0x41,0x61,0x81,0x22,0x23,0x04,0x71,0x91,0x42,0xA1,0xB1,0xC1,0xE1,
0x32,0x52,0x82,0x92,0x24,0xFF,0xDA,0x00,0x0C,0x03,0x01,0x00,0x02,0x11,0x03,0x11,
0x00,0x3F,0x00,0xF3,0xF9,0x79,0x4E,0x41,0x0E,0x92,0x9F,0x85,0x25,0x89,0xC8,0x9C,
0x78,0x99,0xB2,0xE7,0x76,0x98,0x10,0x36,0xAA,0xF8,0x41,0x3D,0x2E,0x05,0xEA,0xC6,
0x57,0xCA,0x8D,0x8D,0x8E,0xF9,0x72,0xC8,0xC1,0x20,0x1B,0xDA,0xC2,0xF6,0x0B,0xAD,
0x29,0xF2,0x67,0x01,0xC6,0x72,0x4B,0x95,0x9D,0xC9,0x22,0xE4,0xB4,0xCA,0x57,0x1F,
0x1E,0x45,0x22,0xD0,0x86,0x2A,0xD3,0x2B,0x77,0xEF,0x52,0xBA,0x1F,0x0D,0x8D,0x0B,
0xC7,0xD2,0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B,0x1C,0xAA,0xC6,
0x4C,0x5B,0x97,0xD9,0xB4,0xDA,0xE5,0x80,0x3B,0x74,0xE8,0x4D,0x32,0xFF,0x00,0xE6,
0x1F,0x45,0x53,0xE4,0x7F,0xE0,0x9F,0xD4,0xFB,0x16,0x97,0xB9,0xD6,0x69,0x12,0xA7,
0xD2,0x76,0xF9,0x44,0x6A,0x62,0x85,0x28,0x17,0xD6,0x15,0xA9,0xC6,0x31,0x71,0x71,
0xD9,0x24,0x38,0x20,0xC7,0x23,0x78,0x41,0x70,0x49,0xBF,0x5B,0x2F,0x69,0x34,0xC7,
0x19,0xC1,0x43,0xC6,0x83,0xE9,0xB0,0xE7,0x02,0x44,0x51,0x24,0xFF,0x00,0xEC,0x6D,
0x2F,0x7D,0xA3,0x4D,0xB7,0xE9,0x56,0xF8,0x9F,0xDD,0xAF,0xBF,0xF8,0x53,0x91,0xFE,
0xE1,0xFF,0x00,0xAD,0x7F,0xB2,0xA5,0xE6,0x2D,0x0E,0x5F,0xA2,0x4B,0x67,0x18,0x77,
0xA6,0xBC,0xB4,0xD4,0x86,0x77,0x9A,0xFF,0x00,0x10,0x34,0xB6,0x07,0x83,0x8E,0x56,
0x3E,0x63,0x10,0xCB,0xD0,0x8F,0xE4,0x75,0x07,0xD9,0x56,0x3D,0x3C,0x1D,0xD5,0x6E,
0x4F,0xBB,0x2F,0xEA,0x3F,0xD9,0x47,0xD5,0xFF,0x00,0x9B,0x24,0x7E,0xF9,0x78,0xD5,
0x1C,0xEE,0xB6,0x6B,0x6D,0x1F,0x08,0xFF,0xD9,};
int DC_GetSnapshotData(DC_FRAME_T **p_p_frame)
{
static DC_FRAME_T dc_frame = {0};
static char buf1[] = "jpg_head-";
static char buf2[] = "section0-";
static char buf3[] = "section1-";
static char buf4[] = "tail.";
dc_frame.p_head = midi;
dc_frame.dw_head_len = sizeof(midi);
dc_frame.sections[0].pbuf = 0;
dc_frame.sections[0].dw_len = 0;
dc_frame.sections[1].pbuf = 0;
dc_frame.sections[1].dw_len = 0;
dc_frame.dw_total_section_len = 0;
dc_frame.p_tail = 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -