Page 1 of 1

Loading module from internal module (not external dll)...

Posted: 01 Apr 2014 09:19
by wcoder
Hi,

Context: Linux debian Jessie x86, LibVlc 2, c\c++

I see that it's possible to write a video-out module (I see DirectFB video-out module simple & efficient), it's seems to be a dll or Linux equivalent...

My question : Is there's a ways to write an application with a built-in module and pass it to libvlc like video callback on SDL sample: https://wiki.videolan.org/LibVLC_SampleCode_SDL/
=> libvlc_video_set_callbacks(mp, lock, unlock, display, &ctx);

Thanks for your help,

WCoder

Re: Loading module from internal module (not external dll)..

Posted: 01 Apr 2014 11:42
by RSATom
if you will use libvlc_video_set_callbacks, you don't need to write video output plugin, and vice versa.

Re: Loading module from internal module (not external dll)..

Posted: 01 Apr 2014 21:28
by wcoder
Thanks for answer,

I do the test and the CPU usage is so hight with a video output 1280x720 that video is not display (without sound), if i change to 1024x768, it's work but CPU is 72 % (without sound), when i play video normally my cpu is 60 % with a tranparent png on video effect -> Overlay and Add text (with sound).

So callback is not the solution, and i need share opengl surface\texture between my code and the output, i try vmem without any success :

Warning: option --vmem-lock no longer exists.
Warning: option --vmem-unlock no longer exists.
Warning: option --vmem-data no longer exists.
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
[0xada33850] vmem vout display error: missing lock callback
[0xada006f8] main video output error: video output creation failed
[0xb0e5c620] main decoder error: failed to create video output

and a nice black window (lock\unlock function was not called) an the sound have distortion (compress expand effect) CPU is 62 %...

RUN FINISHED; exit value 0; real time: 5s; user: 500ms; system: 4s

Re: Loading module from internal module (not external dll)..

Posted: 02 Apr 2014 03:10
by RSATom
to improve decoding performance with vmem you should:
a) use pixel format same as media have
b) don't use scaling

and I didn't understand, did you get any picture with libvlc_video_set_callbacks ?