1 #ifndef DEVICE1394INPUT_H
2 #define DEVICE1394INPUT_H
8 #include "condition.inc"
15 // Common 1394 output for audio and video
17 // Extracts video and audio from the single DV stream
18 class Device1394Input
: public Thread
24 int Device1394Input::open(int port
,
31 void increment_counter(int *counter
);
32 void decrement_counter(int *counter
);
34 static int dv_iso_handler(raw1394handle_t handle
,
38 static bus_reset_handler_t
dv_reset_handler(raw1394handle_t handle
,
39 unsigned int generation
);
41 // Read a video frame with timed blocking
43 int read_video(VFrame
*data
);
46 // Read audio with timed blocking
48 int read_audio(char *data
, int samples
);
50 // Storage of currently downloading frame
54 // Storage of all frames
61 // For extracting audio
64 // Storage of audio data
68 // number of next video buffer to read
69 int current_outbuffer
;
72 Condition
*video_lock
;
73 Condition
*audio_lock
;
76 raw1394handle_t handle
;