Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public unsafe VLCMediaTrackInfo[] MediaTrackInfo
- {
- get
- {
- if (!IsParsed)
- Parse();
- VLCMediaTrackInfo* mti = null;
- int count = Environment.Is64BitProcess
- ? NativeMethods.libvlc_media_get_tracks_info64(ObjectHandle, &mti)
- : NativeMethods.libvlc_media_get_tracks_info32(ObjectHandle, &mti);
- VLCMediaTrackInfo[] result = new VLCMediaTrackInfo[count];
- int structSize = Marshal.SizeOf<VLCMediaTrackInfo>();
- int myStructSize = VLCMediaTrackInfo.Size;
- for (int i = 0; i < count; i++)
- {
- VLCMediaTrackInfo* testPtrValue = mti + i * sizeof(VLCMediaTrackInfo);
- VLCMediaTrackInfo* truePtrValue = &mti[i];
- if (testPtrValue != truePtrValue)
- {
- long diffPtrValues = testPtrValue - truePtrValue; // Тут ловлю когда указатель имеет не верный адрес.
- }
- result[i] = *testPtrValue;
- }
- NativeMethods.libvlc_free(mti);
- return result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement