09c2d08c
Hu Chunming
arm交付版
|
1
2
3
4
5
6
7
8
9
10
11
12
|
#ifndef __DEVICE_RGB_MEMORY_H__
#define __DEVICE_RGB_MEMORY_H__
#include<string>
#include "utiltools.hpp"
using namespace std;
class DeviceMemory{
public:
|
746db74c
Hu Chunming
实现recode
|
13
|
DeviceMemory(int _channel, int _width, int _width_stride, int _height, int _height_stride, string _id, string _dev_id, bool _key_frame, unsigned long long _frame_nb, bool _isused){
|
09c2d08c
Hu Chunming
arm交付版
|
14
15
16
17
18
19
20
21
22
23
|
channel = _channel;
width = _width;
width_stride = _width_stride;
height = _height;
height_stride = _height_stride;
data_size = channel * width * height;
isused = _isused;
id = _id;
device_id = _dev_id;
key_frame = _key_frame;
|
746db74c
Hu Chunming
实现recode
|
24
|
frame_nb = _frame_nb;
|
09c2d08c
Hu Chunming
arm交付版
|
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
|
timestamp = UtilTools::get_cur_time_ms();
}
virtual ~DeviceMemory(){}
int getSize() {
return data_size;
}
bool isIsused() {
return isused;
}
void setIsused(bool _isused) {
isused = _isused;
// 更新时间戳
timestamp = UtilTools::get_cur_time_ms();
}
string getId() {
return id;
}
string getDeviceId() {
return device_id;
}
unsigned char* getMem(){
return pHwRgb;
}
long long getTimesstamp(){
return timestamp;
}
int getWidth(){
return width;
}
int getWidthStride(){
return width_stride;
}
int getHeight(){
return height;
}
int getHeightStride(){
return height_stride;
}
int getChannel(){
return channel;
}
bool isKeyFrame(){
return key_frame;
}
|
746db74c
Hu Chunming
实现recode
|
84
85
86
87
|
unsigned long long getFrameNb() {
return frame_nb;
}
|
09c2d08c
Hu Chunming
arm交付版
|
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
public:
int data_size;
bool isused;
string id;
string device_id;
unsigned char * pHwRgb{nullptr};
long long timestamp;
int width{0};
int width_stride{0};
int height{0};
int height_stride{0};
int channel{3};
bool key_frame;
long index;
|
746db74c
Hu Chunming
实现recode
|
102
|
unsigned long long frame_nb;
|
09c2d08c
Hu Chunming
arm交付版
|
103
104
105
|
};
#endif
|