Problem with libvlc_video_set_format and get_size

This forum is about all development around libVLC.
rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

Problem with libvlc_video_set_format and get_size

Postby rafaware » 12 Sep 2012 14:25

I have a another question about libvlc_video_get_size.

I want to render the current frame in my own buffer and therefor i'm using libvlc_video_set_callbacks and :

Code: Select all

libvlc_video_set_callbacks (m_pMediaPlayer, lock, unlock, display, m_pContext); // libvlc_video_set_format (libvlc_media_player_t *mp, const char *chroma, unsigned width, unsigned height, unsigned pitch) libvlc_video_set_format (m_pMediaPlayer, "RV32", 320, 240, 320 * 4);
video width and height are hard coded.

But now i want to make my program more flexible about different video sizes.

At the point of calling libvlc_video_set_format the stream still hasn't started.

If i can't get the video size before the stream started,
how can i set the video format (width and height)?

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

Re: Problem with libvlc_video_set_format and get_size

Postby Rémi Denis-Courmont » 12 Sep 2012 15:28

libvlc_video_set_format_callbacks.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

Re: Problem with libvlc_video_set_format and get_size

Postby rafaware » 12 Sep 2012 15:54

Hi Rémi

Thank you very much for the information

Unfortunately, I'm working with libvlc 1.1.4 and this function (ibvlc_video_set_format_callbacks) is only available from LibVLC 2.0.0 or later.

Is there any other way to solve my problem in libvlc 1.1.4?

Thanks in advance

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: Problem with libvlc_video_set_format and get_size

Postby Jean-Baptiste Kempf » 12 Sep 2012 17:02

Not simply.
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.

rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

Re: Problem with libvlc_video_set_format and get_size

Postby rafaware » 12 Sep 2012 19:21

Hi Jean-Baptiste

I have a lot of time

Please, Could you tell me the way?

Thanks in advance

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

Re: Problem with libvlc_video_set_format and get_size

Postby Rémi Denis-Courmont » 12 Sep 2012 19:23

Implement your own video output plugin.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests