<commit_before>## Copyright (c) MediaArea.net SARL. All Rights Reserved.
 #
 # Use of this source code is governed by a BSD-style license that can
 # be found in the License.html file in the root of the source tree.
 ##

# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#  Public DLL interface implementation
#  Wrapper for MediaInfo Library
#  Please see MediaInfo.h for help
#
# Converted to python module by <NAME>
# Modifications by <NAME>
# Python 3 update by <NAME>
# Mac OSX support, Python 2/3 merge and ctypes fixes by <NAME>
#
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# MediaInfoDLL.py and MediaInfoDLL3.py are same
# but all files are kept in order to not break programs calling them.
#
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

import os
import sys
from ctypes import *
if os.name == "nt" or os.name == "dos" or os.name == "os2" or os.name == "ce":
    MediaInfoDLL_Handler = windll.MediaInfo
    MustUseAnsi = 0
elif sys.platform == "darwin":
    MediaInfoDLL_Handler = CDLL("libmediainfo.0.dylib")
    MustUseAnsi = 1
else:
    MediaInfoDLL_Handler = CDLL("libmediainfo.so.0")
    MustUseAnsi = 1


# types --> C Python:
# size_t            c_size_t
# unsigned char*    c_char_p
# enum              c_size_t
# const wchar_t*    c_wchar_p,
# NULL              None,
# these functions need strings in unicode format




class Stream:
    General, Video, Audio, Text, Other, Image, Menu, Max = list(range(8))

class Info:
    Name, Text, Measure, Options, Name_Text, Measure_Text, Info, HowTo, Max = list(range(9))

class InfoOption:
    ShowInInform, Reserved, ShowInSupported, TypeOfValue, Max = list(range(5))

class FileOptions:
    Nothing, Recursive, CloseAll, xxNonexx_3, Max = list(range(5))



