Reputation: 11
I'd like to make a video player with Vulkan and ffmpeg.
I already make a queue for frame data which extracted from video with ffmpeg and create vkImage from dequeued frame data.
The how I can the render vkImage and switch it per frame?
Upvotes: 0
Views: 1034
Reputation: 48196
upload the pixel data to a staging buffer
acquire swapchain image
in the command buffer do copy from staging buffer to acquired swapchain image.
present
Add pipeline barriers for layout transitions and semaphores as needed.
You may need a second staging buffer to allow for double buffering.
This requires that the swapchain supports being a transfer_dest. If not then you must render a fullscreen quad and use the frame data as texture or input attachment.
Upvotes: 2