diff options
Diffstat (limited to 'src/mov_encoder.h')
-rw-r--r-- | src/mov_encoder.h | 29 |
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); |