![]() FileName = cartes à abattre (1968).mp4" FileName = Nightmare 2 - Anarchy (2014).mkv" Private void btn_go_Click(object sender, RoutedEventArgs e) Public string Option(string option, string Value = "") Public System.IntPtr Open(string FileName) Private static extern IntPtr MediaInfoA_Option(IntPtr Handle, IntPtr Option, IntPtr Value) ![]() Private static extern IntPtr MediaInfo_Option(IntPtr Handle, string option, string Value) Internal static extern IntPtr MediaInfo_Open(IntPtr Handle, string FileName) Var objMediaInfo = new //or mi.Option("Complete", "1") or mi.Option("Info_Parameters") try them. Return Marshal.PtrToStringUni(MediaInfo_Option(Handle, option, Value)) įinally, modify your implementation: static void Main(string args) Private static extern IntPtr MediaInfo_Option(IntPtr Handle, string option, string Value) Ĭreate function for that: public string Option(string option, string Value = "") I forgot to include in my last post that you also need to set the Inform option through the MediaInfo_Option API, this is important step to define the returned data: Var objMediaInfo = new result = objMediaInfo.Inform() Then in your implementation, you must pass the full path of the media file not just its name: static void Main(string args) Private static extern void MediaInfo_Delete(IntPtr Handle) Return Marshal.PtrToStringUni(MediaInfo_Inform(Handle, (UIntPtr)0)) ĭon't forget to delete the pointer (Handle) that created by _MediaInfo_New_. Public System.UIntPtr Open(string FileName) Private static extern IntPtr MediaInfo_Inform(IntPtr Handle, UIntPtr Reserved) Private static extern UIntPtr MediaInfo_Open(IntPtr Handle, string FileName) ![]() I am aware there is already a fully developed wrapper for this, but I would like to keep this simple and lightweight.Ĭhanges I have tried a few different media files. However, I am only getting a blank string in return. Return Marshal.PtrToStringUni(MediaInfo_Inform(Handle)) Īnd I am calling this class using the below console app: static void Main(string args) Private static extern void MediaInfo_Close(IntPtr Handle) Private static extern IntPtr MediaInfo_Inform(IntPtr Handle) Private static extern void MediaInfo_Open(string FileName) Private static extern IntPtr MediaInfo_New() To wrap the dll, I have created a MediaInfo class, based on my (limited) understanding from the quickstart guide. I need portable version of "MediaInfo Lite" to use it on my flash memory on more than one PC.Using MediaInfo DLL (64-bit), I am attempting to get the standard text output providing information about an mp4 file. I don't need full specs of media files, most of my use is about checking mp3 vbr or cbr and some video info that the Lite version can show me! (unfortunately Windows OS can not!, I need extra app). Lite version as it says is Lite! It's super fast when I right click on media and open "MediaInfo", and it's single simple media info page with no menu and extra info. After all that should give you benefit of all the program's features without an actual install. ![]() So, for the benefit of clarity, why would you not wish to run the 'full' portable version ?. The 'Lite' is, apparently, very light on features (may be even a project outside the official MediaInfo project since I could not find a download for that from their official page)Īnd whilst you subsequently claim that you did not want to install the full portable version you somewhat changed your tune when subsequently challenged. And even if they did why should you want it ?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |