public class

HVTCamcorderProfile

extends Object
java.lang.Object
   ↳ com.hvt.horizonSDK.HVTCamcorderProfile

Class Overview

A Camcorder profile that can be used by HVTCamera to set-up recording.

Each profile specifies the following set of parameters:

  • Video frame width and height in pixels,
  • Video bit rate in bits per second
  • i-Frame interval in seconds
  • Number of audio channels for recording.
  • Audio sample rate
  • Audio bit rate in bits per second

There are multiple constructors available. You can always change the profile parameters after they are initialized.

The i-Frame interval is 3 seconds by default.

Summary

Constants
int QUALITY_HIGH Quality level corresponding to high bitrate.
int QUALITY_LOW Quality level corresponding to low bitrate.
int QUALITY_MEDIUM Quality level corresponding to medium bitrate.
Fields
public int audioBitrate The target audio output bit rate in bits per second
public int audioChannels The number of audio channels used for the audio track
public int audioSampleRate The audio sampling rate used for the audio track
public int videoBitrate The target video output bit rate in bits per second
public int videoFrameHeight The target video frame height in pixels
public int videoFrameWidth The target video frame width in pixels
public int videoIFrameInterval The frequency of I frames expressed in secs between I frames
Public Constructors
HVTCamcorderProfile()
Constructs a new instance without initializing any of the parameters.
HVTCamcorderProfile(CamcorderProfile profile)
Constructs a new instance using the parameters of the provided CamcorderProfile.
HVTCamcorderProfile(int width, int height)
Constructs a new instance using the provided width and height.
HVTCamcorderProfile(int width, int height, int videoQuality)
Constructs a new instance using the provided width, height and videoQuality.
Public Methods
static int calculateVideoBitrate(int width, int height, int quality)
Calculates and returns the appropriate video bitrate for the provided width, height and quality level.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int QUALITY_HIGH

Quality level corresponding to high bitrate.

Constant Value: 0 (0x00000000)

public static final int QUALITY_LOW

Quality level corresponding to low bitrate.

Constant Value: 2 (0x00000002)

public static final int QUALITY_MEDIUM

Quality level corresponding to medium bitrate.

Constant Value: 1 (0x00000001)

Fields

public int audioBitrate

The target audio output bit rate in bits per second

public int audioChannels

The number of audio channels used for the audio track

public int audioSampleRate

The audio sampling rate used for the audio track

public int videoBitrate

The target video output bit rate in bits per second

public int videoFrameHeight

The target video frame height in pixels

public int videoFrameWidth

The target video frame width in pixels

public int videoIFrameInterval

The frequency of I frames expressed in secs between I frames

Public Constructors

public HVTCamcorderProfile ()

Constructs a new instance without initializing any of the parameters.

Note: If you use this constructor, you must specify the values of all the parameters.

public HVTCamcorderProfile (CamcorderProfile profile)

Constructs a new instance using the parameters of the provided CamcorderProfile.

Only the shared parameters are copied to the new instance.

Parameters
profile the CamcorderProfile to use as reference

public HVTCamcorderProfile (int width, int height)

Constructs a new instance using the provided width and height.

The video bitrate will be calculated using for {@link #QUALITY_HIGH.

The audio settings will match the QUALITY_HIGH preset.

Parameters
width the width in pixels
height the height in pixels

public HVTCamcorderProfile (int width, int height, int videoQuality)

Constructs a new instance using the provided width, height and videoQuality.

The video bitrate will be calculated using calculateVideoBitrate(int, int, int) for the supplied videoQuality.

The audio settings will match the QUALITY_HIGH preset.

Parameters
width the width in pixels
height the height in pixels
videoQuality the target video quality level of the video bitrate

Public Methods

public static int calculateVideoBitrate (int width, int height, int quality)

Calculates and returns the appropriate video bitrate for the provided width, height and quality level.

The target quality level can be any of: QUALITY_LOW, QUALITY_MEDIUM, QUALITY_HIGH

The maximum bitrate returned by the method is 20 Mbps.

Parameters
width the width in pixels
height the height in pixels
quality the target quality level
Returns
  • the video bitrate in bits per second