Commit 6731e132 authored by Alexandre Lision's avatar Alexandre Lision

renderer: adapt to daemon API

Daemon exposes a new API to fix the concurrent access problem.
Renderer class API has changed, this patch synchronizes on it.

Issue: #81542
Change-Id: I11a89a1e6c4cd4fbc185f7eb8ebc909f2c9fe544
parent 61d78a49
......@@ -356,13 +356,16 @@
-(void) renderer: (Video::Renderer*)renderer renderFrameForView:(NSView*) view
{
auto data = renderer->currentFrame();
QSize res = renderer->size();
auto buf = reinterpret_cast<const unsigned char*>(data.data());
auto frame_ptr = renderer->currentFrame();
auto frame_data = frame_ptr.ptr;
if (!frame_data)
return;
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef newContext = CGBitmapContextCreate((void *)buf,
CGContextRef newContext = CGBitmapContextCreate(frame_data,
res.width(),
res.height(),
8,
......
......@@ -165,13 +165,15 @@ QMetaObject::Connection previewStopped;
-(void) renderer: (Video::Renderer*)renderer renderFrameForView:(NSView*) view
{
auto data = renderer->currentFrame();
QSize res = renderer->size();
auto buf = reinterpret_cast<const unsigned char*>(data.data());
auto frame_ptr = renderer->currentFrame();
auto frame_data = frame_ptr.ptr;
if (!frame_data)
return;
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef newContext = CGBitmapContextCreate((void *)buf,
CGContextRef newContext = CGBitmapContextCreate(frame_data,
res.width(),
res.height(),
8,
......
Markdown is supported
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