1 #include "mainprogress.h"
2 #include "reversevideo.h"
5 #define _(String) gettext(String)
6 #define gettext_noop(String) String
7 #define N_(String) gettext_noop (String)
14 PluginClient* new_plugin(PluginServer *server)
16 return new ReverseVideo(server);
28 ReverseVideo::ReverseVideo(PluginServer *server)
29 : PluginVClient(server)
31 current_position = -1;
35 ReverseVideo::~ReverseVideo()
39 char* ReverseVideo::plugin_title()
41 return _("Reverse video");
44 VFrame* ReverseVideo::new_picon()
49 int ReverseVideo::start_loop()
51 if(PluginClient::interactive)
53 char string[BCTEXTLEN];
54 sprintf(string, "%s...", plugin_title());
55 progress = start_progress(string,
56 (PluginClient::end - PluginClient::start));
59 current_position = PluginClient::end - 1;
64 int ReverseVideo::stop_loop()
66 if(PluginClient::interactive)
68 progress->stop_progress();
74 int ReverseVideo::process_loop(VFrame *buffer)
76 //printf("ReverseVideo::process_loop 1\n");
78 //printf("ReverseVideo::process_loop 1\n");
80 read_frame(buffer, current_position);
81 //printf("ReverseVideo::process_loop 2\n");
86 if(PluginClient::interactive)
87 result = progress->update(PluginClient::end - current_position);
89 if(current_position < PluginClient::start) result = 1;