prevent popup deactivation while button_down
[goodguy/history.git] / cinelerra-5.0 / cinelerra / vdevicempeg.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * 
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * 
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  */
21
22 #ifndef VDEVICEMPEG_H
23 #define VDEVICEMPEG_H
24
25 #include "../hvirtual_config.h"
26
27 #ifdef HAVE_VIDEO4LINUX2
28 #include "condition.inc"
29 #include "mutex.inc"
30 #include "vdevicebase.h"
31 #include <linux/types.h>
32 #include <linux/videodev2.h>
33 #include "devicempeginput.inc"
34 #include "videodevice.inc"
35 #include "vdevicempeg.inc"
36
37
38
39 class VDeviceMPEG : public VDeviceBase
40 {
41 public:
42         VDeviceMPEG(VideoDevice *device);
43         ~VDeviceMPEG();
44
45         virtual DeviceMPEGInput *get_mpeg_input() = 0;
46
47         int initialize();
48         int open_input(char *name=0);
49         int close_all();
50         int get_best_colormodel(Asset *asset);
51         int read_buffer(VFrame *frame);
52
53         int drop_frames(int frames);
54         double device_timestamp();
55         int start_toc(const char *path, const char *toc_path);
56         int start_record(int fd, int bsz);
57         int stop_record();
58         int total_video_streams();
59         int set_channel(Channel *channel);
60         int set_captioning(int mode);
61         int has_signal();
62         int create_channeldb(ArrayList<Channel*> *channeldb);
63         DeviceMPEGInput *mpeg_device() { return mpeg_input; }
64
65         int get_video_pid(int track);
66         int get_video_info(int track, int &pid, double &framerate,
67                 int &width, int &height, char *title);
68         int get_thumbnail(int stream, int64_t &position,
69                 unsigned char *&thumbnail, int &ww, int &hh);
70         int set_skimming(int track, int skim, skim_fn fn, void *vp);
71
72         int video_open;
73         DeviceMPEGInput *mpeg_input;
74 };
75
76 #endif
77 #endif
78
79