Dark Mode & Stream Overlay [macOS] (#315)

* dark mode & stream overlay

* removed all redundant imports

* update for the new xcode version with fixes for the new 'implicitly retains self warning'

* reworked the overlay view

* cleaning up unused variables

* small corrections
This commit is contained in:
Felix Kratz
2018-04-22 06:44:22 +02:00
committed by Cameron Gutman
parent 74283a6763
commit f759f719e6
50 changed files with 358 additions and 146 deletions

View File

@@ -7,11 +7,12 @@
//
#import "VideoDecoderRenderer.h"
#import "StreamView.h"
#include "Limelight.h"
@implementation VideoDecoderRenderer {
OSView *_view;
StreamView* _view;
AVSampleBufferDisplayLayer* displayLayer;
Boolean waitingForSps, waitingForPps, waitingForVps;
@@ -54,7 +55,7 @@
}
}
- (id)initWithView:(OSView*)view
- (id)initWithView:(StreamView*)view
{
self = [super init];
@@ -68,6 +69,9 @@
- (void)setupWithVideoFormat:(int)videoFormat
{
self->videoFormat = videoFormat;
#if !TARGET_OS_IPHONE
_view.codec = videoFormat;
#endif
}
#define FRAME_START_PREFIX_SIZE 4
@@ -335,7 +339,9 @@
}
[displayLayer enqueueSampleBuffer:sampleBuffer];
#if !TARGET_OS_IPHONE
_view.frameCount++;
#endif
// Dereference the buffers
CFRelease(blockBuffer);
CFRelease(sampleBuffer);