summaryrefslogtreecommitdiff
path: root/src/multiplexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/multiplexer.h')
-rw-r--r--src/multiplexer.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/multiplexer.h b/src/multiplexer.h
index 8d67766..2604ddc 100644
--- a/src/multiplexer.h
+++ b/src/multiplexer.h
@@ -36,6 +36,8 @@
#include "info.h"
#include "frame.h"
+#include "threadsafe_queue_priority.h"
+
/**
* Multiplexer configuration
*/
@@ -67,8 +69,8 @@ typedef enum {
class Multiplexer {
public:
Multiplexer(File *file, Info *info, volatile bool *running,
- FramePriorityQueue *v_q, pthread_mutex_t *v_m, sem_t *v_s,
- FramePriorityQueue *a_q, pthread_mutex_t *a_m, sem_t *a_s);
+ ThreadSafeQueuePriority *video_queue,
+ ThreadSafeQueuePriority *audio_queue);
~Multiplexer();
void multiplex();
@@ -102,10 +104,6 @@ private:
Frame *getFrame(StreamType type);
int read_stream(char *buf, unsigned int size, StreamType type);
- FramePriorityQueue *queue[NUM_TYPES];
- pthread_mutex_t *mutex[NUM_TYPES];
- sem_t *sem[NUM_TYPES];
-
Frame *frame[NUM_TYPES];
unsigned int frame_number[NUM_TYPES];
unsigned int read[NUM_TYPES];
@@ -115,7 +113,9 @@ private:
volatile bool *running;
// Audio Header
- bool audio_header_read;
+ bool audio_header_read;
+
+ ThreadSafeQueuePriority *queue[NUM_TYPES];
};
#endif/*__MIAV_MULTIPLEXER_H__*/