#include <broadcasttypes.h>
Video parameters that are set at the beginning of a broadcast session.
◆ VideoParams()
| ttv::broadcast::VideoParams::VideoParams |
( |
| ) |
|
◆ ConfigureForBandwidth()
| static TTV_ErrorCode ttv::broadcast::VideoParams::ConfigureForBandwidth |
( |
uint32_t |
expectedKbps, |
|
|
uint32_t |
framesPerSecond, |
|
|
float |
bitsPerPixel, |
|
|
float |
aspectRatio, |
|
|
VideoParams & |
result |
|
) |
| |
|
static |
Configures the video parameters so that a broadcast stays within the given maxKbps. The resolution of the broadcast will be computed automatically based on given parameters.
- Parameters
-
| [in] | expectedKbps | The expeected bit rate of the connection in 1000s of bits per second. |
| [in] | framesPerSecond | The number of frames per second that will be submitted by the capturer and output in the stream. |
| [in] | bitsPerPixel | The number of bits to use per pixel. A good recommended value is 0.1. |
| [in] | aspectRatio | The desired aspect ratio of the calculated resolution. |
- Returns
- TTV_EC_SUCCESS - The configuration was successful.
- TTV_EC_BROADCAST_INVALID_BITRATE - The bit rate was not within the required range for the Twitch backend.
- TTV_EC_BROADCAST_INVALID_FPS - The frames per second value was not within the required range for the Twitch backend.
- TTV_EC_INVALID_ARG - The aspect ratio or bits per pixel were not valid inputs.
◆ ConfigureForResolution()
| static TTV_ErrorCode ttv::broadcast::VideoParams::ConfigureForResolution |
( |
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
uint32_t |
framesPerSecond, |
|
|
float |
bitsPerPixel, |
|
|
VideoParams & |
result |
|
) |
| |
|
static |
Configures the broadcast settings directly allowing a specific resolution and framerate to be used. Please note that this method may result in a broadcast that tries to send more data than a user's connection can support. Use SetVideoParams() along with ingest testing to ensure the best stream quality available.
- Parameters
-
| [in] | width | The desired width of the stream in pixels. |
| [in] | height | The desired height of the stream in pixels. |
| [in] | framesPerSecond | The number of frames per second that will be submitted by the capturer and output in the stream. |
| [in] | bitsPerPixel | The number of bits to use per pixel. A good recommended value is 0.1. |
- Returns
- TTV_EC_SUCCESS - The configuration was successful.
- TTV_EC_BROADCAST_INVALID_RESOLUTION - The resolution was not within the required range for the Twitch backend.
- TTV_EC_BROADCAST_INVALID_FPS - The frames per second value was not within the required range for the Twitch backend.
◆ automaticBitRateAdjustmentEnabled
| bool ttv::broadcast::VideoParams::automaticBitRateAdjustmentEnabled |
Whether or not to adjust bit rate dynamically based on available bandwidth.
◆ encodingCpuUsage
The desired CPU usage level for video encoding. This property may not have any effect on some encoders and platforms.
◆ initialKbps
| uint32_t ttv::broadcast::VideoParams::initialKbps |
The starting bit rate in 1000s of bits per second. If automatic bit rate adjustment is disabled then this will be the constant bit rate used by the video encoder.
◆ maximumKbps
| uint32_t ttv::broadcast::VideoParams::maximumKbps |
When automatic bit rate adjustment is enabled, this is maximum bit rate in 1000s of bits per second.
◆ minimumKbps
| uint32_t ttv::broadcast::VideoParams::minimumKbps |
When automatic bit rate adjustment is enabled, this is minimum bit rate in 1000s of bits per second.
◆ outputHeight
| uint32_t ttv::broadcast::VideoParams::outputHeight |
The height of the output video stream in pixels. The IVideoCapturer should produce frames with this exact height for best quality.
◆ outputWidth
| uint32_t ttv::broadcast::VideoParams::outputWidth |
The width of the output video stream in pixels. The IVideoCapturer should produce frames with this exact width for best quality.
◆ targetFramesPerSecond
| uint32_t ttv::broadcast::VideoParams::targetFramesPerSecond |
The number of frames per second that will be submitted by the capturer and output in the stream.
The documentation for this struct was generated from the following file: