BGKSYStreamerController.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // BGKSYStreamerController.h
  3. // FanweLive
  4. //
  5. // Created by yiqian on 10/15/15.
  6. // Copyright (c) 2015 qyvideo. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <GPUImage/GPUImage.h>
  10. #import <libksygpulive/KSYGPUStreamerKit.h>
  11. #import "KSYRTCStreamerKit.h"
  12. #define SEL_VALUE(SEL_NAME) [NSValue valueWithPointer:@selector(SEL_NAME)]
  13. @class BGKSYStreamerController;
  14. @protocol FWKSYStreamerControllerDelegate <NSObject>
  15. @required
  16. // 首帧回调
  17. - (void)firstIFrame:(BGKSYStreamerController *)publishVC;
  18. // 网络断连,且经多次重连抢救无效后退出app
  19. - (void)exitPublishAndApp:(BGKSYStreamerController *)publishVC;
  20. @end
  21. @interface BGKSYStreamerController : UIViewController
  22. {
  23. KSYRTCStreamerKit *_gPUStreamerKit; // 直播推流工具类
  24. }
  25. @property (nonatomic, weak) id<FWKSYStreamerControllerDelegate> delegate;
  26. @property (nonatomic, assign) NSInteger liveType;
  27. @property (nonatomic, strong) KSYRTCStreamerKit *gPUStreamerKit; // 直播推流工具类
  28. @property (nonatomic, strong) UIView *videoContrainerView; // 视频容器视图
  29. @property (nonatomic, strong) NSURL *pushUrl; // 推流地址
  30. // 开始推流
  31. - (void)startRtmp;
  32. // 停止推流
  33. - (void)stopRtmp;
  34. @end