/// <summary> /// Creates a new SDP media format for a well known media type. Well known type are those that use /// ID's less than 96 and don't require rtpmap or fmtp attributes. /// </summary> public SDPAudioVideoMediaFormat(SDPWellKnownMediaFormatsEnum knownFormat) { Kind = AudioVideoWellKnown.WellKnownAudioFormats.ContainsKey(knownFormat) ? SDPMediaTypesEnum.audio : SDPMediaTypesEnum.video; ID = (int)knownFormat; Rtpmap = null; Fmtp = null; _isEmpty = false; if (Kind == SDPMediaTypesEnum.audio) { var audioFormat = AudioVideoWellKnown.WellKnownAudioFormats[knownFormat]; Rtpmap = SetRtpmap(audioFormat.FormatName, audioFormat.RtpClockRate, audioFormat.ChannelCount); } else { var videoFormat = AudioVideoWellKnown.WellKnownVideoFormats[knownFormat]; Rtpmap = SetRtpmap(videoFormat.FormatName, videoFormat.ClockRate, 0); } }
/// <summary> /// Creates a new video format based on a well known SDP format. /// </summary> public VideoFormat(SDPWellKnownMediaFormatsEnum wellKnown) : this(AudioVideoWellKnown.WellKnownVideoFormats[wellKnown]) { }