Commit a9159743 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Vlad Zahorodnii
Browse files

screencast: Also send the header when we just send the cursor update

When sending a frame that just updates the cursor, also increment the
sequential value of the frame


(cherry picked from commit 7f73264f)
parent e10ecec3
Pipeline #196994 passed with stage
in 28 minutes and 28 seconds
......@@ -468,7 +468,13 @@ void ScreenCastStream::recordFrame(const QRegion &damagedRegion)
}
}
spa_meta_header *spaHeader = (spa_meta_header *)spa_buffer_find_meta_data(spa_buffer, SPA_META_Header, sizeof(spaHeader));
addHeader(spa_buffer);
tryEnqueue(buffer);
}
void ScreenCastStream::addHeader(spa_buffer *spaBuffer)
{
spa_meta_header *spaHeader = (spa_meta_header *)spa_buffer_find_meta_data(spaBuffer, SPA_META_Header, sizeof(spaHeader));
if (spaHeader) {
spaHeader->flags = 0;
spaHeader->dts_offset = 0;
......@@ -480,8 +486,6 @@ void ScreenCastStream::recordFrame(const QRegion &damagedRegion)
}
spaHeader->pts = (timestamp - m_start.value()).count();
}
tryEnqueue(buffer);
}
void ScreenCastStream::recordCursor()
......@@ -511,6 +515,7 @@ void ScreenCastStream::recordCursor()
spa_buffer->datas[0].chunk->size = 0;
sendCursorData(Cursors::self()->currentCursor(),
(spa_meta_cursor *)spa_buffer_find_meta_data(spa_buffer, SPA_META_Cursor, sizeof(spa_meta_cursor)));
addHeader(spa_buffer);
enqueue();
}
......
......@@ -79,6 +79,7 @@ private:
void updateParams();
void coreFailed(const QString &errorMessage);
void sendCursorData(Cursor *cursor, spa_meta_cursor *spa_cursor);
void addHeader(spa_buffer *spaBuffer);
void newStreamParams();
void tryEnqueue(pw_buffer *buffer);
void enqueue();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment