/// <summary> /// Stores the provided video codec setting into the store. /// If the provided video codec is not part of the available video codecs /// the store operation will not be executed and NO will be returned. /// </summary> /// <param name="videoCodec">video codec settings the string to be stored.</param> /// <returns>YES/NO depending on success.</returns> public bool StoreVideoCodecSetting(RTCVideoCodecInfo videoCodec) { if (!AvailableVideoCodecs.Contains(videoCodec)) { return(false); } var codecData = NSKeyedArchiver.ArchivedDataWithRootObject(videoCodec); _settingStore.VideoCodec = codecData; return(true); }
public static string GetHumanReadableDescription(this RTCVideoCodecInfo self) { if (self.Name == "H264") { var profileId = self.Parameters["profile-level-id"].ToString(); var profileLevelId = new RTCH264ProfileLevelId(profileId); if (profileLevelId.Profile == RTCH264Profile.ConstrainedHigh || profileLevelId.Profile == RTCH264Profile.High) { return("H264 (High)"); } if (profileLevelId.Profile == RTCH264Profile.ConstrainedBaseline || profileLevelId.Profile == RTCH264Profile.Baseline) { return("H264 (Baseline)"); } return(string.Format("H264 ({0})", profileId)); } return(self.Name); }