-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrame.h
More file actions
96 lines (60 loc) · 1.37 KB
/
Frame.h
File metadata and controls
96 lines (60 loc) · 1.37 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
//
// Created by shved@mail.ru on 10.08.2020.
//
#ifndef CAMERA_FRAME_H
#define CAMERA_FRAME_H
#include <QDataStream>
class Queue;
class Frame {
public:
enum {
Video = 0x0,
Audio = 0x1,
Control = 0x2,
};
class Refer {
public:
explicit Refer(Frame *frame = nullptr);
Refer(const Refer &);
~Refer();
void unref() const;
Frame *operator->() const;
Frame const &operator*() const;
private:
mutable Frame *mFrame;
};
class Re {
public:
explicit Re(Frame *frame);
~Re();
private:
Frame *mFrame;
};
explicit Frame(Queue *pool);
virtual ~Frame();
void recycle();
void to(Queue *pool);
friend QDataStream &operator<<(QDataStream &stream, const Frame &frame);
class Bytes {
public:
Bytes &operator()(int size);
~Bytes();
friend QDataStream &operator>>(QDataStream &stream, Bytes &bytes);
friend QDataStream &operator<<(QDataStream &stream, const Bytes &bytes);
unsigned char *mData{};
int mLength{};
private:
int mCapacity{};
};
Bytes mBytes{};
short mSize{};
unsigned char mType{};
long long mId{};
int mFlag{};
int mWidth{};
int mHeight{};
int mLength{};
private:
Queue *mPool{};
};
#endif //CAMERA_FRAME_H