Argus Camera Sample
Argus Camera Sample
|
Record a video from a EGL stream. More...
#include <VideoPipeline.h>
Public Types | |
enum | VideoFormat { VIDEO_FORMAT_H263, VIDEO_FORMAT_H264, VIDEO_FORMAT_H265, VIDEO_FORMAT_VP8, VIDEO_FORMAT_MPEG4 } |
Supported video formats. More... | |
enum | VideoFileType { VIDEO_FILE_TYPE_MP4, VIDEO_FILE_TYPE_3GP, VIDEO_FILE_TYPE_AVI, VIDEO_FILE_TYPE_MKV, VIDEO_FILE_TYPE_H265 } |
Supported video file types. More... |
Public Member Functions | |
VideoPipeline () | |
~VideoPipeline () | |
bool | destroy () |
Destroy the video pipeline. | |
bool | setupForRecording (EGLStreamKHR videoStream, uint32_t width, uint32_t height, float frameRate, const char *fileName, VideoFormat videoFormat=VIDEO_FORMAT_H264, VideoFileType videoFileType=VIDEO_FILE_TYPE_MP4, uint32_t bitRate=0) |
Setup the video pipeline for recording. | |
bool | setupForPlayback (EGLStreamKHR *videoStream, const char *fileName) |
Setup the video pipeline for playback. | |
bool | start () |
Start recording/playback. | |
bool | pause () |
Pause recording/playback. | |
bool | toggle () |
Toggle recording/playback. | |
bool | rewind () |
Rewind (playback only) | |
bool | stop () |
Stop recording/playback. | |
bool | getAspectRatio (float *aspectRatio) const |
Get the aspect ratio of the video. |
Static Public Member Functions | |
static const char * | getFileExtension (VideoFileType fileType) |
Get the file extension for a video file type. |
Record a video from a EGL stream.
Definition at line 45 of file VideoPipeline.h.
Supported video file types.
VIDEO_FILE_TYPE_MP4 | |
VIDEO_FILE_TYPE_3GP | |
VIDEO_FILE_TYPE_AVI | |
VIDEO_FILE_TYPE_MKV | |
VIDEO_FILE_TYPE_H265 |
Definition at line 66 of file VideoPipeline.h.
Supported video formats.
VIDEO_FORMAT_H263 | |
VIDEO_FORMAT_H264 | |
VIDEO_FORMAT_H265 | |
VIDEO_FORMAT_VP8 | |
VIDEO_FORMAT_MPEG4 |
Definition at line 54 of file VideoPipeline.h.
ArgusSamples::VideoPipeline::VideoPipeline | ( | ) |
Definition at line 40 of file VideoPipeline.cpp.
ArgusSamples::VideoPipeline::~VideoPipeline | ( | ) |
Definition at line 48 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::destroy | ( | ) |
Destroy the video pipeline.
Definition at line 574 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::getAspectRatio | ( | float * | aspectRatio | ) | const |
Get the aspect ratio of the video.
The video has to be in paused or playing state.
aspectRatio | [out] |
Definition at line 614 of file VideoPipeline.cpp.
|
static |
Get the file extension for a video file type.
Definition at line 593 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::pause | ( | ) |
Pause recording/playback.
Definition at line 467 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::rewind | ( | ) |
Rewind (playback only)
Definition at line 512 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::setupForPlayback | ( | EGLStreamKHR * | videoStream, |
const char * | fileName | ||
) |
Setup the video pipeline for playback.
[out] | videoStream | EGL stream |
[in] | fileName | File name |
Definition at line 349 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::setupForRecording | ( | EGLStreamKHR | videoStream, |
uint32_t | width, | ||
uint32_t | height, | ||
float | frameRate, | ||
const char * | fileName, | ||
VideoFormat | videoFormat = VIDEO_FORMAT_H264 , |
||
VideoFileType | videoFileType = VIDEO_FILE_TYPE_MP4 , |
||
uint32_t | bitRate = 0 |
||
) |
Setup the video pipeline for recording.
[in] | videoStream | EGL stream to record from |
[in] | width | Width of the recorded video |
[in] | height | Height of the recorded video |
[in] | frameRate | Frame rate |
[in] | fileName | File name |
[in] | videoFormat | Video format |
[in] | videoFileType | Video file type |
[in] | bitRate | Bitrate, if 0 the bitrate will be selected depending on the resolution |
Definition at line 111 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::start | ( | ) |
Start recording/playback.
Definition at line 436 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::stop | ( | ) |
Stop recording/playback.
Definition at line 530 of file VideoPipeline.cpp.
bool ArgusSamples::VideoPipeline::toggle | ( | ) |
Toggle recording/playback.
Definition at line 487 of file VideoPipeline.cpp.