DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions | Friends | List of all members
shaka::media::Muxer Class Referenceabstract

#include <muxer.h>

Inheritance diagram for shaka::media::Muxer:
shaka::media::mp2t::TsMuxer shaka::media::mp4::MP4Muxer shaka::media::webm::WebMMuxer

Public Member Functions

 Muxer (const MuxerOptions &options)
 
void SetKeySource (KeySource *encryption_key_source, uint32_t max_sd_pixels, uint32_t max_hd_pixels, uint32_t max_uhd1_pixels, double clear_lead_in_seconds, double crypto_period_duration_in_seconds, FourCC protection_scheme)
 
void AddStream (MediaStream *stream)
 Add video/audio stream.
 
Status Run ()
 Drive the remuxing from muxer side (pull).
 
void Cancel ()
 
void SetMuxerListener (std::unique_ptr< MuxerListener > muxer_listener)
 
void SetProgressListener (std::unique_ptr< ProgressListener > progress_listener)
 
const std::vector< MediaStream * > & streams () const
 
void set_clock (base::Clock *clock)
 

Protected Member Functions

const MuxerOptionsoptions () const
 
KeySourceencryption_key_source ()
 
uint32_t max_sd_pixels () const
 
uint32_t max_hd_pixels () const
 
uint32_t max_uhd1_pixels () const
 
double clear_lead_in_seconds () const
 
double crypto_period_duration_in_seconds () const
 
MuxerListenermuxer_listener ()
 
ProgressListenerprogress_listener ()
 
base::Clock * clock ()
 
FourCC protection_scheme () const
 

Friends

class MediaStream
 

Detailed Description

Muxer is responsible for taking elementary stream samples and producing media containers. An optional KeySource can be provided to Muxer to generate encrypted outputs.

Definition at line 33 of file muxer.h.

Member Function Documentation

void shaka::media::Muxer::Cancel ( )

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

Definition at line 90 of file muxer.cc.

void shaka::media::Muxer::set_clock ( base::Clock *  clock)
inline

Inject clock, mainly used for testing. The injected clock will be used to generate the creation time-stamp and modification time-stamp of the muxer output. If no clock is injected, the code uses base::Time::Now() to generate the time-stamps.

Parameters
clockis the Clock to be injected.

Definition at line 95 of file muxer.h.

void shaka::media::Muxer::SetKeySource ( KeySource encryption_key_source,
uint32_t  max_sd_pixels,
uint32_t  max_hd_pixels,
uint32_t  max_uhd1_pixels,
double  clear_lead_in_seconds,
double  crypto_period_duration_in_seconds,
FourCC  protection_scheme 
)

Set encryption key source.

Parameters
encryption_key_sourcepoints to the encryption key source. The caller retains ownership, and should not be NULL.
max_sd_pixelsspecifies the threshold to determine whether a video track should be considered as SD. If the max pixels per frame is no higher than max_sd_pixels, it is SD.
max_hd_pixelsspecifies the threshold to determine whether a video track should be considered as HD. If the max pixels per frame is higher than max_sd_pixels, but no higher than max_hd_pixels, it is HD.
max_uhd1_pixelsspecifies the threshold to determine whether a video track should be considered as UHD1. If the max pixels per frame is higher than max_hd_pixels, but no higher than max_uhd1_pixels, it is UHD1. Otherwise it is UHD2.
clear_lead_in_secondsspecifies clear lead duration in seconds.
crypto_period_duration_in_secondsspecifies crypto period duration in seconds. A positive value means key rotation is enabled, the key source must support key rotation in this case.
protection_schemespecifies the protection scheme: 'cenc', 'cens', 'cbc1', 'cbcs'.

Definition at line 33 of file muxer.cc.

void shaka::media::Muxer::SetMuxerListener ( std::unique_ptr< MuxerListener muxer_listener)

Set a MuxerListener event handler for this object.

Parameters
muxer_listenershould not be NULL.

Definition at line 94 of file muxer.cc.

void shaka::media::Muxer::SetProgressListener ( std::unique_ptr< ProgressListener progress_listener)

Set a ProgressListener event handler for this object.

Parameters
progress_listenershould not be NULL.

Definition at line 98 of file muxer.cc.


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