Shaka Packager SDK
Public Member Functions | Static Public Member Functions | List of all members
shaka::Packager Class Reference

Public Member Functions

Status Initialize (const PackagingParams &packaging_params, const std::vector< StreamDescriptor > &stream_descriptors)
 
Status Run ()
 
void Cancel ()
 Cancel packaging. Note that it has to be called from another thread.
 

Static Public Member Functions

static std::string GetLibraryVersion ()
 
static std::string DefaultStreamLabelFunction (int max_sd_pixels, int max_hd_pixels, int max_uhd1_pixels, const EncryptionParams::EncryptedStreamAttributes &stream_attributes)
 

Detailed Description

Definition at line 124 of file packager.h.

Member Function Documentation

◆ DefaultStreamLabelFunction()

std::string shaka::Packager::DefaultStreamLabelFunction ( int  max_sd_pixels,
int  max_hd_pixels,
int  max_uhd1_pixels,
const EncryptionParams::EncryptedStreamAttributes stream_attributes 
)
static

Default stream label function implementation.

Parameters
max_sd_pixelsThe 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, i.e. [0, max_sd_pixels], it is SD.
max_hd_pixelsThe 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, i.e. (max_sd_pixels, max_hd_pixels], it is HD.
max_uhd1_pixelsThe 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, i.e. (max_hd_pixels, max_uhd1_pixels], it is UHD1. Otherwise it is UHD2.
stream_infoEncrypted stream info.
Returns
the stream label associated with stream_info. Can be "AUDIO", "SD", "HD", "UHD1" or "UHD2".

Definition at line 982 of file packager.cc.

◆ GetLibraryVersion()

std::string shaka::Packager::GetLibraryVersion ( )
static
Returns
The version of the library.

Definition at line 978 of file packager.cc.

◆ Initialize()

Status shaka::Packager::Initialize ( const PackagingParams packaging_params,
const std::vector< StreamDescriptor > &  stream_descriptors 
)

Initialize packaging pipeline.

Parameters
packaging_paramscontains the packaging parameters.
stream_descriptorsa list of stream descriptors.
Returns
OK on success, an appropriate error code on failure.

Definition at line 828 of file packager.cc.

◆ Run()

Status shaka::Packager::Run ( )

Run the pipeline to completion (or failed / been cancelled). Note that it blocks until completion.

Returns
OK on success, an appropriate error code on failure.

Definition at line 953 of file packager.cc.


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