void FeedVideoCodecSetup(IOutStream pOutStream) { if (!pOutStream.FeedData( Utils.Rms.GetStream("sps", Capabilities.Avc.SPS, 0, Capabilities.Avc.SPS.Length), Capabilities.Avc.SpsLength, 0, Capabilities.Avc.SpsLength, _videoLastTs, false)) { FATAL("Unable to feed stream"); if (pOutStream.GetProtocol() != null) { pOutStream.GetProtocol().EnqueueForDelete(); } } if (!pOutStream.FeedData( Utils.Rms.GetStream("pps", Capabilities.Avc.PPS, 0, Capabilities.Avc.PPS.Length), Capabilities.Avc.PpsLength, 0, Capabilities.Avc.PpsLength, _videoLastTs, false)) { FATAL("Unable to feed stream"); if (pOutStream.GetProtocol() != null) { pOutStream.GetProtocol().EnqueueForDelete(); } } }
void FeedAudioCodecSetup(IOutStream pOutStream) { if (Capabilities.AudioCodecId == AudioCodec.Aac) { if (!pOutStream.FeedData( Utils.Rms.GetStream("aac", Capabilities.Aac._pAAC, 0, Capabilities.Aac._pAAC.Length), Capabilities.Aac._aacLength, 0, Capabilities.Aac._aacLength, _audioLastTs, true)) { FATAL("Unable to feed stream"); if (pOutStream.GetProtocol() != null) { pOutStream.GetProtocol().EnqueueForDelete(); } } } }