char *bfr = new char[sz+1];
int64_t len = fread(bfr, 1, sz+1, fp);
if( len == sz ) {
- FileXML file; file.set_shared_input(bfr, len);
+ FileXML file;
+ XMLBuffer data(bfr, len, 0);
+ file.set_shared_input(&data);
EDL *edl = new EDL; edl->create_objects();
edl->load_xml(&file, LOAD_ALL);
double pos = edl->equivalent_output(mwindow->edl);
int enabled_type = file->tag.get_property("ENABLED", FOLDER_ENABLED_AND);
int op_type = file->tag.get_property("OP", FOLDER_OP_MATCHES);
int target_type = file->tag.get_property("TARGET", FOLDER_TARGET_PATTERNS);
- char data[0x40000];
- file->read_text_until("/FILTER", data, sizeof(data), 0);
+ XMLBuffer data;
+ file->read_text_until("/FILTER", &data, 0);
update_enabled(enabled_type);
update_target(target_type);
update_op(op_type);
target->load_xml(file);
if( target->type == FOLDER_TARGET_PATTERNS )
- ((BinFolderTargetPatterns *)target)->update(data);
+ ((BinFolderTargetPatterns *)target)->update(data.cstr());
return 0;
}
return len;
}
+void XMLBuffer::copy_from(XMLBuffer *xbuf)
+{
+ if( bsz != xbuf->bsz ) { delete [] bfr; bfr = 0; }
+ if( !bfr ) bfr = new unsigned char[bsz = xbuf->bsz];
+ lmt = bfr + bsz;
+ long ilen = xbuf->otell(), olen = xbuf->itell();
+ inp = pos(ilen);
+ outp = pos(olen);
+ if( ilen > 0 )
+ memmove(bfr, xbuf->bfr, ilen);
+ destroy = xbuf->destroy;
+}
+
// Precision in base 10
// for float is 6 significant figures
output_length = 0;
buffer = new XMLBuffer();
set_coding(coded);
+ shared = 0;
}
FileXML::~FileXML()
{
- delete buffer;
+ if( !shared ) delete buffer;
delete [] output;
}
}
char* FileXML::string()
{
- return (char *)buffer->str();
+ return (char *)buffer->cstr();
}
long FileXML::length()
return 1;
}
-int FileXML::read_data_until(const char *tag_end, char *out, int len, int skip)
+int FileXML::read_data_until(const char *tag_end, XMLBuffer *xbuf, int skip)
{
long ipos = buffer->itell();
- int opos = 0, pos = -1;
- int ch = buffer->next();
- for( int olen=len-1; ch>=0 && opos<olen; ch=buffer->next() ) {
+ int pos = -1;
+ for( int ch=buffer->next(); ch>=0; ch=buffer->next() ) {
if( pos < 0 ) { // looking for next tag
if( ch == left_delm ) {
ipos = buffer->itell()-1;
pos = 0;
}
else
- out[opos++] = ch;
+ xbuf->next(ch);
continue;
}
// check for end of match
if( !tag_end[pos] && ch == right_delm ) break;
// if mismatched, copy prefix to out
if( tag_end[pos] != ch ) {
- out[opos++] = left_delm;
- for( int i=0; i<pos && opos<olen; ++i )
- out[opos++] = tag_end[i];
- if( opos < olen ) out[opos++] = ch;
+ xbuf->next(left_delm);
+ for( int i=0; i<pos; ++i )
+ xbuf->next(tag_end[i]);
pos = -1;
+ xbuf->next(ch);
continue;
}
++pos;
// if end tag is reached, pos is left on the < of the end tag
if( !skip && pos >= 0 && !tag_end[pos] )
buffer->iseek(ipos);
- return opos;
+ return xbuf->otell();
}
-int FileXML::read_text_until(const char *tag_end, char *out, int len, int skip)
+int FileXML::read_text_until(const char *tag_end, XMLBuffer *xbuf, int skip)
{
- char data[len+1];
- int opos = read_data_until(tag_end, data, len, skip);
- decode(out, data, opos);
+ int len = read_data_until(tag_end, xbuf, skip);
+ char *cp = xbuf->cstr();
+ decode(cp, cp, len);
return 0;
}
return coded;
}
-int FileXML::set_shared_input(char *shared_string, long avail, int coded)
+int FileXML::set_shared_input(XMLBuffer *xbuf)
{
strcpy(this->filename, "");
delete buffer;
- buffer = new XMLBuffer(shared_string, avail, 0);
+ buffer = xbuf;
+ xbuf->iseek(0);
set_coding(coded);
- return 0;
+ shared = 1;
+ return 0;
}
-int FileXML::set_shared_output(char *shared_string, long avail, int coded)
+int FileXML::set_shared_output(XMLBuffer *xbuf)
{
strcpy(this->filename, "");
delete buffer;
- buffer = new XMLBuffer(avail, shared_string, 0);
+ buffer = xbuf;
+ xbuf->oseek(0);
set_coding(coded);
- return 0;
+ shared = 1;
+ return 0;
}
-
// ================================ XML tag
-
-
int XMLTag::title_is(const char *tp)
{
return !strcasecmp(title, tp) ? 1 : 0;
char *XMLBuffer::copy_data(char *bp, const char *sp, int n)
{
int len = n < 0 ? strlen(sp) : n;
- memmove(bp,sp,len);
+ if( bp != sp )
+ memmove(bp,sp,len);
bp[len] = 0;
return bp;
}
#include <limits.h>
#include "arraylist.h"
+#include "keyframe.inc"
#include "filexml.inc"
#include "sizes.h"
int destroy;
int demand(long len);
+ friend class KeyFrame;
public:
XMLBuffer(long buf_size=0x1000, long max_size=LONG_MAX, int del=1);
XMLBuffer(long buf_size, char *buf, int del=0); // writing
long itell() { return outp - bfr; }
void oseek(long pos) { inp = bfr + pos; }
void iseek(long pos) { outp = bfr + pos; }
- unsigned char *pos(long ofs=0) { return bfr+ofs; }
- unsigned char *str() { if( inp < lmt ) *inp = 0; return bfr; }
+ unsigned char *pos(long ofs=0) { return bfr+ofs; }
+ char *cstr() { if( demand(otell()+1) ) *inp = 0; return (char*)bfr; }
int read(char *bp, int n);
int write(const char *bp, int n);
+ void copy_from(XMLBuffer *xbfr);
int cur() { return outp>=inp ? -1 : *outp; }
int next() { return outp>=inp ? -1 : *outp++; }
int append_data(const char *text);
int append_data(const char *text, long len);
- char* read_text();
- int read_data_until(const char *tag_end, char *out, int len, int skip=0);
- int read_text_until(const char *tag_end, char *out, int len, int skip=0);
+ char *read_text();
+ int read_data_until(const char *tag_end, XMLBuffer *xbfr, int skip=0);
+ int read_text_until(const char *tag_end, XMLBuffer *xbfr, int skip=0);
int read_tag();
int skip_tag();
int write_to_file(const char *filename);
char *(*encode)(char *bp, const char *sp, int n);
long (*coded_length)(const char *sp, int n);
- int set_shared_input(char *shared_string, long avail, int coded=1);
- int set_shared_output(char *shared_string, long avail, int coded=1);
void set_coding(int coding);
int get_coding();
+ int set_shared_input(XMLBuffer *xbfr);
+ int set_shared_output(XMLBuffer *xbfr);
+
int rewind();
char *get_data();
char *string();
long length();
XMLBuffer *buffer;
- int coded;
+ int coded, shared;
XMLTag tag;
long output_length;
KeyFrame::KeyFrame()
: Auto()
{
- data[0] = 0;
+ xbuf = new XMLBuffer();
}
KeyFrame::KeyFrame(EDL *edl, KeyFrames *autos)
: Auto(edl, (Autos*)autos)
{
- data[0] = 0;
+ xbuf = new XMLBuffer();
}
KeyFrame::~KeyFrame()
{
+ delete xbuf;
}
void KeyFrame::load(FileXML *file)
// Shouldn't be necessary
// position = file->tag.get_property((char*)"POSITION", position);
//printf("KeyFrame::load 1\n");
-
- int len = file->read_data_until((char*)"/KEYFRAME", data, MESSAGESIZE-1, 1);
- data[len] = 0;
-//printf("KeyFrame::load 2 data=\n%s\nend of data\n", data);
+ xbuf->iseek(0); xbuf->oseek(0);
+ file->read_data_until((char*)"/KEYFRAME", xbuf, 1);
}
void KeyFrame::copy(int64_t start, int64_t end, FileXML *file, int default_auto)
{
-//printf("KeyFrame::copy 1 %d\n%s\n", position - start, data);
file->tag.set_title((char*)"KEYFRAME");
if(default_auto)
file->tag.set_property((char*)"POSITION", 0);
file->append_tag();
// Can't put newlines in because these would be reimported and resaved along
// with new newlines.
-// file->append_newline();
-
+ char *data = (char*)xbuf->pos(0);
file->append_data(data, strlen(data));
-// file->append_newline();
file->tag.set_title((char*)"/KEYFRAME");
file->append_tag();
copy_from((KeyFrame*)that);
}
-void KeyFrame::copy_from(KeyFrame *that)
+void KeyFrame::copy_data(KeyFrame *src)
{
- Auto::copy_from(that);
- KeyFrame *keyframe = (KeyFrame*)that;
- strcpy(data, keyframe->data);
- position = keyframe->position;
+ xbuf->copy_from(src->xbuf);
}
-void KeyFrame::copy_data(KeyFrame *src)
+void KeyFrame::copy_from(KeyFrame *that)
{
- strcpy(data, src->data);
+ Auto::copy_from(that);
+ copy_data(that);
+ position = that->position;
}
int KeyFrame::identical(KeyFrame *src)
{
- return !strcasecmp(src->data, data);
+ return !strcasecmp(xbuf->cstr(), src->xbuf->cstr());
}
void KeyFrame::get_contents(BC_Hash *ptr, char **text, char **extra)
{
FileXML input;
- input.set_shared_input(data, strlen(data));
- int result = 0;
- char *this_text = 0;
- char *this_extra = 0;
- while(!result)
- {
- result = input.read_tag();
- if(!result)
- {
- for(int i = 0; i < input.tag.properties.size(); i++)
- {
- const char *key = input.tag.get_property_text(i);
- const char *value = input.tag.get_property(key);
- ptr->update(key, value);
- }
+ input.set_shared_input(xbuf);
+ char *this_text = 0, *this_extra = 0;
+ if( !input.read_tag() ) {
+ for( int i=0; i<input.tag.properties.size(); ++i ) {
+ const char *key = input.tag.get_property_text(i);
+ const char *value = input.tag.get_property(key);
+ ptr->update(key, value);
+ }
// Read any text after tag
- this_text = input.read_text();
- (*text) = cstrdup(this_text);
+ this_text = input.read_text();
+ (*text) = cstrdup(this_text);
// Read remaining data
- this_extra = input.get_data();
- (*extra) = cstrdup(this_extra);
- break;
- }
+ this_extra = input.get_data();
+ (*extra) = cstrdup(this_extra);
}
}
void KeyFrame::update_parameter(BC_Hash *params,
const char *text, const char *extra)
{
- FileXML output;
- FileXML input;
- input.set_shared_input(get_data(), strlen(get_data()));
- int result = 0;
BC_Hash this_params;
- char *this_text = 0;
- char *this_extra = 0;
- int got_it = 0;
-
-// printf("KeyFrame::update_parameter %d %p %p %p \n",
-// __LINE__,
-// params,
-// text,
-// extra);
-
-
+ char *this_text = 0, *this_extra = 0;
get_contents(&this_params, &this_text, &this_extra);
-
-// printf("KeyFrame::update_parameter %d params=%p\n", __LINE__, params);
-// if(params) params->dump();
-// printf("KeyFrame::update_parameter %d\n", __LINE__);
-// this_params.dump();
-
-// Get first tag
- while(!result)
- {
- result = input.read_tag();
- if(!result)
- {
-// Replicate first tag
- output.tag.set_title(input.tag.get_title());
+ FileXML input, output;
+ input.set_shared_input(xbuf);
+ if( !input.read_tag() ) {
+// Replicate tag
+ output.tag.set_title(input.tag.get_title());
// Get each parameter from this keyframe
- for(int i = 0; i < this_params.size(); i++)
- {
- const char *key = this_params.get_key(i);
- const char *value = this_params.get_value(i);
-
+ for( int i=0; i<this_params.size(); ++i ) {
+ const char *key = this_params.get_key(i);
+ const char *value = this_params.get_value(i);
// Get new value from the params argument
- got_it = 1;
- if(params)
- {
- got_it = 0;
- for(int j = 0; j < params->size(); j++)
- {
- if(!strcmp(params->get_key(j), key))
- {
- got_it = 1;
- value = params->get_value(j);
- break;
- }
+ if( params ) {
+ for( int j=0; j<params->size(); ++j ) {
+ if( !strcmp(params->get_key(j), key) ) {
+ value = params->get_value(j);
+ break;
}
}
-
-// Set parameter in output.
- output.tag.set_property(key, value);
}
+ output.tag.set_property(key, value);
+ }
+
// Get each parameter from params argument
- if(params)
- {
- for(int i = 0; i < params->size(); i++)
- {
- const char *key = params->get_key(i);
-//printf("KeyFrame::update_parameter %d %s\n", __LINE__, key);
-
- got_it = 0;
- for(int j = 0; j < this_params.size(); j++)
- {
- if(!strcmp(this_params.get_key(j), key))
- {
- got_it = 1;
- break;
- }
+ if( params ) {
+ for( int i=0; i<params->size(); ++i ) {
+ const char *key = params->get_key(i);
+ int got_it = 0;
+ for( int j=0; j<this_params.size(); ++j ) {
+ if( !strcmp(this_params.get_key(j), key) ) {
+ got_it = 1;
+ break;
}
-//printf("KeyFrame::update_parameter %d %s\n", __LINE__, key);
+ }
// If it wasn't found in output, set new parameter in output.
- if(!got_it)
- {
- output.tag.set_property(key, params->get_value(i));
-//printf("KeyFrame::update_parameter %d %s\n", __LINE__, key);
- }
+ if( !got_it ) {
+ output.tag.set_property(key, params->get_value(i));
}
}
+ }
-// Append parameters to output
- output.append_tag();
+ output.append_tag();
// Write anonymous text & duplicate the rest
- output.append_text(text ? text : this_text);
-// Append remaining previous data
- output.append_data(extra ? extra : this_extra);
+ output.append_text(text ? text : this_text);
+ output.append_data(extra ? extra : this_extra);
+ output.terminate_string();
// Move output to input
- output.terminate_string();
- strcpy(this->data, output.string());
- break;
- }
+ xbuf->oseek(0);
+ xbuf->write(output.string(), output.length());
}
delete [] this_text;
return identical(&that);
}
-char* KeyFrame::get_data()
+char *KeyFrame::get_data(int64_t sz)
{
- return data;
+ if( sz >= 0 ) xbuf->demand(sz);
+ return xbuf->cstr();
}
void KeyFrame::set_data(char *data)
{
- strcpy(this->data, data);
+ xbuf->oseek(0);
+ xbuf->write(data, strlen(data));
}
void KeyFrame::dump(FILE *fp)
{
fprintf(fp," position: %jd\n", position);
- fprintf(fp," data: %s\n", data);
+ fprintf(fp," data: %s\n", xbuf->cstr());
}
int identical(KeyFrame *src);
// Generate pointers to parameters which are different than *src.
// User must free nonzero return arguments.
- void get_diff(KeyFrame *src,
- BC_Hash **params,
- char **text,
- char **extra);
- void set_data(char *data);
- char* get_data();
+ void get_diff(KeyFrame *src, BC_Hash **params, char **text, char **extra);
+ void set_data(char *data);
+ char* get_data(int64_t sz=-1);
// Get parameters in a hash table,
// the anonymous text in a newly allocated string.
// extra text in a newly allocated string
// Update a single parameter or the anonymous text depending on which argument is nonzero
void update_parameter(BC_Hash *params, const char *text, const char *extra);
-private:
- char data[MESSAGESIZE];
+ XMLBuffer *xbuf;
};
#endif
while( !file->read_tag() ) {
if( file->tag.title_is("/LOCALSESSION") ) break;
if( file->tag.title_is("CLIP_NOTES") ) {
- file->read_text_until("/CLIP_NOTES",
- clip_notes, sizeof(clip_notes)-1, 1);
+ XMLBuffer notes;
+ file->read_text_until("/CLIP_NOTES", ¬es, 1);
+ memset(clip_notes, 0, sizeof(clip_notes));
+ strncpy(clip_notes, notes.cstr(), sizeof(clip_notes)-1);
}
}
}
else
if(file->tag.title_is("POINT"))
{
- char string[BCTEXTLEN];
- string[0] = 0;
- file->read_text_until("/POINT", string, BCTEXTLEN);
+ XMLBuffer data;
+ file->read_text_until("/POINT", &data);
MaskPoint *point = new MaskPoint;
- char *ptr = string;
+ char *ptr = data.cstr();
//printf("MaskAuto::load 1 %s\n", ptr);
point->x = atof(ptr);
void MWindow::save_undo_data()
{
+ undo->update_undo_before();
+ undo->update_undo_after(_("perpetual session"), LOAD_ALL);
char perpetual_path[BCTEXTLEN];
snprintf(perpetual_path, sizeof(perpetual_path), "%s/%s",
File::get_config_path(), PERPETUAL_FILE);
void PluginAClientLAD::save_data(KeyFrame *keyframe)
{
- FileXML output;
- char string[BCTEXTLEN];
if( !config.port_data ) config.initialize(server);
-
+ FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
+ char string[BCTEXTLEN];
output.tag.set_title(lad_to_upper(string, plugin_title()));
const LADSPA_Descriptor *lad_desc = server->lad_descriptor;
void PluginAClientLAD::read_data(KeyFrame *keyframe)
{
- FileXML input;
- char string[BCTEXTLEN];
-
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
if( !config.port_data ) config.initialize(server);
+ FileXML input;
+ input.set_shared_input(keyframe->xbuf);
while(! input.read_tag() ) {
//printf("PluginAClientLAD::read_data %s\n", input.tag.get_title());
+ char string[BCTEXTLEN];
if(! input.tag.title_is(lad_to_upper(string, plugin_title())) ) continue;
const LADSPA_Descriptor *lad_desc = server->lad_descriptor;
const LADSPA_PortDescriptor *port_desc = lad_desc->PortDescriptors;
//printf("PluginClient::hide_gui %d thread->window=%p\n", __LINE__, thread->window);
thread->window->unlock_window();
//printf("PluginClient::delete_thread %d\n", __LINE__);
+ thread->join();
}
}
//printf("PluginClient::load_defaults_xml %d %s\n", __LINE__, path);
KeyFrame temp_keyframe;
- FILE *fd = fopen(path, "r");
- if(fd)
- {
- char *data = temp_keyframe.get_data();
- int data_size = fread(data, 1, MESSAGESIZE-1, fd);
+ FILE *fp = fopen(path, "r");
+ if( fp ) {
+ struct stat st; int fd = fileno(fp);
+ int64_t sz = !fstat(fd, &st) ? st.st_size : BCTEXTLEN;
+ char *data = temp_keyframe.get_data(sz+1);
+ int data_size = fread(data, 1, sz, fp);
if( data_size < 0 ) data_size = 0;
- if( data_size > 0 )
- {
+ if( data_size > 0 ) {
// Get window extents
int state = 0;
- for(int i = 0; i < data_size - 8; i++)
- {
- if(data[i] == '<') break;
- if(isdigit(data[i]))
- {
- if(state == 0)
- {
- window_x = atoi(data + i);
- state++;
- }
- else
- {
- window_y = atoi(data + i);
- break;
- }
- while(i < data_size && isdigit(data[i])) i++;
+ for( int i=0; i<(data_size-8) && data[i]!='<'; ++i ) {
+ if( !isdigit(data[i]) ) continue;
+ if( !state ) {
+ window_x = atoi(data + i);
+ state = 1;
}
+ else {
+ window_y = atoi(data + i);
+ break;
+ }
+ while( i<data_size && isdigit(data[i]) ) ++i;
}
data[data_size] = 0;
read_data(&temp_keyframe);
}
- fclose(fd);
+ fclose(fp);
}
using_defaults = 0;
//printf("PluginClient::load_defaults_xml %d %s\n", __LINE__, path);
char string[BCTEXTLEN];
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title(to_upper(string, plugin_title()));
const AVClass *filt_class = config.filter_class();
if( filt_class && filt_class->option ) {
{
FileXML input;
char string[BCTEXTLEN];
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while( !input.read_tag() ) {
to_upper(string, plugin_title());
void PluginLV2Client::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
char name[BCTEXTLEN]; to_string(name, plugin_title());
output.tag.set_title(name);
for( int i=0; i<config.size(); ++i ) {
void PluginLV2Client::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
char name[BCTEXTLEN]; to_string(name, plugin_title());
while( !input.read_tag() ) {
const char *cols[] = { "option", "value", };
const int col1_w = 150;
int wids[] = { col1_w, get_w()-col1_w };
- BC_ListBox::update(&items[0], &cols[0], &wids[0], sizeof(items)/sizeof(items[0]));
+ BC_ListBox::update(&items[0], &cols[0], &wids[0], sizeof(items)/sizeof(items[0]),
+ get_xposition(), get_yposition(), get_highlighted_item());
}
PluginLV2ClientPot::PluginLV2ClientPot(PluginLV2ClientWindow *gui, int x, int y)
sprintf(string, "Unknown");
const char *keyframe_title = file->tag.get_property("TITLE", string);
PresetsDBKeyframe *keyframe = new PresetsDBKeyframe(keyframe_title, is_factory);
-
- char data[MESSAGESIZE];
- file->read_text_until("/KEYFRAME", data, MESSAGESIZE);
- keyframe->set_data(data);
+ XMLBuffer data;
+ file->read_text_until("/KEYFRAME", &data);
+ keyframe->set_data(data.cstr());
keyframes.append(keyframe);
}
else
if(file->tag.title_is("TITLE"))
{
- file->read_text_until("/TITLE", title, BCTEXTLEN);
+ XMLBuffer data;
+ file->read_text_until("/TITLE", &data);
+ memset(title, 0, sizeof(title));
+ strncpy(title, data.cstr(), sizeof(title)-1);
}
else
if(load_flags && automation->load(file)
abench
-#abitscope
-#abuffer
+#abitscope rate=25:size=1024x256
+#abuffer abuffer=sample_rate=48000:sample_fmt=s16p:channel_layout=stereo
#abuffersink
acompressor
#acrossfade
acrusher
adelay delays=1
-#adrawgraph
+#adrawgraph signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
aecho
aemphasis
aeval exprs=(sin(2*PI*t*440)+sin(2*PI*t*350))/2*mod(floor(2*t),2):channel_layout=1c
-#aevalsrc
+#aevalsrc 0
afade
-#afftfilt
+#afftfilt 1-clip((b/nb)*b,0,1)
#afifo
-#aformat
+aformat sample_fmts=u8|s16:channel_layouts=stereo
agate
-#ahistogram
+#ahistogram dmode=single:r=25:s=hd720:scale=log:ascale=log:slide=replace
#ainterleave
#alimiter
allpass
#alphaextract
#alphamerge
#amerge
-#ametadata
+#ametadata mode=print:file=ametadata.txt
#amix
#amovie
-#anequalizer
-#anoisesrc
+#anequalizer c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
+anoisesrc d=60:c=pink:r=48000:a=0.5
#anull
#anullsink
#anullsrc
-#apad
+#apad pad_len=1024
aperms
-#aphasemeter
+#aphasemeter r=25:s=800x400:rc=2:gc=7:bc=1
aphaser
#apulsator
arealtime
#aselect
#asendcmd
#asetnsamples
-#asetpts
-#asetrate
+#asetpts PTS-STARTPTS
+asetrate r=48000
#asettb
#ashowinfo
#asidedata
avgblur
bandpass
bandreject
-bass
+bass channels=0x1
bbox
bench
biquad
blackframe
#blend
boxblur
-#buffer
+#buffer size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
#buffersink
bwdif
-#cellauto
-#channelmap
+#cellauto p=@:s=100x400:full=0:rule=18
+#channelmap 1|2|0|5|3|4:5.1
#channelsplit
chorus in_gain=0.400000:out_gain=0.400000:delays=1|1:decays=1|1:speeds=1|1:depths=1|1
chromakey
colorchannelmixer
colorkey
colorlevels
-colormatrix src=bt601:dst=smpte240m
-#colorspace
+colormatrix src=bt601:dst=bt709
+#colorspace bt709
compand
compensationdelay
#concat
-#convolution
+#convolution 0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0
#copy
cover_rect
crop
cropdetect
crystalizer
-#curves
+curves
datascope
dcshift
-#dctdnoiz
+dctdnoiz 4.5
deband
#decimate
deflate
#fieldmatch
fieldorder
#fifo
+fillborders
#find_rect
-#firequalizer
+#firequalizer delay=0.1:fixed=on:zero_phase=on
flanger
-#format
-#fps
+format pix_fmts=yuv420p|yuv444p|yuv410p
+#fps 30
#framepack
framerate
-#framestep
+framestep step=30
fspp
gblur
#geq
#join
kerndeint
lenscorrection
-#life
+#life ratio=2/3:s=200x200
loudnorm
lowpass
lut
#maskedclamp
#maskedmerge
mcdeint
-#mergeplanes
+#mergeplanes 0x03010200:yuva444p
mestimate
-#metadata
+#metadata mode=print:file=metadata.txt
#midequalizer
#minterpolate
#movie
mpdecimate
-#mptestsrc
+mptestsrc t=dc_luma
negate
nlmeans r=15:p=7:s=2
#nnedi
-#noformat
+#noformat pix_fmts=yuv420p
noise
#null
#nullsink
#nullsrc
-#overlay
+#overlay x=main_w-overlay_w-10:y=main_h-overlay_h-10
owdenoise
#pad
#palettegen
#paletteuse
-#pan
+#pan 1c|c0=0.9*c0+0.1*c1
perms
perspective
phase
pp7
#premultiply
prewitt
-#psnr
+#psnr PSNR=10*log10(MAX^2/MSE)
#pullup
-#qp
-#random
+#qp 2+2*sin(PI*qp)
+#random seed=-1
readeia608
readvitc
realtime
repeatfields
#replaygain
#reverse
-#rgbtestsrc
+rgbtestsrc
rotate
sab
-#scale
+scale 200:100
#scale2ref
#select
-#selectivecolor
+#selectivecolor greens=.5 0 -.33 0:blues=0 .27
#sendcmd
separatefields
-#setdar
-#setfield
-#setpts
-#setsar
+#setdar dar=16/9
+#setfield mode=auto
+#setpts PTS-STARTPTS
+#setsar sar=10/11
#settb
#showcqt
#showfreqs
showinfo
-#showpalette
-#showspectrum
+showpalette s=30
+#showspectrum s=1280x480:scale=log
#showspectrumpic
-#showvolume
+#showvolume r=30
#showwaves
#showwavespic
shuffleframes
shuffleplanes
#sidechaincompress
#sidechaingate
-#sidedata
+#sidedata mode=delete
signalstats
#signature
-#silencedetect
+#silencedetect n=0.001
silenceremove
sine
smartblur
super2xsai
swaprect
swapuv
-#tblend
+tblend all_mode=grainextract
#telecine
-#testsrc
-#testsrc2
+testsrc duration=5.3:size=qcif:rate=10
+testsrc2 duration=5.3:size=qcif:rate=10
#threshold
-#thumbnail
-#tile
+#thumbnail n=50
+tile layout=3x2:nb_frames=5:padding=7:margin=2
tinterlace
transpose
treble
tremolo
-#trim
-#unsharp
+#trim 5:15
+unsharp luma_msize_x=5:luma_msize_y=5:luma_amount=2.5
uspp
vaguedenoiser
vectorscope
weave
xbr
yadif
-#yuvtestsrc
+yuvtestsrc
zoompan
; new in 3.4.1
#acopy
#tonemap
#vmafmotion
; new in 4.0
-acontrast
+#acontrast Contrast=33
#afir
-#aiir
+aiir
#convolve
#deconvolve
drmeter
is_utf8 = 1;
skip_cursor = 0;
reset_parameters(rows, has_border, font, size);
- if( size > 0 )
+ if( size >= 0 )
tstrcpy(text);
- else // text referenced directly
+ else // reference shared directly
this->text = text;
}
{
is_utf8 = 1;
skip_cursor = 0;
- wsize = size > 0 ? size : wcslen(wtext);
- if( size <= 0 ) size = 2*wsize;
reset_parameters(rows, has_border, font, size);
- this->wtext = new wchar_t[wsize+1];
+ wdemand(wcslen(wtext));
wcsncpy(this->wtext, wtext, wsize);
- this->wtext[wsize] = 0;
}
BC_TextBox::BC_TextBox(int x, int y, int w, int rows,
delete suggestions;
delete menu;
delete [] wtext;
- if( size > 0 )
+ if( size >= 0 )
delete [] text;
}
this->rows = rows;
this->has_border = has_border;
this->font = font;
+// size > 0: fixed buffer, size == 0: dynamic buffer
+// size < 0: fixed shared buffer via set_text
this->size = size;
this->tsize = size >= 0 ? size : -size;
- this->text = size > 0 ? new char[size+1] : 0;
+ this->text = size > 0 ? new char[this->tsize+1] : 0;
if( this->text ) this->text[0] = 0;
text_start = 0;
text_end = 0;
int BC_TextBox::tstrlen()
{
- if( !tsize ) return strlen(text);
- return strnlen(text, tsize);
+ return !text ? 0 : strnlen(text, tsize);
}
int BC_TextBox::tstrcmp(const char *cp)
{
const char *tp = get_text();
- if( !tsize ) return strcmp(tp, cp);
return strncmp(tp, cp, tsize);
}
{
dirty = 1;
if( cp ) {
- if( !tsize )
- return strcpy(text, cp);
+ if( !size ) tdemand(strlen(cp));
strncpy(text, cp, tsize);
- text[tsize-1] = 0;
}
- else
+ else if( text )
text[0] = 0;
return text;
}
char *BC_TextBox::tstrcat(const char *cp)
{
dirty = 1;
- if( !tsize ) return strcat(text, cp);
+ if( !size ) tdemand(tstrlen() + strlen(cp));
char *result = strncat(text, cp, tsize);
- text[tsize-1] = 0;
return result;
}
if( dirty ) {
const char *src_enc = is_utf8 ? "UTF8" : BC_Resources::encoding;
const char *dst_enc = BC_Resources::wide_encoding;
- int nsize = tsize > 0 ? tsize : strlen(text) + BCTEXTLEN;
- if( nsize > wsize || !wtext ) {
- wchar_t *ntext = new wchar_t[nsize+1];
- memcpy(ntext, wtext, wsize*sizeof(wtext[0]));
- delete [] wtext; wtext = ntext; wsize = nsize;
- }
- wlen = BC_Resources::encode(src_enc, dst_enc, text, strlen(text),
+ int tlen = tstrlen();
+ int nsize = tsize > 0 ? tsize : tlen + BCTEXTLEN;
+ wdemand(nsize);
+ wlen = BC_Resources::encode(src_enc, dst_enc, text, tlen,
(char*)wtext, wsize*sizeof(wchar_t)) / sizeof(wchar_t);
dirty = 0;
}
int BC_TextBox::update(const wchar_t *wtext)
{
int wtext_len = wcslen(wtext);
- if( wtext_len >= wsize ) wtext_len = wsize;
- wcsncpy(this->wtext, wtext, wtext_len);
- wlen = wtext_len;
+ wdemand(wtext_len);
+ wcsncpy(this->wtext, wtext, wsize);
+ this->wlen = wtext_len;
if(highlight_letter1 > wtext_len) highlight_letter1 = wtext_len;
if(highlight_letter2 > wtext_len) highlight_letter2 = wtext_len;
if(ibeam_letter > wtext_len) ibeam_letter = wtext_len;
void BC_TextBox::set_text(char *text, int isz)
{
- if( size > 0 || isz < 0 ) return;
- this->text = text;
- tsize = isz;
- size = -isz;
- dirty = 1;
- wtext_update();
- draw(1);
+ if( size < 0 && isz > 0 ) {
+ this->text = text;
+ tsize = isz;
+ size = -isz;
+ dirty = 1;
+ wtext_update();
+ draw(1);
+ }
}
int BC_TextBox::get_text_rows()
void BC_TextBox::draw(int flush)
{
- int i, j, k;
+ int i, k;
int row_begin, row_end;
int highlight_x1, highlight_x2;
int need_ibeam = 1;
// Draw text with selection
set_font(font);
- for(i=0, j=0, k=text_y; i < wtext_len && k < get_h(); k += text_height) {
+ for(i=0, k=text_y; i < wtext_len && k < get_h(); k += text_height) {
// Draw row of text
row_begin = i;
wchar_t *wtext_row = &wtext[i];
- for(j=0; j<BCTEXTLEN-1 && i<wtext_len && wtext[i]!='\n'; ++i, ++j);
+ for( ; i<wtext_len && wtext[i]!='\n'; ++i );
if( (row_end=i) < wtext_len ) ++i;
if(k > top_margin-text_height && k < get_h()-bottom_margin) {
do_separators(1);
}
+int BC_TextBox::wdemand(int len)
+{
+ if( wtext && wsize >= len ) return 0;
+ int nsize = len + wlen/2 + BCTEXTLEN;
+ wchar_t *ntext = new wchar_t[nsize+1];
+ ntext[nsize] = 0;
+ memcpy(ntext, wtext, wsize*sizeof(wtext[0]));
+ delete [] wtext; wtext = ntext; wsize = nsize;
+ return 1;
+}
+
+int BC_TextBox::tdemand(int len)
+{
+ if( text && tsize >= len ) return 0;
+ int tlen = !text ? 0 : strlen(text);
+ int nsize = len + tlen/2 + BCTEXTLEN;
+ char *ntext = new char[nsize+1];
+ ntext[nsize] = 0;
+ memcpy(ntext, text, tsize*sizeof(text[0]));
+ delete [] text; text = ntext; tsize = nsize;
+ return 1;
+}
+
void BC_TextBox::insert_text(const wchar_t *wcp, int len)
{
if( len < 0 ) len = wcslen(wcp);
int wtext_len = wtext_update();
+ wdemand(wtext_len + len + 1);
if( unicode_active < 0 && highlight_letter1 < highlight_letter2 ) {
delete_selection(highlight_letter1, highlight_letter2, wtext_len);
highlight_letter2 = ibeam_letter = highlight_letter1;
}
int i, j;
- for(i=wtext_len-1, j=wtext_len+len-1; i>=ibeam_letter; i--, j--) {
- if( j >= wsize ) continue;
- wtext[j] = wtext[i];
- }
+ for( i=wtext_len, j=wtext_len+len; --i>=ibeam_letter; )
+ if( --j < wsize ) wtext[j] = wtext[i];
+ for( i=ibeam_letter,j=0; j<len; ++i, ++j )
+ if( i < wsize ) wtext[i] = wcp[j];
- for(i = ibeam_letter, j = 0; j < len; j++, i++) {
- if( i >= wsize ) break;
- wtext[i] = wcp[j];
- }
if( (wlen+=len) > wsize ) wlen = wsize;
if( (ibeam_letter+=len) > wsize ) ibeam_letter = wsize;
wtext[wlen] = 0; // wtext allocated wsize+1
else ch = -1;
return ch;
}
-
+// may be local fixed/dynamic, or shared fixed ref via set_text
char *text;
+// always local dynamic
wchar_t *wtext;
public:
+// size > 0: fixed buffer, size == 0: dynamic buffer
+// size < 0: fixed shared buffer via set_text
BC_TextBox(int x, int y, int w, int rows, int size, char *text,
int has_border=1, int font=MEDIUMFONT);
BC_TextBox(int x, int y, int w, int rows, int size, wchar_t *wtext,
const char* get_text();
const wchar_t* get_wtext();
void set_text(char *text, int isz);
+ int wdemand(int len);
+ int tdemand(int len);
int get_text_rows();
// Set top left of text view
void set_text_row(int row);
# last updated 2018/06/13 gg/pys
http:*midi*
http:*MIDI*
+
+http://bjones.it/psi-plugins/sidechain_gate
+http://dsheeler.org/plugins/tremelo
http://lsp-plug.in/plugins/lv2/comp_delay_x2_stereo
http://lsp-plug.in/plugins/lv2/graph_equalizer_x16_lr
http://lsp-plug.in/plugins/lv2/graph_equalizer_x16_ms
http://plugin.org.uk/swh-plugins/bwxover_iir
http://plugin.org.uk/swh-plugins/highpass_iir
http://plugin.org.uk/swh-plugins/lowpass_iir
+#
+# Rakarrack takes special handling to get these lv2 plugins to work;
+# the library needs to be linked using -Bsymbolic-functions ;
+# and there are places where there exist uninitialized data objects.
+#
+http://rakarrack.sourceforge.net/effects.html#DistBand
+http://rakarrack.sourceforge.net/effects.html#Reverbtron
+http://rakarrack.sourceforge.net/effects.html#Sequence
+http://rakarrack.sourceforge.net/effects.html#StereoHarm_no_mid
+http://rakarrack.sourceforge.net/effects.html#StompBox
+http://rakarrack.sourceforge.net/effects.html#StompBox_fuzz
+http://rakarrack.sourceforge.net/effects.html#Vocoder
+http://rakarrack.sourceforge.net/effects.html#dere
+http://rakarrack.sourceforge.net/effects.html#dist
+http://rakarrack.sourceforge.net/effects.html#har_no_mid
http://yoshimi.sourceforge.net/lv2_plugin
http://yoshimi.sourceforge.net/lv2_plugin_multi
urn:juced:DrumSynth
void _1080to480Main::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("1080TO480");
output.tag.set_property("FIRST_FIELD", config.first_field);
output.append_tag();
void _1080to480Main::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void _1080to540Main::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("1080TO540");
output.tag.set_property("FIRST_FIELD", config.first_field);
output.append_tag();
void _1080to540Main::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void _720to480Main::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("720TO480");
output.tag.set_property("FIRST_FIELD", config.first_field);
output.tag.set_property("DIRECTION", config.direction);
void _720to480Main::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void C41Effect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("C41");
output.tag.set_property("ACTIVE", config.active);
void C41Effect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
// Store data
output.tag.set_title("AGING");
output.tag.set_property("AREA_SCALE", config.area_scale);
void AgingMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void AudioScope::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void AudioScope::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
//printf("AudioScope::save_data %d %d %d\n", __LINE__, config.w, config.h);
output.tag.set_title("AUDIOSCOPE");
void BandSlideMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("BANDSLIDE");
output.tag.set_property("BANDS", bands);
output.tag.set_property("DIRECTION", direction);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void BandWipeMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("BANDWIPE");
output.tag.set_property("BANDS", bands);
output.tag.set_property("DIRECTION", direction);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("BLUEBANANA");
output.tag.set_property("ACTIVE", config.active);
int result = 0;
input.read_from_string(default_keyframe->get_data());
- output.set_shared_output(default_keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(default_keyframe->xbuf);
while(!result){
result = input.read_tag();
if(default_keyframe){
FileXML input;
int result = 0;
- input.set_shared_input(default_keyframe->get_data(), strlen(default_keyframe->get_data()));
+ input.set_shared_input(default_keyframe->xbuf);
while(!result){
result = input.read_tag();
FileXML input;
int result = 0;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!result){
result = input.read_tag();
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("BLUR");
output.tag.set_property("VERTICAL", config.vertical);
output.tag.set_property("HORIZONTAL", config.horizontal);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("BRIGHTNESS");
output.tag.set_property("BRIGHTNESS", config.brightness);
output.tag.set_property("CONTRAST", config.contrast);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void ChromaKey::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("CHROMAKEY");
output.tag.set_property("RED", config.red);
output.tag.set_property("GREEN", config.green);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void ChromaKeyHSV::save_data(KeyFrame * keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("CHROMAKEY_HSV");
output.tag.set_property("RED", config.red);
output.tag.set_property("GREEN", config.green);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while( !input.read_tag() ) {
if( input.tag.title_is("CHROMAKEY_HSV") ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("COLOR3WAY");
for(int i = 0; i < SECTIONS; i++)
{
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("COLORBALANCE");
output.tag.set_property("CYAN", config.cyan);
output.tag.set_property("MAGENTA", config.magenta);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void CompressorEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
config.levels.remove_all();
void CompressorEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("COMPRESSOR");
output.tag.set_property("TRIGGER", config.trigger);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("CRIKEY");
output.tag.set_property("THRESHOLD", config.threshold);
void CriKey::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
config.points.remove_all_objects();
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DECIMATE");
output.tag.set_property("INPUT_RATE", config.input_rate);
// output.tag.set_property("AVERAGED_FRAMES", config.averaged_frames);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void DeInterlaceMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DEINTERLACE");
output.tag.set_property("MODE", config.mode);
output.tag.set_property("DOMINANCE", config.dominance);
void DeInterlaceMain::read_data(KeyFrame *keyframe)
{
- FileXML input; char *data = keyframe->get_data();
- input.set_shared_input(data, strlen(data));
+ FileXML input;
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void DeInterlaceMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DEINTERLACE");
output.tag.set_property("MODE", config.mode);
// output.tag.set_property("ADAPTIVE", config.adaptive);
void DeInterlaceMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void DelayAudio::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void DelayAudio::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DELAYAUDIO");
output.tag.set_property("LENGTH", (double)config.length);
void DelayVideo::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DELAYVIDEO");
output.tag.set_property("LENGTH", (double)config.length);
void DelayVideo::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void DenoiseEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void DenoiseEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DENOISE");
output.tag.set_property("LEVEL", config.level);
void DenoiseFFTEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void DenoiseFFTEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DENOISEFFT");
output.tag.set_property("SAMPLES", config.samples);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DENOISE_VIDEO2");
output.tag.set_property("RADIUS", config.radius);
output.tag.set_property("THRESHOLD", config.threshold);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SELECTIVE_TEMPORAL_AVERAGE");
output.tag.set_property("FRAMES", config.frames);
output.tag.set_property("METHOD", config.method);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DENOISE_VIDEO");
output.tag.set_property("FRAMES", config.frames);
output.tag.set_property("THRESHOLD", config.threshold);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
// Store data
output.tag.set_title("DESCRATCH");
output.tag.set_property("THRESHOLD", config.threshold);
void DeScratchMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause xml file to store data directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DESPIKE");
output.tag.set_property("LEVEL", config.level);
{
FileXML input;
// cause xml file to read directly from text
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
result = input.read_tag();
void DiffKey::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DIFFKEY");
output.tag.set_property("THRESHOLD", config.threshold);
output.tag.set_property("SLOPE", config.slope);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("DOWNSAMPLE");
output.tag.set_property("HORIZONTAL", config.horizontal);
void DownSampleMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result) {
{
int result;
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!(result = input.read_tag()) ) {
if( !input.tag.title_is("ECHO")) continue;
void Echo::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("ECHO");
output.tag.set_property("LEVEL", config.level);
{
int result;
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!(result = input.read_tag()) ) {
if( !input.tag.title_is("ECHOCANCEL")) continue;
void EchoCancel::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("ECHOCANCEL");
output.tag.set_property("LEVEL", config.level);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("EDGE");
output.tag.set_property("AMOUNT", config.amount);
void Edge::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result=input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("FIELD_FRAME");
output.tag.set_property("DOMINANCE", config.field_dominance);
output.tag.set_property("FIRST_FRAME", config.first_frame);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("FINDOBJ");
output.tag.set_property("ALGORITHM", config.algorithm);
output.tag.set_property("USE_FLANN", config.use_flann);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("FLIP");
output.append_tag();
if(config.flip_vertical)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
config.flip_vertical = config.flip_horizontal = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("FLOWOBJ");
output.tag.set_property("DRAW_VECTORS", config.draw_vectors);
output.tag.set_property("DO_STABILIZATION", config.do_stabilization);
void FlowObj::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("FRAME_FIELD");
output.tag.set_property("DOMINANCE", config.field_dominance);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void FreeverbEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void FreeverbEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("FREEVERB");
output.tag.set_property("GAIN", config.gain);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("FREEZEFRAME");
output.append_tag();
if(config.enabled)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
config.enabled = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("GABOROBJ");
output.append_tag();
output.append_newline();
void GaborObj::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause xml file to store data directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("GAIN");
output.tag.set_property("LEVEL", config.level);
{
FileXML input;
// cause xml file to read directly from text
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
result = input.read_tag();
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("GAMMA");
output.tag.set_property("MAX", config.max);
output.tag.set_property("GAMMA", config.gamma);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("GRADIENT");
output.tag.set_property("ANGLE", config.angle);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML input;
int result = 0;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
config.points.remove_all_objects();
while(!result)
void GraphicEQ::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("GRAPHICEQ");
output.tag.set_property("WINDOW_SIZE", config.window_size);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("GREYCSTORATION");
output.tag.set_property("AMPLITUDE", config.amplitude);
void GreyCStorationMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while( !input.read_tag() ) {
if(input.tag.title_is("GREYCSTORATION")) {
void HistEqMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("HISTEQ");
output.tag.set_property("W", w);
output.tag.set_property("H", h);
void HistEqMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result=input.read_tag()) ) {
if( input.tag.title_is("HISTEQ") ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("HISTOGRAM");
char string[BCTEXTLEN];
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("HISTOGRAM");
char string[BCTEXTLEN];
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
int current_input_mode = 0;
dragID = 1;
break;
}
- if (plugin->config.smoothMode == HISTOGRAM_LINEAR)
- break;
+// if (plugin->config.smoothMode == HISTOGRAM_LINEAR)
+// break;
int xright =
(int)((current->x + current->xoffset_right - HIST_MIN_INPUT) * gui->canvas_w / FLOAT_RANGE);
void HueEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("HUESATURATION");
output.tag.set_property("HUE", config.hue);
output.tag.set_property("SATURATION", config.saturation);
void HueEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
if(input.tag.title_is("HUESATURATION"))
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("INTERPOLATEPIXELS");
output.tag.set_property("X", config.x);
output.tag.set_property("Y", config.y);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("INTERPOLATEVIDEO");
output.tag.set_property("INPUT_RATE", config.input_rate);
output.tag.set_property("USE_KEYFRAMES", config.use_keyframes);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void InvertVideoEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("INVERTVIDEO");
output.tag.set_property("R", config.r);
output.tag.set_property("G", config.g);
void InvertVideoEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
if(input.tag.title_is("INVERTVIDEO"))
void IrisSquareMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("IRISSQUARE");
output.tag.set_property("DIRECTION", direction);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("IVTC");
output.tag.set_property("FRAME_OFFSET", config.frame_offset);
output.tag.set_property("FIRST_FIELD", config.first_field);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
//float new_threshold;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("LENS");
for( int i = 0; i < FOV_CHANNELS; ++i ) {
sprintf(string, "FOCAL_LENGTH%d", i);
char string[BCTEXTLEN];
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void SoundLevelEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void SoundLevelEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SOUNDLEVEL");
output.tag.set_property("DURATION", config.duration);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("LINEARBLUR");
output.tag.set_property("RADIUS", config.radius);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void LiveVideo::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("LIVEVIDEO");
output.tag.set_property("CHANNEL", config.channel);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("LOOPAUDIO");
output.tag.set_property("SAMPLES", config.samples);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("LOOPVIDEO");
output.tag.set_property("FRAMES", config.frames);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("MOTIONCV");
output.tag.set_property("BLOCK_COUNT", config.block_count);
void MotionCVMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("MOTIONHV");
output.tag.set_property("BLOCK_COUNT", config.block_count);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("MOTION");
output.tag.set_property("BLOCK_COUNT", config.block_count);
void MotionMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("MOTION2");
char string[BCTEXTLEN];
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("MOTION51");
output.tag.set_property("HORIZ_LIMIT", config.horiz_limit);
output.tag.set_property("VERT_LIMIT", config.vert_limit);
void Motion51Main::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("MOTIONBLUR");
output.tag.set_property("RADIUS", config.radius);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("MOVEOBJ");
output.tag.set_property("DRAW_VECTORS", config.draw_vectors);
output.tag.set_property("DO_STABILIZATION", config.do_stabilization);
void MoveObj::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("OIL_PAINTING");
output.tag.set_property("RADIUS", config.radius);
output.tag.set_property("USE_INTENSITY", config.use_intensity);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("OVERLAY");
output.tag.set_property("MODE", config.mode);
output.tag.set_property("DIRECTION", config.direction);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void OverlayAudio::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void OverlayAudio::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("OVERLAY");
output.tag.set_property("OUTPUT", config.output_track);
void ParametricEQ::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void ParametricEQ::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("PARAMETRICEQ");
output.tag.set_property("WETNESS", config.wetness);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("PERSPECTIVE");
output.tag.set_property("X1", config.x1);
void PerspectiveMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("PHOTOSCALE");
output.tag.set_property("WIDTH", config.width);
output.tag.set_property("HEIGHT", config.height);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
{
FileXML input;
// cause htal file to read directly from text
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
//printf("Piano::read_data %s\n", keyframe->get_data());
int result = 0, current_osc = 0, total_oscillators = 0;
{
FileXML output;
// cause htal file to store data directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SYNTH");
output.tag.set_property("WETNESS", config.wetness);
void PitchEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void PitchEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("PITCH");
output.tag.set_property("SCALE", config.scale);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("POLAR");
output.tag.set_property("DEPTH", config.depth);
output.tag.set_property("ANGLE", config.angle);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("PUZZLEOBJ");
output.tag.set_property("PIXELS", config.pixels);
output.tag.set_property("ITERATIONS", config.iterations);
void PuzzleObj::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("RADIALBLUR");
output.tag.set_property("X", config.x);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("REFRAMERT");
// for backwards compatability, we call num scale
output.tag.set_property("SCALE", config.num);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("REMOVEGAPS");
output.tag.set_property("DURATION", config.duration);
output.tag.set_property("THRESHOLD", config.threshold);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// write configuration data as XML text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("REROUTE");
output.tag.set_property("OPERATION", config.operation);
output.tag.set_property("OUTPUT_TRACK", config.output_track);
void Reroute::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("RESAMPLERT");
output.tag.set_property("SCALE", config.num);
output.tag.set_property("DENOM", config.denom);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
//printf("Reverb::save_data 1\n");
// cause xml file to store data directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
//printf("Reverb::save_data 1\n");
output.tag.set_title("REVERB");
{
FileXML input;
// cause xml file to read directly from text
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
result = input.read_tag();
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("REVERSEAUDIO");
output.tag.set_property("ENABLED", config.enabled);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("REVERSEVIDEO");
output.tag.set_property("ENABLED", config.enabled);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("RGB601");
output.tag.set_property("DIRECTION", config.direction);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void RGBShiftEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("RGBSHIFT");
output.tag.set_property("R_DX", config.r_dx);
output.tag.set_property("R_DY", config.r_dy);
void RGBShiftEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
if(input.tag.title_is("RGBSHIFT"))
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("ROTATE");
output.tag.set_property("ANGLE", (float)config.angle);
output.tag.set_property("PIVOT_X", (float)config.pivot_x);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("RUMBLER");
output.tag.set_property("TIME_RUMBLE", config.time_rumble);
output.tag.set_property("TIME_RATE", config.time_rate);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while( !input.read_tag() ) {
if( input.tag.title_is("RUMBLER") ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
// Store data
output.tag.set_title("SCALE");
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
config.constrain = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
// Store data
output.tag.set_title("SCALERATIO");
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void ShapeWipeMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SHAPEWIPE");
output.tag.set_property("DIRECTION", direction);
output.tag.set_property("ANTIALIAS", antialias);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SHARPNESS");
output.tag.set_property("VALUE", config.sharpness);
output.tag.set_property("INTERLACE", config.interlace);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SHIFTINTERLACE");
output.tag.set_property("ODD_OFFSET", config.odd_offset);
output.tag.set_property("EVEN_OFFSET", config.even_offset);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void SlideMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SLIDE");
output.tag.set_property("MOTION_DIRECTION", motion_direction);
output.tag.set_property("DIRECTION", direction);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void Spectrogram::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void Spectrogram::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SPECTROGRAM");
output.tag.set_property("LEVEL", (double)config.level);
char string[BCTEXTLEN];
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SPHERECAM");
for( int i = 0; i < EYES; i++ ) {
char string[BCTEXTLEN];
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("STYLIZEOBJ");
output.tag.set_property("MODE", config.mode);
output.tag.set_property("SMOOTHING", config.smoothing);
void StylizeObj::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SVG");
output.tag.set_property("OUT_X", config.out_x);
{
FileXML input;
- const char *data = keyframe->get_data();
- input.set_shared_input((char*)data, strlen(data));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while( !(result = input.read_tag()) ) {
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SWAPCHANNELS");
output.tag.set_property("RED", config.red);
output.tag.set_property("GREEN", config.green);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void SwapFrames::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SWAPFRAMES");
output.tag.set_property("ON", config.on);
output.tag.set_property("SWAP_EVEN", config.swap_even);
void SwapFrames::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
if(input.tag.title_is("SWAPFRAMES"))
FileXML input;
char string[BCTEXTLEN];
// cause htal file to read directly from text
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
//printf("Synth::read_data %s\n", keyframe->get_data());
int result = 0, current_osc = 0;
char string[BCTEXTLEN];
// cause htal file to store data directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("SYNTH");
output.tag.set_property("WETNESS", config.wetness);
void ThresholdMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("THRESHOLD");
output.tag.set_property("MIN", config.min);
output.tag.set_property("MAX", config.max);
void ThresholdMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- const char *data = keyframe->get_data();
- input.set_shared_input((char *)data, strlen(data));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("TIME_AVERAGE");
output.tag.set_property("FRAMES", config.frames);
output.tag.set_property("MODE", config.mode);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("TIMEFRONT");
output.tag.set_property("ANGLE", config.angle);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("TIMESTRETCHRT");
output.tag.set_property("NUM", config.num);
output.tag.set_property("DENOM", config.denom);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
vjustification = JUSTIFY_MID;
fade_in = 0.0; fade_out = 0.0;
pixels_per_second = 100.0;
- wtext[0] = 0; wlen = 0;
+ wtext = 0; wsize = 0; wlen = 0;
title_x = title_y = 0.0;
title_w = title_h = 0;
window_w = 860;
TitleConfig::~TitleConfig()
{
+ delete [] wtext;
}
int TitleConfig::equivalent(TitleConfig &that)
fade_in = that.fade_in;
fade_out = that.fade_out;
pixels_per_second = that.pixels_per_second;
- wlen = that.wlen;
+ demand(wlen = that.wlen);
memcpy(wtext, that.wtext, that.wlen * sizeof(wchar_t));
title_x = that.title_x; title_y = that.title_y;
title_w = that.title_w; title_h = that.title_h;
fade_in = prev.fade_in;
fade_out = prev.fade_out;
pixels_per_second = prev.pixels_per_second;
- wlen = prev.wlen;
+ demand(wlen = prev.wlen);
memcpy(wtext, prev.wtext, prev.wlen * sizeof(wchar_t));
wtext[wlen] = 0;
this->title_x = prev.title_x == next.title_x ? prev.title_x :
loop_playback = prev.loop_playback;
}
+int TitleConfig::demand(long sz)
+{
+ if( wtext && wsize >= sz ) return 0;
+ delete [] wtext;
+ wsize = sz + wlen/2 + 0x1000;
+ wtext = new wchar_t[wsize+1];
+ wtext[wsize] = 0;
+ return 1;
+}
+
void TitleConfig::to_wtext(const char *from_enc, const char *text, int tlen)
{
+ demand(tlen);
wlen = BC_Resources::encode(from_enc, BC_Resources::wide_encoding,
- (char*)text,tlen, (char *)wtext,sizeof(wtext)) / sizeof(wchar_t);
+ (char*)text,tlen, (char *)wtext,sizeof(*wtext)*wsize) / sizeof(wchar_t);
while( wlen > 0 && !wtext[wlen-1] ) --wlen;
}
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("TITLE");
output.tag.set_property("FONT", config.font);
output.tag.set_property("ENCODING", config.encoding);
output.tag.set_property("LOOP_PLAYBACK", config.loop_playback);
output.append_tag();
output.append_newline();
- char text[2*sizeof(config.wtext)];
+ long tsz = 2*config.wsize + 0x1000;
+ char text[tsz];
int text_len = BC_Resources::encode(
BC_Resources::wide_encoding, DEFAULT_ENCODING,
(char*)config.wtext, config.wlen*sizeof(wchar_t),
- text, sizeof(text));
- int len = output.length(), avail = MESSAGESIZE-16 - len;
- if( text_len >= avail ) { // back off last utf8 char
- text_len = avail;
- while( text_len > 0 && (text[text_len-1] & 0xc0) == 0x80 )
- text[--text_len] = 0;
- if( text_len > 0 )
- text[--text_len] = 0;
- }
+ text, tsz);
output.append_text(text, text_len);
output.tag.set_title("/TITLE");
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void TitleMain::insert_text(const wchar_t *wtxt, int pos)
{
int len = wcslen(wtxt);
- wchar_t *wtext = config.wtext;
- int wsize = sizeof(config.wtext)-1;
int wlen = config.wlen;
if( pos < 0 ) pos = 0;
if( pos > wlen ) pos = wlen;
-
- for( int i=wlen-1, j=wlen+len-1; i>=pos; --i,--j ) {
- if( j >= wsize ) continue;
+ config.demand(wlen + len);
+ int wsize1 = config.wsize-1;
+ wchar_t *wtext = config.wtext;
+ for( int i=wlen, j=wlen+len; --i>=pos; ) {
+ if( --j >= wsize1 ) continue;
wtext[j] = wtext[i];
}
for( int i=pos, j=0; j<len; ++i,++j ) {
- if( i >= wsize ) break;
+ if( i >= wsize1 ) break;
wtext[i] = wtxt[j];
}
- if( (wlen+=len) > wsize ) wlen = wsize;
+ if( (wlen+=len) > wsize1 ) wlen = wsize1;
wtext[wlen] = 0;
config.wlen = wlen;
}
double fade_in, fade_out;
float pixels_per_second; // Speed of motion
// Text to display
- wchar_t wtext[3*BCTEXTLEN];
- int wlen;
+ wchar_t *wtext;
+ long wsize, wlen;
// Position in frame relative to top left
float title_x, title_y;
int title_w, title_h;
char background_path[BCTEXTLEN];
void convert_text();
+ int demand(long sz);
// Time Code Format
int timecode_format;
text_title = 0;
text = 0;
text_chars = 0;
- text_bfrsz = 0;
justify_title = 0;
left = 0; center = 0; right = 0;
top = 0; mid = 0; bottom = 0;
x += text_title->get_w() + 20;
int wid = BC_Title::calculate_w(this,"0")*10;
add_tool(text_chars = new TitleTextChars(x,y,wid));
- x += text_chars->get_w() + 20;
- add_tool(text_bfrsz = new TitleTextBfrSz(x,y,wid));
y += text_title->get_h() + margin;
x = margin;
void TitleWindow::update_stats()
{
text_chars->update(client->config.wlen);
- int len = MESSAGESIZE - BCTEXTLEN - strlen(text->get_text()) - 1;
- if( len < 0 ) len = 0;
- text_bfrsz->update(len);
}
void TitleWindow::update()
fade_out->update((float)client->config.fade_out);
font->update(client->config.font);
check_style(client->config.font,0);
- text->update(&client->config.wtext[0]);
+ text->update(client->config.wtext ? &client->config.wtext[0] : L"");
speed->update(client->config.pixels_per_second);
outline->update((int64_t)client->config.outline_size);
#ifdef USE_STROKER
int x, int y, int w, int h)
: BC_ScrollTextBox(window, x, y, w,
BC_TextBox::pixels_to_rows(window, MEDIUMFONT, h),
- client->config.wtext, 8192)
+ client->config.wtext, 0)
{
this->client = client;
this->window = window;
int TitleText::handle_event()
{
window->fonts_popup->deactivate();
- int text_len = strlen(get_text());
- int avail = MESSAGESIZE - BCTEXTLEN;
- if( text_len >= avail ) { // back off last utf8 char
- char text[2*sizeof(client->config.wtext)];
- strcpy(text, get_text());
- text_len = avail;
- while( text_len > 0 && (text[text_len-1] & 0xc0) == 0x80 )
- text[--text_len] = 0;
- if( text_len > 0 )
- text[--text_len] = 0;
- update(text);
- }
- int len = sizeof(client->config.wtext) / sizeof(wchar_t);
- wcsncpy(client->config.wtext, get_wtext(), len);
- client->config.wtext[len-1] = 0;
- client->config.wlen = wcslen(client->config.wtext);
+ const wchar_t *wtext = get_wtext();
+ long wlen = wcslen(wtext);
+ client->config.demand(wlen);
+ wcsncpy(client->config.wtext, wtext, client->config.wsize);
+ client->config.wlen = wlen;
window->update_stats();
window->send_configure_change();
return 1;
return BC_Title::update(text, 0);
}
-TitleTextBfrSz::TitleTextBfrSz(int x, int y, int w)
- : BC_Title(x, y, "", MEDIUMFONT, -1, 0, w)
-{
-}
-TitleTextBfrSz::~TitleTextBfrSz()
-{
-}
-int TitleTextBfrSz::update(int n)
-{
- char text[BCSTRLEN];
- sprintf(text, _("bfrsz: %d "),n);
- return BC_Title::update(text, 0);
-}
-
TitleDropShadow::TitleDropShadow(TitleMain *client, TitleWindow *window, int x, int y)
: BC_TumbleTextBox(window, client->config.dropshadow,
class TitleFont;
class TitleText;
class TitleTextChars;
-class TitleTextBfrSz;
class TitleX;
class TitleY;
class TitleW;
BC_Title *text_title;
TitleText *text;
TitleTextChars *text_chars;
- TitleTextBfrSz *text_bfrsz;
BC_Title *justify_title;
TitleLeft *left;
TitleCenter *center;
TitleTextChars(int x, int y, int w);
~TitleTextChars();
};
-class TitleTextBfrSz : public BC_Title
-{
-public:
- int update(int n);
- TitleTextBfrSz(int x, int y, int w);
- ~TitleTextBfrSz();
-};
class TitleX : public BC_TumbleTextBox
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
// Store data
output.tag.set_title("TRANSLATE");
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("UNSHARP");
output.tag.set_property("RADIUS", config.radius);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("VIDEOSCOPE");
void VideoScopeEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void Vocoder::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
void Vocoder::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("VOCODER");
output.tag.set_property("WETNESS", config.wetness);
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("WAVE");
output.tag.set_property("MODE", config.mode);
output.tag.set_property("REFLECTIVE", config.reflective);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("WHIRL");
output.tag.set_property("ANGLE", config.angle);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
void WipeMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("WIPE");
output.tag.set_property("DIRECTION", direction);
output.append_tag();
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
void YUVEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("YUV");
output.tag.set_property("Y", config.y);
output.tag.set_property("U", config.u);
void YUVEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
if(input.tag.title_is("YUV"))
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("YUV411");
output.tag.set_property("OFFSET",config.offset);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
config.avg_vertical = config.int_horizontal = 0;
void YUVShiftEffect::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("YUVSHIFT");
output.tag.set_property("Y_DX", config.y_dx);
output.tag.set_property("Y_DY", config.y_dy);
void YUVShiftEffect::read_data(KeyFrame *keyframe)
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
if(input.tag.title_is("YUVSHIFT"))
void ZoomMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("ZOOMTRANSITION");
output.tag.set_property("MAGNIFICATION_X", max_magnification_x);
output.tag.set_property("MAGNIFICATION_Y", max_magnification_y);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
while(!input.read_tag())
{
FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("ZOOMBLUR");
output.tag.set_property("X", config.x);
{
FileXML input;
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;