DASH Media Packaging SDK
|
Public Types | |
typedef base::Callback< void(const std::vector< std::shared_ptr < StreamInfo > > &stream_info)> | InitCB |
typedef base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> | NewSampleCB |
Public Member Functions | |
virtual void | Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source)=0 |
virtual bool | Flush () WARN_UNUSED_RESULT=0 |
virtual bool | Parse (const uint8_t *buf, int size) WARN_UNUSED_RESULT=0 |
Definition at line 24 of file media_parser.h.
typedef base::Callback<void( const std::vector<std::shared_ptr<StreamInfo> >& stream_info)> shaka::media::MediaParser::InitCB |
Called upon completion of parser initialization.
stream_info | contains the stream info of all the elementary streams within this file. |
Definition at line 34 of file media_parser.h.
typedef base::Callback<bool(uint32_t track_id, const std::shared_ptr<MediaSample>& media_sample)> shaka::media::MediaParser::NewSampleCB |
Called when a new media sample has been parsed.
track_id | is the track id of the new sample. |
media_sample | is the new media sample. |
Definition at line 43 of file media_parser.h.
|
pure virtual |
Flush data currently in the parser and put the parser in a state where it can receive data for a new seek point.
Implemented in shaka::media::wvm::WvmMediaParser, shaka::media::WebVttMediaParser, shaka::media::mp4::MP4MediaParser, shaka::media::mp2t::Mp2tMediaParser, and shaka::media::WebMMediaParser.
|
pure virtual |
Initialize the parser with necessary callbacks. Must be called before any data is passed to Parse().
init_cb | will be called once enough data has been parsed to determine the initial stream configurations. |
new_sample_cb | will be called each time a new media sample is available from the parser. May be NULL, and caller retains ownership. |
Implemented in shaka::media::wvm::WvmMediaParser, shaka::media::WebVttMediaParser, shaka::media::mp4::MP4MediaParser, shaka::media::mp2t::Mp2tMediaParser, and shaka::media::WebMMediaParser.
|
pure virtual |
Should be called when there is new data to parse.
Implemented in shaka::media::wvm::WvmMediaParser, shaka::media::WebVttMediaParser, shaka::media::mp4::MP4MediaParser, shaka::media::mp2t::Mp2tMediaParser, and shaka::media::WebMMediaParser.