15 KeyFrame::KeyFrame(EDL *edl, KeyFrames *autos)
16 : Auto(edl, (Autos*)autos)
24 void KeyFrame::load(FileXML *file)
26 //printf("KeyFrame::load 1\n");
27 // Shouldn't be necessary
28 // position = file->tag.get_property("POSITION", position);
29 //printf("KeyFrame::load 1\n");
31 file->read_text_until("/KEYFRAME", data, MESSAGESIZE);
32 //printf("KeyFrame::load 2 data=\n%s\nend of data\n", data);
35 void KeyFrame::copy(int64_t start, int64_t end, FileXML *file, int default_auto)
37 //printf("KeyFrame::copy 1 %d\n%s\n", position - start, data);
38 file->tag.set_title("KEYFRAME");
40 file->tag.set_property("POSITION", 0);
42 file->tag.set_property("POSITION", position - start);
43 // default_auto converts a default auto to a normal auto
44 if(is_default && !default_auto)
45 file->tag.set_property("DEFAULT", 1);
47 // Can't put newlines in because these would be reimported and resaved along
49 // file->append_newline();
51 file->append_text(data);
52 // file->append_newline();
54 file->tag.set_title("/KEYFRAME");
56 file->append_newline();
60 void KeyFrame::copy_from(Auto *that)
62 copy_from((KeyFrame*)that);
65 void KeyFrame::copy_from(KeyFrame *that)
67 Auto::copy_from(that);
68 KeyFrame *keyframe = (KeyFrame*)that;
69 strcpy(data, keyframe->data);
70 position = keyframe->position;
74 int KeyFrame::identical(KeyFrame *src)
76 return !strcasecmp(src->data, data);
80 int KeyFrame::operator==(Auto &that)
82 return identical((KeyFrame*)&that);
85 int KeyFrame::operator==(KeyFrame &that)
87 return identical(&that);
93 printf(" position: %lld\n", position);
94 printf(" data: %s\n", data);
99 // c-file-style: "linux"