r668: Configure.in and autogen.sh cleanup based on ideas by giskard.
[cinelerra_cv.git] / cinelerra / vdevicebase.h
blobeedb6d2450b23c114782e3d3676ed96cdb2f817f
1 #ifndef VDEVICEBASE_H
2 #define VDEVICEBASE_H
4 #include "assets.inc"
5 #include "channel.inc"
6 #include "edl.inc"
7 #include "guicast.h"
8 #include "picture.inc"
9 #include "videodevice.inc"
11 class VDeviceBase
13 public:
14 VDeviceBase(VideoDevice *device);
15 virtual ~VDeviceBase();
17 virtual int open_input() { return 1; };
18 virtual int close_all() { return 1; };
19 virtual int has_signal() { return 0; };
20 virtual int read_buffer(VFrame *frame) { return 1; };
21 virtual int write_buffer(VFrame **outputs, EDL *edl) { return 1; };
22 virtual void new_output_buffer(VFrame **outputs, int colormodel) {};
23 virtual ArrayList<int>* get_render_strategies() { return 0; };
24 virtual int get_shared_data(unsigned char *data, long size) { return 0; };
25 virtual int stop_sharing() { return 0; };
26 virtual int interrupt_crash() { return 0; };
27 // Extra work must sometimes be done in here to set up the device.
28 virtual int get_best_colormodel(Asset *asset);
29 virtual int set_channel(Channel *channel) { return 0; };
30 virtual int set_picture(PictureConfig *picture) { return 0; };
32 virtual int open_output() { return 1; };
33 virtual int output_visible() { return 0; };
34 virtual int start_playback() { return 1; };
35 virtual int stop_playback() { return 1; };
36 virtual BC_Bitmap* get_bitmap() { return 0; };
37 // Most Linux video drivers don't work.
38 // Called by KeepaliveThread when the device appears to be stuck.
39 // Should restart the device if that's what it takes to get it to work.
40 virtual void goose_input() {};
42 VideoDevice *device;
45 #endif