minor cleanup and documentation of render functions
This commit is contained in:
+17
-19
@@ -200,7 +200,7 @@ GLuint compose_sequence(ComposeSequenceParams ¶ms) {
|
||||
|
||||
// open if not open
|
||||
if (!c->open) {
|
||||
open_clip(c, !params.rendering);
|
||||
open_clip(c, !params.single_threaded);
|
||||
}
|
||||
|
||||
clip_is_active = true;
|
||||
@@ -225,7 +225,7 @@ GLuint compose_sequence(ComposeSequenceParams ¶ms) {
|
||||
// if the clip is a nested sequence or null clip, just open it
|
||||
|
||||
if (is_clip_active(c, playhead)) {
|
||||
if (!c->open) open_clip(c, !params.rendering);
|
||||
if (!c->open) open_clip(c, !params.single_threaded);
|
||||
clip_is_active = true;
|
||||
} else if (c->finished_opening) {
|
||||
close_clip(c, false);
|
||||
@@ -584,19 +584,18 @@ GLuint compose_sequence(ComposeSequenceParams ¶ms) {
|
||||
glPopMatrix();
|
||||
}
|
||||
} else {
|
||||
if (params.render_audio || (config.enable_audio_scrubbing && audio_scrub && params.seq->playhead > c->timeline_in)) {
|
||||
if (c->media != nullptr && c->media->get_type() == MEDIA_TYPE_SEQUENCE) {
|
||||
params.nests.append(c);
|
||||
compose_sequence(params);
|
||||
params.nests.removeLast();
|
||||
} else {
|
||||
if (c->lock.tryLock()) {
|
||||
// clip is not caching, start caching audio
|
||||
cache_clip(c, playhead, c->audio_reset, !params.render_audio, params.nests, params.playback_speed);
|
||||
c->lock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (c->media != nullptr && c->media->get_type() == MEDIA_TYPE_SEQUENCE) {
|
||||
params.nests.append(c);
|
||||
compose_sequence(params);
|
||||
params.nests.removeLast();
|
||||
} else {
|
||||
if (c->lock.tryLock()) {
|
||||
// Check whether cacher is currently active, if not activate it now
|
||||
|
||||
cache_clip(c, playhead, c->audio_reset, (params.viewer != nullptr && !params.viewer->playing), params.nests, params.playback_speed);
|
||||
c->lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
// visually update all the keyframe values
|
||||
if (c->sequence == params.seq) { // only if you can currently see them
|
||||
@@ -631,15 +630,14 @@ GLuint compose_sequence(ComposeSequenceParams ¶ms) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void compose_audio(Viewer* viewer, Sequence* seq, bool render_audio, int playback_speed) {
|
||||
void compose_audio(Viewer* viewer, Sequence* seq, int playback_speed) {
|
||||
ComposeSequenceParams params;
|
||||
params.viewer = viewer;
|
||||
params.ctx = nullptr;
|
||||
params.seq = seq;
|
||||
params.video = false;
|
||||
params.render_audio = render_audio;
|
||||
params.video = false;
|
||||
params.gizmos = nullptr;
|
||||
params.rendering = audio_rendering;
|
||||
params.single_threaded = audio_rendering;
|
||||
params.playback_speed = playback_speed;
|
||||
params.blend_mode_program = nullptr;
|
||||
compose_sequence(params);
|
||||
|
||||
Reference in New Issue
Block a user