public unsafe static KeyValuePair <string, string> ToKeyValuePair(this AVDictionaryEntry entry) { //ffmpeg.AV_DICT_APPEND string key = ((IntPtr)entry.key).PtrToStringUTF8(); string value = ((IntPtr)entry.value).PtrToStringUTF8(); return(new KeyValuePair <string, string>(key, value)); }
/// <summary> /// get AVDictionaryEntry value /// </summary> /// <param name="entry"></param> /// <returns></returns> public static string GetValue(this AVDictionaryEntry entry) { return(((IntPtr)entry.value).PtrToStringUTF8()); }
/// <summary> /// convert <see cref="AVDictionaryEntry"/> to <see cref="KeyValuePair{TKey, TValue}"/> /// </summary> /// <param name="entry"></param> /// <returns></returns> public static KeyValuePair <string, string> GetEntry(this AVDictionaryEntry entry) { return(new KeyValuePair <string, string>(entry.GetKey(), entry.GetValue())); }
/// <summary> /// get AVDictionaryEntry key /// </summary> /// <param name="entry"></param> /// <returns></returns> public static string GetKey(this AVDictionaryEntry entry) { return(((IntPtr)entry.key).PtrToStringUTF8()); }
private static KeyValuePair <string, string> GetEntry(IntPtr intPtr) { AVDictionaryEntry entry = *(AVDictionaryEntry *)intPtr; return(new KeyValuePair <string, string>(entry.GetKey(), entry.GetValue())); }