+/*
+ * CINELERRA
+ * Copyright (C) 2016 Eric Olson
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
#include "bcdisplayinfo.h"
+#include "edl.h"
+#include "edlsession.h"
#include "yuv411win.h"
#include "language.h"
yuv411Window::yuv411Window(yuv411Main *client)
- : PluginClientWindow(client, xS(260), yS(230), xS(260), yS(230), 0)
+ : PluginClientWindow(client, xS(260), yS(250), xS(260), yS(250), 0)
{
this->client = client;
+ colormodel = -1;
}
yuv411Window::~yuv411Window()
add_subwindow(new BC_Title(x, y, _("Bias:")));
add_subwindow(bias=new yuv411Bias(client,x1,y));
y += ys30;
- add_subwindow(reset = new yuv411Reset(client, this, x, y+ys10));
+ int y1 = get_h() - yuv411Reset::calculate_h() - yS(20);
+ add_subwindow(reset = new yuv411Reset(client, this, x, y1+ys10));
show_window();
flush();
yuv_warning = new BC_Title(x, y, _("Warning: colormodel not YUV"),MEDIUMFONT,RED);
add_subwindow(yuv_warning);
- yuv_warning->hide_window();
+ EDL *edl = client->get_edl();
+ colormodel = edl->session->color_model;
+ switch( colormodel ) {
+ case BC_YUV888:
+ case BC_YUVA8888:
+ yuv_warning->hide_window();
+ break;
+ }
}
void yuv411Window::update()
yuv_warning->hide_window();
}
-