Page 1 of 1

libvlc_video_set_format_callbacks cb returns bad image height

Posted: 10 Sep 2015 18:00
by badgeror
Hi
I'm trying to get a video stream to open in its native resolution rather than in a resolution I'd pre-program (which is obviously better to fit with anything the player maybe sent). After fiddling around for a while I found that libvlc_video_set_format_callbacks was the way to go. Unfortunately I'm having some issue that looks like bug #15122 (https://trac.videolan.org/vlc/ticket/15122) as on a full HD RTSP stream, the call back reports height to be 1090.

This happens on latest nightly of 2.2.2

Sebastien

Re: libvlc_video_set_format_callbacks cb returns bad image height

Posted: 10 Sep 2015 18:13
by Rémi Denis-Courmont
The format callback return the physical/memory format, of course. How would you allocate the correct buffer size otherwise!

Re: libvlc_video_set_format_callbacks cb returns bad image height

Posted: 14 Sep 2015 10:00
by badgeror
Seems obvious.... I must have had a momentary lapse of logic...

Re: libvlc_video_set_format_callbacks cb returns bad image height

Posted: 14 Sep 2015 10:32
by Rémi Denis-Courmont
Well, there is a problem. We should provide visible and buffer dimensions, and crop offsets. But that would break the source and binary compatibility.

For best performance, you should pass a window handle anyway though.

Re: libvlc_video_set_format_callbacks cb returns bad image height

Posted: 24 Oct 2015 14:28
by Maypeur
I notice the same problem, but differents resuts depending on the version :

Version 3.0 : No sdk included so i cannot test, and the implib from the libvlc.dll give me error on compiled (on Embarcadero XE3 C++).
Version 2.2 : Here is the wrong height problem + memory error when method stop is called.
Version 2.1.5 : Height is Ok, all the lib seems to work well, but it seems that there is an FPS problem that is corrected on v2.2.

So for the moment i use the old 2.1.5 even with FPS lags. If you found a solution (other than substract 18 from the height returned !) please let a message !

PS : For my needs, i do not only want to show the video on a surface, but i have to play with image content so using a window callback isn't a possibility for me.

Re: libvlc_video_set_format_callbacks cb returns bad image height

Posted: 30 Oct 2015 18:39
by Jean-Baptiste Kempf
- Version 3.0: there is a SDK every day. Please test.