Pull-based provider of one already-encoded video/image frame at a time - e.g. wraps a camera capture + H264Encoder/MJPEG capture pipeline. Used by VideoMuxerWithTasks's video task, which calls nextFrame() once per iteration, at the rate given by videoInfo().fps. Implementations should produce/capture the frame here directly (not defer it): a slow nextFrame() only delays whatever is pulling from it.
More...
#include <Video.h>
Pull-based provider of one already-encoded video/image frame at a time - e.g. wraps a camera capture + H264Encoder/MJPEG capture pipeline. Used by VideoMuxerWithTasks's video task, which calls nextFrame() once per iteration, at the rate given by videoInfo().fps. Implementations should produce/capture the frame here directly (not defer it): a slow nextFrame() only delays whatever is pulling from it.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ ~VideoFrameSource()
◆ nextFrame()
| virtual const uint8_t * nextFrame |
( |
size_t & |
len | ) |
|
|
pure virtual |
Provides the next encoded frame: return a pointer to the frame's bytes (only required to stay valid until the next nextFrame() call) and set len to its size - or return nullptr if no frame is available yet, in which case the caller skips this iteration.
Implemented in CameraFrameSource, and CameraFrameSourceOpenCV.
◆ videoInfo()
Provides the width/height/fps/format (and, if known, frame_size/ total_file_size) of the frames returned by nextFrame() - width, height, fps and format must be set, since VideoMuxerWithTasks uses them directly to configure the Muxer it writes to instead of requiring the caller to duplicate the same values there.
Implemented in CameraFrameSource, and CameraFrameSourceOpenCV.
◆ writeTo()
| bool writeTo |
( |
Print & |
out | ) |
|
|
inline |
Write the frame to the indicated destination.
The documentation for this class was generated from the following file: