BAT 批处理程序 2017-04-02
推流,就是将采集到的音频,视频数据通过流媒体协议发送到流媒体服务器。
PS: 另外其实好多第三方的集成也很好用,可参考
- (LFLiveSession*)session { if (!_session) { _session = [[LFLiveSession alloc] initWithAudioConfiguration:[LFLiveAudioConfiguration defaultConfiguration] videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration]]; _session.preView = self; _session.delegate = self; } return _session; } - (void)startLive { LFLiveStreamInfo *streamInfo = [LFLiveStreamInfo new]; streamInfo.url = @"your server rtmp url"; [self.session startLive:streamInfo]; } - (void)stopLive { [self.session stopLive]; } //MARK: - CallBack: - (void)liveSession:(nullable LFLiveSession *)session liveStateDidChange: (LFLiveState)state; - (void)liveSession:(nullable LFLiveSession *)session debugInfo:(nullable LFLiveDebug*)debugInfo; - (void)liveSession:(nullable LFLiveSession*)session errorCode:(LFLiveSocketErrorCode)errorCode;