public RtpInterleavedSource(RtpInterleaveMediaSource rtpSource, RtpInterleaveMediaSource rtcpSource)
        {
            RtpSource  = rtpSource;
            RtcpSource = rtcpSource;
            RtpPort    = rtpSource.Channel;
            RtcpPort   = rtcpSource.Channel;

            LOG.Debug($"Created RtpInterleavedSource with channels {rtpSource.Channel}-{rtcpSource.Channel}");
        }
Beispiel #2
0
        //// <summary>
        /// Retrieves a <see cref="ISource"/> used for receiving data associated with the
        /// interleaved channel.  If a source does not exist then one is created.
        /// </summary>
        /// <param name="channel">The channel id of interest</param>
        /// <returns></returns>
        public RtpInterleaveMediaSource GetChannelSource(int channel)
        {
            if (!_sources.ContainsKey(channel))
            {
                var source = new RtpInterleaveMediaSource(channel);
                _sources[channel] = source;

                return(source);
            }

            return(_sources[channel]);
        }