VideoMgmt.h
3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
********************************************************************
* @file VideoMgmt.h
* VideoMgmt的头文件
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef VIDEO_MGMT_H
#define VIDEO_MGMT_H
/* Includes ------------------------------------------------------------------*/
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
typedef enum {
VIDEOMGMT_TPYE_H264 = 0x0000,
VIDEOMGMT_TPYE_DJIH264 = 0x0001,
VIDEOMGMT_TPYE_JZH264 = 0x0002
} JZ_VideoMgmt_Type_Code;
//推送的索引值,用于解决推送哪一个视频流的问题
typedef enum JZ_VideoMgmt_PushIndex{
VIDEOMGMT_STREAMING_FLOW_INDEX_FIRST = 0x0001,
VIDEOMGMT_STREAMING_FLOW_INDEX_SECOND = 0x0002,
VIDEOMGMT_STREAMING_FLOW_INDEX_THIRD = 0x0003,
VIDEOMGMT_STREAMING_FLOW_INDEX_RECORD = 0x0010, //录像流
}JZ_VideoMgmt_PushIndex;
//视频流的使用状态
typedef enum JZ_VideoStreamUseStatus{
VIDEO_STREAM_IDLE = 0x0000, //相机空闲
VIDEO_STREAM_RECORD = 0x0001, //相机录像中
VIDEO_STREAM_SHOOTPHOTO = 0x0002, //相机拍照中
VIDEO_STREAM_BRUSTSHOORPHOTO = 0x0003, //相机连拍中
VIDEO_STREAM_TRANSCODE = 0x0004, //相机转码中
}JZ_VideoStreamUseStatus;
typedef enum VideoMgmtParm
{
VIDEO_MGMT_FREEZE = 0x0001, //冻结
}VideoMgmtParm;
extern void *VideoMgmt_FirstVideo_index; //一号视频流的缓冲地址
extern void *VideoMgmt_SecondVideo_index; //二号视频流的缓冲地址
extern void *VideoMgmt_ThirdVideo_index; //三号视频流的缓冲地址
extern void *VideoMgmt_FirstRaw_index; //一号原始流的缓冲地址
extern void *VideoMgmt_SecondRaw_index; //二号原始流的缓冲地址
extern void *VideoMgmt_ThirdRaw_index; //三号原始流的缓冲地址
#define VIDEOMGMT_USE_FRAMEHEAD (1) //获取的数据加上帧头预留位
#define VIDEOMGMT_USE_FRAMEEND (2) //获取的数据加上帧尾预留位
#define VIDEOMGMT_VIDEO_TPYE VIDEOMGMT_TPYE_DJIH264 //推送帧的视频格式
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_JZsdkReturnCode VideoMgmt_init_buffer(void **index);
T_JZsdkReturnCode VideoMgmt_VideoBuffer_Deinit(void **index);
T_JZsdkReturnCode VideoMgmt_write_data(void **index, unsigned char *data, unsigned int data_len);
T_JZsdkReturnCode VideoMgmt_read_data(void **index, unsigned char **data, unsigned int *data_len, unsigned int mode, unsigned int extra_len);
T_JZsdkReturnCode VideoMgmt_VideoStreamFlow_Init(int FrameNumber, void **index, int VideoStreamFlowIndex);
T_JZsdkReturnCode VideoStream_GetVideoStreamUseStatus(int *status);
T_JZsdkReturnCode VideoRecord_ShootPhotoNum(int num);
T_JZsdkReturnCode VideoMgmt_param(int flagcode, enum VideoMgmtParm paramflag, int *value);
T_JZsdkReturnCode VideoMgmt_Send_StreamStatus(JZ_VideoStreamUseStatus status);
T_JZsdkReturnCode VideoMgmt_VideoStreamFlow_RecordPlay(int status);
T_JZsdkReturnCode VideoMgmt_Get_StreamWidthAndHeight(int *width, int *height);
/***************
*
* 视频流模块模块
*
* *********/
T_JZsdkReturnCode VideoMgmt_VideoStreamFlowIndex(int index);
T_JZsdkReturnCode VideoStreamTransCode_Init();
T_JZsdkReturnCode VideoStramPhoto_DevelopH264FlowGenerateIDR();
/***************
*
* 录像模块
*
* *********/
T_JZsdkReturnCode VideoRecord_TransMode(int status);
#ifdef __cplusplus
}
#endif
#endif