|
Argus Camera Sample
Argus Camera Sample
|
Record a video from a EGL stream. More...
#include <VideoPipeline.h>
Public Types | |
| enum | VideoFormat { VIDEO_FORMAT_H264, VIDEO_FORMAT_H265, VIDEO_FORMAT_VP8, VIDEO_FORMAT_VP9 } |
| Supported video formats. More... | |
| enum | VideoBitRate { VIDEO_BITRATE_4M = 4000000, VIDEO_BITRATE_8M = 8000000, VIDEO_BITRATE_14M = 14000000, VIDEO_BITRATE_20M = 20000000, VIDEO_BITRATE_MAX = 240000000 } |
| Video BitRate presets. 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... | |
| enum | VideoAvcProfileType { VIDEO_AVC_PROFILE_BASELINE = 0x01, VIDEO_AVC_PROFILE_MAIN = 0x02, VIDEO_AVC_PROFILE_EXTENDED = 0x04, VIDEO_AVC_PROFILE_HIGH = 0x08, VIDEO_AVC_PROFILE_HIGH10 = 0x10, VIDEO_AVC_PROFILE_MAX = 0x7FFFFFFF } |
| Video AVC profile types, each profile indicates support for various performance bounds and different annexes. 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_H265, VideoFileType videoFileType=VIDEO_FILE_TYPE_MKV, 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. | |
| static bool | isSupported () |
| Get indicator of video recording being supported. | |
Record a video from a EGL stream.
Definition at line 45 of file VideoPipeline.h.
Video AVC profile types, each profile indicates support for various performance bounds and different annexes.
| VIDEO_AVC_PROFILE_BASELINE | |
| VIDEO_AVC_PROFILE_MAIN | |
| VIDEO_AVC_PROFILE_EXTENDED | |
| VIDEO_AVC_PROFILE_HIGH | |
| VIDEO_AVC_PROFILE_HIGH10 | |
| VIDEO_AVC_PROFILE_MAX |
Definition at line 90 of file VideoPipeline.h.
Video BitRate presets.
Definition at line 65 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 77 of file VideoPipeline.h.
Supported video formats.
Definition at line 54 of file VideoPipeline.h.
| ArgusSamples::VideoPipeline::VideoPipeline | ( | ) |
Definition at line 41 of file VideoPipeline.cpp.
| ArgusSamples::VideoPipeline::~VideoPipeline | ( | ) |
Definition at line 49 of file VideoPipeline.cpp.
| bool ArgusSamples::VideoPipeline::destroy | ( | ) |
Destroy the video pipeline.
Definition at line 587 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 627 of file VideoPipeline.cpp.
|
static |
Get the file extension for a video file type.
Definition at line 606 of file VideoPipeline.cpp.
|
static |
Get indicator of video recording being supported.
Definition at line 692 of file VideoPipeline.cpp.
| bool ArgusSamples::VideoPipeline::pause | ( | ) |
Pause recording/playback.
Definition at line 480 of file VideoPipeline.cpp.
| bool ArgusSamples::VideoPipeline::rewind | ( | ) |
Rewind (playback only)
Definition at line 525 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 362 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_H265, |
||
| VideoFileType | videoFileType = VIDEO_FILE_TYPE_MKV, |
||
| 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 112 of file VideoPipeline.cpp.
| bool ArgusSamples::VideoPipeline::start | ( | ) |
Start recording/playback.
Definition at line 449 of file VideoPipeline.cpp.
| bool ArgusSamples::VideoPipeline::stop | ( | ) |
Stop recording/playback.
Definition at line 543 of file VideoPipeline.cpp.
| bool ArgusSamples::VideoPipeline::toggle | ( | ) |
Toggle recording/playback.
Definition at line 500 of file VideoPipeline.cpp.
1.8.1