libvlc_video_set_format_callbacks cb returns bad image height

This forum is about all development around libVLC.
badgeror
Blank Cone
Blank Cone
Posts: 22
Joined: 15 Oct 2014 15:31
Operating System: Windows
Location: Sophia-Antipolis - FRANCE

libvlc_video_set_format_callbacks cb returns bad image height

Postby badgeror » 10 Sep 2015 18:00

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_video_set_format_callbacks cb returns bad image height

Postby Rémi Denis-Courmont » 10 Sep 2015 18:13

The format callback return the physical/memory format, of course. How would you allocate the correct buffer size otherwise!
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

badgeror
Blank Cone
Blank Cone
Posts: 22
Joined: 15 Oct 2014 15:31
Operating System: Windows
Location: Sophia-Antipolis - FRANCE

Re: libvlc_video_set_format_callbacks cb returns bad image height

Postby badgeror » 14 Sep 2015 10:00

Seems obvious.... I must have had a momentary lapse of logic...

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_video_set_format_callbacks cb returns bad image height

Postby Rémi Denis-Courmont » 14 Sep 2015 10:32

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Maypeur
New Cone
New Cone
Posts: 1
Joined: 21 Oct 2015 13:19

Re: libvlc_video_set_format_callbacks cb returns bad image height

Postby Maypeur » 24 Oct 2015 14:28

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libvlc_video_set_format_callbacks cb returns bad image height

Postby Jean-Baptiste Kempf » 30 Oct 2015 18:39

- Version 3.0: there is a SDK every day. Please test.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests