📄 hikplaympeg4.h
字号:
///////////////////////////////////////////////////////////////////
//File: HikPlayMpeg4.h
//Date: 2003-12-06
//Description: Interface for HikPlayM4.dll
//Copyright: Copyright(C)HangZhou Hikvision Digital Technology Co,.Ltd 2002-2008. All rights reserved.
///////////////////////////////////////////////////////////////////
#ifndef _HIK_PLAY_M4
#define _HIK_PLAY_M4
#if defined( _WINDLL)
#define HIK_PLAYM4_API extern "C"__declspec(dllexport)
#else
#define HIK_PLAYM4_API extern "C" //__declspec(dllimport)
#endif
//Max channel numbers
#define HIK_PLAYM4_MAX_SUPPORTS 100
//Wave coef range;
#define MIN_WAVE_COEF -100
#define MAX_WAVE_COEF 100
//Timer type
#define TIMER_1 1 //Only 16 timers for every process.Default TIMER;
#define TIMER_2 2 //Not limit;But the precision less than TIMER_1;
//BUFFER TYPE
#define BUF_VIDEO_SRC 1
#define BUF_AUDIO_SRC 2
#define BUF_VIDEO_RENDER 3
#define BUF_AUDIO_RENDER 4
//Error code
#define HIK_PLAYM4_NOERROR 0 //no error
#define HIK_PLAYM4_PARA_OVER 1 //input parameter is invalid;
#define HIK_PLAYM4_ORDER_ERROR 2 //The order of the function to be called is error.
#define HIK_PLAYM4_TIMER_ERROR 3 //Create multimedia clock failed;
#define HIK_PLAYM4_DEC_VIDEO_ERROR 4 //Decode video data failed.
#define HIK_PLAYM4_DEC_AUDIO_ERROR 5 //Decode audio data failed.
#define HIK_PLAYM4_ALLOC_MEMORY_ERROR 6 //Allocate memory failed.
#define HIK_PLAYM4_OPEN_FILE_ERROR 7 //Open the file failed.
#define HIK_PLAYM4_CREATE_OBJ_ERROR 8 //Create thread or event failed
#define HIK_PLAYM4_CREATE_DDRAW_ERROR 9 //Create DirectDraw object failed.
#define HIK_PLAYM4_CREATE_OFFSCREEN_ERROR 10 //failed when creating off-screen surface.
#define HIK_PLAYM4_BUF_OVER 11 //buffer is overflow
#define HIK_PLAYM4_CREATE_SOUND_ERROR 12 //failed when creating audio device.
#define HIK_PLAYM4_SET_VOLUME_ERROR 13 //Set volume failed
#define HIK_PLAYM4_SUPPORT_FILE_ONLY 14 //The function only support play file.
#define HIK_PLAYM4_SUPPORT_STREAM_ONLY 15 //The function only support play stream.
#define HIK_PLAYM4_SYS_NOT_SUPPORT 16 //System not support.
#define HIK_PLAYM4_FILEHEADER_UNKNOWN 17 //No file header.
#define HIK_PLAYM4_VERSION_INCORRECT 18 //The version of decoder and encoder is not adapted.
#define HIK_PALYM4_INIT_DECODER_ERROR 19 //Initialize decoder failed.
#define HIK_PLAYM4_CHECK_FILE_ERROR 20 //The file data is unknown.
#define HIK_PLAYM4_INIT_TIMER_ERROR 21 //Initialize multimedia clock failed.
#define HIK_PLAYM4_BLT_ERROR 22 //Blt failed.
#define HIK_PLAYM4_UPDATE_ERROR 23 //Update failed.
#define HIK_PLAYM4_OPEN_FILE_ERROR_MULTI 24 //openfile error, streamtype is multi
#define HIK_PLAYM4_OPEN_FILE_ERROR_VIDEO 25 //openfile error, streamtype is video
#define HIK_PLAYM4_JPEG_COMPRESS_ERROR 26 //JPEG compress error
#define HIK_PLAYM4_EXTRACT_NOT_SUPPORT 27 //Don't support the version of this file.
#define HIK_PLAYM4_EXTRACT_DATA_ERROR 28 //extract video data failed.
//Max display regions.
#define MAX_DISPLAY_WND 4
//Display type
#define DISPLAY_NORMAL 1
#define DISPLAY_QUARTER 2
//Display buffers
#define MAX_DIS_FRAMES 50
#define MIN_DIS_FRAMES 6
//Locate by
#define BY_FRAMENUM 1
#define BY_FRAMETIME 2
//Source buffer
#define SOURCE_BUF_MAX 1024*100000
#define SOURCE_BUF_MIN 1024*50
//Stream type
#define STREAME_REALTIME 0
#define STREAME_FILE 1
//frame type
#define T_AUDIO16 101
#define T_AUDIO8 100
#define T_UYVY 1
#define T_YV12 3
#define T_RGB32 7
//capability
#define SUPPORT_DDRAW 1
#define SUPPORT_BLT 2
#define SUPPORT_BLTFOURCC 4
#define SUPPORT_BLTSHRINKX 8
#define SUPPORT_BLTSHRINKY 16
#define SUPPORT_BLTSTRETCHX 32
#define SUPPORT_BLTSTRETCHY 64
#define SUPPORT_SSE 128
#define SUPPORT_MMX 256
//Frame position
typedef struct{
long nFilePos;
long nFrameNum;
long nFrameTime;
long nErrorFrameNum;
SYSTEMTIME *pErrorTime;
long nErrorLostFrameNum;
long nErrorFrameSize;
}FRAME_POS,*PFRAME_POS;
//Frame Info
typedef struct{
long nWidth;
long nHeight;
long nStamp;
long nType;
long nFrameRate;
}FRAME_INFO;
//Frame
typedef struct{
char *pDataBuf;
long nSize;
long nFrameNum;
BOOL bIsAudio;
long nReserved;
}FRAME_TYPE;
//////////////////////////////////////////////////////////////////////////////
//API
//////////////////////////////////////////////////////////////////////////////
////////////////ver 1.0///////////////////////////////////////
//Initialize DirecDraw.Now invalid.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -