-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEncoder.hpp
48 lines (33 loc) · 1.38 KB
/
Encoder.hpp
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
#include "OMX_Core.h"
#include "OMX_Component.h"
#include "EncoderConfig.hpp"
#include <pthread.h>
#ifndef SDFLIGHT_CAMERAS_ENCODER_HPP
#define SDFLIGHT_CAMERAS_ENCODER_HPP
class Encoder
{
public:
Encoder();
~Encoder();
private:
static OMX_ERRORTYPE eventCallback(OMX_IN OMX_HANDLETYPE compHandle,
OMX_IN OMX_PTR context,
OMX_IN OMX_EVENTTYPE event,
OMX_IN OMX_U32 data1,
OMX_IN OMX_U32 data2,
OMX_IN OMX_PTR eventData);
static OMX_ERRORTYPE emptyDoneCallback(OMX_IN OMX_HANDLETYPE compHandle,
OMX_IN OMX_PTR context,
OMX_IN OMX_BUFFERHEADERTYPE* buffer);
static OMX_ERRORTYPE fillDoneCallback(OMX_IN OMX_HANDLETYPE compHandle,
OMX_IN OMX_PTR context,
OMX_IN OMX_BUFFERHEADERTYPE* buffer);
OMX_HANDLETYPE m_omxEncoder;
OMX_STATETYPE m_omxEncoderState;
OMX_BUFFERHEADERTYPE** m_omxInputBuffers;
OMX_BUFFERHEADERTYPE** m_omxOutputBuffers;
EncoderConfig::EncoderConfigType m_encoderConfig;
pthread_mutex_t m_omxEncoderStateLock;
pthread_cond_t m_omxEncoderStateChange;
}; // class Encoder
#endif // SDFLIGHT_CAMERAS_ENCODER_HPP