-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mono/Linux doesn't return sane values when using Get method, just "" #2
Comments
This was one of the REALLY weird parts of the parent git I forked. Deciding whether to use ANSI or Unicode version of the library (plus 64bit or 32bit). I made my fixes primarily for Windows (plus an ASP.NET specific fix to find the DomainPath), and left the non-Windows portions as they were. As it stands in |
Okay, I'm out of time to look at this tonight, but from what I've found the MustUseAnsi check isn't actually the (main) culprit. It's definitely smelly though. I've managed to create a pretty extensive list of stack traces that seem to point to the problem being the kernel32 DLL imports- I have a feeling that it's not actually loading in the method pointers from the MediaInfo.dll, but just generating stubs. I'm not sure how UTF plays into that process yet, but I'll see if I can get anything to return proper values and send you a pull request if I get it figured out. |
Was there ever any movement on this? Does this work on Linux? |
I had some luck using the branch by x265, since it doesn't depend on kernel32 in Arch Linux. It does take some uncomfortable incantations (i.e. copying the libmediainfo.so.* file to MediaInfo.dll within the executable root). I'm interested in seeing if there's any interop oppurtunities using .Net Core, but that won't be in the short-term. |
When running my code on 64-bit Windows against a folder of videos, the fields are appropriately parsed and returned using the mi.Get(StreamKind.Video, 0, "Width") type calls. When running on 64-bit Linux with the correct libMediaInfo.so.0 file, the project compiles and runs fine, until trying to access the data inside of MediaInfo objects (same files as Windows tests). Debugging shows that every value is returned as an empty string.
I have a feeling this involves the ANSI conditional in the MediaInfo library source code.
I'll do some poking around to figure out if this can be resolved within the MediaInfoDotNet solution, unless there is a known fix.
The text was updated successfully, but these errors were encountered: