/*
* CINELERRA
* Copyright (C) 1997-2012 Adam Williams <broadcast at earthling dot net>
- *
+ *
* 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"
line_double == that.line_double;
}
-void FreezeFrameConfig::interpolate(FreezeFrameConfig &prev,
- FreezeFrameConfig &next,
- long prev_frame,
- long next_frame,
+void FreezeFrameConfig::interpolate(FreezeFrameConfig &prev,
+ FreezeFrameConfig &next,
+ long prev_frame,
+ long next_frame,
long current_frame)
{
this->enabled = prev.enabled;
FreezeFrameWindow::FreezeFrameWindow(FreezeFrameMain *client)
- : PluginClientWindow(client,
- 200,
- 100,
- 200,
- 100,
- 0)
+ : PluginClientWindow(client, 260, 100, 260, 100, 0)
{
- this->client = client;
+ this->client = client;
}
FreezeFrameWindow::~FreezeFrameWindow()
void FreezeFrameWindow::create_objects()
{
int x = 10, y = 10;
- add_tool(enabled = new FreezeFrameToggle(client,
+ add_tool(enabled = new FreezeFrameToggle(client,
&client->config.enabled,
- x,
+ x,
y,
_("Enabled")));
// Try using extra effect for the line double since it doesn't
// change the overhead.
// y += 30;
-// add_tool(line_double = new FreezeFrameToggle(client,
+// add_tool(line_double = new FreezeFrameToggle(client,
// &client->config.line_double,
-// x,
+// x,
// y,
// _("Line double")));
show_window();
-FreezeFrameToggle::FreezeFrameToggle(FreezeFrameMain *client,
- int *value,
- int x,
+FreezeFrameToggle::FreezeFrameToggle(FreezeFrameMain *client,
+ int *value,
+ int x,
int y,
char *text)
: BC_CheckBox(x, y, *value, text)
FreezeFrameMain::FreezeFrameMain(PluginServer *server)
: PluginVClient(server)
{
-
+
first_frame = 0;
first_frame_position = -1;
}
FreezeFrameMain::~FreezeFrameMain()
{
-
+
if(first_frame) delete first_frame;
}
-const char* FreezeFrameMain::plugin_title() { return _("Freeze Frame"); }
+const char* FreezeFrameMain::plugin_title() { return N_("Freeze Frame"); }
int FreezeFrameMain::is_synthesis() { return 1; }
int FreezeFrameMain::is_realtime() { return 1; }
if(!first_frame && config.enabled)
{
if(!first_frame)
- first_frame = new VFrame(0,
- -1,
- frame->get_w(),
- frame->get_h(),
- frame->get_color_model(),
- -1);
+ first_frame = new VFrame(frame->get_w(), frame->get_h(),
+ frame->get_color_model(), 0);
//printf("FreezeFrameMain::process_buffer 1 %jd\n", first_frame_position);
- read_frame(first_frame,
- 0,
+ read_frame(first_frame,
+ 0,
get_direction() == PLAY_REVERSE ? first_frame_position + 1 : first_frame_position,
frame_rate,
get_use_opengl());
// Still not frozen
if(!first_frame && !config.enabled)
{
- read_frame(frame,
- 0,
+ read_frame(frame,
+ 0,
start_position,
frame_rate,
get_use_opengl());
{
delete first_frame;
first_frame = 0;
- read_frame(frame,
- 0,
+ read_frame(frame,
+ 0,
start_position,
frame_rate,
get_use_opengl());
// Had a keyframe in frozen range. Load new first frame
if(previous_first_frame != first_frame_position)
{
- read_frame(first_frame,
- 0,
+ read_frame(first_frame,
+ 0,
get_direction() == PLAY_REVERSE ? first_frame_position + 1 : first_frame_position,
frame_rate,
get_use_opengl());
// {
// for(int i = 0; i < frame->get_h() - 1; i += 2)
// {
-// memcpy(frame->get_rows()[i + 1],
-// frame->get_rows()[i],
+// memcpy(frame->get_rows()[i + 1],
+// frame->get_rows()[i],
// frame->get_bytes_per_line());
// }
// }