-
Notifications
You must be signed in to change notification settings - Fork 9
/
cap_desc_parser.h
71 lines (58 loc) · 1.74 KB
/
cap_desc_parser.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
//=======================================================================
// start of capability parser defination
//=======================================================================
struct CapabilityDescriptor{
unsigned char NumConfigs;
struct MultiStreamCfg *Cfg_Desc;
unsigned char NumDemuxers;
struct MultiStreamDemuxer *demuxer_Desc;
unsigned char NumFrameIntervals;
struct MultiStreamFrameInterval *FrameInt_Desc;
unsigned char NumBitrate;
struct MultiStreamBitrate *Bitrate_Desc;
};
struct MultiStreamCfg{
unsigned char NumStreams;
struct MultiStreamCap *MS_Cap; //capability for each stream
};
struct MultiStreamCap{
unsigned char UVCInterfaceNum;
unsigned char UVCFormatIndex;
unsigned char UVCFrameIndex;
unsigned char DemuxerIndex;
unsigned char FPSIndex;
unsigned char BRCIndex;
unsigned char OSDIndex;
unsigned char MDIndex;
unsigned char PTZIIndex;
unsigned char FPSGroup;
unsigned char BRCGroup;
unsigned char OSDGroup;
};
struct MultiStreamDemuxer{
unsigned char MSCDemuxIndex;
unsigned char DemuxID;
unsigned short Width;
unsigned short Height;
};
struct MultiStreamFrameInterval{
unsigned char FPSIndex;
unsigned char FPSCount;
unsigned char *FPS; // (10^7) / FrameInterval
};
struct MultiStreamBitrate{
unsigned char BRCIndex;
unsigned char BRCMode;
};
enum{
MSC_HEADER = 0,
MSC_CONFIG,
MSC_CAPABILITY,
MSC_DEMUXER,
MSC_FRAMEINTERVAL,
MSC_BITRATE,
MSC_OSD
};
#define MSC_HEADER_LENGTH 5
int ParseCapability(unsigned char *pCapability, int Length, struct CapabilityDescriptor *Cap_Desc);
//===================end of capability parser defination====================================