Update for backwards compatibility with GFE 2.1.x (WIP)

This commit is contained in:
Cameron Gutman
2015-02-01 20:21:54 -05:00
parent f300119d23
commit 7d584fb4de
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
@interface Connection : NSOperation <NSStreamDelegate> @interface Connection : NSOperation <NSStreamDelegate>
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks; -(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks serverMajorVersion:(int)serverMajorVersion;
-(void) terminate; -(void) terminate;
-(void) terminateInternal; -(void) terminateInternal;
-(void) main; -(void) main;
+4 -2
View File
@@ -20,6 +20,7 @@
CONNECTION_LISTENER_CALLBACKS _clCallbacks; CONNECTION_LISTENER_CALLBACKS _clCallbacks;
DECODER_RENDERER_CALLBACKS _drCallbacks; DECODER_RENDERER_CALLBACKS _drCallbacks;
AUDIO_RENDERER_CALLBACKS _arCallbacks; AUDIO_RENDERER_CALLBACKS _arCallbacks;
int _serverMajorVersion;
} }
static OpusDecoder *opusDecoder; static OpusDecoder *opusDecoder;
@@ -294,12 +295,13 @@ void ClDisplayTransientMessage(char* message)
LiStopConnection(); LiStopConnection();
} }
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks -(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks serverMajorVersion:(int)serverMajorVersion
{ {
self = [super init]; self = [super init];
_host = config.hostAddr; _host = config.hostAddr;
renderer = myRenderer; renderer = myRenderer;
_callbacks = callbacks; _callbacks = callbacks;
_serverMajorVersion = serverMajorVersion;
_streamConfig.width = config.width; _streamConfig.width = config.width;
_streamConfig.height = config.height; _streamConfig.height = config.height;
_streamConfig.fps = config.frameRate; _streamConfig.fps = config.frameRate;
@@ -431,7 +433,7 @@ static OSStatus playbackCallback(void *inRefCon,
&_drCallbacks, &_drCallbacks,
&_arCallbacks, &_arCallbacks,
&dummyPlCallbacks, &dummyPlCallbacks,
NULL, 0); NULL, 0, _serverMajorVersion);
} }