Provides the functionality for the user to record images to an AVI/MP4 file.
More...
#include <SpinVideo.h>
|
| SpinVideo () |
| Default constructor.
|
|
virtual | ~SpinVideo () |
| Default destructor.
|
|
virtual void | Open (const char *pFileName, AVIOption &pOption) |
| Open an video file in preparation for writing Images to disk.
|
|
virtual void | Open (const char *pFileName, MJPGOption &pOption) |
| Open an MJPEG video file in preparation for writing Images to disk.
|
|
virtual void | Open (const char *pFileName, H264Option &pOption) |
| Open an H264 MP4 video file in preparation for writing Images to disk.
|
|
virtual void | Append (ImagePtr pImage) |
| Append an image to the video file.
|
|
virtual void | Close () |
| Close the video file.
|
|
virtual void | SetMaximumFileSize (unsigned int size) |
| Set the maximum file size (in megabytes) of a AVI/MP4 file.
|
|
Provides the functionality for the user to record images to an AVI/MP4 file.
- Examples
- SaveToVideo.cpp.
◆ SpinVideo()
◆ ~SpinVideo()
◆ Append()
Append an image to the video file.
When using the H264 encoder, several images are required to be appended before the encoder is able to output the first encoded frame.
- Parameters
-
pImage | The image to append. |
- Examples
- SaveToVideo.cpp.
◆ Close()
Close the video file.
This function will throw an exception when the H264 encoder was unable to output any encoded frames, in which case the output video should be considered invalid.
- See also
- Open()
-
Append(ImagePtr pImage)
- Examples
- SaveToVideo.cpp.
◆ Open() [1/3]
virtual void Open |
( |
const char * |
pFileName, |
|
|
AVIOption & |
pOption |
|
) |
| |
|
virtual |
Open an video file in preparation for writing Images to disk.
The size of video files is limited to 2GB. The filenames are automatically generated using the filename specified.
- Parameters
-
pFileName | The filename of the video file. |
pOption | Options to apply to the video file. |
- See also
- Close()
- Examples
- SaveToVideo.cpp.
◆ Open() [2/3]
virtual void Open |
( |
const char * |
pFileName, |
|
|
H264Option & |
pOption |
|
) |
| |
|
virtual |
Open an H264 MP4 video file in preparation for writing Images to disk.
The size of MP4 files is limited to 2GB. The filenames are automatically generated using the filename specified.
- Parameters
-
pFileName | The filename of the MP4 video file. |
pOption | H264 options to apply to the MP4 video file. |
- See also
- Close()
-
H264Option
◆ Open() [3/3]
virtual void Open |
( |
const char * |
pFileName, |
|
|
MJPGOption & |
pOption |
|
) |
| |
|
virtual |
Open an MJPEG video file in preparation for writing Images to disk.
The size of video files is limited to 2GB. The filenames are automatically generated using the filename specified.
- Parameters
-
pFileName | The filename of the video file. |
pOption | MJPEG options to apply to the video file. |
- See also
- Close()
-
MJPGOption
◆ SetMaximumFileSize()
virtual void SetMaximumFileSize |
( |
unsigned int |
size | ) |
|
|
virtual |
Set the maximum file size (in megabytes) of a AVI/MP4 file.
A new video file is created automatically when file size limit is reached. Setting a maximum size of 0 indicates no limit on file size.
Note that this size serves only as a hint and can still be slightly exceeded in some cases after the video trailer is written.
- Parameters
-
size | The maximum video file size in MB. |
- See also
- Append(ImagePtr pImage)
- Examples
- SaveToVideo.cpp.
The documentation for this class was generated from the following file: