1. first fix is trivial enchancement to filexml.C which makes files in avarage
10% smaller, by encoding doubles and floats that are actually ints, as ints...
it makes files more readable, smaller .. and that means faster also.
I have come to the project sizes where number of clips and media files
(houndreds of both) starts to make cinelerra very very slow due to undo saving
xml at every operation... so even 10% is better than nothing. There are more
possibilities for speedups in generating the XML, but i am not interested in
fixing them all now, since the previous one and this make cinelerra usable for
me again.
2. second fix is a fix for regression when i added sentinel edit at all lists.
pasting media files pasted a veeery long edl by mistake. the fix is one liner
bye
andraz
--- hvirtual-cvs/cinelerra/filexml.C 2006-02-11 10:56:51.000000000 +0100
+++ hvirtual-2/cinelerra/filexml.C 2006-05-20 10:45:12.000000000 +0200
@@ -726,14 +726,20 @@
int XMLTag::set_property(char *text, float value)
{
- sprintf(temp_string, "%.6e", value);
+ if (value - (float)((int64_t)value) == 0)
+ sprintf(temp_string, "%lld", (int64_t)value);
+ else
+ sprintf(temp_string, "%.6e", value);
set_property(text, temp_string);
return 0;
}
int XMLTag::set_property(char *text, double value)
{
- sprintf(temp_string, "%.16e", value);
+ if (value - (double)((int64_t)value) == 0)
+ sprintf(temp_string, "%lld", (int64_t)value);
+ else
+ sprintf(temp_string, "%.16e", value);
set_property(text, temp_string);
return 0;
}
--- hvirtual-cvs/cinelerra/track.C 2006-05-05 00:30:32.000000000 +0200
+++ hvirtual-2/cinelerra/track.C 2006-05-20 11:52:47.000000000 +0200
@@ -345,6 +345,7 @@
to_units(length, 1),
to_units(position, 0),
track_number);
+ edits->loaded_length += to_units(length, 1);
}
// Insert data