LiVES  2.8.7
main.h
Go to the documentation of this file.
1 // main.h
2 // LiVES
3 // (c) G. Finch (salsaman@gmail.com) 2003 - 2017
4 // see file ../COPYING for full licensing details
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 version 3 or higher as
8  published by the Free Software Foundation.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 */
19 
20 
21 // begin legal warning
22 /*
23  NO WARRANTY
24 
25  BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
26  FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
27 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
28  PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
29  OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
31 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
32  PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
33 REPAIR OR CORRECTION.
34 
35  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
36  WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
37  REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
38  INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
39  OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
40 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
41 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
42  PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
43 POSSIBILITY OF SUCH DAMAGES.
44 */
45 // end legal warning
46 
47 
48 // Have fun, and let's fight for Free Speech, Open Media and True Creativity !
49 // - Salsaman
50 
51 
52 // note: preferred coding style is: astyle --style=java -H -Y -s2 -U -k3 -W3 -xC140 -xL
53 
54 #ifndef HAS_LIVES_MAIN_H
55 #define HAS_LIVES_MAIN_H
56 
57 #ifdef __cplusplus
58 #undef HAVE_UNICAP
59 #endif
60 
61 #ifndef GUI_QT
62 #define GUI_GTK
63 #define PAINTER_CAIRO
64 #else
65 #define PAINTER_QPAINTER
66 #define NO_PROG_LOAD
67 #undef ENABLE_GIW
68 #endif
69 
70 #ifdef GUI_GTK
71 
72 #define USE_GLIB
73 
74 #include <gtk/gtk.h>
75 #include <gdk/gdkkeysyms.h>
76 
77 #if GTK_CHECK_VERSION(3, 0, 0)
78 #ifdef ENABLE_GIW
79 #define ENABLE_GIW_3
80 #endif
81 #endif
82 
83 #endif
84 
85 #ifdef HAVE_WAYLAND
86 #include <gdk/gdkwayland.h>
87 #endif
88 
89 #ifdef GDK_WINDOWING_WAYLAND
90 #ifndef GDK_IS_WAYLAND_DISPLAY
91 #define GDK_IS_WAYLAND_DISPLAY(a) FALSE
92 #endif
93 #endif
94 
95 #ifdef IS_MINGW
96 
97 #ifndef WINVER
98 #define WINVER 0x0500
99 #endif
100 
101 #include <windows.h>
102 #include <winbase.h>
103 #include <tlhelp32.h>
104 #include <sddl.h>
105 
106 #define O_SYNC (FILE_FLAG_NO_BUFFERING|FILE_FLAG_WRITE_THROUGH)
107 
108 typedef PROCESS_INFORMATION *lives_pid_t;
109 typedef PROCESS_INFORMATION *lives_pgid_t;
110 
111 #ifdef GUI_GTK
112 #ifndef GDK_WINDOWING_WIN32
113 #define GDK_WINDOWING_WIN32
114 #endif
115 #endif
116 
117 #else // IS_MINGW
118 
119 #ifdef GUI_GTK
120 #ifndef GDK_WINDOWING_X11
121 #define GDK_WINDOWING_X11
122 #endif
123 #else
124 #include <sys/types.h>
125 #include <unistd.h>
126 
127 #endif // GUI_GTK
128 
129 typedef pid_t lives_pid_t;
130 typedef int lives_pgid_t;
131 
132 #endif // IS_MINGW
133 
134 #include <sys/stat.h>
135 #include <stdlib.h>
136 #include <stdio.h>
137 #include <unistd.h>
138 #include <string.h>
139 #include <signal.h>
140 #include <assert.h>
141 #include <errno.h>
142 
143 #ifdef __cplusplus
144 #define __STDC_CONSTANT_MACROS
145 #ifdef _STDINT_H
146 #undef _STDINT_H
147 #endif
148 #endif
149 
150 #include <stdint.h>
151 #include <stdarg.h>
152 
153 #ifndef ulong
154 #define ulong unsigned long
155 #endif
156 
157 #define QUOTEME(x) #x
158 
160 #define MAX_FILES 65535
161 
164 #ifndef PREFIX_DEFAULT
165 #ifndef IS_MINGW
166 #define PREFIX_DEFAULT "/usr"
167 #else
168 // TODO - get this from the installer
169 #define PREFIX_DEFAULT "C:\\Program Files\\LiVES"
170 #endif
171 #endif
172 
174 #ifndef PREFIX
175 #define PREFIX PREFIX_DEFAULT
176 #endif
177 
178 #ifndef IS_MINGW
179 #define LIVES_DIR_SEP "/"
180 #define LIVES_STATUS_FILE_NAME ".status"
181 #define LIVES_INFO_FILE_NAME ".info"
182 #define LIVES_BFILE_NAME ".smogrify"
183 #define LIVES_SMOGPLUGIN_FILE_NAME ".smogplugin"
184 #define LIVES_SMOGVAL_FILE_NAME ".smogval"
185 #define LIVES_ENC_DEBUG_FILE_NAME ".debug_out"
186 #define LIVES_DEVNULL "/dev/null"
187 
188 #define DLL_NAME "so"
189 
190 #define DOC_DIR "/share/doc/lives-"
191 
192 #define THEME_DIR "/share/lives/themes/"
193 #define PLUGIN_SCRIPTS_DIR "/share/lives/plugins/"
194 #define PLUGIN_COMPOUND_DIR "/share/lives/plugins/"
195 #define PLUGIN_EXEC_DIR "/lives/plugins/"
196 #define ICON_DIR "/share/lives/icons/"
197 #define DESKTOP_ICON_DIR "/share/icons/hicolor/48x48/apps"
198 #define DATA_DIR "/share/lives/"
199 #define LIVES_CONFIG_DIR ".lives-dir/"
200 #define LIVES_WORK_NAME "livesprojects"
201 
202 #else // IS_MINGW
203 #define LIVES_DIR_SEP "\\"
204 #define LIVES_STATUS_FILE_NAME "status"
205 #define LIVES_INFO_FILE_NAME "info"
206 #define LIVES_BFILE_NAME "smogrify"
207 #define LIVES_SMOGPLUGIN_FILE_NAME "smogplugin"
208 #define LIVES_SMOGVAL_FILE_NAME "smogval"
209 #define LIVES_ENC_DEBUG_FILE_NAME "debug_out"
210 #define LIVES_DEVNULL "NUL"
211 
212 #define DLL_NAME "dll"
213 
214 #define DOC_DIR "\\Documents/"
215 
216 #define THEME_DIR "\\Themes/"
217 #define PLUGIN_SCRIPTS_DIR "\\Plugins/"
218 #define PLUGIN_COMPOUND_DIR "\\Plugins/"
219 #define PLUGIN_EXEC_DIR "\\Plugins/"
220 #define ICON_DIR "\\Icons/"
221 #define DATA_DIR "\\Data/"
222 #define LIVES_CONFIG_DIR "\\Config/"
223 #define LIVES_WORK_NAME "livesprojects"
224 #endif
225 
226 #define LIVES_DEVICE_DIR "/dev/"
227 
228 #define LIVES_COPYRIGHT_YEARS "2002 - 2017"
229 
230 #define LIVES_WEBSITE PACKAGE_URL
231 #define LIVES_MANUAL_URL LIVES_WEBSITE "/manual/"
232 #define LIVES_MANUAL_FILENAME "LiVES_manual.html"
233 #define LIVES_AUTHOR_EMAIL "salsaman+lives@gmail.com"
234 #define LIVES_DONATE_URL "https://sourceforge.net/p/lives/donate/"
235 #define LIVES_BUG_URL PACKAGE_BUGREPORT
236 #define LIVES_FEATURE_URL "https://sourceforge.net/p/lives/feature-requests/"
237 #define LIVES_TRANSLATE_URL "https://translations.launchpad.net/lives/trunk"
238 
239 #if defined (IS_DARWIN) || defined (__FreeBSD__)
240 #ifndef off64_t
241 #define off64_t off_t
242 #endif
243 #ifndef lseek64
244 #define lseek64 lseek
245 #endif
246 #endif
247 
248 #define DEF_FILE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
249 
250 #define WARN_FILE_SIZE 500
253 
255 #define FPS_MAX 200.
256 
257 #define MAX_FRAME_WIDTH 100000.
258 #define MAX_FRAME_HEIGHT 100000.
259 
260 #define ENABLE_DVD_GRAB
261 
262 #ifdef HAVE_MJPEGTOOLS
263 #define HAVE_YUV4MPEG
264 #endif
265 
266 #ifdef ENABLE_ORC
267 #include <orc/orc.h>
268 #endif
269 
270 #ifdef ENABLE_OIL
271 #include <liboil/liboil.h>
272 #endif
273 
274 #ifndef IS_SOLARIS
275 #define LIVES_INLINE inline
276 #else
277 #define LIVES_INLINE
278 #endif
279 
280 #include <limits.h>
281 #include <float.h>
282 
283 #ifndef PATH_MAX
284 #ifdef MAX_PATH
285 #define PATH_MAX MAX_PATH
286 #else
287 #define PATH_MAX 4096
288 #endif
289 #endif
290 
291 #ifdef __GNUC__
292 # define WARN_UNUSED __attribute__((warn_unused_result))
293 # define GNU_PURE __attribute__((pure))
294 # define GNU_CONST __attribute__((const))
295 # define GNU_MALLOC __attribute__((malloc))
296 # define GNU_ALIGN(x) __attribute__((alloc_align(x)))
297 #else
298 # define WARN_UNUSED
299 # define GNU_PURE
300 # define GNU_CONST
301 # define GNU_MALLOC
302 # define GNU_ALIGN(x)
303 #endif
304 
305 #ifdef PRODUCE_LOG
306 #define LIVES_LOG "lives.log"
307 #endif
308 
309 uint64_t lives_random(void);
310 
311 typedef struct {
312  uint16_t red;
313  uint16_t green;
314  uint16_t blue;
316 
317 typedef struct {
318  uint16_t red;
319  uint16_t green;
320  uint16_t blue;
321  uint16_t alpha;
323 
324 #include "widget-helper.h"
325 
326 typedef void *(*fn_ptr)(void *ptr);
327 
328 #define ALLOW_MPV
329 #define ALLOW_PNG24
330 
333 typedef struct {
334  int value;
335  int64_t reltime;
336 } event;
337 
338 typedef struct {
339  // processing / busy dialog
340  LiVESWidget *processing;
341  LiVESWidget *progressbar;
342  LiVESWidget *label;
343  LiVESWidget *label2;
344  LiVESWidget *label3;
345  LiVESWidget *stop_button;
346  LiVESWidget *pause_button;
347  LiVESWidget *preview_button;
348  LiVESWidget *cancel_button;
349  LiVESWidget *scrolledwindow;
350  uint32_t frames_done;
351  boolean is_ready;
352 } xprocess;
353 
354 typedef struct {
355  int afile;
356  double seek;
357  double vel;
359 
360 #if HAVE_SYSTEM_WEED
361 #include <weed/weed.h>
362 #include <weed/weed-events.h>
363 #else
364 #include "../libweed/weed.h"
365 #include "../libweed/weed-events.h"
366 #endif
367 
368 // see weed event spec. for more info
369 
371 #include "events.h"
372 
373 #ifdef IS_LIBLIVES
374 #include "liblives.hpp"
375 #include "lbindings.h"
376 #endif
377 
378 typedef enum {
394 
397 
400 
402 
405 
407 } lives_undo_t;
408 
410 typedef enum {
415 
417 typedef enum {
420 
423 
426 
429 
432 
435 
438 
441 
444 
447 
450 
453 
456 
459 
463 
464 typedef enum {
468 
469 typedef enum {
477 
478 typedef enum {
483 
484 #define IMG_TYPE_BEST IMG_TYPE_PNG
485 
486 #define AFORM_SIGNED 0
487 #define AFORM_LITTLE_ENDIAN 0
488 
489 #define AFORM_UNSIGNED 1
490 #define AFORM_BIG_ENDIAN (1<<1)
491 #define AFORM_UNKNOWN 65536
492 
493 typedef enum {
498 
499 #include "pangotext.h"
500 
501 #define WEED_LEAF_HOST_DEINTERLACE "host_deinterlace" // frame needs deinterlacing
502 #define WEED_LEAF_HOST_TC "host_tc" // timecode for deinterlace
503 #define WEED_LEAF_HOST_DECODER "host_decoder" // pointer to decoder for a layer
504 #define WEED_LEAF_HOST_PTHREAD "host_pthread" // thread for a layer
505 
506 #define CLIP_NAME_MAXLEN 256
507 
509 typedef struct {
510  // basic info (saved during backup)
511  int bpp;
512  double fps;
513  int hsize;
514  int vsize;
515  int arps;
516  uint32_t signed_endian;
517 
518  int arate;
519  uint64_t unique_id;
520  int achans;
522 
524  int frames;
525  char title[256];
526  char author[256];
527  char comment[256];
528  char keywords[256];
530 
532 
533  // extended info (not saved)
535 
536 #define LIVES_CLIP_HEADER_VERSION 100
537 
539 
542 
543  char handle[256];
544  int ohsize;
545  int ovsize;
546  int64_t f_size;
547  int64_t afilesize;
549  char file_name[PATH_MAX];
550  char info_file[PATH_MAX];
551  char name[CLIP_NAME_MAXLEN];
552  char save_file_name[PATH_MAX];
553  char type[64];
554  int start;
555  int end;
560  boolean changed;
561  LiVESWidget *menuentry;
563  boolean orig_file_name;
564  boolean was_renamed;
565  boolean is_untitled;
566  double pb_fps;
567  double freeze_fps;
568  boolean play_paused;
569 
570  //opening/restoring status
571  boolean opening;
572  boolean opening_audio;
574  boolean opening_loc;
575  boolean restoring;
576  boolean is_loaded;
577 
579  boolean nopreview;
580 
582  boolean nokeep;
583 
584  // various times; total time is calculated as the longest of video, laudio and raudio
585  double total_time;
586  double video_time;
587  double laudio_time;
588  double raudio_time;
589  double pointer_time;
590 
591  // used only for insert_silence, holds pre-padding length for undo
594 
595  // current and last played index frames for internal player
596  int frameno;
598 
600  // see resample.c for new events system
601 
602  // events
603  event *events[1];
604 
605  weed_plant_t *event_list;
606  weed_plant_t *event_list_back;
607  weed_plant_t *next_event;
608 
609  LiVESList *layout_map;
611 
614 
616  int undo_end;
617  char undo_text[32];
618  char redo_text[32];
619  boolean undoable;
620  boolean redoable;
621 
622  // used for storing undo values
627  uint32_t undo1_uint;
628  double undo1_dbl;
629  double undo2_dbl;
630  boolean undo1_boolean;
631  boolean undo2_boolean;
632  boolean undo3_boolean;
633 
638  int undo_arps;
639 
641 
642  void *ext_src;
643 
649 
651 
653 
654 #define FX_FRAME_PUMP_VAL 200
655 
656 #define IMG_BUFF_SIZE 4096
657 
658  boolean ratio_fps;
659 
660  int64_t aseek_pos;
661 
662  // decoder data
663 
664  char mime_type[256];
665 
666  boolean deinterlace;
667 
669 
675 
677 
678  char *op_dir;
679  uint64_t op_ds_warn_level;
680 
684 
686 
687  lives_painter_surface_t *laudio_drawable;
688  lives_painter_surface_t *raudio_drawable;
689 
690  int cb_src;
691 
692  boolean needs_update;
693 } lives_clip_t;
694 
695 typedef struct {
696  // the following can be assumed TRUE, they are checked on startup
697  boolean has_smogrify;
703 
704  // the following may need checking before use
705  boolean has_dvgrab;
706  boolean has_sox_play;
707  boolean has_sox_sox;
708  boolean has_autolives;
709  boolean has_mplayer;
710  boolean has_mplayer2;
711  boolean has_mpv;
712  boolean has_convert;
713  boolean has_composite;
714  boolean has_identify;
715  boolean has_cdda2wav;
716  boolean has_icedax;
718  boolean has_jackd;
720  boolean has_xwininfo;
721  boolean has_gdb;
724 
726  char home_dir[PATH_MAX];
727 
728  char touch_cmd[PATH_MAX];
729  char rm_cmd[PATH_MAX];
730  char mv_cmd[PATH_MAX];
731  char cp_cmd[PATH_MAX];
732  char ln_cmd[PATH_MAX];
733  char chmod_cmd[PATH_MAX];
734  char cat_cmd[PATH_MAX];
735  char echo_cmd[PATH_MAX];
736  char eject_cmd[PATH_MAX];
737  char rmdir_cmd[PATH_MAX];
738 
739  char *rcfile;
740 
742  char startup_msg[256];
743 
744  // plugins
746 
747  boolean has_python;
748  uint64_t python_version;
749 
750  short cpu_bits;
751 
752  char *myname_full;
753  char *myname;
754 
755  boolean has_stderr;
756 
758 
759  int ncpus;
760 
762 
763  pid_t mainpid;
764 
765  mode_t umask;
766 } capability;
767 
769 extern capability *capable;
770 
771 #ifdef HAVE_JACK_JACK_H
772 #include "jack.h"
773 #endif
774 
775 #define __STDC_FORMAT_MACROS
776 #include <inttypes.h>
777 
778 #ifndef PRId64
779 
780 #ifndef __WORDSIZE
781 #if defined __x86_64__
782 # define __WORDSIZE 64
783 #ifndef __WORDSIZE_COMPAT32
784 # define __WORDSIZE_COMPAT32 1
785 #endif
786 #else
787 # define __WORDSIZE 32
788 #endif
789 #endif // __WORDSIZE
790 
791 #ifndef __PRI64_PREFIX
792 # if __WORDSIZE == 64
793 # define __PRI64_PREFIX "l"
794 # else
795 # define __PRI64_PREFIX "ll"
796 # endif
797 #endif
798 
799 # define PRId64 __PRI64_PREFIX "d"
800 # define PRIu64 __PRI64_PREFIX "u"
801 #endif // ifndef PRI64d
802 
803 // common defs for mainwindow (retain this order)
804 #include "plugins.h"
805 #include "colourspace.h"
806 #include "paramspecial.h"
807 #include "multitrack.h"
808 #include "mainwindow.h"
809 #include "keyboard.h"
810 #include "preferences.h"
811 
812 extern mainwindow *mainw;
813 
814 // internal player clock
815 #include <sys/time.h>
816 struct timeval tv;
817 
819 extern ssize_t sizint, sizdbl, sizshrt;
820 
821 typedef enum {
846 
847 // some useful functions
848 
849 // dialogs.c
850 boolean do_progress_dialog(boolean visible, boolean cancellable, const char *text);
851 boolean do_warning_dialog(const char *text);
852 boolean do_warning_dialog_with_check(const char *text, int warn_mask_number);
853 boolean do_warning_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient);
854 boolean do_yesno_dialog(const char *text);
855 boolean do_yesno_dialog_with_check(const char *text, int warn_mask_number);
856 boolean do_yesno_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient);
857 boolean do_yesno_dialog_with_check(const char *text, int warn_mask_number);
858 boolean do_yesno_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient);
859 int do_abort_cancel_retry_dialog(const char *text, LiVESWindow *transient) WARN_UNUSED;
860 int do_error_dialog(const char *text);
861 int do_info_dialog(const char *text);
862 int do_error_dialog_with_check(const char *text, int warn_mask_number);
863 int do_blocking_error_dialog(const char *text);
864 int do_blocking_info_dialog(const char *text);
865 int do_error_dialog_with_check_transient(const char *text, boolean is_blocking, int warn_mask_number,
866  LiVESWindow *transient);
867 int do_info_dialog_with_transient(const char *text, boolean is_blocking, LiVESWindow *transient);
868 LiVESWidget *create_message_dialog(lives_dialog_t diat, const char *text, LiVESWindow *transient,
869  int warn_mask_number, boolean is_blocking);
870 LiVESWidget *create_question_dialog(const char *title, const char *text, LiVESWindow *parent);
871 LiVESWindow *get_transient_full();
872 void do_system_failed_error(const char *com, int retval, const char *addinfo);
873 int do_write_failed_error_s_with_retry(const char *fname, const char *errtext, LiVESWindow *transient) WARN_UNUSED;
874 void do_write_failed_error_s(const char *filename, const char *addinfo);
875 int do_read_failed_error_s_with_retry(const char *fname, const char *errtext, LiVESWindow *transient) WARN_UNUSED;
876 void do_read_failed_error_s(const char *filename, const char *addinfo);
877 boolean do_header_write_error(int clip);
878 int do_header_read_error_with_retry(int clip) WARN_UNUSED;
879 int do_header_missing_detail_error(int clip, lives_clip_details_t detail) WARN_UNUSED;
880 void do_chdir_failed_error(const char *dir);
881 void handle_backend_errors(void);
882 boolean check_backend_return(lives_clip_t *sfile);
883 
885 char *ds_critical_msg(const char *dir, uint64_t dsval);
886 char *ds_warning_msg(const char *dir, uint64_t dsval, uint64_t cwarn, uint64_t nwarn);
887 boolean check_storage_space(lives_clip_t *sfile, boolean is_processing);
888 
889 char *get_upd_msg(int type);
890 char *get_new_install_msg(void);
891 
892 boolean ask_permission_dialog(int what);
893 boolean do_abort_check(void);
894 void add_warn_check(LiVESBox *box, int warn_mask_number);
895 void do_memory_error_dialog(void);
896 void too_many_files(void);
897 void workdir_warning(void);
898 void do_audio_import_error(void);
899 void do_mt_backup_space_error(lives_mt *, int memreq_mb);
900 
901 boolean do_clipboard_fps_warning(void);
902 void perf_mem_warning(void);
903 void do_dvgrab_error(void);
904 boolean do_comments_dialog(int fileno, char *filename);
905 boolean do_auto_dialog(const char *text, int type);
906 void do_encoder_acodec_error(void);
907 void do_encoder_sox_error(void);
908 boolean rdet_suggest_values(int width, int height, double fps, int fps_num, int fps_denom, int arate,
909  int asigned, boolean swap_endian, boolean anr, boolean ignore_fps);
910 boolean do_encoder_restrict_dialog(int width, int height, double fps, int fps_num, int fps_denom,
911  int arate, int asigned, boolean swap_endian, boolean anr, boolean save_all);
912 void do_messages_window(void);
913 void do_firstever_dialog(void);
914 void do_upgrade_error_dialog(void);
915 void do_no_mplayer_sox_error(void);
916 void do_need_mplayer_dialog(void);
917 void do_need_mplayer_mpv_dialog(void);
918 void do_aud_during_play_error(void);
919 void do_rendered_fx_dialog(void);
920 void do_layout_scrap_file_error(void);
921 void do_layout_ascrap_file_error(void);
922 void do_lb_composite_error(void);
923 void do_lb_convert_error(void);
924 void do_ra_convert_error(void);
925 void do_set_load_lmap_error(void);
926 boolean do_set_duplicate_warning(const char *new_set);
927 boolean do_set_rename_old_layouts_warning(const char *new_set);
928 boolean do_layout_alter_frames_warning(void);
929 boolean do_layout_alter_audio_warning(void);
930 boolean do_yuv4m_open_warning(void);
931 void do_mt_undo_mem_error(void);
932 void do_mt_undo_buf_error(void);
933 void do_mt_set_mem_error(boolean has_mt, boolean trans);
934 void do_mt_audchan_error(int warn_mask);
935 void do_mt_no_audchan_error(void);
936 void do_mt_no_jack_error(int warn_mask);
937 boolean do_mt_rect_prompt(void);
938 void do_audrate_error_dialog(void);
939 boolean do_event_list_warning(void);
940 void do_nojack_rec_error(void);
941 void do_vpp_palette_error(void);
942 void do_vpp_fps_error(void);
943 void do_decoder_palette_error(void);
944 void do_rmem_max_error(int size);
945 boolean do_original_lost_warning(const char *fname);
946 void do_no_decoder_error(const char *fname);
947 void do_jack_noopen_warn(void);
948 void do_jack_noopen_warn2(void);
949 void do_jack_noopen_warn3(void);
950 void do_jack_noopen_warn4(void);
951 void do_file_perm_error(const char *file_name);
952 void do_dir_perm_error(const char *dir_name);
953 void do_dir_perm_access_error(const char *dir_name);
955 void do_after_crash_warning(void);
956 void do_bad_layout_error(void);
957 void do_card_in_use_error(void);
958 void do_dev_busy_error(const char *devstr);
959 boolean do_existing_subs_warning(void);
960 void do_invalid_subs_error(void);
961 boolean do_erase_subs_warning(void);
962 boolean do_sub_type_warning(const char *ext, const char *type_ext);
963 boolean do_move_workdir_dialog(void);
964 void do_set_locked_warning(const char *setname);
965 void do_no_in_vdevs_error(void);
966 void do_locked_in_vdevs_error(void);
967 void do_do_not_close_d(void);
968 void do_set_noclips_error(const char *setname);
969 void do_no_autolives_error(void);
971 void do_pulse_lost_conn_error(void);
972 void do_jack_lost_conn_error(void);
973 void do_cd_error_dialog(void);
974 void do_bad_theme_error(const char *themefile);
975 void do_bad_theme_import_error(const char *theme_file);
976 boolean do_theme_exists_warn(const char *themename);
977 
978 boolean process_one(boolean visible);
979 void do_threaded_dialog(char *translated_text, boolean has_cancel);
980 void end_threaded_dialog(void);
981 void threaded_dialog_spin(double fraction);
982 void response_ok(LiVESButton *button, livespointer user_data);
983 void pump_io_chan(LiVESIOChannel *iochan);
984 
985 void do_splash_progress(void);
986 
987 // d_print shortcuts
988 void d_print_cancelled(void);
989 void d_print_failed(void);
990 void d_print_done(void);
991 void d_print_file_error_failed(void);
992 
993 // general
994 void do_text_window(const char *title, const char *text);
995 
996 // saveplay.c
997 boolean read_file_details(const char *file_name, boolean only_check_for_audio);
998 boolean add_file_info(const char *check_handle, boolean aud_only);
999 boolean save_file_comments(int fileno);
1000 boolean reload_clip(int fileno, int maxframe);
1002 void reget_afilesize(int fileno);
1003 ulong deduce_file(const char *filename, double start_time, int end);
1004 ulong open_file(const char *filename);
1005 ulong open_file_sel(const char *file_name, double start_time, int frames);
1006 void open_fw_device(void);
1007 char *get_untitled_name(int number);
1008 boolean get_new_handle(int index, const char *name);
1009 boolean get_temp_handle(int index, boolean create);
1010 boolean get_handle_from_info_file(int index);
1011 void create_cfile(void);
1012 void save_file(int clip, int start, int end, const char *filename);
1013 void play_file(void);
1014 void save_frame(LiVESMenuItem *menuitem, livespointer user_data);
1015 boolean save_frame_inner(int clip, int frame, const char *file_name, int width, int height, boolean from_osc);
1016 void wait_for_stop(const char *stop_command);
1017 boolean save_clip_values(int which_file);
1018 void add_to_recovery_file(const char *handle);
1019 void rewrite_recovery_file(void);
1020 boolean check_for_recovery_files(boolean auto_recover);
1021 void recover_layout_map(int numclips);
1022 const char *get_deinterlace_string(void);
1023 
1024 // saveplay.c backup
1025 void backup_file(int clip, int start, int end, const char *filename);
1026 int save_event_frames(void);
1027 boolean write_headers(lives_clip_t *file);
1028 
1029 // saveplay.c restore
1030 ulong restore_file(const char *filename);
1031 boolean read_headers(const char *file_name);
1032 
1033 // saveplay.c sets
1034 void open_set_file(const char *set_name, int clipnum);
1035 
1036 // saveplay.c scrap file
1037 boolean open_scrap_file(void);
1038 boolean open_ascrap_file(void);
1039 int save_to_scrap_file(weed_plant_t *layer);
1040 boolean load_from_scrap_file(weed_plant_t *layer, int frame);
1041 void close_ascrap_file(void);
1042 void close_scrap_file(void);
1043 void add_to_ascrap_mb(uint64_t bytes);
1044 
1045 boolean check_for_disk_space(void);
1046 
1047 // main.c
1048 typedef void (*SignalHandlerPointer)(int);
1049 
1051 void catch_sigint(int signum);
1052 void defer_sigint(int signum);
1053 boolean startup_message_fatal(const char *msg);
1054 boolean startup_message_choice(const char *msg, int msgtype);
1055 boolean startup_message_nonfatal(const char *msg);
1056 boolean startup_message_info(const char *msg);
1057 boolean startup_message_nonfatal_dismissable(const char *msg, int warning_mask);
1059 void get_monitors(void);
1060 void set_ce_frame_from_pixbuf(LiVESImage *image, LiVESPixbuf *pixbuf, lives_painter_t *);
1061 void load_start_image(int frame);
1062 void load_end_image(int frame);
1063 void load_preview_image(boolean update_always);
1064 
1065 boolean pull_frame(weed_plant_t *layer, const char *image_ext, weed_timecode_t tc);
1066 void pull_frame_threaded(weed_plant_t *layer, const char *img_ext, weed_timecode_t tc);
1067 void check_layer_ready(weed_plant_t *layer);
1068 boolean pull_frame_at_size(weed_plant_t *layer, const char *image_ext, weed_timecode_t tc,
1069  int width, int height, int target_palette);
1070 LiVESPixbuf *pull_lives_pixbuf_at_size(int clip, int frame, const char *image_ext, weed_timecode_t tc,
1071  int width, int height, LiVESInterpType interp);
1072 LiVESPixbuf *pull_lives_pixbuf(int clip, int frame, const char *image_ext, weed_timecode_t tc);
1073 
1074 LiVESError *lives_pixbuf_save(LiVESPixbuf *pixbuf, char *fname, lives_image_type_t imgtype,
1075  int quality, boolean do_chmod, LiVESError **gerrorptr);
1076 
1077 void init_track_decoders(void);
1078 void free_track_decoders(void);
1079 
1080 #ifdef USE_LIBPNG
1081 boolean layer_from_png(FILE *fp, weed_plant_t *layer, boolean prog);
1082 boolean save_to_png(FILE *fp, weed_plant_t *layer, int comp);
1083 #endif
1084 
1085 void load_frame_image(int frame);
1086 void sensitize(void);
1087 void desensitize(void);
1088 void procw_desensitize(void);
1089 void close_current_file(int file_to_switch_to);
1090 void get_next_free_file(void);
1091 void switch_to_file(int old_file, int new_file);
1092 void do_quick_switch(int new_file);
1093 void switch_audio_clip(int new_file, boolean activate);
1094 void resize(double scale);
1095 void do_start_messages(void);
1096 boolean set_palette_colours(boolean force_reload);
1097 void set_main_title(const char *filename, int or_untitled_number);
1098 void set_record(void);
1099 
1100 //gui.c
1101 void create_LiVES(void);
1102 void show_lives(void);
1103 void set_colours(LiVESWidgetColor *colf, LiVESWidgetColor *colb, LiVESWidgetColor *colf2,
1104  LiVESWidgetColor *colb2, LiVESWidgetColor *coli, LiVESWidgetColor *colt);
1105 void set_preview_box_colours(void);
1106 void load_theme_images(void);
1107 void set_interactive(boolean interactive);
1108 char *get_menu_name(lives_clip_t *sfile);
1109 void enable_record(void);
1110 void toggle_record(void);
1111 void disable_record(void);
1112 void make_custom_submenus(void);
1113 void fade_background(void);
1114 void unfade_background(void);
1115 void block_expose(void);
1116 void unblock_expose(void);
1117 void frame_size_update(void);
1118 void splash_init(void);
1119 void splash_end(void);
1120 void splash_msg(const char *msg, double pct);
1121 void add_message_scroller(LiVESWidget *conter);
1123 #if GTK_CHECK_VERSION(3, 0, 0)
1124 void calibrate_sepwin_size(void);
1125 boolean expose_pim(LiVESWidget *widget, lives_painter_t *cr, livespointer user_data);
1126 boolean expose_sim(LiVESWidget *widget, lives_painter_t *cr, livespointer user_data);
1127 boolean expose_eim(LiVESWidget *widget, lives_painter_t *cr, livespointer user_data);
1128 #endif
1129 
1130 // system calls in utils.c
1131 int lives_system(const char *com, boolean allow_error);
1132 lives_pid_t lives_fork(const char *com);
1133 int lives_open3(const char *pathname, int flags, mode_t mode);
1134 int lives_open2(const char *pathname, int flags);
1135 int lives_open_buffered_rdonly(const char *pathname);
1136 int lives_creat_buffered(const char *pathname, int mode);
1137 int lives_close_buffered(int fd);
1138 void lives_close_all_file_buffers(void);
1139 off_t lives_lseek_buffered_rdonly(int fd, off_t offset);
1140 ssize_t lives_write(int fd, livesconstpointer buf, size_t count, boolean allow_fail);
1141 ssize_t lives_write_buffered(int fd, const char *buf, size_t count, boolean allow_fail);
1142 ssize_t lives_write_le(int fd, livesconstpointer buf, size_t count, boolean allow_fail);
1143 ssize_t lives_write_le_buffered(int fd, livesconstpointer buf, size_t count, boolean allow_fail);
1144 ssize_t lives_read(int fd, void *buf, size_t count, boolean allow_less);
1145 ssize_t lives_read_buffered(int fd, void *buf, size_t count, boolean allow_less);
1146 ssize_t lives_read_le(int fd, void *buf, size_t count, boolean allow_less);
1147 ssize_t lives_read_le_buffered(int fd, void *buf, size_t count, boolean allow_less);
1148 int lives_chdir(const char *path, boolean allow_fail);
1149 int lives_fputs(const char *s, FILE *stream);
1150 char *lives_fgets(char *s, int size, FILE *stream);
1151 pid_t lives_getpid(void);
1152 int lives_getgid(void);
1153 int lives_getuid(void);
1154 boolean lives_freep(void **ptr);
1155 void lives_kill_subprocesses(const char *dirname, boolean kill_parent);
1156 void lives_suspend_resume_process(const char *dirname, boolean suspend);
1157 #ifdef IS_MINGW
1158 boolean lives_win32_suspend_resume_process(DWORD pid, boolean suspend);
1159 boolean lives_win32_kill_subprocesses(DWORD pid, boolean kill_parent);
1160 int lives_win32_get_num_logical_cpus(void);
1161 #endif
1162 int lives_kill(lives_pid_t pid, int sig);
1163 int lives_killpg(lives_pgid_t pgrp, int sig);
1164 void lives_srandom(unsigned int seed);
1165 ssize_t lives_readlink(const char *path, char *buf, size_t bufsiz);
1166 boolean lives_setenv(const char *name, const char *value);
1167 boolean lives_fsync(int fd);
1168 void lives_sync(void);
1169 int lives_rmdir(const char *dir, boolean force);
1170 int lives_rmdir_with_parents(const char *dir);
1171 int lives_rm(const char *file);
1172 int lives_rmglob(const char *files);
1173 int lives_cp(const char *from, const char *to);
1174 int lives_cp_keep_perms(const char *from, const char *to);
1175 int lives_mv(const char *from, const char *to);
1176 int lives_touch(const char *tfile);
1177 int lives_chmod(const char *target, const char *mode);
1178 int lives_cat(const char *from, const char *to, boolean append);
1179 int lives_echo(const char *text, const char *to, boolean append);
1180 int lives_ln(const char *from, const char *to);
1181 
1182 int lives_utf8_strcasecmp(const char *s1, const char *s2);
1183 
1184 char *filename_from_fd(char *val, int fd);
1185 
1186 float LEFloat_to_BEFloat(float f) GNU_CONST;
1187 uint64_t lives_10pow(int pow) GNU_CONST;
1188 double lives_fix(double val, int decimals) GNU_CONST;
1189 int get_approx_ln(uint32_t val) GNU_CONST;
1190 
1191 int64_t lives_get_current_ticks(void);
1192 boolean lives_alarm_get(int alarm_handle);
1193 int lives_alarm_set(int64_t ticks);
1194 void lives_alarm_clear(int alarm_handle);
1195 lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, uint64_t *dsval);
1196 char *lives_format_storage_space_string(uint64_t space);
1197 char *lives_datetime(struct timeval *tv);
1198 
1199 int myround(double n);
1200 void get_dirname(char *filename);
1201 char *get_dir(const char *filename);
1202 void get_basename(char *filename);
1203 void get_filename(char *filename, boolean strip_dir);
1204 char *get_extension(const char *filename);
1205 uint64_t get_version_hash(const char *exe, const char *sep, int piece);
1206 uint64_t make_version_hash(const char *ver);
1207 void d_print(const char *fmt, ...);
1208 void init_clipboard(void);
1209 boolean cache_file_contents(const char *filename);
1210 char *get_val_from_cached_list(const char *key, size_t maxlen);
1211 
1212 void get_location(const char *exe, char *val, int maxlen);
1213 
1214 char *make_image_file_name(lives_clip_t *clip, int frame, const char *img_ext);
1215 const char *get_image_ext_for_type(lives_image_type_t imgtype);
1216 lives_image_type_t lives_image_ext_to_type(const char *img_ext);
1217 lives_image_type_t lives_image_type_to_image_type(const char *lives_img_type);
1218 
1219 void set_menu_text(LiVESWidget *menu, const char *text, boolean use_mnemonic);
1220 void get_menu_text(LiVESWidget *menu, char *text);
1221 void get_menu_text_long(LiVESWidget *menuitem, char *text);
1222 void reset_clipmenu(void);
1223 void get_play_times(void);
1224 void get_total_time(lives_clip_t *file);
1225 uint32_t get_signed_endian(boolean is_signed, boolean little_endian);
1226 void fullscreen_internal(void);
1227 void switch_to_int_player(void);
1228 void switch_to_mplayer(void);
1229 void switch_aud_to_sox(boolean set_pref);
1230 boolean switch_aud_to_jack(void);
1231 boolean switch_aud_to_pulse(void);
1232 void switch_aud_to_mplayer(boolean set_pref);
1233 void switch_aud_to_mplayer2(boolean set_pref);
1234 boolean prepare_to_play_foreign(void);
1235 boolean after_foreign_play(void);
1236 boolean check_file(const char *file_name, boolean check_exists);
1237 boolean check_dir_access(const char *dir);
1238 uint64_t get_file_size(int fd);
1239 uint64_t sget_file_size(const char *name);
1240 uint64_t get_fs_free(const char *dir);
1241 boolean is_writeable_dir(const char *dir);
1242 boolean ensure_isdir(char *fname);
1243 char *ensure_extension(const char *fname, const char *ext) WARN_UNUSED;
1244 boolean check_dev_busy(char *devstr);
1245 void activate_url_inner(const char *link);
1246 void activate_url(LiVESAboutDialog *about, const char *link, livespointer data);
1247 void show_manual_section(const char *lang, const char *section);
1248 
1249 double calc_time_from_frame(int clip, int frame);
1250 int calc_frame_from_time(int filenum, double time);
1251 int calc_frame_from_time2(int filenum, double time);
1252 int calc_frame_from_time3(int filenum, double time);
1253 
1254 boolean check_for_ratio_fps(double fps);
1255 double get_ratio_fps(const char *string);
1256 void calc_maxspect(int rwidth, int rheight, int *cwidth, int *cheight);
1257 
1258 char *remove_trailing_zeroes(double val);
1259 
1260 void remove_layout_files(LiVESList *lmap);
1261 boolean add_lmap_error(lives_lmap_error_t lerror, const char *name, livespointer user_data,
1262  int clipno, int frameno, double atime, boolean affects_current);
1263 void clear_lmap_errors(void);
1264 boolean prompt_remove_layout_files(void);
1265 boolean do_std_checks(const char *type_name, const char *type, size_t maxlen, const char *nreject);
1266 boolean is_legal_set_name(const char *set_name, boolean allow_dupes);
1267 char *repl_workdir(const char *entry, boolean fwd);
1268 char *clip_detail_to_string(lives_clip_details_t what, size_t *maxlenp);
1269 boolean get_clip_value(int which, lives_clip_details_t, void *retval, size_t maxlen);
1270 void save_clip_value(int which, lives_clip_details_t, void *val);
1271 boolean check_frame_count(int idx);
1272 void count_opening_frames(void);
1273 void get_frame_count(int idx);
1274 void get_frames_sizes(int fileno, int frame_to_test);
1275 int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps);
1276 boolean int_array_contains_value(int *array, int num_elems, int value);
1277 boolean check_for_lock_file(const char *set_name, int type);
1278 void lives_list_free_strings(LiVESList *);
1279 void lives_list_free_all(LiVESList **);
1280 void lives_slist_free_all(LiVESSList **);
1281 
1282 boolean create_event_space(int length_in_eventsb);
1283 void add_to_recent(const char *filename, double start, int frames, const char *file_open_params);
1284 int verhash(char *version);
1285 void set_undoable(const char *what, boolean sensitive);
1286 void set_redoable(const char *what, boolean sensitive);
1287 void zero_spinbuttons(void);
1288 void draw_little_bars(double ptrtime);
1289 void set_sel_label(LiVESWidget *label);
1290 void clear_mainw_msg(void);
1291 int get_token_count(const char *string, int delim);
1292 LiVESPixbuf *lives_pixbuf_new_blank(int width, int height, int palette);
1293 char *lives_strappend(char *string, int len, const char *newbit);
1294 LiVESList *lives_list_append_unique(LiVESList *xlist, const char *add);
1295 void find_when_to_stop(void);
1296 int calc_new_playback_position(int fileno, uint64_t otc, uint64_t *ntc);
1297 void calc_aframeno(int fileno);
1298 void minimise_aspect_delta(double allowed_aspect, int hblock, int vblock, int hsize, int vsize, int *width, int *height);
1299 LiVESInterpType get_interp_value(short quality);
1300 
1301 LiVESList *lives_list_move_to_first(LiVESList *list, LiVESList *item) WARN_UNUSED;
1302 LiVESList *lives_list_delete_string(LiVESList *, char *string) WARN_UNUSED;
1303 LiVESList *lives_list_copy_strings(LiVESList *list);
1304 boolean string_lists_differ(LiVESList *, LiVESList *);
1305 
1306 boolean is_realtime_aplayer(int ptype);
1307 
1308 LiVESList *get_set_list(const char *dir, boolean utf8);
1309 
1310 char *subst(const char *string, const char *from, const char *to);
1311 char *insert_newlines(const char *text, int maxwidth);
1312 
1313 int hextodec(char *string);
1314 int get_hex_digit(const char *c);
1315 
1316 uint32_t fastrand(void);
1317 void fastsrand(uint32_t seed);
1318 
1319 int lives_list_strcmp_index(LiVESList *list, livesconstpointer data);
1320 
1322 
1323 //callbacks.c
1324 
1325 // paramspecial.c
1326 LiVESPixbuf *mt_framedraw(lives_mt *, LiVESPixbuf *);
1327 
1328 // effects-weed.c
1329 livespointer _lives_malloc(size_t size) GNU_MALLOC;
1330 livespointer lives_memcpy(livespointer dest, livesconstpointer src, size_t n);
1331 livespointer lives_memset(livespointer s, int c, size_t n);
1332 void _lives_free(livespointer ptr);
1333 livespointer lives_calloc(size_t n_blocks, size_t n_block_bytes);
1334 livespointer _lives_realloc(livespointer ptr, size_t new_size);
1335 
1336 // pangotext.c
1337 boolean subtitles_init(lives_clip_t *sfile, char *fname, lives_subtitle_type_t);
1338 void subtitles_free(lives_clip_t *sfile);
1339 boolean get_srt_text(lives_clip_t *sfile, double xtime);
1340 boolean get_sub_text(lives_clip_t *sfile, double xtime);
1341 boolean save_sub_subtitles(lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename);
1342 boolean save_srt_subtitles(lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename);
1343 
1344 #include "osc_notify.h"
1345 
1346 // inlines
1347 #define cfile mainw->files[mainw->current_file]
1348 #define clipboard mainw->files[0]
1349 
1350 #define PREFS_TIMEOUT 10000000
1351 
1352 #define LIVES_TV_CHANNEL1 "http://www.serverwillprovide.com/sorteal/livestvclips/livestv.ogm"
1353 
1354 // round (double) a up to next (integer) multiple of (double) b
1355 #define CEIL(a, b) ((int)(((double)a + (double)b - .000000001) / ((double)b)) * b)
1356 
1357 #ifdef NEED_ENDIAN_TEST
1358 #undef NEED_ENDIAN_TEST
1359 static int32_t testint = 0x12345678;
1360 #define IS_BIG_ENDIAN (((char *)&testint)[0] == 0x12)
1361 #endif
1362 
1364 
1365 void break_me(void);
1366 
1367 #define LIVES_NO_DEBUG
1368 #ifndef LIVES_DEBUG
1369 #ifndef LIVES_NO_DEBUG
1370 #define LIVES_DEBUG(x) fprintf(stderr, "LiVES debug: %s\n", x)
1371 #else // LIVES_NO_DEBUG
1372 #define LIVES_DEBUG(x) dummychar = x
1373 #endif // LIVES_NO_DEBUG
1374 #endif // LIVES_DEBUG
1375 
1376 #ifndef LIVES_INFO
1377 #ifndef LIVES_NO_INFO
1378 #define LIVES_INFO(x) fprintf(stderr, "LiVES info: %s\n", x)
1379 #else // LIVES_NO_INFO
1380 #define LIVES_INFO(x) dummychar = x
1381 #endif // LIVES_NO_INFO
1382 #endif // LIVES_INFO
1383 
1384 #ifndef LIVES_WARN
1385 #ifndef LIVES_NO_WARN
1386 #define LIVES_WARN(x) fprintf(stderr, "LiVES warning: %s\n", x)
1387 #else // LIVES_NO_WARN
1388 #define LIVES_WARN(x) dummychar = x
1389 #endif // LIVES_NO_WARN
1390 #endif // LIVES_WARN
1391 
1392 #ifndef LIVES_ERROR
1393 #ifndef LIVES_NO_ERROR
1394 #define LIVES_ERROR(x) {fprintf(stderr, "LiVES error: %s\n", x); break_me();}
1395 #else // LIVES_NO_ERROR
1396 #define LIVES_ERROR(x) dummychar = x
1397 #endif // LIVES_NO_ERROR
1398 #endif // LIVES_ERROR
1399 
1400 #ifndef LIVES_FATAL
1401 #ifndef LIVES_NO_FATAL
1402 #define LIVES_FATAL(x) {fprintf(stderr, "LiVES fatal: %s\n", x); raise (LIVES_SIGSEGV);}
1403 #else // LIVES_NO_FATAL
1404 #define LIVES_FATAL(x) dummychar = x
1405 #endif // LIVES_NO_FATAL
1406 #endif // LIVES_FATAL
1407 
1408 #endif // #ifndef HAS_LIVES_MAIN_H
1409 
void do_messages_window(void)
Definition: dialogs.c:2408
void do_ra_convert_error(void)
Definition: dialogs.c:2627
int lives_touch(const char *tfile)
Definition: utils.c:3916
int undo_arate
audio playback rate
Definition: main.h:634
boolean do_warning_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient)
Definition: dialogs.c:380
void load_theme_images(void)
Definition: gui.c:56
void do_encoder_sox_error(void)
Definition: dialogs.c:2116
void handle_backend_errors(void)
Definition: dialogs.c:623
int frames
Definition: main.h:524
LiVESPixbuf * pull_lives_pixbuf_at_size(int clip, int frame, const char *image_ext, weed_timecode_t tc, int width, int height, LiVESInterpType interp)
Definition: main.c:5182
double undo2_dbl
Definition: main.h:629
int afile
Definition: main.h:355
void reget_afilesize(int fileno)
Definition: utils.c:4163
char * ensure_extension(const char *fname, const char *ext) WARN_UNUSED
Definition: utils.c:2416
boolean do_yesno_dialog_with_check(const char *text, int warn_mask_number)
Definition: dialogs.c:371
boolean has_stderr
Definition: main.h:755
LiVESWidget * stop_button
Definition: main.h:345
int undo1_int
Definition: main.h:623
boolean no_proc_sys_errors
skip system error dialogs in processing
Definition: main.h:681
int value
Definition: main.h:334
uint64_t python_version
Definition: main.h:748
int get_hex_digit(const char *c)
Definition: utils.c:5134
Definition: main.h:836
boolean deinterlace
auto deinterlace
Definition: main.h:666
boolean opening_audio
Definition: main.h:572
int lives_open_buffered_rdonly(const char *pathname)
Definition: utils.c:560
ulong open_file_sel(const char *file_name, double start_time, int frames)
Definition: saveplay.c:272
int undo2_int
Definition: main.h:624
Definition: main.h:383
Definition: main.h:834
double old_raudio_time
Definition: main.h:593
int verhash(char *version)
Definition: utils.c:4319
void do_mt_audchan_error(int warn_mask)
Definition: dialogs.c:2588
boolean startup_message_fatal(const char *msg)
Definition: main.c:3395
boolean pull_frame_at_size(weed_plant_t *layer, const char *image_ext, weed_timecode_t tc, int width, int height, int target_palette)
Definition: main.c:4844
void perf_mem_warning(void)
Definition: dialogs.c:2328
boolean restoring
Definition: main.h:575
void do_read_failed_error_s(const char *filename, const char *addinfo)
Definition: dialogs.c:2995
void draw_little_bars(double ptrtime)
Definition: utils.c:2984
int * frame_index_back
for undo
Definition: main.h:650
int lives_system(const char *com, boolean allow_error)
Definition: utils.c:295
void do_dir_perm_error(const char *dir_name)
Definition: dialogs.c:3182
char * get_untitled_name(int number)
Definition: saveplay.c:3349
boolean has_pulse_audio
Definition: main.h:719
boolean get_handle_from_info_file(int index)
Definition: saveplay.c:1061
int hextodec(char *string)
Definition: utils.c:5118
Definition: main.h:831
LiVESWidget * create_message_dialog(lives_dialog_t diat, const char *text, LiVESWindow *transient, int warn_mask_number, boolean is_blocking)
Definition: dialogs.c:154
double seek
Definition: main.h:356
uint32_t undo1_uint
Definition: main.h:627
ssize_t lives_read_le(int fd, void *buf, size_t count, boolean allow_less)
Definition: utils.c:510
boolean has_mpv
Definition: main.h:711
Definition: events.h:162
boolean do_move_workdir_dialog(void)
Definition: dialogs.c:3273
void _lives_free(livespointer ptr)
Definition: effects-weed.c:107
LiVESError * lives_pixbuf_save(LiVESPixbuf *pixbuf, char *fname, lives_image_type_t imgtype, int quality, boolean do_chmod, LiVESError **gerrorptr)
Definition: main.c:6613
boolean do_event_list_warning(void)
Definition: dialogs.c:2637
int start
Definition: main.h:554
int do_header_missing_detail_error(int clip, lives_clip_details_t detail) WARN_UNUSED
Definition: dialogs.c:3133
int do_error_dialog(const char *text)
Definition: dialogs.c:497
#define PATH_MAX
Definition: main.h:287
void set_main_title(const char *filename, int or_untitled_number)
Definition: main.c:3443
boolean nokeep
don't show the 'keep' button - e.g. for operations which resize frames
Definition: main.h:582
boolean nopreview
don't show preview/pause buttons on processing
Definition: main.h:579
lives_pid_t lives_fork(const char *com)
Definition: utils.c:339
uint64_t get_fs_free(const char *dir)
Definition: utils.c:5195
pid_t lives_pid_t
Definition: main.h:129
boolean load_from_scrap_file(weed_plant_t *layer, int frame)
Definition: saveplay.c:4745
lives_dialog_t
Definition: mainwindow.h:188
void get_play_times(void)
Definition: utils.c:2647
just cancel in GUI (for keep, etc)
Definition: main.h:466
void save_frame(LiVESMenuItem *menuitem, livespointer user_data)
Definition: saveplay.c:1120
int lives_utf8_strcasecmp(const char *s1, const char *s2)
Definition: utils.c:4999
void splash_end(void)
Definition: gui.c:4273
lives_image_type_t lives_image_ext_to_type(const char *img_ext)
Definition: utils.c:2227
void find_when_to_stop(void)
Definition: utils.c:3145
void save_clip_value(int which, lives_clip_details_t, void *val)
Definition: utils.c:4729
void clear_lmap_errors(void)
Definition: utils.c:2042
void set_pref(const char *key, const char *value)
Definition: preferences.c:297
void activate_url(LiVESAboutDialog *about, const char *link, livespointer data)
Definition: utils.c:4109
void do_file_perm_error(const char *file_name)
Definition: dialogs.c:3174
int lives_rm(const char *file)
Definition: utils.c:3862
boolean is_legal_set_name(const char *set_name, boolean allow_dupes)
Definition: utils.c:2175
void do_set_load_lmap_error(void)
uint64_t lives_random(void)
Definition: utils.c:101
boolean has_mplayer
Definition: main.h:709
LiVESWidget * scrolledwindow
Definition: main.h:349
livespointer lives_memcpy(livespointer dest, livesconstpointer src, size_t n)
Definition: effects-weed.c:74
boolean do_existing_subs_warning(void)
Definition: dialogs.c:3227
video playback completed
Definition: main.h:452
int lives_pgid_t
Definition: main.h:130
boolean create_event_space(int length_in_eventsb)
Definition: utils.c:4197
void do_bad_theme_import_error(const char *theme_file)
Definition: dialogs.c:3368
void close_current_file(int file_to_switch_to)
close current file, and try to switch to file_to_switch_to
Definition: main.c:6647
void recover_layout_map(int numclips)
Definition: saveplay.c:5119
int lives_echo(const char *text, const char *to, boolean append)
Definition: utils.c:3965
Definition: main.h:386
int ohsize
Definition: main.h:544
boolean was_renamed
Definition: main.h:564
lives_painter_surface_t * raudio_drawable
Definition: main.h:688
void open_fw_device(void)
boolean reload_clip(int fileno, int maxframe)
Definition: saveplay.c:5199
char * remove_trailing_zeroes(double val)
Definition: utils.c:4951
void do_autolives_needs_clips_error(void)
Definition: dialogs.c:3348
void defer_sigint(int signum)
Definition: main.c:177
void check_layer_ready(weed_plant_t *layer)
Definition: main.c:5097
Definition: main.h:832
void workdir_warning(void)
Definition: dialogs.c:2077
Definition: main.h:835
boolean switch_aud_to_pulse(void)
Definition: utils.c:3294
boolean opening
Definition: main.h:571
int last_frameno
Definition: main.h:597
void get_basename(char *filename)
Definition: utils.c:2383
void clear_mainw_msg(void)
Definition: utils.c:1224
boolean read_headers(const char *file_name)
Definition: saveplay.c:3964
void unblock_expose(void)
Definition: gui.c:3261
boolean has_cdda2wav
Definition: main.h:715
void fastsrand(uint32_t seed)
Definition: utils.c:5155
void pull_frame_threaded(weed_plant_t *layer, const char *img_ext, weed_timecode_t tc)
Definition: main.c:5154
int do_error_dialog_with_check_transient(const char *text, boolean is_blocking, int warn_mask_number, LiVESWindow *transient)
Definition: dialogs.c:532
void d_print(const char *fmt,...)
Definition: utils.c:1814
boolean can_write_to_config
Definition: main.h:700
imported video, broken into frames
Definition: main.h:470
int progress_start
Definition: main.h:558
void frame_size_update(void)
Definition: gui.c:4080
void d_print_file_error_failed(void)
Definition: dialogs.c:2888
ssize_t sizdbl
Definition: main.c:85
lives_image_type_t
Definition: main.h:478
boolean redoable
Definition: main.h:620
LiVESList * lives_list_move_to_first(LiVESList *list, LiVESList *item) WARN_UNUSED
Definition: utils.c:5243
void do_text_window(const char *title, const char *text)
lives_clip_type_t clip_type
Definition: main.h:640
void do_splash_progress(void)
lives_undo_t undo_action
undo
Definition: main.h:613
Definition: main.h:479
char * get_val_from_cached_list(const char *key, size_t maxlen)
Definition: utils.c:4482
lives_subtitles_t * subt
Definition: main.h:676
livespointer _lives_malloc(size_t size) GNU_MALLOC
Definition: effects-weed.c:80
void(* SignalHandlerPointer)(int)
Definition: main.h:1048
int get_token_count(const char *string, int delim)
Definition: utils.c:4986
double total_time
Definition: main.h:585
Definition: main.h:379
void do_jack_lost_conn_error(void)
Definition: dialogs.c:3353
uint64_t sget_file_size(const char *name)
Definition: utils.c:4133
boolean has_dvgrab
Definition: main.h:705
boolean do_auto_dialog(const char *text, int type)
Definition: dialogs.c:1949
void reset_clipmenu(void)
Definition: utils.c:3762
void enable_record(void)
Definition: gui.c:3523
void do_threaded_dialog(char *translated_text, boolean has_cancel)
Definition: dialogs.c:2817
char * op_dir
Definition: main.h:678
void count_opening_frames(void)
Definition: utils.c:2280
uint16_t red
Definition: main.h:318
Definition: main.h:333
ssize_t lives_read_buffered(int fd, void *buf, size_t count, boolean allow_less)
Definition: utils.c:657
boolean do_layout_alter_frames_warning(void)
Definition: dialogs.c:2481
ulong restore_file(const char *filename)
Definition: saveplay.c:4411
lives_whentostop_t
which stream end should cause playback to finish ?
Definition: main.h:410
boolean rdet_suggest_values(int width, int height, double fps, int fps_num, int fps_denom, int arate, int asigned, boolean swap_endian, boolean anr, boolean ignore_fps)
Definition: dialogs.c:2138
void d_print_failed(void)
Definition: dialogs.c:2879
void minimise_aspect_delta(double allowed_aspect, int hblock, int vblock, int hsize, int vsize, int *width, int *height)
Definition: utils.c:3169
boolean undo1_boolean
Definition: main.h:630
void add_message_scroller(LiVESWidget *conter)
Definition: gui.c:114
boolean do_clipboard_fps_warning(void)
Definition: dialogs.c:2333
void set_sel_label(LiVESWidget *label)
Definition: utils.c:4410
char * lives_fgets(char *s, int size, FILE *stream)
Definition: utils.c:432
ssize_t lives_write_le(int fd, livesconstpointer buf, size_t count, boolean allow_fail)
ssize_t sizint
type sizes
Definition: main.c:85
boolean lives_setenv(const char *name, const char *value)
Definition: utils.c:273
boolean check_storage_space(lives_clip_t *sfile, boolean is_processing)
Definition: dialogs.c:767
Definition: main.h:317
mode_t umask
Definition: main.h:765
int ovsize
Definition: main.h:545
#define GNU_MALLOC
Definition: main.h:301
void do_vpp_fps_error(void)
Definition: dialogs.c:2663
boolean startup_message_nonfatal(const char *msg)
Definition: main.c:3404
void pump_io_chan(LiVESIOChannel *iochan)
Definition: dialogs.c:702
void do_mt_undo_buf_error(void)
Definition: dialogs.c:2568
no cancel
Definition: main.h:419
LiVESWindow * get_transient_full()
Definition: dialogs.c:431
int do_read_failed_error_s_with_retry(const char *fname, const char *errtext, LiVESWindow *transient) WARN_UNUSED
Definition: dialogs.c:3071
int asampsize
Definition: main.h:521
ssize_t lives_write_buffered(int fd, const char *buf, size_t count, boolean allow_fail)
Definition: utils.c:721
LiVESList * get_set_list(const char *dir, boolean utf8)
Definition: utils.c:4858
void close_scrap_file(void)
Definition: saveplay.c:5078
boolean do_yesno_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient)
Definition: dialogs.c:406
uint32_t undo_signed_endian
Definition: main.h:635
boolean lives_freep(void **ptr)
Definition: utils.c:842
void set_undoable(const char *what, boolean sensitive)
Definition: utils.c:4358
boolean get_temp_handle(int index, boolean create)
Definition: saveplay.c:3196
boolean get_sub_text(lives_clip_t *sfile, double xtime)
Definition: pangotext.c:554
boolean is_untitled
Definition: main.h:565
void get_next_free_file(void)
Definition: utils.c:2348
void do_firstever_dialog(void)
unimported video, not or partially broken in frames
Definition: main.h:473
int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps)
Definition: resample.c:56
int lives_ln(const char *from, const char *to)
Definition: utils.c:3924
int lives_mv(const char *from, const char *to)
Definition: utils.c:3908
void end_threaded_dialog(void)
Definition: dialogs.c:2846
Definition: main.h:826
int lives_cat(const char *from, const char *to, boolean append)
Definition: utils.c:3949
int stored_layout_idx
Definition: main.h:672
void do_write_failed_error_s(const char *filename, const char *addinfo)
Definition: dialogs.c:2949
boolean is_realtime_aplayer(int ptype)
Definition: utils.c:1445
boolean save_frame_inner(int clip, int frame, const char *file_name, int width, int height, boolean from_osc)
Definition: saveplay.c:3660
uint32_t signed_endian
bitfield
Definition: main.h:516
LiVESWidget * menuentry
Definition: main.h:561
boolean check_file(const char *file_name, boolean check_exists)
check if file exists
Definition: utils.c:3784
boolean has_xwininfo
Definition: main.h:720
Definition: main.h:844
frames from video device
Definition: main.h:475
LiVESPixbuf * pull_lives_pixbuf(int clip, int frame, const char *image_ext, weed_timecode_t tc)
Definition: main.c:5223
boolean ask_permission_dialog(int what)
Definition: dialogs.c:3384
int nmonitors
Definition: main.h:757
lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, uint64_t *dsval)
Definition: utils.c:812
int arate
audio playback rate
Definition: main.h:518
int lives_kill(lives_pid_t pid, int sig)
Definition: utils.c:1191
Definition: main.h:390
boolean no_proc_write_errors
skip write error dialogs in processing
Definition: main.h:683
int64_t aseek_pos
audio seek posn. (bytes) for when we switch clips
Definition: main.h:660
livespointer lives_memset(livespointer s, int c, size_t n)
Definition: effects-weed.c:131
void do_jack_noopen_warn3(void)
Definition: dialogs.c:2524
void lives_alarm_clear(int alarm_handle)
Definition: utils.c:1350
Definition: main.h:495
LiVESWidget * cancel_button
Definition: main.h:348
int lives_rmdir_with_parents(const char *dir)
Definition: utils.c:3854
void do_mt_set_mem_error(boolean has_mt, boolean trans)
Definition: dialogs.c:2572
const char * get_deinterlace_string(void)
Definition: saveplay.c:206
void set_redoable(const char *what, boolean sensitive)
Definition: utils.c:4386
boolean set_palette_colours(boolean force_reload)
Definition: main.c:1931
capability * get_capabilities(void)
Definition: main.c:2182
boolean can_read_from_config
Definition: main.h:699
Definition: main.h:496
uint16_t alpha
Definition: main.h:321
int insert_start
Definition: main.h:556
boolean keep_without_preview
allow keep, even when nopreview is set - TODO use only nopreview and nokeep
Definition: main.h:685
void switch_to_file(int old_file, int new_file)
Definition: main.c:6964
int undo_achans
Definition: main.h:636
ssize_t lives_write_le_buffered(int fd, livesconstpointer buf, size_t count, boolean allow_fail)
LiVESList * layout_map
Definition: main.h:609
void wait_for_stop(const char *stop_command)
Definition: saveplay.c:3627
boolean undo3_boolean
Definition: main.h:632
int lives_fputs(const char *s, FILE *stream)
Definition: utils.c:419
int lives_getuid(void)
Definition: utils.c:159
int undo_arps
audio sample rate
Definition: main.h:638
void do_encoder_img_ftm_error(render_details *rdet)
Definition: dialogs.c:3202
LiVESInterpType get_interp_value(short quality)
Definition: utils.c:5236
lives_clip_details_t
Definition: main.h:821
void do_bad_theme_error(const char *themefile)
Definition: dialogs.c:3304
const char * version(void)
int rowstride
Definition: main.h:538
int64_t afilesize
Definition: main.h:547
Definition: main.h:840
void desensitize(void)
Definition: main.c:3662
void add_to_recovery_file(const char *handle)
Definition: saveplay.c:5691
void do_set_locked_warning(const char *setname)
Definition: dialogs.c:3278
_palette * palette
Definition: main.c:84
frames from generator plugin
Definition: main.h:472
int save_event_frames(void)
Definition: saveplay.c:4556
int do_write_failed_error_s_with_retry(const char *fname, const char *errtext, LiVESWindow *transient) WARN_UNUSED
Definition: dialogs.c:3017
char * lives_strappend(char *string, int len, const char *newbit)
Definition: utils.c:1380
Definition: main.h:837
int lives_killpg(lives_pgid_t pgrp, int sig)
Definition: utils.c:1207
lives_interlace_t interlace
interlace type (if known - none, topfirst, bottomfirst or : see plugins.h)
Definition: main.h:531
void load_preview_image(boolean update_always)
Definition: main.c:4243
LiVESWidget * label3
Definition: main.h:344
void set_record(void)
int bpp
Definition: main.h:511
pid_t mainpid
Definition: main.h:763
void do_dir_perm_access_error(const char *dir_name)
Definition: dialogs.c:3190
uint64_t get_file_size(int fd)
Definition: utils.c:4126
double stored_layout_audio
Definition: main.h:673
uint32_t frames_done
Definition: main.h:350
void init_clipboard(void)
Definition: utils.c:1767
void show_manual_section(const char *lang, const char *section)
Definition: utils.c:4113
void switch_aud_to_sox(boolean set_pref)
Definition: utils.c:3347
void do_mt_backup_space_error(lives_mt *, int memreq_mb)
Definition: dialogs.c:2545
void do_no_decoder_error(const char *fname)
Definition: dialogs.c:2502
char * filename_from_fd(char *val, int fd)
Definition: utils.c:42
void switch_to_int_player(void)
Definition: main.h:385
uint32_t fastrand(void)
Definition: utils.c:5147
image could not be captured
Definition: main.h:437
void resize(double scale)
Definition: main.c:7527
void set_ce_frame_from_pixbuf(LiVESImage *image, LiVESPixbuf *pixbuf, lives_painter_t *)
Definition: main.c:3851
boolean do_abort_check(void)
Definition: dialogs.c:3197
boolean opening_only_audio
Definition: main.h:573
char * subst(const char *string, const char *from, const char *to)
Definition: utils.c:5009
yuv4mpeg stream
Definition: main.h:471
Definition: main.h:825
int lives_rmdir(const char *dir, boolean force)
Definition: utils.c:3829
render_details * rdet
Definition: events.h:196
void lives_list_free_strings(LiVESList *)
Definition: utils.c:4436
void switch_aud_to_mplayer2(boolean set_pref)
Definition: utils.c:3439
boolean check_for_disk_space(void)
Definition: saveplay.c:4885
mainwindow * mainw
Definition: main.c:86
record audio to selection
Definition: main.h:404
void load_frame_image(int frame)
Definition: main.c:5413
type for LiVES to LiVES streaming
Definition: main.h:474
int progress_end
Definition: main.h:559
ulong menuentry_func
Definition: main.h:562
boolean get_srt_text(lives_clip_t *sfile, double xtime)
Definition: pangotext.c:412
int * frame_index
Definition: main.h:648
void do_audrate_error_dialog(void)
Definition: dialogs.c:2633
char * rcfile
Definition: main.h:739
int do_abort_cancel_retry_dialog(const char *text, LiVESWindow *transient) WARN_UNUSED
Definition: dialogs.c:461
double stored_layout_fps
Definition: main.h:674
int64_t reltime
Definition: main.h:335
boolean save_sub_subtitles(lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename)
Definition: pangotext.c:835
void lives_list_free_all(LiVESList **)
Definition: utils.c:4458
LiVESPixbuf * mt_framedraw(lives_mt *, LiVESPixbuf *)
Definition: paramspecial.c:486
Definition: main.h:412
void subtitles_free(lives_clip_t *sfile)
Definition: pangotext.c:697
boolean add_lmap_error(lives_lmap_error_t lerror, const char *name, livespointer user_data, int clipno, int frameno, double atime, boolean affects_current)
Definition: utils.c:1861
void do_layout_ascrap_file_error(void)
Definition: dialogs.c:2133
boolean can_write_to_workdir
Definition: main.h:702
lives_lmap_error_t
Definition: multitrack.h:985
boolean has_smogrify
Definition: main.h:697
void do_dev_busy_error(const char *devstr)
Definition: dialogs.c:3217
LiVESWidget * processing
Definition: main.h:340
normal - kill background processes working on current clip
Definition: main.h:465
char * get_extension(const char *filename)
Definition: utils.c:2404
void set_menu_text(LiVESWidget *menu, const char *text, boolean use_mnemonic)
Definition: utils.c:3732
int lives_open3(const char *pathname, int flags, mode_t mode)
Definition: utils.c:141
int lives_creat_buffered(const char *pathname, int mode)
Definition: utils.c:565
boolean needs_update
loaded values were incorrect, update header
Definition: main.h:692
void set_preview_box_colours(void)
Definition: gui.c:3273
char * repl_workdir(const char *entry, boolean fwd)
Definition: utils.c:2502
void do_no_autolives_error(void)
Definition: dialogs.c:3343
boolean play_paused
Definition: main.h:568
void set_colours(LiVESWidgetColor *colf, LiVESWidgetColor *colb, LiVESWidgetColor *colf2, LiVESWidgetColor *colb2, LiVESWidgetColor *coli, LiVESWidgetColor *colt)
Definition: gui.c:186
boolean has_midistartstop
Definition: main.h:717
int fx_frame_pump
rfx frame pump for virtual clips (CLIP_TYPE_FILE)
Definition: main.h:652
double get_ratio_fps(const char *string)
Definition: utils.c:4935
Definition: main.h:843
Definition: main.h:833
void toggle_record(void)
Definition: gui.c:3529
void get_monitors(void)
Definition: main.c:229
boolean do_warning_dialog(const char *text)
Definition: dialogs.c:357
boolean after_foreign_play(void)
Definition: utils.c:3629
Definition: main.h:695
boolean startup_message_info(const char *msg)
Definition: main.c:3427
mainw->
Definition: mainwindow.h:393
uint16_t green
Definition: main.h:313
int frameno
Definition: main.h:596
double undo1_dbl
Definition: main.h:628
boolean do_yuv4m_open_warning(void)
Definition: dialogs.c:2344
void * ext_src
points to opaque source for non-disk types
Definition: main.h:642
boolean process_one(boolean visible)
Definition: dialogs.c:997
uint16_t green
Definition: main.h:319
void do_jack_noopen_warn(void)
Definition: dialogs.c:2516
boolean prompt_remove_layout_files(void)
Definition: dialogs.c:2465
xprocess * proc_ptr
the processing window
Definition: main.h:541
void free_track_decoders(void)
Definition: main.c:5383
LiVESWidget * label2
Definition: main.h:343
boolean check_frame_count(int idx)
Definition: utils.c:2246
boolean undo2_boolean
Definition: main.h:631
boolean write_headers(lives_clip_t *file)
Definition: saveplay.c:3889
void do_rendered_fx_dialog(void)
Definition: dialogs.c:2427
void do_audio_import_error(void)
Definition: dialogs.c:2438
void do_cd_error_dialog(void)
Definition: dialogs.c:3363
user pressed 'Keep'
Definition: main.h:449
double calc_time_from_frame(int clip, int frame)
Definition: utils.c:1411
ssize_t sizshrt
Definition: main.c:85
void get_menu_text_long(LiVESWidget *menuitem, char *text)
Definition: utils.c:3749
event_list completed
Definition: main.h:440
void do_jack_noopen_warn4(void)
Definition: dialogs.c:2528
uint64_t make_version_hash(const char *ver)
Definition: utils.c:2475
void get_dirname(char *filename)
Definition: utils.c:2358
Definition: main.h:384
void lives_close_all_file_buffers(void)
Definition: utils.c:459
int vsize
Definition: main.h:514
void splash_init(void)
Definition: gui.c:4180
char * get_new_install_msg(void)
Definition: dialogs.c:3335
void do_invalid_subs_error(void)
Definition: dialogs.c:3231
boolean has_composite
Definition: main.h:713
ssize_t lives_read(int fd, void *buf, size_t count, boolean allow_less)
Definition: utils.c:486
double freeze_fps
Definition: main.h:567
void do_need_mplayer_dialog(void)
Definition: dialogs.c:2096
boolean do_layout_alter_audio_warning(void)
Definition: dialogs.c:2486
livespointer lives_calloc(size_t n_blocks, size_t n_block_bytes)
Definition: effects-weed.c:137
char * get_dir(const char *filename)
Definition: utils.c:2375
int header_version
Definition: main.h:534
struct timeval tv
Definition: main.h:816
off_t lives_lseek_buffered_rdonly(int fd, off_t offset)
Definition: utils.c:631
int calc_frame_from_time3(int filenum, double time)
nearest frame mid
Definition: utils.c:1435
double raudio_time
Definition: main.h:588
resample/reorder/resize/apply effects
Definition: main.h:399
void close_ascrap_file(void)
Definition: saveplay.c:5100
void do_no_mplayer_sox_error(void)
Definition: dialogs.c:2090
void do_bad_layout_error(void)
Definition: dialogs.c:2610
Definition: main.h:839
LiVESWidget * create_question_dialog(const char *title, const char *text, LiVESWindow *parent)
Definition: dialogs.c:350
lives_interlace_t
Definition: main.h:493
weed_plant_t * event_list_back
Definition: main.h:606
void set_signal_handlers(SignalHandlerPointer sigfunc)
Definition: main.c:2943
Definition: main.h:380
char * insert_newlines(const char *text, int maxwidth)
Definition: utils.c:5028
void do_card_in_use_error(void)
Definition: dialogs.c:3212
boolean has_icedax
Definition: main.h:716
void splash_msg(const char *msg, double pct)
Definition: gui.c:4260
boolean do_erase_subs_warning(void)
Definition: dialogs.c:3257
void do_mt_undo_mem_error(void)
Definition: dialogs.c:2562
lives_undo_t
need this for event_list_t *
Definition: main.h:378
lives_painter_surface_t * laudio_drawable
Definition: main.h:687
corresponds to one clip in the GUI
Definition: main.h:509
weed_plant_t * event_list
Definition: main.h:605
boolean has_encoder_plugins
Definition: main.h:745
Definition: main.h:388
void do_lb_composite_error(void)
Definition: dialogs.c:2615
int calc_new_playback_position(int fileno, uint64_t otc, uint64_t *ntc)
Definition: utils.c:1515
int lives_cp_keep_perms(const char *from, const char *to)
Definition: utils.c:3900
boolean check_backend_return(lives_clip_t *sfile)
Definition: dialogs.c:685
int64_t lives_get_current_ticks(void)
Definition: utils.c:1257
#define GNU_CONST
Definition: main.h:300
char * clip_detail_to_string(lives_clip_details_t what, size_t *maxlenp)
Definition: utils.c:4519
int stored_layout_frame
layout map for the current layout
Definition: main.h:671
boolean check_dev_busy(char *devstr)
Definition: utils.c:4073
void open_set_file(const char *set_name, int clipnum)
Definition: saveplay.c:4333
int save_to_scrap_file(weed_plant_t *layer)
Definition: saveplay.c:4910
boolean startup_message_choice(const char *msg, int msgtype)
Definition: main.c:3412
boolean do_theme_exists_warn(const char *themename)
Definition: dialogs.c:3375
void lives_slist_free_all(LiVESSList **)
Definition: utils.c:4450
cancel but keep opening
Definition: main.h:425
char * ds_critical_msg(const char *dir, uint64_t dsval)
Definition: dialogs.c:574
LiVESPixbuf * lives_pixbuf_new_blank(int width, int height, int palette)
Definition: colourspace.c:9803
void add_to_recent(const char *filename, double start, int frames, const char *file_open_params)
Definition: utils.c:4230
ran out of preview frames
Definition: main.h:434
void lives_kill_subprocesses(const char *dirname, boolean kill_parent)
Definition: utils.c:3981
uint16_t blue
Definition: main.h:320
void unfade_background(void)
Definition: gui.c:3059
int do_blocking_info_dialog(const char *text)
Definition: dialogs.c:525
lives_cancel_t check_for_bad_ffmpeg(void)
Definition: utils.c:5312
boolean has_xdg_screensaver
Definition: main.h:723
boolean check_dir_access(const char *dir)
Definition: utils.c:4040
int do_info_dialog_with_transient(const char *text, boolean is_blocking, LiVESWindow *transient)
Definition: dialogs.c:554
void do_rmem_max_error(int size)
Definition: dialogs.c:2681
int old_frames
for deordering, etc.
Definition: main.h:548
#define ulong
Definition: main.h:154
Definition: main.h:413
boolean do_std_checks(const char *type_name, const char *type, size_t maxlen, const char *nreject)
Definition: utils.c:2127
Definition: main.h:838
ssize_t lives_readlink(const char *path, char *buf, size_t bufsiz)
Definition: utils.c:240
void disable_record(void)
Definition: gui.c:3534
Definition: main.h:823
cancelled because of error
Definition: main.h:455
double video_time
Definition: main.h:586
Definition: main.h:338
pid_t lives_getpid(void)
Definition: utils.c:110
int lives_chdir(const char *path, boolean allow_fail)
Definition: utils.c:824
void wait_for_bg_audio_sync(lives_clip_t *sfile)
Definition: utils.c:4149
boolean no_proc_read_errors
skip read error dialogs in processing
Definition: main.h:682
Definition: main.h:354
void get_menu_text(LiVESWidget *menu, char *text)
Definition: utils.c:3744
Definition: pangotext.h:39
void add_warn_check(LiVESBox *box, int warn_mask_number)
Definition: dialogs.c:109
int hsize
in pixels (NOT macropixels !)
Definition: main.h:513
Definition: main.h:406
boolean has_gdb
Definition: main.h:721
void get_location(const char *exe, char *val, int maxlen)
Definition: utils.c:2442
void switch_to_mplayer(void)
void get_frame_count(int idx)
Definition: utils.c:2288
effect processing finished during preview
Definition: main.h:428
void calc_maxspect(int rwidth, int rheight, int *cwidth, int *cheight)
Definition: utils.c:1728
lives_image_type_t img_type
Definition: main.h:668
lives_cancel_type_t
Definition: main.h:464
void make_custom_submenus(void)
Definition: gui.c:144
void do_need_mplayer_mpv_dialog(void)
Definition: dialogs.c:2102
boolean int_array_contains_value(int *array, int num_elems, int value)
Definition: utils.c:3754
boolean ensure_isdir(char *fname)
Definition: utils.c:2422
int do_header_read_error_with_retry(int clip) WARN_UNUSED
Definition: dialogs.c:3102
uint32_t get_signed_endian(boolean is_signed, boolean little_endian)
Definition: utils.c:4964
int myround(double n)
Definition: utils.c:1219
boolean lives_alarm_get(int alarm_handle)
Definition: utils.c:1312
boolean smog_version_correct
Definition: main.h:698
Definition: main.h:824
void resize_widgets_for_monitor(boolean get_play_times)
Definition: gui.c:3569
LiVESList * lives_list_delete_string(LiVESList *, char *string) WARN_UNUSED
Definition: utils.c:5250
boolean has_mplayer2
Definition: main.h:710
void do_pulse_lost_conn_error(void)
Definition: dialogs.c:3358
void switch_audio_clip(int new_file, boolean activate)
Definition: main.c:7193
capability * capable
some shared structures
Definition: main.c:83
LiVESWidget * progressbar
Definition: main.h:341
boolean cache_file_contents(const char *filename)
Definition: utils.c:4466
boolean read_file_details(const char *file_name, boolean only_check_for_audio)
Definition: saveplay.c:146
int end
Definition: main.h:555
int lives_getgid(void)
Definition: utils.c:230
uint64_t unique_id
this and the handle can be used to uniquely id a file
Definition: main.h:519
video playback completed
Definition: main.h:443
void do_upgrade_error_dialog(void)
Definition: dialogs.c:2417
boolean do_yesno_dialog(const char *text)
Definition: dialogs.c:444
void activate_url_inner(const char *link)
Definition: utils.c:4097
void d_print_done(void)
Definition: dialogs.c:2884
void load_start_image(int frame)
Definition: main.c:3892
void do_mt_no_jack_error(int warn_mask)
Definition: dialogs.c:2598
boolean pull_frame(weed_plant_t *layer, const char *image_ext, weed_timecode_t tc)
Definition: main.c:5087
void too_many_files(void)
Definition: dialogs.c:2071
boolean do_header_write_error(int clip)
Definition: dialogs.c:3116
void save_file(int clip, int start, int end, const char *filename)
Definition: saveplay.c:1184
void do_do_not_close_d(void)
Definition: dialogs.c:3297
void do_chdir_failed_error(const char *dir)
Definition: dialogs.c:3160
void do_layout_scrap_file_error(void)
Definition: dialogs.c:2128
void add_to_ascrap_mb(uint64_t bytes)
Definition: saveplay.c:4652
int lives_cp(const char *from, const char *to)
Definition: utils.c:3892
boolean do_set_rename_old_layouts_warning(const char *new_set)
Definition: dialogs.c:2554
lives_clip_type_t
Definition: main.h:469
void fade_background(void)
Definition: gui.c:2940
void play_file(void)
Definition: saveplay.c:2047
void do_after_crash_warning(void)
Definition: dialogs.c:2669
void show_lives(void)
Definition: gui.c:2765
int lives_rmglob(const char *files)
Definition: utils.c:3877
uint16_t red
Definition: main.h:312
boolean do_sub_type_warning(const char *ext, const char *type_ext)
Definition: dialogs.c:3262
void rewrite_recovery_file(void)
Definition: saveplay.c:5706
void do_encoder_acodec_error(void)
Definition: dialogs.c:2122
boolean is_writeable_dir(const char *dir)
Definition: utils.c:5160
void do_vpp_palette_error(void)
Definition: dialogs.c:2653
void backup_file(int clip, int start, int end, const char *filename)
Definition: saveplay.c:3747
boolean has_gconftool_2
Definition: main.h:722
boolean prepare_to_play_foreign(void)
Definition: utils.c:3490
char * get_menu_name(lives_clip_t *sfile)
Definition: gui.c:4086
boolean do_set_duplicate_warning(const char *new_set)
Definition: dialogs.c:2471
double vel
Definition: main.h:357
boolean is_loaded
should we continue loading if we come back to this clip
Definition: main.h:576
LiVESList * lives_list_append_unique(LiVESList *xlist, const char *add)
Definition: utils.c:1388
boolean save_clip_values(int which_file)
Definition: saveplay.c:37
int64_t f_size
Definition: main.h:546
int undo_asampsize
Definition: main.h:637
int lives_chmod(const char *target, const char *mode)
Definition: utils.c:3940
void break_me(void)
Definition: main.c:132
boolean lives_fsync(int fd)
Definition: utils.c:252
void do_quick_switch(int new_file)
Definition: main.c:7391
void get_frames_sizes(int fileno, int frame_to_test)
Definition: utils.c:2336
void do_set_noclips_error(const char *setname)
Definition: dialogs.c:3311
Definition: main.h:389
ulong deduce_file(const char *filename, double start_time, int end)
Definition: saveplay.c:212
Definition: main.h:311
int ncpus
Definition: main.h:759
void response_ok(LiVESButton *button, livespointer user_data)
Definition: dialogs.c:2869
uint64_t op_ds_warn_level
current disk space warning level for any output directory
Definition: main.h:679
void do_memory_error_dialog(void)
Definition: dialogs.c:617
special cancel for TV toy
Definition: main.h:461
void procw_desensitize(void)
Definition: main.c:3779
void do_system_failed_error(const char *com, int retval, const char *addinfo)
Definition: dialogs.c:2893
uint64_t lives_10pow(int pow) GNU_CONST
Definition: utils.c:1229
boolean startup_message_nonfatal_dismissable(const char *msg, int warning_mask)
Definition: main.c:3435
void remove_layout_files(LiVESList *lmap)
Definition: utils.c:2526
int lives_close_buffered(int fd)
Definition: utils.c:570
int lives_open2(const char *pathname, int flags)
Definition: utils.c:150
void set_interactive(boolean interactive)
Definition: gui.c:2825
Definition: main.h:392
boolean changed
Definition: main.h:560
uint16_t blue
Definition: main.h:314
int insert_end
Definition: main.h:557
boolean has_sox_sox
Definition: main.h:707
int lives_alarm_set(int64_t ticks)
Definition: utils.c:1273
int get_approx_ln(uint32_t val) GNU_CONST
Definition: utils.c:1243
boolean can_write_to_home
Definition: main.h:701
lives_cancel_t
cancel reason
Definition: main.h:417
boolean do_mt_rect_prompt(void)
Definition: dialogs.c:2604
boolean open_ascrap_file(void)
Definition: saveplay.c:4699
int achans
Definition: main.h:520
Definition: main.h:411
weed_plant_t * next_event
Definition: main.h:607
boolean is_ready
Definition: main.h:351
float LEFloat_to_BEFloat(float f) GNU_CONST
Definition: utils.c:1395
Definition: main.h:387
char * lives_datetime(struct timeval *tv)
Definition: utils.c:1364
boolean check_for_ratio_fps(double fps)
Definition: utils.c:4917
void do_dvgrab_error(void)
Definition: dialogs.c:2642
boolean do_progress_dialog(boolean visible, boolean cancellable, const char *text)
Definition: dialogs.c:1424
void block_expose(void)
Definition: gui.c:3245
boolean get_new_handle(int index, const char *name)
Definition: saveplay.c:3355
LiVESWidget * preview_button
Definition: main.h:347
boolean has_sox_play
Definition: main.h:706
void get_filename(char *filename, boolean strip_dir)
Definition: utils.c:2393
Definition: main.h:828
Definition: main.h:393
LiVESWidget * pause_button
Definition: main.h:346
char * make_image_file_name(lives_clip_t *clip, int frame, const char *img_ext)
Definition: utils.c:2241
cancelled and paused
Definition: main.h:458
void do_jack_noopen_warn2(void)
Definition: dialogs.c:2540
boolean orig_file_name
Definition: main.h:563
boolean save_srt_subtitles(lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename)
Definition: pangotext.c:768
void calc_aframeno(int fileno)
Definition: utils.c:1494
lives_storage_status_t
disk/storage status values
Definition: mainwindow.h:216
void do_start_messages(void)
Definition: main.c:1820
boolean has_identify
Definition: main.h:714
Definition: main.h:480
void do_locked_in_vdevs_error(void)
Definition: dialogs.c:3292
Definition: main.h:481
void sensitize(void)
Definition: main.c:3479
LiVESWidget * label
Definition: main.h:342
boolean has_autolives
Definition: main.h:708
void catch_sigint(int signum)
Definition: main.c:183
Definition: main.h:391
Definition: main.h:841
lives_image_type_t lives_image_type_to_image_type(const char *lives_img_type)
Definition: utils.c:2234
void do_aud_during_play_error(void)
Definition: dialogs.c:612
boolean check_for_recovery_files(boolean auto_recover)
Definition: saveplay.c:5759
boolean get_clip_value(int which, lives_clip_details_t, void *retval, size_t maxlen)
Definition: utils.c:4613
int calc_frame_from_time(int filenum, double time)
nearest frame start
Definition: utils.c:1416
void do_no_in_vdevs_error(void)
Definition: dialogs.c:3287
char * get_upd_msg(int type)
Definition: dialogs.c:3319
int undo_end
Definition: main.h:616
void lives_srandom(unsigned int seed)
Definition: utils.c:92
void create_cfile(void)
Definition: saveplay.c:3255
int byte_order
Definition: main.h:761
void init_track_decoders(void)
Definition: main.c:5372
int undo4_int
Definition: main.h:626
double pointer_time
Definition: main.h:589
void do_mt_no_audchan_error(void)
Definition: dialogs.c:2594
const char * get_image_ext_for_type(lives_image_type_t imgtype)
Definition: utils.c:2215
double fps
Definition: main.h:512
char * lives_format_storage_space_string(uint64_t space)
Definition: utils.c:783
int cb_src
source clip for clipboard
Definition: main.h:690
void do_nojack_rec_error(void)
Definition: dialogs.c:2647
void get_total_time(lives_clip_t *file)
Definition: utils.c:3114
ulong open_file(const char *filename)
Definition: saveplay.c:235
void lives_suspend_resume_process(const char *dirname, boolean suspend)
Definition: utils.c:4009
char * myname_full
Definition: main.h:752
boolean ratio_fps
if the fps was set by a ratio
Definition: main.h:658
application quit
Definition: main.h:431
boolean has_convert
Definition: main.h:712
generator was stopped
Definition: main.h:446
double lives_fix(double val, int decimals) GNU_CONST
Definition: utils.c:1237
void create_LiVES(void)
Definition: gui.c:340
resample/resize and resample audio for encoding
Definition: main.h:396
int undo_start
Definition: main.h:615
int do_info_dialog(const char *text)
Definition: dialogs.c:504
boolean do_encoder_restrict_dialog(int width, int height, double fps, int fps_num, int fps_denom, int arate, int asigned, boolean swap_endian, boolean anr, boolean save_all)
Definition: dialogs.c:2231
Definition: main.h:401
boolean open_scrap_file(void)
Definition: saveplay.c:4657
Definition: main.h:830
boolean check_for_lock_file(const char *set_name, int type)
Definition: utils.c:2068
Definition: main.h:381
int undo3_int
Definition: main.h:625
boolean subtitles_init(lives_clip_t *sfile, char *fname, lives_subtitle_type_t)
Definition: pangotext.c:718
void switch_aud_to_mplayer(boolean set_pref)
Definition: utils.c:3388
short cpu_bits
Definition: main.h:750
uint64_t get_version_hash(const char *exe, const char *sep, int piece)
Definition: utils.c:2456
char * ds_warning_msg(const char *dir, uint64_t dsval, uint64_t cwarn, uint64_t nwarn)
Definition: dialogs.c:592
void do_decoder_palette_error(void)
Definition: dialogs.c:2658
void threaded_dialog_spin(double fraction)
Definition: dialogs.c:2774
int calc_frame_from_time2(int filenum, double time)
nearest frame end
Definition: utils.c:1425
livespointer _lives_realloc(livespointer ptr, size_t new_size)
Definition: effects-weed.c:90
boolean save_file_comments(int fileno)
Definition: saveplay.c:3587
double pb_fps
Definition: main.h:566
ssize_t lives_write(int fd, livesconstpointer buf, size_t count, boolean allow_fail)
#define WARN_UNUSED
Definition: main.h:298
Definition: main.h:829
boolean do_comments_dialog(int fileno, char *filename)
Definition: dialogs.c:2360
char * dummychar
Definition: main.h:1363
void fullscreen_internal(void)
Definition: gui.c:3190
#define CLIP_NAME_MAXLEN
Definition: main.h:506
char * myname
Definition: main.h:753
boolean has_python
Definition: main.h:747
Definition: main.h:822
Definition: main.h:842
lives_subtitle_type_t
Definition: pangotext.h:13
LiVESList * lives_list_copy_strings(LiVESList *list)
Definition: utils.c:5266
#define FALSE
Definition: videoplugin.h:56
boolean do_warning_dialog_with_check(const char *text, int warn_mask_number)
Definition: dialogs.c:362
void load_end_image(int frame)
Definition: main.c:4067
Definition: main.h:382
void lives_sync(void)
Definition: utils.c:262
ssize_t lives_read_le_buffered(int fd, void *buf, size_t count, boolean allow_less)
Definition: utils.c:708
boolean do_original_lost_warning(const char *fname)
Definition: dialogs.c:2491
int do_blocking_error_dialog(const char *text)
Definition: dialogs.c:518
int lives_list_strcmp_index(LiVESList *list, livesconstpointer data)
Definition: utils.c:4215
boolean has_jackd
Definition: main.h:718
boolean add_file_info(const char *check_handle, boolean aud_only)
Definition: saveplay.c:3386
double laudio_time
Definition: main.h:587
boolean string_lists_differ(LiVESList *, LiVESList *)
Definition: utils.c:5280
boolean undoable
Definition: main.h:619
Definition: main.h:494
void do_lb_convert_error(void)
Definition: dialogs.c:2621
double old_laudio_time
Definition: main.h:592
Definition: main.h:827
int do_error_dialog_with_check(const char *text, int warn_mask_number)
Definition: dialogs.c:511
void d_print_cancelled(void)
Definition: dialogs.c:2874
void zero_spinbuttons(void)
Definition: utils.c:3226
user pressed stop
Definition: main.h:422
int arps
audio sample rate
Definition: main.h:515
boolean opening_loc
Definition: main.h:574
boolean switch_aud_to_jack(void)
Definition: utils.c:3238