1 #ifndef IEC61883INPUT_H
2 #define IEC61883INPUT_H
8 #include "condition.inc"
9 #include <libiec61883/iec61883.h>
15 // Common 1394 input for audio and video
17 // Extracts video and audio from the single DV stream
18 class IEC61883Input
: public Thread
33 void increment_counter(int *counter
);
34 void decrement_counter(int *counter
);
36 // Read a video frame with timed blocking
38 int read_video(VFrame
*data
);
41 // Read audio with timed blocking
43 int read_audio(char *data
, int samples
);
46 int write_frame(unsigned char *data
, int len
, int complete
);
48 raw1394handle_t handle
;
49 iec61883_dv_fb_t frame
;
60 // Storage of all frames
67 // For extracting audio
70 // Storage of audio data
74 // number of next video buffer to read
75 int current_outbuffer
;
76 unsigned char *input_buffer
;
79 Condition
*video_lock
;
80 Condition
*audio_lock
;