diff options
Diffstat (limited to 'src/mov_encoder_thread.h')
-rw-r--r-- | src/mov_encoder_thread.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/mov_encoder_thread.h b/src/mov_encoder_thread.h index e3fba27..8cc24f8 100644 --- a/src/mov_encoder_thread.h +++ b/src/mov_encoder_thread.h @@ -36,6 +36,11 @@ #include <vector> using namespace std; +#include "frame.h" + +#include "threadsafe_queue_priority.h" +#include "threadsafe_queue_fifo.h" + #include "mov_encoder.h" #include "audio_encoder.h" #include "mov_encoder_writer.h" @@ -52,24 +57,16 @@ public: private: Info *info; - FrameVectorQueue *inputqueue; - FramePriorityQueue *video_outputqueue; - FramePriorityQueue *audio_inputqueue; - FramePriorityQueue *audio_outputqueue; + // FrameVectorQueue *inputqueue; + ThreadSafeQueueFIFO< FrameVector* > *inputqueue; FrameVector *block; //thread stuff - sem_t in_sem; - sem_t video_out_sem; - sem_t audio_in_sem; - sem_t audio_out_sem; - sem_t read_sem; - pthread_mutex_t input_mutex; - pthread_mutex_t video_output_mutex; - pthread_mutex_t audio_input_mutex; - pthread_mutex_t audio_output_mutex; + ThreadSafeQueuePriority *video_output_queue; + ThreadSafeQueuePriority *audio_input_queue; + ThreadSafeQueuePriority *audio_output_queue; volatile bool movencodersrunning; @@ -79,8 +76,6 @@ private: unsigned int num_frames_in_block; MovEncoderWriter *writer; - // pthread_t* writer_tid; - AudioEncoder* audioenc; int threads; |