summaryrefslogtreecommitdiff
path: root/src/mov_encoder.h
diff options
context:
space:
mode:
authordeva <deva>2005-05-19 14:10:22 +0000
committerdeva <deva>2005-05-19 14:10:22 +0000
commitd74c7a00c417cffdc93a82efa2841e23d823bea6 (patch)
treeea7f7b69ccbd0dc1df1ea5e05dd59cfafa194f25 /src/mov_encoder.h
parenta597454b7ce1b931e3e4117e6fed509cc22517ff (diff)
Multithreading rulez?R0_2_2
Diffstat (limited to 'src/mov_encoder.h')
-rw-r--r--src/mov_encoder.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/mov_encoder.h b/src/mov_encoder.h
index 24525f2..13eb63b 100644
--- a/src/mov_encoder.h
+++ b/src/mov_encoder.h
@@ -36,6 +36,10 @@
/*
* $Log$
+ * Revision 1.9 2005/05/19 14:10:22 deva
+ *
+ * Multithreading rulez?
+ *
* Revision 1.8 2005/05/17 14:30:56 deva
* Added code, preparing threaded encoding.
*
@@ -70,19 +74,36 @@
#include <libdv/dv_types.h>
#include "frame.h"
-
+#include "queue.h"
#include "util.h"
+#include "thread.h"
+
// size specifies the length of the buffer.
#define FAME_BUFFER_SIZE (2*720*576*4) // FIXME: One size fits all...
-class MovEncoder {
- public:
+class MovEncoder : public Thread {
+public:
MovEncoder();
~MovEncoder();
Frame* encode(Frame *frame);
- private:
+ void run();
+
+ Queue<Frame> *getResultSequence();
+ void encodeSequence(Queue<Frame> *queue);
+
+ volatile bool running;
+
+private:
+ // Input queue
+ Queue<Frame> *inputqueue;
+ Queue<Frame> *outputqueue;
+
+ //thread stuff
+ sem_t sem;
+ sem_t done;
+
Frame *encode_video(Frame *frame);
void encode_audio(Frame *frame);