![]() |
NDEVR
API Documentation
|
Captures Vulkan framebuffer images and encodes them to an MP4 video file via GStreamer. More...
Public Member Functions | |
| GStreamerVulkanWriter (VkPhysicalDevice phys, VkDevice dev, VkQueue q, uint32_t queueFamilyIndex, VkCommandPool commandPool, uint32_t w, uint32_t h, VkFormat fmt, const std::string &outFile, uint32_t fpsNumer=30, uint32_t fpsDenom=1) | |
| Constructs a writer that encodes Vulkan frames to a video file. | |
| void | finish () |
| Signals the end of the video stream to the GStreamer pipeline. | |
| void | pushFrame (VkImage srcImage, VkImageLayout currentLayout, uint64_t frameIndex) |
| Copies a Vulkan image to the staging buffer and pushes it as a video frame. | |
Captures Vulkan framebuffer images and encodes them to an MP4 video file via GStreamer.
Copies each frame from a VkImage into a host-visible staging buffer, then pushes raw pixel data through a GStreamer pipeline (appsrc -> videoconvert -> x264enc -> mp4mux -> filesink).
Definition at line 28 of file GstreamerVulkanWriter.h.
|
inline |
Constructs a writer that encodes Vulkan frames to a video file.
| [in] | phys | Vulkan physical device handle. |
| [in] | dev | Vulkan logical device handle. |
| [in] | q | Vulkan queue for transfer commands. |
| [in] | queueFamilyIndex | Queue family index for the transfer queue. |
| [in] | commandPool | Command pool for allocating transfer command buffers. |
| [in] | w | Frame width in pixels. |
| [in] | h | Frame height in pixels. |
| [in] | fmt | Pixel format (must be B8G8R8A8_UNORM or R8G8B8A8_UNORM). |
| [in] | outFile | Output MP4 file path. |
| [in] | fpsNumer | Framerate numerator (default 30). |
| [in] | fpsDenom | Framerate denominator (default 1). |
Definition at line 43 of file GstreamerVulkanWriter.h.
|
inline |
Copies a Vulkan image to the staging buffer and pushes it as a video frame.
| [in] | srcImage | The source VkImage to capture. |
| [in] | currentLayout | The current layout of the source image. |
| [in] | frameIndex | Zero-based frame index for timestamp calculation. |
Definition at line 83 of file GstreamerVulkanWriter.h.