-
Notifications
You must be signed in to change notification settings - Fork 1
/
decoder.hpp
51 lines (38 loc) · 920 Bytes
/
decoder.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
49
50
51
#ifndef DECODER_HPP
#define DECODER_HPP
#include <pthread.h>
#include "es.hpp"
class OpenGLDisplay;
class DecoderOperation;
class DisplayOperation;
#include "opq.hpp"
#include "decodeengine.hpp"
#include "controllerop.hpp"
class DecoderState {
public:
int current_picture;
bool fullscreen;
bool live;
OpenGLDisplay *display;
Queue<DisplayOperation> *oglq;
Queue<ControllerOperation> outputq;
bool playing;
DecoderState() : outputq( 0 ) {}
};
class Decoder {
private:
DecoderState state;
Queue<DecoderOperation> opq;
pthread_t thread_handle;
DecodeEngine engine;
ES *stream;
void decode_and_display( void );
public:
Decoder( ES *s_stream, Queue<DisplayOperation> *s_oglq );
~Decoder();
void loop();
Queue<DecoderOperation> *get_queue() { return &opq; }
Queue<ControllerOperation> *get_output_queue() { return &state.outputq; }
void wait_shutdown( void );
};
#endif