I'm trying to use libvlc as a frame server in my application. I use vmem to obtain frame data. LibVlc is initialized with something like this:
Code: Select all
argv = new string[]{
"--ignore-config", "--no-video-title-show",
"--vout", "vmem",
"--vmem-width", videoWidth.ToString(),
"--vmem-height", videoHeight.ToString(),
"--vmem-pitch", (videoWidth * BYTES_PER_PIXEL).ToString(),
"--vmem-chroma", "RV32",
"--vmem-lock",
Marshal.GetFunctionPointerForDelegate(lock_delegate).ToInt64().ToString(),
"--vmem-unlock",
Marshal.GetFunctionPointerForDelegate(unlock_delegate).ToInt64().ToString()
};
handle = libvlc_new(argv.Length, argv, exception);
In other words vmem is calling address of the function that it shouldn't be (one that is used with different libvlc instance).