|
Shaka Packager SDK
|
All the methods that are virtual are virtual for mocking. More...
Classes | |
| class | AdaptationSet |
| class | BandwidthEstimator |
| class | CallbackFile |
| class | Clock |
| struct | ContentProtectionElement |
| struct | Element |
| struct | FileCloser |
| class | FlagSaver |
| struct | HexBytes |
| class | HttpFile |
| class | IoCache |
| Declaration of class which implements a thread-safe circular buffer. More... | |
| class | LocalFile |
| Implement LocalFile which deals with local storage. More... | |
| class | MemoryFile |
| class | MockAdaptationSet |
| class | MockMpdBuilder |
| class | MockMpdNotifier |
| class | MockPeriod |
| class | MockRepresentation |
| class | MpdBuilder |
| This class generates DASH MPDs (Media Presentation Descriptions). More... | |
| class | MpdNotifier |
| class | MpdNotifierFactory |
| struct | MpdOptions |
| Defines Mpd Options. More... | |
| class | MpdWriter |
| class | Period |
| class | Representation |
| class | RepresentationStateChangeListener |
| struct | SegmentInfo |
| class | SimpleMpdNotifier |
| class | TempFile |
| class | TestClock |
| class | ThreadedIoFile |
| Declaration of class which implements a thread-safe circular buffer. More... | |
| class | ThreadPool |
| class | UdpFile |
| Implements UdpFile, which receives UDP unicast and multicast streams. More... | |
| class | UdpOptions |
| Options parsed from UDP url string of the form: udp://ip:port[?options]. More... | |
Typedefs | |
| typedef std::pair< std::string, std::string > | KVPair |
| typedef MediaInfo::AudioInfo | AudioInfo |
| typedef MediaInfo::VideoInfo | VideoInfo |
Functions | |
| bool | ValidateCryptoFlags () |
| bool | ValidatePRCryptoFlags () |
| bool | ValidateRawKeyCryptoFlags () |
| bool | ValidateRetiredFlags () |
| std::optional< StreamDescriptor > | ParseStreamDescriptor (const std::string &descriptor_string) |
| void | PrintError (const std::string &error_message) |
| void | PrintWarning (const std::string &warning_message) |
| template<class FlagType > | |
| bool | ValidateFlag (const char *flag_name, const FlagType &flag_value, bool condition, bool optional, const char *label) |
| bool | ValidateWidevineCryptoFlags () |
| std::string | generate_unique_temp_path () |
| void | delete_file (const std::string &path) |
| bool | TempFilePath (const std::string &temp_dir, std::string *temp_file_path) |
| std::string | MakePathRelative (const std::filesystem::path &media_path, const std::filesystem::path &parent_path) |
| std::vector< KVPair > | SplitStringIntoKeyValuePairs (std::string_view str, char kv_separator, char list_separator) |
| std::string | LanguageToShortestForm (const std::string &language) |
| std::string | LanguageToISO_639_2 (const std::string &language) |
| bool | ProtectedContentEq (const MediaInfo::ProtectedContent &content_protection1, const MediaInfo::ProtectedContent &content_protection2) |
| std::set< std::string > | GetUUIDs (const MediaInfo::ProtectedContent *protected_content) |
| bool | WriteMpdToFile (const std::string &output_path, MpdBuilder *mpd_builder) |
| ContentType | GetContentType (const MediaInfo &media_info) |
| std::string | Uint8VectorToBase64 (const std::vector< uint8_t > &input) |
| Converts uint8 vector into base64 encoded string. | |
| bool | HasVODOnlyFields (const MediaInfo &media_info) |
| bool | HasLiveOnlyFields (const MediaInfo &media_info) |
| void | RemoveDuplicateAttributes (ContentProtectionElement *content_protection_element) |
| std::string | GetLanguage (const MediaInfo &media_info) |
| std::string | GetCodecs (const MediaInfo &media_info) |
| std::string | GetSupplementalCodecs (const MediaInfo &media_info) |
| std::string | GetSupplementalProfiles (const MediaInfo &media_info) |
| std::string | GetBaseCodec (const MediaInfo &media_info) |
| std::string | GetAdaptationSetKey (const MediaInfo &media_info, bool ignore_codec) |
| std::string | FloatToXmlString (double number) |
| std::string | SecondsToXmlDuration (double seconds) |
| bool | GetDurationAttribute (xmlNodePtr node, float *duration) |
| bool | MoreThanOneTrue (bool b1, bool b2, bool b3) |
| bool | AtLeastOneTrue (bool b1, bool b2, bool b3) |
| bool | OnlyOneTrue (bool b1, bool b2, bool b3) |
| bool | HexToUUID (const std::string &data, std::string *uuid_format) |
| void | UpdateContentProtectionPsshHelper (const std::string &drm_uuid, const std::string &pssh, std::list< ContentProtectionElement > *content_protection_elements) |
| void | AddContentProtectionElements (const MediaInfo &media_info, Representation *parent) |
| void | AddContentProtectionElements (const MediaInfo &media_info, AdaptationSet *parent) |
| bool | XmlEqual (const std::string &xml1, const xml::XmlNode &xml2) |
| std::ostream & | operator<< (std::ostream &os, const Status &x) |
| bool | AbslParseFlag (absl::string_view text, HexBytes *flag, std::string *error) |
| std::string | AbslUnparseFlag (const HexBytes &flag) |
| std::string_view | byte_array_to_string_view (const uint8_t *bytes, size_t bytes_size) |
| Convert byte array to string_view. | |
| std::string_view | byte_vector_to_string_view (const std::vector< uint8_t > &bytes) |
| Convert byte vector to string_view. | |
| void | HexStringToBytes (const std::string &hex, std::vector< uint8_t > *bytes) |
| bool | ValidHexStringToBytes (const std::string &hex, std::vector< uint8_t > *bytes) |
| bool | ValidHexStringToBytes (const std::string &hex, std::string *bytes) |
| std::vector< std::string > | SplitAndTrimSkipEmpty (const std::string &str, char delimiter) |
Variables | |
| const char * | kCallbackFilePrefix = "callback://" |
| const char * | kLocalFilePrefix = "file://" |
| const char * | kMemoryFilePrefix = "memory://" |
| const char * | kUdpFilePrefix = "udp://" |
| const char * | kHttpFilePrefix = "http://" |
| const char * | kHttpsFilePrefix = "https://" |
| const char | kAdditionalFileMode [] = "b" |
| const char | kEncryptedMp4Scheme [] = "urn:mpeg:dash:mp4protection:2011" |
| const char | kPsshElementName [] = "cenc:pssh" |
| const char | kMsproElementName [] = "mspr:pro" |
| const uint32_t | kTransferFunctionPQ = 16 |
| const uint32_t | kTransferFunctionHLG = 18 |
All the methods that are virtual are virtual for mocking.
All the methods that are virtual are virtual for mocking. NOTE: Inclusion of this module will cause xmlInitParser and xmlCleanupParser to be called at static initialization / deinitialization time.
This file contains helper functions and enums for MpdNotifier implementations.
| typedef MediaInfo::AudioInfo shaka::AudioInfo |
Definition at line 47 of file xml_node.cc.
| typedef std::pair<std::string, std::string> shaka::KVPair |
Definition at line 14 of file kv_pairs.h.
| typedef MediaInfo::VideoInfo shaka::VideoInfo |
Definition at line 48 of file xml_node.cc.
| enum shaka::ContentType |
Definition at line 23 of file mpd_notifier_util.h.
|
strong |
Definition at line 16 of file mpd_options.h.
|
strong |
Definition at line 23 of file http_file.h.
|
strong |
Definition at line 22 of file mpd_options.h.
| bool shaka::AbslParseFlag | ( | absl::string_view | text, |
| HexBytes * | flag, | ||
| std::string * | error | ||
| ) |
Definition at line 26 of file absl_flag_hexbytes.cc.
| std::string shaka::AbslUnparseFlag | ( | const HexBytes & | flag | ) |
Definition at line 50 of file absl_flag_hexbytes.cc.
| void shaka::AddContentProtectionElements | ( | const MediaInfo & | media_info, |
| AdaptationSet * | parent | ||
| ) |
Adds <ContentProtection> elements specified by media_info to representation.
| media_info | may or may not have protected_content field. |
| representation | is the parent element that owns the ContentProtection elements. |
Definition at line 528 of file mpd_utils.cc.
| void shaka::AddContentProtectionElements | ( | const MediaInfo & | media_info, |
| Representation * | parent | ||
| ) |
Adds <ContentProtection> elements specified by media_info to adaptation_set. Note that this will add the elements as direct chlidren of AdaptationSet.
| media_info | may or may not have protected_content field. |
| adaptation_set | is the parent element that owns the ContentProtection elements. |
Definition at line 523 of file mpd_utils.cc.
| bool shaka::AtLeastOneTrue | ( | bool | b1, |
| bool | b2, | ||
| bool | b3 | ||
| ) |
Definition at line 281 of file mpd_utils.cc.
|
inline |
Convert byte array to string_view.
Definition at line 16 of file bytes_to_string_view.h.
|
inline |
Convert byte vector to string_view.
Definition at line 22 of file bytes_to_string_view.h.
| void shaka::delete_file | ( | const std::string & | path | ) |
Definition at line 35 of file file_test_util.cc.
| std::string shaka::FloatToXmlString | ( | double | number | ) |
Definition at line 231 of file mpd_utils.cc.
| std::string shaka::generate_unique_temp_path | ( | ) |
Definition at line 13 of file file_test_util.cc.
| std::string shaka::GetAdaptationSetKey | ( | const MediaInfo & | media_info, |
| bool | ignore_codec | ||
| ) |
Definition at line 173 of file mpd_utils.cc.
| std::string shaka::GetBaseCodec | ( | const MediaInfo & | media_info | ) |
Definition at line 155 of file mpd_utils.cc.
| std::string shaka::GetCodecs | ( | const MediaInfo & | media_info | ) |
Definition at line 101 of file mpd_utils.cc.
| ContentType shaka::GetContentType | ( | const MediaInfo & | media_info | ) |
Determines the content type of |media_info|.
| media_info | is the information about the media. |
Definition at line 34 of file mpd_notifier_util.cc.
| bool shaka::GetDurationAttribute | ( | xmlNodePtr | node, |
| float * | duration | ||
| ) |
Definition at line 257 of file mpd_utils.cc.
| std::string shaka::GetLanguage | ( | const MediaInfo & | media_info | ) |
Definition at line 91 of file mpd_utils.cc.
| std::string shaka::GetSupplementalCodecs | ( | const MediaInfo & | media_info | ) |
Definition at line 132 of file mpd_utils.cc.
| std::string shaka::GetSupplementalProfiles | ( | const MediaInfo & | media_info | ) |
Definition at line 143 of file mpd_utils.cc.
| std::set< std::string > shaka::GetUUIDs | ( | const MediaInfo::ProtectedContent * | protected_content | ) |
Definition at line 235 of file adaptation_set.cc.
| bool shaka::HasLiveOnlyFields | ( | const MediaInfo & | media_info | ) |
Definition at line 73 of file mpd_utils.cc.
| bool shaka::HasVODOnlyFields | ( | const MediaInfo & | media_info | ) |
Definition at line 68 of file mpd_utils.cc.
| void shaka::HexStringToBytes | ( | const std::string & | hex, |
| std::vector< uint8_t > * | bytes | ||
| ) |
Definition at line 14 of file hex_parser.cc.
| bool shaka::HexToUUID | ( | const std::string & | data, |
| std::string * | uuid_format | ||
| ) |
Converts hex data to UUID format. Hex data must be size 16.
| data | input hex data. |
| uuid_format | is the UUID format of the input. |
Definition at line 290 of file mpd_utils.cc.
| std::string shaka::LanguageToISO_639_2 | ( | const std::string & | language | ) |
Convert a language tag to a 3-letter ISO-639-2 code, as required by the ISO BMFF spec. The input is assumed to be a valid ISO-639-2 or ISO-639-1 language code. Regions and variants are not supported.
Definition at line 110 of file language_utils.cc.
| std::string shaka::LanguageToShortestForm | ( | const std::string & | language | ) |
Convert a language tag to its shortest form, as required by RFC 5646 indicated in the MPD and HLS specs. Assumes the input is a valid ISO-639-2 or ISO-639-1 language tag, or an empty string. Regions and variants are preserved in the conversion.
Definition at line 82 of file language_utils.cc.
| std::string shaka::MakePathRelative | ( | const std::filesystem::path & | media_path, |
| const std::filesystem::path & | parent_path | ||
| ) |
Definition at line 56 of file file_util.cc.
| bool shaka::MoreThanOneTrue | ( | bool | b1, |
| bool | b2, | ||
| bool | b3 | ||
| ) |
Definition at line 277 of file mpd_utils.cc.
| bool shaka::OnlyOneTrue | ( | bool | b1, |
| bool | b2, | ||
| bool | b3 | ||
| ) |
Definition at line 285 of file mpd_utils.cc.
| std::ostream & shaka::operator<< | ( | std::ostream & | os, |
| const Status & | x | ||
| ) |
| std::optional< StreamDescriptor > shaka::ParseStreamDescriptor | ( | const std::string & | descriptor_string | ) |
Parses a descriptor string, and inserts into sorted list of stream descriptors.
| descriptor_string | contains comma separate name-value pairs describing the stream. |
| descriptor_list | is a pointer to the sorted descriptor list into which the new descriptor should be inserted. |
Definition at line 107 of file stream_descriptor.cc.
| void shaka::PrintError | ( | const std::string & | error_message | ) |
Format and print error message.
| error_message | specifies the error message. |
Definition at line 15 of file validate_flag.cc.
| void shaka::PrintWarning | ( | const std::string & | warning_message | ) |
Format and print warning message.
| warning_message | specifies the warning message. |
Definition at line 19 of file validate_flag.cc.
| bool shaka::ProtectedContentEq | ( | const MediaInfo::ProtectedContent & | content_protection1, |
| const MediaInfo::ProtectedContent & | content_protection2 | ||
| ) |
Definition at line 209 of file adaptation_set.cc.
| void shaka::RemoveDuplicateAttributes | ( | ContentProtectionElement * | content_protection_element | ) |
Definition at line 78 of file mpd_utils.cc.
| std::string shaka::SecondsToXmlDuration | ( | double | seconds | ) |
Definition at line 248 of file mpd_utils.cc.
| std::vector< std::string > shaka::SplitAndTrimSkipEmpty | ( | const std::string & | str, |
| char | delimiter | ||
| ) |
Definition at line 12 of file string_trim_split.cc.
| std::vector< KVPair > shaka::SplitStringIntoKeyValuePairs | ( | std::string_view | str, |
| char | kv_separator, | ||
| char | list_separator | ||
| ) |
Definition at line 13 of file kv_pairs.cc.
| bool shaka::TempFilePath | ( | const std::string & | temp_dir, |
| std::string * | temp_file_path | ||
| ) |
Create a temp file name in directory temp_dir. Generate the temp file in os specific temporary directory if temp_dir is empty.
| temp_dir | specifies the directory where the file should go. |
| temp_file_path | is the result temp file path on success. |
Definition at line 43 of file file_util.cc.
| std::string shaka::Uint8VectorToBase64 | ( | const std::vector< uint8_t > & | input | ) |
Converts uint8 vector into base64 encoded string.
Definition at line 51 of file mpd_notifier_util.cc.
| void shaka::UpdateContentProtectionPsshHelper | ( | const std::string & | drm_uuid, |
| const std::string & | pssh, | ||
| std::list< ContentProtectionElement > * | content_protection_elements | ||
| ) |
Definition at line 321 of file mpd_utils.cc.
| bool shaka::ValidateCryptoFlags | ( | ) |
Definition at line 67 of file crypto_flags.cc.
| bool shaka::ValidateFlag | ( | const char * | flag_name, |
| const FlagType & | flag_value, | ||
| bool | condition, | ||
| bool | optional, | ||
| const char * | label | ||
| ) |
Validate a flag against the given condition.
| flag_name | is the name of the flag. |
| flag_value | is the value of the flag. |
| condition,optional | determines how the flag should be validated. If condition is true and optional is false, then this flag is required |
| label | specifies the label associated with the condition. It is used to generate the error message on validation failure. |
Definition at line 37 of file validate_flag.h.
| bool shaka::ValidatePRCryptoFlags | ( | ) |
Validate PlayReady encryption flags.
Definition at line 31 of file playready_key_encryption_flags.cc.
| bool shaka::ValidateRawKeyCryptoFlags | ( | ) |
Validate raw encryption/decryption flags.
Definition at line 56 of file raw_key_encryption_flags.cc.
| bool shaka::ValidateRetiredFlags | ( | ) |
Definition at line 116 of file retired_flags.cc.
| bool shaka::ValidateWidevineCryptoFlags | ( | ) |
Validate widevine encryption/decryption flags.
Definition at line 91 of file widevine_encryption_flags.cc.
| bool shaka::ValidHexStringToBytes | ( | const std::string & | hex, |
| std::string * | bytes | ||
| ) |
Definition at line 36 of file hex_parser.cc.
| bool shaka::ValidHexStringToBytes | ( | const std::string & | hex, |
| std::vector< uint8_t > * | bytes | ||
| ) |
Definition at line 23 of file hex_parser.cc.
| bool shaka::WriteMpdToFile | ( | const std::string & | output_path, |
| MpdBuilder * | mpd_builder | ||
| ) |
Outputs MPD to output_path.
| output_path | is the path to the MPD output location. |
| mpd_builder | is the MPD builder instance. |
Definition at line 18 of file mpd_notifier_util.cc.
| const char shaka::kAdditionalFileMode[] = "b" |
Definition at line 26 of file local_file.cc.
| const char shaka::kEncryptedMp4Scheme[] = "urn:mpeg:dash:mp4protection:2011" |
Definition at line 26 of file mpd_utils.h.
| const char shaka::kMsproElementName[] = "mspr:pro" |
Definition at line 28 of file mpd_utils.h.
| const char shaka::kPsshElementName[] = "cenc:pssh" |
Definition at line 27 of file mpd_utils.h.
| const uint32_t shaka::kTransferFunctionHLG = 18 |
Definition at line 30 of file mpd_utils.h.
| const uint32_t shaka::kTransferFunctionPQ = 16 |
Definition at line 29 of file mpd_utils.h.