This commit is contained in:
itsmattkc
2019-03-31 11:18:30 +11:00
parent d0a4ba6b19
commit a0f6299061
4 changed files with 20 additions and 3 deletions
+2 -1
View File
@@ -424,8 +424,9 @@ void SetAudioWakeObject(QObject *o)
audio_wake_mutex.unlock();
}
void WakeAudioWakeObject() {
void WakeAudioWakeObject() {
QObject* audio_wake_object = GetAudioWakeObject();
if (audio_wake_object != nullptr) {
QMetaObject::invokeMethod(audio_wake_object, "play_wake", Qt::QueuedConnection);
}
+1
View File
@@ -1194,6 +1194,7 @@ void Cacher::Open()
void Cacher::Cache(long playhead, bool scrubbing, QVector<Clip*>& nests, int playback_speed)
{
if (!is_valid_state_) {
return;
}
+4 -1
View File
@@ -487,7 +487,7 @@ void ExportThread::Export()
// If we're exporting audio, copy audio from the buffer into an AVFrame for encoding
if (params_.audio_enabled) {
if (waiting_for_audio_) {
if (waiting_for_audio_ && !interrupt_) {
waitCond.wait(&mutex);
}
@@ -685,7 +685,10 @@ bool ExportThread::WasInterrupted()
void ExportThread::Interrupt()
{
mutex.lock();
interrupt_ = true;
waitCond.wakeAll();
mutex.unlock();
}
void ExportThread::play_wake()
+13 -1
View File
@@ -278,6 +278,7 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams &params) {
}
if (params.video) {
// set default coordinates based on the sequence, with 0 in the direct center
glPushMatrix();
glLoadIdentity();
@@ -287,6 +288,7 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams &params) {
int half_width = s->width/2;
int half_height = s->height/2;
glOrtho(-half_width, half_width, -half_height, half_height, -1, 10);
}
// loop through current clips
@@ -609,7 +611,17 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams &params) {
params.nests.removeLast();
} else {
// Check whether cacher is currently active, if not activate it now
if (c->cache_lock.tryLock()) {
bool got_mutex2 = false;
if (params.wait_for_mutexes) {
c->cache_lock.lock();
got_mutex2 = true;
} else {
got_mutex2 = c->cache_lock.tryLock(got_mutex2);
}
if (got_mutex2) {
c->cache_lock.unlock();