Problem with libvlc_video_set_format and get_size
Posted: 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 :
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)?
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);
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)?