예제 #1
0
 private bool StartLive()
 {
     _videoEncoder.StartVideoEncoder();
     _aacEncoder.StartAudioEncoder();
     if (SetLiveInfo())
     {
         _videoEncoder.PushingData += VideoEncoderPushingData;
         _aacEncoder.PushingData   += AACEncoderPushingData;
         return(true);
     }
     return(false);
 }
예제 #2
0
        public bool StartRecord(string recordFileSavePath)
        {
            if (IsRecord)
            {
                return(true);
            }

            _videoEncoder.StartVideoEncoder();
            _aacEncoder.StartAudioEncoder();

            if (SetRecordInfo(recordFileSavePath))
            {
                _videoEncoder.PushingData += VideoEncoderPushingData;
                _aacEncoder.PushingData   += AACEncoderPushingData;
                State    = RecAndLiveState.Started;
                IsRecord = true;
                return(true);
            }
            return(false);
        }