Page 1 of 1

Problem with libvlc_video_set_format and get_size

Posted: 12 Sep 2012 14:25
by rafaware
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)?

Re: Problem with libvlc_video_set_format and get_size

Posted: 12 Sep 2012 15:28
by Rémi Denis-Courmont
libvlc_video_set_format_callbacks.

Re: Problem with libvlc_video_set_format and get_size

Posted: 12 Sep 2012 15:54
by rafaware
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

Re: Problem with libvlc_video_set_format and get_size

Posted: 12 Sep 2012 17:02
by Jean-Baptiste Kempf
Not simply.

Re: Problem with libvlc_video_set_format and get_size

Posted: 12 Sep 2012 19:21
by rafaware
Hi Jean-Baptiste

I have a lot of time

Please, Could you tell me the way?

Thanks in advance

Re: Problem with libvlc_video_set_format and get_size

Posted: 12 Sep 2012 19:23
by Rémi Denis-Courmont
Implement your own video output plugin.