本文整理汇总了C++中FileXML::rewind方法的典型用法代码示例。如果您正苦于以下问题:C++ FileXML::rewind方法的具体用法?C++ FileXML::rewind怎么用?C++ FileXML::rewind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileXML
的用法示例。
在下文中一共展示了FileXML::rewind方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: move_edits
void Tracks::move_edits(ArrayList<Edit*> *edits,
Track *track,
double position,
int edit_labels, // Ignored
int edit_plugins, // Ignored
int edit_autos) // Ignored
{
//printf("Tracks::move_edits 1\n");
for(Track *dest_track = track; dest_track; dest_track = dest_track->next)
{
if(dest_track->record)
{
// Need a local copy of the source edit since the original source edit may
// change in the editing operation.
Edit *source_edit = 0;
Track *source_track = 0;
// Get source track
if(dest_track->data_type == TRACK_AUDIO)
{
int current_aedit = 0;
while(current_aedit < edits->total &&
edits->values[current_aedit]->track->data_type != TRACK_AUDIO)
current_aedit++;
if(current_aedit < edits->total)
{
source_edit = edits->values[current_aedit];
source_track = source_edit->track;
edits->remove_number(current_aedit);
}
}
else
if(dest_track->data_type == TRACK_VIDEO)
{
int current_vedit = 0;
while(current_vedit < edits->total &&
edits->values[current_vedit]->track->data_type != TRACK_VIDEO)
current_vedit++;
if(current_vedit < edits->total)
{
source_edit = edits->values[current_vedit];
source_track = source_edit->track;
edits->remove_number(current_vedit);
}
}
//printf("Tracks::move_edits 2 %s %s %d\n", source_track->title, dest_track->title, source_edit->length);
if(source_edit)
{
// Copy keyframes
FileXML temp;
AutoConf temp_autoconf;
int64_t position_i = source_track->to_units(position, 0);
// Source edit changes
int64_t source_length = source_edit->length;
temp_autoconf.set_all(1);
source_track->automation->copy(source_edit->startproject,
source_edit->startproject + source_edit->length,
&temp,
0,
1);
temp.terminate_string();
temp.rewind();
// Insert new keyframes
//printf("Tracks::move_edits 2 %d %p\n", result->startproject, result->asset);
source_track->automation->clear(source_edit->startproject,
source_edit->startproject + source_edit->length,
&temp_autoconf,
1);
int64_t position_a = position_i;
if (dest_track == source_track)
{
if (position_a > source_edit->startproject)
position_a -= source_length;
}
dest_track->automation->paste_silence(position_a,
position_a + source_length);
while(!temp.read_tag())
dest_track->automation->paste(position_a,
source_length,
1.0,
&temp,
0,
1,
&temp_autoconf);
// Insert new edit
Edit *dest_edit = dest_track->edits->shift(position_i,
source_length);
Edit *result = dest_track->edits->insert_before(dest_edit,
new Edit(edl, dest_track));
//.........这里部分代码省略.........