class MediaInfo:

    #MEDIAINFO_EXP void*         __stdcall MediaInfo_New (); /*you must ALWAYS call MediaInfo_Delete(Handle) in order to free memory*/
    #/** @brief A 'new' MediaInfo interface (with a quick init of useful options : "**VERSION**;**APP_NAME**;**APP_VERSION**", but without debug information, use it only if you know what you do), return a Handle, don't forget to delete it after using it*/
    MediaInfo_New = MediaInfoDLL_Handler.MediaInfo_New
    MediaInfo_New.argtypes = []
    MediaInfo_New.restype  = c_void_p

    #MEDIAINFO_EXP void*         __stdcall MediaInfo_New_Quick (const wchar_t* File, const wchar_t* Options); /*you must ALWAYS call MediaInfo_Delete(Handle) in order to free memory*/
    MediaInfo_New_Quick = MediaInfoDLL_Handler.MediaInfo_New_Quick
    MediaInfo_New_Quick.argtypes = [c_wchar_p, c_wchar_p]
    MediaInfo_New_Quick.restype  = c_void_p
    MediaInfoA_New_Quick = MediaInfoDLL_Handler.MediaInfoA_New_Quick
    MediaInfoA_New_Quick.argtypes = [c_char_p, c_char_p]
    MediaInfoA_New_Quick.restype  = c_void_p

    #/** @brief Delete a MediaInfo interface*/
    #MEDIAINFO_EXP void       __stdcall MediaInfo_Delete (void* Handle);
    MediaInfo_Delete = MediaInfoDLL_Handler.MediaInfo_Delete
    MediaInfo_Delete.argtypes = [c_void_p]
    MediaInfo_Delete.restype  = None

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a filename)*/
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_Open (void* Handle, const wchar_t* File);
    MediaInfo_Open = MediaInfoDLL_Handler.MediaInfo_Open
    MediaInfo_Open.argtypes = [c_void_p, c_wchar_p]
    MediaInfo_Open.restype = c_size_t
    MediaInfoA_Open = MediaInfoDLL_Handler.MediaInfoA_Open
    MediaInfoA_Open.argtypes = [c_void_p, c_char_p]
    MediaInfoA_Open.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer) */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_Open_Buffer (void* Handle, const unsigned char* Begin, size_t Begin_Size, const unsigned char* End, size_t End_Size); /*return Handle*/
    MediaInfo_Open_Buffer = MediaInfoDLL_Handler.MediaInfo_Open_Buffer
    MediaInfo_Open_Buffer.argtypes = [c_void_p, c_void_p, c_size_t, c_void_p, c_size_t]
    MediaInfo_Open_Buffer.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer, Init) */
    #MEDIAINFO_EXP size_t            __stdcall MediaInfo_Open_Buffer_Init (void* Handle, MediaInfo_int64u File_Size, MediaInfo_int64u File_Offset);
    MediaInfo_Open_Buffer_Init = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Init
    MediaInfo_Open_Buffer_Init.argtypes = [c_void_p, c_uint64, c_uint64]
    MediaInfo_Open_Buffer_Init.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer, Continue) */
    #MEDIAINFO_EXP size_t            __stdcall MediaInfo_Open_Buffer_Continue (void* Handle, MediaInfo_int8u* Buffer, size_t Buffer_Size);
    MediaInfo_Open_Buffer_Continue = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Continue
    MediaInfo_Open_Buffer_Continue.argtypes = [c_void_p, c_char_p, c_size_t]
    MediaInfo_Open_Buffer_Continue.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer, Continue_GoTo_Get) */
    #MEDIAINFO_EXP MediaInfo_int64u  __stdcall MediaInfo_Open_Buffer_Continue_GoTo_Get (void* Handle);
    MediaInfo_Open_Buffer_Continue_GoTo_Get = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Continue_GoTo_Get
    MediaInfo_Open_Buffer_Continue_GoTo_Get.argtypes = [c_void_p]
    MediaInfo_Open_Buffer_Continue_GoTo_Get.restype = c_uint64

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer, Finalize) */
    #MEDIAINFO_EXP size_t            __stdcall MediaInfo_Open_Buffer_Finalize (void* Handle);
    MediaInfo_Open_Buffer_Finalize = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Finalize
    MediaInfo_Open_Buffer_Finalize.argtypes = [c_void_p]
    MediaInfo_Open_Buffer_Finalize.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Save */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_Save (void* Handle);
    MediaInfo_Save = MediaInfoDLL_Handler.MediaInfo_Save
    MediaInfo_Save.argtypes = [c_void_p]
    MediaInfo_Save.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Close */
    #MEDIAINFO_EXP void       __stdcall MediaInfo_Close (void* Handle);
    MediaInfo_Close = MediaInfoDLL_Handler.MediaInfo_Close
    MediaInfo_Close.argtypes = [c_void_p]
    MediaInfo_Close.restype = None

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Inform */
    #MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Inform (void* Handle, size_t Reserved); /*Default : Reserved=0*/
    MediaInfo_Inform = MediaInfoDLL_Handler.MediaInfo_Inform
    MediaInfo_Inform.argtypes = [c_void_p, c_size_t]
    MediaInfo_Inform.restype = c_wchar_p
    MediaInfoA_Inform = MediaInfoDLL_Handler.MediaInfoA_Inform
    MediaInfoA_Inform.argtypes = [c_void_p, c_size_t]
    MediaInfoA_Inform.restype = c_char_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Get */
    #MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_GetI (void* Handle, MediaInfo_stream_C StreamKind, size_t StreamNumber, size_t Parameter, MediaInfo_info_C InfoKind); /*Default : InfoKind=Info_Text*/
    MediaInfo_GetI = MediaInfoDLL_Handler.MediaInfo_GetI
    MediaInfo_GetI.argtypes = [c_void_p, c_size_t, c_size_t, c_size_t, c_size_t]
    MediaInfo_GetI.restype = c_wchar_p
    MediaInfoA_GetI = MediaInfoDLL_Handler.MediaInfoA_GetI
    MediaInfoA_GetI.argtypes = [c_void_p, c_size_t, c_size_t, c_size_t, c_size_t]
    MediaInfoA_GetI.restype = c_char_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Get */
    #MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Get (void* Handle, MediaInfo_stream_C StreamKind, size_t StreamNumber, const wchar_t* Parameter, MediaInfo_info_C InfoKind, MediaInfo_info_C SearchKind); /*Default : InfoKind=Info_Text, SearchKind=Info_Name*/
    MediaInfo_Get = MediaInfoDLL_Handler.MediaInfo_Get
    MediaInfo_Get.argtypes = [c_void_p, c_size_t, c_size_t, c_wchar_p, c_size_t, c_size_t]
    MediaInfo_Get.restype = c_wchar_p
    MediaInfoA_Get = MediaInfoDLL_Handler.MediaInfoA_Get
    MediaInfoA_Get.argtypes = [c_void_p, c_size_t, c_size_t, c_wchar_p, c_size_t, c_size_t]
    MediaInfoA_Get.restype = c_char_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Set */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_SetI (void* Handle, const wchar_t* ToSet, MediaInfo_stream_C StreamKind, size_t StreamNumber, size_t Parameter, const wchar_t* OldParameter);
    MediaInfo_SetI = MediaInfoDLL_Handler.MediaInfo_SetI
    MediaInfo_SetI.argtypes = [c_void_p, c_wchar_p, c_size_t, c_size_t, c_size_t, c_wchar_p]
    MediaInfo_SetI.restype = c_void_p
    MediaInfoA_SetI = MediaInfoDLL_Handler.MediaInfoA_SetI
    MediaInfoA_SetI.argtypes = [c_void_p, c_char_p, c_size_t, c_size_t, c_size_t, c_wchar_p]
    MediaInfoA_SetI.restype = c_void_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Set */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_Set (void* Handle, const wchar_t* ToSet, MediaInfo_stream_C StreamKind, size_t StreamNumber, const wchar_t* Parameter, const wchar_t* OldParameter);
    MediaInfo_Set = MediaInfoDLL_Handler.MediaInfo_Set
    MediaInfo_Set.argtypes = [c_void_p, c_wchar_p, c_size_t, c_size_t, c_wchar_p, c_wchar_p]
    MediaInfo_Set.restype = c_size_t
    MediaInfoA_Set = MediaInfoDLL_Handler.MediaInfoA_Set
    MediaInfoA_Set.argtypes = [c_void_p, c_char_p, c_size_t, c_size_t, c_wchar_p, c_wchar_p]
    MediaInfoA_Set.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Option */
    #MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Option (void* Handle, const wchar_t* Option, const wchar_t* Value);
    MediaInfo_Option = MediaInfoDLL_Handler.MediaInfo_Option
    MediaInfo_Option.argtypes = [c_void_p, c_wchar_p, c_wchar_p]
    MediaInfo_Option.restype = c_wchar_p
    MediaInfoA_Option = MediaInfoDLL_Handler.MediaInfoA_Option
    MediaInfoA_Option.argtypes = [c_void_p, c_char_p, c_char_p]
    MediaInfoA_Option.restype = c_char_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::State_Get */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_State_Get (void* Handle);
    MediaInfo_State_Get = MediaInfoDLL_Handler.MediaInfo_State_Get
    MediaInfo_State_Get.argtypes = [c_void_p]<commit_msg>Fix characters encoding in Python3 ANSI API<commit_after>## Copyright (c) MediaArea.net SARL. All Rights Reserved.
 #
 # Use of this source code is governed by a BSD-style license that can
 # be found in the License.html file in the root of the source tree.
 ##

# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#  Public DLL interface implementation
#  Wrapper for MediaInfo Library
#  Please see MediaInfo.h for help
#
# Converted to python module by <NAME>
# Modifications by <NAME>
# Python 3 update by <NAME>
# Mac OSX support, Python 2/3 merge and ctypes fixes by <NAME>
#
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# MediaInfoDLL.py and MediaInfoDLL3.py are same
# but all files are kept in order to not break programs calling them.
#
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

import os
import sys
from ctypes import *
if os.name == "nt" or os.name == "dos" or os.name == "os2" or os.name == "ce":
    MediaInfoDLL_Handler = windll.MediaInfo
    MustUseAnsi = 0
elif sys.platform == "darwin":
    MediaInfoDLL_Handler = CDLL("libmediainfo.0.dylib")
    MustUseAnsi = 1
else:
    MediaInfoDLL_Handler = CDLL("libmediainfo.so.0")
    MustUseAnsi = 1


# types --> C Python:
# size_t            c_size_t
# unsigned char*    c_char_p
# enum              c_size_t
# const wchar_t*    c_wchar_p,
# NULL              None,
# these functions need strings in unicode format




class Stream:
    General, Video, Audio, Text, Other, Image, Menu, Max = list(range(8))

class Info:
    Name, Text, Measure, Options, Name_Text, Measure_Text, Info, HowTo, Max = list(range(9))

class InfoOption:
    ShowInInform, Reserved, ShowInSupported, TypeOfValue, Max = list(range(5))

class FileOptions:
    Nothing, Recursive, CloseAll, xxNonexx_3, Max = list(range(5))



