Page 1 of 1

imem module

Posted: 22 Aug 2010 01:12
by raulhcordeiro
Hi

I see various topics openedon this forum talking about this module, but any show an usage example.
I want to do exactly what the topic below say.

viewtopic.php?f=32&t=80942&p=267510&hilit=imem#p267510

Unfortunately, i already spend much time searching too. And until now, no examples and no success on tests.

If someone know how to use this module, share and put here a simple example, please. I think that the help is not just for me, but for many people!

Thanks for some help.

ps.: sorry for my poor english...

Re: imem module

Posted: 20 Sep 2010 16:01
by Mudassar
Hi,

Could you fine some info on imem? I need to use this module for getting audio input from memory. Can you help?

Re: imem module

Posted: 03 Mar 2011 13:12
by raulhcordeiro
Yes guy, sorry for delay. but if still help..

Code: Select all

libvlc_exception_t ex; libvlc_instance_t* inst; static const char* args[] = { "--codec", "invmem", "-vvvvv", "-I", "dummy", "--no-ipv6", "--ipv4", "--file-logging", "--drop-late-frames", "--skip-frames", "--no-sout-transcode-hurry-up", "--logfile", "/var/log/mylogfile" }; libvlc_exception_init(&ex); inst = libvlc_new(argv, args, &ex); if(inst == NULL || libvlc_exception_raised(&ex)) { //your error handler } char swidth[50], sheight[50], slock[50], sunlock[50], sdata[50]; char sinput[10]; sprintf(swidth, ":invmem-width=%d", 800); sprintf(sheight, ":invmem-height=%d", 600); sprintf(slock, ":invmem-lock=%lld", your_lock_function_ptr); sprintf(sunlock, ":invmem-unlock=%lld", your_unlock_function_ptr); sprintf(sdata, ":invmem-data=%lld", your_lock_unlock_functions_param_ptr); const char* argvideo[] = { swidth, sheight, slock, sunlock, sdata }; sprintf(sinput, "fake://"); libvlc_vlm_add_broadcast(inst, "id", sinput, soutput, sizeof(argvideo)/sizeof(argvideo[0]), argvideo, 1, 0, &ex);
On this example, i create a streamming server that encoding image frames from my memory buffer to a specific video format.
Hope that still help you and another people!

Any doubts, can contact me by email too.