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

Parser for WebM Tracks element. More...

#include <webm_tracks_parser.h>

Inheritance diagram for shaka::media::WebMTracksParser:
shaka::media::WebMParserClient

Public Types

typedef std::map< int, TextTrackConfigTextTracks
 

Public Member Functions

 WebMTracksParser (bool ignore_text_tracks)
 
int Parse (const uint8_t *buf, int size)
 
int64_t audio_track_num () const
 
int64_t video_track_num () const
 
int64_t GetAudioDefaultDuration (const double timecode_scale_in_us) const
 
int64_t GetVideoDefaultDuration (const double timecode_scale_in_us) const
 
const std::set< int64_t > & ignored_tracks () const
 
const std::string & audio_encryption_key_id () const
 
std::shared_ptr< AudioStreamInfoaudio_stream_info ()
 
const std::string & video_encryption_key_id () const
 
std::shared_ptr< VideoStreamInfovideo_stream_info ()
 
const TextTracks & text_tracks () const
 
const VPCodecConfigurationRecordvp_config () const
 

Additional Inherited Members

- Protected Member Functions inherited from shaka::media::WebMParserClient
 DISALLOW_COPY_AND_ASSIGN (WebMParserClient)
 

Detailed Description

Parser for WebM Tracks element.

Definition at line 27 of file webm_tracks_parser.h.

Member Function Documentation

◆ GetAudioDefaultDuration()

int64_t shaka::media::WebMTracksParser::GetAudioDefaultDuration ( const double  timecode_scale_in_us) const

If TrackEntry DefaultDuration field existed for the associated audio or video track, returns that value converted from ns to base::TimeDelta with precision not greater than |timecode_scale_in_us|. Defaults to kNoTimestamp.

Definition at line 90 of file webm_tracks_parser.cc.

◆ Parse()

int shaka::media::WebMTracksParser::Parse ( const uint8_t *  buf,
int  size 
)

Parses a WebM Tracks element in |buf|.

Returns
-1 if the parse fails.
0 if more data is needed.
The number of bytes parsed on success.

Definition at line 65 of file webm_tracks_parser.cc.


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