DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Classes | Public Member Functions | List of all members
shaka::media::Demuxer Class Reference

#include <demuxer.h>

Public Member Functions

 Demuxer (const std::string &file_name)
 
void SetKeySource (std::unique_ptr< KeySource > key_source)
 
Status Initialize ()
 
Status Run ()
 
Status Parse ()
 Read from the source and send it to the parser.
 
void Cancel ()
 
const std::vector< MediaStream * > & streams ()
 
MediaContainerName container_name ()
 

Detailed Description

Demuxer is responsible for extracting elementary stream samples from a media file, e.g. an ISO BMFF file.

Definition at line 32 of file demuxer.h.

Constructor & Destructor Documentation

shaka::media::Demuxer::Demuxer ( const std::string &  file_name)
explicit
Parameters
file_namespecifies the input source. It uses prefix matching to create a proper File object. The user can extend File to support a custom File object with its own prefix.

Definition at line 37 of file demuxer.cc.

Member Function Documentation

void shaka::media::Demuxer::Cancel ( )

Cancel a demuxing job in progress. Will cause Run to exit with an error status of type CANCELLED.

Definition at line 232 of file demuxer.cc.

MediaContainerName shaka::media::Demuxer::container_name ( )
inline
Returns
Container name (type). Value is CONTAINER_UNKNOWN if the demuxer is not initialized.

Definition at line 72 of file demuxer.h.

Status shaka::media::Demuxer::Initialize ( )

Initialize the Demuxer. Calling other public methods of this class without this method returning OK, results in an undefined behavior. This method primes the demuxer by parsing portions of the media file to extract stream information.

Returns
OK on success.

Definition at line 56 of file demuxer.cc.

Status shaka::media::Demuxer::Run ( )

Drive the remuxing from demuxer side (push). Read the file and push the Data to Muxer until Eof.

Definition at line 173 of file demuxer.cc.

void shaka::media::Demuxer::SetKeySource ( std::unique_ptr< KeySource key_source)

Set the KeySource for media decryption.

Parameters
key_sourcepoints to the source of decryption keys. The key source must support fetching of keys for the type of media being demuxed.

Definition at line 52 of file demuxer.cc.

const std::vector<MediaStream*>& shaka::media::Demuxer::streams ( )
inline
Returns
Streams in the media container being demuxed. The caller cannot add or remove streams from the returned vector, but the caller is allowed to change the internal state of the streams in the vector through MediaStream APIs.

Definition at line 68 of file demuxer.h.


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