/// <summary> /// <see cref="av_opt_get_dict_val(void*, string, int, AVDictionary**)"/> /// </summary> public MediaDictionary GetDictionary(string name, OptionSearchFlags searchFlags = OptionSearchFlags.None) { AVDictionary *dict; av_opt_get_dict_val(_obj, name, (int)searchFlags, &dict); return(MediaDictionary.FromNative(dict, isOwner: true)); }
public static MediaDictionary FromDictionary(IDictionary <string, string> dict) { var md = new MediaDictionary(); foreach (var entry in dict) { md[entry.Key] = entry.Value; } return(md); }
static IntPtr av_dict_get_safe(MediaDictionary dict, IntPtr prev) { return((IntPtr)av_dict_get(dict, "", (AVDictionaryEntry *)prev, (int)MediaDictionaryReadFlags.IgnoreSuffix)); }
/// <summary> /// <see cref="av_opt_set_dict_val(void*, string, AVDictionary*, int)"/> /// </summary> public void Set(string name, MediaDictionary value, OptionSearchFlags searchFlags = OptionSearchFlags.None) => av_opt_set_dict_val(_obj, name, value, (int)searchFlags).ThrowIfError();