class MediaInfo:

    #MEDIAINFO_EXP void*         __stdcall MediaInfo_New (); /*you must ALWAYS call MediaInfo_Delete(Handle) in order to free memory*/
    #/** @brief A 'new' MediaInfo interface (with a quick init of useful options : "**VERSION**;**APP_NAME**;**APP_VERSION**", but without debug information, use it only if you know what you do), return a Handle, don't forget to delete it after using it*/
    MediaInfo_New = MediaInfoDLL_Handler.MediaInfo_New
    MediaInfo_New.argtypes = []
    MediaInfo_New.restype  = c_void_p

    #MEDIAINFO_EXP void*         __stdcall MediaInfo_New_Quick (const wchar_t* File, const wchar_t* Options); /*you must ALWAYS call MediaInfo_Delete(Handle) in order to free memory*/
    MediaInfo_New_Quick = MediaInfoDLL_Handler.MediaInfo_New_Quick
    MediaInfo_New_Quick.argtypes = [c_wchar_p, c_wchar_p]
    MediaInfo_New_Quick.restype  = c_void_p
    MediaInfoA_New_Quick = MediaInfoDLL_Handler.MediaInfoA_New_Quick
    MediaInfoA_New_Quick.argtypes = [c_char_p, c_char_p]
    MediaInfoA_New_Quick.restype  = c_void_p

    #/** @brief Delete a MediaInfo interface*/
    #MEDIAINFO_EXP void       __stdcall MediaInfo_Delete (void* Handle);
    MediaInfo_Delete = MediaInfoDLL_Handler.MediaInfo_Delete
    MediaInfo_Delete.argtypes = [c_void_p]
    MediaInfo_Delete.restype  = None

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a filename)*/
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_Open (void* Handle, const wchar_t* File);
    MediaInfo_Open = MediaInfoDLL_Handler.MediaInfo_Open
    MediaInfo_Open.argtypes = [c_void_p, c_wchar_p]
    MediaInfo_Open.restype = c_size_t
    MediaInfoA_Open = MediaInfoDLL_Handler.MediaInfoA_Open
    MediaInfoA_Open.argtypes = [c_void_p, c_char_p]
    MediaInfoA_Open.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer) */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_Open_Buffer (void* Handle, const unsigned char* Begin, size_t Begin_Size, const unsigned char* End, size_t End_Size); /*return Handle*/
    MediaInfo_Open_Buffer = MediaInfoDLL_Handler.MediaInfo_Open_Buffer
    MediaInfo_Open_Buffer.argtypes = [c_void_p, c_void_p, c_size_t, c_void_p, c_size_t]
    MediaInfo_Open_Buffer.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer, Init) */
    #MEDIAINFO_EXP size_t            __stdcall MediaInfo_Open_Buffer_Init (void* Handle, MediaInfo_int64u File_Size, MediaInfo_int64u File_Offset);
    MediaInfo_Open_Buffer_Init = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Init
    MediaInfo_Open_Buffer_Init.argtypes = [c_void_p, c_uint64, c_uint64]
    MediaInfo_Open_Buffer_Init.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer, Continue) */
    #MEDIAINFO_EXP size_t            __stdcall MediaInfo_Open_Buffer_Continue (void* Handle, MediaInfo_int8u* Buffer, size_t Buffer_Size);
    MediaInfo_Open_Buffer_Continue = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Continue
    MediaInfo_Open_Buffer_Continue.argtypes = [c_void_p, c_char_p, c_size_t]
    MediaInfo_Open_Buffer_Continue.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer, Continue_GoTo_Get) */
    #MEDIAINFO_EXP MediaInfo_int64u  __stdcall MediaInfo_Open_Buffer_Continue_GoTo_Get (void* Handle);
    MediaInfo_Open_Buffer_Continue_GoTo_Get = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Continue_GoTo_Get
    MediaInfo_Open_Buffer_Continue_GoTo_Get.argtypes = [c_void_p]
    MediaInfo_Open_Buffer_Continue_GoTo_Get.restype = c_uint64

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer, Finalize) */
    #MEDIAINFO_EXP size_t            __stdcall MediaInfo_Open_Buffer_Finalize (void* Handle);
    MediaInfo_Open_Buffer_Finalize = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Finalize
    MediaInfo_Open_Buffer_Finalize.argtypes = [c_void_p]
    MediaInfo_Open_Buffer_Finalize.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Save */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_Save (void* Handle);
    MediaInfo_Save = MediaInfoDLL_Handler.MediaInfo_Save
    MediaInfo_Save.argtypes = [c_void_p]
    MediaInfo_Save.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Close */
    #MEDIAINFO_EXP void       __stdcall MediaInfo_Close (void* Handle);
    MediaInfo_Close = MediaInfoDLL_Handler.MediaInfo_Close
    MediaInfo_Close.argtypes = [c_void_p]
    MediaInfo_Close.restype = None

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Inform */
    #MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Inform (void* Handle, size_t Reserved); /*Default : Reserved=0*/
    MediaInfo_Inform = MediaInfoDLL_Handler.MediaInfo_Inform
    MediaInfo_Inform.argtypes = [c_void_p, c_size_t]
    MediaInfo_Inform.restype = c_wchar_p
    MediaInfoA_Inform = MediaInfoDLL_Handler.MediaInfoA_Inform
    MediaInfoA_Inform.argtypes = [c_void_p, c_size_t]
    MediaInfoA_Inform.restype = c_char_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Get */
    #MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_GetI (void* Handle, MediaInfo_stream_C StreamKind, size_t StreamNumber, size_t Parameter, MediaInfo_info_C InfoKind); /*Default : InfoKind=Info_Text*/
    MediaInfo_GetI = MediaInfoDLL_Handler.MediaInfo_GetI
    MediaInfo_GetI.argtypes = [c_void_p, c_size_t, c_size_t, c_size_t, c_size_t]
    MediaInfo_GetI.restype = c_wchar_p
    MediaInfoA_GetI = MediaInfoDLL_Handler.MediaInfoA_GetI
    MediaInfoA_GetI.argtypes = [c_void_p, c_size_t, c_size_t, c_size_t, c_size_t]
    MediaInfoA_GetI.restype = c_char_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Get */
    #MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Get (void* Handle, MediaInfo_stream_C StreamKind, size_t StreamNumber, const wchar_t* Parameter, MediaInfo_info_C InfoKind, MediaInfo_info_C SearchKind); /*Default : InfoKind=Info_Text, SearchKind=Info_Name*/
    MediaInfo_Get = MediaInfoDLL_Handler.MediaInfo_Get
    MediaInfo_Get.argtypes = [c_void_p, c_size_t, c_size_t, c_wchar_p, c_size_t, c_size_t]
    MediaInfo_Get.restype = c_wchar_p
    MediaInfoA_Get = MediaInfoDLL_Handler.MediaInfoA_Get
    MediaInfoA_Get.argtypes = [c_void_p, c_size_t, c_size_t, c_char_p, c_size_t, c_size_t]
    MediaInfoA_Get.restype = c_char_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Set */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_SetI (void* Handle, const wchar_t* ToSet, MediaInfo_stream_C StreamKind, size_t StreamNumber, size_t Parameter, const wchar_t* OldParameter);
    MediaInfo_SetI = MediaInfoDLL_Handler.MediaInfo_SetI
    MediaInfo_SetI.argtypes = [c_void_p, c_wchar_p, c_size_t, c_size_t, c_size_t, c_wchar_p]
    MediaInfo_SetI.restype = c_void_p
    MediaInfoA_SetI = MediaInfoDLL_Handler.MediaInfoA_SetI
    MediaInfoA_SetI.argtypes = [c_void_p, c_char_p, c_size_t, c_size_t, c_size_t, c_char_p]
    MediaInfoA_SetI.restype = c_void_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Set */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_Set (void* Handle, const wchar_t* ToSet, MediaInfo_stream_C StreamKind, size_t StreamNumber, const wchar_t* Parameter, const wchar_t* OldParameter);
    MediaInfo_Set = MediaInfoDLL_Handler.MediaInfo_Set
    MediaInfo_Set.argtypes = [c_void_p, c_wchar_p, c_size_t, c_size_t, c_wchar_p, c_wchar_p]
    MediaInfo_Set.restype = c_size_t
    MediaInfoA_Set = MediaInfoDLL_Handler.MediaInfoA_Set
    MediaInfoA_Set.argtypes = [c_void_p, c_char_p, c_size_t, c_size_t, c_char_p, c_char_p]
    MediaInfoA_Set.restype = c_size_t

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::Option */
    #MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Option (void* Handle, const wchar_t* Option, const wchar_t* Value);
    MediaInfo_Option = MediaInfoDLL_Handler.MediaInfo_Option
    MediaInfo_Option.argtypes = [c_void_p, c_wchar_p, c_wchar_p]
    MediaInfo_Option.restype = c_wchar_p
    MediaInfoA_Option = MediaInfoDLL_Handler.MediaInfoA_Option
    MediaInfoA_Option.argtypes = [c_void_p, c_char_p, c_char_p]
    MediaInfoA_Option.restype = c_char_p

    #/** @brief Wrapper for MediaInfoLib::MediaInfo::State_Get */
    #MEDIAINFO_EXP size_t       __stdcall MediaInfo_State_Get (void* Handle);
    MediaInfo_State_Get = MediaInfoDLL_Handler.MediaInfo_State_Get
    MediaInfo_State_Get.argtypes = [c_void_p]
{'fraction_non_alphanumeric': 0.1087378640776699, 'fraction_numerical': 0.0028640776699029127, 'mean_word_length': 4.935177182368194, 'pattern_counts': {'":': 4, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5983801', 'n_tokens_mistral': 7342, 'n_tokens_neox': 7089, 'n_words': 1483}