-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAVFRAMEINFO.h
87 lines (72 loc) · 2.12 KB
/
AVFRAMEINFO.h
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
/*
* AVFRAMEINFO.h
* Define AVFRAME Info
* Created on:2011-08-12
* Last update on:2012-08-07
* Author: TUTK
*
* 2012-08-07 - Add video width and height to FRAMEINFO_t;
*/
#ifndef _AVFRAME_INFO_H_
#define _AVFRAME_INFO_H_
/* CODEC ID */
typedef enum
{
MEDIA_CODEC_UNKNOWN = 0x00,
MEDIA_CODEC_VIDEO_MPEG4 = 0x4C,
MEDIA_CODEC_VIDEO_H263 = 0x4D,
MEDIA_CODEC_VIDEO_H264 = 0x4E,
MEDIA_CODEC_VIDEO_MJPEG = 0x4F,
MEDIA_CODEC_AUDIO_ADPCM = 0X8B,
MEDIA_CODEC_AUDIO_PCM = 0x8C,
MEDIA_CODEC_AUDIO_SPEEX = 0x8D,
MEDIA_CODEC_AUDIO_MP3 = 0x8E,
MEDIA_CODEC_AUDIO_G726 = 0x8F,
}ENUM_CODECID;
/* FRAME Flag */
typedef enum
{
IPC_FRAME_FLAG_PBFRAME = 0x00, // A/V P/B frame..
IPC_FRAME_FLAG_IFRAME = 0x01, // A/V I frame.
IPC_FRAME_FLAG_MD = 0x02, // For motion detection.
IPC_FRAME_FLAG_IO = 0x03, // For Alarm IO detection.
}ENUM_FRAMEFLAG;
typedef enum
{
AUDIO_SAMPLE_8K = 0x00,
AUDIO_SAMPLE_11K = 0x01,
AUDIO_SAMPLE_12K = 0x02,
AUDIO_SAMPLE_16K = 0x03,
AUDIO_SAMPLE_22K = 0x04,
AUDIO_SAMPLE_24K = 0x05,
AUDIO_SAMPLE_32K = 0x06,
AUDIO_SAMPLE_44K = 0x07,
AUDIO_SAMPLE_48K = 0x08,
}ENUM_AUDIO_SAMPLERATE;
typedef enum
{
AUDIO_DATABITS_8 = 0,
AUDIO_DATABITS_16 = 1,
}ENUM_AUDIO_DATABITS;
typedef enum
{
AUDIO_CHANNEL_MONO = 0,
AUDIO_CHANNEL_STERO = 1,
}ENUM_AUDIO_CHANNEL;
/* Audio Frame: flags = (samplerate << 2) | (databits << 1) | (channel) */
/* Audio/Video Frame Header Info */
typedef struct _FRAMEINFO
{
unsigned short codec_id; // Media codec type defined in sys_mmdef.h,
// MEDIA_CODEC_AUDIO_PCMLE16 for audio,
// MEDIA_CODEC_VIDEO_H264 for video.
unsigned char flags; // Combined with IPC_FRAME_xxx.
unsigned char cam_index; // 0 - n
unsigned char onlineNum; // number of client connected this device
unsigned char reserve1[3];
unsigned int reserve2; //音频大小
unsigned int timestamp; // Timestamp of the frame, in milliseconds
// unsigned int videoWidth;
// unsigned int videoHeight;
}FRAMEINFO_t;
#endif