LiVES  2.8.3
main.h
Go to the documentation of this file.
1 // main.h
2 // LiVES
3 // (c) G. Finch (salsaman@gmail.com) 2003 - 2016
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 IS_MINGW
86 
87 #ifndef WINVER
88 #define WINVER 0x0500
89 #endif
90 
91 #include <windows.h>
92 #include <winbase.h>
93 #include <tlhelp32.h>
94 #include <sddl.h>
95 
96 #define O_SYNC (FILE_FLAG_NO_BUFFERING|FILE_FLAG_WRITE_THROUGH)
97 
98 typedef PROCESS_INFORMATION *lives_pid_t;
99 typedef PROCESS_INFORMATION *lives_pgid_t;
100 
101 #ifdef GUI_GTK
102 #ifndef GDK_WINDOWING_WIN32
103 #define GDK_WINDOWING_WIN32
104 #endif
105 #endif
106 
107 
108 #else // IS_MINGW
109 
110 #ifdef GUI_GTK
111 #ifndef GDK_WINDOWING_X11
112 #define GDK_WINDOWING_X11
113 #endif
114 #else
115 #include <sys/types.h>
116 #include <unistd.h>
117 #endif // GUI_GTK
118 
119 typedef pid_t lives_pid_t;
120 typedef int lives_pgid_t;
121 
122 
123 #endif // IS_MINGW
124 
125 
126 
127 
128 
129 #include <sys/stat.h>
130 #include <stdlib.h>
131 #include <stdio.h>
132 #include <unistd.h>
133 #include <string.h>
134 #include <signal.h>
135 #include <assert.h>
136 #include <errno.h>
137 
138 #ifdef __cplusplus
139 #define __STDC_CONSTANT_MACROS
140 #ifdef _STDINT_H
141 #undef _STDINT_H
142 #endif
143 #endif
144 
145 #include <stdint.h>
146 #include <stdarg.h>
147 
148 
149 #ifndef ulong
150 #define ulong unsigned long
151 #endif
152 
153 
154 #define QUOTEME(x) #x
155 
156 
158 #define MAX_FILES 65535
159 
162 #ifndef PREFIX_DEFAULT
163 #ifndef IS_MINGW
164 #define PREFIX_DEFAULT "/usr"
165 #else
166 // TODO - get this from the installer
167 #define PREFIX_DEFAULT "C:\\Program Files\\LiVES"
168 #endif
169 #endif
170 
172 #ifndef PREFIX
173 #define PREFIX PREFIX_DEFAULT
174 #endif
175 
176 
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 - 2016"
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 
325 #include "widget-helper.h"
326 
327 typedef void *(*fn_ptr)(void *ptr);
328 
329 #define ALLOW_MPV
330 #define ALLOW_PNG24
331 
334 typedef struct {
335  int value;
336  int64_t reltime;
337 } event;
338 
339 typedef struct {
340  // processing / busy dialog
341  LiVESWidget *processing;
342  LiVESWidget *progressbar;
343  LiVESWidget *label;
344  LiVESWidget *label2;
345  LiVESWidget *label3;
346  LiVESWidget *stop_button;
347  LiVESWidget *pause_button;
348  LiVESWidget *preview_button;
349  LiVESWidget *cancel_button;
350  LiVESWidget *scrolledwindow;
351  uint32_t frames_done;
352  boolean is_ready;
353 } xprocess;
354 
355 
356 
357 
358 typedef struct {
359  int afile;
360  double seek;
361  double vel;
363 
364 
365 #if HAVE_SYSTEM_WEED
366 #include <weed/weed.h>
367 #include <weed/weed-events.h>
368 #else
369 #include "../libweed/weed.h"
370 #include "../libweed/weed-events.h"
371 #endif
372 
373 // see weed event spec. for more info
374 
376 #include "events.h"
377 
378 #ifdef IS_LIBLIVES
379 #include "liblives.hpp"
380 #include "lbindings.h"
381 #endif
382 
383 typedef enum {
399 
402 
405 
407 
410 
412 } lives_undo_t;
413 
414 
416 typedef enum {
421 
422 
424 typedef enum {
427 
430 
433 
436 
439 
442 
445 
448 
451 
454 
457 
460 
463 
466 
469 
471 
472 
473 typedef enum {
477 
478 
479 
480 
481 typedef enum {
489 
490 
491 typedef enum {
496 
497 #define IMG_TYPE_BEST IMG_TYPE_PNG
498 
499 
500 #define AFORM_SIGNED 0
501 #define AFORM_LITTLE_ENDIAN 0
502 
503 #define AFORM_UNSIGNED 1
504 #define AFORM_BIG_ENDIAN (1<<1)
505 #define AFORM_UNKNOWN 65536
506 
507 
508 typedef enum {
513 
514 
515 #include "pangotext.h"
516 
517 #define WEED_LEAF_HOST_DEINTERLACE "host_deinterlace" // frame needs deinterlacing
518 #define WEED_LEAF_HOST_TC "host_tc" // timecode for deinterlace
519 #define WEED_LEAF_HOST_DECODER "host_decoder" // pointer to decoder for a layer
520 #define WEED_LEAF_HOST_PTHREAD "host_pthread" // thread for a layer
521 
523 typedef struct {
524  // basic info (saved during backup)
525  int bpp;
526  double fps;
527  int hsize;
528  int vsize;
529  int arps;
530  uint32_t signed_endian;
531 
532  int arate;
533  uint64_t unique_id;
534  int achans;
536 
538  int frames;
539  char title[256];
540  char author[256];
541  char comment[256];
542  char keywords[256];
544 
546 
547  // extended info (not saved)
549 
550 #define LIVES_CLIP_HEADER_VERSION 100
551 
553 
556 
557  char handle[256];
558  int ohsize;
559  int ovsize;
560  int64_t f_size;
561  int64_t afilesize;
563  char file_name[PATH_MAX];
564  char info_file[PATH_MAX];
565  char name[256];
566  char save_file_name[PATH_MAX];
567  char type[64];
568  int start;
569  int end;
574  boolean changed;
575  LiVESWidget *menuentry;
577  boolean orig_file_name;
578  boolean was_renamed;
579  boolean is_untitled;
580  double pb_fps;
581  double freeze_fps;
582  boolean play_paused;
583 
584  //opening/restoring status
585  boolean opening;
586  boolean opening_audio;
588  boolean opening_loc;
589  boolean restoring;
590  boolean is_loaded;
591 
593  boolean nopreview;
594 
596  boolean nokeep;
597 
598  // various times; total time is calculated as the longest of video, laudio and raudio
599  double total_time;
600  double video_time;
601  double laudio_time;
602  double raudio_time;
603  double pointer_time;
604 
605  // current and last played index frames for internal player
606  int frameno;
608 
609 
610 
612  // see resample.c for new events system
613 
614 
615  // events
616  event *events[1];
617 
618  weed_plant_t *event_list;
619  weed_plant_t *event_list_back;
620  weed_plant_t *next_event;
621 
622  LiVESList *layout_map;
624 
627 
629  int undo_end;
630  char undo_text[32];
631  char redo_text[32];
632  boolean undoable;
633  boolean redoable;
634 
635  // used for storing undo values
640  uint32_t undo1_uint;
641  double undo1_dbl;
642  double undo2_dbl;
643  boolean undo1_boolean;
644  boolean undo2_boolean;
645  boolean undo3_boolean;
646 
651  int undo_arps;
652 
654 
655  void *ext_src;
656 
662 
664 
666 
667 #define FX_FRAME_PUMP_VAL 200
668 
669 #define IMG_BUFF_SIZE 4096
670 
671  boolean ratio_fps;
672 
673  int64_t aseek_pos;
674 
675  // decoder data
676 
677  char mime_type[256];
678 
679 
680  boolean deinterlace;
681 
683 
689 
691 
692  char *op_dir;
693  uint64_t op_ds_warn_level;
694 
698 
700 
701  lives_painter_surface_t *laudio_drawable;
702  lives_painter_surface_t *raudio_drawable;
703 
704  int cb_src;
705 
706  boolean needs_update;
707 } lives_clip_t;
708 
709 
710 
711 typedef struct {
712  // the following can be assumed TRUE, they are checked on startup
713  boolean has_smogrify;
719 
720  // the following may need checking before use
721  boolean has_dvgrab;
722  boolean has_sox_play;
723  boolean has_sox_sox;
724  boolean has_autolives;
725  boolean has_mplayer;
726  boolean has_mplayer2;
727  boolean has_mpv;
728  boolean has_convert;
729  boolean has_composite;
730  boolean has_identify;
731  boolean has_cdda2wav;
732  boolean has_icedax;
734  boolean has_jackd;
736  boolean has_xwininfo;
737  boolean has_gdb;
740 
742  char home_dir[PATH_MAX];
743 
744  char touch_cmd[PATH_MAX];
745  char rm_cmd[PATH_MAX];
746  char mv_cmd[PATH_MAX];
747  char cp_cmd[PATH_MAX];
748  char ln_cmd[PATH_MAX];
749  char chmod_cmd[PATH_MAX];
750  char cat_cmd[PATH_MAX];
751  char echo_cmd[PATH_MAX];
752  char eject_cmd[PATH_MAX];
753  char rmdir_cmd[PATH_MAX];
754 
755  char *rcfile;
756 
758  char startup_msg[256];
759 
760  // plugins
762 
763  boolean has_python;
764  uint64_t python_version;
765 
766  short cpu_bits;
767 
768 
769  char *myname_full;
770  char *myname;
771 
772  boolean has_stderr;
773 
775 
776  int ncpus;
777 
779 
780  pid_t mainpid;
781 
782  mode_t umask;
783 
784 } capability;
785 
786 
788 extern capability *capable;
789 
790 #ifdef HAVE_JACK_JACK_H
791 #include "jack.h"
792 #endif
793 
794 #define __STDC_FORMAT_MACROS
795 #include <inttypes.h>
796 
797 #ifndef PRId64
798 
799 #ifndef __WORDSIZE
800 #if defined __x86_64__
801 # define __WORDSIZE 64
802 #ifndef __WORDSIZE_COMPAT32
803 # define __WORDSIZE_COMPAT32 1
804 #endif
805 #else
806 # define __WORDSIZE 32
807 #endif
808 #endif // __WORDSIZE
809 
810 #ifndef __PRI64_PREFIX
811 # if __WORDSIZE == 64
812 # define __PRI64_PREFIX "l"
813 # else
814 # define __PRI64_PREFIX "ll"
815 # endif
816 #endif
817 
818 # define PRId64 __PRI64_PREFIX "d"
819 # define PRIu64 __PRI64_PREFIX "u"
820 #endif // ifndef PRI64d
821 
822 
823 // common defs for mainwindow (retain this order)
824 #include "plugins.h"
825 #include "colourspace.h"
826 #include "paramspecial.h"
827 #include "multitrack.h"
828 #include "mainwindow.h"
829 #include "keyboard.h"
830 #include "preferences.h"
831 
832 extern mainwindow *mainw;
833 
834 
835 // internal player clock
836 #include <sys/time.h>
837 struct timeval tv;
838 
839 
841 extern ssize_t sizint, sizdbl, sizshrt;
842 
843 
844 
845 typedef enum {
870 
871 
872 // some useful functions
873 
874 
875 // dialogs.c
876 boolean do_progress_dialog(boolean visible, boolean cancellable, const char *text);
877 boolean do_warning_dialog(const char *text);
878 boolean do_warning_dialog_with_check(const char *text, int warn_mask_number);
879 boolean do_warning_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient);
880 boolean do_yesno_dialog(const char *text);
881 boolean do_yesno_dialog_with_check(const char *text, int warn_mask_number);
882 boolean do_yesno_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient);
883 boolean do_yesno_dialog_with_check(const char *text, int warn_mask_number);
884 boolean do_yesno_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient);
885 int do_abort_cancel_retry_dialog(const char *text, LiVESWindow *transient) WARN_UNUSED;
886 int do_error_dialog(const char *text);
887 int do_info_dialog(const char *text);
888 int do_error_dialog_with_check(const char *text, int warn_mask_number);
889 int do_blocking_error_dialog(const char *text);
890 int do_blocking_info_dialog(const char *text);
891 int do_error_dialog_with_check_transient(const char *text, boolean is_blocking, int warn_mask_number,
892  LiVESWindow *transient);
893 int do_info_dialog_with_transient(const char *text, boolean is_blocking, LiVESWindow *transient);
894 LiVESWidget *create_message_dialog(lives_dialog_t diat, const char *text, LiVESWindow *transient,
895  int warn_mask_number, boolean is_blocking);
896 
897 LiVESWidget *create_question_dialog(const char *title, const char *text, LiVESWindow *parent);
898 
899 void do_system_failed_error(const char *com, int retval, const char *addinfo);
900 int do_write_failed_error_s_with_retry(const char *fname, const char *errtext, LiVESWindow *transient) WARN_UNUSED;
901 void do_write_failed_error_s(const char *filename, const char *addinfo);
902 int do_read_failed_error_s_with_retry(const char *fname, const char *errtext, LiVESWindow *transient) WARN_UNUSED;
903 void do_read_failed_error_s(const char *filename, const char *addinfo);
904 boolean do_header_write_error(int clip);
905 int do_header_read_error_with_retry(int clip) WARN_UNUSED;
906 int do_header_missing_detail_error(int clip, lives_clip_details_t detail) WARN_UNUSED;
907 void do_chdir_failed_error(const char *dir);
908 void handle_backend_errors(void);
909 boolean check_backend_return(lives_clip_t *sfile);
910 
912 char *ds_critical_msg(const char *dir, uint64_t dsval);
913 char *ds_warning_msg(const char *dir, uint64_t dsval, uint64_t cwarn, uint64_t nwarn);
914 boolean check_storage_space(lives_clip_t *sfile, boolean is_processing);
915 
916 char *get_upd_msg(int type);
917 char *get_new_install_msg(void);
918 
919 boolean ask_permission_dialog(int what);
920 boolean do_abort_check(void);
921 void add_warn_check(LiVESBox *box, int warn_mask_number);
922 void do_memory_error_dialog(void);
923 void too_many_files(void);
924 void workdir_warning(void);
925 void do_audio_import_error(void);
926 void do_mt_backup_space_error(lives_mt *, int memreq_mb);
927 
928 boolean do_clipboard_fps_warning(void);
929 void perf_mem_warning(void);
930 void do_dvgrab_error(void);
931 boolean do_comments_dialog(int fileno, char *filename);
932 boolean do_auto_dialog(const char *text, int type);
933 void do_encoder_acodec_error(void);
934 void do_encoder_sox_error(void);
935 boolean rdet_suggest_values(int width, int height, double fps, int fps_num, int fps_denom, int arate,
936  int asigned, boolean swap_endian, boolean anr, boolean ignore_fps);
937 boolean do_encoder_restrict_dialog(int width, int height, double fps, int fps_num, int fps_denom,
938  int arate, int asigned, boolean swap_endian, boolean anr, boolean save_all);
939 void do_messages_window(void);
940 void do_firstever_dialog(void);
941 void do_upgrade_error_dialog(void);
942 void do_no_mplayer_sox_error(void);
943 void do_need_mplayer_dialog(void);
944 void do_need_mplayer_mpv_dialog(void);
945 void do_aud_during_play_error(void);
946 void do_rendered_fx_dialog(void);
947 void do_layout_scrap_file_error(void);
948 void do_layout_ascrap_file_error(void);
949 void do_lb_composite_error(void);
950 void do_lb_convert_error(void);
951 void do_ra_convert_error(void);
952 void do_set_load_lmap_error(void);
953 boolean do_set_duplicate_warning(const char *new_set);
954 boolean do_set_rename_old_layouts_warning(const char *new_set);
955 boolean do_layout_alter_frames_warning(void);
956 boolean do_layout_alter_audio_warning(void);
957 boolean do_yuv4m_open_warning(void);
958 void do_mt_undo_mem_error(void);
959 void do_mt_undo_buf_error(void);
960 void do_mt_set_mem_error(boolean has_mt, boolean trans);
961 void do_mt_audchan_error(int warn_mask);
962 void do_mt_no_audchan_error(void);
963 void do_mt_no_jack_error(int warn_mask);
964 boolean do_mt_rect_prompt(void);
965 void do_audrate_error_dialog(void);
966 boolean do_event_list_warning(void);
967 void do_nojack_rec_error(void);
968 void do_vpp_palette_error(void);
969 void do_vpp_fps_error(void);
970 void do_decoder_palette_error(void);
971 void do_rmem_max_error(int size);
972 boolean do_original_lost_warning(const char *fname);
973 void do_no_decoder_error(const char *fname);
974 void do_jack_noopen_warn(void);
975 void do_jack_noopen_warn2(void);
976 void do_jack_noopen_warn3(void);
977 void do_jack_noopen_warn4(void);
978 void do_file_perm_error(const char *file_name);
979 void do_dir_perm_error(const char *dir_name);
980 void do_dir_perm_access_error(const char *dir_name);
982 void do_after_crash_warning(void);
983 void do_bad_layout_error(void);
984 void do_card_in_use_error(void);
985 void do_dev_busy_error(const char *devstr);
986 boolean do_existing_subs_warning(void);
987 void do_invalid_subs_error(void);
988 boolean do_erase_subs_warning(void);
989 boolean do_sub_type_warning(const char *ext, const char *type_ext);
990 boolean do_move_workdir_dialog(void);
991 void do_set_locked_warning(const char *setname);
992 void do_no_in_vdevs_error(void);
993 void do_locked_in_vdevs_error(void);
994 void do_do_not_close_d(void);
995 void do_set_noclips_error(const char *setname);
996 void do_no_autolives_error(void);
998 void do_pulse_lost_conn_error(void);
999 void do_jack_lost_conn_error(void);
1000 void do_cd_error_dialog(void);
1001 void do_bad_theme_error(const char *themefile);
1002 void do_bad_theme_import_error(const char *theme_file);
1003 boolean do_theme_exists_warn(const char *themename);
1004 
1005 boolean process_one(boolean visible);
1006 void do_threaded_dialog(char *translated_text, boolean has_cancel);
1007 void end_threaded_dialog(void);
1008 void threaded_dialog_spin(double fraction);
1009 void response_ok(LiVESButton *button, livespointer user_data);
1010 void pump_io_chan(LiVESIOChannel *iochan);
1011 
1012 void do_splash_progress(void);
1013 
1014 
1015 // d_print shortcuts
1016 void d_print_cancelled(void);
1017 void d_print_failed(void);
1018 void d_print_done(void);
1019 void d_print_file_error_failed(void);
1020 
1021 // general
1022 void do_text_window(const char *title, const char *text);
1023 
1024 // saveplay.c
1025 boolean read_file_details(const char *file_name, boolean only_check_for_audio);
1026 boolean add_file_info(const char *check_handle, boolean aud_only);
1027 boolean save_file_comments(int fileno);
1028 boolean reload_clip(int fileno,int maxframe);
1030 void reget_afilesize(int fileno);
1031 ulong deduce_file(const char *filename, double start_time, int end);
1032 ulong open_file(const char *filename);
1033 ulong open_file_sel(const char *file_name, double start_time, int frames);
1034 void open_fw_device(void);
1035 boolean get_new_handle(int index, const char *name);
1036 boolean get_temp_handle(int index, boolean create);
1037 boolean get_handle_from_info_file(int index);
1038 void create_cfile(void);
1039 void save_file(int clip, int start, int end, const char *filename);
1040 void play_file(void);
1041 void save_frame(LiVESMenuItem *menuitem, livespointer user_data);
1042 boolean save_frame_inner(int clip, int frame, const char *file_name, int width, int height, boolean from_osc);
1043 void wait_for_stop(const char *stop_command);
1044 boolean save_clip_values(int which_file);
1045 void add_to_recovery_file(const char *handle);
1046 void rewrite_recovery_file(void);
1047 boolean check_for_recovery_files(boolean auto_recover);
1048 void recover_layout_map(int numclips);
1049 const char *get_deinterlace_string(void);
1050 
1051 // saveplay.c backup
1052 void backup_file(int clip, int start, int end, const char *filename);
1053 int save_event_frames(void);
1054 boolean write_headers(lives_clip_t *file);
1055 
1056 // saveplay.c restore
1057 ulong restore_file(const char *filename);
1058 boolean read_headers(const char *file_name);
1059 
1060 // saveplay.c sets
1061 void open_set_file(const char *set_name, int clipnum);
1062 
1063 
1064 // saveplay.c scrap file
1065 boolean open_scrap_file(void);
1066 boolean open_ascrap_file(void);
1067 int save_to_scrap_file(weed_plant_t *layer);
1068 boolean load_from_scrap_file(weed_plant_t *layer, int frame);
1069 void close_ascrap_file(void);
1070 void close_scrap_file(void);
1071 void add_to_ascrap_mb(uint64_t bytes);
1072 
1073 boolean check_for_disk_space(void);
1074 
1075 
1076 // main.c
1077 typedef void (*SignalHandlerPointer)(int);
1078 
1080 void catch_sigint(int signum);
1081 void defer_sigint(int signum);
1082 boolean startup_message_fatal(const char *msg);
1083 boolean startup_message_choice(const char *msg, int msgtype);
1084 boolean startup_message_nonfatal(const char *msg);
1085 boolean startup_message_info(const char *msg);
1086 boolean startup_message_nonfatal_dismissable(const char *msg, int warning_mask);
1088 void get_monitors(void);
1089 void set_ce_frame_from_pixbuf(LiVESImage *image, LiVESPixbuf *pixbuf, lives_painter_t *);
1090 void load_start_image(int frame);
1091 void load_end_image(int frame);
1092 void load_preview_image(boolean update_always);
1093 
1094 boolean pull_frame(weed_plant_t *layer, const char *image_ext, weed_timecode_t tc);
1095 void pull_frame_threaded(weed_plant_t *layer, const char *img_ext, weed_timecode_t tc);
1096 void check_layer_ready(weed_plant_t *layer);
1097 boolean pull_frame_at_size(weed_plant_t *layer, const char *image_ext, weed_timecode_t tc,
1098  int width, int height, int target_palette);
1099 LiVESPixbuf *pull_lives_pixbuf_at_size(int clip, int frame, const char *image_ext, weed_timecode_t tc,
1100  int width, int height, LiVESInterpType interp);
1101 LiVESPixbuf *pull_lives_pixbuf(int clip, int frame, const char *image_ext, weed_timecode_t tc);
1102 
1103 LiVESError *lives_pixbuf_save(LiVESPixbuf *pixbuf, char *fname, lives_image_type_t imgtype,
1104  int quality, boolean do_chmod, LiVESError **gerrorptr);
1105 
1106 void init_track_decoders(void);
1107 void free_track_decoders(void);
1108 
1109 #ifdef USE_LIBPNG
1110 boolean layer_from_png(FILE *fp, weed_plant_t *layer, boolean prog);
1111 boolean save_to_png(FILE *fp, weed_plant_t *layer, int comp);
1112 #endif
1113 
1114 void load_frame_image(int frame);
1115 void sensitize(void);
1116 void desensitize(void);
1117 void procw_desensitize(void);
1118 void close_current_file(int file_to_switch_to);
1119 void get_next_free_file(void);
1120 void switch_to_file(int old_file, int new_file);
1121 void do_quick_switch(int new_file);
1122 void switch_audio_clip(int new_file, boolean activate);
1123 void resize(double scale);
1124 void do_start_messages(void);
1125 boolean set_palette_colours(boolean force_reload);
1126 void set_main_title(const char *filename, int or_untitled_number);
1127 void set_record(void);
1128 
1129 //gui.c
1130 void create_LiVES(void);
1131 void show_lives(void);
1132 void set_colours(LiVESWidgetColor *colf, LiVESWidgetColor *colb, LiVESWidgetColor *colf2,
1133  LiVESWidgetColor *colb2, LiVESWidgetColor *coli, LiVESWidgetColor *colt);
1134 void set_preview_box_colours(void);
1135 void load_theme_images(void);
1136 void set_interactive(boolean interactive);
1137 char *get_menu_name(lives_clip_t *sfile);
1138 void enable_record(void);
1139 void toggle_record(void);
1140 void disable_record(void);
1141 void make_custom_submenus(void);
1142 void fade_background(void);
1143 void unfade_background(void);
1144 void block_expose(void);
1145 void unblock_expose(void);
1146 void frame_size_update(void);
1147 void splash_init(void);
1148 void splash_end(void);
1149 void splash_msg(const char *msg, double pct);
1150 void add_message_scroller(LiVESWidget *conter);
1152 #if GTK_CHECK_VERSION(3,0,0)
1153 void calibrate_sepwin_size(void);
1154 boolean expose_pim(LiVESWidget *widget, lives_painter_t *cr, livespointer user_data);
1155 boolean expose_sim(LiVESWidget *widget, lives_painter_t *cr, livespointer user_data);
1156 boolean expose_eim(LiVESWidget *widget, lives_painter_t *cr, livespointer user_data);
1157 #endif
1158 
1159 
1160 
1161 
1162 
1163 // system calls in utils.c
1164 int lives_system(const char *com, boolean allow_error);
1165 lives_pid_t lives_fork(const char *com);
1166 int lives_open3(const char *pathname, int flags, mode_t mode);
1167 int lives_open2(const char *pathname, int flags);
1168 int lives_open_buffered_rdonly(const char *pathname);
1169 int lives_creat_buffered(const char *pathname, int mode);
1170 int lives_close_buffered(int fd);
1171 void lives_close_all_file_buffers(void);
1172 off_t lives_lseek_buffered_rdonly(int fd, off_t offset);
1173 ssize_t lives_write(int fd, livesconstpointer buf, size_t count, boolean allow_fail);
1174 ssize_t lives_write_buffered(int fd, const char *buf, size_t count, boolean allow_fail);
1175 ssize_t lives_write_le(int fd, livesconstpointer buf, size_t count, boolean allow_fail);
1176 ssize_t lives_write_le_buffered(int fd, livesconstpointer buf, size_t count, boolean allow_fail);
1177 ssize_t lives_read(int fd, void *buf, size_t count, boolean allow_less);
1178 ssize_t lives_read_buffered(int fd, void *buf, size_t count, boolean allow_less);
1179 ssize_t lives_read_le(int fd, void *buf, size_t count, boolean allow_less);
1180 ssize_t lives_read_le_buffered(int fd, void *buf, size_t count, boolean allow_less);
1181 int lives_chdir(const char *path, boolean allow_fail);
1182 int lives_fputs(const char *s, FILE *stream);
1183 char *lives_fgets(char *s, int size, FILE *stream);
1184 pid_t lives_getpid(void);
1185 int lives_getgid(void);
1186 int lives_getuid(void);
1187 boolean lives_freep(void **ptr);
1188 void lives_kill_subprocesses(const char *dirname, boolean kill_parent);
1189 void lives_suspend_resume_process(const char *dirname, boolean suspend);
1190 #ifdef IS_MINGW
1191 boolean lives_win32_suspend_resume_process(DWORD pid, boolean suspend);
1192 boolean lives_win32_kill_subprocesses(DWORD pid, boolean kill_parent);
1193 int lives_win32_get_num_logical_cpus(void);
1194 #endif
1195 int lives_kill(lives_pid_t pid, int sig);
1196 int lives_killpg(lives_pgid_t pgrp, int sig);
1197 void lives_srandom(unsigned int seed);
1198 ssize_t lives_readlink(const char *path, char *buf, size_t bufsiz);
1199 boolean lives_setenv(const char *name, const char *value);
1200 boolean lives_fsync(int fd);
1201 void lives_sync(void);
1202 int lives_rmdir(const char *dir, boolean force);
1203 int lives_rmdir_with_parents(const char *dir);
1204 int lives_rm(const char *file);
1205 int lives_rmglob(const char *files);
1206 int lives_cp(const char *from, const char *to);
1207 int lives_cp_keep_perms(const char *from, const char *to);
1208 int lives_mv(const char *from, const char *to);
1209 int lives_touch(const char *tfile);
1210 int lives_chmod(const char *target, const char *mode);
1211 int lives_cat(const char *from, const char *to, boolean append);
1212 int lives_echo(const char *text, const char *to, boolean append);
1213 int lives_ln(const char *from, const char *to);
1214 
1215 
1216 int lives_utf8_strcasecmp(const char *s1, const char *s2);
1217 
1218 char *filename_from_fd(char *val, int fd);
1219 
1220 float LEFloat_to_BEFloat(float f) GNU_CONST;
1221 uint64_t lives_10pow(int pow) GNU_CONST;
1222 double lives_fix(double val, int decimals) GNU_CONST;
1223 int get_approx_ln(uint32_t val) GNU_CONST;
1224 
1225 int64_t lives_get_current_ticks(void);
1226 boolean lives_alarm_get(int alarm_handle);
1227 int lives_alarm_set(int64_t ticks);
1228 void lives_alarm_clear(int alarm_handle);
1229 lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, uint64_t *dsval);
1230 char *lives_format_storage_space_string(uint64_t space);
1231 
1232 
1233 int myround(double n);
1234 void get_dirname(char *filename);
1235 char *get_dir(const char *filename);
1236 void get_basename(char *filename);
1237 void get_filename(char *filename, boolean strip_dir);
1238 char *get_extension(const char *filename);
1239 uint64_t get_version_hash(const char *exe, const char *sep, int piece);
1240 uint64_t make_version_hash(const char *ver);
1241 void d_print(const char *fmt, ...);
1242 void init_clipboard(void);
1243 boolean cache_file_contents(const char *filename);
1244 char *get_val_from_cached_list(const char *key, size_t maxlen);
1245 
1246 void get_location(const char *exe, char *val, int maxlen);
1247 
1248 char *make_image_file_name(lives_clip_t *clip, int frame, const char *img_ext);
1249 const char *get_image_ext_for_type(lives_image_type_t imgtype);
1250 lives_image_type_t lives_image_ext_to_type(const char *img_ext);
1251 lives_image_type_t lives_image_type_to_image_type(const char *lives_img_type);
1252 
1253 void set_menu_text(LiVESWidget *menu, const char *text, boolean use_mnemonic);
1254 void get_menu_text(LiVESWidget *menu, char *text);
1255 void get_menu_text_long(LiVESWidget *menuitem, char *text);
1256 void reset_clipmenu(void);
1257 void get_play_times(void);
1258 void get_total_time(lives_clip_t *file);
1259 uint32_t get_signed_endian(boolean is_signed, boolean little_endian);
1260 void fullscreen_internal(void);
1261 void switch_to_int_player(void);
1262 void switch_to_mplayer(void);
1263 void switch_aud_to_sox(boolean set_pref);
1264 boolean switch_aud_to_jack(void);
1265 boolean switch_aud_to_pulse(void);
1266 void switch_aud_to_mplayer(boolean set_pref);
1267 void switch_aud_to_mplayer2(boolean set_pref);
1268 boolean prepare_to_play_foreign(void);
1269 boolean after_foreign_play(void);
1270 boolean check_file(const char *file_name, boolean check_exists);
1271 boolean check_dir_access(const char *dir);
1272 uint64_t get_file_size(int fd);
1273 uint64_t sget_file_size(const char *name);
1274 uint64_t get_fs_free(const char *dir);
1275 boolean is_writeable_dir(const char *dir);
1276 boolean ensure_isdir(char *fname);
1277 char *ensure_extension(const char *fname, const char *ext) WARN_UNUSED;
1278 boolean check_dev_busy(char *devstr);
1279 void activate_url_inner(const char *link);
1280 void activate_url(LiVESAboutDialog *about, const char *link, livespointer data);
1281 void show_manual_section(const char *lang, const char *section);
1282 
1283 double calc_time_from_frame(int clip, int frame);
1284 int calc_frame_from_time(int filenum, double time);
1285 int calc_frame_from_time2(int filenum, double time);
1286 int calc_frame_from_time3(int filenum, double time);
1287 
1288 boolean check_for_ratio_fps(double fps);
1289 double get_ratio_fps(const char *string);
1290 void calc_maxspect(int rwidth, int rheight, int *cwidth, int *cheight);
1291 
1292 char *remove_trailing_zeroes(double val);
1293 
1294 void remove_layout_files(LiVESList *lmap);
1295 boolean add_lmap_error(lives_lmap_error_t lerror, const char *name, livespointer user_data,
1296  int clipno, int frameno, double atime, boolean affects_current);
1297 void clear_lmap_errors(void);
1298 boolean prompt_remove_layout_files(void);
1299 boolean do_std_checks(const char *type_name, const char *type, size_t maxlen, const char *nreject);
1300 boolean is_legal_set_name(const char *set_name, boolean allow_dupes);
1301 char *repl_workdir(const char *entry, boolean fwd);
1302 char *clip_detail_to_string(lives_clip_details_t what, size_t *maxlenp);
1303 boolean get_clip_value(int which, lives_clip_details_t, void *retval, size_t maxlen);
1304 void save_clip_value(int which, lives_clip_details_t, void *val);
1305 boolean check_frame_count(int idx);
1306 void count_opening_frames(void);
1307 void get_frame_count(int idx);
1308 void get_frames_sizes(int fileno, int frame_to_test);
1309 int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps);
1310 boolean int_array_contains_value(int *array, int num_elems, int value);
1311 boolean check_for_lock_file(const char *set_name, int type);
1312 void lives_list_free_strings(LiVESList *);
1313 void lives_list_free_all(LiVESList **);
1314 void lives_slist_free_all(LiVESSList **);
1315 
1316 boolean create_event_space(int length_in_eventsb);
1317 void add_to_recent(const char *filename, double start, int frames, const char *file_open_params);
1318 int verhash(char *version);
1319 void set_undoable(const char *what, boolean sensitive);
1320 void set_redoable(const char *what, boolean sensitive);
1321 void zero_spinbuttons(void);
1322 void draw_little_bars(double ptrtime);
1323 void set_sel_label(LiVESWidget *label);
1324 void clear_mainw_msg(void);
1325 int get_token_count(const char *string, int delim);
1326 LiVESPixbuf *lives_pixbuf_new_blank(int width, int height, int palette);
1327 char *lives_strappend(char *string, int len, const char *newbit);
1328 LiVESList *lives_list_append_unique(LiVESList *xlist, const char *add);
1329 void find_when_to_stop(void);
1330 int calc_new_playback_position(int fileno, uint64_t otc, uint64_t *ntc);
1331 void calc_aframeno(int fileno);
1332 void minimise_aspect_delta(double allowed_aspect,int hblock,int vblock,int hsize,int vsize,int *width,int *height);
1333 LiVESInterpType get_interp_value(short quality);
1334 
1335 LiVESList *lives_list_move_to_first(LiVESList *list, LiVESList *item) WARN_UNUSED;
1336 LiVESList *lives_list_delete_string(LiVESList *, char *string) WARN_UNUSED;
1337 LiVESList *lives_list_copy_strings(LiVESList *list);
1338 boolean string_lists_differ(LiVESList *, LiVESList *);
1339 
1340 boolean is_realtime_aplayer(int ptype);
1341 
1342 LiVESList *get_set_list(const char *dir, boolean utf8);
1343 
1344 char *subst(const char *string, const char *from, const char *to);
1345 char *insert_newlines(const char *text, int maxwidth);
1346 
1347 int hextodec(char *string);
1348 int get_hex_digit(const char *c);
1349 
1350 uint32_t fastrand(void);
1351 void fastsrand(uint32_t seed);
1352 
1353 int lives_list_strcmp_index(LiVESList *list, livesconstpointer data);
1354 
1356 
1357 //callbacks.c
1358 
1359 
1360 // paramspecial.c
1361 LiVESPixbuf *mt_framedraw(lives_mt *, LiVESPixbuf *);
1362 
1363 
1364 // effects-weed.c
1365 livespointer _lives_malloc(size_t size) GNU_MALLOC;
1366 livespointer lives_memcpy(livespointer dest, livesconstpointer src, size_t n);
1367 livespointer lives_memset(livespointer s, int c, size_t n);
1368 void _lives_free(livespointer ptr);
1369 livespointer lives_calloc(size_t n_blocks, size_t n_block_bytes);
1370 livespointer _lives_realloc(livespointer ptr, size_t new_size);
1371 
1372 
1373 // pangotext.c
1374 boolean subtitles_init(lives_clip_t *sfile, char *fname, lives_subtitle_type_t);
1375 void subtitles_free(lives_clip_t *sfile);
1376 boolean get_srt_text(lives_clip_t *sfile, double xtime);
1377 boolean get_sub_text(lives_clip_t *sfile, double xtime);
1378 boolean save_sub_subtitles(lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename);
1379 boolean save_srt_subtitles(lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename);
1380 
1381 #include "osc_notify.h"
1382 
1383 // inlines
1384 #define cfile mainw->files[mainw->current_file]
1385 #define clipboard mainw->files[0]
1386 
1387 #define PREFS_TIMEOUT 10000000
1388 
1389 #define LIVES_TV_CHANNEL1 "http://www.serverwillprovide.com/sorteal/livestvclips/livestv.ogm"
1390 
1391 
1392 // round (double) a up to next (integer) multiple of (double) b
1393 #define CEIL(a,b) ((int)(((double)a+(double)b-.000000001)/((double)b))*b)
1394 
1395 #ifdef NEED_ENDIAN_TEST
1396 #undef NEED_ENDIAN_TEST
1397 static int32_t testint = 0x12345678;
1398 #define IS_BIG_ENDIAN (((char *)&testint)[0] == 0x12)
1399 #endif
1400 
1401 
1403 
1404 void break_me(void);
1405 
1406 #define LIVES_NO_DEBUG
1407 #ifndef LIVES_DEBUG
1408 #ifndef LIVES_NO_DEBUG
1409 #define LIVES_DEBUG(x) fprintf(stderr, "LiVES debug: %s\n", x)
1410 #else // LIVES_NO_DEBUG
1411 #define LIVES_DEBUG(x) dummychar = x
1412 #endif // LIVES_NO_DEBUG
1413 #endif // LIVES_DEBUG
1414 
1415 #ifndef LIVES_INFO
1416 #ifndef LIVES_NO_INFO
1417 #define LIVES_INFO(x) fprintf(stderr, "LiVES info: %s\n", x)
1418 #else // LIVES_NO_INFO
1419 #define LIVES_INFO(x) dummychar = x
1420 #endif // LIVES_NO_INFO
1421 #endif // LIVES_INFO
1422 
1423 #ifndef LIVES_WARN
1424 #ifndef LIVES_NO_WARN
1425 #define LIVES_WARN(x) fprintf(stderr, "LiVES warning: %s\n", x)
1426 #else // LIVES_NO_WARN
1427 #define LIVES_WARN(x) dummychar = x
1428 #endif // LIVES_NO_WARN
1429 #endif // LIVES_WARN
1430 
1431 #ifndef LIVES_ERROR
1432 #ifndef LIVES_NO_ERROR
1433 #define LIVES_ERROR(x) {fprintf(stderr, "LiVES error: %s\n", x); break_me();}
1434 #else // LIVES_NO_ERROR
1435 #define LIVES_ERROR(x) dummychar = x
1436 #endif // LIVES_NO_ERROR
1437 #endif // LIVES_ERROR
1438 
1439 #ifndef LIVES_FATAL
1440 #ifndef LIVES_NO_FATAL
1441 #define LIVES_FATAL(x) {fprintf(stderr, "LiVES fatal: %s\n", x); raise (LIVES_SIGSEGV);}
1442 #else // LIVES_NO_FATAL
1443 #define LIVES_FATAL(x) dummychar = x
1444 #endif // LIVES_NO_FATAL
1445 #endif // LIVES_FATAL
1446 
1447 
1448 #endif // #ifndef HAS_LIVES_MAIN_H
1449 
void do_messages_window(void)
Definition: dialogs.c:2529
void do_ra_convert_error(void)
Definition: dialogs.c:2748
int lives_touch(const char *tfile)
Definition: utils.c:3985
int undo_arate
audio playback rate
Definition: main.h:647
boolean do_warning_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient)
Definition: dialogs.c:401
void load_theme_images(void)
Definition: gui.c:58
void do_encoder_sox_error(void)
Definition: dialogs.c:2231
void handle_backend_errors(void)
Definition: dialogs.c:694
int frames
Definition: main.h:538
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:5261
double undo2_dbl
Definition: main.h:642
int afile
Definition: main.h:359
void reget_afilesize(int fileno)
Definition: utils.c:4250
char * ensure_extension(const char *fname, const char *ext) WARN_UNUSED
Definition: utils.c:2470
boolean do_yesno_dialog_with_check(const char *text, int warn_mask_number)
Definition: dialogs.c:388
boolean has_stderr
Definition: main.h:772
LiVESWidget * stop_button
Definition: main.h:346
int undo1_int
Definition: main.h:636
boolean no_proc_sys_errors
skip system error dialogs in processing
Definition: main.h:695
int value
Definition: main.h:335
uint64_t python_version
Definition: main.h:764
int get_hex_digit(const char *c)
Definition: utils.c:5258
Definition: main.h:860
boolean deinterlace
auto deinterlace
Definition: main.h:680
boolean opening_audio
Definition: main.h:586
int lives_open_buffered_rdonly(const char *pathname)
Definition: utils.c:582
ulong open_file_sel(const char *file_name, double start_time, int frames)
Definition: saveplay.c:272
int undo2_int
Definition: main.h:637
Definition: main.h:388
Definition: main.h:858
int verhash(char *version)
Definition: utils.c:4414
void do_mt_audchan_error(int warn_mask)
Definition: dialogs.c:2709
boolean startup_message_fatal(const char *msg)
Definition: main.c:3442
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:4920
void perf_mem_warning(void)
Definition: dialogs.c:2447
boolean restoring
Definition: main.h:589
void do_read_failed_error_s(const char *filename, const char *addinfo)
Definition: dialogs.c:3113
void draw_little_bars(double ptrtime)
Definition: utils.c:3006
int * frame_index_back
for undo
Definition: main.h:663
int lives_system(const char *com, boolean allow_error)
Definition: utils.c:304
void do_dir_perm_error(const char *dir_name)
Definition: dialogs.c:3308
boolean has_pulse_audio
Definition: main.h:735
boolean get_handle_from_info_file(int index)
Definition: saveplay.c:1061
int hextodec(char *string)
Definition: utils.c:5243
Definition: main.h:855
LiVESWidget * create_message_dialog(lives_dialog_t diat, const char *text, LiVESWindow *transient, int warn_mask_number, boolean is_blocking)
Definition: dialogs.c:168
double seek
Definition: main.h:360
uint32_t undo1_uint
Definition: main.h:640
ssize_t lives_read_le(int fd, void *buf, size_t count, boolean allow_less)
Definition: utils.c:528
boolean has_mpv
Definition: main.h:727
Definition: events.h:173
boolean do_move_workdir_dialog(void)
Definition: dialogs.c:3398
void _lives_free(livespointer ptr)
Definition: effects-weed.c:111
LiVESError * lives_pixbuf_save(LiVESPixbuf *pixbuf, char *fname, lives_image_type_t imgtype, int quality, boolean do_chmod, LiVESError **gerrorptr)
Definition: main.c:6697
boolean do_event_list_warning(void)
Definition: dialogs.c:2758
int start
Definition: main.h:568
int do_header_missing_detail_error(int clip, lives_clip_details_t detail) WARN_UNUSED
Definition: dialogs.c:3257
int do_error_dialog(const char *text)
Definition: dialogs.c:521
#define PATH_MAX
Definition: main.h:287
void set_main_title(const char *filename, int or_untitled_number)
Definition: main.c:3487
boolean nokeep
don&#39;t show the &#39;keep&#39; button - e.g. for operations which resize frames
Definition: main.h:596
boolean nopreview
don&#39;t show preview/pause buttons on processing
Definition: main.h:593
lives_pid_t lives_fork(const char *com)
Definition: utils.c:349
uint64_t get_fs_free(const char *dir)
Definition: utils.c:5321
pid_t lives_pid_t
Definition: main.h:119
boolean load_from_scrap_file(weed_plant_t *layer, int frame)
Definition: saveplay.c:4739
lives_dialog_t
Definition: mainwindow.h:187
void get_play_times(void)
Definition: utils.c:2706
just cancel in GUI (for keep, etc)
Definition: main.h:475
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:5121
void splash_end(void)
Definition: gui.c:4369
lives_image_type_t lives_image_ext_to_type(const char *img_ext)
Definition: utils.c:2278
void find_when_to_stop(void)
Definition: utils.c:3178
void save_clip_value(int which, lives_clip_details_t, void *val)
Definition: utils.c:4840
void clear_lmap_errors(void)
Definition: utils.c:2091
void set_pref(const char *key, const char *value)
Definition: preferences.c:303
void activate_url(LiVESAboutDialog *about, const char *link, livespointer data)
Definition: utils.c:4190
void do_file_perm_error(const char *file_name)
Definition: dialogs.c:3300
int lives_rm(const char *file)
Definition: utils.c:3926
boolean is_legal_set_name(const char *set_name, boolean allow_dupes)
Definition: utils.c:2227
void do_set_load_lmap_error(void)
uint64_t lives_random(void)
Definition: utils.c:106
boolean has_mplayer
Definition: main.h:725
LiVESWidget * scrolledwindow
Definition: main.h:350
livespointer lives_memcpy(livespointer dest, livesconstpointer src, size_t n)
Definition: effects-weed.c:78
boolean do_existing_subs_warning(void)
Definition: dialogs.c:3354
video playback completed
Definition: main.h:459
int lives_pgid_t
Definition: main.h:120
boolean create_event_space(int length_in_eventsb)
Definition: utils.c:4286
void do_bad_theme_import_error(const char *theme_file)
Definition: dialogs.c:3485
void close_current_file(int file_to_switch_to)
close current file, and try to switch to file_to_switch_to
Definition: main.c:6733
void recover_layout_map(int numclips)
Definition: saveplay.c:5112
int lives_echo(const char *text, const char *to, boolean append)
Definition: utils.c:4035
Definition: main.h:391
int ohsize
Definition: main.h:558
boolean was_renamed
Definition: main.h:578
lives_painter_surface_t * raudio_drawable
Definition: main.h:702
void open_fw_device(void)
boolean reload_clip(int fileno, int maxframe)
Definition: saveplay.c:5192
char * remove_trailing_zeroes(double val)
Definition: utils.c:5069
void do_autolives_needs_clips_error(void)
Definition: dialogs.c:3467
void defer_sigint(int signum)
Definition: main.c:184
void check_layer_ready(weed_plant_t *layer)
Definition: main.c:5175
Definition: main.h:856
void workdir_warning(void)
Definition: dialogs.c:2191
Definition: main.h:859
boolean switch_aud_to_pulse(void)
Definition: utils.c:3334
boolean opening
Definition: main.h:585
int last_frameno
Definition: main.h:607
void get_basename(char *filename)
Definition: utils.c:2437
void clear_mainw_msg(void)
Definition: utils.c:1269
boolean read_headers(const char *file_name)
Definition: saveplay.c:3960
void unblock_expose(void)
Definition: gui.c:3316
boolean has_cdda2wav
Definition: main.h:731
void fastsrand(uint32_t seed)
Definition: utils.c:5279
void pull_frame_threaded(weed_plant_t *layer, const char *img_ext, weed_timecode_t tc)
Definition: main.c:5233
int do_error_dialog_with_check_transient(const char *text, boolean is_blocking, int warn_mask_number, LiVESWindow *transient)
Definition: dialogs.c:600
void d_print(const char *fmt,...)
Definition: utils.c:1862
boolean can_write_to_config
Definition: main.h:716
imported video, broken into frames
Definition: main.h:482
int progress_start
Definition: main.h:572
void frame_size_update(void)
Definition: gui.c:4154
void d_print_file_error_failed(void)
Definition: dialogs.c:3006
ssize_t sizdbl
Definition: main.c:90
lives_image_type_t
Definition: main.h:491
boolean redoable
Definition: main.h:633
LiVESList * lives_list_move_to_first(LiVESList *list, LiVESList *item) WARN_UNUSED
Definition: utils.c:5372
void do_text_window(const char *title, const char *text)
Definition: dialogs.c:2536
lives_clip_type_t clip_type
Definition: main.h:653
void do_splash_progress(void)
lives_undo_t undo_action
undo
Definition: main.h:626
Definition: main.h:492
char * get_val_from_cached_list(const char *key, size_t maxlen)
Definition: utils.c:4586
lives_subtitles_t * subt
Definition: main.h:690
livespointer _lives_malloc(size_t size) GNU_MALLOC
Definition: effects-weed.c:84
void(* SignalHandlerPointer)(int)
Definition: main.h:1077
int get_token_count(const char *string, int delim)
Definition: utils.c:5107
double total_time
Definition: main.h:599
Definition: main.h:384
void do_jack_lost_conn_error(void)
Definition: dialogs.c:3471
uint64_t sget_file_size(const char *name)
Definition: utils.c:4218
boolean has_dvgrab
Definition: main.h:721
boolean do_auto_dialog(const char *text, int type)
Definition: dialogs.c:2059
void reset_clipmenu(void)
Definition: utils.c:3820
void enable_record(void)
Definition: gui.c:3586
void do_threaded_dialog(char *translated_text, boolean has_cancel)
Definition: dialogs.c:2934
char * op_dir
Definition: main.h:692
void count_opening_frames(void)
Definition: utils.c:2330
uint16_t red
Definition: main.h:318
Definition: main.h:334
ssize_t lives_read_buffered(int fd, void *buf, size_t count, boolean allow_less)
Definition: utils.c:682
boolean do_layout_alter_frames_warning(void)
Definition: dialogs.c:2605
ulong restore_file(const char *filename)
Definition: saveplay.c:4405
lives_whentostop_t
which stream end should cause playback to finish ?
Definition: main.h:416
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:2255
void d_print_failed(void)
Definition: dialogs.c:2997
void minimise_aspect_delta(double allowed_aspect, int hblock, int vblock, int hsize, int vsize, int *width, int *height)
Definition: utils.c:3204
boolean undo1_boolean
Definition: main.h:643
void add_message_scroller(LiVESWidget *conter)
Definition: gui.c:118
boolean do_clipboard_fps_warning(void)
Definition: dialogs.c:2452
void set_sel_label(LiVESWidget *label)
Definition: utils.c:4512
char * lives_fgets(char *s, int size, FILE *stream)
Definition: utils.c:447
ssize_t lives_write_le(int fd, livesconstpointer buf, size_t count, boolean allow_fail)
ssize_t sizint
type sizes
Definition: main.c:90
boolean lives_setenv(const char *name, const char *value)
Definition: utils.c:281
boolean check_storage_space(lives_clip_t *sfile, boolean is_processing)
Definition: dialogs.c:842
Definition: main.h:317
mode_t umask
Definition: main.h:782
int ovsize
Definition: main.h:559
#define GNU_MALLOC
Definition: main.h:301
void do_vpp_fps_error(void)
Definition: dialogs.c:2784
boolean startup_message_nonfatal(const char *msg)
Definition: main.c:3450
void pump_io_chan(LiVESIOChannel *iochan)
Definition: dialogs.c:776
void do_mt_undo_buf_error(void)
Definition: dialogs.c:2689
no cancel
Definition: main.h:426
int do_read_failed_error_s_with_retry(const char *fname, const char *errtext, LiVESWindow *transient) WARN_UNUSED
Definition: dialogs.c:3192
int asampsize
Definition: main.h:535
ssize_t lives_write_buffered(int fd, const char *buf, size_t count, boolean allow_fail)
Definition: utils.c:746
LiVESList * get_set_list(const char *dir, boolean utf8)
Definition: utils.c:4971
void close_scrap_file(void)
Definition: saveplay.c:5071
boolean do_yesno_dialog_with_check_transient(const char *text, int warn_mask_number, LiVESWindow *transient)
Definition: dialogs.c:427
uint32_t undo_signed_endian
Definition: main.h:648
boolean lives_freep(void **ptr)
Definition: utils.c:873
void set_undoable(const char *what, boolean sensitive)
Definition: utils.c:4457
boolean get_temp_handle(int index, boolean create)
Definition: saveplay.c:3197
boolean get_sub_text(lives_clip_t *sfile, double xtime)
Definition: pangotext.c:566
boolean is_untitled
Definition: main.h:579
void get_next_free_file(void)
Definition: utils.c:2401
void do_firstever_dialog(void)
unimported video, not or partially broken in frames
Definition: main.h:485
int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps)
Definition: resample.c:58
int lives_ln(const char *from, const char *to)
Definition: utils.c:3994
int lives_mv(const char *from, const char *to)
Definition: utils.c:3976
void end_threaded_dialog(void)
Definition: dialogs.c:2964
Definition: main.h:850
int lives_cat(const char *from, const char *to, boolean append)
Definition: utils.c:4019
int stored_layout_idx
Definition: main.h:686
void do_write_failed_error_s(const char *filename, const char *addinfo)
Definition: dialogs.c:3067
boolean is_realtime_aplayer(int ptype)
Definition: utils.c:1480
boolean save_frame_inner(int clip, int frame, const char *file_name, int width, int height, boolean from_osc)
Definition: saveplay.c:3656
uint32_t signed_endian
bitfield
Definition: main.h:530
LiVESWidget * menuentry
Definition: main.h:575
boolean check_file(const char *file_name, boolean check_exists)
check if file exists
Definition: utils.c:3844
boolean has_xwininfo
Definition: main.h:736
Definition: main.h:868
frames from video device
Definition: main.h:487
LiVESPixbuf * pull_lives_pixbuf(int clip, int frame, const char *image_ext, weed_timecode_t tc)
Definition: main.c:5300
boolean ask_permission_dialog(int what)
Definition: dialogs.c:3502
int nmonitors
Definition: main.h:774
lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, uint64_t *dsval)
Definition: utils.c:840
int arate
audio playback rate
Definition: main.h:532
int lives_kill(lives_pid_t pid, int sig)
Definition: utils.c:1237
Definition: main.h:395
boolean no_proc_write_errors
skip write error dialogs in processing
Definition: main.h:697
int64_t aseek_pos
audio seek posn. (bytes) for when we switch clips
Definition: main.h:673
livespointer lives_memset(livespointer s, int c, size_t n)
Definition: effects-weed.c:134
void do_jack_noopen_warn3(void)
Definition: dialogs.c:2645
void lives_alarm_clear(int alarm_handle)
Definition: utils.c:1401
Definition: main.h:510
LiVESWidget * cancel_button
Definition: main.h:349
int lives_rmdir_with_parents(const char *dir)
Definition: utils.c:3917
void do_mt_set_mem_error(boolean has_mt, boolean trans)
Definition: dialogs.c:2693
const char * get_deinterlace_string(void)
Definition: saveplay.c:206
void set_redoable(const char *what, boolean sensitive)
Definition: utils.c:4487
boolean set_palette_colours(boolean force_reload)
Definition: main.c:1966
capability * get_capabilities(void)
Definition: main.c:2223
boolean can_read_from_config
Definition: main.h:715
Definition: main.h:511
uint16_t alpha
Definition: main.h:321
int insert_start
Definition: main.h:570
boolean keep_without_preview
allow keep, even when nopreview is set - TODO use only nopreview and nokeep
Definition: main.h:699
void switch_to_file(int old_file, int new_file)
Definition: main.c:7059
int undo_achans
Definition: main.h:649
ssize_t lives_write_le_buffered(int fd, livesconstpointer buf, size_t count, boolean allow_fail)
LiVESList * layout_map
Definition: main.h:622
void wait_for_stop(const char *stop_command)
Definition: saveplay.c:3623
boolean undo3_boolean
Definition: main.h:645
int lives_fputs(const char *s, FILE *stream)
Definition: utils.c:434
int lives_getuid(void)
Definition: utils.c:164
int undo_arps
audio sample rate
Definition: main.h:651
void do_encoder_img_ftm_error(render_details *rdet)
Definition: dialogs.c:3329
LiVESInterpType get_interp_value(short quality)
Definition: utils.c:5364
lives_clip_details_t
Definition: main.h:845
void do_bad_theme_error(const char *themefile)
Definition: dialogs.c:3424
const char * version(void)
int rowstride
Definition: main.h:552
int64_t afilesize
Definition: main.h:561
Definition: main.h:864
void desensitize(void)
Definition: main.c:3707
void add_to_recovery_file(const char *handle)
Definition: saveplay.c:5684
void do_set_locked_warning(const char *setname)
Definition: dialogs.c:3402
_palette * palette
Definition: main.c:89
frames from generator plugin
Definition: main.h:484
int save_event_frames(void)
Definition: saveplay.c:4550
int do_write_failed_error_s_with_retry(const char *fname, const char *errtext, LiVESWindow *transient) WARN_UNUSED
Definition: dialogs.c:3136
char * lives_strappend(char *string, int len, const char *newbit)
Definition: utils.c:1416
Definition: main.h:861
int lives_killpg(lives_pgid_t pgrp, int sig)
Definition: utils.c:1253
lives_interlace_t interlace
interlace type (if known - none, topfirst, bottomfirst or : see plugins.h)
Definition: main.h:545
void load_preview_image(boolean update_always)
Definition: main.c:4294
LiVESWidget * label3
Definition: main.h:345
void set_record(void)
int bpp
Definition: main.h:525
pid_t mainpid
Definition: main.h:780
void do_dir_perm_access_error(const char *dir_name)
Definition: dialogs.c:3316
uint64_t get_file_size(int fd)
Definition: utils.c:4210
double stored_layout_audio
Definition: main.h:687
uint32_t frames_done
Definition: main.h:351
void init_clipboard(void)
Definition: utils.c:1814
void show_manual_section(const char *lang, const char *section)
Definition: utils.c:4195
void switch_aud_to_sox(boolean set_pref)
Definition: utils.c:3390
void do_mt_backup_space_error(lives_mt *, int memreq_mb)
Definition: dialogs.c:2666
void do_no_decoder_error(const char *fname)
Definition: dialogs.c:2623
char * filename_from_fd(char *val, int fd)
Definition: utils.c:44
void switch_to_int_player(void)
Definition: main.h:390
uint32_t fastrand(void)
Definition: utils.c:5272
image could not be captured
Definition: main.h:444
void resize(double scale)
Definition: main.c:7630
void set_ce_frame_from_pixbuf(LiVESImage *image, LiVESPixbuf *pixbuf, lives_painter_t *)
Definition: main.c:3897
boolean do_abort_check(void)
Definition: dialogs.c:3323
boolean opening_only_audio
Definition: main.h:587
char * subst(const char *string, const char *from, const char *to)
Definition: utils.c:5131
yuv4mpeg stream
Definition: main.h:483
Definition: main.h:849
int lives_rmdir(const char *dir, boolean force)
Definition: utils.c:3891
render_details * rdet
Definition: events.h:208
void lives_list_free_strings(LiVESList *)
Definition: utils.c:4540
void switch_aud_to_mplayer2(boolean set_pref)
Definition: utils.c:3487
boolean check_for_disk_space(void)
Definition: saveplay.c:4878
mainwindow * mainw
Definition: main.c:91
record audio to selection
Definition: main.h:409
void load_frame_image(int frame)
Definition: main.c:5480
type for LiVES to LiVES streaming
Definition: main.h:486
int progress_end
Definition: main.h:573
ulong menuentry_func
Definition: main.h:576
boolean get_srt_text(lives_clip_t *sfile, double xtime)
Definition: pangotext.c:422
int * frame_index
Definition: main.h:661
void do_audrate_error_dialog(void)
Definition: dialogs.c:2754
char * rcfile
Definition: main.h:755
int do_abort_cancel_retry_dialog(const char *text, LiVESWindow *transient) WARN_UNUSED
Definition: dialogs.c:475
double stored_layout_fps
Definition: main.h:688
int64_t reltime
Definition: main.h:336
boolean save_sub_subtitles(lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename)
Definition: pangotext.c:847
void lives_list_free_all(LiVESList **)
Definition: utils.c:4562
LiVESPixbuf * mt_framedraw(lives_mt *, LiVESPixbuf *)
Definition: paramspecial.c:499
Definition: main.h:418
void subtitles_free(lives_clip_t *sfile)
Definition: pangotext.c:711
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:1910
void do_layout_ascrap_file_error(void)
Definition: dialogs.c:2248
boolean can_write_to_workdir
Definition: main.h:718
lives_lmap_error_t
Definition: multitrack.h:988
boolean has_smogrify
Definition: main.h:713
void do_dev_busy_error(const char *devstr)
Definition: dialogs.c:3344
LiVESWidget * processing
Definition: main.h:341
normal - kill background processes working on current clip
Definition: main.h:474
char * get_extension(const char *filename)
Definition: utils.c:2458
void set_menu_text(LiVESWidget *menu, const char *text, boolean use_mnemonic)
Definition: utils.c:3787
int lives_open3(const char *pathname, int flags, mode_t mode)
Definition: utils.c:147
int lives_creat_buffered(const char *pathname, int mode)
Definition: utils.c:587
boolean needs_update
loaded values were incorrect, update header
Definition: main.h:706
void set_preview_box_colours(void)
Definition: gui.c:3328
char * repl_workdir(const char *entry, boolean fwd)
Definition: utils.c:2557
void do_no_autolives_error(void)
Definition: dialogs.c:3463
boolean play_paused
Definition: main.h:582
void set_colours(LiVESWidgetColor *colf, LiVESWidgetColor *colb, LiVESWidgetColor *colf2, LiVESWidgetColor *colb2, LiVESWidgetColor *coli, LiVESWidgetColor *colt)
Definition: gui.c:192
boolean has_midistartstop
Definition: main.h:733
int fx_frame_pump
rfx frame pump for virtual clips (CLIP_TYPE_FILE)
Definition: main.h:665
double get_ratio_fps(const char *string)
Definition: utils.c:5052
Definition: main.h:867
Definition: main.h:857
void toggle_record(void)
Definition: gui.c:3591
void get_monitors(void)
Definition: main.c:236
boolean do_warning_dialog(const char *text)
Definition: dialogs.c:371
boolean after_foreign_play(void)
Definition: utils.c:3682
Definition: main.h:711
boolean startup_message_info(const char *msg)
Definition: main.c:3472
mainw->
Definition: mainwindow.h:393
uint16_t green
Definition: main.h:313
int frameno
Definition: main.h:606
double undo1_dbl
Definition: main.h:641
boolean do_yuv4m_open_warning(void)
Definition: dialogs.c:2463
void * ext_src
points to opaque source for non-disk types
Definition: main.h:655
boolean process_one(boolean visible)
Definition: dialogs.c:1082
uint16_t green
Definition: main.h:319
void do_jack_noopen_warn(void)
Definition: dialogs.c:2637
boolean prompt_remove_layout_files(void)
Definition: dialogs.c:2590
xprocess * proc_ptr
the processing window
Definition: main.h:555
void free_track_decoders(void)
Definition: main.c:5448
LiVESWidget * label2
Definition: main.h:344
boolean check_frame_count(int idx)
Definition: utils.c:2296
boolean undo2_boolean
Definition: main.h:644
boolean write_headers(lives_clip_t *file)
Definition: saveplay.c:3885
void do_rendered_fx_dialog(void)
Definition: dialogs.c:2552
void do_audio_import_error(void)
Definition: dialogs.c:2563
void do_cd_error_dialog(void)
Definition: dialogs.c:3480
user pressed &#39;Keep&#39;
Definition: main.h:456
double calc_time_from_frame(int clip, int frame)
Definition: utils.c:1448
ssize_t sizshrt
Definition: main.c:90
void get_menu_text_long(LiVESWidget *menuitem, char *text)
Definition: utils.c:3805
event_list completed
Definition: main.h:447
void do_jack_noopen_warn4(void)
Definition: dialogs.c:2649
uint64_t make_version_hash(const char *ver)
Definition: utils.c:2528
void get_dirname(char *filename)
Definition: utils.c:2411
Definition: main.h:389
void lives_close_all_file_buffers(void)
Definition: utils.c:473
int vsize
Definition: main.h:528
void splash_init(void)
Definition: gui.c:4265
char * get_new_install_msg(void)
Definition: dialogs.c:3455
void do_invalid_subs_error(void)
Definition: dialogs.c:3358
boolean has_composite
Definition: main.h:729
ssize_t lives_read(int fd, void *buf, size_t count, boolean allow_less)
Definition: utils.c:503
double freeze_fps
Definition: main.h:581
void do_need_mplayer_dialog(void)
Definition: dialogs.c:2210
boolean do_layout_alter_audio_warning(void)
Definition: dialogs.c:2609
livespointer lives_calloc(size_t n_blocks, size_t n_block_bytes)
Definition: effects-weed.c:139
char * get_dir(const char *filename)
Definition: utils.c:2429
int header_version
Definition: main.h:548
struct timeval tv
Definition: main.h:837
off_t lives_lseek_buffered_rdonly(int fd, off_t offset)
Definition: utils.c:655
int calc_frame_from_time3(int filenum, double time)
nearest frame mid
Definition: utils.c:1469
double raudio_time
Definition: main.h:602
resample/reorder/resize/apply effects
Definition: main.h:404
void close_ascrap_file(void)
Definition: saveplay.c:5093
void do_no_mplayer_sox_error(void)
Definition: dialogs.c:2204
void do_bad_layout_error(void)
Definition: dialogs.c:2731
Definition: main.h:863
LiVESWidget * create_question_dialog(const char *title, const char *text, LiVESWindow *parent)
Definition: dialogs.c:364
lives_interlace_t
Definition: main.h:508
weed_plant_t * event_list_back
Definition: main.h:619
void set_signal_handlers(SignalHandlerPointer sigfunc)
Definition: main.c:2986
Definition: main.h:385
char * insert_newlines(const char *text, int maxwidth)
Definition: utils.c:5149
void do_card_in_use_error(void)
Definition: dialogs.c:3339
boolean has_icedax
Definition: main.h:732
void splash_msg(const char *msg, double pct)
Definition: gui.c:4351
boolean do_erase_subs_warning(void)
Definition: dialogs.c:3383
void do_mt_undo_mem_error(void)
Definition: dialogs.c:2683
lives_undo_t
need this for event_list_t *
Definition: main.h:383
lives_painter_surface_t * laudio_drawable
Definition: main.h:701
corresponds to one clip in the GUI
Definition: main.h:523
weed_plant_t * event_list
Definition: main.h:618
boolean has_encoder_plugins
Definition: main.h:761
Definition: main.h:393
void do_lb_composite_error(void)
Definition: dialogs.c:2736
int calc_new_playback_position(int fileno, uint64_t otc, uint64_t *ntc)
Definition: utils.c:1551
int lives_cp_keep_perms(const char *from, const char *to)
Definition: utils.c:3967
boolean check_backend_return(lives_clip_t *sfile)
Definition: dialogs.c:759
int64_t lives_get_current_ticks(void)
Definition: utils.c:1303
#define GNU_CONST
Definition: main.h:300
char * clip_detail_to_string(lives_clip_details_t what, size_t *maxlenp)
Definition: utils.c:4625
int stored_layout_frame
layout map for the current layout
Definition: main.h:685
boolean check_dev_busy(char *devstr)
Definition: utils.c:4151
void open_set_file(const char *set_name, int clipnum)
Definition: saveplay.c:4329
int save_to_scrap_file(weed_plant_t *layer)
Definition: saveplay.c:4903
boolean startup_message_choice(const char *msg, int msgtype)
Definition: main.c:3458
boolean do_theme_exists_warn(const char *themename)
Definition: dialogs.c:3492
void lives_slist_free_all(LiVESSList **)
Definition: utils.c:4554
cancel but keep opening
Definition: main.h:432
char * ds_critical_msg(const char *dir, uint64_t dsval)
Definition: dialogs.c:643
LiVESPixbuf * lives_pixbuf_new_blank(int width, int height, int palette)
Definition: colourspace.c:10040
void add_to_recent(const char *filename, double start, int frames, const char *file_open_params)
Definition: utils.c:4323
ran out of preview frames
Definition: main.h:441
void lives_kill_subprocesses(const char *dirname, boolean kill_parent)
Definition: utils.c:4052
uint16_t blue
Definition: main.h:320
void unfade_background(void)
Definition: gui.c:3107
int do_blocking_info_dialog(const char *text)
Definition: dialogs.c:585
lives_cancel_t check_for_bad_ffmpeg(void)
Definition: utils.c:5445
boolean has_xdg_screensaver
Definition: main.h:739
boolean check_dir_access(const char *dir)
Definition: utils.c:4117
int do_info_dialog_with_transient(const char *text, boolean is_blocking, LiVESWindow *transient)
Definition: dialogs.c:622
void do_rmem_max_error(int size)
Definition: dialogs.c:2803
int old_frames
for deordering, etc.
Definition: main.h:562
#define ulong
Definition: main.h:150
Definition: main.h:419
boolean do_std_checks(const char *type_name, const char *type, size_t maxlen, const char *nreject)
Definition: utils.c:2177
Definition: main.h:862
ssize_t lives_readlink(const char *path, char *buf, size_t bufsiz)
Definition: utils.c:248
void disable_record(void)
Definition: gui.c:3596
Definition: main.h:847
cancelled because of error
Definition: main.h:462
double video_time
Definition: main.h:600
Definition: main.h:339
pid_t lives_getpid(void)
Definition: utils.c:116
int lives_chdir(const char *path, boolean allow_fail)
Definition: utils.c:854
void wait_for_bg_audio_sync(lives_clip_t *sfile)
Definition: utils.c:4235
boolean no_proc_read_errors
skip read error dialogs in processing
Definition: main.h:696
Definition: main.h:358
void get_menu_text(LiVESWidget *menu, char *text)
Definition: utils.c:3800
Definition: pangotext.h:39
void add_warn_check(LiVESBox *box, int warn_mask_number)
Definition: dialogs.c:117
int hsize
in pixels (NOT macropixels !)
Definition: main.h:527
Definition: main.h:411
boolean has_gdb
Definition: main.h:737
void get_location(const char *exe, char *val, int maxlen)
Definition: utils.c:2496
void switch_to_mplayer(void)
void get_frame_count(int idx)
Definition: utils.c:2339
effect processing finished during preview
Definition: main.h:435
void calc_maxspect(int rwidth, int rheight, int *cwidth, int *cheight)
Definition: utils.c:1772
lives_image_type_t img_type
Definition: main.h:682
lives_cancel_type_t
Definition: main.h:473
void make_custom_submenus(void)
Definition: gui.c:149
void do_need_mplayer_mpv_dialog(void)
Definition: dialogs.c:2216
boolean int_array_contains_value(int *array, int num_elems, int value)
Definition: utils.c:3811
boolean ensure_isdir(char *fname)
Definition: utils.c:2476
int do_header_read_error_with_retry(int clip) WARN_UNUSED
Definition: dialogs.c:3224
uint32_t get_signed_endian(boolean is_signed, boolean little_endian)
Definition: utils.c:5082
int myround(double n)
Definition: utils.c:1265
boolean lives_alarm_get(int alarm_handle)
Definition: utils.c:1361
boolean smog_version_correct
Definition: main.h:714
Definition: main.h:848
void resize_widgets_for_monitor(boolean get_play_times)
Definition: gui.c:3635
LiVESList * lives_list_delete_string(LiVESList *, char *string) WARN_UNUSED
Definition: utils.c:5379
boolean has_mplayer2
Definition: main.h:726
void do_pulse_lost_conn_error(void)
Definition: dialogs.c:3475
void switch_audio_clip(int new_file, boolean activate)
Definition: main.c:7290
capability * capable
some shared structures
Definition: main.c:88
LiVESWidget * progressbar
Definition: main.h:342
boolean cache_file_contents(const char *filename)
Definition: utils.c:4570
boolean read_file_details(const char *file_name, boolean only_check_for_audio)
Definition: saveplay.c:146
int end
Definition: main.h:569
int lives_getgid(void)
Definition: utils.c:237
uint64_t unique_id
this and the handle can be used to uniquely id a file
Definition: main.h:533
video playback completed
Definition: main.h:450
void do_upgrade_error_dialog(void)
Definition: dialogs.c:2542
boolean do_yesno_dialog(const char *text)
Definition: dialogs.c:452
void activate_url_inner(const char *link)
Definition: utils.c:4177
void d_print_done(void)
Definition: dialogs.c:3002
void load_start_image(int frame)
Definition: main.c:3943
void do_mt_no_jack_error(int warn_mask)
Definition: dialogs.c:2719
boolean pull_frame(weed_plant_t *layer, const char *image_ext, weed_timecode_t tc)
Definition: main.c:5165
void too_many_files(void)
Definition: dialogs.c:2185
boolean do_header_write_error(int clip)
Definition: dialogs.c:3239
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:3418
void do_chdir_failed_error(const char *dir)
Definition: dialogs.c:3285
void do_layout_scrap_file_error(void)
Definition: dialogs.c:2243
void add_to_ascrap_mb(uint64_t bytes)
Definition: saveplay.c:4646
int lives_cp(const char *from, const char *to)
Definition: utils.c:3958
boolean do_set_rename_old_layouts_warning(const char *new_set)
Definition: dialogs.c:2675
lives_clip_type_t
Definition: main.h:481
void fade_background(void)
Definition: gui.c:2983
void play_file(void)
Definition: saveplay.c:2047
void do_after_crash_warning(void)
Definition: dialogs.c:2790
void show_lives(void)
Definition: gui.c:2802
int lives_rmglob(const char *files)
Definition: utils.c:3942
uint16_t red
Definition: main.h:312
boolean do_sub_type_warning(const char *ext, const char *type_ext)
Definition: dialogs.c:3388
void rewrite_recovery_file(void)
Definition: saveplay.c:5699
void do_encoder_acodec_error(void)
Definition: dialogs.c:2237
boolean is_writeable_dir(const char *dir)
Definition: utils.c:5284
void do_vpp_palette_error(void)
Definition: dialogs.c:2774
void backup_file(int clip, int start, int end, const char *filename)
Definition: saveplay.c:3743
boolean has_gconftool_2
Definition: main.h:738
boolean prepare_to_play_foreign(void)
Definition: utils.c:3540
char * get_menu_name(lives_clip_t *sfile)
Definition: gui.c:4160
boolean do_set_duplicate_warning(const char *new_set)
Definition: dialogs.c:2596
double vel
Definition: main.h:361
boolean is_loaded
should we continue loading if we come back to this clip
Definition: main.h:590
LiVESList * lives_list_append_unique(LiVESList *xlist, const char *add)
Definition: utils.c:1424
boolean save_clip_values(int which_file)
Definition: saveplay.c:37
int64_t f_size
Definition: main.h:560
int undo_asampsize
Definition: main.h:650
int lives_chmod(const char *target, const char *mode)
Definition: utils.c:4010
void break_me(void)
Definition: main.c:139
boolean lives_fsync(int fd)
Definition: utils.c:260
void do_quick_switch(int new_file)
Definition: main.c:7491
void get_frames_sizes(int fileno, int frame_to_test)
Definition: utils.c:2387
void do_set_noclips_error(const char *setname)
Definition: dialogs.c:3431
Definition: main.h:394
ulong deduce_file(const char *filename, double start_time, int end)
Definition: saveplay.c:212
Definition: main.h:311
int ncpus
Definition: main.h:776
void response_ok(LiVESButton *button, livespointer user_data)
Definition: dialogs.c:2987
uint64_t op_ds_warn_level
current disk space warning level for any output directory
Definition: main.h:693
void do_memory_error_dialog(void)
Definition: dialogs.c:687
special cancel for TV toy
Definition: main.h:468
void procw_desensitize(void)
Definition: main.c:3823
void do_system_failed_error(const char *com, int retval, const char *addinfo)
Definition: dialogs.c:3011
uint64_t lives_10pow(int pow) GNU_CONST
Definition: utils.c:1274
boolean startup_message_nonfatal_dismissable(const char *msg, int warning_mask)
Definition: main.c:3479
void remove_layout_files(LiVESList *lmap)
Definition: utils.c:2583
int lives_close_buffered(int fd)
Definition: utils.c:592
int lives_open2(const char *pathname, int flags)
Definition: utils.c:155
void set_interactive(boolean interactive)
Definition: gui.c:2862
Definition: main.h:397
boolean changed
Definition: main.h:574
uint16_t blue
Definition: main.h:314
int insert_end
Definition: main.h:571
boolean has_sox_sox
Definition: main.h:723
int lives_alarm_set(int64_t ticks)
Definition: utils.c:1322
int get_approx_ln(uint32_t val) GNU_CONST
Definition: utils.c:1289
boolean can_write_to_home
Definition: main.h:717
lives_cancel_t
cancel reason
Definition: main.h:424
boolean do_mt_rect_prompt(void)
Definition: dialogs.c:2725
boolean open_ascrap_file(void)
Definition: saveplay.c:4693
int achans
Definition: main.h:534
Definition: main.h:417
weed_plant_t * next_event
Definition: main.h:620
boolean is_ready
Definition: main.h:352
float LEFloat_to_BEFloat(float f) GNU_CONST
Definition: utils.c:1432
Definition: main.h:392
boolean check_for_ratio_fps(double fps)
Definition: utils.c:5034
void do_dvgrab_error(void)
Definition: dialogs.c:2763
boolean do_progress_dialog(boolean visible, boolean cancellable, const char *text)
Definition: dialogs.c:1519
void block_expose(void)
Definition: gui.c:3301
boolean get_new_handle(int index, const char *name)
Definition: saveplay.c:3350
LiVESWidget * preview_button
Definition: main.h:348
boolean has_sox_play
Definition: main.h:722
void get_filename(char *filename, boolean strip_dir)
Definition: utils.c:2447
Definition: main.h:852
Definition: main.h:398
LiVESWidget * pause_button
Definition: main.h:347
char * make_image_file_name(lives_clip_t *clip, int frame, const char *img_ext)
Definition: utils.c:2291
cancelled and paused
Definition: main.h:465
void do_jack_noopen_warn2(void)
Definition: dialogs.c:2661
boolean orig_file_name
Definition: main.h:577
boolean save_srt_subtitles(lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename)
Definition: pangotext.c:781
void calc_aframeno(int fileno)
Definition: utils.c:1529
lives_storage_status_t
disk/storage status values
Definition: mainwindow.h:215
void do_start_messages(void)
Definition: main.c:1863
boolean has_identify
Definition: main.h:730
Definition: main.h:493
void do_locked_in_vdevs_error(void)
Definition: dialogs.c:3414
Definition: main.h:494
void sensitize(void)
Definition: main.c:3522
LiVESWidget * label
Definition: main.h:343
boolean has_autolives
Definition: main.h:724
void catch_sigint(int signum)
Definition: main.c:189
Definition: main.h:396
Definition: main.h:865
lives_image_type_t lives_image_type_to_image_type(const char *lives_img_type)
Definition: utils.c:2284
void do_aud_during_play_error(void)
Definition: dialogs.c:682
boolean check_for_recovery_files(boolean auto_recover)
Definition: saveplay.c:5752
boolean get_clip_value(int which, lives_clip_details_t, void *retval, size_t maxlen)
Definition: utils.c:4721
int calc_frame_from_time(int filenum, double time)
nearest frame start
Definition: utils.c:1452
void do_no_in_vdevs_error(void)
Definition: dialogs.c:3410
char * get_upd_msg(int type)
Definition: dialogs.c:3439
int undo_end
Definition: main.h:629
void lives_srandom(unsigned int seed)
Definition: utils.c:97
void create_cfile(void)
Definition: saveplay.c:3256
int byte_order
Definition: main.h:778
void init_track_decoders(void)
Definition: main.c:5437
int undo4_int
Definition: main.h:639
double pointer_time
Definition: main.h:603
void do_mt_no_audchan_error(void)
Definition: dialogs.c:2715
const char * get_image_ext_for_type(lives_image_type_t imgtype)
Definition: utils.c:2267
double fps
Definition: main.h:526
char * lives_format_storage_space_string(uint64_t space)
Definition: utils.c:809
int cb_src
source clip for clipboard
Definition: main.h:704
void do_nojack_rec_error(void)
Definition: dialogs.c:2768
void get_total_time(lives_clip_t *file)
Definition: utils.c:3145
ulong open_file(const char *filename)
Definition: saveplay.c:235
void lives_suspend_resume_process(const char *dirname, boolean suspend)
Definition: utils.c:4083
char * myname_full
Definition: main.h:769
boolean ratio_fps
if the fps was set by a ratio
Definition: main.h:671
application quit
Definition: main.h:438
boolean has_convert
Definition: main.h:728
generator was stopped
Definition: main.h:453
double lives_fix(double val, int decimals) GNU_CONST
Definition: utils.c:1282
void create_LiVES(void)
Definition: gui.c:350
resample/resize and resample audio for encoding
Definition: main.h:401
int undo_start
Definition: main.h:628
int do_info_dialog(const char *text)
Definition: dialogs.c:539
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:2349
Definition: main.h:406
boolean open_scrap_file(void)
Definition: saveplay.c:4651
Definition: main.h:854
boolean check_for_lock_file(const char *set_name, int type)
Definition: utils.c:2118
Definition: main.h:386
int undo3_int
Definition: main.h:638
boolean subtitles_init(lives_clip_t *sfile, char *fname, lives_subtitle_type_t)
Definition: pangotext.c:733
void switch_aud_to_mplayer(boolean set_pref)
Definition: utils.c:3434
short cpu_bits
Definition: main.h:766
uint64_t get_version_hash(const char *exe, const char *sep, int piece)
Definition: utils.c:2510
char * ds_warning_msg(const char *dir, uint64_t dsval, uint64_t cwarn, uint64_t nwarn)
Definition: dialogs.c:662
void do_decoder_palette_error(void)
Definition: dialogs.c:2779
void threaded_dialog_spin(double fraction)
Definition: dialogs.c:2895
int calc_frame_from_time2(int filenum, double time)
nearest frame end
Definition: utils.c:1460
livespointer _lives_realloc(livespointer ptr, size_t new_size)
Definition: effects-weed.c:94
boolean save_file_comments(int fileno)
Definition: saveplay.c:3583
double pb_fps
Definition: main.h:580
ssize_t lives_write(int fd, livesconstpointer buf, size_t count, boolean allow_fail)
#define WARN_UNUSED
Definition: main.h:298
Definition: main.h:853
boolean do_comments_dialog(int fileno, char *filename)
Definition: dialogs.c:2480
char * dummychar
Definition: main.h:1402
void fullscreen_internal(void)
Definition: gui.c:3240
char * myname
Definition: main.h:770
boolean has_python
Definition: main.h:763
Definition: main.h:846
Definition: main.h:866
lives_subtitle_type_t
Definition: pangotext.h:13
LiVESList * lives_list_copy_strings(LiVESList *list)
Definition: utils.c:5395
#define FALSE
Definition: videoplugin.h:56
boolean do_warning_dialog_with_check(const char *text, int warn_mask_number)
Definition: dialogs.c:376
void load_end_image(int frame)
Definition: main.c:4118
Definition: main.h:387
void lives_sync(void)
Definition: utils.c:270
ssize_t lives_read_le_buffered(int fd, void *buf, size_t count, boolean allow_less)
Definition: utils.c:733
boolean do_original_lost_warning(const char *fname)
Definition: dialogs.c:2613
int do_blocking_error_dialog(const char *text)
Definition: dialogs.c:571
int lives_list_strcmp_index(LiVESList *list, livesconstpointer data)
Definition: utils.c:4306
boolean has_jackd
Definition: main.h:734
boolean add_file_info(const char *check_handle, boolean aud_only)
Definition: saveplay.c:3382
double laudio_time
Definition: main.h:601
boolean string_lists_differ(LiVESList *, LiVESList *)
Definition: utils.c:5411
boolean undoable
Definition: main.h:632
Definition: main.h:509
void do_lb_convert_error(void)
Definition: dialogs.c:2742
Definition: main.h:851
int do_error_dialog_with_check(const char *text, int warn_mask_number)
Definition: dialogs.c:557
void d_print_cancelled(void)
Definition: dialogs.c:2992
void zero_spinbuttons(void)
Definition: utils.c:3261
user pressed stop
Definition: main.h:429
int arps
audio sample rate
Definition: main.h:529
boolean opening_loc
Definition: main.h:588
boolean switch_aud_to_jack(void)
Definition: utils.c:3275