?? mjpeg_avi_common.h
字號:
/*****************************************************************************
Copyright(c) 2005 Analog Devices, Inc. All Rights Reserved. This software is
proprietary and confidential to Analog Devices, Inc. and its licensors.
******************************************************************************
$RCSfile: MJPEG_AVI_Common.h,v $
$Revision: 1.1 $
$Date: 2006/07/17 07:18:19 $
Project: MJPEG
Title: Common header file
Author(s): S.N
Revised by:
Description : This is the commom header to be used by all modules.
References:
******************************************************************************
Tab Setting: 4
Target Processor: Blackfin
Target Tools Revision: VDSP++ 4.0
******************************************************************************
Modification History:
====================
$Log: MJPEG_AVI_Common.h,v $
Revision 1.1 2006/07/17 07:18:19 bmk
JPEG-MJPEG User access files
******************************************************************************/
#ifndef MJPEG_AVI_COMMON
#define MJPEG_AVI_COMMON
#include "IMG_common.h"
#endif /* MJPEG_AVI_COMMON */
#ifndef MJPEG_AVI_COMMON2
#define MJPEG_AVI_COMMON2
/**/
/* API return codes */
#define MJPEG_AVI_FILE_CREATE 0x00000010
#define MJPEG_AVI_RETURN_OK 1
#define MJPEG_AVI_RETURN_ERROR 0
#define MJPEG_AVI_RETURN_OUTOFMEMORY (MJPEG_AVI_RETURN_ERROR - 10)
#define MJPEG_AVI_RETURN_FILEOPENFAIL (MJPEG_AVI_RETURN_ERROR - 20)
#define MJPEG_AVI_RETURN_FILESEEKFAIL (MJPEG_AVI_RETURN_ERROR - 30)
#define MJPEG_AVI_RETURN_FILEREADFAIL (MJPEG_AVI_RETURN_ERROR - 40)
#define MJPEG_AVI_RETURN_FILEINCORRECTFORMAT (MJPEG_AVI_RETURN_ERROR - 50)
#define MJPEG_AVI_RETURN_STREAMINVALID (MJPEG_AVI_RETURN_ERROR - 60)
#define MJPEG_AVI_RETURN_NOMORESAMPLES (MJPEG_AVI_RETURN_ERROR - 70)
#define MJPEG_AVI_RETURN_INSUFFICIENTBUFFER (MJPEG_AVI_RETURN_ERROR - 80)
#define MJPEG_AVI_RETURN_EVALUATIONLIMITREACHED (MJPEG_AVI_RETURN_ERROR - 90)
#define INCLUDE_MJPEG_AVI_COMMON
// Moved from MJPEG_AVI_FileReader_exp_header.h
#ifndef MJPEG_AVI_FOURCC
#define MJPEG_AVI_FOURCC( ch0, ch1, ch2, ch3 ) \
( (uint32)(uint8)(ch0) | ( (uint32)(uint8)(ch1) << 8 ) | \
( (uint32)(uint8)(ch2) << 16 ) | ( (uint32)(uint8)(ch3) << 24 ) )
#endif
#define MJPEG_AVI_StreamTypeVIDEO MJPEG_AVI_FOURCC('v','i','d','s')
#define MJPEG_AVI_StreamTypeAUDIO MJPEG_AVI_FOURCC('a','u','d','s')
/*
** Main AVI File Header
*/
/* flags for use in <dwFlags> in AVIFileHdr */
#define MJPEG_AVIF_HASINDEX 0x00000010 // Index at end of file?
#define MJPEG_AVIF_MUSTUSEINDEX 0x00000020
#define MJPEG_AVIF_ISINTERLEAVED 0x00000100
#define MJPEG_AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames?
#define MJPEG_AVIF_WASCAPTUREFILE 0x00010000
#define MJPEG_AVIF_COPYRIGHTED 0x00020000
#define MJPEG_AVI_FILE_CREATE 0x00000010
#define MJPEG_AVI_FILE_READ 0x00000100
#define E_NO_MORE_SAMPLES E_USER_ERROR_BASE-1
#define E_INSUFFICIENT_BUFFER E_USER_ERROR_BASE-2
#define E_INVALID_STREAM E_USER_ERROR_BASE-3
#define E_FILE_SEEK_FAIL E_USER_ERROR_BASE-4
#define E_FILE_FORMAT_FAIL E_USER_ERROR_BASE-5
typedef struct
{
int16 left;
int16 top;
int16 right;
int16 bottom;
}tMJPEG_AVI_RECT;
typedef struct
{
uint32 dwMicroSecPerFrame; // frame display rate (or 0L)
uint32 dwMaxBytesPerSec; // max. transfer rate
uint32 dwPaddingGranularity; // pad to multiples of this
// size; normally 2K.
uint32 dwFlags; // the ever-present flags
uint32 dwTotalFrames; // # frames in file
uint32 dwInitialFrames;
uint32 dwStreams;
uint32 dwSuggestedBufferSize;
uint32 dwWidth;
uint32 dwHeight;
uint32 dwReserved[4];
} MJPEG_AVI_MainAVIHeader;
typedef struct {
uint32 fccType;
uint32 fccHandler;
uint32 dwFlags; /* Contains AVITF_* flags */
uint16 wPriority;
uint16 wLanguage;
uint32 dwInitialFrames;
uint32 dwScale;
uint32 dwRate; /* dwRate / dwScale == samples/second */
uint32 dwStart;
uint32 dwLength; /* In units above... */
uint32 dwSuggestedBufferSize;
uint32 dwQuality;
uint32 dwSampleSize;
tMJPEG_AVI_RECT rcFrame;
} MJPEG_AVI_StreamHeader;
typedef struct
{
uint32 fccType;
uint32 fccHandler;
uint32 dwFlags;
uint32 dwCaps;
uint16 wPriority;
uint16 wLanguage;
uint32 dwScale;
uint32 dwRate;
uint32 dwStart;
uint32 dwLength;
uint32 dwInitialFrames;
uint32 dwSuggestedBufferSize;
uint32 dwQuality;
uint32 dwSampleSize;
tMJPEG_AVI_RECT rcFrame;
uint32 dwEditCount;
uint32 dwFormatChangeCount;
int8 szName[64];
} tMJPEG_AVI_STREAMINFO;
typedef struct tsMJPEG_AVI_RGBQUAD {
uint8 rgbBlue;
uint8 rgbGreen;
uint8 rgbRed;
uint8 rgbReserved;
} tMJPEG_AVI_RGBQUAD;
typedef struct tsMJPEG_AVI_BITMAPINFOHEADER{
uint32 biSize;
int32 biWidth;
int32 biHeight;
uint16 biPlanes;
uint16 biBitCount;
uint32 biCompression;
uint32 biSizeImage;
int32 biXPelsPerMeter;
int32 biYPelsPerMeter;
uint32 biClrUsed;
uint32 biClrImportant;
} tMJPEG_AVI_BITMAPINFOHEADER;
typedef struct tsMJPEG_AVIBITMAPINFO {
tMJPEG_AVI_BITMAPINFOHEADER bmiHeader;
tMJPEG_AVI_RGBQUAD bmiColors[1];
} tMJPEG_AVI_BITMAPINFO;
typedef struct
{
uint32 ckid;
uint32 dwFlags;
uint32 dwChunkOffset; // Position of chunk
uint32 dwChunkLength; // Length of chunk
} MJPEG_AVI_INDEXENTRY;
#endif /* MJPEG_AVI_COMMON */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -