atomes 1.3.1
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
w_encode.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2026 by CNRS and University of Strasbourg */
15
21
22/*
23* This file: 'w_encode.c'
24*
25* Contains:
26*
27
28 - The functions to create the encoding (image/video) window
29
30*
31* List of functions:
32
33 image * clean_image (project * to_clean, image * to_cli);
34
35 void clean_animation (glwin * view);
36 void set_encoding_widget_sensitivity (gboolean video, int sensitivity);
37 void window_encode (glwin * view, gboolean video);
38
39 G_MODULE_EXPORT void set_video_frames (GtkEntry * res, gpointer data);
40 G_MODULE_EXPORT void set_video_extra_frames (GtkEntry * res, gpointer data);
41 G_MODULE_EXPORT void set_video_res (GtkEntry * res, gpointer data);
42 G_MODULE_EXPORT void set_video_codec (GtkComboBox *ComboBoxGtk);
43 G_MODULE_EXPORT void set_video_opengl_spin (GtkSpinButton * res, gpointer data);
44 G_MODULE_EXPORT void set_video_bitrate (GtkEntry * res, gpointer data);
45 G_MODULE_EXPORT void set_image_format (GtkComboBox * box, gpointer data);
46 G_MODULE_EXPORT void run_window_encode (GtkDialog * win ,gint response_id, gpointer data);
47
48*/
49
50#include "global.h"
51#include "interface.h"
52#include "glview.h"
53#include "movie.h"
54
55int video_res[2];
61
62extern char * codec_name[VIDEO_CODECS];
63extern char * image_name[IMAGE_FORMATS];
64extern gboolean spin (gpointer data);
65
74G_MODULE_EXPORT void set_video_frames (GtkEntry * res, gpointer data)
75{
76 const gchar * n;
77 int frs;
78 n = entry_get_text (res);
79 frs = string_to_double ((gpointer)n);
80 if (frs > 0)
81 {
82 framesec = frs;
83 }
85}
86
95G_MODULE_EXPORT void set_video_extra_frames (GtkEntry * res, gpointer data)
96{
97 const gchar * n;
98 int exf;
99 n = entry_get_text (res);
100 exf = string_to_double ((gpointer)n);
101 if (exf >= 0)
102 {
103 extraframes = exf;
104 }
106}
107
116G_MODULE_EXPORT void set_video_res (GtkEntry * res, gpointer data)
117{
118 const gchar * n;
119 int vres;
120 int id = GPOINTER_TO_INT(data);
121 n = entry_get_text (res);
122 vres = string_to_double ((gpointer)n);
123 if (vres > 0)
124 {
125 video_res[id] = vres;
126 }
128}
129
137G_MODULE_EXPORT void set_video_codec (GtkComboBox *ComboBoxGtk)
138{
139 codec = combo_get_active ((GtkWidget *)ComboBoxGtk);
140}
141
150G_MODULE_EXPORT void set_video_opengl_spin (GtkSpinButton * res, gpointer data)
151{
152 qual = gtk_spin_button_get_value_as_int(res);
153 if (qual == 0 || (qual > 1 && qual <= 1000))
154 {
156 }
157 update_entry_int (GTK_ENTRY(res), oglquality);
158}
159
168G_MODULE_EXPORT void set_video_bitrate (GtkEntry * res, gpointer data)
169{
170 const gchar * n;
171 int bit;
172 n = entry_get_text (res);
173 bit = string_to_double ((gpointer)n);
174 if (bit > 0)
175 {
176 bitrate = bit;
177 }
179}
180
189image * clean_image (project * to_clean, image * to_cli)
190{
191 int i, j;
192
193 if (to_cli -> l_ghtning.spot)
194 {
195 for (i=0; i<to_cli -> l_ghtning.lights; i++)
196 {
197 g_free (to_cli -> l_ghtning.spot[i]);
198 }
199 g_free (to_cli -> l_ghtning.spot);
200 }
201 if (to_cli -> xyz)
202 {
203 for (i=0; i<3; i++)
204 {
205 if (to_cli -> xyz -> title[i]) g_free (to_cli -> xyz -> title[i]);
206 }
207 g_free (to_cli -> xyz);
208 to_cli -> xyz = NULL;
209 }
210 if (to_cli -> abc)
211 {
212 g_free (to_cli -> abc);
213 to_cli -> abc = NULL;
214 }
215 for (i=0; i<2; i++)
216 {
217 if (to_cli -> show_atom[i])
218 {
219 g_free (to_cli -> show_atom[i]);
220 to_cli -> show_atom[i] = NULL;
221 }
222 if (to_cli -> show_label[i])
223 {
224 g_free (to_cli -> show_label[i]);
225 to_cli -> show_label[i] = NULL;
226 }
227 }
228 for (i=0; i<9; i++)
229 {
230 if (to_cli -> show_poly[i])
231 {
232 g_free (to_cli -> show_poly[i]);
233 to_cli -> show_poly[i] = NULL;
234 }
235 }
236 for (i=0; i<10; i++)
237 {
238 if (to_cli -> show_coord[i])
239 {
240 g_free (to_cli -> show_coord[i]);
241 to_cli -> show_coord[i] = NULL;
242 }
243 if (to_cli -> spcolor[i])
244 {
245 for (j=0; j<((i < 2) ? to_clean -> nspec : 1); j++)
246 {
247 if (to_cli -> spcolor[i][j])
248 {
249 g_free (to_cli -> spcolor[i][j]);
250 to_cli -> spcolor[i][j] = NULL;
251 }
252 }
253 g_free (to_cli -> spcolor[i]);
254 to_cli -> spcolor[i] = NULL;
255 }
256 }
257 if (to_cli -> at_color)
258 {
259 g_free (to_cli -> at_color);
260 to_cli -> at_color = NULL;
261 }
262 if (to_cli -> sphererad)
263 {
264 g_free (to_cli -> sphererad);
265 to_cli -> sphererad =NULL;
266 }
267 if (to_cli -> pointrad)
268 {
269 g_free (to_cli -> pointrad);
270 to_cli -> pointrad = NULL;
271 }
272 if (to_cli -> atomicrad)
273 {
274 g_free (to_cli -> atomicrad);
275 to_cli -> atomicrad = NULL;
276 }
277 for (i=0; i<2; i++)
278 {
279 for (j=0; j<FILLED_STYLES; j++)
280 {
281 if (to_cli -> fm_show_vol[i][j])
282 {
283 g_free (to_cli -> fm_show_vol[i][j]);
284 }
285 if (to_cli -> fm_vol_col[i][j])
286 {
287 g_free (to_cli -> fm_vol_col[i][j]);
288 }
289 }
290 }
291 for (i=0; i<5; i++)
292 {
293 if (to_cli -> i_rings[i] != NULL)
294 {
295 for (j=0; j<to_cli -> i_rings[i][0][0]; j++)
296 {
297 if (to_cli -> i_rings[i][j])
298 {
299 g_free (to_cli -> i_rings[i][j]);
300 to_cli -> i_rings[i][j] = NULL;
301 }
302 }
303 g_free (to_cli -> i_rings[i]);
304 to_cli -> i_rings[i] = NULL;
305 }
306 }
307 if (to_cli -> at_data)
308 {
309 g_free (to_cli -> at_data);
310 to_cli -> at_data = NULL;
311 }
312 g_free (to_cli);
313 return NULL;
314}
315
325{
326 int i;
327 snapshot * shot = view -> anim -> first;
328 shot = view -> anim -> first;
329 for (i=0; i < view -> anim -> frames-1; i++)
330 {
331 shot -> img = clean_image (proj, shot -> img);
332 shot = shot -> next;
333 g_free (shot -> prev);
334 }
335 view -> anim -> first = view -> anim -> last = shot;
336 view -> anim -> frames = 0;
337}
338
339GtkWidget * resf;
340GtkWidget * rese;
341GtkWidget * resb;
342GtkWidget * res[2];
343GtkWidget * cod;
344
353void set_encoding_widget_sensitivity (gboolean video, int sensitivity)
354{
355 if (video)
356 {
357 widget_set_sensitive (resf, sensitivity);
358 widget_set_sensitive (rese, sensitivity);
359 widget_set_sensitive (resb, sensitivity);
360 }
361 widget_set_sensitive (res[0], sensitivity);
362 widget_set_sensitive (res[1], sensitivity);
363 widget_set_sensitive (cod, sensitivity);
364}
365
366GtkWidget * form;
367
376G_MODULE_EXPORT void set_image_format (GtkComboBox * box, gpointer data)
377{
378 codec = combo_get_active ((GtkWidget *)box);
379 switch (codec)
380 {
381 case 0:
382 gtk_image_set_from_file (GTK_IMAGE(form), PACKAGE_PNG);
383 break;
384 case 1:
385 gtk_image_set_from_file (GTK_IMAGE(form), PACKAGE_JPG);
386 break;
387 case 2:
388 gtk_image_set_from_file (GTK_IMAGE(form), PACKAGE_TIFF);
389 break;
390 case 3:
391 gtk_image_set_from_file (GTK_IMAGE(form), PACKAGE_BMP);
392 break;
393 }
394}
395
396GtkWidget * encoding_pb;
398
408G_MODULE_EXPORT void run_window_encode (GtkDialog * win , gint response_id, gpointer data)
409{
410 glwin * view = (glwin *)data;
411 if (response_id == GTK_RESPONSE_APPLY)
412 {
414 video_options * vopts = g_malloc0(sizeof*vopts);
415 vopts -> proj = view -> proj;
416 vopts -> oglquality = oglquality;
417 vopts -> video_res = duplicate_int (2, video_res);
418 vopts -> codec = codec;
419 if (encode_video)
420 {
421 vopts -> framesec = framesec;
422 vopts -> extraframes = extraframes;
423 vopts -> bitrate = bitrate;
424 save_movie (view, vopts);
425 gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(encoding_pb), 0.0);
426 }
427 else
428 {
429 render_image (view, vopts);
430 }
431 g_free (vopts -> video_res);
432 g_free (vopts);
434 }
435 else
436 {
438 }
439}
440
449void window_encode (glwin * view, gboolean video)
450{
451 gchar * str;
452 int i;
453 if (video)
454 {
455 str = g_strdup_printf (_("%s - movie encoding"), prepare_for_title(get_project_by_id(view -> proj) -> name));
456 }
457 else
458 {
459 str = g_strdup_printf (_("%s - image rendering"), prepare_for_title(get_project_by_id(view -> proj) -> name));
460 }
461 GtkWidget * win = dialog_cancel_apply (str, view -> win, FALSE);
462 g_free (str);
463 GtkWidget * vbox = dialog_get_content_area (win);
464 GtkWidget * hbox;
465 if (video)
466 {
467 gtk_widget_set_size_request (vbox, -1, 420);
468 // Frames
469 hbox = create_hbox (0);
470 gtk_widget_set_size_request (hbox, 300, -1);
471 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 10);
472 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(_("Frames recorded:"), 350, -1, 0.0, 0.5), FALSE, FALSE, 0);
473 str = g_strdup_printf ("<b>%d</b>", view -> anim -> frames);
474 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(str, -1, -1, 0.0, 0.5), FALSE, FALSE, 0);
475 g_free (str);
476
477 // Frames per second
478 hbox = create_hbox (0);
479 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 0);
480 gtk_widget_set_size_request (hbox, 300, -1);
481 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(_("Frames per seconds:"), 350, -1, 0.0, 0.5), FALSE, FALSE, 0);
482 resf = create_entry (G_CALLBACK(set_video_frames), 100, 10, FALSE, NULL);
483 framesec = 24;
484 update_entry_int (GTK_ENTRY(resf), framesec);
485 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, resf, FALSE, FALSE, 0);
486
487 // Extra frames
488 hbox = create_hbox (0);
489 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 10);
490 gtk_widget_set_size_request (hbox, 300, -1);
491 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(_("Extra frames every (frames):"), 350, -1, 0.0, 0.5), FALSE, FALSE, 0);
492 rese = create_entry (G_CALLBACK(set_video_extra_frames), 100, 10, FALSE, NULL);
493 extraframes = 10;
494 update_entry_int (GTK_ENTRY(rese), extraframes);
495 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, rese, FALSE, FALSE, 0);
496 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, markup_label(_("Movie resolution (in pixels):"), -1, -1, 0.0, 0.5), FALSE, FALSE, 0);
497 }
498 else
499 {
500 gtk_widget_set_size_request (vbox, -1, 230);
501 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, markup_label(_("Image resolution (in pixels):"), -1, -1, 0.0, 0.5), FALSE, FALSE, 10);
502 }
503 hbox = create_hbox (0);
504 gtk_widget_set_size_request (hbox, 300, -1);
505 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, (video) ? 10 : 0);
506 gchar * ax[2]={"x: ", "y: "};
507 for (i=0; i<2; i++)
508 {
509 video_res[i] = view -> pixels[i];
510 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(ax[i], 100, -1, 0.5, 0.5), FALSE, FALSE, 0);
511 res[i] = create_entry (G_CALLBACK(set_video_res), 100, 10, FALSE, (gpointer)GINT_TO_POINTER(i));
512 update_entry_int (GTK_ENTRY(res[i]), video_res[i]);
513 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, res[i], FALSE, FALSE, 0);
514 }
515
516 cod = create_combo ();
517 hbox = create_hbox (0);
518 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, video ? 0 : 10);
519 gtk_widget_set_size_request (hbox, 300, -1);
520 if (video)
521 {
522 // Codec
523 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(_("Video codec:"), 300, -1, 0.0, 0.5), FALSE, FALSE, 0);
524 for (i=0; i<VIDEO_CODECS; i++) combo_text_append (cod, codec_name[i]);
525 g_signal_connect (G_OBJECT(cod), "changed", G_CALLBACK(set_video_codec), NULL);
526 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, cod, FALSE, FALSE, 0);
527 }
528 else
529 {
530 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(_("Image format:"), 150, -1, 0.0, 0.5), FALSE, FALSE, 0);
531 GtkWidget * fixed = gtk_fixed_new ();
532 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, fixed, TRUE, TRUE, 0);
533 for (i=0; i<IMAGE_FORMATS; i++) combo_text_append (cod, image_name[i]);
534 gtk_fixed_put (GTK_FIXED(fixed), cod, -1, 10);
535 g_signal_connect (G_OBJECT(cod), "changed", G_CALLBACK(set_image_format), NULL);
536 form = gtk_image_new ();
537 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, form, TRUE, TRUE, 0);
538 }
539 codec = 0;
541
542 if (! video) set_image_format (GTK_COMBO_BOX(cod), NULL);
543
544 if (video)
545 {
546 // Overall video Quality
547 hbox = create_hbox (0);
548 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 10);
549 gtk_widget_set_size_request (hbox, 300, -1);
550 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(_("Video quality (bitrate in kb/s):"), 350, -1, 0.0, 0.5), FALSE, FALSE, 0);
551 resb = create_entry (G_CALLBACK(set_video_bitrate), 100, 10, FALSE, NULL);
552 bitrate = 5000;
553 update_entry_int (GTK_ENTRY(resb), bitrate);
554 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, resb, FALSE, FALSE, 0);
555 }
556 // Overall OpenGL Quality
557 hbox = create_hbox (0);
558 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 0);
559 gtk_widget_set_size_request (hbox, 300, -1);
560 if (! view -> anim -> last -> img -> ray_tracing)
561 {
562 if (video)
563 {
564 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(_("OpenGL quality [0-1000] (0= recorded quality):"), -1, -1, 0.0, 0.5), FALSE, FALSE, 0);
565 }
566 else
567 {
568 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(_("OpenGL quality [0-1000] (0= on-screen quality):"), -1, -1, 0.0, 0.5), FALSE, FALSE, 0);
569 }
570 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, spin_button (G_CALLBACK(set_video_opengl_spin), 0, 0, 1000, 1, 0, 100, NULL), FALSE, FALSE, 20);
571 }
572 oglquality = 0;
573 if (video)
574 {
575 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, markup_label(_("Progress: "), -1, -1, 0.0, 0.5), FALSE, FALSE, 10);
576 encoding_pb = gtk_progress_bar_new ();
577 gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(encoding_pb), 0.0);
578 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, encoding_pb, FALSE, FALSE, 0);
579 }
580 show_the_widgets (win);
581
582 if (view -> spin[0] || view -> spin[1])
583 {
584 for (i=0; i<2; i++)
585 {
586 view -> spin[i+2] = view -> spin[i];
587 view -> spin_speed[i+2] = view -> spin_speed[i];
588 view -> spin[i] = FALSE;
589 }
590 }
591 gboolean old_play, old_stop;
592 old_play = view -> play;
593 old_stop = view -> stop;
594 view -> play = FALSE;
595 view -> stop = TRUE;
596 encode_video = video;
597 run_this_gtk_dialog (win, G_CALLBACK(run_window_encode), view);
598 clean_animation (get_project_by_id(view -> proj), view);
599 update (view);
600 if (view -> spin[2] || view -> spin[3])
601 {
602 for (i=0; i<2; i++)
603 {
604 view -> spin[i] = view -> spin[i+2];
605 view -> spin_speed[i] = view -> spin_speed[i+2];
606 g_timeout_add (REFRESH, (GSourceFunc) spin, & view -> colorp[0][i]);
607 view -> spin[i+2] = FALSE;
608 view -> spin_speed[i+2] = 0;
609 }
610 }
611 view -> play = old_play;
612 view -> stop = old_stop;
613}
color colorp[64]
double ax
Definition curve.c:71
int * duplicate_int(int num, int *old_val)
copy a list of int
Definition global.c:547
gchar * PACKAGE_BMP
Definition global.c:98
gchar * PACKAGE_TIFF
Definition global.c:99
double string_to_double(gpointer string)
convert string to double
Definition global.c:611
gchar * PACKAGE_JPG
Definition global.c:97
gchar * PACKAGE_PNG
Definition global.c:96
Global variable declarations Global convenience function declarations Global data structure defin...
GtkWidget * dialog_cancel_apply(gchar *title, GtkWidget *parent, gboolean resiz)
create a dialog modal offering a choice to apply something or not
Definition gtk-misc.c:616
void run_this_gtk_dialog(GtkWidget *dial, GCallback handler, gpointer data)
run a GTK (3 and 4) basic GtkDialog
Definition gtk-misc.c:533
int combo_get_active(GtkWidget *combo)
retrieve the active item's position
Definition gtk-misc.c:935
GtkWidget * create_entry(GCallback handler, int dim, int cdim, gboolean key_release, gpointer data)
Create a GtkEntry.
Definition gtk-misc.c:1401
project * proj
void combo_set_active(GtkWidget *combo, int pos)
set the active item's position
Definition gtk-misc.c:958
const gchar * entry_get_text(GtkEntry *entry)
get the text in a GtkEntry
Definition gtk-misc.c:652
void update_entry_int(GtkEntry *entry, int intval)
update the content of a GtkEntry as int
Definition gtk-misc.c:669
GtkWidget * spin_button(GCallback handler, double value, double start, double end, double step, int digits, int dim, gpointer data)
create a spin button
Definition gtk-misc.c:1877
GtkWidget * create_combo()
create a GtkCombox widget, note deprecated in GTK4
Definition gtk-misc.c:1010
GtkWidget * dialog_get_content_area(GtkWidget *widg)
prepare GtkWidget to insert content in a GtkDialog window
Definition gtk-misc.c:861
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
create a GtkLabel with pango markup
Definition gtk-misc.c:1672
void add_box_child_start(int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the initial position.
Definition gtk-misc.c:340
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:247
void destroy_this_dialog(GtkDialog *dialog)
destroy a GtkDialog
Definition gtk-misc.c:2235
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
Definition gtk-misc.c:849
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
Definition gtk-misc.c:987
gchar * prepare_for_title(gchar *init)
prepare a string for a window title, getting rid of all markup
Definition tools.c:71
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Definition gtk-misc.c:202
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
void update(glwin *view)
update the rendering of the OpenGL window
Definition glview.c:461
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
#define REFRESH
Refresh time for spinning the OpenGL window in milliseconds.
Definition glview.h:139
int qual
Definition ogl_draw.c:73
#define FILLED_STYLES
Definition glwin.h:106
gboolean spin(gpointer data)
spin
Definition w_spiner.c:56
void render_image(glwin *view, video_options *iopts)
render an image from the OpenGL window - prepare the dialog
Definition image.c:200
char * image_name[IMAGE_FORMATS]
Definition image.c:63
Messaging function declarations.
void save_movie(glwin *view, video_options *vopts)
saving a movie - prepare the dialog
Definition movie.c:1298
char * codec_name[VIDEO_CODECS]
Definition movie.c:90
GtkWidget * encoding_pb
Definition w_encode.c:396
Data structure declarations for movie encoding Function declarations for movie encoding.
#define VIDEO_CODECS
Definition movie.h:36
#define IMAGE_FORMATS
Definition movie.h:37
Definition glwin.h:350
Definition glwin.h:967
Definition glwin.h:364
GtkWidget * form
Definition w_encode.c:366
void set_encoding_widget_sensitivity(gboolean video, int sensitivity)
Adjust the sensitivity for the widgets of the encoding window.
Definition w_encode.c:353
void window_encode(glwin *view, gboolean video)
encoding a movie - creating the dialog
Definition w_encode.c:449
int oglquality
Definition w_encode.c:59
G_MODULE_EXPORT void set_video_codec(GtkComboBox *ComboBoxGtk)
change video codec
Definition w_encode.c:137
GtkWidget * cod
Definition w_encode.c:343
GtkWidget * res[2]
Definition w_encode.c:342
G_MODULE_EXPORT void set_video_bitrate(GtkEntry *res, gpointer data)
set video bitrate entry callback
Definition w_encode.c:168
image * clean_image(project *to_clean, image *to_cli)
free all memory related to an image data structure
Definition w_encode.c:189
G_MODULE_EXPORT void run_window_encode(GtkDialog *win, gint response_id, gpointer data)
encoding a movie - running the dialog
Definition w_encode.c:408
int codec
Definition w_encode.c:58
int extraframes
Definition w_encode.c:57
int video_res[2]
Definition w_encode.c:55
G_MODULE_EXPORT void set_video_frames(GtkEntry *res, gpointer data)
set number of frames
Definition w_encode.c:74
GtkWidget * rese
Definition w_encode.c:340
gboolean spin(gpointer data)
spin
Definition w_spiner.c:56
int bitrate
Definition w_encode.c:60
G_MODULE_EXPORT void set_video_extra_frames(GtkEntry *res, gpointer data)
set video extra frames
Definition w_encode.c:95
gboolean encode_video
Definition w_encode.c:397
G_MODULE_EXPORT void set_video_opengl_spin(GtkSpinButton *res, gpointer data)
set encoding OpenGL quality callback - spin
Definition w_encode.c:150
G_MODULE_EXPORT void set_video_res(GtkEntry *res, gpointer data)
set video / image resolution
Definition w_encode.c:116
G_MODULE_EXPORT void set_image_format(GtkComboBox *box, gpointer data)
selecting the image format
Definition w_encode.c:376
int framesec
Definition w_encode.c:56
GtkWidget * resb
Definition w_encode.c:341
void clean_animation(project *proj, glwin *view)
clean saved animation data
Definition w_encode.c:324
GtkWidget * resf
Definition w_encode.c:339
GtkWidget * hbox
Definition workspace.c:71
GtkWidget * img
Definition workspace.c:70
GtkWidget * vbox
Definition workspace.c:72