Properly stop the stream when exiting or switching apps
This commit is contained in:
1 parent
c36fb14b15
commit
34d871403c
6 files changed
+38
-7
No files matched your search
+11
-1
@@ -182,8 +182,8 @@ void ClConnectionStarted(void)
|
||||
void ClConnectionTerminated(long errorCode)
|
||||
{
|
||||
NSLog(@"ConnectionTerminated: %ld", errorCode);
|
||||
|
||||
[_callback connectionTerminated];
|
||||
NSLog(@"Tried calling callback");
|
||||
}
|
||||
|
||||
void ClDisplayMessage(char* message)
|
||||
@@ -196,6 +196,16 @@ void ClDisplayTransientMessage(char* message)
|
||||
NSLog(@"DisplayTransientMessage: %s", message);
|
||||
}
|
||||
|
||||
-(void) terminate
|
||||
{
|
||||
// We dispatch this async to get out because this can be invoked
|
||||
// on a thread inside common and we don't want to deadlock
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// This is safe to call even before LiStartConnection
|
||||
LiStopConnection();
|
||||
});
|
||||
}
|
||||
|
||||
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionTerminatedCallback:(id<ConTermCallback>)callback
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
Reference in new issue
Block a user