瀏覽代碼

1.修复推拉流页内存泄漏

huangxiaodong 1 年之前
父節點
當前提交
feea0a39a3

+ 0 - 4
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.h

@@ -14,10 +14,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface PlayerViewController (otherDelegate)
 
-//ComontAlretViewControllerDelegate
-- (void)CommonAlertokBtnClickPressed;
-- (void)CommonAlertCancelBtnClickPressed;
-
 
 //强制重启
 - (void)updateForceStartFun;

+ 0 - 18
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm

@@ -26,24 +26,6 @@
 
 @implementation PlayerViewController (otherDelegate)
 
-#pragma mark   ComontAlretViewControllerDelegate
-- (void)CommonAlertokBtnClickPressed{
-    //HLog("11111");
-    
-//    if(self->logoutAlertVC){
-//        self->logoutAlertVC = nil;
-//    }
-    
-    self.isLoginAgainType = YES;
-    
-    [[NSNotificationCenter defaultCenter] postNotificationName:lockBypwdNotification object:nil];
-}
-- (void)CommonAlertCancelBtnClickPressed{
-    HLog("强制退出app");
-    
-    exit(0);/*强制退出app*/
-}
-
 
 #pragma mark 需要强制重启
 - (void)updateForceStartFun{

+ 7 - 19
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -73,7 +73,6 @@ RecoderManagerDelegate,
 AudioRecoderMamagerDelegate,
 RCLiveSteamManagerDelegate,
 UITextFieldDelegate,
-ComontAlretViewControllerDelegate,
 UIDocumentPickerDelegate>
 {
 //    __block int _ihandle;
@@ -166,12 +165,13 @@ UIDocumentPickerDelegate>
     isLan = NO;
     _didRecyclResource = NO;
     
+    KWeakSelf
     globalBlock(^{
         // 初始化成功后连接
         @synchronized (self) {
-            if ([self initVideoServer])
+            if ([weakSelf initVideoServer])
             {
-                [self connectVideoServer];
+                [weakSelf connectVideoServer];
             }
         }
     });
@@ -356,6 +356,7 @@ UIDocumentPickerDelegate>
 
         [self removeNSNotification];
 
+        mySelf = nil;
     }
 }
 
@@ -383,12 +384,13 @@ UIDocumentPickerDelegate>
             
             isLan = NO;
             
+            KWeakSelf
             globalBlock(^{
                 // 初始化成功后连接
                 @synchronized (self) {
-                    if ([self initVideoServer])
+                    if ([weakSelf initVideoServer])
                     {
-                        [self connectVideoServer];
+                        [weakSelf connectVideoServer];
                     }
                 }
             });
@@ -683,20 +685,6 @@ UIDocumentPickerDelegate>
                 [self screenShotToPhoneFun];
             }
             
-            //尝试修复闪一下 没解决
-//            if(ciImage){
-//
-//                mainBlock(^{
-//                    if(mySelf->preIFrameNum == 0){
-//                        mySelf->mPlayerView.glkshowImageView.hidden = YES;
-//                    }
-//                    else if(mySelf->preIFrameNum == 30){
-//                        mySelf->mPlayerView.glkshowImageView.hidden = NO;
-//                    }
-//                });
-//                preIFrameNum ++;
-//
-//            }
             
             if (!mySelf->videoContext) mySelf->videoContext = [CIContext contextWithOptions:nil];