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

Holds video stream information. More...

#include <video_stream_info.h>

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

Public Member Functions

 VideoStreamInfo (int track_id, uint32_t time_scale, uint64_t duration, Codec codec, H26xStreamFormat h26x_stream_format, const std::string &codec_string, const uint8_t *codec_config, size_t codec_config_size, uint16_t width, uint16_t height, uint32_t pixel_width, uint32_t pixel_height, uint8_t transfer_characteristics, uint32_t trick_play_factor, uint8_t nalu_length_size, const std::string &language, bool is_encrypted)
 
const std::vector< uint8_t > & extra_config () const
 
H26xStreamFormat h26x_stream_format () const
 
uint16_t width () const
 
uint16_t height () const
 
uint32_t pixel_width () const
 
uint32_t pixel_height () const
 
uint8_t transfer_characteristics () const
 
uint8_t nalu_length_size () const
 
uint32_t trick_play_factor () const
 
uint32_t playback_rate () const
 
const std::vector< uint8_t > & eme_init_data () const
 
void set_extra_config (const std::vector< uint8_t > &extra_config)
 
void set_width (uint32_t width)
 
void set_height (uint32_t height)
 
void set_pixel_width (uint32_t pixel_width)
 
void set_pixel_height (uint32_t pixel_height)
 
void set_transfer_characteristics (uint8_t transfer_characteristics)
 
void set_trick_play_factor (uint32_t trick_play_factor)
 
void set_playback_rate (uint32_t playback_rate)
 
void set_eme_init_data (const uint8_t *eme_init_data, size_t eme_init_data_size)
 
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, 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)
 
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

Holds video stream information.

Definition at line 23 of file video_stream_info.h.

Constructor & Destructor Documentation

◆ VideoStreamInfo()

shaka::media::VideoStreamInfo::VideoStreamInfo ( int  track_id,
uint32_t  time_scale,
uint64_t  duration,
Codec  codec,
H26xStreamFormat  h26x_stream_format,
const std::string &  codec_string,
const uint8_t *  codec_config,
size_t  codec_config_size,
uint16_t  width,
uint16_t  height,
uint32_t  pixel_width,
uint32_t  pixel_height,
uint8_t  transfer_characteristics,
uint32_t  trick_play_factor,
uint8_t  nalu_length_size,
const std::string &  language,
bool  is_encrypted 
)

Construct an initialized video stream info object.

Parameters
pixel_widthis the width of the pixel. 0 if unknown.
pixel_heightis the height of the pixels. 0 if unknown.

Definition at line 41 of file video_stream_info.cc.

Member Function Documentation

◆ Clone()

std::unique_ptr< StreamInfo > shaka::media::VideoStreamInfo::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 95 of file video_stream_info.cc.

◆ IsValidConfig()

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

Implements shaka::media::StreamInfo.

Definition at line 79 of file video_stream_info.cc.

◆ pixel_height()

uint32_t shaka::media::VideoStreamInfo::pixel_height ( ) const
inline

Returns the pixel height.

Returns
0 if unknown.

Definition at line 66 of file video_stream_info.h.

◆ pixel_width()

uint32_t shaka::media::VideoStreamInfo::pixel_width ( ) const
inline

Returns the pixel width.

Returns
0 if unknown.

Definition at line 63 of file video_stream_info.h.

◆ ToString()

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

Reimplemented from shaka::media::StreamInfo.

Definition at line 86 of file video_stream_info.cc.


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