void KeyFrame::get_diff(KeyFrame *src,
- BC_Hash **params,
- char **text,
- char **extra)
+ BC_Hash **params, char **text, char **extra)
{
- const int debug = 0;
- FileXML input;
- input.set_shared_input(data, strlen(data));
- BC_Hash this_params;
- char *this_text = 0;
- char *this_extra = 0;
- BC_Hash src_parameters;
- char *src_text = 0;
- char *src_extra = 0;
+ BC_Hash this_params; char *this_text = 0, *this_extra = 0;
+ BC_Hash src_params; char *src_text = 0, *src_extra = 0;
get_contents(&this_params, &this_text, &this_extra);
- src->get_contents(&src_parameters, &src_text, &src_extra);
-
-if(debug) printf("KeyFrame::get_diff %d %d %d\n",
-__LINE__,
-this_params.size(),
-src_parameters.size());
+ src->get_contents(&src_params, &src_text, &src_extra);
// Capture changed parameters
char this_value[BCTEXTLEN];
- for(int i = 0; i < MIN(this_params.size(), src_parameters.size()); i++)
- {
- const char *src_key = src_parameters.get_key(i);
- const char *src_value = src_parameters.get_value(i);
+ int m = MIN(this_params.size(), src_params.size());
+ for( int i=0; i<m; ++i ) {
+ const char *src_key = src_params.get_key(i);
+ const char *src_value = src_params.get_value(i);
this_value[0] = 0;
this_params.get(src_key, this_value);
-if(debug) printf("KeyFrame::get_diff %d %s %s %s\n",
-__LINE__,
-src_key,
-src_value,
-this_value);
// Capture values which differ
- if(strcmp(src_value, this_value))
- {
+ if( strcmp(src_value, this_value) ) {
if(!(*params)) (*params) = new BC_Hash;
(*params)->update(src_key, src_value);
}
// Capture text which differs
- if( !this_text || strcmp(this_text, src_text))
+ if( !this_text || strcmp(this_text, src_text) )
(*text) = cstrdup(src_text);
- if( !this_extra || strcmp(this_extra, src_extra))
+ if( !this_extra || strcmp(this_extra, src_extra) )
(*extra) = cstrdup(src_extra);
-
delete [] this_text;
delete [] this_extra;
delete [] src_text;
void KeyFrames::update_parameter(KeyFrame *src)
{
- const int debug = 0;
// Create new keyframe if auto keyframes or replace entire keyframe.
double selection_start = edl->local_session->get_selectionstart(0);
double selection_end = edl->local_session->get_selectionend(0);
selection_start = edl->align_to_frame(selection_start, 0);
selection_end = edl->align_to_frame(selection_end, 0);
- if(EQUIV(selection_start, selection_end))
- {
-// Search for keyframe to write to
+ if( EQUIV(selection_start, selection_end) ) {
+// Search for keyframe to write
KeyFrame *dst = get_keyframe();
-
dst->copy_data(src);
}
- else
+ else {
// Replace changed parameter in all selected keyframes.
- {
BC_Hash *params = 0;
- char *text = 0;
- char *extra = 0;
-
-
+ char *text = 0, *extra = 0;
// Search all keyframes in selection but don't create a new one.
int64_t start = track->to_units(selection_start, 0);
int64_t end = track->to_units(selection_end, 0);
- KeyFrame *current = get_prev_keyframe(
- start,
- PLAY_FORWARD);
-
+ KeyFrame *current = get_prev_keyframe(start, PLAY_FORWARD);
// The first one determines the changed parameters since it is the one displayed
-// in the GUI.
- current->get_diff(src,
- ¶ms,
- &text,
- &extra);
-
-
-if(debug) printf("KeyFrames::update_parameter %d params=%p position=%jd start=%jd\n",
- __LINE__, params, current->position, track->to_units(start, 0));
-
-if(debug && params)
-{
-for(int i = 0; i < params->size(); i++)
-printf("KeyFrames::update_parameter %d changed=%s %s\n",
-__LINE__,
-params->get_key(i),
-params->get_value(i));
-}
-
+ current->get_diff(src, ¶ms, &text, &extra);
// Always update the first one
- current->update_parameter(params,
- text,
- extra);
- for(current = (KeyFrame*)NEXT ; current && current->position < end; current = (KeyFrame*)NEXT)
- {
-if(debug) printf("KeyFrames::update_parameter %d position=%jd\n",
- __LINE__, current->position);
- current->update_parameter(params,
- text,
- extra);
- }
+ current->update_parameter(params, text, extra);
+ for( current = (KeyFrame*)NEXT; current; current = (KeyFrame*)NEXT ) {
+ if( current->position >= end ) break;
+ current->update_parameter(params, text, extra);
+ }
delete params;
delete [] text,
delete [] extra;
server->mwindow->undo->update_undo_before(_("tweek"), this);
#ifdef USE_KEYFRAME_SPANNING
KeyFrame keyframe;
- keyframe.copy_from(server->get_keyframe());
save_data(&keyframe);
server->apply_keyframe(&keyframe);
#else
#ifndef __VERSIONINFO_H__
#define __VERSIONINFO_H__
-#define CINELERRA_VERSION "Unity"
+#define CINELERRA_VERSION "Unify"
#define REPOMAINTXT "git://git.cinelerra-cv.org/goodguy/cinelerra.git\n"
#define COPYRIGHT_DATE "2018"
#define COPYRIGHTTEXT1 "(c) 2006-2018 Heroine Virtual Ltd. by Adam Williams\n"
chorus in_gain=0.400000:out_gain=0.400000:delays=1|1:decays=1|1:speeds=1|1:depths=1|1
chromakey
#codecview
-#color
+color
colorbalance
colorchannelmixer
colorkey
lut3d
lutrgb
lutyuv
-#mandelbrot
+mandelbrot
#maskedclamp
#maskedmerge
mcdeint