using smem - parameters
Posted: 28 Jun 2010 11:09
Hi,
Could someone please provide the right parameters for using smem module in order to render video and audio
into preallocated buffers? The code I am using now to render video with vmem is below. Can anyone provide the right parameters for the smem module? (FYI I use libvlc.dll, that's why I prefer initalizing by the provided arglist.) I searched for many pages and topics here as well, but there is no working example for this. I want to provide the lock/unlock functions for vlc for both video and audio so I can get the rendered data in my buffers. This works with vmem, but need the audio data, too.
thanks for helping
jozsef
Could someone please provide the right parameters for using smem module in order to render video and audio
into preallocated buffers? The code I am using now to render video with vmem is below. Can anyone provide the right parameters for the smem module? (FYI I use libvlc.dll, that's why I prefer initalizing by the provided arglist.) I searched for many pages and topics here as well, but there is no working example for this. I want to provide the lock/unlock functions for vlc for both video and audio so I can get the rendered data in my buffers. This works with vmem, but need the audio data, too.
thanks for helping
jozsef
Code: Select all
sprintf(clock, "%lld", (long long int)(intptr_t)mylock);
sprintf(cunlock, "%lld", (long long int)(intptr_t)myunlock);
sprintf(cdata, "%lld", (long long int)(intptr_t)&ctx);
sprintf(width, "%i", VIDEOW);
sprintf(height, "%i", VIDEOH);
sprintf(pitch, "%i", VIDEOW * 4);
array<String^>^ args = gcnew array<String^>{
"-I", "dummy", "--ignore-config",
"--plugin-path="+pluginpath,
"--quiet",
"--vout", "vmem",
"--vmem-width", gcnew String(width),
"--vmem-height", gcnew String(height),
"--vmem-pitch", gcnew String(pitch),
"--vmem-chroma", "RV32",
"--vmem-lock", gcnew String(clock),
"--vmem-unlock", gcnew String(cunlock),
"--vmem-data", gcnew String(cdata)
};
instance = libvlc_new(args->Length, args, p);