Argus Camera Sample Argus Camera Sample

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions
ArgusSamples::VideoPipeline Class Reference

Record a video from a EGL stream. More...

`#include <VideoPipeline.h>`

List of all members.

## 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 | VideoControlRateMode { VIDEO_CONTROLRATE_DISABLE = 0, VIDEO_CONTROLRATE_VARIABLE = 1, VIDEO_CONTROLRATE_CONSTANT = 2 }
| Video Bitrate control method as per encoder properties. 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 = 0x00, VIDEO_AVC_PROFILE_MAIN = 0x02, VIDEO_AVC_PROFILE_HIGH = 0x04, VIDEO_AVC_PROFILE_HIGH444 = 0x07, 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, VideoControlRateMode controlRate=VIDEO_CONTROLRATE_VARIABLE, bool enableTwoPassCBR=false)
| 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.

## Detailed Description

Record a video from a EGL stream.

Definition at line 45 of file VideoPipeline.h.

## Member Enumeration Documentation

enum ArgusSamples::VideoPipeline::VideoAvcProfileType

Video AVC profile types, each profile indicates support for various performance bounds and different annexes.

Enumerator:

  VIDEO_AVC_PROFILE_BASELINE |
  VIDEO_AVC_PROFILE_MAIN |
  VIDEO_AVC_PROFILE_HIGH |
  VIDEO_AVC_PROFILE_HIGH444 |
  VIDEO_AVC_PROFILE_MAX |

Definition at line 100 of file VideoPipeline.h.

enum ArgusSamples::VideoPipeline::VideoBitRate

Video BitRate presets.

Enumerator:

  VIDEO_BITRATE_4M |
  VIDEO_BITRATE_8M |
  VIDEO_BITRATE_14M |
  VIDEO_BITRATE_20M |
  VIDEO_BITRATE_MAX |

Definition at line 65 of file VideoPipeline.h.

enum ArgusSamples::VideoPipeline::VideoControlRateMode

Video Bitrate control method as per encoder properties.

Enumerator:

  VIDEO_CONTROLRATE_DISABLE |
  VIDEO_CONTROLRATE_VARIABLE |
  VIDEO_CONTROLRATE_CONSTANT |

Definition at line 77 of file VideoPipeline.h.

enum ArgusSamples::VideoPipeline::VideoFileType

Supported video file types.

Enumerator:

  VIDEO_FILE_TYPE_MP4 |
  VIDEO_FILE_TYPE_3GP |
  VIDEO_FILE_TYPE_AVI |
  VIDEO_FILE_TYPE_MKV |
  VIDEO_FILE_TYPE_H265 |

Definition at line 87 of file VideoPipeline.h.

enum ArgusSamples::VideoPipeline::VideoFormat

Supported video formats.

Enumerator:

  VIDEO_FORMAT_H264 |
  VIDEO_FORMAT_H265 |
  VIDEO_FORMAT_VP8 |
  VIDEO_FORMAT_VP9 |

Definition at line 54 of file VideoPipeline.h.

## Constructor & Destructor Documentation

ArgusSamples::VideoPipeline::VideoPipeline | ( |  | ) |

Definition at line 41 of file VideoPipeline.cpp.

ArgusSamples::VideoPipeline::~VideoPipeline | ( |  | ) |

Definition at line 49 of file VideoPipeline.cpp.

## Member Function Documentation

bool ArgusSamples::VideoPipeline::destroy | ( |  | ) |

Destroy the video pipeline.

Definition at line 617 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.

Parameters:

  aspectRatio | [out]

Definition at line 657 of file VideoPipeline.cpp.

const char * ArgusSamples::VideoPipeline::getFileExtension | ( | VideoFileType | fileType | ) |

static

Get the file extension for a video file type.

Definition at line 636 of file VideoPipeline.cpp.

bool ArgusSamples::VideoPipeline::isSupported | ( |  | ) |

static

Get indicator of video recording being supported.

Definition at line 722 of file VideoPipeline.cpp.

bool ArgusSamples::VideoPipeline::pause | ( |  | ) |

Pause recording/playback.

Definition at line 510 of file VideoPipeline.cpp.

bool ArgusSamples::VideoPipeline::rewind | ( |  | ) |

Rewind (playback only)

Definition at line 555 of file VideoPipeline.cpp.

bool ArgusSamples::VideoPipeline::setupForPlayback | ( | EGLStreamKHR * | videoStream,
|  | const char * | fileName
| ) |  |

Setup the video pipeline for playback.

Parameters:

  [out] | videoStream | EGL stream
  [in] | fileName | File name

Definition at line 392 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`,
|  | VideoControlRateMode | controlRate = `VIDEO_CONTROLRATE_VARIABLE`,
|  | bool | enableTwoPassCBR = `false`
| ) |  |

Setup the video pipeline for recording.

Parameters:

  [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
  [in] | controlRate | Bit Rate control method
  [in] | enableTwoPassCBR | enables 2-pass for constant bitRate

Definition at line 112 of file VideoPipeline.cpp.

bool ArgusSamples::VideoPipeline::start | ( |  | ) |

Start recording/playback.

Definition at line 479 of file VideoPipeline.cpp.

bool ArgusSamples::VideoPipeline::stop | ( |  | ) |

Stop recording/playback.

Definition at line 573 of file VideoPipeline.cpp.

bool ArgusSamples::VideoPipeline::toggle | ( |  | ) |

Toggle recording/playback.

Definition at line 530 of file VideoPipeline.cpp.

The documentation for this class was generated from the following files:

- common/VideoPipeline.h
- common/VideoPipeline.cpp