#define WIDTH xS(400)
-#define HEIGHT yS(320)
+#define HEIGHT yS(360)
#define MAX_SCALE 16
ConvertRender::ConvertRender(MWindow *mwindow)
failed = 0; canceled = 0;
result = 0;
beep = 0;
+ to_proxy = 0;
}
ConvertRender::~ConvertRender()
void ConvertRender::to_convert_path(char *new_path, Indexable *idxbl)
{
- strcpy(new_path, idxbl->path);
+ if( to_proxy ) {
+ char *bp = idxbl->path, *cp = strrchr(bp, '/');
+ if( cp ) bp = cp+1;
+ char filename[BCTEXTLEN], proxy_path[BCTEXTLEN];
+ strcpy(filename, bp);
+ File::getenv_path(proxy_path, mwindow->preferences->nested_proxy_path);
+ sprintf(new_path, "%s/%s", proxy_path, filename);
+ }
+ else
+ strcpy(new_path, idxbl->path);
int n = strlen(suffix);
char *ep = new_path + strlen(new_path);
char *sfx = strrchr(new_path, '.');
return count;
}
-void ConvertRender::set_format(Asset *asset, const char *suffix)
+void ConvertRender::set_format(Asset *asset, const char *suffix, int to_proxy)
{
delete [] this->suffix;
this->suffix = cstrdup(suffix);
if( !format_asset )
format_asset = new Asset();
format_asset->copy_from(asset, 0);
+ this->to_proxy = to_proxy;
}
void ConvertRender::start_convert(float beep, int remove_originals)
add_subwindow(remove_originals = new ConvertRemoveOriginals(this, x, y));
x = lmargin;
y += remove_originals->get_h() + margin;
+ add_subwindow(to_proxy_path = new ConvertToProxyPath(this, x, y));
+ y += to_proxy_path->get_h() + margin;
add_subwindow(beep_on_done = new ConvertBeepOnDone(this, x, y));
x += beep_on_done->get_w() + margin + xS(10);
asset->audio_data = 1;
remove_originals = 1;
beep = 0;
+ to_proxy = 0;
}
ConvertDialog::~ConvertDialog()
asset->load_defaults(mwindow->defaults, "CONVERT_", 1, 1, 0, 1, 0);
remove_originals = mwindow->defaults->get("CONVERT_REMOVE_ORIGINALS", remove_originals);
beep = mwindow->defaults->get("CONVERT_BEEP", beep);
+ to_proxy = mwindow->defaults->get("CONVERT_TO_PROXY", to_proxy);
mwindow->defaults->get("CONVERT_SUFFIX", suffix);
mwindow->gui->lock_window("ConvertDialog::new_gui");
int cx, cy;
mwindow->defaults->update("CONVERT_SUFFIX", suffix);
mwindow->defaults->update("CONVERT_REMOVE_ORIGINALS", remove_originals);
mwindow->defaults->update("CONVERT_BEEP", beep);
+ mwindow->defaults->update("CONVERT_TO_PROXY", to_proxy);
asset->save_defaults(mwindow->defaults, "CONVERT_", 1, 1, 0, 1, 0);
- mwindow->start_convert(asset, suffix, beep, remove_originals);
+ mwindow->start_convert(asset, suffix, beep, to_proxy, remove_originals);
}
return 1;
}
+ConvertToProxyPath::ConvertToProxyPath(ConvertWindow *gui, int x, int y)
+ : BC_CheckBox(x, y, gui->dialog->to_proxy, _("Into Nested Proxy directory"))
+{
+ this->gui = gui;
+}
+
+ConvertToProxyPath::~ConvertToProxyPath()
+{
+}
+
+int ConvertToProxyPath::handle_event()
+{
+ gui->dialog->to_proxy = get_value();
+ return 1;
+}
+
ConvertBeepOnDone::ConvertBeepOnDone(ConvertWindow *gui, int x, int y)
: BC_FPot(x, y, gui->dialog->beep*100.f, 0.f, 100.f)
{
// if user canceled progress bar
int is_canceled();
- void set_format(Asset *asset, const char *suffix);
+ void set_format(Asset *asset, const char *suffix, int to_proxy);
void start_convert(float beep, int remove_originals);
void run();
void create_copy(int i);
int total_rendered, remove_originals;
int failed, canceled, result;
float beep;
+ int to_proxy;
};
class ConvertMenuItem : public BC_MenuItem
ConvertWindow *gui;
};
+class ConvertToProxyPath : public BC_CheckBox
+{
+public:
+ ConvertToProxyPath(ConvertWindow *gui, int x, int y);
+ ~ConvertToProxyPath();
+
+ int handle_event();
+
+ ConvertWindow *gui;
+};
+
class ConvertBeepOnDone : public BC_FPot
{
public:
ConvertSuffixText *suffix_text;
ConvertFormatTools *format_tools;
ConvertRemoveOriginals *remove_originals;
+ ConvertToProxyPath *to_proxy_path;
ConvertBeepOnDone *beep_on_done;
};
int orig_w, orig_h;
int remove_originals;
float beep;
+ int to_proxy;
};
#endif
class ConvertFormatTools;
class ConvertSuffixText;
class ConvertRemoveOriginals;
+class ConvertToProxyPath;
class ConvertBeepOnDone;
class ConvertPackageRenderer;
class ConvertProgress;
if( edl_mode == LOADMODE_EDL_FILEREF )
mwindow->show_warning(
&mwindow->preferences->warn_fileref,
- _("Other projects can change this project"));
+ _("Other projects can change this project\n"
+ "and this can become a broken link"));
ArrayList<char*> path_list;
path_list.set_array_delete();
ix += pad;
}
- ix = 0; iy = mh+pad;
+ ix = xS(25); iy = mh+pad;
const char *mode_text = mode_to_text(*load_mode);
textbox = new BC_TextBox(x+ix, y+iy,
- mwindow->theme->loadmode_w, 1, mode_text);
+ mwindow->theme->loadmode_w-2*ix, 1, mode_text);
window->add_subwindow(textbox);
ix += textbox->get_w();
listbox = new LoadModeListBox(window, this, x+ix, y+iy);
ix += pad;
}
- ix = 0; iy = mh+pad;
+ ix = xS(25); iy = mh+pad;
textbox->reposition_window(x+ix, y+iy);
ix += textbox->get_w();
listbox->reposition_window(x+ix, y+iy);
char progress_title[BCTEXTLEN];
sprintf(progress_title, _("Saving to %s:\n"), dir);
int total_assets = save_edl->assets->total();
+ gui->lock_window("MWindow::save_project");
MainProgressBar *progress = mainprogress->start_progress(progress_title, total_assets);
+ gui->unlock_window();
+
int ret = 0;
Asset *current = save_edl->assets->first;
for( int i=0; !ret && current; ++i, current=NEXT ) {
int optimize_assets(); // delete unused assets from the cache and assets
// render edl assets to specified format, then replace in edl
void start_convert(Asset *format_asset, const char *suffix,
- float beep, int remove_originals);
+ float beep, int to_proxy, int remove_originals);
void finish_convert(int remove_originals);
ConvertRender *convert_render;
}
void MWindow::start_convert(Asset *format_asset, const char *suffix,
- float beep, int remove_originals)
+ float beep, int to_proxy, int remove_originals)
{
if( !convert_render )
convert_render = new ConvertRender(this);
- convert_render->set_format(format_asset, suffix);
+ convert_render->set_format(format_asset, suffix, to_proxy);
int found = convert_render->find_convertable_assets(edl);
if( convert_render->needed_idxbls.size() > 0 )
convert_render->start_convert(beep, remove_originals);
MainProgressBar *progress;
char string[BCTEXTLEN], string2[BCTEXTLEN];
+ mwindow->gui->lock_window();
sprintf(string, "%s...", _(plugin_server->title));
progress = mwindow->mainprogress->start_progress(string, end - start);
+ mwindow->gui->unlock_window();
for(int64_t current_position = start;
current_position < end && !done && !error;
shbtn_prefs.remove_all_objects();
int shbtns_total = defaults->get("SHBTNS_TOTAL", -1);
if( shbtns_total < 0 ) {
- shbtn_prefs.append(new ShBtnPref(_("Current Manual"), "$CIN_BROWSER https://cinelerra-gg.org/download/CinelerraGG_manual.pdf"));
+ shbtn_prefs.append(new ShBtnPref(_("Current Manual"), "$CIN_BROWSER https://cinelerra-gg.org/download/CinelerraGG_Manual.pdf"));
shbtn_prefs.append(new ShBtnPref(_("Setting Shell Commands"), "$CIN_BROWSER file://$CIN_DAT/doc/ShellCmds.html"));
shbtn_prefs.append(new ShBtnPref(_("Shortcuts"), "$CIN_BROWSER file://$CIN_DAT/doc/shortcuts.html"));
shbtn_prefs.append(new ShBtnPref(_("RenderMux"), "$CIN_DAT/doc/RenderMux.sh"));
}
// start progress bar. MWindow is locked inside this
+ mwindow->gui->lock_window("ProxyRender::create_needed_proxies");
progress = mwindow->mainprogress->
start_progress(_("Creating proxy files..."), total_len);
+ mwindow->gui->unlock_window();
ProxyFarm engine(mwindow, this, &needed_idxbls, &needed_proxies);
engine.process_packages();
</tr>
<tr>
<td height="26" align="right"><font face="Liberation Serif" size=4><br></font></td>
- <td align="left"><font face="Liberation Serif" size=4>Convert</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Proxy switch</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Ctrl-r</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Switch from current proxy mode</font></td>
+ </tr>
+ <tr>
+ <td height="26" align="right"><font face="Liberation Serif" size=4><br></font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Transcode</font></td>
<td align="left"><font face="Liberation Serif" size=4>Alt-e</font></td>
- <td align="left"><font face="Liberation Serif" size=4>Bring up the Convert menu</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Bring up the Transcode menu</font></td>
</tr>
<tr>
<td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
: BC_Window(title, x, y,
BC_WindowBase::get_resources()->filebox_w,
BC_WindowBase::get_resources()->filebox_h,
- xS(400), yS(300), 1, 0, 1)
+ xS(450), yS(350), 1, 0, 1)
{
fs = new FileSystem;
// if(want_directory)
{
draw_background(0, 0, w, h);
flash(0);
+ int dw = w - get_w();
+ int dh = h - get_h();
// OK button handles resize event itself
// ok_button->reposition_window(ok_button->get_x(),
-// h - (get_h() - ok_button->get_y()));
-// cancel_button->reposition_window(w - (get_w() - cancel_button->get_x()),
-// h - (get_h() - cancel_button->get_y()));
+// ok_button->get_y() + dh);
+// cancel_button->reposition_window(cancel_button->get_x() + dw,
+// cancel_button->get_y() + dh);
if(usethis_button)
usethis_button->reposition_window(w / 2 - xS(50),
- h - (get_h() - usethis_button->get_y()));
+ usethis_button->get_y() + dh);
- if(filter_popup) filter_popup->reposition_window(w - (get_w() - filter_popup->get_x()),
- h - (get_h() - filter_popup->get_y()),
- w - xS(30),
- 0);
+ if(filter_popup)
+ filter_popup->reposition_window(filter_popup->get_x() + dw,
+ filter_popup->get_y() + dh, w - xS(30), 0);
- if(filter_title) filter_title->reposition_window(filter_title->get_x(),
- h - (get_h() - filter_title->get_y()));
+ if(filter_title)
+ filter_title->reposition_window(filter_title->get_x(),
+ filter_title->get_y() + dh);
if(filter_text) filter_text->reposition_window(filter_text->get_x(),
- h - (get_h() - filter_text->get_y()),
- w - (get_w() - filter_text->get_w()),
- 1);
+ filter_text->get_y() + dh, filter_text->get_w() + dw, 1);
directory_title->reposition_window(
directory_title->get_x(), directory_title->get_y(),
get_w()-directory_title->get_x() - recent_popup->get_w()-xS(20), 1);
directory_title->get_y(),
directory_title->get_w() + recent_popup->get_w(), xS(200));
search_text->reposition_window(
- search_text->get_x(),
- search_text->get_y(),
- get_w() - search_text->get_x() - xS(40),
- 1);
+ search_text->get_x(), search_text->get_y(),
+ get_w() - search_text->get_x() - xS(40), 1);
file_title->reposition_window(file_title->get_x(),
- h - (get_h() - file_title->get_y()));
+ file_title->get_y() + dh);
textbox->reposition_window(textbox->get_x(),
- h - (get_h() - textbox->get_y()),
- w - (get_w() - textbox->get_w()),
- 1);
- listbox->reposition_window(listbox->get_x(),
- listbox->get_y(),
- w - (get_w() - listbox->get_w()),
- h - (get_h() - listbox->get_h()),
- 0);
- int dx = w - get_w();
- icon_button->reposition_window(icon_button->get_x()+dx, icon_button->get_y());
- text_button->reposition_window(text_button->get_x()+dx, text_button->get_y());
- folder_button->reposition_window(folder_button->get_x()+dx, folder_button->get_y());
- rename_button->reposition_window(rename_button->get_x()+dx, rename_button->get_y());
- reload_button->reposition_window(reload_button->get_x()+dx, reload_button->get_y());
- delete_button->reposition_window(delete_button->get_x()+dx, delete_button->get_y());
- updir_button->reposition_window(updir_button->get_x()+dx, updir_button->get_y());
- szfmt_button->reposition_window(szfmt_button->get_x()+dx, szfmt_button->get_y());
+ textbox->get_y() + dh, textbox->get_w() + dw, 1);
+ listbox->reposition_window(listbox->get_x(), listbox->get_y(),
+ listbox->get_w() + dw, listbox->get_h() + dh, 0);
+ icon_button->reposition_window(icon_button->get_x()+dw, icon_button->get_y());
+ text_button->reposition_window(text_button->get_x()+dw, text_button->get_y());
+ folder_button->reposition_window(folder_button->get_x()+dw, folder_button->get_y());
+ rename_button->reposition_window(rename_button->get_x()+dw, rename_button->get_y());
+ reload_button->reposition_window(reload_button->get_x()+dw, reload_button->get_y());
+ delete_button->reposition_window(delete_button->get_x()+dw, delete_button->get_y());
+ updir_button->reposition_window(updir_button->get_x()+dw, updir_button->get_y());
+ szfmt_button->reposition_window(szfmt_button->get_x()+dw, szfmt_button->get_y());
set_w(w); set_h(h);
get_resources()->filebox_w = get_w();
get_resources()->filebox_h = get_h();
XWindowAttributes xwa;
do {
XGetWindowAttributes(top_level->display, top_level->win, &xwa);
- if( xwa.map_state == IsViewable ) return 1;
+ if( xwa.map_state == IsViewable ) return 0;
usleep(10000);
} while( timer.get_difference() < ms );
- return 0;
+ return 1;
}
recordgui_variable_color = RED;
channel_position_color = MEYELLOW;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = YELLOW;
resources->medium_font = cstrdup(string);
channel_position_color = MEYELLOW;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = YELLOW;
recordgui_variable_color = RED;
channel_position_color = MEYELLOW;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = YELLOW;
resources->medium_font = cstrdup(string);
channel_position_color = MEYELLOW;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = BLACK;
recordgui_variable_color = BLACK;
channel_position_color = BLACK;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
}
recordgui_fixed_color = MeterGreen;
recordgui_variable_color = MeterYellow;
channel_position_color = MeterYellow;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
edit_font_color = ComicYellow;
assetedit_color = TextFgBright;
timebar_cursor_color = WHITE;
recordgui_variable_color = RED;
channel_position_color = MEYELLOW;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = YELLOW;
recordgui_variable_color = RED;
channel_position_color = ComicYellow; // Set Format, speaker numbers
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = ComicYellow; // ? ../../cinelerra/theme.h:282
recordgui_variable_color = RED;
channel_position_color = MEYELLOW;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = YELLOW;
recordgui_variable_color = RED;
channel_position_color = MEYELLOW;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = YELLOW;
recordgui_variable_color = RED;
channel_position_color = MEYELLOW;
- resources->meter_title_w = xS(25);
+ resources->meter_title_w = xS(28);
// (asset) edit info text color
edit_font_color = YELLOW;