![]() |
IDSpeakIPL
v1.9.0
|
Writes images to a file in the form of a video. More...
#include <peak_ipl/io/peak_ipl_video_writer.hpp>
Public Member Functions | |
| VideoWriter ()=default | |
| ~VideoWriter () | |
| VideoWriter (const VideoWriter &)=delete | |
| VideoWriter (VideoWriter &&other) noexcept | |
| VideoWriter & | operator= (const VideoWriter &)=delete |
| VideoWriter & | operator= (VideoWriter &&other) noexcept |
| void | Open (const std::string &fileName, std::shared_ptr< container::IContainer > container, std::shared_ptr< encoder::IEncoder > encoder) |
| Open the VideoWriter and sets up a container and an encoder. The file is created upon receiving the first image with Append. More... | |
| void | Open (const std::string &fileName) |
| Open the VideoWriter with AVI container and mjpeg encoder. The file is created upon receiving the first image with Append. More... | |
| PEAK_IPL_NO_DISCARD bool | IsOpen () const |
| Check if the VideoWriter is already open. More... | |
| void | Close () |
| Close the opened VideoWriter. More... | |
| void | Append (const Image &image) |
| Append an image to the opened video. More... | |
| VideoWriter & | operator<< (const Image &image) |
| Append an image to the opened video. More... | |
| PEAK_IPL_NO_DISCARD std::shared_ptr< encoder::IEncoder > | Encoder () const |
| Get the used encoder. More... | |
| PEAK_IPL_NO_DISCARD std::shared_ptr< container::IContainer > | Container () const |
| Get the used container. More... | |
| PEAK_IPL_NO_DISCARD uint64_t | NumFramesEncoded () const |
| Get the encoded frames in the video stream. More... | |
| PEAK_IPL_NO_DISCARD uint64_t | NumFramesDropped () const |
| Get the dropped frames in the video stream. More... | |
| PEAK_IPL_NO_DISCARD uint64_t | FileSize () const |
| Get the file size of the video in bytes. More... | |
| void | ResetFrameCounters () |
| Reset compressed and dropped frame counters. More... | |
| void | SetQueueSize (int32_t queueSize) |
| Set the internal queue size of the video writer. More... | |
| PEAK_IPL_NO_DISCARD int32_t | QueueSize () |
| Get the internal queue size of the video writer. More... | |
| PEAK_IPL_NO_DISCARD Range< int32_t > | QueueSizeRange () |
| Get the range of the queue size. More... | |
| PEAK_IPL_NO_DISCARD int32_t | NumBuffersQueued () |
| Get the count of the currently queued buffers, which are waiting to be processed. More... | |
| void | WaitUntilFrameDone (int32_t timeout_ms) |
| Wait until frame processing is done. More... | |
| void | WaitUntilQueueEmpty (int32_t timeout_ms) |
| Wait until the queue is empty. More... | |
Writes images to a file in the form of a video.
|
default |
|
inline |
|
delete |
|
inlinenoexcept |
|
inline |
Append an image to the opened video.
| [in] | image | The image to append. |
| InvalidArgumentException | Arguments passed are invalid |
| ImageFormatNotSupportedException | image has unsupported pixel format. |
| BusyException | The internal queue is full. The image won't be added to the video stream. |
| Exception | An internal error has occurred |
|
inline |
|
inline |
Get the used container.
|
inline |
Get the used encoder.
|
inline |
Get the file size of the video in bytes.
|
inline |
Check if the VideoWriter is already open.
| InvalidArgumentException | Arguments passed are invalid |
| Exception | An internal error has occurred |
|
inline |
Get the count of the currently queued buffers, which are waiting to be processed.
|
inline |
Get the dropped frames in the video stream.
|
inline |
Get the encoded frames in the video stream.
|
inline |
Open the VideoWriter and sets up a container and an encoder. The file is created upon receiving the first image with Append.
| [in] | fileName | The filename of the video as an utf-8 encoded string (u8string) |
| [in] | container | The container of the video. |
| [in] | encoder | The encoder of the video. |
| InvalidArgumentException | Arguments passed are invalid |
| Exception | An internal error has occurred |
|
inline |
Open the VideoWriter with AVI container and mjpeg encoder. The file is created upon receiving the first image with Append.
| [in] | fileName | The filename of the video as an utf-8 encoded string (u8string) |
| InvalidArgumentException | Arguments passed are invalid |
| Exception | An internal error has occurred |
|
inline |
Append an image to the opened video.
| [in] | image | The image to append. |
| InvalidArgumentException | Arguments passed are invalid |
| ImageFormatNotSupportedException | image has unsupported pixel format. |
| BusyException | The internal queue is full. The image won't be added to the video stream. |
| Exception | An internal error has occurred |
|
delete |
|
inlinenoexcept |
|
inline |
Get the internal queue size of the video writer.
|
inline |
Get the range of the queue size.
|
inline |
Reset compressed and dropped frame counters.
|
inline |
Set the internal queue size of the video writer.
| queueSize | internal queue size to set. See QueueSizeRange() for a range of valid values |
|
inline |
Wait until frame processing is done.
| timeout_ms | The timeout in milliseconds. |
|
inline |
Wait until the queue is empty.
| timeout_ms | The timeout in milliseconds. |