1 #ifndef DEVICE1394INPUT_H
2 #define DEVICE1394INPUT_H
8 #include "condition.inc"
12 #include <libraw1394/raw1394.h>
16 // Common 1394 output for audio and video
18 // Extracts video and audio from the single DV stream
19 class Device1394Input
: public Thread
25 int Device1394Input::open(int port
,
34 void increment_counter(int *counter
);
35 void decrement_counter(int *counter
);
37 static int dv_iso_handler(raw1394handle_t handle
,
41 static bus_reset_handler_t
dv_reset_handler(raw1394handle_t handle
,
42 unsigned int generation
);
44 // Read a video frame with timed blocking
46 int read_video(VFrame
*data
);
49 // Read audio with timed blocking
51 int read_audio(char *data
, int samples
);
53 // Storage of all frames
60 // For extracting audio
63 // Storage of audio data
67 // number of next video buffer to read
68 int current_outbuffer
;
69 unsigned char *input_buffer
;
72 Condition
*video_lock
;
73 Condition
*audio_lock
;