BGTPublishController.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. //
  2. // BGTPublishController.h
  3. // BuguLive
  4. //
  5. // Created by xfg on 16/12/5.
  6. // Copyright © 2016年 xfg. All rights reserved.
  7. // 腾讯云直播的主播控制类
  8. #import <UIKit/UIKit.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. #import <TXLiteAVSDK_Professional/TXLivePush.h>
  11. #import <TXLiteAVSDK_Professional/TRTCCloud.h>
  12. #import "UserView.h"
  13. #import "TLiveMickListModel.h"
  14. @class BGTPublishController;
  15. typedef void(^LeaveRoomBlockSuccess)(void);
  16. @protocol FWTPublishControllerDelegate <NSObject>
  17. @required
  18. // 首帧回调
  19. - (void)firstIFrame:(BGTPublishController*)publishVC;
  20. // 网络断连,且经多次重连抢救无效后退出app
  21. - (void)exitPublishAndApp:(BGTPublishController*)publishVC;
  22. @end
  23. @interface BGTPublishController : UIViewController
  24. {
  25. BOOL _appIsInterrupt;
  26. UIView *_preViewContainer;
  27. UIView *_rightVideoContrainerView; // 放置右视频的view
  28. BOOL _hardware_switch;
  29. int _whitening_level;
  30. unsigned long long _startTime;
  31. unsigned long long _lastTime;
  32. NSString *_testPath;
  33. BOOL _isPreviewing;
  34. NSInteger _rePublishTime;
  35. UIView *blueBgView;
  36. UIView *redBgView;
  37. UIImageView *pkBgView;
  38. UIImageView *_loadingImageView;
  39. }
  40. @property (nonatomic, weak) id<FWTPublishControllerDelegate> delegate;
  41. @property (nonatomic, strong) NSMutableSet *linkMemeberSet; // 连麦观众列表
  42. @property (nonatomic, strong) TXLivePush *txLivePublisher;
  43. @property (nonatomic, strong) TXLivePushConfig *txLivePushonfig;
  44. @property (nonatomic, strong)TXLivePlayer *txLivePlayer;
  45. @property (nonatomic, strong) TXLivePlayConfig *txLivePlayConfig;
  46. @property (nonatomic, copy) LeaveRoomBlockSuccess leaveRoomBlockSuccess;
  47. @property (nonatomic, strong, readonly) TRTCCloud * trtcCloud;
  48. @property(nonatomic, strong) NSString *agora_token;
  49. - (void)adjustPlayItemAgora:(TLiveMickListModel *)mickListModel;
  50. @property (nonatomic, copy) NSString *pushUrlStr; // 推流地址
  51. @property (nonatomic, copy) NSString *kbpsSendStr; // 发送码率
  52. @property (nonatomic, copy) NSString *kbpsRecvStr; // 接收码率
  53. @property (nonatomic, strong) NSDictionary *qualityDict; // 直播质量相关参数
  54. @property (nonatomic, copy) NSString * roomIDStr; // 房间ID
  55. // 开始推流
  56. - (BOOL)startPushRtmpLiveMethod;
  57. // 停止推流
  58. - (void)stopRtmp;
  59. // 前置后置摄像头切换
  60. - (void)clickCamera:(UIButton*) btn;
  61. // 开、关闪光灯
  62. - (void)clickTorch:(BOOL) isOpen;
  63. - (void)toastTip:(NSString*)toastInfo;
  64. // 结束直播
  65. - (void)endLive;
  66. - (void)adjustPlayItemVoiceUserList:(NSArray *)userlist;
  67. -(void)updateLianMaiCoin;
  68. - (void)clickCloseBtn:(UserView *)view;
  69. @end