SourceImpl: Add no-copy PutFrame.

This commit is contained in:
Peter Johnson
2016-12-02 19:14:59 -08:00
parent ef39713219
commit 9a8f66e3e5
2 changed files with 5 additions and 0 deletions

View File

@@ -301,6 +301,10 @@ void SourceImpl::PutFrame(VideoMode::PixelFormat pixelFormat, int width,
<< " bytes)");
std::memcpy(frameData->data, data.data(), data.size());
PutFrame(std::move(frameData));
}
void SourceImpl::PutFrame(std::unique_ptr<Frame::Data> frameData) {
// Update frame
{
std::lock_guard<std::mutex> lock{m_frameMutex};