Multiple instances with vmem issue
Posted: 24 Nov 2008 20:16
Hi,
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:
When I'm using single instance, everything seems to be fine. However when i'm trying to make few instances of libvlc (making one after another instantly) all instances are using same callback address for vmem-lock and unlock.
In other words vmem is calling address of the function that it shouldn't be (one that is used with different libvlc instance).
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).