mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-15 21:21:45 +00:00
Only dispatch_async on limelight-common's threads
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks;
|
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks;
|
||||||
-(void) terminate;
|
-(void) terminate;
|
||||||
|
-(void) terminateInternal;
|
||||||
-(void) main;
|
-(void) main;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ void ClDisplayTransientMessage(char* message)
|
|||||||
[_callbacks displayTransientMessage: message];
|
[_callbacks displayTransientMessage: message];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) terminate
|
-(void) terminateInternal
|
||||||
{
|
{
|
||||||
// We dispatch this async to get out because this can be invoked
|
// We dispatch this async to get out because this can be invoked
|
||||||
// on a thread inside common and we don't want to deadlock
|
// on a thread inside common and we don't want to deadlock
|
||||||
@@ -285,6 +285,13 @@ void ClDisplayTransientMessage(char* message)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void) terminate
|
||||||
|
{
|
||||||
|
// We're guaranteed to not be on a limelight-common thread
|
||||||
|
// here so it's safe to call stop directly
|
||||||
|
LiStopConnection();
|
||||||
|
}
|
||||||
|
|
||||||
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks
|
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks
|
||||||
{
|
{
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
|||||||
@@ -14,5 +14,6 @@
|
|||||||
|
|
||||||
- (id) initWithConfig:(StreamConfiguration*)config renderView:(UIView*)view connectionCallbacks:(id<ConnectionCallbacks>)callback;
|
- (id) initWithConfig:(StreamConfiguration*)config renderView:(UIView*)view connectionCallbacks:(id<ConnectionCallbacks>)callback;
|
||||||
- (void) stopStream;
|
- (void) stopStream;
|
||||||
|
- (void) stopStreamInternal;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -79,11 +79,20 @@
|
|||||||
[opQueue addOperation:_connection];
|
[opQueue addOperation:_connection];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This should NEVER be called from within a thread
|
||||||
|
// owned by limelight-common
|
||||||
- (void) stopStream
|
- (void) stopStream
|
||||||
{
|
{
|
||||||
[_connection terminate];
|
[_connection terminate];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This should only be called from within a thread
|
||||||
|
// owned by limelight-common
|
||||||
|
- (void) stopStreamInternal
|
||||||
|
{
|
||||||
|
[_connection terminateInternal];
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL) launchApp:(HttpManager*)hMan {
|
- (BOOL) launchApp:(HttpManager*)hMan {
|
||||||
NSData* launchResp = [hMan executeRequestSynchronously:
|
NSData* launchResp = [hMan executeRequestSynchronously:
|
||||||
[hMan newLaunchRequest:_config.appID
|
[hMan newLaunchRequest:_config.appID
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
}]];
|
}]];
|
||||||
[self presentViewController:conTermAlert animated:YES completion:nil];
|
[self presentViewController:conTermAlert animated:YES completion:nil];
|
||||||
|
|
||||||
[_streamMan stopStream];
|
[_streamMan stopStreamInternal];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) stageStarting:(char*)stageName {
|
- (void) stageStarting:(char*)stageName {
|
||||||
|
|||||||
Reference in New Issue
Block a user