4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "bcdisplayinfo.h"
29 #include "edlsession.h"
31 #include "indexable.h"
33 #include "localsession.h"
34 #include "mainsession.h"
35 #include "meterpanel.h"
37 #include "mwindowgui.h"
40 MainSession::MainSession(MWindow *mwindow)
42 this->mwindow = mwindow;
45 // playback_cursor_visible = 0;
46 // is_playing_back = 0;
47 track_highlighted = 0;
48 plugin_highlighted = 0;
49 pluginset_highlighted = 0;
51 current_operation = NO_OPERATION;
52 drag_pluginservers = new ArrayList<PluginServer*>;
54 drag_assets = new ArrayList<Indexable*>;
55 drag_auto_gang = new ArrayList<Auto*>;
56 drag_clips = new ArrayList<EDL*>;
57 drag_edits = new ArrayList<Edit*>;
61 drag_group_position = 0;
62 drag_group_first_track = 0;
69 selected_zwindow = -1;
70 actual_frame_rate = 0;
82 drag_origin_x = drag_origin_y = 0;
83 drag_start_percentage = 0;
84 drag_start_position = 0;
85 cwindow_output_x = cwindow_output_y = 0;
86 batchrender_x = batchrender_y = batchrender_w = batchrender_h = 0;
87 lwindow_x = lwindow_y = lwindow_w = lwindow_h = 0;
88 mwindow_x = mwindow_y = mwindow_w = mwindow_h = 0;
89 vwindow_x = vwindow_y = vwindow_w = vwindow_h = 0;
90 cwindow_x = cwindow_y = cwindow_w = cwindow_h = 0;
91 ctool_x = ctool_y = 0;
92 awindow_x = awindow_y = awindow_w = awindow_h = 0;
93 bwindow_w = bwindow_h = 0;
94 rmonitor_x = rmonitor_y = rmonitor_w = rmonitor_h = 0;
95 rwindow_x = rwindow_y = rwindow_w = rwindow_h = 0;
96 gwindow_x = gwindow_y = 0;
97 cswindow_x = cswindow_y = cswindow_w = cswindow_h = 0;
98 swindow_x = swindow_y = swindow_w = swindow_h = 0;
99 ewindow_w = ewindow_h = 0;
100 channels_x = channels_y = 0;
101 picture_x = picture_y = 0;
102 scope_x = scope_y = scope_w = scope_h = 0;
103 histogram_x = histogram_y = histogram_w = histogram_h = 0;
114 show_vwindow = show_awindow = show_cwindow = show_gwindow = show_lwindow = 0;
115 plugindialog_w = plugindialog_h = 0;
116 // presetdialog_w = presetdialog_h = 0;
117 keyframedialog_w = keyframedialog_h = 0;
118 keyframedialog_column1 = 0;
119 keyframedialog_column2 = 0;
120 keyframedialog_all = 0;
121 menueffect_w = menueffect_h = 0;
122 transitiondialog_w = transitiondialog_h = 0;
125 MainSession::~MainSession()
127 delete drag_pluginservers;
129 delete drag_auto_gang;
133 drag_group->remove_user();
136 void MainSession::boundaries()
138 lwindow_x = MAX(0, lwindow_x);
139 lwindow_y = MAX(0, lwindow_y);
140 mwindow_x = MAX(0, mwindow_x);
141 mwindow_y = MAX(0, mwindow_y);
142 cwindow_x = MAX(0, cwindow_x);
143 cwindow_y = MAX(0, cwindow_y);
144 vwindow_x = MAX(0, vwindow_x);
145 vwindow_y = MAX(0, vwindow_y);
146 awindow_x = MAX(0, awindow_x);
147 awindow_y = MAX(0, awindow_y);
148 gwindow_x = MAX(0, gwindow_x);
149 gwindow_y = MAX(0, gwindow_y);
150 rwindow_x = MAX(0, rwindow_x);
151 rwindow_y = MAX(0, rwindow_y);
152 rmonitor_x = MAX(0, rmonitor_x);
153 rmonitor_y = MAX(0, rmonitor_y);
154 CLAMP(cwindow_controls, 0, 1);
157 void MainSession::save_x11_host(int play_config, const char *x11_host)
159 strcpy(!play_config ? a_x11_host : b_x11_host, x11_host);
162 // set default x11 host, window_config, return screens
163 int MainSession::set_default_x11_host(int win_config)
165 if( win_config < 0 ) win_config = window_config;
166 const char *x11_host = win_config!=1 ? a_x11_host : b_x11_host;
167 BC_DisplayInfo display_info(x11_host,0);
168 int screen = display_info.get_screen();
169 if( screen < 0 && strcmp(a_x11_host, b_x11_host) ) {
170 win_config = win_config==1 ? 0 : 1;
171 x11_host = win_config!=1 ? a_x11_host : b_x11_host;
172 display_info.init_window(x11_host,0);
173 screen = display_info.get_screen();
177 display_info.init_window(x11_host,1);
180 if( display_info.get_screen_count() > 1 )
181 screens = strcmp(a_x11_host, b_x11_host) != 0 ? 2 : 1;
182 window_config = win_config;
183 BC_Window::set_default_x11_host(x11_host);
187 void MainSession::default_window_positions(int window_config)
189 // 0 - all windows on a, playback_config a
190 // 1 - all windows on b, playback_config b
191 // 2 - all windows on a, except composer on b, playback_config b
192 int screens = set_default_x11_host(window_config);
193 mwindow->set_screens(screens);
195 BC_DisplayInfo display_info(BC_Window::get_default_x11_host());
196 // Get defaults based on root window size
199 int root_w = display_info.get_root_w();
200 int root_h = display_info.get_root_h();
202 int border_left = display_info.get_left_border();
203 int border_right = display_info.get_right_border();
204 int border_top = display_info.get_top_border();
205 int border_bottom = display_info.get_bottom_border();
207 int dual_head = screens > 1 ? 1 : 0;
208 int left_w = 0, left_h = 0, right_w = 0;
209 int xin_screens = display_info.get_xinerama_screens();
210 if( xin_screens > 1 ) {
213 for( int s=0; s<xin_screens; ++s ) {
214 if( display_info.xinerama_geometry(s, x, y, w, h) )
217 left_w = w; left_h = h;
222 for( int s=0; s<xin_screens; ++s ) {
223 if( display_info.xinerama_geometry(s, x, y, w, h) )
225 if( !y && x == left_w ) {
231 if( window_config == 1 ) {
241 // Wider than 16:9, narrower than dual head
242 else if( screens < 2 && (float)root_w / root_h > 1.8 ) {
245 case 600: right_w = 800; break;
246 case 720: right_w = 1280; break;
247 case 1024: right_w = 1280; break;
248 case 1200: right_w = 1600; break;
249 case 1080: right_w = 1920; break;
255 if( window_config == 1 ) {
256 root_x = root_w - right_w;
260 // use same aspect ratio to compute left height
262 root_h = (root_w*root_h) / right_w;
269 vwindow_w = root_w / 2 - border_left - border_right;
270 vwindow_h = root_h * 6 / 10 - border_top - border_bottom;
272 int b_root_w = root_w;
273 int b_root_h = root_h;
274 if( !dual_head || window_config != 2 ) {
275 cwindow_x = root_x + root_w / 2;
277 cwindow_w = vwindow_w;
278 cwindow_h = vwindow_h;
281 // Get defaults based on root window size
282 BC_DisplayInfo b_display_info(b_x11_host);
283 b_root_w = b_display_info.get_root_w();
284 b_root_h = b_display_info.get_root_h();
287 cwindow_w = b_root_w-xS(100);
288 cwindow_h = b_root_h-yS(100);
291 ctool_x = cwindow_x + cwindow_w / 2;
292 ctool_y = cwindow_y + cwindow_h / 2;
295 mwindow_y = vwindow_y + vwindow_h + border_top + border_bottom;
296 mwindow_w = root_w * 2 / 3 - border_left - border_right;
297 mwindow_h = root_h - mwindow_y - border_top - border_bottom;
299 awindow_x = mwindow_x + border_left + border_right + mwindow_w;
300 awindow_y = mwindow_y;
301 awindow_w = root_x + root_w - awindow_x - border_left - border_right;
302 awindow_h = mwindow_h;
320 histogram_w = xS(320);
321 histogram_h = yS(480);
334 lwindow_w = MeterPanel::get_meters_width(mwindow->theme,
335 mwindow->edl->session->audio_channels,
341 lwindow_x = root_w - lwindow_w;
342 lwindow_h = mwindow_y;
351 cswindow_w = xS(1280);
352 cswindow_h = yS(600);
354 if( !dual_head || window_config != 2 ) {
355 rmonitor_x = rwindow_x + rwindow_w + xS(10);
356 rmonitor_y = rwindow_y;
357 rmonitor_w = root_x + root_w - rmonitor_x;
358 rmonitor_h = rwindow_h;
361 rmonitor_x = cswindow_x = xS(50);
362 rmonitor_y = cswindow_y = yS(50);
363 rmonitor_w = b_root_w-xS(100);
364 rmonitor_h = b_root_h-yS(100);
365 if( cswindow_w < rmonitor_w ) cswindow_w = rmonitor_w;
366 if( cswindow_h < rmonitor_h ) cswindow_h = rmonitor_h;
374 batchrender_w = xS(750);
375 batchrender_h = yS(400);
376 batchrender_x = root_w / 2 - batchrender_w / 2;
377 batchrender_y = root_h / 2 - batchrender_h / 2;
380 int MainSession::load_defaults(BC_Hash *defaults)
382 // Setup main windows
383 char *a_host = defaults->get("A_X11_HOST", a_x11_host);
384 if( a_host != a_x11_host )
385 strcpy(a_x11_host, defaults->get("A_X11_HOST", a_x11_host));
386 char *b_host = defaults->get("B_X11_HOST", b_x11_host);
387 if( b_host != b_x11_host )
388 strcpy(b_x11_host, defaults->get("B_X11_HOST", b_x11_host));
389 window_config = defaults->get("WINDOW_CONFIG", window_config);
390 default_window_positions(window_config);
392 vwindow_x = defaults->get("VWINDOW_X", vwindow_x);
393 vwindow_y = defaults->get("VWINDOW_Y", vwindow_y);
394 vwindow_w = defaults->get("VWINDOW_W", vwindow_w);
395 vwindow_h = defaults->get("VWINDOW_H", vwindow_h);
398 cwindow_x = defaults->get("CWINDOW_X", cwindow_x);
399 cwindow_y = defaults->get("CWINDOW_Y", cwindow_y);
400 cwindow_w = defaults->get("CWINDOW_W", cwindow_w);
401 cwindow_h = defaults->get("CWINDOW_H", cwindow_h);
403 ctool_x = defaults->get("CTOOL_X", ctool_x);
404 ctool_y = defaults->get("CTOOL_Y", ctool_y);
406 gwindow_x = defaults->get("GWINDOW_X", gwindow_x);
407 gwindow_y = defaults->get("GWINDOW_Y", gwindow_y);
409 mwindow_x = defaults->get("MWINDOW_X", mwindow_x);
410 mwindow_y = defaults->get("MWINDOW_Y", mwindow_y);
411 mwindow_w = defaults->get("MWINDOW_W", mwindow_w);
412 mwindow_h = defaults->get("MWINDOW_H", mwindow_h);
414 lwindow_x = defaults->get("LWINDOW_X", lwindow_x);
415 lwindow_y = defaults->get("LWINDOW_Y", lwindow_y);
416 lwindow_w = defaults->get("LWINDOW_W", lwindow_w);
417 lwindow_h = defaults->get("LWINDOW_H", lwindow_h);
420 awindow_x = defaults->get("AWINDOW_X", awindow_x);
421 awindow_y = defaults->get("AWINDOW_Y", awindow_y);
422 awindow_w = defaults->get("AWINDOW_W", awindow_w);
423 awindow_h = defaults->get("AWINDOW_H", awindow_h);
425 ewindow_w = defaults->get("EWINDOW_W", ewindow_w);
426 ewindow_h = defaults->get("EWINDOW_H", ewindow_h);
428 channels_x = defaults->get("CHANNELS_X", channels_x);
429 channels_y = defaults->get("CHANNELS_Y", channels_y);
430 picture_x = defaults->get("PICTURE_X", picture_x);
431 picture_y = defaults->get("PICTURE_Y", picture_y);
432 scope_x = defaults->get("SCOPE_X", scope_x);
433 scope_y = defaults->get("SCOPE_Y", scope_y);
434 scope_w = defaults->get("SCOPE_W", scope_w);
435 scope_h = defaults->get("SCOPE_H", scope_h);
436 histogram_x = defaults->get("HISTOGRAM_X", histogram_x);
437 histogram_y = defaults->get("HISTOGRAM_Y", histogram_y);
438 histogram_w = defaults->get("HISTOGRAM_W", histogram_w);
439 histogram_h = defaults->get("HISTOGRAM_H", histogram_h);
440 record_scope = defaults->get("RECORD_SCOPE", record_scope);
441 use_hist = defaults->get("USE_HIST", use_hist);
442 use_wave = defaults->get("USE_WAVE", use_wave);
443 use_vector = defaults->get("USE_VECTOR", use_vector);
444 use_hist_parade = defaults->get("USE_HIST_PARADE", use_hist_parade);
445 use_wave_parade = defaults->get("USE_WAVE_PARADE", use_wave_parade);
446 use_wave_gain = defaults->get("USE_WAVE_GAIN", use_wave_gain);
447 use_vect_gain = defaults->get("USE_VECT_GAIN", use_vect_gain);
448 use_smooth = defaults->get("USE_SMOOTH", use_smooth);
449 use_graticule = defaults->get("USE_GRATICULE", use_graticule);
451 //printf("MainSession::load_defaults 1\n");
454 afolders_w = defaults->get("ABINS_W", xS(200));
456 bwindow_w = defaults->get("BWINDOW_W", bwindow_w);
457 bwindow_h = defaults->get("BWINDOW_H", bwindow_h);
459 rwindow_x = defaults->get("RWINDOW_X", rwindow_x);
460 rwindow_y = defaults->get("RWINDOW_Y", rwindow_y);
461 rwindow_w = defaults->get("RWINDOW_W", rwindow_w);
462 rwindow_h = defaults->get("RWINDOW_H", rwindow_h);
464 cswindow_x = defaults->get("CSWINDOW_X", cswindow_x);
465 cswindow_y = defaults->get("CSWINDOW_Y", cswindow_y);
466 cswindow_w = defaults->get("CSWINDOW_W", cswindow_w);
467 cswindow_h = defaults->get("CSWINDOW_H", cswindow_h);
469 swindow_x = defaults->get("SWINDOW_X", swindow_x);
470 swindow_y = defaults->get("SWINDOW_Y", swindow_y);
471 swindow_w = defaults->get("SWINDOW_W", swindow_w);
472 swindow_h = defaults->get("SWINDOW_H", swindow_h);
474 rmonitor_x = defaults->get("RMONITOR_X", rmonitor_x);
475 rmonitor_y = defaults->get("RMONITOR_Y", rmonitor_y);
476 rmonitor_w = defaults->get("RMONITOR_W", rmonitor_w);
477 rmonitor_h = defaults->get("RMONITOR_H", rmonitor_h);
479 batchrender_x = defaults->get("BATCHRENDER_X", batchrender_x);
480 batchrender_y = defaults->get("BATCHRENDER_Y", batchrender_y);
481 batchrender_w = defaults->get("BATCHRENDER_W", batchrender_w);
482 batchrender_h = defaults->get("BATCHRENDER_H", batchrender_h);
484 show_vwindow = defaults->get("SHOW_VWINDOW", 1);
485 show_awindow = defaults->get("SHOW_AWINDOW", 1);
486 show_cwindow = defaults->get("SHOW_CWINDOW", 1);
487 show_lwindow = defaults->get("SHOW_LWINDOW", 0);
488 show_gwindow = defaults->get("SHOW_GWINDOW", 0);
490 cwindow_controls = defaults->get("CWINDOW_CONTROLS", cwindow_controls);
492 plugindialog_w = defaults->get("PLUGINDIALOG_W", xS(510));
493 plugindialog_h = defaults->get("PLUGINDIALOG_H", yS(415));
494 // presetdialog_w = defaults->get("PRESETDIALOG_W", xS(510));
495 // presetdialog_h = defaults->get("PRESETDIALOG_H", yS(415));
496 keyframedialog_w = defaults->get("KEYFRAMEDIALOG_W", xS(320));
497 keyframedialog_h = defaults->get("KEYFRAMEDIALOG_H", yS(415));
498 keyframedialog_column1 = defaults->get("KEYFRAMEDIALOG_COLUMN1", xS(150));
499 keyframedialog_column2 = defaults->get("KEYFRAMEDIALOG_COLUMN2", xS(100));
500 keyframedialog_all = defaults->get("KEYFRAMEDIALOG_ALL", 0);
501 menueffect_w = defaults->get("MENUEFFECT_W", xS(580));
502 menueffect_h = defaults->get("MENUEFFECT_H", yS(350));
503 transitiondialog_w = defaults->get("TRANSITIONDIALOG_W", xS(320));
504 transitiondialog_h = defaults->get("TRANSITIONDIALOG_H", yS(512));
506 current_tip = defaults->get("CURRENT_TIP", current_tip);
507 actual_frame_rate = defaults->get("ACTUAL_FRAME_RATE", (float)-1);
508 title_bar_alpha = defaults->get("TITLE_BAR_ALPHA", (float)1);
514 int MainSession::save_defaults(BC_Hash *defaults)
516 defaults->update("A_X11_HOST", a_x11_host);
517 defaults->update("B_X11_HOST", b_x11_host);
518 defaults->update("WINDOW_CONFIG", window_config);
520 defaults->update("MWINDOW_X", mwindow_x);
521 defaults->update("MWINDOW_Y", mwindow_y);
522 defaults->update("MWINDOW_W", mwindow_w);
523 defaults->update("MWINDOW_H", mwindow_h);
525 defaults->update("LWINDOW_X", lwindow_x);
526 defaults->update("LWINDOW_Y", lwindow_y);
527 defaults->update("LWINDOW_W", lwindow_w);
528 defaults->update("LWINDOW_H", lwindow_h);
530 defaults->update("VWINDOW_X", vwindow_x);
531 defaults->update("VWINDOW_Y", vwindow_y);
532 defaults->update("VWINDOW_W", vwindow_w);
533 defaults->update("VWINDOW_H", vwindow_h);
535 defaults->update("CWINDOW_X", cwindow_x);
536 defaults->update("CWINDOW_Y", cwindow_y);
537 defaults->update("CWINDOW_W", cwindow_w);
538 defaults->update("CWINDOW_H", cwindow_h);
540 defaults->update("CTOOL_X", ctool_x);
541 defaults->update("CTOOL_Y", ctool_y);
543 defaults->update("GWINDOW_X", gwindow_x);
544 defaults->update("GWINDOW_Y", gwindow_y);
546 defaults->update("AWINDOW_X", awindow_x);
547 defaults->update("AWINDOW_Y", awindow_y);
548 defaults->update("AWINDOW_W", awindow_w);
549 defaults->update("AWINDOW_H", awindow_h);
551 defaults->update("BWINDOW_W", bwindow_w);
552 defaults->update("BWINDOW_H", bwindow_h);
554 defaults->update("EWINDOW_W", ewindow_w);
555 defaults->update("EWINDOW_H", ewindow_h);
557 defaults->update("CHANNELS_X", channels_x);
558 defaults->update("CHANNELS_Y", channels_y);
559 defaults->update("PICTURE_X", picture_x);
560 defaults->update("PICTURE_Y", picture_y);
561 defaults->update("SCOPE_X", scope_x);
562 defaults->update("SCOPE_Y", scope_y);
563 defaults->update("SCOPE_W", scope_w);
564 defaults->update("SCOPE_H", scope_h);
565 defaults->update("HISTOGRAM_X", histogram_x);
566 defaults->update("HISTOGRAM_Y", histogram_y);
567 defaults->update("HISTOGRAM_W", histogram_w);
568 defaults->update("HISTOGRAM_H", histogram_h);
569 defaults->update("RECORD_SCOPE", record_scope);
570 defaults->update("USE_HIST", use_hist);
571 defaults->update("USE_WAVE", use_wave);
572 defaults->update("USE_VECTOR", use_vector);
573 defaults->update("USE_HIST_PARADE", use_hist_parade);
574 defaults->update("USE_WAVE_PARADE", use_wave_parade);
575 defaults->update("USE_WAVE_GAIN", use_wave_gain);
576 defaults->update("USE_VECT_GAIN", use_vect_gain);
577 defaults->update("USE_SMOOTH", use_smooth);
578 defaults->update("USE_GRATICULE", use_graticule);
580 defaults->update("ABINS_W", afolders_w);
582 defaults->update("RMONITOR_X", rmonitor_x);
583 defaults->update("RMONITOR_Y", rmonitor_y);
584 defaults->update("RMONITOR_W", rmonitor_w);
585 defaults->update("RMONITOR_H", rmonitor_h);
587 defaults->update("RWINDOW_X", rwindow_x);
588 defaults->update("RWINDOW_Y", rwindow_y);
589 defaults->update("RWINDOW_W", rwindow_w);
590 defaults->update("RWINDOW_H", rwindow_h);
592 defaults->update("CSWINDOW_X", cswindow_x);
593 defaults->update("CSWINDOW_Y", cswindow_y);
594 defaults->update("CSWINDOW_W", cswindow_w);
595 defaults->update("CSWINDOW_H", cswindow_h);
597 defaults->update("SWINDOW_X", swindow_x);
598 defaults->update("SWINDOW_Y", swindow_y);
599 defaults->update("SWINDOW_W", swindow_w);
600 defaults->update("SWINDOW_H", swindow_h);
602 defaults->update("BATCHRENDER_X", batchrender_x);
603 defaults->update("BATCHRENDER_Y", batchrender_y);
604 defaults->update("BATCHRENDER_W", batchrender_w);
605 defaults->update("BATCHRENDER_H", batchrender_h);
607 defaults->update("SHOW_VWINDOW", show_vwindow);
608 defaults->update("SHOW_AWINDOW", show_awindow);
609 defaults->update("SHOW_CWINDOW", show_cwindow);
610 defaults->update("SHOW_LWINDOW", show_lwindow);
611 defaults->update("SHOW_GWINDOW", show_gwindow);
613 defaults->update("CWINDOW_CONTROLS", cwindow_controls);
615 defaults->update("PLUGINDIALOG_W", plugindialog_w);
616 defaults->update("PLUGINDIALOG_H", plugindialog_h);
617 // defaults->update("PRESETDIALOG_W", presetdialog_w);
618 // defaults->update("PRESETDIALOG_H", presetdialog_h);
619 defaults->update("KEYFRAMEDIALOG_W", keyframedialog_w);
620 defaults->update("KEYFRAMEDIALOG_H", keyframedialog_h);
621 defaults->update("KEYFRAMEDIALOG_COLUMN1", keyframedialog_column1);
622 defaults->update("KEYFRAMEDIALOG_COLUMN2", keyframedialog_column2);
623 defaults->update("KEYFRAMEDIALOG_ALL", keyframedialog_all);
625 defaults->update("MENUEFFECT_W", menueffect_w);
626 defaults->update("MENUEFFECT_H", menueffect_h);
628 defaults->update("TRANSITIONDIALOG_W", transitiondialog_w);
629 defaults->update("TRANSITIONDIALOG_H", transitiondialog_h);
631 defaults->update("ACTUAL_FRAME_RATE", actual_frame_rate);
632 defaults->update("TITLE_BAR_ALPHA", title_bar_alpha);
633 defaults->update("CURRENT_TIP", current_tip);
639 Track *MainSession::drag_handle_track()
642 switch( current_operation ) {
643 case DRAG_EDITHANDLE1:
644 case DRAG_EDITHANDLE2:
645 track = drag_edit->edits->track;
647 case DRAG_PLUGINHANDLE1:
648 case DRAG_PLUGINHANDLE2:
649 track = drag_plugin->edits->track;
655 void MainSession::update_clip_number()
658 for( int i=mwindow->edl->clips.size(); --i>=0; ) {
659 EDL *clip_edl = mwindow->edl->clips[i];
661 if( sscanf(clip_edl->local_session->clip_title,_("Clip %d"),&no) == 1 )
662 if( no > clip_no ) clip_no = no;
664 clip_number = clip_no+1;
667 int MainSession::load_file(const char *path)
670 FILE *fp = fopen(path,"r");
673 defaults.load_file(fp);
674 load_defaults(&defaults);
681 int MainSession::save_file(const char *path)
684 FILE *fp = fopen(path,"w");
687 save_defaults(&defaults);
688 defaults.save_file(fp);