12
15
* This program is distributed in the hope that it will be useful,
13
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
18
* GNU General Public License for more details.
17
20
* You should have received a copy of the GNU General Public License
18
21
* along with this program; if not, write to the Free Software
19
22
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28
#ifndef DOXYGEN_SHOULD_SKIP_THIS
21
29
#include <X11/Intrinsic.h>
29
float fps; /* frames per second */
30
char *file; /* filename */
31
int flags; /* different flags .. see app_data.h */
32
int state; /* state flags */
33
int start_no; /* start number */
34
int pic_no; /* current pic number */
35
int movie_no; /* current movie number */
36
int step; /* number to use for increasing pic number */
37
int time_per_frame; /* time per frame in milli secs */
38
int max_frames; /* max number of frames to record */
40
int compress; /* for zlib and png */
41
int quality; /* needed for jpeg */
43
int bpp; /* for video4linux */
44
int vid_dev; /* file descriptor for video device */
45
int snd_dev; /* file descriptor for sound device */
49
int mouseWanted; /* 0 none , 1 white , 2 black */
50
char *video_dev; /* video device */
51
char *snd_device; /* sound device */
53
/* some function pointers
55
void *(*get_colors)(XColor *, int);
56
void *(*open)(char *, char *);
57
int (*write)(void *, unsigned int, unsigned int, void *);
59
void (*save)(FILE *, XImage *, struct _Job *);
60
void (*clean)(struct _Job *);
61
Boolean (*capture)(void *, unsigned long *);
63
/* target format, e.g. CAP_XWD
70
/* color table for the output file
74
XWindowAttributes win_attr;
35
#include <X11/extensions/Xfixes.h>
36
#include <X11/extensions/Xdamage.h>
42
#endif // DOXYGEN_SHOULD_SKIP_THIS
45
* \brief state flags for the recording state machine
59
* \brief keeps data about the current recording job
61
* The stuff here is partly volatile information augmenting the preferences
62
* set in an XVC_AppData struct, partly settings which are derived from
63
* the preferences. For example, target may be set to autodetect in the
64
* preferences, but here we need the final (potentially autodetected)
69
/** \brief filename */
72
* \brief various flags
77
/** \brief state flags */
79
/** \brief current pic number */
81
/** \brief current movie number */
83
/** \brief time per frame in milli secs */
85
#ifdef HAVE_FFMPEG_AUDIO
86
/** \brief sound device */
88
#endif // HAVE_FFMPEG_AUDIO
91
* some function pointers
93
/** \brief function to retrieve color information */
94
void *(*get_colors) (XColor *, int);
95
/** \brief function used to save a captured frame */
96
void (*save) (FILE *, XImage *);
97
/** \brief function used to cleanup after a recording session */
99
/** \brief function to capture the frames */
103
* target format, e.g. CAP_XWD
106
* \brief target format
112
* \brief target video codec
118
* \brief target audio codec
125
* color information for the output file
127
/** \brief the number of colors in the pseudo color color table */
129
/** \brief the color table as the output API requires it */
131
/** \brief the colors as X11 sends them with the captured image */
133
/** \brief color information retrieved from first XImage */
137
XserverRegion dmg_region;
138
#endif // USE_XDAMAGE
88
#define VC_CONTINUE 64
91
* capture output formats
106
Job *job_init (int flags);
108
int job_set_sound_dev (char *, int, int, int);
109
void job_set_fps (float fps);
110
float job_fps (void);
111
void job_set_file (char *file);
112
char *job_file (void);
113
void job_set_compression (int comp);
114
int job_compression (void);
115
void job_set_shm (int shm);
116
void job_set_capture (void);
118
void job_set_quality (int quality);
119
int job_quality (void);
120
void job_set_save_function (Visual *vis, int type, Job *jobp);
121
Boolean is_filename_mutable(char*);
142
void xvc_job_free ();
143
void xvc_job_set_from_app_data (XVC_AppData * app);
144
Job *xvc_job_ptr (void);
145
void xvc_job_dump ();
146
void xvc_job_set_save_function (XVC_FFormatID type);
147
void xvc_job_set_colors ();
149
void xvc_job_set_state (int state);
150
void xvc_job_merge_state (int state);
151
void xvc_job_remove_state (int state);
152
void xvc_job_merge_and_remove_state (int merge_state, int remove_state);
153
void xvc_job_keep_state (int state);
154
void xvc_job_keep_and_merge_state (int merge_state, int remove_state);
157
XserverRegion xvc_get_damage_region ();
158
#endif // USE_XDAMAGE