From 7d584fb4de45a3947d081372459734a7ab89b56e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 1 Feb 2015 20:21:54 -0500 Subject: [PATCH] Update for backwards compatibility with GFE 2.1.x (WIP) --- Limelight/Stream/Connection.h | 2 +- Limelight/Stream/Connection.m | 6 ++++-- limelight-common-c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Limelight/Stream/Connection.h b/Limelight/Stream/Connection.h index 4a1a734d..989bfe26 100644 --- a/Limelight/Stream/Connection.h +++ b/Limelight/Stream/Connection.h @@ -25,7 +25,7 @@ @interface Connection : NSOperation --(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id)callbacks; +-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id)callbacks serverMajorVersion:(int)serverMajorVersion; -(void) terminate; -(void) terminateInternal; -(void) main; diff --git a/Limelight/Stream/Connection.m b/Limelight/Stream/Connection.m index 5352f003..1dc6200b 100644 --- a/Limelight/Stream/Connection.m +++ b/Limelight/Stream/Connection.m @@ -20,6 +20,7 @@ CONNECTION_LISTENER_CALLBACKS _clCallbacks; DECODER_RENDERER_CALLBACKS _drCallbacks; AUDIO_RENDERER_CALLBACKS _arCallbacks; + int _serverMajorVersion; } static OpusDecoder *opusDecoder; @@ -294,12 +295,13 @@ void ClDisplayTransientMessage(char* message) LiStopConnection(); } --(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id)callbacks +-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id)callbacks serverMajorVersion:(int)serverMajorVersion { self = [super init]; _host = config.hostAddr; renderer = myRenderer; _callbacks = callbacks; + _serverMajorVersion = serverMajorVersion; _streamConfig.width = config.width; _streamConfig.height = config.height; _streamConfig.fps = config.frameRate; @@ -431,7 +433,7 @@ static OSStatus playbackCallback(void *inRefCon, &_drCallbacks, &_arCallbacks, &dummyPlCallbacks, - NULL, 0); + NULL, 0, _serverMajorVersion); } diff --git a/limelight-common-c b/limelight-common-c index 7883ce67..0fa1a02e 160000 --- a/limelight-common-c +++ b/limelight-common-c @@ -1 +1 @@ -Subproject commit 7883ce67cdf84c267f2cb51e5536ef45dc51549b +Subproject commit 0fa1a02e0a7ac560eff6411b238394459549fd6c