Example #1
0
 public SDPMediaFormat(int formatID)
 {
     FormatID = formatID.ToString();
     if (Enum.IsDefined(typeof(SDPMediaFormatsEnum), formatID))
     {
         Name                = Enum.Parse(typeof(SDPMediaFormatsEnum), formatID.ToString(), true).ToString();
         DefaultClockRate    = SDPMediaFormatInfo.GetClockRate((SDPMediaFormatsEnum)formatID);
         IsStandardAttribute = true;
     }
     FormatAttribute = (ClockRate == 0) ? Name : Name + "/" + ClockRate;
 }
Example #2
0
 public SDPMediaFormat(int formatID)
 {
     FormatID = formatID.ToString();
     if (Enum.IsDefined(typeof(SDPMediaFormatsEnum), formatID))
     {
         FormatCodec = (SDPMediaFormatsEnum)Enum.Parse(typeof(SDPMediaFormatsEnum), formatID.ToString(), true);
         Name        = FormatCodec.ToString();
         ClockRate   = SDPMediaFormatInfo.GetRtpClockRate(FormatCodec);
         //IsStandardAttribute = (formatID < DYNAMIC_ATTRIBUTES_START);
     }
     FormatAttribute = (ClockRate == 0) ? Name : Name + "/" + ClockRate;
 }