Twitch SDK (Internal)
Classes | Namespaces | Typedefs | Enumerations | Variables
broadcasttypes.h File Reference
#include "twitchsdk/core/types/coretypes.h"
#include "twitchsdk/broadcast/broadcasterrortypes.h"
#include <vector>

Go to the source code of this file.

Classes

struct  ttv::broadcast::IngestServer
 
struct  ttv::broadcast::VideoParams
 
struct  ttv::broadcast::ArchivingState
 
struct  ttv::broadcast::GameInfo
 
struct  ttv::broadcast::GameInfoList
 
struct  ttv::broadcast::BandwidthStat
 
struct  ttv::broadcast::MuxerParameters
 

Namespaces

 ttv
 JSON (JavaScript Object Notation).
 
 ttv::broadcast
 

Typedefs

typedef uint32_t ttv::broadcast::AudioLayerId
 

Enumerations

enum  ttv::broadcast::PixelFormat { ttv::broadcast::PixelFormat::TTV_PF_BGRA = 0x00010203, ttv::broadcast::PixelFormat::TTV_PF_ABGR = 0x01020300, ttv::broadcast::PixelFormat::TTV_PF_RGBA = 0x02010003, ttv::broadcast::PixelFormat::TTV_PF_ARGB = 0x03020100 }
 
enum  ttv::broadcast::YUVFormat { ttv::broadcast::YUVFormat::TTV_YUV_NONE = -1, ttv::broadcast::YUVFormat::TTV_YUV_I420, ttv::broadcast::YUVFormat::TTV_YUV_YV12, ttv::broadcast::YUVFormat::TTV_YUV_NV12 }
 
enum  ttv::broadcast::EncodingCpuUsage { ttv::broadcast::EncodingCpuUsage::Default, ttv::broadcast::EncodingCpuUsage::Low, ttv::broadcast::EncodingCpuUsage::Medium, ttv::broadcast::EncodingCpuUsage::High }
 
enum  ttv::broadcast::ConnectionType { ttv::broadcast::ConnectionType::Wifi, ttv::broadcast::ConnectionType::Ethernet, ttv::broadcast::ConnectionType::Cellular, ttv::broadcast::ConnectionType::Unknown }
 
enum  ttv::broadcast::AudioFormat { ttv::broadcast::AudioFormat::None, ttv::broadcast::AudioFormat::PCM, ttv::broadcast::AudioFormat::MP3, ttv::broadcast::AudioFormat::AAC }
 
enum  ttv::broadcast::AudioSampleFormat { ttv::broadcast::AudioSampleFormat::TTV_ASF_PCM_S16 }
 
enum  ttv::broadcast::AudioSampleRate { ttv::broadcast::AudioSampleRate::Hz11250 = 11250, ttv::broadcast::AudioSampleRate::Hz22500 = 22500, ttv::broadcast::AudioSampleRate::Hz44100 = 44100 }
 
enum  ttv::broadcast::StreamStartFlags { ttv::broadcast::StreamStartFlags::None = 0, ttv::broadcast::StreamStartFlags::BandwidthTest = 1 << 0 }
 
enum  ttv::broadcast::BroadcastState {
  ttv::broadcast::BroadcastState::Initialized, ttv::broadcast::BroadcastState::ReadyToBroadcast, ttv::broadcast::BroadcastState::StartingBroadcast, ttv::broadcast::BroadcastState::Broadcasting,
  ttv::broadcast::BroadcastState::StoppingBroadcast
}
 

Variables

const uint32_t ttv::broadcast::kMinBitRate = 300
 The minimum bit rate supported by the Twitch backend. More...
 
const uint32_t ttv::broadcast::kMaxBitRate = 6000
 The absolute maximum bit rate supported by the Twitch backend. More...
 
const uint32_t ttv::broadcast::kDefaultInitialBitRate = 1500
 The default starting bit rate of a broadcast. More...
 
const uint32_t ttv::broadcast::kDefaultFramesPerSecond = 30
 The default frames per second of the broadcast. More...
 
const uint32_t ttv::broadcast::kMinFramesPerSecond = 10
 The minimum frames per second supported by the Twitch backend. More...
 
const uint32_t ttv::broadcast::kMaxFramesPerSecond = 60
 The maximum frames per second supported by the Twitch backend. More...
 
const uint32_t ttv::broadcast::kMaxFrameWidth = 1920
 The maximum width supported by the Twitch backend. Must be a multiple of 16. More...
 
const uint32_t ttv::broadcast::kMaxFrameHeight = 1200
 The maximum height supported by the Twitch backend. Must be a multiple of 16. More...
 
const float ttv::broadcast::kRecommendedBitsPerPixel = 0.1f
 

Class Documentation

◆ ttv::broadcast::GameInfoList

struct ttv::broadcast::GameInfoList

A list of game info structs.

Class Members
vector< GameInfo > games

◆ ttv::broadcast::BandwidthStat

struct ttv::broadcast::BandwidthStat
Class Members
double backBufferSeconds How many seconds of data is buffered to be sent.
double congestionLevel What fraction of our time is spent blocking on the network socket, from 0.0-1.0.
uint64_t encoderOutputBitsPerSecond The rate at which the vide encoder is actually producing data.
uint64_t measuredBitsPerSecond The actual measured speed we are sending data over the socket in bits per second.
uint64_t recommendedBitsPerSecond The bit rate the ABS algorithm has recommended to the encoder in bits per second.
double recordedTime The time of the measurement in number of seconds since the start of broadcast.

◆ ttv::broadcast::MuxerParameters

struct ttv::broadcast::MuxerParameters

The values required to initialize an video + optional audio stream.

Class Members
string appVersion The version of the app using the muxer.
bool audioEnabled Whether or not to capture and encode audio.
AudioFormat audioFormat The audio encoding format.
uint32_t audioSampleRate The number of audio samples per second.
uint32_t audioSampleSize The number of bits in a sample.
bool audioStereo Whether or not to encode stereo audio.
uint32_t frameRate The number of frames per second.
uint32_t videoHeight The height of the video frame.
vector< uint8_t > videoPps Picture parameter set.
vector< uint8_t > videoSps Sequence parameter set.
uint32_t videoWidth The width of the video frame.