summaryrefslogtreecommitdiff
path: root/src/mov_encoder_thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mov_encoder_thread.h')
-rw-r--r--src/mov_encoder_thread.h23
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;
};