![]() |
Imaging Control 4 C++ Library 1.4.0
|
Represents a video writer. More...
Public Member Functions | |
| VideoWriter (VideoWriterType type, Error &err=Error::Default()) | |
| Creates a new video writer. | |
| bool | is_valid () const noexcept |
| Checks whether this video writer is a valid object. | |
| bool | beginFile (const char *file_name, const ImageType &image_type, double frame_rate, Error &err=Error::Default()) |
| Opens a new video file ready to write images into. | |
| bool | beginFile (const std::string &file_name, const ImageType &image_type, double frame_rate, Error &err=Error::Default()) |
| Opens a new video file ready to write images into. | |
| bool | finishFile (Error &err=Error::Default()) |
| Finishes writing a video file. | |
| bool | addFrame (const std::shared_ptr< ImageBuffer > &buffer, Error &err=Error::Default()) |
| Adds an image to the currently open video file. | |
| bool | addFrame (const ImageBuffer &buffer, Error &err=Error::Default()) |
| Adds an image to the currently open video file, copying its contents in the process. | |
| PropertyMap | propertyMap (Error &err=Error::Default()) |
| Returns the property map for encoder configuration. | |
Represents a video writer.
To create a video writer, use the VideoWriter::VideoWriter constructor, passing the type of the desired video file.
After creating the video writer, call VideoWriter::beginFile() to start writing a new video file. Call VideoWriter::addFrame() to add images to the video file. To complete the recording, call VideoWriter::finishFile().
Use VideoWriter::propertyMap() to access encoder configuration options.
VideoWriter objects are movable.
|
inline |
Creates a new video writer.
| [in] | type | The type of video file to create a writer for |
| [out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Adds an image to the currently open video file, copying its contents in the process.
| [in] | buffer | Image buffer to be added to the video file. |
| [out] | err | Reference to an error handler. See Error Handling for details. |
true on success, otherwise false.
|
inline |
Adds an image to the currently open video file.
| [in] | buffer | Image buffer to be added to the video file. |
| [out] | err | Reference to an error handler. See Error Handling for details. |
true on success, otherwise false.
|
inline |
Opens a new video file ready to write images into.
| [in] | file_name | Name of the new video file |
| [in] | image_type | Image type of the images that are going to be written |
| [in] | frame_rate | Playback frame rate of the video file |
| [out] | err | Reference to an error handler. See Error Handling for details. |
true on success, otherwise false.
|
inline |
Opens a new video file ready to write images into.
| [in] | file_name | Name of the new video file |
| [in] | image_type | Image type of the images that are going to be written |
| [in] | frame_rate | Playback frame rate of the video file |
| [out] | err | Reference to an error handler. See Error Handling for details. |
true on success, otherwise false.
|
inline |
Finishes writing a video file.
| [out] | err | Reference to an error handler. See Error Handling for details. |
true on success, otherwise false.
|
inlinenoexcept |
Checks whether this video writer is a valid object.
If the constructor could not create a valid device information object, and the passed err was not set to ic4::Error::Throw(), an invalid object is created. All member function calls will fail.
true, if this video writer object was constructed successfully, otherwise false.
|
inline |
Returns the property map for encoder configuration.
| [out] | err | Reference to an error handler. See Error Handling for details. |