Shaka Packager SDK
Public Member Functions | Static Public Member Functions | List of all members
shaka::media::AudioStreamInfo Class Reference

Holds audio stream information. More...

#include <audio_stream_info.h>

Inheritance diagram for shaka::media::AudioStreamInfo:
shaka::media::StreamInfo

Public Member Functions

 AudioStreamInfo (int track_id, int32_t time_scale, int64_t duration, Codec codec, const std::string &codec_string, const uint8_t *codec_config, size_t codec_config_size, uint8_t sample_bits, uint8_t num_channels, uint32_t sampling_frequency, uint64_t seek_preroll_ns, uint64_t codec_delay_ns, uint32_t max_bitrate, uint32_t avg_bitrate, const std::string &language, bool is_encrypted)
 Construct an initialized audio stream info object.
 
uint8_t sample_bits () const
 
uint8_t sample_bytes () const
 
uint8_t num_channels () const
 
uint32_t sampling_frequency () const
 
uint32_t bytes_per_frame () const
 
uint64_t seek_preroll_ns () const
 
uint64_t codec_delay_ns () const
 
uint32_t max_bitrate () const
 
uint32_t avg_bitrate () const
 
void set_sampling_frequency (const uint32_t sampling_frequency)
 
void set_max_bitrate (const uint32_t max_bitrate)
 
StreamInfo implementation overrides.
bool IsValidConfig () const override
 
std::string ToString () const override
 
std::unique_ptr< StreamInfoClone () const override
 
- Public Member Functions inherited from shaka::media::StreamInfo
 StreamInfo (StreamType stream_type, int track_id, int32_t time_scale, int64_t duration, Codec codec, const std::string &codec_string, const uint8_t *codec_config, size_t codec_config_size, const std::string &language, bool is_encrypted)
 
StreamType stream_type () const
 
uint32_t track_id () const
 
int32_t time_scale () const
 
int64_t duration () const
 
Codec codec () const
 
const std::string & codec_string () const
 
const std::vector< uint8_t > & codec_config () const
 
const std::string & language () const
 
bool is_encrypted () const
 
bool has_clear_lead () const
 
const EncryptionConfigencryption_config () const
 
void set_duration (int64_t duration)
 
void set_codec (Codec codec)
 
void set_codec_config (const std::vector< uint8_t > &data)
 
void set_codec_string (const std::string &codec_string)
 
void set_language (const std::string &language)
 
void set_is_encrypted (bool is_encrypted)
 
void set_has_clear_lead (bool has_clear_lead)
 
void set_encryption_config (const EncryptionConfig &encryption_config)
 

Static Public Member Functions

static std::string GetCodecString (Codec codec, uint8_t audio_object_type)
 

Detailed Description

Holds audio stream information.

Definition at line 18 of file audio_stream_info.h.

Member Function Documentation

◆ Clone()

std::unique_ptr< StreamInfo > shaka::media::AudioStreamInfo::Clone ( ) const
overridevirtual
Returns
A new copy of this stream info. The copy will be of the same type as the original. This should be used when a copy is needed without explicitly knowing the stream info type.

Implements shaka::media::StreamInfo.

Definition at line 134 of file audio_stream_info.cc.

◆ GetCodecString()

std::string shaka::media::AudioStreamInfo::GetCodecString ( Codec  codec,
uint8_t  audio_object_type 
)
static
Parameters
audio_object_typeis only used by AAC Codec, ignored otherwise.
Returns
The codec string.

Definition at line 138 of file audio_stream_info.cc.

◆ IsValidConfig()

bool shaka::media::AudioStreamInfo::IsValidConfig ( ) const
overridevirtual
Returns
true if this object has appropriate configuration values, false otherwise.

Implements shaka::media::StreamInfo.

Definition at line 110 of file audio_stream_info.cc.

◆ ToString()

std::string shaka::media::AudioStreamInfo::ToString ( ) const
overridevirtual
Returns
A human-readable string describing the stream info.

Reimplemented from shaka::media::StreamInfo.

Definition at line 117 of file audio_stream_info.cc.


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