diff options
author | deva <deva> | 2005-05-22 15:49:22 +0000 |
---|---|---|
committer | deva <deva> | 2005-05-22 15:49:22 +0000 |
commit | b04122f3f7884de08eb5d59bb3fd2bff829f9039 (patch) | |
tree | 6898a061f4e10a6026faa1ffe4a7a319256dacdf /src/mov_encoder_thread.h | |
parent | d74c7a00c417cffdc93a82efa2841e23d823bea6 (diff) |
Added multithreaded encoding support.
Diffstat (limited to 'src/mov_encoder_thread.h')
-rw-r--r-- | src/mov_encoder_thread.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/mov_encoder_thread.h b/src/mov_encoder_thread.h index 60f4c5c..989dd87 100644 --- a/src/mov_encoder_thread.h +++ b/src/mov_encoder_thread.h @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.5 2005/05/22 15:49:22 deva + * Added multithreaded encoding support. + * * Revision 1.4 2005/05/19 14:10:22 deva * * Multithreading rulez? @@ -62,6 +65,7 @@ using namespace std; #include "mov_encoder.h" +#include "mov_encoder_writer.h" class MovEncoderThread { public: @@ -71,16 +75,29 @@ public: void encode(Frame* frame); private: - Queue<Frame> *inputqueue; + FrameVectorQueue *inputqueue; + FramePriorityQueue *outputqueue; + FrameVector *block; + + //thread stuff + sem_t in_sem; + sem_t out_sem; + + sem_t read_sem; + + pthread_mutex_t input_mutex; + pthread_mutex_t output_mutex; // Used for encoder switching - int current_encoder; int current_frame; + unsigned int frame_number; int num_frames_in_block; + MovEncoderWriter *writer; + pthread_t* writer_tid; + int threads; - int file; vector<MovEncoder*> encs; vector<pthread_t*> tids; }; |