summaryrefslogtreecommitdiff
path: root/src/mov_encoder_writer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mov_encoder_writer.h')
-rw-r--r--src/mov_encoder_writer.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/mov_encoder_writer.h b/src/mov_encoder_writer.h
index f74dc51..e653223 100644
--- a/src/mov_encoder_writer.h
+++ b/src/mov_encoder_writer.h
@@ -36,12 +36,14 @@
#include <string>
using namespace std;
+#define AUDIO_FRAME(x) x->number%2==1
+#define VIDEO_FRAME(x) x->number%2==0
+
class MovEncoderWriter : public Thread {
public:
MovEncoderWriter(const char* cpr,
- FramePriorityQueue *q,
- sem_t *s,
- pthread_mutex_t *m,
+ FramePriorityQueue *video_queue, pthread_mutex_t *video_mutex, sem_t *video_sem,
+ FramePriorityQueue *audio_queue, pthread_mutex_t *audio_mutex, sem_t *audio_sem,
Info *info);
~MovEncoderWriter();
@@ -54,16 +56,23 @@ private:
File *file;
- FramePriorityQueue *queue;
- pthread_mutex_t *mutex;
+ FramePriorityQueue *video_queue;
+ FramePriorityQueue *audio_queue;
+ pthread_mutex_t *video_mutex;
+ pthread_mutex_t *audio_mutex;
+ sem_t *video_sem;
+ sem_t *audio_sem;
- sem_t *sem;
+ unsigned int video_frame_number;
+ unsigned int audio_frame_number;
- unsigned int frame_number;
+ // Timecode_struc SCR;
+ // double timestamp;
- void write_audio_header(unsigned short int packetsize);
- void write_video_header(unsigned short int packetsize);
- void write_header();
+// void write_audio_header(unsigned short int packetsize);
+// void write_video_header(unsigned short int packetsize);
+// void write_system_header(unsigned int audio_size, unsigned int video_size);
+// void write_packet_header(unsigned int audio_size, unsigned int video_size);
};