Function spdl::core::create_reference_video_frame¶
Defined in File conversion.h
Function Documentation¶
-
VideoFramesPtr spdl::core::create_reference_video_frame(const std::string &sample_fmt, const void *data, int bits, const std::vector<size_t> &shape, const std::vector<int64_t> &stride, Rational frame_rate, int64_t pts)¶
Create a video frame referencing external data.
Creates a frame that references externally managed memory without copying. The caller must ensure the data remains valid for the lifetime of the frame.
- Parameters:
sample_fmt – Pixel format string (e.g., “rgb24”, “yuv420p”).
data – Pointer to external video data.
bits – Bits per component.
shape – Shape vector [height, width, …].
stride – Stride vector for each dimension.
frame_rate – Frame rate as a rational number.
pts – Presentation timestamp.
- Returns:
Video frames referencing the external data.