libvlc dynamically resize when rendering into custom memory buffer

30 Views Asked by At

I have a Win32 C app that launches a 2560x1024 window. Within that window are regions that a video may play in. These regions have different dimensions, and you can drag the video from one region to another.

Right now I'm using libvlc and am successfully rendering the video using:

libvlc_video_set_callbacks()
libvlc_video_set_format()

And then an OpenGL texture to render the video within its current region.

However I'm having issues dynamically resizing the video.

My only success right now is if I stop the video and release the media player:

libvlc_media_player_stop()

libvlc_media_player_release()

Then re-allocate my pixel buffer to the new dimension, and then re-call libvlc_video_set_callbacks() and libvlc_video_set_format() with the new width and height.

This does work, but the issue is that it causes the video to stop and it takes a bit to reload the video.

I'm looking for a way to seamlessly resize the video with out having to stop and replay it.

0

There are 0 best solutions below