Shaka Packager SDK
Public Member Functions | List of all members
shaka::media::StreamInfo Class Referenceabstract

Abstract class holds stream information. More...

#include <stream_info.h>

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

Public Member Functions

 StreamInfo (StreamType stream_type, int track_id, uint32_t time_scale, uint64_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)
 
virtual bool IsValidConfig () const =0
 
virtual std::string ToString () const
 
virtual std::unique_ptr< StreamInfoClone () const =0
 
StreamType stream_type () const
 
uint32_t track_id () const
 
uint32_t time_scale () const
 
uint64_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 (uint64_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)
 

Detailed Description

Abstract class holds stream information.

Definition at line 65 of file stream_info.h.

Member Function Documentation

◆ Clone()

virtual std::unique_ptr<StreamInfo> shaka::media::StreamInfo::Clone ( ) const
pure virtual
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.

Implemented in shaka::media::TextStreamInfo, shaka::media::VideoStreamInfo, and shaka::media::AudioStreamInfo.

◆ IsValidConfig()

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

Implemented in shaka::media::TextStreamInfo, shaka::media::VideoStreamInfo, and shaka::media::AudioStreamInfo.

◆ ToString()

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

Reimplemented in shaka::media::TextStreamInfo, shaka::media::VideoStreamInfo, and shaka::media::AudioStreamInfo.

Definition at line 59 of file stream_info.cc.


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