DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
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,
TextTrackConfig
TextTracks
 

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
 
scoped_refptr< AudioStreamInfoaudio_stream_info ()
 
const std::string & video_encryption_key_id () const
 
scoped_refptr< VideoStreamInfovideo_stream_info ()
 
const TextTracks & text_tracks () 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 28 of file webm_tracks_parser.h.

Member Function Documentation

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.

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: