1 #ifndef DEVICE1394INPUT_H
2 #define DEVICE1394INPUT_H
8 #include "condition.inc"
12 #include <libraw1394/raw1394.h>
16 // Common 1394 input for audio and video
18 // Extracts video and audio from the single DV stream
19 class Device1394Input
: public Thread
25 int open(const char *path
,
35 void increment_counter(int *counter
);
36 void decrement_counter(int *counter
);
38 // Read a video frame with timed blocking
40 int read_video(VFrame
*data
);
43 // Read audio with timed blocking
45 int read_audio(char *data
, int samples
);
47 // Storage of all frames
54 // For extracting audio
57 // Storage of audio data
61 // number of next video buffer to read
62 int current_outbuffer
;
63 unsigned char *input_buffer
;
66 Condition
*video_lock
;
67 Condition
*audio_lock
;
93 // c-file-style: "linux"