예제 #1
0
        /// <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));
        }
예제 #2
0
        public static MediaDictionary FromDictionary(IDictionary <string, string> dict)
        {
            var md = new MediaDictionary();

            foreach (var entry in dict)
            {
                md[entry.Key] = entry.Value;
            }
            return(md);
        }
예제 #3
0
 static IntPtr av_dict_get_safe(MediaDictionary dict, IntPtr prev)
 {
     return((IntPtr)av_dict_get(dict, "", (AVDictionaryEntry *)prev, (int)MediaDictionaryReadFlags.IgnoreSuffix));
 }
예제 #4
0
 /// <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();