diff --git a/docs/annotated.html b/docs/annotated.html index 2c17d80085..17fbe5189c 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -374,7 +374,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/classes.html b/docs/classes.html index 6fa1ed1e36..d94dbae560 100644 --- a/docs/classes.html +++ b/docs/classes.html @@ -179,7 +179,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/d0/d00/structshaka_1_1media_1_1mp4_1_1HandlerReference-members.html b/docs/d0/d00/structshaka_1_1media_1_1mp4_1_1HandlerReference-members.html index 3350e4b9bc..55661f9ae1 100644 --- a/docs/d0/d00/structshaka_1_1media_1_1mp4_1_1HandlerReference-members.html +++ b/docs/d0/d00/structshaka_1_1media_1_1mp4_1_1HandlerReference-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d04/classshaka_1_1media_1_1RsaRequestSigner-members.html b/docs/d0/d04/classshaka_1_1media_1_1RsaRequestSigner-members.html index 96fb93a9ce..4d44434619 100644 --- a/docs/d0/d04/classshaka_1_1media_1_1RsaRequestSigner-members.html +++ b/docs/d0/d04/classshaka_1_1media_1_1RsaRequestSigner-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d06/mpd__flags_8cc_source.html b/docs/d0/d06/mpd__flags_8cc_source.html index 7432ea56e1..a364092132 100644 --- a/docs/d0/d06/mpd__flags_8cc_source.html +++ b/docs/d0/d06/mpd__flags_8cc_source.html @@ -153,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d0e/classshaka_1_1media_1_1HttpKeyFetcher-members.html b/docs/d0/d0e/classshaka_1_1media_1_1HttpKeyFetcher-members.html index 84f07c2066..3f346b1632 100644 --- a/docs/d0/d0e/classshaka_1_1media_1_1HttpKeyFetcher-members.html +++ b/docs/d0/d0e/classshaka_1_1media_1_1HttpKeyFetcher-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d0e/hevc__decoder__configuration__record_8h_source.html b/docs/d0/d0e/hevc__decoder__configuration__record_8h_source.html index 22146c2caf..6124c059d3 100644 --- a/docs/d0/d0e/hevc__decoder__configuration__record_8h_source.html +++ b/docs/d0/d0e/hevc__decoder__configuration__record_8h_source.html @@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d0e/muxer__options_8h_source.html b/docs/d0/d0e/muxer__options_8h_source.html index 81a8e48efb..1ae4d6f7bd 100644 --- a/docs/d0/d0e/muxer__options_8h_source.html +++ b/docs/d0/d0e/muxer__options_8h_source.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d0f/classshaka_1_1media_1_1mp2t_1_1TsSectionPmt-members.html b/docs/d0/d0f/classshaka_1_1media_1_1mp2t_1_1TsSectionPmt-members.html index 7d780d3a50..ea25d7fbb2 100644 --- a/docs/d0/d0f/classshaka_1_1media_1_1mp2t_1_1TsSectionPmt-members.html +++ b/docs/d0/d0f/classshaka_1_1media_1_1mp2t_1_1TsSectionPmt-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d11/structshaka_1_1media_1_1VPxFrameInfo.html b/docs/d0/d11/structshaka_1_1media_1_1VPxFrameInfo.html index c1fbda25b4..cc84bbc2a3 100644 --- a/docs/d0/d11/structshaka_1_1media_1_1VPxFrameInfo.html +++ b/docs/d0/d11/structshaka_1_1media_1_1VPxFrameInfo.html @@ -121,7 +121,7 @@ uint32_t height diff --git a/docs/d0/d1e/classshaka_1_1media_1_1H265ByteToUnitStreamConverter-members.html b/docs/d0/d1e/classshaka_1_1media_1_1H265ByteToUnitStreamConverter-members.html index a15dbf956b..863c9b79e8 100644 --- a/docs/d0/d1e/classshaka_1_1media_1_1H265ByteToUnitStreamConverter-members.html +++ b/docs/d0/d1e/classshaka_1_1media_1_1H265ByteToUnitStreamConverter-members.html @@ -96,14 +96,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); ConvertByteStreamToNalUnitStream(const uint8_t *input_frame, size_t input_frame_size, std::vector< uint8_t > *output_frame)shaka::media::H26xByteToUnitStreamConverter GetDecoderConfigurationRecord(std::vector< uint8_t > *decoder_config) const overrideshaka::media::H265ByteToUnitStreamConvertervirtual H265ByteToUnitStreamConverter() (defined in shaka::media::H265ByteToUnitStreamConverter)shaka::media::H265ByteToUnitStreamConverter - H26xByteToUnitStreamConverter(Nalu::CodecType type) (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverter + H26xByteToUnitStreamConverter(Nalu::CodecType type) (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverterexplicit kUnitStreamNaluLengthSize (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverterstatic ~H265ByteToUnitStreamConverter() override (defined in shaka::media::H265ByteToUnitStreamConverter)shaka::media::H265ByteToUnitStreamConverter ~H26xByteToUnitStreamConverter() (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConvertervirtual diff --git a/docs/d0/d1f/structshaka_1_1media_1_1mp4_1_1VTTCueBox-members.html b/docs/d0/d1f/structshaka_1_1media_1_1mp4_1_1VTTCueBox-members.html index c38a538d55..eb5c9c89d5 100644 --- a/docs/d0/d1f/structshaka_1_1media_1_1mp4_1_1VTTCueBox-members.html +++ b/docs/d0/d1f/structshaka_1_1media_1_1mp4_1_1VTTCueBox-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d26/classshaka_1_1media_1_1mp2t_1_1TsSectionPat.html b/docs/d0/d26/classshaka_1_1media_1_1mp2t_1_1TsSectionPat.html index 3bb0758cf2..02aa11e184 100644 --- a/docs/d0/d26/classshaka_1_1media_1_1mp2t_1_1TsSectionPat.html +++ b/docs/d0/d26/classshaka_1_1media_1_1mp2t_1_1TsSectionPat.html @@ -155,7 +155,7 @@ void Reset () override diff --git a/docs/d0/d27/structshaka_1_1media_1_1MuxerOptions.html b/docs/d0/d27/structshaka_1_1media_1_1MuxerOptions.html index beffe9f988..7ef5b671a8 100644 --- a/docs/d0/d27/structshaka_1_1media_1_1MuxerOptions.html +++ b/docs/d0/d27/structshaka_1_1media_1_1MuxerOptions.html @@ -274,7 +274,7 @@ bool webm_subsample_encryp diff --git a/docs/d0/d30/mock__mpd__notifier_8h_source.html b/docs/d0/d30/mock__mpd__notifier_8h_source.html index 9ef2b42f83..cd4bd47628 100644 --- a/docs/d0/d30/mock__mpd__notifier_8h_source.html +++ b/docs/d0/d30/mock__mpd__notifier_8h_source.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d32/mp2t__common_8h_source.html b/docs/d0/d32/mp2t__common_8h_source.html index de480026b5..10ba6588bb 100644 --- a/docs/d0/d32/mp2t__common_8h_source.html +++ b/docs/d0/d32/mp2t__common_8h_source.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d33/classshaka_1_1MockRepresentation.html b/docs/d0/d33/classshaka_1_1MockRepresentation.html index a312d229f7..c900992a9a 100644 --- a/docs/d0/d33/classshaka_1_1MockRepresentation.html +++ b/docs/d0/d33/classshaka_1_1MockRepresentation.html @@ -160,7 +160,7 @@ Additional Inherited Members diff --git a/docs/d0/d35/es__descriptor_8cc_source.html b/docs/d0/d35/es__descriptor_8cc_source.html index d2bd0cb134..b44948610e 100644 --- a/docs/d0/d35/es__descriptor_8cc_source.html +++ b/docs/d0/d35/es__descriptor_8cc_source.html @@ -285,7 +285,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d3a/hls__notify__muxer__listener_8cc_source.html b/docs/d0/d3a/hls__notify__muxer__listener_8cc_source.html index 3d7cc02161..728d4719f3 100644 --- a/docs/d0/d3a/hls__notify__muxer__listener_8cc_source.html +++ b/docs/d0/d3a/hls__notify__muxer__listener_8cc_source.html @@ -221,7 +221,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
132 } // namespace media
133 } // namespace shaka
void OnMediaStart(const MuxerOptions &muxer_options, const StreamInfo &stream_info, uint32_t time_scale, ContainerType container_type) override
-
Abstract class holds stream information.
Definition: stream_info.h:53
+
Abstract class holds stream information.
Definition: stream_info.h:51
void OnEncryptionInfoReady(bool is_initial_encryption_info, FourCC protection_scheme, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv, const std::vector< ProtectionSystemSpecificInfo > &key_system_info) override
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:18
void OnEncryptionStart() override
@@ -233,7 +233,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d3a/webm__constants_8h_source.html b/docs/d0/d3a/webm__constants_8h_source.html index 6257989f81..ebc3957639 100644 --- a/docs/d0/d3a/webm__constants_8h_source.html +++ b/docs/d0/d3a/webm__constants_8h_source.html @@ -318,7 +318,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d3c/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader.html b/docs/d0/d3c/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader.html index 4aeee6f482..2570c6a651 100644 --- a/docs/d0/d3c/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader.html +++ b/docs/d0/d3c/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d0/d42/aes__cryptor_8h_source.html b/docs/d0/d42/aes__cryptor_8h_source.html index b106b4b8e9..c597fb8343 100644 --- a/docs/d0/d42/aes__cryptor_8h_source.html +++ b/docs/d0/d42/aes__cryptor_8h_source.html @@ -215,7 +215,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d42/widevine__encryption__flags_8cc_source.html b/docs/d0/d42/widevine__encryption__flags_8cc_source.html index 587cb2cd7e..a7a7036b59 100644 --- a/docs/d0/d42/widevine__encryption__flags_8cc_source.html +++ b/docs/d0/d42/widevine__encryption__flags_8cc_source.html @@ -284,7 +284,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d46/fourccs_8h_source.html b/docs/d0/d46/fourccs_8h_source.html index 62169f5223..c6c53ad198 100644 --- a/docs/d0/d46/fourccs_8h_source.html +++ b/docs/d0/d46/fourccs_8h_source.html @@ -248,7 +248,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d49/vod__media__info__dump__muxer__listener_8cc_source.html b/docs/d0/d49/vod__media__info__dump__muxer__listener_8cc_source.html index 851fb7d1b7..49cacf76a1 100644 --- a/docs/d0/d49/vod__media__info__dump__muxer__listener_8cc_source.html +++ b/docs/d0/d49/vod__media__info__dump__muxer__listener_8cc_source.html @@ -221,7 +221,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
132 } // namespace media
133 } // namespace shaka
virtual bool Open()=0
Internal open. Should not be used directly.
-
Abstract class holds stream information.
Definition: stream_info.h:53
+
Abstract class holds stream information.
Definition: stream_info.h:51
void OnSampleDurationReady(uint32_t sample_duration) override
virtual bool Close()=0
virtual int64_t Write(const void *buffer, uint64_t length)=0
@@ -237,7 +237,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d4b/structshaka_1_1media_1_1mp4_1_1MediaInformation-members.html b/docs/d0/d4b/structshaka_1_1media_1_1mp4_1_1MediaInformation-members.html index 54a71f9d47..1e8ab14fc0 100644 --- a/docs/d0/d4b/structshaka_1_1media_1_1mp4_1_1MediaInformation-members.html +++ b/docs/d0/d4b/structshaka_1_1media_1_1mp4_1_1MediaInformation-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d4d/classshaka_1_1media_1_1AudioTimestampHelper.html b/docs/d0/d4d/classshaka_1_1media_1_1AudioTimestampHelper.html index ae37d7bc9c..ebfae8e0d6 100644 --- a/docs/d0/d4d/classshaka_1_1media_1_1AudioTimestampHelper.html +++ b/docs/d0/d4d/classshaka_1_1media_1_1AudioTimestampHelper.html @@ -131,7 +131,7 @@ int64_t GetFramesToTarget< diff --git a/docs/d0/d4e/libcrypto__threading_8cc_source.html b/docs/d0/d4e/libcrypto__threading_8cc_source.html index 40b1a89d31..3a827049e4 100644 --- a/docs/d0/d4e/libcrypto__threading_8cc_source.html +++ b/docs/d0/d4e/libcrypto__threading_8cc_source.html @@ -143,7 +143,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d53/classshaka_1_1media_1_1mp2t_1_1TsMuxer-members.html b/docs/d0/d53/classshaka_1_1media_1_1mp2t_1_1TsMuxer-members.html index e5d093f0e9..b92a989a5b 100644 --- a/docs/d0/d53/classshaka_1_1media_1_1mp2t_1_1TsMuxer-members.html +++ b/docs/d0/d53/classshaka_1_1media_1_1mp2t_1_1TsMuxer-members.html @@ -119,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d5b/classshaka_1_1media_1_1MpdNotifyMuxerListener-members.html b/docs/d0/d5b/classshaka_1_1media_1_1MpdNotifyMuxerListener-members.html index 4ba18a90a8..2423653504 100644 --- a/docs/d0/d5b/classshaka_1_1media_1_1MpdNotifyMuxerListener-members.html +++ b/docs/d0/d5b/classshaka_1_1media_1_1MpdNotifyMuxerListener-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d66/classshaka_1_1media_1_1ThreadedIoFile.html b/docs/d0/d66/classshaka_1_1media_1_1ThreadedIoFile.html index 015db7283c..5a21c398a2 100644 --- a/docs/d0/d66/classshaka_1_1media_1_1ThreadedIoFile.html +++ b/docs/d0/d66/classshaka_1_1media_1_1ThreadedIoFile.html @@ -438,7 +438,7 @@ Additional Inherited Members diff --git a/docs/d0/d6a/classshaka_1_1media_1_1StreamDescriptorCompareFn-members.html b/docs/d0/d6a/classshaka_1_1media_1_1StreamDescriptorCompareFn-members.html index 42bf075d51..b086b05b38 100644 --- a/docs/d0/d6a/classshaka_1_1media_1_1StreamDescriptorCompareFn-members.html +++ b/docs/d0/d6a/classshaka_1_1media_1_1StreamDescriptorCompareFn-members.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d73/structshaka_1_1media_1_1mp4_1_1VideoSampleEntry.html b/docs/d0/d73/structshaka_1_1media_1_1mp4_1_1VideoSampleEntry.html index a21527daae..3ed106bd3c 100644 --- a/docs/d0/d73/structshaka_1_1media_1_1mp4_1_1VideoSampleEntry.html +++ b/docs/d0/d73/structshaka_1_1media_1_1mp4_1_1VideoSampleEntry.html @@ -197,7 +197,7 @@ Additional Inherited Members diff --git a/docs/d0/d7c/structshaka_1_1media_1_1mp4_1_1SampleToGroup.html b/docs/d0/d7c/structshaka_1_1media_1_1mp4_1_1SampleToGroup.html index 39969fad1f..4c00a6bbfc 100644 --- a/docs/d0/d7c/structshaka_1_1media_1_1mp4_1_1SampleToGroup.html +++ b/docs/d0/d7c/structshaka_1_1media_1_1mp4_1_1SampleToGroup.html @@ -188,7 +188,7 @@ Additional Inherited Members diff --git a/docs/d0/d7d/decryptor__source_8h_source.html b/docs/d0/d7d/decryptor__source_8h_source.html index 6cde26f497..7a22523922 100644 --- a/docs/d0/d7d/decryptor__source_8h_source.html +++ b/docs/d0/d7d/decryptor__source_8h_source.html @@ -133,7 +133,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d80/classshaka_1_1media_1_1AesCbcEncryptor-members.html b/docs/d0/d80/classshaka_1_1media_1_1AesCbcEncryptor-members.html index b9488b1162..6fe9760a6d 100644 --- a/docs/d0/d80/classshaka_1_1media_1_1AesCbcEncryptor-members.html +++ b/docs/d0/d80/classshaka_1_1media_1_1AesCbcEncryptor-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d80/classshaka_1_1media_1_1Status-members.html b/docs/d0/d80/classshaka_1_1media_1_1Status-members.html index 81d682cde9..68acbc5ad4 100644 --- a/docs/d0/d80/classshaka_1_1media_1_1Status-members.html +++ b/docs/d0/d80/classshaka_1_1media_1_1Status-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/d93/classshaka_1_1media_1_1Status.html b/docs/d0/d93/classshaka_1_1media_1_1Status.html index 507af1153f..d7619e7681 100644 --- a/docs/d0/d93/classshaka_1_1media_1_1Status.html +++ b/docs/d0/d93/classshaka_1_1media_1_1Status.html @@ -302,7 +302,7 @@ static const diff --git a/docs/d0/d9a/structshaka_1_1media_1_1mp4_1_1Movie.html b/docs/d0/d9a/structshaka_1_1media_1_1mp4_1_1Movie.html index 51ad404fb8..aeff4e546f 100644 --- a/docs/d0/d9a/structshaka_1_1media_1_1mp4_1_1Movie.html +++ b/docs/d0/d9a/structshaka_1_1media_1_1mp4_1_1Movie.html @@ -186,7 +186,7 @@ Additional Inherited Members diff --git a/docs/d0/da2/classshaka_1_1media_1_1AACAudioSpecificConfig.html b/docs/d0/da2/classshaka_1_1media_1_1AACAudioSpecificConfig.html index 2e371255e8..6a1c71a032 100644 --- a/docs/d0/da2/classshaka_1_1media_1_1AACAudioSpecificConfig.html +++ b/docs/d0/da2/classshaka_1_1media_1_1AACAudioSpecificConfig.html @@ -329,7 +329,7 @@ static const size_t  diff --git a/docs/d0/da2/classshaka_1_1media_1_1RequestSigner-members.html b/docs/d0/da2/classshaka_1_1media_1_1RequestSigner-members.html index b95ce71433..2aa0c9887f 100644 --- a/docs/d0/da2/classshaka_1_1media_1_1RequestSigner-members.html +++ b/docs/d0/da2/classshaka_1_1media_1_1RequestSigner-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/da2/structshaka_1_1xml_1_1XmlDeleter-members.html b/docs/d0/da2/structshaka_1_1xml_1_1XmlDeleter-members.html index 7aef0a8638..0217970218 100644 --- a/docs/d0/da2/structshaka_1_1xml_1_1XmlDeleter-members.html +++ b/docs/d0/da2/structshaka_1_1xml_1_1XmlDeleter-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/da6/stream__descriptor_8cc_source.html b/docs/d0/da6/stream__descriptor_8cc_source.html index e4c4d57b7a..b3a6b5e55b 100644 --- a/docs/d0/da6/stream__descriptor_8cc_source.html +++ b/docs/d0/da6/stream__descriptor_8cc_source.html @@ -293,7 +293,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/dab/classshaka_1_1media_1_1mp4_1_1SingleSegmentSegmenter.html b/docs/d0/dab/classshaka_1_1media_1_1mp4_1_1SingleSegmentSegmenter.html index a75f2af012..945f8c335c 100644 --- a/docs/d0/dab/classshaka_1_1media_1_1mp4_1_1SingleSegmentSegmenter.html +++ b/docs/d0/dab/classshaka_1_1media_1_1mp4_1_1SingleSegmentSegmenter.html @@ -123,8 +123,8 @@ Public Member Functions   Status Finalize ()   -Status AddSample (const MediaStream *stream, scoped_refptr< MediaSample > sample) -  +Status AddSample (const MediaStream *stream, std::shared_ptr< MediaSample > sample) +  uint32_t GetReferenceTimeScale () const   @@ -259,7 +259,7 @@ void set_progress_target diff --git a/docs/d0/dac/classshaka_1_1media_1_1FixedKeySource.html b/docs/d0/dac/classshaka_1_1media_1_1FixedKeySource.html index 09d5f01239..085d41d867 100644 --- a/docs/d0/dac/classshaka_1_1media_1_1FixedKeySource.html +++ b/docs/d0/dac/classshaka_1_1media_1_1FixedKeySource.html @@ -482,7 +482,7 @@ Additional Inherited Members diff --git a/docs/d0/dae/file__util_8h_source.html b/docs/d0/dae/file__util_8h_source.html index d047981d39..ff6439713b 100644 --- a/docs/d0/dae/file__util_8h_source.html +++ b/docs/d0/dae/file__util_8h_source.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/dbd/classshaka_1_1media_1_1webm_1_1MultiSegmentSegmenter-members.html b/docs/d0/dbd/classshaka_1_1media_1_1webm_1_1MultiSegmentSegmenter-members.html index d6208e14cd..49f6bbc77b 100644 --- a/docs/d0/dbd/classshaka_1_1media_1_1webm_1_1MultiSegmentSegmenter-members.html +++ b/docs/d0/dbd/classshaka_1_1media_1_1webm_1_1MultiSegmentSegmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

This is the complete list of members for shaka::media::webm::MultiSegmentSegmenter, including all inherited members.

- + @@ -123,7 +123,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
AddSample(scoped_refptr< MediaSample > sample)shaka::media::webm::Segmenter
AddSample(std::shared_ptr< MediaSample > sample)shaka::media::webm::Segmenter
cluster() (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
cluster_length_in_time_scale() const (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
cues() (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
diff --git a/docs/d0/dc1/structshaka_1_1media_1_1mp4_1_1VTTEmptyCueBox-members.html b/docs/d0/dc1/structshaka_1_1media_1_1mp4_1_1VTTEmptyCueBox-members.html index c9042b540f..202436eb36 100644 --- a/docs/d0/dc1/structshaka_1_1media_1_1mp4_1_1VTTEmptyCueBox-members.html +++ b/docs/d0/dc1/structshaka_1_1media_1_1mp4_1_1VTTEmptyCueBox-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/dc8/classshaka_1_1xml_1_1AdaptationSetXmlNode-members.html b/docs/d0/dc8/classshaka_1_1xml_1_1AdaptationSetXmlNode-members.html index 6dcf9912bd..bfb9b76b58 100644 --- a/docs/d0/dc8/classshaka_1_1xml_1_1AdaptationSetXmlNode-members.html +++ b/docs/d0/dc8/classshaka_1_1xml_1_1AdaptationSetXmlNode-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/dce/classshaka_1_1media_1_1RsaPrivateKey.html b/docs/d0/dce/classshaka_1_1media_1_1RsaPrivateKey.html index ad7a65ca13..7eb3e6634a 100644 --- a/docs/d0/dce/classshaka_1_1media_1_1RsaPrivateKey.html +++ b/docs/d0/dce/classshaka_1_1media_1_1RsaPrivateKey.html @@ -224,7 +224,7 @@ Static Public Member Functions diff --git a/docs/d0/dd0/structshaka_1_1media_1_1mp4_1_1CueSettingsBox.html b/docs/d0/dd0/structshaka_1_1media_1_1mp4_1_1CueSettingsBox.html index 875aefd2c3..1edc8af7be 100644 --- a/docs/d0/dd0/structshaka_1_1media_1_1mp4_1_1CueSettingsBox.html +++ b/docs/d0/dd0/structshaka_1_1media_1_1mp4_1_1CueSettingsBox.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html b/docs/d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html index c7d8629ce0..729f833102 100644 --- a/docs/d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html +++ b/docs/d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html @@ -222,7 +222,7 @@ Static Public Member Functions diff --git a/docs/d0/dd6/webm__crypto__helpers_8cc_source.html b/docs/d0/dd6/webm__crypto__helpers_8cc_source.html index 6b2c38f7e6..d5c8a36e85 100644 --- a/docs/d0/dd6/webm__crypto__helpers_8cc_source.html +++ b/docs/d0/dd6/webm__crypto__helpers_8cc_source.html @@ -205,7 +205,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/dd8/classshaka_1_1media_1_1AesCtrEncryptor.html b/docs/d0/dd8/classshaka_1_1media_1_1AesCtrEncryptor.html index f51ed94f3b..af0dc33e0f 100644 --- a/docs/d0/dd8/classshaka_1_1media_1_1AesCtrEncryptor.html +++ b/docs/d0/dd8/classshaka_1_1media_1_1AesCtrEncryptor.html @@ -165,7 +165,7 @@ AES_KEY * mutable_aes_key< diff --git a/docs/d0/dee/segmenter__test__base_8h_source.html b/docs/d0/dee/segmenter__test__base_8h_source.html index b64072aef1..9a47224293 100644 --- a/docs/d0/dee/segmenter__test__base_8h_source.html +++ b/docs/d0/dee/segmenter__test__base_8h_source.html @@ -149,9 +149,9 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
61  *result = std::move(segmenter);
62  }
63 
-
65  scoped_refptr<MediaSample> CreateSample(KeyFrameFlag key_frame_flag,
-
66  uint64_t duration,
-
67  SideDataFlag side_data_flag);
+
65  std::shared_ptr<MediaSample> CreateSample(KeyFrameFlag key_frame_flag,
+
66  uint64_t duration,
+
67  SideDataFlag side_data_flag);
72 
@@ -200,12 +200,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
117 
118 #endif // MEDIA_FORMATS_WEBM_SEGMENTER_TEST_UTILS_H_
-
Abstract class holds stream information.
Definition: stream_info.h:53
+
Abstract class holds stream information.
Definition: stream_info.h:51
VideoStreamInfo * CreateVideoStreamInfo() const
Creates a video stream info object for testing.
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:18
std::string OutputFileName() const
Gets the file name of the current output file.
-
scoped_refptr< MediaSample > CreateSample(KeyFrameFlag key_frame_flag, uint64_t duration, SideDataFlag side_data_flag)
Creates a new media sample.
+
std::shared_ptr< MediaSample > CreateSample(KeyFrameFlag key_frame_flag, uint64_t duration, SideDataFlag side_data_flag)
Creates a new media sample.
An implementation of IMkvWriter using our File type.
Definition: mkv_writer.h:21
void CreateAndInitializeSegmenter(const MuxerOptions &options, StreamInfo *info, KeySource *key_source, std::unique_ptr< webm::Segmenter > *result) const
Creates a Segmenter of the given type and initializes it.
MuxerOptions CreateMuxerOptions() const
Creates a Muxer options object for testing.
@@ -217,7 +217,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/df3/packager__util_8cc_source.html b/docs/d0/df3/packager__util_8cc_source.html index 64521ee6d0..f85908ceb1 100644 --- a/docs/d0/df3/packager__util_8cc_source.html +++ b/docs/d0/df3/packager__util_8cc_source.html @@ -354,7 +354,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d0/dfc/structshaka_1_1media_1_1mp4_1_1AudioSampleEntry-members.html b/docs/d0/dfc/structshaka_1_1media_1_1mp4_1_1AudioSampleEntry-members.html index efa215c20e..9b55379478 100644 --- a/docs/d0/dfc/structshaka_1_1media_1_1mp4_1_1AudioSampleEntry-members.html +++ b/docs/d0/dfc/structshaka_1_1media_1_1mp4_1_1AudioSampleEntry-members.html @@ -120,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d0a/classshaka_1_1media_1_1MkvWriter.html b/docs/d1/d0a/classshaka_1_1media_1_1MkvWriter.html index 54c3303d89..a7f16847f3 100644 --- a/docs/d1/d0a/classshaka_1_1media_1_1MkvWriter.html +++ b/docs/d1/d0a/classshaka_1_1media_1_1MkvWriter.html @@ -376,7 +376,7 @@ Public Member Functions diff --git a/docs/d1/d0a/structshaka_1_1media_1_1H264Sps.html b/docs/d1/d0a/structshaka_1_1media_1_1H264Sps.html index 92f947eeb7..8a69f6bc7f 100644 --- a/docs/d1/d0a/structshaka_1_1media_1_1H264Sps.html +++ b/docs/d1/d0a/structshaka_1_1media_1_1H264Sps.html @@ -242,7 +242,7 @@ int chroma_array_type< diff --git a/docs/d1/d0b/hevc__decoder__configuration__record_8cc_source.html b/docs/d1/d0b/hevc__decoder__configuration__record_8cc_source.html index 0dab1c6276..f005befb00 100644 --- a/docs/d1/d0b/hevc__decoder__configuration__record_8cc_source.html +++ b/docs/d1/d0b/hevc__decoder__configuration__record_8cc_source.html @@ -256,7 +256,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d12/classshaka_1_1media_1_1mp2t_1_1EsParserH264-members.html b/docs/d1/d12/classshaka_1_1media_1_1mp2t_1_1EsParserH264-members.html index 397e025c1b..d059af2a1a 100644 --- a/docs/d1/d12/classshaka_1_1media_1_1mp2t_1_1EsParserH264-members.html +++ b/docs/d1/d12/classshaka_1_1media_1_1mp2t_1_1EsParserH264-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d13/status_8h_source.html b/docs/d1/d13/status_8h_source.html index 0caff92aa6..878c93dc33 100644 --- a/docs/d1/d13/status_8h_source.html +++ b/docs/d1/d13/status_8h_source.html @@ -239,7 +239,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d1c/two__pass__single__segment__segmenter_8cc_source.html b/docs/d1/d1c/two__pass__single__segment__segmenter_8cc_source.html index 8d34394cf1..18d4e3dbab 100644 --- a/docs/d1/d1c/two__pass__single__segment__segmenter_8cc_source.html +++ b/docs/d1/d1c/two__pass__single__segment__segmenter_8cc_source.html @@ -284,7 +284,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d1d/muxer__flags_8cc_source.html b/docs/d1/d1d/muxer__flags_8cc_source.html index 360d3a1c0b..6ea2442777 100644 --- a/docs/d1/d1d/muxer__flags_8cc_source.html +++ b/docs/d1/d1d/muxer__flags_8cc_source.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d1f/classshaka_1_1media_1_1KeySource.html b/docs/d1/d1f/classshaka_1_1media_1_1KeySource.html index 7a3b8831f2..fd76f98d81 100644 --- a/docs/d1/d1f/classshaka_1_1media_1_1KeySource.html +++ b/docs/d1/d1f/classshaka_1_1media_1_1KeySource.html @@ -410,7 +410,7 @@ static std::string  diff --git a/docs/d1/d20/classshaka_1_1media_1_1mp4_1_1DecodingTimeIterator.html b/docs/d1/d20/classshaka_1_1media_1_1mp4_1_1DecodingTimeIterator.html index d846870fcc..5d501d798b 100644 --- a/docs/d1/d20/classshaka_1_1media_1_1mp4_1_1DecodingTimeIterator.html +++ b/docs/d1/d20/classshaka_1_1media_1_1mp4_1_1DecodingTimeIterator.html @@ -235,7 +235,7 @@ Public Member Functions diff --git a/docs/d1/d27/key__fetcher_8h_source.html b/docs/d1/d27/key__fetcher_8h_source.html index b3c9ba4baa..e2b1065804 100644 --- a/docs/d1/d27/key__fetcher_8h_source.html +++ b/docs/d1/d27/key__fetcher_8h_source.html @@ -126,7 +126,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d28/classshaka_1_1media_1_1mp2t_1_1AdtsHeader-members.html b/docs/d1/d28/classshaka_1_1media_1_1mp2t_1_1AdtsHeader-members.html index f44dd75355..e7c17ac60d 100644 --- a/docs/d1/d28/classshaka_1_1media_1_1mp2t_1_1AdtsHeader-members.html +++ b/docs/d1/d28/classshaka_1_1media_1_1mp2t_1_1AdtsHeader-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d2a/decryptor__source_8cc_source.html b/docs/d1/d2a/decryptor__source_8cc_source.html index 7259e78b1d..dacd2373e9 100644 --- a/docs/d1/d2a/decryptor__source_8cc_source.html +++ b/docs/d1/d2a/decryptor__source_8cc_source.html @@ -206,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d2b/file__util_8cc_source.html b/docs/d1/d2b/file__util_8cc_source.html index 02d898d549..41f31e1bfb 100644 --- a/docs/d1/d2b/file__util_8cc_source.html +++ b/docs/d1/d2b/file__util_8cc_source.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d2c/structshaka_1_1media_1_1mp4_1_1DataReference-members.html b/docs/d1/d2c/structshaka_1_1media_1_1mp4_1_1DataReference-members.html index 566abb4c82..2a615856e3 100644 --- a/docs/d1/d2c/structshaka_1_1media_1_1mp4_1_1DataReference-members.html +++ b/docs/d1/d2c/structshaka_1_1media_1_1mp4_1_1DataReference-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html b/docs/d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html index 4db0558ee7..0eee311489 100644 --- a/docs/d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html +++ b/docs/d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html @@ -385,7 +385,7 @@ class BoxBuffer diff --git a/docs/d1/d2f/webvtt__media__parser_8cc_source.html b/docs/d1/d2f/webvtt__media__parser_8cc_source.html index 95e8263ddd..e3296a92bf 100644 --- a/docs/d1/d2f/webvtt__media__parser_8cc_source.html +++ b/docs/d1/d2f/webvtt__media__parser_8cc_source.html @@ -277,218 +277,216 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
188 // comment --> side data (and side data only sample)
189 // settings --> side data
190 // start_time --> pts
-
191 scoped_refptr<MediaSample> CueToMediaSample(const Cue& cue) {
+
191 std::shared_ptr<MediaSample> CueToMediaSample(const Cue& cue) {
192  const bool kKeyFrame = true;
193  if (!cue.comment.empty()) {
194  const std::string comment = base::JoinString(cue.comment, "\n");
- +
196  reinterpret_cast<const uint8_t*>(comment.data()), comment.size());
197  }
198 
199  const std::string payload = base::JoinString(cue.payload, "\n");
-
200  scoped_refptr<MediaSample> media_sample = MediaSample::CopyFrom(
-
201  reinterpret_cast<const uint8_t*>(payload.data()),
-
202  payload.size(),
-
203  reinterpret_cast<const uint8_t*>(cue.settings.data()),
-
204  cue.settings.size(),
-
205  !kKeyFrame);
-
206 
-
207  media_sample->set_config_id(cue.identifier);
-
208  media_sample->set_pts(cue.start_time);
-
209  media_sample->set_duration(cue.duration);
-
210  return media_sample;
-
211 }
+
200  std::shared_ptr<MediaSample> media_sample = MediaSample::CopyFrom(
+
201  reinterpret_cast<const uint8_t*>(payload.data()), payload.size(),
+
202  reinterpret_cast<const uint8_t*>(cue.settings.data()),
+
203  cue.settings.size(), !kKeyFrame);
+
204 
+
205  media_sample->set_config_id(cue.identifier);
+
206  media_sample->set_pts(cue.start_time);
+
207  media_sample->set_duration(cue.duration);
+
208  return media_sample;
+
209 }
+
210 
+
211 } // namespace
212 
-
213 } // namespace
-
214 
-
215 Cue::Cue() : start_time(0), duration(0) {}
-
216 Cue::~Cue() {}
-
217 
-
218 WebVttMediaParser::WebVttMediaParser() : state_(kHeader) {}
-
219 WebVttMediaParser::~WebVttMediaParser() {}
-
220 
-
221 void WebVttMediaParser::Init(const InitCB& init_cb,
-
222  const NewSampleCB& new_sample_cb,
-
223  KeySource* decryption_key_source) {
-
224  init_cb_ = init_cb;
-
225  new_sample_cb_ = new_sample_cb;
-
226 }
-
227 
- -
229  // If not in one of these states just be ready for more data.
-
230  if (state_ != kCuePayload && state_ != kComment)
-
231  return true;
-
232 
-
233  if (!data_.empty()) {
-
234  // If it was in the middle of the payload and the stream finished, then this
-
235  // is an end of the payload. The rest of the data is part of the payload.
-
236  if (state_ == kCuePayload) {
-
237  current_cue_.payload.push_back(data_);
-
238  } else {
-
239  current_cue_.comment.push_back(data_);
-
240  }
-
241  data_.clear();
-
242  }
-
243 
-
244  bool result = new_sample_cb_.Run(kTrackId, CueToMediaSample(current_cue_));
-
245  current_cue_ = Cue();
-
246  state_ = kCueIdentifierOrTimingOrComment;
-
247  return result;
-
248 }
-
249 
-
250 bool WebVttMediaParser::Parse(const uint8_t* buf, int size) {
-
251  if (state_ == kParseError) {
-
252  LOG(WARNING) << "The parser is in an error state, ignoring input.";
-
253  return false;
-
254  }
+
213 Cue::Cue() : start_time(0), duration(0) {}
+
214 Cue::~Cue() {}
+
215 
+
216 WebVttMediaParser::WebVttMediaParser() : state_(kHeader) {}
+
217 WebVttMediaParser::~WebVttMediaParser() {}
+
218 
+
219 void WebVttMediaParser::Init(const InitCB& init_cb,
+
220  const NewSampleCB& new_sample_cb,
+
221  KeySource* decryption_key_source) {
+
222  init_cb_ = init_cb;
+
223  new_sample_cb_ = new_sample_cb;
+
224 }
+
225 
+ +
227  // If not in one of these states just be ready for more data.
+
228  if (state_ != kCuePayload && state_ != kComment)
+
229  return true;
+
230 
+
231  if (!data_.empty()) {
+
232  // If it was in the middle of the payload and the stream finished, then this
+
233  // is an end of the payload. The rest of the data is part of the payload.
+
234  if (state_ == kCuePayload) {
+
235  current_cue_.payload.push_back(data_);
+
236  } else {
+
237  current_cue_.comment.push_back(data_);
+
238  }
+
239  data_.clear();
+
240  }
+
241 
+
242  bool result = new_sample_cb_.Run(kTrackId, CueToMediaSample(current_cue_));
+
243  current_cue_ = Cue();
+
244  state_ = kCueIdentifierOrTimingOrComment;
+
245  return result;
+
246 }
+
247 
+
248 bool WebVttMediaParser::Parse(const uint8_t* buf, int size) {
+
249  if (state_ == kParseError) {
+
250  LOG(WARNING) << "The parser is in an error state, ignoring input.";
+
251  return false;
+
252  }
+
253 
+
254  data_.insert(data_.end(), buf, buf + size);
255 
-
256  data_.insert(data_.end(), buf, buf + size);
-
257 
-
258  std::string line;
-
259  while (ReadLine(&data_, &line)) {
-
260  // Only kCueIdentifierOrTimingOrComment and kCueTiming states accept -->.
-
261  // Error otherwise.
-
262  const bool has_arrow = line.find("-->") != std::string::npos;
-
263  if (state_ == kCueTiming) {
-
264  if (!has_arrow) {
-
265  LOG(ERROR) << "Expected --> in: " << line;
-
266  state_ = kParseError;
-
267  return false;
-
268  }
-
269  } else if (state_ != kCueIdentifierOrTimingOrComment) {
-
270  if (has_arrow) {
-
271  LOG(ERROR) << "Unexpected --> in " << line;
-
272  state_ = kParseError;
-
273  return false;
-
274  }
-
275  }
-
276 
-
277  switch (state_) {
-
278  case kHeader:
-
279  // No check. This should be WEBVTT when this object was created.
-
280  header_.push_back(line);
-
281  state_ = kMetadata;
-
282  break;
-
283  case kMetadata: {
-
284  if (line.empty()) {
-
285  std::vector<scoped_refptr<StreamInfo> > streams;
-
286  // The resolution of timings are in milliseconds.
-
287  const int kTimescale = 1000;
-
288 
-
289  // The duration passed here is not very important. Also the whole file
-
290  // must be read before determining the real duration which doesn't
-
291  // work nicely with the current demuxer.
-
292  const int kDuration = 0;
-
293 
-
294  // There is no one metadata to determine what the language is. Parts
-
295  // of the text may be annotated as some specific language.
-
296  const char kLanguage[] = "";
-
297  streams.push_back(new TextStreamInfo(kTrackId, kTimescale, kDuration,
-
298  "wvtt",
-
299  base::JoinString(header_, "\n"),
-
300  0, // Not necessary.
-
301  0,
-
302  kLanguage)); // Not necessary.
-
303 
-
304  init_cb_.Run(streams);
-
305  state_ = kCueIdentifierOrTimingOrComment;
-
306  break;
-
307  }
-
308 
-
309  header_.push_back(line);
-
310  break;
-
311  }
-
312  case kCueIdentifierOrTimingOrComment: {
-
313  // Note that there can be one or more line breaks before a cue starts;
-
314  // skip this line.
-
315  // Or the file could end without a new cue.
-
316  if (line.empty())
-
317  break;
-
318 
-
319  if (!has_arrow) {
-
320  if (base::StartsWith(line, "NOTE",
-
321  base::CompareCase::INSENSITIVE_ASCII)) {
-
322  state_ = kComment;
-
323  current_cue_.comment.push_back(line);
-
324  } else {
-
325  // A cue can start from a cue identifier.
-
326  // https://w3c.github.io/webvtt/#webvtt-cue-identifier
-
327  current_cue_.identifier = line;
-
328  // The next line must be a timing.
-
329  state_ = kCueTiming;
-
330  }
-
331  break;
-
332  }
-
333 
-
334  // No break statement if the line has an arrow; it should be a WebVTT
-
335  // timing, so fall thru. Setting state_ to kCueTiming so that the state
-
336  // always matches the case.
-
337  state_ = kCueTiming;
-
338  FALLTHROUGH_INTENDED;
-
339  }
-
340  case kCueTiming: {
-
341  DCHECK(has_arrow);
-
342  if (!ParseTimingAndSettingsLine(line, &current_cue_.start_time,
-
343  &current_cue_.duration,
-
344  &current_cue_.settings)) {
-
345  state_ = kParseError;
-
346  return false;
-
347  }
-
348  state_ = kCuePayload;
-
349  break;
-
350  }
-
351  case kCuePayload: {
-
352  if (line.empty()) {
-
353  state_ = kCueIdentifierOrTimingOrComment;
-
354  if (!new_sample_cb_.Run(kTrackId, CueToMediaSample(current_cue_))) {
-
355  state_ = kParseError;
-
356  return false;
-
357  }
-
358  current_cue_ = Cue();
-
359  break;
-
360  }
-
361 
-
362  current_cue_.payload.push_back(line);
-
363  break;
-
364  }
-
365  case kComment: {
-
366  if (line.empty()) {
-
367  state_ = kCueIdentifierOrTimingOrComment;
-
368  if (!new_sample_cb_.Run(kTrackId, CueToMediaSample(current_cue_))) {
-
369  state_ = kParseError;
-
370  return false;
-
371  }
-
372  current_cue_ = Cue();
-
373  break;
-
374  }
-
375 
-
376  current_cue_.comment.push_back(line);
-
377  break;
-
378  }
-
379  case kParseError:
-
380  NOTREACHED();
-
381  return false;
-
382  }
-
383  }
-
384 
-
385  return true;
-
386 }
-
387 
-
388 } // namespace media
-
389 } // namespace shaka
-
static scoped_refptr< MediaSample > FromMetadata(const uint8_t *metadata, size_t metadata_size)
Definition: media_sample.cc:67
-
void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
-
bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
-
bool Flush() override WARN_UNUSED_RESULT
-
base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
Definition: media_parser.h:43
+
256  std::string line;
+
257  while (ReadLine(&data_, &line)) {
+
258  // Only kCueIdentifierOrTimingOrComment and kCueTiming states accept -->.
+
259  // Error otherwise.
+
260  const bool has_arrow = line.find("-->") != std::string::npos;
+
261  if (state_ == kCueTiming) {
+
262  if (!has_arrow) {
+
263  LOG(ERROR) << "Expected --> in: " << line;
+
264  state_ = kParseError;
+
265  return false;
+
266  }
+
267  } else if (state_ != kCueIdentifierOrTimingOrComment) {
+
268  if (has_arrow) {
+
269  LOG(ERROR) << "Unexpected --> in " << line;
+
270  state_ = kParseError;
+
271  return false;
+
272  }
+
273  }
+
274 
+
275  switch (state_) {
+
276  case kHeader:
+
277  // No check. This should be WEBVTT when this object was created.
+
278  header_.push_back(line);
+
279  state_ = kMetadata;
+
280  break;
+
281  case kMetadata: {
+
282  if (line.empty()) {
+
283  std::vector<std::shared_ptr<StreamInfo>> streams;
+
284  // The resolution of timings are in milliseconds.
+
285  const int kTimescale = 1000;
+
286 
+
287  // The duration passed here is not very important. Also the whole file
+
288  // must be read before determining the real duration which doesn't
+
289  // work nicely with the current demuxer.
+
290  const int kDuration = 0;
+
291 
+
292  // There is no one metadata to determine what the language is. Parts
+
293  // of the text may be annotated as some specific language.
+
294  const char kLanguage[] = "";
+
295  streams.emplace_back(
+
296  new TextStreamInfo(kTrackId, kTimescale, kDuration, "wvtt",
+
297  base::JoinString(header_, "\n"),
+
298  0, // Not necessary.
+
299  0,
+
300  kLanguage)); // Not necessary.
+
301 
+
302  init_cb_.Run(streams);
+
303  state_ = kCueIdentifierOrTimingOrComment;
+
304  break;
+
305  }
+
306 
+
307  header_.push_back(line);
+
308  break;
+
309  }
+
310  case kCueIdentifierOrTimingOrComment: {
+
311  // Note that there can be one or more line breaks before a cue starts;
+
312  // skip this line.
+
313  // Or the file could end without a new cue.
+
314  if (line.empty())
+
315  break;
+
316 
+
317  if (!has_arrow) {
+
318  if (base::StartsWith(line, "NOTE",
+
319  base::CompareCase::INSENSITIVE_ASCII)) {
+
320  state_ = kComment;
+
321  current_cue_.comment.push_back(line);
+
322  } else {
+
323  // A cue can start from a cue identifier.
+
324  // https://w3c.github.io/webvtt/#webvtt-cue-identifier
+
325  current_cue_.identifier = line;
+
326  // The next line must be a timing.
+
327  state_ = kCueTiming;
+
328  }
+
329  break;
+
330  }
+
331 
+
332  // No break statement if the line has an arrow; it should be a WebVTT
+
333  // timing, so fall thru. Setting state_ to kCueTiming so that the state
+
334  // always matches the case.
+
335  state_ = kCueTiming;
+
336  FALLTHROUGH_INTENDED;
+
337  }
+
338  case kCueTiming: {
+
339  DCHECK(has_arrow);
+
340  if (!ParseTimingAndSettingsLine(line, &current_cue_.start_time,
+
341  &current_cue_.duration,
+
342  &current_cue_.settings)) {
+
343  state_ = kParseError;
+
344  return false;
+
345  }
+
346  state_ = kCuePayload;
+
347  break;
+
348  }
+
349  case kCuePayload: {
+
350  if (line.empty()) {
+
351  state_ = kCueIdentifierOrTimingOrComment;
+
352  if (!new_sample_cb_.Run(kTrackId, CueToMediaSample(current_cue_))) {
+
353  state_ = kParseError;
+
354  return false;
+
355  }
+
356  current_cue_ = Cue();
+
357  break;
+
358  }
+
359 
+
360  current_cue_.payload.push_back(line);
+
361  break;
+
362  }
+
363  case kComment: {
+
364  if (line.empty()) {
+
365  state_ = kCueIdentifierOrTimingOrComment;
+
366  if (!new_sample_cb_.Run(kTrackId, CueToMediaSample(current_cue_))) {
+
367  state_ = kParseError;
+
368  return false;
+
369  }
+
370  current_cue_ = Cue();
+
371  break;
+
372  }
+
373 
+
374  current_cue_.comment.push_back(line);
+
375  break;
+
376  }
+
377  case kParseError:
+
378  NOTREACHED();
+
379  return false;
+
380  }
+
381  }
+
382 
+
383  return true;
+
384 }
+
385 
+
386 } // namespace media
+
387 } // namespace shaka
+
void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
+
base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
Definition: media_parser.h:43
+
bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
+
bool Flush() override WARN_UNUSED_RESULT
+
static std::shared_ptr< MediaSample > FromMetadata(const uint8_t *metadata, size_t metadata_size)
Definition: media_sample.cc:67
+
static std::shared_ptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
Definition: media_sample.cc:45
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:30
-
static scoped_refptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
Definition: media_sample.cc:45
diff --git a/docs/d1/d30/classshaka_1_1media_1_1mp2t_1_1TsSectionPes.html b/docs/d1/d30/classshaka_1_1media_1_1mp2t_1_1TsSectionPes.html index 281954845c..c5c5b40f0b 100644 --- a/docs/d1/d30/classshaka_1_1media_1_1mp2t_1_1TsSectionPes.html +++ b/docs/d1/d30/classshaka_1_1media_1_1mp2t_1_1TsSectionPes.html @@ -142,7 +142,7 @@ Additional Inherited Members diff --git a/docs/d1/d31/classshaka_1_1xml_1_1XmlNode.html b/docs/d1/d31/classshaka_1_1xml_1_1XmlNode.html index d03073e31a..5450006bb7 100644 --- a/docs/d1/d31/classshaka_1_1xml_1_1XmlNode.html +++ b/docs/d1/d31/classshaka_1_1xml_1_1XmlNode.html @@ -419,7 +419,7 @@ bool  diff --git a/docs/d1/d34/structshaka_1_1media_1_1SubsampleEntry.html b/docs/d1/d34/structshaka_1_1media_1_1SubsampleEntry.html index 179e27e18d..3c2e77b7a1 100644 --- a/docs/d1/d34/structshaka_1_1media_1_1SubsampleEntry.html +++ b/docs/d1/d34/structshaka_1_1media_1_1SubsampleEntry.html @@ -122,7 +122,7 @@ uint32_t cipher_bytes< diff --git a/docs/d1/d37/es__parser__h264_8h_source.html b/docs/d1/d37/es__parser__h264_8h_source.html index 809a00193e..31e6a981de 100644 --- a/docs/d1/d37/es__parser__h264_8h_source.html +++ b/docs/d1/d37/es__parser__h264_8h_source.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
43  // Callback to pass the stream configuration.
44  NewStreamInfoCB new_stream_info_cb_;
45 
-
46  scoped_refptr<StreamInfo> last_video_decoder_config_;
+
46  std::shared_ptr<StreamInfo> last_video_decoder_config_;
47  bool decoder_config_check_pending_;
48 
49  std::unique_ptr<H264Parser> h264_parser_;
@@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d3b/mpd__generator__flags_8h_source.html b/docs/d1/d3b/mpd__generator__flags_8h_source.html index f396bfe6bc..5fd0ddced5 100644 --- a/docs/d1/d3b/mpd__generator__flags_8h_source.html +++ b/docs/d1/d3b/mpd__generator__flags_8h_source.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d3e/structshaka_1_1media_1_1mp4_1_1MovieExtends.html b/docs/d1/d3e/structshaka_1_1media_1_1mp4_1_1MovieExtends.html index 69b7ea191d..4147dc210c 100644 --- a/docs/d1/d3e/structshaka_1_1media_1_1mp4_1_1MovieExtends.html +++ b/docs/d1/d3e/structshaka_1_1media_1_1mp4_1_1MovieExtends.html @@ -176,7 +176,7 @@ Additional Inherited Members diff --git a/docs/d1/d40/classshaka_1_1MpdWriter-members.html b/docs/d1/d40/classshaka_1_1MpdWriter-members.html index c37bd9b137..5f5fd87a03 100644 --- a/docs/d1/d40/classshaka_1_1MpdWriter-members.html +++ b/docs/d1/d40/classshaka_1_1MpdWriter-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d45/decoding__time__iterator_8cc_source.html b/docs/d1/d45/decoding__time__iterator_8cc_source.html index 645ae0bc1a..23e3152ec5 100644 --- a/docs/d1/d45/decoding__time__iterator_8cc_source.html +++ b/docs/d1/d45/decoding__time__iterator_8cc_source.html @@ -168,7 +168,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d48/text__track__config_8h_source.html b/docs/d1/d48/text__track__config_8h_source.html index 640951865c..d4dd667ee9 100644 --- a/docs/d1/d48/text__track__config_8h_source.html +++ b/docs/d1/d48/text__track__config_8h_source.html @@ -139,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d4f/classshaka_1_1media_1_1OffsetByteQueue-members.html b/docs/d1/d4f/classshaka_1_1media_1_1OffsetByteQueue-members.html index 512b1eea4e..a13ad5005c 100644 --- a/docs/d1/d4f/classshaka_1_1media_1_1OffsetByteQueue-members.html +++ b/docs/d1/d4f/classshaka_1_1media_1_1OffsetByteQueue-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d5a/structshaka_1_1media_1_1EncryptionKey-members.html b/docs/d1/d5a/structshaka_1_1media_1_1EncryptionKey-members.html index b937469087..845aeb8d33 100644 --- a/docs/d1/d5a/structshaka_1_1media_1_1EncryptionKey-members.html +++ b/docs/d1/d5a/structshaka_1_1media_1_1EncryptionKey-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d6e/structshaka_1_1media_1_1mp4_1_1TrackFragmentHeader.html b/docs/d1/d6e/structshaka_1_1media_1_1mp4_1_1TrackFragmentHeader.html index 92da998535..ed7d42b1d1 100644 --- a/docs/d1/d6e/structshaka_1_1media_1_1mp4_1_1TrackFragmentHeader.html +++ b/docs/d1/d6e/structshaka_1_1media_1_1mp4_1_1TrackFragmentHeader.html @@ -222,7 +222,7 @@ Additional Inherited Members diff --git a/docs/d1/d70/vp8__parser_8cc_source.html b/docs/d1/d70/vp8__parser_8cc_source.html index 0dd355e3e4..4b1b594b78 100644 --- a/docs/d1/d70/vp8__parser_8cc_source.html +++ b/docs/d1/d70/vp8__parser_8cc_source.html @@ -293,7 +293,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d72/language__utils_8cc_source.html b/docs/d1/d72/language__utils_8cc_source.html index b909aa5d31..d2a6d4b02f 100644 --- a/docs/d1/d72/language__utils_8cc_source.html +++ b/docs/d1/d72/language__utils_8cc_source.html @@ -226,7 +226,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d74/mp2t__media__parser_8cc_source.html b/docs/d1/d74/mp2t__media__parser_8cc_source.html index a23cf6871b..7fd8806eb3 100644 --- a/docs/d1/d74/mp2t__media__parser_8cc_source.html +++ b/docs/d1/d74/mp2t__media__parser_8cc_source.html @@ -150,388 +150,390 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
61 
62  PidType pid_type() const { return pid_type_; }
63 
-
64  scoped_refptr<StreamInfo>& config() { return config_; }
-
65  void set_config(const scoped_refptr<StreamInfo>& config) { config_ = config; }
-
66 
-
67  SampleQueue& sample_queue() { return sample_queue_; }
+
64  std::shared_ptr<StreamInfo>& config() { return config_; }
+
65  void set_config(const std::shared_ptr<StreamInfo>& config) {
+
66  config_ = config;
+
67  }
68 
-
69  private:
-
70  void ResetState();
-
71 
-
72  int pid_;
-
73  PidType pid_type_;
-
74  std::unique_ptr<TsSection> section_parser_;
-
75 
-
76  bool enable_;
-
77  int continuity_counter_;
-
78  scoped_refptr<StreamInfo> config_;
-
79  SampleQueue sample_queue_;
-
80 };
-
81 
-
82 PidState::PidState(int pid,
-
83  PidType pid_type,
-
84  std::unique_ptr<TsSection> section_parser)
-
85  : pid_(pid),
-
86  pid_type_(pid_type),
-
87  section_parser_(std::move(section_parser)),
-
88  enable_(false),
-
89  continuity_counter_(-1) {
-
90  DCHECK(section_parser_);
-
91 }
-
92 
-
93 bool PidState::PushTsPacket(const TsPacket& ts_packet) {
-
94  DCHECK_EQ(ts_packet.pid(), pid_);
-
95 
-
96  // The current PID is not part of the PID filter,
-
97  // just discard the incoming TS packet.
-
98  if (!enable_)
-
99  return true;
-
100 
-
101  int expected_continuity_counter = (continuity_counter_ + 1) % 16;
-
102  if (continuity_counter_ >= 0 &&
-
103  ts_packet.continuity_counter() != expected_continuity_counter) {
-
104  DVLOG(1) << "TS discontinuity detected for pid: " << pid_;
-
105  // TODO(tinskip): Handle discontinuity better.
-
106  return false;
-
107  }
-
108 
-
109  bool status = section_parser_->Parse(
-
110  ts_packet.payload_unit_start_indicator(),
-
111  ts_packet.payload(),
-
112  ts_packet.payload_size());
-
113 
-
114  // At the minimum, when parsing failed, auto reset the section parser.
-
115  // Components that use the Mp2tMediaParser can take further action if needed.
-
116  if (!status) {
-
117  DVLOG(1) << "Parsing failed for pid = " << pid_;
-
118  ResetState();
-
119  }
-
120 
-
121  return status;
-
122 }
-
123 
-
124 void PidState::Flush() {
-
125  section_parser_->Flush();
-
126  ResetState();
-
127 }
-
128 
-
129 void PidState::Enable() {
-
130  enable_ = true;
-
131 }
-
132 
-
133 void PidState::Disable() {
-
134  if (!enable_)
-
135  return;
-
136 
-
137  ResetState();
-
138  enable_ = false;
-
139 }
-
140 
-
141 bool PidState::IsEnabled() const {
-
142  return enable_;
-
143 }
-
144 
-
145 void PidState::ResetState() {
-
146  section_parser_->Reset();
-
147  continuity_counter_ = -1;
-
148 }
-
149 
-
150 Mp2tMediaParser::Mp2tMediaParser()
-
151  : sbr_in_mimetype_(false),
-
152  is_initialized_(false) {
-
153 }
-
154 
-
155 Mp2tMediaParser::~Mp2tMediaParser() {}
+
69  SampleQueue& sample_queue() { return sample_queue_; }
+
70 
+
71  private:
+
72  void ResetState();
+
73 
+
74  int pid_;
+
75  PidType pid_type_;
+
76  std::unique_ptr<TsSection> section_parser_;
+
77 
+
78  bool enable_;
+
79  int continuity_counter_;
+
80  std::shared_ptr<StreamInfo> config_;
+
81  SampleQueue sample_queue_;
+
82 };
+
83 
+
84 PidState::PidState(int pid,
+
85  PidType pid_type,
+
86  std::unique_ptr<TsSection> section_parser)
+
87  : pid_(pid),
+
88  pid_type_(pid_type),
+
89  section_parser_(std::move(section_parser)),
+
90  enable_(false),
+
91  continuity_counter_(-1) {
+
92  DCHECK(section_parser_);
+
93 }
+
94 
+
95 bool PidState::PushTsPacket(const TsPacket& ts_packet) {
+
96  DCHECK_EQ(ts_packet.pid(), pid_);
+
97 
+
98  // The current PID is not part of the PID filter,
+
99  // just discard the incoming TS packet.
+
100  if (!enable_)
+
101  return true;
+
102 
+
103  int expected_continuity_counter = (continuity_counter_ + 1) % 16;
+
104  if (continuity_counter_ >= 0 &&
+
105  ts_packet.continuity_counter() != expected_continuity_counter) {
+
106  DVLOG(1) << "TS discontinuity detected for pid: " << pid_;
+
107  // TODO(tinskip): Handle discontinuity better.
+
108  return false;
+
109  }
+
110 
+
111  bool status = section_parser_->Parse(
+
112  ts_packet.payload_unit_start_indicator(),
+
113  ts_packet.payload(),
+
114  ts_packet.payload_size());
+
115 
+
116  // At the minimum, when parsing failed, auto reset the section parser.
+
117  // Components that use the Mp2tMediaParser can take further action if needed.
+
118  if (!status) {
+
119  DVLOG(1) << "Parsing failed for pid = " << pid_;
+
120  ResetState();
+
121  }
+
122 
+
123  return status;
+
124 }
+
125 
+
126 void PidState::Flush() {
+
127  section_parser_->Flush();
+
128  ResetState();
+
129 }
+
130 
+
131 void PidState::Enable() {
+
132  enable_ = true;
+
133 }
+
134 
+
135 void PidState::Disable() {
+
136  if (!enable_)
+
137  return;
+
138 
+
139  ResetState();
+
140  enable_ = false;
+
141 }
+
142 
+
143 bool PidState::IsEnabled() const {
+
144  return enable_;
+
145 }
+
146 
+
147 void PidState::ResetState() {
+
148  section_parser_->Reset();
+
149  continuity_counter_ = -1;
+
150 }
+
151 
+
152 Mp2tMediaParser::Mp2tMediaParser()
+
153  : sbr_in_mimetype_(false),
+
154  is_initialized_(false) {
+
155 }
156 
- -
158  const InitCB& init_cb,
-
159  const NewSampleCB& new_sample_cb,
-
160  KeySource* decryption_key_source) {
-
161  DCHECK(!is_initialized_);
-
162  DCHECK(init_cb_.is_null());
-
163  DCHECK(!init_cb.is_null());
-
164  DCHECK(!new_sample_cb.is_null());
-
165 
-
166  init_cb_ = init_cb;
-
167  new_sample_cb_ = new_sample_cb;
-
168 }
-
169 
- -
171  DVLOG(1) << "Mp2tMediaParser::Flush";
-
172 
-
173  // Flush the buffers and reset the pids.
-
174  for (const auto& pair : pids_) {
-
175  DVLOG(1) << "Flushing PID: " << pair.first;
-
176  PidState* pid_state = pair.second.get();
-
177  pid_state->Flush();
-
178  }
-
179  bool result = EmitRemainingSamples();
-
180  pids_.clear();
-
181 
-
182  // Remove any bytes left in the TS buffer.
-
183  // (i.e. any partial TS packet => less than 188 bytes).
-
184  ts_byte_queue_.Reset();
-
185  return result;
-
186 }
-
187 
-
188 bool Mp2tMediaParser::Parse(const uint8_t* buf, int size) {
-
189  DVLOG(1) << "Mp2tMediaParser::Parse size=" << size;
-
190 
-
191  // Add the data to the parser state.
-
192  ts_byte_queue_.Push(buf, size);
-
193 
-
194  while (true) {
-
195  const uint8_t* ts_buffer;
-
196  int ts_buffer_size;
-
197  ts_byte_queue_.Peek(&ts_buffer, &ts_buffer_size);
-
198  if (ts_buffer_size < TsPacket::kPacketSize)
-
199  break;
-
200 
-
201  // Synchronization.
-
202  int skipped_bytes = TsPacket::Sync(ts_buffer, ts_buffer_size);
-
203  if (skipped_bytes > 0) {
-
204  DVLOG(1) << "Packet not aligned on a TS syncword:"
-
205  << " skipped_bytes=" << skipped_bytes;
-
206  ts_byte_queue_.Pop(skipped_bytes);
-
207  continue;
-
208  }
-
209 
-
210  // Parse the TS header, skipping 1 byte if the header is invalid.
-
211  std::unique_ptr<TsPacket> ts_packet(
-
212  TsPacket::Parse(ts_buffer, ts_buffer_size));
-
213  if (!ts_packet) {
-
214  DVLOG(1) << "Error: invalid TS packet";
-
215  ts_byte_queue_.Pop(1);
-
216  continue;
-
217  }
-
218  DVLOG(LOG_LEVEL_TS)
-
219  << "Processing PID=" << ts_packet->pid()
-
220  << " start_unit=" << ts_packet->payload_unit_start_indicator();
-
221 
-
222  // Parse the section.
-
223  std::map<int, std::unique_ptr<PidState>>::iterator it =
-
224  pids_.find(ts_packet->pid());
-
225  if (it == pids_.end() &&
-
226  ts_packet->pid() == TsSection::kPidPat) {
-
227  // Create the PAT state here if needed.
-
228  std::unique_ptr<TsSection> pat_section_parser(new TsSectionPat(
-
229  base::Bind(&Mp2tMediaParser::RegisterPmt, base::Unretained(this))));
-
230  std::unique_ptr<PidState> pat_pid_state(new PidState(
-
231  ts_packet->pid(), PidState::kPidPat, std::move(pat_section_parser)));
-
232  pat_pid_state->Enable();
-
233  it = pids_
-
234  .insert(std::pair<int, std::unique_ptr<PidState>>(
-
235  ts_packet->pid(), std::move(pat_pid_state)))
-
236  .first;
-
237  }
-
238 
-
239  if (it != pids_.end()) {
-
240  if (!it->second->PushTsPacket(*ts_packet))
-
241  return false;
-
242  } else {
-
243  DVLOG(LOG_LEVEL_TS) << "Ignoring TS packet for pid: " << ts_packet->pid();
-
244  }
-
245 
-
246  // Go to the next packet.
-
247  ts_byte_queue_.Pop(TsPacket::kPacketSize);
-
248  }
-
249 
-
250  // Emit the A/V buffers that kept accumulating during TS parsing.
-
251  return EmitRemainingSamples();
-
252 }
-
253 
-
254 void Mp2tMediaParser::RegisterPmt(int program_number, int pmt_pid) {
-
255  DVLOG(1) << "RegisterPmt:"
-
256  << " program_number=" << program_number
-
257  << " pmt_pid=" << pmt_pid;
-
258 
-
259  // Only one TS program is allowed. Ignore the incoming program map table,
-
260  // if there is already one registered.
-
261  for (const auto& pair : pids_) {
-
262  if (pair.second->pid_type() == PidState::kPidPmt) {
-
263  DVLOG_IF(1, pmt_pid != pair.first) << "More than one program is defined";
-
264  return;
-
265  }
-
266  }
-
267 
-
268  // Create the PMT state here if needed.
-
269  DVLOG(1) << "Create a new PMT parser";
-
270  std::unique_ptr<TsSection> pmt_section_parser(new TsSectionPmt(base::Bind(
-
271  &Mp2tMediaParser::RegisterPes, base::Unretained(this), pmt_pid)));
-
272  std::unique_ptr<PidState> pmt_pid_state(
-
273  new PidState(pmt_pid, PidState::kPidPmt, std::move(pmt_section_parser)));
-
274  pmt_pid_state->Enable();
-
275  pids_.insert(std::pair<int, std::unique_ptr<PidState>>(
-
276  pmt_pid, std::move(pmt_pid_state)));
-
277 }
-
278 
-
279 void Mp2tMediaParser::RegisterPes(int pmt_pid,
-
280  int pes_pid,
-
281  int stream_type) {
-
282  DVLOG(1) << "RegisterPes:"
-
283  << " pes_pid=" << pes_pid
-
284  << " stream_type=" << std::hex << stream_type << std::dec;
-
285  std::map<int, std::unique_ptr<PidState>>::iterator it = pids_.find(pes_pid);
-
286  if (it != pids_.end())
-
287  return;
-
288 
-
289  // Create a stream parser corresponding to the stream type.
-
290  bool is_audio = false;
-
291  std::unique_ptr<EsParser> es_parser;
-
292  if (stream_type == kStreamTypeAVC) {
-
293  es_parser.reset(
-
294  new EsParserH264(
-
295  pes_pid,
-
296  base::Bind(&Mp2tMediaParser::OnNewStreamInfo,
-
297  base::Unretained(this)),
-
298  base::Bind(&Mp2tMediaParser::OnEmitSample,
-
299  base::Unretained(this))));
-
300  } else if (stream_type == kStreamTypeHEVC) {
-
301  es_parser.reset(
-
302  new EsParserH265(
-
303  pes_pid,
-
304  base::Bind(&Mp2tMediaParser::OnNewStreamInfo,
-
305  base::Unretained(this)),
-
306  base::Bind(&Mp2tMediaParser::OnEmitSample,
-
307  base::Unretained(this))));
-
308  } else if (stream_type == kStreamTypeAAC) {
-
309  es_parser.reset(
-
310  new EsParserAdts(
-
311  pes_pid,
-
312  base::Bind(&Mp2tMediaParser::OnNewStreamInfo,
-
313  base::Unretained(this)),
-
314  base::Bind(&Mp2tMediaParser::OnEmitSample,
+
157 Mp2tMediaParser::~Mp2tMediaParser() {}
+
158 
+ +
160  const InitCB& init_cb,
+
161  const NewSampleCB& new_sample_cb,
+
162  KeySource* decryption_key_source) {
+
163  DCHECK(!is_initialized_);
+
164  DCHECK(init_cb_.is_null());
+
165  DCHECK(!init_cb.is_null());
+
166  DCHECK(!new_sample_cb.is_null());
+
167 
+
168  init_cb_ = init_cb;
+
169  new_sample_cb_ = new_sample_cb;
+
170 }
+
171 
+ +
173  DVLOG(1) << "Mp2tMediaParser::Flush";
+
174 
+
175  // Flush the buffers and reset the pids.
+
176  for (const auto& pair : pids_) {
+
177  DVLOG(1) << "Flushing PID: " << pair.first;
+
178  PidState* pid_state = pair.second.get();
+
179  pid_state->Flush();
+
180  }
+
181  bool result = EmitRemainingSamples();
+
182  pids_.clear();
+
183 
+
184  // Remove any bytes left in the TS buffer.
+
185  // (i.e. any partial TS packet => less than 188 bytes).
+
186  ts_byte_queue_.Reset();
+
187  return result;
+
188 }
+
189 
+
190 bool Mp2tMediaParser::Parse(const uint8_t* buf, int size) {
+
191  DVLOG(1) << "Mp2tMediaParser::Parse size=" << size;
+
192 
+
193  // Add the data to the parser state.
+
194  ts_byte_queue_.Push(buf, size);
+
195 
+
196  while (true) {
+
197  const uint8_t* ts_buffer;
+
198  int ts_buffer_size;
+
199  ts_byte_queue_.Peek(&ts_buffer, &ts_buffer_size);
+
200  if (ts_buffer_size < TsPacket::kPacketSize)
+
201  break;
+
202 
+
203  // Synchronization.
+
204  int skipped_bytes = TsPacket::Sync(ts_buffer, ts_buffer_size);
+
205  if (skipped_bytes > 0) {
+
206  DVLOG(1) << "Packet not aligned on a TS syncword:"
+
207  << " skipped_bytes=" << skipped_bytes;
+
208  ts_byte_queue_.Pop(skipped_bytes);
+
209  continue;
+
210  }
+
211 
+
212  // Parse the TS header, skipping 1 byte if the header is invalid.
+
213  std::unique_ptr<TsPacket> ts_packet(
+
214  TsPacket::Parse(ts_buffer, ts_buffer_size));
+
215  if (!ts_packet) {
+
216  DVLOG(1) << "Error: invalid TS packet";
+
217  ts_byte_queue_.Pop(1);
+
218  continue;
+
219  }
+
220  DVLOG(LOG_LEVEL_TS)
+
221  << "Processing PID=" << ts_packet->pid()
+
222  << " start_unit=" << ts_packet->payload_unit_start_indicator();
+
223 
+
224  // Parse the section.
+
225  std::map<int, std::unique_ptr<PidState>>::iterator it =
+
226  pids_.find(ts_packet->pid());
+
227  if (it == pids_.end() &&
+
228  ts_packet->pid() == TsSection::kPidPat) {
+
229  // Create the PAT state here if needed.
+
230  std::unique_ptr<TsSection> pat_section_parser(new TsSectionPat(
+
231  base::Bind(&Mp2tMediaParser::RegisterPmt, base::Unretained(this))));
+
232  std::unique_ptr<PidState> pat_pid_state(new PidState(
+
233  ts_packet->pid(), PidState::kPidPat, std::move(pat_section_parser)));
+
234  pat_pid_state->Enable();
+
235  it = pids_
+
236  .insert(std::pair<int, std::unique_ptr<PidState>>(
+
237  ts_packet->pid(), std::move(pat_pid_state)))
+
238  .first;
+
239  }
+
240 
+
241  if (it != pids_.end()) {
+
242  if (!it->second->PushTsPacket(*ts_packet))
+
243  return false;
+
244  } else {
+
245  DVLOG(LOG_LEVEL_TS) << "Ignoring TS packet for pid: " << ts_packet->pid();
+
246  }
+
247 
+
248  // Go to the next packet.
+
249  ts_byte_queue_.Pop(TsPacket::kPacketSize);
+
250  }
+
251 
+
252  // Emit the A/V buffers that kept accumulating during TS parsing.
+
253  return EmitRemainingSamples();
+
254 }
+
255 
+
256 void Mp2tMediaParser::RegisterPmt(int program_number, int pmt_pid) {
+
257  DVLOG(1) << "RegisterPmt:"
+
258  << " program_number=" << program_number
+
259  << " pmt_pid=" << pmt_pid;
+
260 
+
261  // Only one TS program is allowed. Ignore the incoming program map table,
+
262  // if there is already one registered.
+
263  for (const auto& pair : pids_) {
+
264  if (pair.second->pid_type() == PidState::kPidPmt) {
+
265  DVLOG_IF(1, pmt_pid != pair.first) << "More than one program is defined";
+
266  return;
+
267  }
+
268  }
+
269 
+
270  // Create the PMT state here if needed.
+
271  DVLOG(1) << "Create a new PMT parser";
+
272  std::unique_ptr<TsSection> pmt_section_parser(new TsSectionPmt(base::Bind(
+
273  &Mp2tMediaParser::RegisterPes, base::Unretained(this), pmt_pid)));
+
274  std::unique_ptr<PidState> pmt_pid_state(
+
275  new PidState(pmt_pid, PidState::kPidPmt, std::move(pmt_section_parser)));
+
276  pmt_pid_state->Enable();
+
277  pids_.insert(std::pair<int, std::unique_ptr<PidState>>(
+
278  pmt_pid, std::move(pmt_pid_state)));
+
279 }
+
280 
+
281 void Mp2tMediaParser::RegisterPes(int pmt_pid,
+
282  int pes_pid,
+
283  int stream_type) {
+
284  DVLOG(1) << "RegisterPes:"
+
285  << " pes_pid=" << pes_pid
+
286  << " stream_type=" << std::hex << stream_type << std::dec;
+
287  std::map<int, std::unique_ptr<PidState>>::iterator it = pids_.find(pes_pid);
+
288  if (it != pids_.end())
+
289  return;
+
290 
+
291  // Create a stream parser corresponding to the stream type.
+
292  bool is_audio = false;
+
293  std::unique_ptr<EsParser> es_parser;
+
294  if (stream_type == kStreamTypeAVC) {
+
295  es_parser.reset(
+
296  new EsParserH264(
+
297  pes_pid,
+
298  base::Bind(&Mp2tMediaParser::OnNewStreamInfo,
+
299  base::Unretained(this)),
+
300  base::Bind(&Mp2tMediaParser::OnEmitSample,
+
301  base::Unretained(this))));
+
302  } else if (stream_type == kStreamTypeHEVC) {
+
303  es_parser.reset(
+
304  new EsParserH265(
+
305  pes_pid,
+
306  base::Bind(&Mp2tMediaParser::OnNewStreamInfo,
+
307  base::Unretained(this)),
+
308  base::Bind(&Mp2tMediaParser::OnEmitSample,
+
309  base::Unretained(this))));
+
310  } else if (stream_type == kStreamTypeAAC) {
+
311  es_parser.reset(
+
312  new EsParserAdts(
+
313  pes_pid,
+
314  base::Bind(&Mp2tMediaParser::OnNewStreamInfo,
315  base::Unretained(this)),
-
316  sbr_in_mimetype_));
-
317  is_audio = true;
-
318  } else {
-
319  return;
-
320  }
-
321 
-
322  // Create the PES state here.
-
323  DVLOG(1) << "Create a new PES state";
-
324  std::unique_ptr<TsSection> pes_section_parser(
-
325  new TsSectionPes(std::move(es_parser)));
-
326  PidState::PidType pid_type =
-
327  is_audio ? PidState::kPidAudioPes : PidState::kPidVideoPes;
-
328  std::unique_ptr<PidState> pes_pid_state(
-
329  new PidState(pes_pid, pid_type, std::move(pes_section_parser)));
-
330  pes_pid_state->Enable();
-
331  pids_.insert(std::pair<int, std::unique_ptr<PidState>>(
-
332  pes_pid, std::move(pes_pid_state)));
-
333 }
-
334 
-
335 void Mp2tMediaParser::OnNewStreamInfo(
-
336  const scoped_refptr<StreamInfo>& new_stream_info) {
-
337  DCHECK(new_stream_info);
-
338  DVLOG(1) << "OnVideoConfigChanged for pid=" << new_stream_info->track_id();
-
339 
-
340  PidMap::iterator pid_state = pids_.find(new_stream_info->track_id());
-
341  if (pid_state == pids_.end()) {
-
342  LOG(ERROR) << "PID State for new stream not found (pid = "
-
343  << new_stream_info->track_id() << ").";
-
344  return;
-
345  }
-
346 
-
347  // Set the stream configuration information for the PID.
-
348  pid_state->second->set_config(new_stream_info);
-
349 
-
350  // Finish initialization if all streams have configs.
-
351  FinishInitializationIfNeeded();
-
352 }
-
353 
-
354 bool Mp2tMediaParser::FinishInitializationIfNeeded() {
-
355  // Nothing to be done if already initialized.
-
356  if (is_initialized_)
-
357  return true;
-
358 
-
359  // Wait for more data to come to finish initialization.
-
360  if (pids_.empty())
-
361  return true;
-
362 
-
363  std::vector<scoped_refptr<StreamInfo> > all_stream_info;
-
364  uint32_t num_es(0);
-
365  for (PidMap::const_iterator iter = pids_.begin(); iter != pids_.end();
-
366  ++iter) {
-
367  if (((iter->second->pid_type() == PidState::kPidAudioPes) ||
-
368  (iter->second->pid_type() == PidState::kPidVideoPes))) {
-
369  ++num_es;
-
370  if (iter->second->config())
-
371  all_stream_info.push_back(iter->second->config());
-
372  }
-
373  }
-
374  if (num_es && (all_stream_info.size() == num_es)) {
-
375  // All stream configurations have been received. Initialization can
-
376  // be completed.
-
377  init_cb_.Run(all_stream_info);
-
378  DVLOG(1) << "Mpeg2TS stream parser initialization done";
-
379  is_initialized_ = true;
-
380  }
-
381  return true;
-
382 }
-
383 
-
384 void Mp2tMediaParser::OnEmitSample(
-
385  uint32_t pes_pid,
-
386  const scoped_refptr<MediaSample>& new_sample) {
-
387  DCHECK(new_sample);
-
388  DVLOG(LOG_LEVEL_ES)
-
389  << "OnEmitSample: "
-
390  << " pid="
-
391  << pes_pid
-
392  << " size="
-
393  << new_sample->data_size()
-
394  << " dts="
-
395  << new_sample->dts()
-
396  << " pts="
-
397  << new_sample->pts();
-
398 
-
399  // Add the sample to the appropriate PID sample queue.
-
400  PidMap::iterator pid_state = pids_.find(pes_pid);
-
401  if (pid_state == pids_.end()) {
-
402  LOG(ERROR) << "PID State for new sample not found (pid = "
-
403  << pes_pid << ").";
-
404  return;
-
405  }
-
406  pid_state->second->sample_queue().push_back(new_sample);
-
407 }
-
408 
-
409 bool Mp2tMediaParser::EmitRemainingSamples() {
-
410  DVLOG(LOG_LEVEL_ES) << "Mp2tMediaParser::EmitRemainingBuffers";
-
411 
-
412  // No buffer should be sent until fully initialized.
-
413  if (!is_initialized_)
-
414  return true;
-
415 
-
416  // Buffer emission.
-
417  for (PidMap::const_iterator pid_iter = pids_.begin(); pid_iter != pids_.end();
-
418  ++pid_iter) {
-
419  SampleQueue& sample_queue = pid_iter->second->sample_queue();
-
420  for (SampleQueue::iterator sample_iter = sample_queue.begin();
-
421  sample_iter != sample_queue.end();
-
422  ++sample_iter) {
-
423  if (!new_sample_cb_.Run(pid_iter->first, *sample_iter)) {
-
424  // Error processing sample. Propagate error condition.
-
425  return false;
-
426  }
-
427  }
-
428  sample_queue.clear();
-
429  }
-
430 
-
431  return true;
-
432 }
-
433 
-
434 } // namespace mp2t
-
435 } // namespace media
-
436 } // namespace shaka
-
void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
-
bool Flush() override WARN_UNUSED_RESULT
+
316  base::Bind(&Mp2tMediaParser::OnEmitSample,
+
317  base::Unretained(this)),
+
318  sbr_in_mimetype_));
+
319  is_audio = true;
+
320  } else {
+
321  return;
+
322  }
+
323 
+
324  // Create the PES state here.
+
325  DVLOG(1) << "Create a new PES state";
+
326  std::unique_ptr<TsSection> pes_section_parser(
+
327  new TsSectionPes(std::move(es_parser)));
+
328  PidState::PidType pid_type =
+
329  is_audio ? PidState::kPidAudioPes : PidState::kPidVideoPes;
+
330  std::unique_ptr<PidState> pes_pid_state(
+
331  new PidState(pes_pid, pid_type, std::move(pes_section_parser)));
+
332  pes_pid_state->Enable();
+
333  pids_.insert(std::pair<int, std::unique_ptr<PidState>>(
+
334  pes_pid, std::move(pes_pid_state)));
+
335 }
+
336 
+
337 void Mp2tMediaParser::OnNewStreamInfo(
+
338  const std::shared_ptr<StreamInfo>& new_stream_info) {
+
339  DCHECK(new_stream_info);
+
340  DVLOG(1) << "OnVideoConfigChanged for pid=" << new_stream_info->track_id();
+
341 
+
342  PidMap::iterator pid_state = pids_.find(new_stream_info->track_id());
+
343  if (pid_state == pids_.end()) {
+
344  LOG(ERROR) << "PID State for new stream not found (pid = "
+
345  << new_stream_info->track_id() << ").";
+
346  return;
+
347  }
+
348 
+
349  // Set the stream configuration information for the PID.
+
350  pid_state->second->set_config(new_stream_info);
+
351 
+
352  // Finish initialization if all streams have configs.
+
353  FinishInitializationIfNeeded();
+
354 }
+
355 
+
356 bool Mp2tMediaParser::FinishInitializationIfNeeded() {
+
357  // Nothing to be done if already initialized.
+
358  if (is_initialized_)
+
359  return true;
+
360 
+
361  // Wait for more data to come to finish initialization.
+
362  if (pids_.empty())
+
363  return true;
+
364 
+
365  std::vector<std::shared_ptr<StreamInfo>> all_stream_info;
+
366  uint32_t num_es(0);
+
367  for (PidMap::const_iterator iter = pids_.begin(); iter != pids_.end();
+
368  ++iter) {
+
369  if (((iter->second->pid_type() == PidState::kPidAudioPes) ||
+
370  (iter->second->pid_type() == PidState::kPidVideoPes))) {
+
371  ++num_es;
+
372  if (iter->second->config())
+
373  all_stream_info.push_back(iter->second->config());
+
374  }
+
375  }
+
376  if (num_es && (all_stream_info.size() == num_es)) {
+
377  // All stream configurations have been received. Initialization can
+
378  // be completed.
+
379  init_cb_.Run(all_stream_info);
+
380  DVLOG(1) << "Mpeg2TS stream parser initialization done";
+
381  is_initialized_ = true;
+
382  }
+
383  return true;
+
384 }
+
385 
+
386 void Mp2tMediaParser::OnEmitSample(
+
387  uint32_t pes_pid,
+
388  const std::shared_ptr<MediaSample>& new_sample) {
+
389  DCHECK(new_sample);
+
390  DVLOG(LOG_LEVEL_ES)
+
391  << "OnEmitSample: "
+
392  << " pid="
+
393  << pes_pid
+
394  << " size="
+
395  << new_sample->data_size()
+
396  << " dts="
+
397  << new_sample->dts()
+
398  << " pts="
+
399  << new_sample->pts();
+
400 
+
401  // Add the sample to the appropriate PID sample queue.
+
402  PidMap::iterator pid_state = pids_.find(pes_pid);
+
403  if (pid_state == pids_.end()) {
+
404  LOG(ERROR) << "PID State for new sample not found (pid = "
+
405  << pes_pid << ").";
+
406  return;
+
407  }
+
408  pid_state->second->sample_queue().push_back(new_sample);
+
409 }
+
410 
+
411 bool Mp2tMediaParser::EmitRemainingSamples() {
+
412  DVLOG(LOG_LEVEL_ES) << "Mp2tMediaParser::EmitRemainingBuffers";
+
413 
+
414  // No buffer should be sent until fully initialized.
+
415  if (!is_initialized_)
+
416  return true;
+
417 
+
418  // Buffer emission.
+
419  for (PidMap::const_iterator pid_iter = pids_.begin(); pid_iter != pids_.end();
+
420  ++pid_iter) {
+
421  SampleQueue& sample_queue = pid_iter->second->sample_queue();
+
422  for (SampleQueue::iterator sample_iter = sample_queue.begin();
+
423  sample_iter != sample_queue.end();
+
424  ++sample_iter) {
+
425  if (!new_sample_cb_.Run(pid_iter->first, *sample_iter)) {
+
426  // Error processing sample. Propagate error condition.
+
427  return false;
+
428  }
+
429  }
+
430  sample_queue.clear();
+
431  }
+
432 
+
433  return true;
+
434 }
+
435 
+
436 } // namespace mp2t
+
437 } // namespace media
+
438 } // namespace shaka
+
void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
+
bool Flush() override WARN_UNUSED_RESULT
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:30
-
bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
+
bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
diff --git a/docs/d1/d79/classshaka_1_1media_1_1H265VideoSliceHeaderParser.html b/docs/d1/d79/classshaka_1_1media_1_1H265VideoSliceHeaderParser.html index 87ab48c901..396a6cf278 100644 --- a/docs/d1/d79/classshaka_1_1media_1_1H265VideoSliceHeaderParser.html +++ b/docs/d1/d79/classshaka_1_1media_1_1H265VideoSliceHeaderParser.html @@ -152,7 +152,7 @@ int64_t  diff --git a/docs/d1/d7d/webm__video__client_8cc_source.html b/docs/d1/d7d/webm__video__client_8cc_source.html index 28f5a1cbe6..f2f942fd6c 100644 --- a/docs/d1/d7d/webm__video__client_8cc_source.html +++ b/docs/d1/d7d/webm__video__client_8cc_source.html @@ -136,7 +136,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
47  alpha_mode_ = -1;
48 }
49 
-
50 scoped_refptr<VideoStreamInfo> WebMVideoClient::GetVideoStreamInfo(
+
50 std::shared_ptr<VideoStreamInfo> WebMVideoClient::GetVideoStreamInfo(
51  int64_t track_num,
52  const std::string& codec_id,
53  const std::vector<uint8_t>& codec_private,
@@ -153,11 +153,11 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
64  video_codec = kCodecVP10;
65  } else {
66  LOG(ERROR) << "Unsupported video codec_id " << codec_id;
-
67  return scoped_refptr<VideoStreamInfo>();
+
67  return std::shared_ptr<VideoStreamInfo>();
68  }
69 
70  if (pixel_width_ <= 0 || pixel_height_ <= 0)
-
71  return scoped_refptr<VideoStreamInfo>();
+
71  return std::shared_ptr<VideoStreamInfo>();
72 
73  // Set crop and display unit defaults if these elements are not present.
74  if (crop_bottom_ == -1)
@@ -185,10 +185,10 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
96  display_height_ = height_after_crop;
97  } else if (display_unit_ == 3) {
98  if (display_width_ <= 0 || display_height_ <= 0)
-
99  return scoped_refptr<VideoStreamInfo>();
+
99  return std::shared_ptr<VideoStreamInfo>();
100  } else {
101  LOG(ERROR) << "Unsupported display unit type " << display_unit_;
-
102  return scoped_refptr<VideoStreamInfo>();
+
102  return std::shared_ptr<VideoStreamInfo>();
103  }
104  // Calculate sample aspect ratio.
105  int64_t sar_x = display_width_ * height_after_crop;
@@ -197,10 +197,10 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
108  sar_x /= gcd;
109  sar_y /= gcd;
110 
-
111  return scoped_refptr<VideoStreamInfo>(new VideoStreamInfo(
+
111  return std::make_shared<VideoStreamInfo>(
112  track_num, kWebMTimeScale, 0, video_codec, std::string(),
113  codec_private.data(), codec_private.size(), width_after_crop,
-
114  height_after_crop, sar_x, sar_y, 0, 0, std::string(), is_encrypted));
+
114  height_after_crop, sar_x, sar_y, 0, 0, std::string(), is_encrypted);
115 }
116 
117 bool WebMVideoClient::OnUInt(int id, int64_t val) {
@@ -263,13 +263,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
174 
175 } // namespace media
176 } // namespace shaka
+
std::shared_ptr< VideoStreamInfo > GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)
void Reset()
Reset this object's state so it can process a new video track element.
-
scoped_refptr< VideoStreamInfo > GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)
-
Holds video stream information.
diff --git a/docs/d1/d81/structshaka_1_1media_1_1H265ReferencePictureSet-members.html b/docs/d1/d81/structshaka_1_1media_1_1H265ReferencePictureSet-members.html index 6705dde05a..3de70d5024 100644 --- a/docs/d1/d81/structshaka_1_1media_1_1H265ReferencePictureSet-members.html +++ b/docs/d1/d81/structshaka_1_1media_1_1H265ReferencePictureSet-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d82/adts__constants_8h_source.html b/docs/d1/d82/adts__constants_8h_source.html index 8b1192341f..7f6315beac 100644 --- a/docs/d1/d82/adts__constants_8h_source.html +++ b/docs/d1/d82/adts__constants_8h_source.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d82/classshaka_1_1media_1_1WebMParserClient-members.html b/docs/d1/d82/classshaka_1_1media_1_1WebMParserClient-members.html index d2cc6aa33f..d22bdcec57 100644 --- a/docs/d1/d82/classshaka_1_1media_1_1WebMParserClient-members.html +++ b/docs/d1/d82/classshaka_1_1media_1_1WebMParserClient-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d86/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter-members.html b/docs/d1/d86/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter-members.html index 480bc9cd89..b531df15d3 100644 --- a/docs/d1/d86/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter-members.html +++ b/docs/d1/d86/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter-members.html @@ -93,12 +93,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

This is the complete list of members for shaka::media::mp4::KeyRotationFragmenter, including all inherited members.

- + - + @@ -107,10 +107,10 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + - + @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
AddSample(scoped_refptr< MediaSample > sample) overrideshaka::media::mp4::EncryptingFragmentervirtual
AddSample(std::shared_ptr< MediaSample > sample) overrideshaka::media::mp4::EncryptingFragmentervirtual
CreateEncryptor()shaka::media::mp4::EncryptingFragmenterprotected
crypt_byte_block() const (defined in shaka::media::mp4::EncryptingFragmenter)shaka::media::mp4::EncryptingFragmenterinlineprotected
data() (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
earliest_presentation_time() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
EncryptingFragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)shaka::media::mp4::EncryptingFragmenter
EncryptingFragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)shaka::media::mp4::EncryptingFragmenter
encryption_key() const (defined in shaka::media::mp4::EncryptingFragmenter)shaka::media::mp4::EncryptingFragmenterinlineprotected
encryptor() (defined in shaka::media::mp4::EncryptingFragmenter)shaka::media::mp4::EncryptingFragmenterinlineprotected
FinalizeFragment() overrideshaka::media::mp4::EncryptingFragmentervirtual
fragment_duration() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
fragment_finalized() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
fragment_initialized() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
Fragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf)shaka::media::mp4::Fragmenter
Fragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf)shaka::media::mp4::Fragmenter
GenerateSegmentReference(SegmentReference *reference)shaka::media::mp4::Fragmenter
InitializeFragment(int64_t first_sample_dts) overrideshaka::media::mp4::EncryptingFragmentervirtual
KeyRotationFragmenter(MovieFragment *moof, scoped_refptr< StreamInfo > info, TrackFragment *traf, KeySource *encryption_key_source, KeySource::TrackType track_type, int64_t crypto_period_duration, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *muxer_listener)shaka::media::mp4::KeyRotationFragmenter
KeyRotationFragmenter(MovieFragment *moof, std::shared_ptr< StreamInfo > info, TrackFragment *traf, KeySource *encryption_key_source, KeySource::TrackType track_type, int64_t crypto_period_duration, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *muxer_listener)shaka::media::mp4::KeyRotationFragmenter
OptimizeSampleEntries(std::vector< T > *entries, T *default_value)shaka::media::mp4::Fragmenterprotected
PrepareFragmentForEncryption(bool enable_encryption) overrideshaka::media::mp4::KeyRotationFragmenterprotectedvirtual
protection_scheme() const (defined in shaka::media::mp4::EncryptingFragmenter)shaka::media::mp4::EncryptingFragmenterinlineprotected
diff --git a/docs/d1/d8e/webm__audio__client_8cc_source.html b/docs/d1/d8e/webm__audio__client_8cc_source.html index eccd98368d..7857c39dfd 100644 --- a/docs/d1/d8e/webm__audio__client_8cc_source.html +++ b/docs/d1/d8e/webm__audio__client_8cc_source.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
28  output_samples_per_second_ = -1;
29 }
30 
-
31 scoped_refptr<AudioStreamInfo> WebMAudioClient::GetAudioStreamInfo(
+
31 std::shared_ptr<AudioStreamInfo> WebMAudioClient::GetAudioStreamInfo(
32  int64_t track_num,
33  const std::string& codec_id,
34  const std::vector<uint8_t>& codec_private,
@@ -132,11 +132,11 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
43  audio_codec = kCodecOpus;
44  } else {
45  LOG(ERROR) << "Unsupported audio codec_id " << codec_id;
-
46  return scoped_refptr<AudioStreamInfo>();
+
46  return std::shared_ptr<AudioStreamInfo>();
47  }
48 
49  if (samples_per_second_ <= 0)
-
50  return scoped_refptr<AudioStreamInfo>();
+
50  return std::shared_ptr<AudioStreamInfo>();
51 
52  // Set channel layout default if a Channels element was not present.
53  if (channels_ == -1)
@@ -157,12 +157,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
68  }
69 
70  const uint8_t kSampleSizeInBits = 16u;
-
71  return scoped_refptr<AudioStreamInfo>(new AudioStreamInfo(
+
71  return std::make_shared<AudioStreamInfo>(
72  track_num, kWebMTimeScale, 0, audio_codec,
73  AudioStreamInfo::GetCodecString(audio_codec, 0), codec_config,
74  codec_config_size, kSampleSizeInBits, channels_, sampling_frequency,
75  seek_preroll < 0 ? 0 : seek_preroll, codec_delay < 0 ? 0 : codec_delay, 0,
-
76  0, language, is_encrypted));
+
76  0, language, is_encrypted);
77 }
78 
79 bool WebMAudioClient::OnUInt(int id, int64_t val) {
@@ -207,14 +207,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
118 
119 } // namespace media
120 } // namespace shaka
+
std::shared_ptr< AudioStreamInfo > GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted)
static std::string GetCodecString(Codec codec, uint8_t audio_object_type)
void Reset()
Reset this object's state so it can process a new audio track element.
-
Holds audio stream information.
-
scoped_refptr< AudioStreamInfo > GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted)
diff --git a/docs/d1/d8f/retired__flags_8h_source.html b/docs/d1/d8f/retired__flags_8h_source.html index d46a9257e9..392d922dbb 100644 --- a/docs/d1/d8f/retired__flags_8h_source.html +++ b/docs/d1/d8f/retired__flags_8h_source.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d91/classshaka_1_1media_1_1H26xBitReader-members.html b/docs/d1/d91/classshaka_1_1media_1_1H26xBitReader-members.html index 6de049e0ee..98b4228ec4 100644 --- a/docs/d1/d91/classshaka_1_1media_1_1H26xBitReader-members.html +++ b/docs/d1/d91/classshaka_1_1media_1_1H26xBitReader-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d9d/classshaka_1_1media_1_1ByteQueue-members.html b/docs/d1/d9d/classshaka_1_1media_1_1ByteQueue-members.html index 856cc1ab5c..f326c4f933 100644 --- a/docs/d1/d9d/classshaka_1_1media_1_1ByteQueue-members.html +++ b/docs/d1/d9d/classshaka_1_1media_1_1ByteQueue-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d9d/tracks__builder_8h_source.html b/docs/d1/d9d/tracks__builder_8h_source.html index 6fadbe6d63..ed7a6dc56b 100644 --- a/docs/d1/d9d/tracks__builder_8h_source.html +++ b/docs/d1/d9d/tracks__builder_8h_source.html @@ -210,7 +210,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d9e/structshaka_1_1media_1_1mp4_1_1CodecConfiguration-members.html b/docs/d1/d9e/structshaka_1_1media_1_1mp4_1_1CodecConfiguration-members.html index 7dac90b815..a9a6929686 100644 --- a/docs/d1/d9e/structshaka_1_1media_1_1mp4_1_1CodecConfiguration-members.html +++ b/docs/d1/d9e/structshaka_1_1media_1_1mp4_1_1CodecConfiguration-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/da1/classshaka_1_1media_1_1mp4_1_1BoxBuffer.html b/docs/d1/da1/classshaka_1_1media_1_1mp4_1_1BoxBuffer.html index 68cd07eea1..fb08a4ca25 100644 --- a/docs/d1/da1/classshaka_1_1media_1_1mp4_1_1BoxBuffer.html +++ b/docs/d1/da1/classshaka_1_1media_1_1mp4_1_1BoxBuffer.html @@ -589,7 +589,7 @@ bool ReadWriteInt64 (i diff --git a/docs/d1/da1/structshaka_1_1media_1_1wvm_1_1DemuxStreamIdMediaSample.html b/docs/d1/da1/structshaka_1_1media_1_1wvm_1_1DemuxStreamIdMediaSample.html index a1140351ec..05bd29682b 100644 --- a/docs/d1/da1/structshaka_1_1media_1_1wvm_1_1DemuxStreamIdMediaSample.html +++ b/docs/d1/da1/structshaka_1_1media_1_1wvm_1_1DemuxStreamIdMediaSample.html @@ -102,9 +102,9 @@ uint32_t demux_stream_id uint32_t parsed_audio_or_video_stream_id   - -scoped_refptr< MediaSamplemedia_sample -  + +std::shared_ptr< MediaSamplemedia_sample

Detailed Description

@@ -116,7 +116,7 @@ scoped_refptr< diff --git a/docs/d1/da2/classshaka_1_1media_1_1NalUnitToByteStreamConverter-members.html b/docs/d1/da2/classshaka_1_1media_1_1NalUnitToByteStreamConverter-members.html index 5ce4835bfc..3c06087daa 100644 --- a/docs/d1/da2/classshaka_1_1media_1_1NalUnitToByteStreamConverter-members.html +++ b/docs/d1/da2/classshaka_1_1media_1_1NalUnitToByteStreamConverter-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
diff --git a/docs/d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html b/docs/d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html index 6d5de1b7c7..bd1e89a23d 100644 --- a/docs/d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html +++ b/docs/d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html @@ -306,7 +306,7 @@ bool video_full_range_flag diff --git a/docs/d1/dad/classshaka_1_1media_1_1Demuxer-members.html b/docs/d1/dad/classshaka_1_1media_1_1Demuxer-members.html index 03c498f993..488cd7e7aa 100644 --- a/docs/d1/dad/classshaka_1_1media_1_1Demuxer-members.html +++ b/docs/d1/dad/classshaka_1_1media_1_1Demuxer-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/db0/structshaka_1_1media_1_1mp4_1_1VideoMediaHeader.html b/docs/d1/db0/structshaka_1_1media_1_1mp4_1_1VideoMediaHeader.html index f1bb7cbbcd..d60fdaba8c 100644 --- a/docs/d1/db0/structshaka_1_1media_1_1mp4_1_1VideoMediaHeader.html +++ b/docs/d1/db0/structshaka_1_1media_1_1mp4_1_1VideoMediaHeader.html @@ -191,7 +191,7 @@ Additional Inherited Members diff --git a/docs/d1/db2/decoder__configuration__record_8h_source.html b/docs/d1/db2/decoder__configuration__record_8h_source.html index 5d0d1a5391..2a6e28ff69 100644 --- a/docs/d1/db2/decoder__configuration__record_8h_source.html +++ b/docs/d1/db2/decoder__configuration__record_8h_source.html @@ -166,7 +166,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/dbe/classshaka_1_1media_1_1PlayReadyKeySource-members.html b/docs/d1/dbe/classshaka_1_1media_1_1PlayReadyKeySource-members.html index 49b4483f21..ba99d540c1 100644 --- a/docs/d1/dbe/classshaka_1_1media_1_1PlayReadyKeySource-members.html +++ b/docs/d1/dbe/classshaka_1_1media_1_1PlayReadyKeySource-members.html @@ -121,7 +121,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/dc2/h26x__bit__reader_8h_source.html b/docs/d1/dc2/h26x__bit__reader_8h_source.html index 0b486c8a2e..ca6ca8d35f 100644 --- a/docs/d1/dc2/h26x__bit__reader_8h_source.html +++ b/docs/d1/dc2/h26x__bit__reader_8h_source.html @@ -192,7 +192,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/dcb/encrypting__fragmenter_8h_source.html b/docs/d1/dcb/encrypting__fragmenter_8h_source.html index 0890b11570..b1339e9dfd 100644 --- a/docs/d1/dcb/encrypting__fragmenter_8h_source.html +++ b/docs/d1/dcb/encrypting__fragmenter_8h_source.html @@ -97,105 +97,104 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
8 #define MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_
9 
10 #include <memory>
-
11 #include "packager/base/memory/ref_counted.h"
-
12 #include "packager/media/base/fourccs.h"
-
13 #include "packager/media/codecs/video_slice_header_parser.h"
-
14 #include "packager/media/codecs/vpx_parser.h"
-
15 #include "packager/media/event/muxer_listener.h"
-
16 #include "packager/media/formats/mp4/fragmenter.h"
-
17 
-
18 namespace shaka {
-
19 namespace media {
-
20 
-
21 class AesCryptor;
-
22 class StreamInfo;
-
23 struct EncryptionKey;
-
24 
-
25 namespace mp4 {
-
26 
- -
29  public:
-
41  EncryptingFragmenter(scoped_refptr<StreamInfo> info,
-
42  TrackFragment* traf,
-
43  std::unique_ptr<EncryptionKey> encryption_key,
-
44  int64_t clear_time,
-
45  FourCC protection_scheme,
-
46  uint8_t crypt_byte_block,
-
47  uint8_t skip_byte_block,
-
48  MuxerListener* listener);
-
49 
-
50  ~EncryptingFragmenter() override;
-
51 
-
54  Status AddSample(scoped_refptr<MediaSample> sample) override;
-
55  Status InitializeFragment(int64_t first_sample_dts) override;
-
56  void FinalizeFragment() override;
-
58 
-
59  protected:
-
62  virtual Status PrepareFragmentForEncryption(bool enable_encryption);
-
64  virtual void FinalizeFragmentForEncryption();
-
65 
- -
70 
-
71  const EncryptionKey* encryption_key() const { return encryption_key_.get(); }
-
72  AesCryptor* encryptor() { return encryptor_.get(); }
-
73  FourCC protection_scheme() const { return protection_scheme_; }
-
74  uint8_t crypt_byte_block() const { return crypt_byte_block_; }
-
75  uint8_t skip_byte_block() const { return skip_byte_block_; }
-
76 
-
77  void set_encryption_key(std::unique_ptr<EncryptionKey> encryption_key) {
-
78  encryption_key_ = std::move(encryption_key);
-
79  }
-
80 
-
81  private:
-
82  void EncryptBytes(uint8_t* data, size_t size);
-
83  Status EncryptSample(scoped_refptr<MediaSample> sample);
-
84 
-
85  // Should we enable subsample encryption?
-
86  bool IsSubsampleEncryptionRequired();
-
87 
-
88  scoped_refptr<StreamInfo> info_;
-
89  std::unique_ptr<EncryptionKey> encryption_key_;
-
90  std::unique_ptr<AesCryptor> encryptor_;
-
91  // If this stream contains AVC, subsample encryption specifies that the size
-
92  // and type of NAL units remain unencrypted. This function returns the size of
-
93  // the size field in bytes. Can be 1, 2 or 4 bytes.
-
94  const uint8_t nalu_length_size_;
-
95  const Codec video_codec_;
-
96  int64_t clear_time_;
-
97  const FourCC protection_scheme_;
-
98  const uint8_t crypt_byte_block_;
-
99  const uint8_t skip_byte_block_;
-
100  MuxerListener* listener_;
-
101 
-
102  std::unique_ptr<VPxParser> vpx_parser_;
-
103  std::unique_ptr<VideoSliceHeaderParser> header_parser_;
-
104 
-
105  DISALLOW_COPY_AND_ASSIGN(EncryptingFragmenter);
-
106 };
-
107 
-
108 } // namespace mp4
-
109 } // namespace media
-
110 } // namespace shaka
-
111 
-
112 #endif // MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_
-
Status AddSample(scoped_refptr< MediaSample > sample) override
+
11 #include "packager/media/base/fourccs.h"
+
12 #include "packager/media/codecs/video_slice_header_parser.h"
+
13 #include "packager/media/codecs/vpx_parser.h"
+
14 #include "packager/media/event/muxer_listener.h"
+
15 #include "packager/media/formats/mp4/fragmenter.h"
+
16 
+
17 namespace shaka {
+
18 namespace media {
+
19 
+
20 class AesCryptor;
+
21 class StreamInfo;
+
22 struct EncryptionKey;
+
23 
+
24 namespace mp4 {
+
25 
+ +
28  public:
+
40  EncryptingFragmenter(std::shared_ptr<StreamInfo> info,
+
41  TrackFragment* traf,
+
42  std::unique_ptr<EncryptionKey> encryption_key,
+
43  int64_t clear_time,
+
44  FourCC protection_scheme,
+
45  uint8_t crypt_byte_block,
+
46  uint8_t skip_byte_block,
+
47  MuxerListener* listener);
+
48 
+
49  ~EncryptingFragmenter() override;
+
50 
+
53  Status AddSample(std::shared_ptr<MediaSample> sample) override;
+
54  Status InitializeFragment(int64_t first_sample_dts) override;
+
55  void FinalizeFragment() override;
+
57 
+
58  protected:
+
61  virtual Status PrepareFragmentForEncryption(bool enable_encryption);
+
63  virtual void FinalizeFragmentForEncryption();
+
64 
+ +
69 
+
70  const EncryptionKey* encryption_key() const { return encryption_key_.get(); }
+
71  AesCryptor* encryptor() { return encryptor_.get(); }
+
72  FourCC protection_scheme() const { return protection_scheme_; }
+
73  uint8_t crypt_byte_block() const { return crypt_byte_block_; }
+
74  uint8_t skip_byte_block() const { return skip_byte_block_; }
+
75 
+
76  void set_encryption_key(std::unique_ptr<EncryptionKey> encryption_key) {
+
77  encryption_key_ = std::move(encryption_key);
+
78  }
+
79 
+
80  private:
+
81  void EncryptBytes(uint8_t* data, size_t size);
+
82  Status EncryptSample(std::shared_ptr<MediaSample> sample);
+
83 
+
84  // Should we enable subsample encryption?
+
85  bool IsSubsampleEncryptionRequired();
+
86 
+
87  std::shared_ptr<StreamInfo> info_;
+
88  std::unique_ptr<EncryptionKey> encryption_key_;
+
89  std::unique_ptr<AesCryptor> encryptor_;
+
90  // If this stream contains AVC, subsample encryption specifies that the size
+
91  // and type of NAL units remain unencrypted. This function returns the size of
+
92  // the size field in bytes. Can be 1, 2 or 4 bytes.
+
93  const uint8_t nalu_length_size_;
+
94  const Codec video_codec_;
+
95  int64_t clear_time_;
+
96  const FourCC protection_scheme_;
+
97  const uint8_t crypt_byte_block_;
+
98  const uint8_t skip_byte_block_;
+
99  MuxerListener* listener_;
+
100 
+
101  std::unique_ptr<VPxParser> vpx_parser_;
+
102  std::unique_ptr<VideoSliceHeaderParser> header_parser_;
+
103 
+
104  DISALLOW_COPY_AND_ASSIGN(EncryptingFragmenter);
+
105 };
+
106 
+
107 } // namespace mp4
+
108 } // namespace media
+
109 } // namespace shaka
+
110 
+
111 #endif // MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_
Status InitializeFragment(int64_t first_sample_dts) override
+
EncryptingFragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)
void FinalizeFragment() override
Finalize and optimize the fragment.
+
Status AddSample(std::shared_ptr< MediaSample > sample) override
virtual void FinalizeFragmentForEncryption()
Finalize current fragment for encryption.
- + -
EncryptingFragmenter generates MP4 fragments with sample encrypted.
+
EncryptingFragmenter generates MP4 fragments with sample encrypted.
virtual Status PrepareFragmentForEncryption(bool enable_encryption)
-
EncryptingFragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)
diff --git a/docs/d1/dd5/classshaka_1_1media_1_1Cluster.html b/docs/d1/dd5/classshaka_1_1media_1_1Cluster.html index 93b2ef40ea..5a320d6e38 100644 --- a/docs/d1/dd5/classshaka_1_1media_1_1Cluster.html +++ b/docs/d1/dd5/classshaka_1_1media_1_1Cluster.html @@ -116,7 +116,7 @@ int size () const diff --git a/docs/d1/dd6/structshaka_1_1media_1_1mp4_1_1DataInformation-members.html b/docs/d1/dd6/structshaka_1_1media_1_1mp4_1_1DataInformation-members.html index 680b836647..64e080943d 100644 --- a/docs/d1/dd6/structshaka_1_1media_1_1mp4_1_1DataInformation-members.html +++ b/docs/d1/dd6/structshaka_1_1media_1_1mp4_1_1DataInformation-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/de2/classshaka_1_1media_1_1VideoStreamInfo-members.html b/docs/d1/de2/classshaka_1_1media_1_1VideoStreamInfo-members.html index 7d035e0578..138506b535 100644 --- a/docs/d1/de2/classshaka_1_1media_1_1VideoStreamInfo-members.html +++ b/docs/d1/de2/classshaka_1_1media_1_1VideoStreamInfo-members.html @@ -123,11 +123,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); trick_play_rate() const (defined in shaka::media::VideoStreamInfo)shaka::media::VideoStreamInfoinline VideoStreamInfo(int track_id, uint32_t time_scale, uint64_t duration, Codec codec, const std::string &codec_string, const uint8_t *codec_config, size_t codec_config_size, uint16_t width, uint16_t height, uint32_t pixel_width, uint32_t pixel_height, int16_t trick_play_rate, uint8_t nalu_length_size, const std::string &language, bool is_encrypted)shaka::media::VideoStreamInfo width() const (defined in shaka::media::VideoStreamInfo)shaka::media::VideoStreamInfoinline - ~StreamInfo() (defined in shaka::media::StreamInfo)shaka::media::StreamInfoprotectedvirtual + ~StreamInfo() (defined in shaka::media::StreamInfo)shaka::media::StreamInfovirtual + ~VideoStreamInfo() override (defined in shaka::media::VideoStreamInfo)shaka::media::VideoStreamInfo diff --git a/docs/d1/de2/composition__offset__iterator_8cc_source.html b/docs/d1/de2/composition__offset__iterator_8cc_source.html index f0e78b2a99..ddbd326c4f 100644 --- a/docs/d1/de2/composition__offset__iterator_8cc_source.html +++ b/docs/d1/de2/composition__offset__iterator_8cc_source.html @@ -159,7 +159,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/de4/classshaka_1_1media_1_1KeyFetcher-members.html b/docs/d1/de4/classshaka_1_1media_1_1KeyFetcher-members.html index 5d05716a59..ff66e0217c 100644 --- a/docs/d1/de4/classshaka_1_1media_1_1KeyFetcher-members.html +++ b/docs/d1/de4/classshaka_1_1media_1_1KeyFetcher-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/de7/classshaka_1_1xml_1_1AdaptationSetXmlNode.html b/docs/d1/de7/classshaka_1_1xml_1_1AdaptationSetXmlNode.html index dad8ac0ae1..166df2064f 100644 --- a/docs/d1/de7/classshaka_1_1xml_1_1AdaptationSetXmlNode.html +++ b/docs/d1/de7/classshaka_1_1xml_1_1AdaptationSetXmlNode.html @@ -199,7 +199,7 @@ Additional Inherited Members diff --git a/docs/d1/de7/structshaka_1_1media_1_1H265ReferencePictureListModifications-members.html b/docs/d1/de7/structshaka_1_1media_1_1H265ReferencePictureListModifications-members.html index f120f33c13..ebeceed5ed 100644 --- a/docs/d1/de7/structshaka_1_1media_1_1H265ReferencePictureListModifications-members.html +++ b/docs/d1/de7/structshaka_1_1media_1_1H265ReferencePictureListModifications-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/de9/classshaka_1_1media_1_1ProgressListener-members.html b/docs/d1/de9/classshaka_1_1media_1_1ProgressListener-members.html index 63de5a5769..54f835b918 100644 --- a/docs/d1/de9/classshaka_1_1media_1_1ProgressListener-members.html +++ b/docs/d1/de9/classshaka_1_1media_1_1ProgressListener-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/dee/classshaka_1_1media_1_1mp4_1_1BoxReader.html b/docs/d1/dee/classshaka_1_1media_1_1mp4_1_1BoxReader.html index 09aba18008..4fe132d5f0 100644 --- a/docs/d1/dee/classshaka_1_1media_1_1mp4_1_1BoxReader.html +++ b/docs/d1/dee/classshaka_1_1media_1_1mp4_1_1BoxReader.html @@ -468,7 +468,7 @@ template<typename T > diff --git a/docs/d1/dee/structshaka_1_1media_1_1mp4_1_1SampleTable.html b/docs/d1/dee/structshaka_1_1media_1_1mp4_1_1SampleTable.html index 356a40174e..85b3f2a9b2 100644 --- a/docs/d1/dee/structshaka_1_1media_1_1mp4_1_1SampleTable.html +++ b/docs/d1/dee/structshaka_1_1media_1_1mp4_1_1SampleTable.html @@ -198,7 +198,7 @@ Additional Inherited Members diff --git a/docs/d1/df0/aes__encryptor_8h_source.html b/docs/d1/df0/aes__encryptor_8h_source.html index b109d50e24..e53099aa7a 100644 --- a/docs/d1/df0/aes__encryptor_8h_source.html +++ b/docs/d1/df0/aes__encryptor_8h_source.html @@ -194,7 +194,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/df3/structshaka_1_1MpdOptions.html b/docs/d1/df3/structshaka_1_1MpdOptions.html index 678f4267c4..c47e31e8a3 100644 --- a/docs/d1/df3/structshaka_1_1MpdOptions.html +++ b/docs/d1/df3/structshaka_1_1MpdOptions.html @@ -136,7 +136,7 @@ std::string default_langua diff --git a/docs/d1/df5/nalu__reader_8cc_source.html b/docs/d1/df5/nalu__reader_8cc_source.html index f518b90979..509a4fb8a7 100644 --- a/docs/d1/df5/nalu__reader_8cc_source.html +++ b/docs/d1/df5/nalu__reader_8cc_source.html @@ -428,7 +428,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/df9/structshaka_1_1media_1_1mp4_1_1VideoMediaHeader-members.html b/docs/d1/df9/structshaka_1_1media_1_1mp4_1_1VideoMediaHeader-members.html index 1b8da3ab15..a1a411580f 100644 --- a/docs/d1/df9/structshaka_1_1media_1_1mp4_1_1VideoMediaHeader-members.html +++ b/docs/d1/df9/structshaka_1_1media_1_1mp4_1_1VideoMediaHeader-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d02/timestamp_8h_source.html b/docs/d2/d02/timestamp_8h_source.html index 1b0e6a6964..cc49f2fa29 100644 --- a/docs/d2/d02/timestamp_8h_source.html +++ b/docs/d2/d02/timestamp_8h_source.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d0b/classshaka_1_1media_1_1SeekHead-members.html b/docs/d2/d0b/classshaka_1_1media_1_1SeekHead-members.html index e3da63202f..62d5ca58aa 100644 --- a/docs/d2/d0b/classshaka_1_1media_1_1SeekHead-members.html +++ b/docs/d2/d0b/classshaka_1_1media_1_1SeekHead-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d0f/classshaka_1_1MpdBuilder-members.html b/docs/d2/d0f/classshaka_1_1MpdBuilder-members.html index d3dbe6d075..3488183a40 100644 --- a/docs/d2/d0f/classshaka_1_1MpdBuilder-members.html +++ b/docs/d2/d0f/classshaka_1_1MpdBuilder-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d0f/structshaka_1_1media_1_1wvm_1_1PrevSampleData.html b/docs/d2/d0f/structshaka_1_1media_1_1wvm_1_1PrevSampleData.html index 14bab9f84d..b9e6f46c49 100644 --- a/docs/d2/d0f/structshaka_1_1media_1_1wvm_1_1PrevSampleData.html +++ b/docs/d2/d0f/structshaka_1_1media_1_1wvm_1_1PrevSampleData.html @@ -103,12 +103,12 @@ void Reset () - - - - + + + + @@ -132,7 +132,7 @@ int64_t 

Public Attributes

-scoped_refptr< MediaSampleaudio_sample
 
-scoped_refptr< MediaSamplevideo_sample
 
+std::shared_ptr< MediaSampleaudio_sample
 
+std::shared_ptr< MediaSamplevideo_sample
 
uint32_t audio_stream_id
 
video_sample_durat diff --git a/docs/d2/d11/classshaka_1_1media_1_1MuxerListener-members.html b/docs/d2/d11/classshaka_1_1media_1_1MuxerListener-members.html index dbc7665984..9d9f55afe5 100644 --- a/docs/d2/d11/classshaka_1_1media_1_1MuxerListener-members.html +++ b/docs/d2/d11/classshaka_1_1media_1_1MuxerListener-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
diff --git a/docs/d2/d17/ts__section__pat_8cc_source.html b/docs/d2/d17/ts__section__pat_8cc_source.html index 38e675b6f7..4b1381806d 100644 --- a/docs/d2/d17/ts__section__pat_8cc_source.html +++ b/docs/d2/d17/ts__section__pat_8cc_source.html @@ -214,7 +214,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d23/threaded__io__file_8cc_source.html b/docs/d2/d23/threaded__io__file_8cc_source.html index 8d63f2bd6d..8e85736079 100644 --- a/docs/d2/d23/threaded__io__file_8cc_source.html +++ b/docs/d2/d23/threaded__io__file_8cc_source.html @@ -317,7 +317,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d24/packager__util_8h_source.html b/docs/d2/d24/packager__util_8h_source.html index 5e04c4e4a6..988e67624d 100644 --- a/docs/d2/d24/packager__util_8h_source.html +++ b/docs/d2/d24/packager__util_8h_source.html @@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html b/docs/d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html index 90ac1a5627..b8fb51ec4b 100644 --- a/docs/d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html +++ b/docs/d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html @@ -108,13 +108,13 @@ Inheritance diagram for shaka::media::mp4::KeyRotationFragmenter: - - + + - - - - + + + + - - + + @@ -192,7 +192,7 @@ void 

Public Member Functions

 KeyRotationFragmenter (MovieFragment *moof, scoped_refptr< StreamInfo > info, TrackFragment *traf, KeySource *encryption_key_source, KeySource::TrackType track_type, int64_t crypto_period_duration, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *muxer_listener)
 
 KeyRotationFragmenter (MovieFragment *moof, std::shared_ptr< StreamInfo > info, TrackFragment *traf, KeySource *encryption_key_source, KeySource::TrackType track_type, int64_t crypto_period_duration, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *muxer_listener)
 
- Public Member Functions inherited from shaka::media::mp4::EncryptingFragmenter
 EncryptingFragmenter (scoped_refptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)
 
Status AddSample (scoped_refptr< MediaSample > sample) override
 
 EncryptingFragmenter (std::shared_ptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)
 
Status AddSample (std::shared_ptr< MediaSample > sample) override
 
Status InitializeFragment (int64_t first_sample_dts) override
 
@@ -122,8 +122,8 @@ void  Finalize and optimize the fragment.
 
- Public Member Functions inherited from shaka::media::mp4::Fragmenter
 Fragmenter (scoped_refptr< StreamInfo > info, TrackFragment *traf)
 
 Fragmenter (std::shared_ptr< StreamInfo > info, TrackFragment *traf)
 
void GenerateSegmentReference (SegmentReference *reference)
 Fill reference with current fragment information.
set_encryption_keyDefinition at line 23 of file key_rotation_fragmenter.h.

Constructor & Destructor Documentation

- +
@@ -205,7 +205,7 @@ void  - + @@ -328,7 +328,7 @@ void 
set_encryption_key scoped_refptr< StreamInfostd::shared_ptr< StreamInfo info,
set_encryption_key diff --git a/docs/d2/d30/tracks__builder_8cc_source.html b/docs/d2/d30/tracks__builder_8cc_source.html index b059b9fb9d..f8345b5191 100644 --- a/docs/d2/d30/tracks__builder_8cc_source.html +++ b/docs/d2/d30/tracks__builder_8cc_source.html @@ -486,7 +486,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d33/video__slice__header__parser_8h_source.html b/docs/d2/d33/video__slice__header__parser_8h_source.html index f7e2d993e6..4eeb1e3565 100644 --- a/docs/d2/d33/video__slice__header__parser_8h_source.html +++ b/docs/d2/d33/video__slice__header__parser_8h_source.html @@ -167,7 +167,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d35/classshaka_1_1media_1_1WidevineKeySource-members.html b/docs/d2/d35/classshaka_1_1media_1_1WidevineKeySource-members.html index ec2e8c17f3..9004d869ce 100644 --- a/docs/d2/d35/classshaka_1_1media_1_1WidevineKeySource-members.html +++ b/docs/d2/d35/classshaka_1_1media_1_1WidevineKeySource-members.html @@ -121,7 +121,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
diff --git a/docs/d2/d3c/structshaka_1_1media_1_1mp4_1_1TrackFragmentHeader-members.html b/docs/d2/d3c/structshaka_1_1media_1_1mp4_1_1TrackFragmentHeader-members.html index 124026f6ac..f4ca65dd1b 100644 --- a/docs/d2/d3c/structshaka_1_1media_1_1mp4_1_1TrackFragmentHeader-members.html +++ b/docs/d2/d3c/structshaka_1_1media_1_1mp4_1_1TrackFragmentHeader-members.html @@ -133,7 +133,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
diff --git a/docs/d2/d45/program__map__table__writer_8cc_source.html b/docs/d2/d45/program__map__table__writer_8cc_source.html index 0f73dcaf39..921273ce28 100644 --- a/docs/d2/d45/program__map__table__writer_8cc_source.html +++ b/docs/d2/d45/program__map__table__writer_8cc_source.html @@ -500,7 +500,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d4c/nal__unit__to__byte__stream__converter_8cc_source.html b/docs/d2/d4c/nal__unit__to__byte__stream__converter_8cc_source.html index 91efbcafe0..d68a54a008 100644 --- a/docs/d2/d4c/nal__unit__to__byte__stream__converter_8cc_source.html +++ b/docs/d2/d4c/nal__unit__to__byte__stream__converter_8cc_source.html @@ -379,7 +379,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d4d/file_8h_source.html b/docs/d2/d4d/file_8h_source.html index 9aeaeaffb7..ef8ccc79ab 100644 --- a/docs/d2/d4d/file_8h_source.html +++ b/docs/d2/d4d/file_8h_source.html @@ -191,7 +191,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d4f/structshaka_1_1Element-members.html b/docs/d2/d4f/structshaka_1_1Element-members.html index 60e26162d8..4ef9feb259 100644 --- a/docs/d2/d4f/structshaka_1_1Element-members.html +++ b/docs/d2/d4f/structshaka_1_1Element-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d51/classshaka_1_1MockMpdNotifier-members.html b/docs/d2/d51/classshaka_1_1MockMpdNotifier-members.html index 9547b4eb05..5c96d6410b 100644 --- a/docs/d2/d51/classshaka_1_1MockMpdNotifier-members.html +++ b/docs/d2/d51/classshaka_1_1MockMpdNotifier-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d59/structshaka_1_1media_1_1H264SliceHeader.html b/docs/d2/d59/structshaka_1_1media_1_1H264SliceHeader.html index 380fe6d218..8842a4f5b0 100644 --- a/docs/d2/d59/structshaka_1_1media_1_1H264SliceHeader.html +++ b/docs/d2/d59/structshaka_1_1media_1_1H264SliceHeader.html @@ -276,7 +276,7 @@ int slice_beta_offset_div2 diff --git a/docs/d2/d5b/classshaka_1_1media_1_1KeySource-members.html b/docs/d2/d5b/classshaka_1_1media_1_1KeySource-members.html index 72b2b3119a..ba67072dfe 100644 --- a/docs/d2/d5b/classshaka_1_1media_1_1KeySource-members.html +++ b/docs/d2/d5b/classshaka_1_1media_1_1KeySource-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d5c/classshaka_1_1SimpleMpdNotifier-members.html b/docs/d2/d5c/classshaka_1_1SimpleMpdNotifier-members.html index c98378ba36..a544fb64fd 100644 --- a/docs/d2/d5c/classshaka_1_1SimpleMpdNotifier-members.html +++ b/docs/d2/d5c/classshaka_1_1SimpleMpdNotifier-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d61/structshaka_1_1media_1_1H264ModificationOfPicNum-members.html b/docs/d2/d61/structshaka_1_1media_1_1H264ModificationOfPicNum-members.html index de875cdffc..a10f775cc8 100644 --- a/docs/d2/d61/structshaka_1_1media_1_1H264ModificationOfPicNum-members.html +++ b/docs/d2/d61/structshaka_1_1media_1_1H264ModificationOfPicNum-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d62/simple__mpd__notifier_8h_source.html b/docs/d2/d62/simple__mpd__notifier_8h_source.html index a59483e033..030aef9f97 100644 --- a/docs/d2/d62/simple__mpd__notifier_8h_source.html +++ b/docs/d2/d62/simple__mpd__notifier_8h_source.html @@ -184,7 +184,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d62/structshaka_1_1media_1_1mp4_1_1Movie-members.html b/docs/d2/d62/structshaka_1_1media_1_1mp4_1_1Movie-members.html index 25bb4efcc9..b8db63f13a 100644 --- a/docs/d2/d62/structshaka_1_1media_1_1mp4_1_1Movie-members.html +++ b/docs/d2/d62/structshaka_1_1media_1_1mp4_1_1Movie-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d6a/classshaka_1_1media_1_1AesCryptor-members.html b/docs/d2/d6a/classshaka_1_1media_1_1AesCryptor-members.html index 337df15948..737f341cbf 100644 --- a/docs/d2/d6a/classshaka_1_1media_1_1AesCryptor-members.html +++ b/docs/d2/d6a/classshaka_1_1media_1_1AesCryptor-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d6f/classBandwidthEstimator.html b/docs/d2/d6f/classBandwidthEstimator.html index 18a9e58f1f..be897b42b0 100644 --- a/docs/d2/d6f/classBandwidthEstimator.html +++ b/docs/d2/d6f/classBandwidthEstimator.html @@ -151,7 +151,7 @@ static const int kUseAllBl diff --git a/docs/d2/d70/structshaka_1_1media_1_1mp4_1_1SchemeInfo.html b/docs/d2/d70/structshaka_1_1media_1_1mp4_1_1SchemeInfo.html index 226f22eb55..30c75d953b 100644 --- a/docs/d2/d70/structshaka_1_1media_1_1mp4_1_1SchemeInfo.html +++ b/docs/d2/d70/structshaka_1_1media_1_1mp4_1_1SchemeInfo.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d2/d7b/classshaka_1_1DashIopMpdNotifier-members.html b/docs/d2/d7b/classshaka_1_1DashIopMpdNotifier-members.html index 3e3a40b24e..9ed3469deb 100644 --- a/docs/d2/d7b/classshaka_1_1DashIopMpdNotifier-members.html +++ b/docs/d2/d7b/classshaka_1_1DashIopMpdNotifier-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d7b/simple__mpd__notifier_8cc_source.html b/docs/d2/d7b/simple__mpd__notifier_8cc_source.html index 00a51a6ae6..0ac9052014 100644 --- a/docs/d2/d7b/simple__mpd__notifier_8cc_source.html +++ b/docs/d2/d7b/simple__mpd__notifier_8cc_source.html @@ -235,7 +235,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d7e/aac__audio__specific__config_8h_source.html b/docs/d2/d7e/aac__audio__specific__config_8h_source.html index 96bde60039..2286f99e6e 100644 --- a/docs/d2/d7e/aac__audio__specific__config_8h_source.html +++ b/docs/d2/d7e/aac__audio__specific__config_8h_source.html @@ -164,7 +164,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d7f/structshaka_1_1media_1_1mp4_1_1CuePayloadBox.html b/docs/d2/d7f/structshaka_1_1media_1_1mp4_1_1CuePayloadBox.html index 0130a7dce8..8af62f7392 100644 --- a/docs/d2/d7f/structshaka_1_1media_1_1mp4_1_1CuePayloadBox.html +++ b/docs/d2/d7f/structshaka_1_1media_1_1mp4_1_1CuePayloadBox.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d2/d8a/hls__notify__muxer__listener_8h_source.html b/docs/d2/d8a/hls__notify__muxer__listener_8h_source.html index ea23e04120..119d099a8a 100644 --- a/docs/d2/d8a/hls__notify__muxer__listener_8h_source.html +++ b/docs/d2/d8a/hls__notify__muxer__listener_8h_source.html @@ -163,7 +163,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
86 } // namespace shaka
87 #endif // PACKAGER_MEDIA_EVENT_HLS_NOTIFY_MUXER_LISTENER_H_
void OnMediaStart(const MuxerOptions &muxer_options, const StreamInfo &stream_info, uint32_t time_scale, ContainerType container_type) override
-
Abstract class holds stream information.
Definition: stream_info.h:53
+
Abstract class holds stream information.
Definition: stream_info.h:51
void OnEncryptionInfoReady(bool is_initial_encryption_info, FourCC protection_scheme, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv, const std::vector< ProtectionSystemSpecificInfo > &key_system_info) override
MuxerListener that uses HlsNotifier.
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:18
@@ -176,7 +176,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d91/structshaka_1_1media_1_1mp4_1_1CuePayloadBox-members.html b/docs/d2/d91/structshaka_1_1media_1_1mp4_1_1CuePayloadBox-members.html index b0dc2c0273..9f1719677d 100644 --- a/docs/d2/d91/structshaka_1_1media_1_1mp4_1_1CuePayloadBox-members.html +++ b/docs/d2/d91/structshaka_1_1media_1_1mp4_1_1CuePayloadBox-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d92/box__reader_8h_source.html b/docs/d2/d92/box__reader_8h_source.html index a3ee482717..829bc44e05 100644 --- a/docs/d2/d92/box__reader_8h_source.html +++ b/docs/d2/d92/box__reader_8h_source.html @@ -246,7 +246,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/d93/classshaka_1_1media_1_1mp2t_1_1PesPacket.html b/docs/d2/d93/classshaka_1_1media_1_1mp2t_1_1PesPacket.html index 19e84eeb5f..4ef225acd2 100644 --- a/docs/d2/d93/classshaka_1_1media_1_1mp2t_1_1PesPacket.html +++ b/docs/d2/d93/classshaka_1_1media_1_1mp2t_1_1PesPacket.html @@ -387,7 +387,7 @@ const std::vector< uint8_t > &  diff --git a/docs/d2/d95/structshaka_1_1media_1_1StreamDescriptor.html b/docs/d2/d95/structshaka_1_1media_1_1StreamDescriptor.html index 3d0ff839da..d314684347 100644 --- a/docs/d2/d95/structshaka_1_1media_1_1StreamDescriptor.html +++ b/docs/d2/d95/structshaka_1_1media_1_1StreamDescriptor.html @@ -140,7 +140,7 @@ std::string hls_playlist_n diff --git a/docs/d2/da6/threaded__io__file_8h_source.html b/docs/d2/da6/threaded__io__file_8h_source.html index 8a3b22df46..63e7d7a770 100644 --- a/docs/d2/da6/threaded__io__file_8h_source.html +++ b/docs/d2/da6/threaded__io__file_8h_source.html @@ -172,7 +172,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/da8/mp4_2segmenter_8cc_source.html b/docs/d2/da8/mp4_2segmenter_8cc_source.html index b88edb5171..eb9ba69f86 100644 --- a/docs/d2/da8/mp4_2segmenter_8cc_source.html +++ b/docs/d2/da8/mp4_2segmenter_8cc_source.html @@ -409,8 +409,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
320  return DoFinalize();
321 }
322 
- -
324  scoped_refptr<MediaSample> sample) {
+ +
324  std::shared_ptr<MediaSample> sample) {
325  // Find the fragmenter for this stream.
326  DCHECK(stream);
327  DCHECK(stream_map_.find(stream) != stream_map_.end());
@@ -451,7 +451,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
362  return status;
363  }
364 
-
365  status = fragmenter->AddSample(sample);
+
365  status = fragmenter->AddSample(sample);
366  if (!status.ok())
367  return status;
368 
@@ -575,18 +575,18 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
486 } // namespace shaka
-
Status AddSample(scoped_refptr< MediaSample > sample)
Definition: segmenter.cc:124
Status Initialize(std::unique_ptr< MkvWriter > writer, StreamInfo *info, ProgressListener *progress_listener, MuxerListener *muxer_listener, KeySource *encryption_key_source, uint32_t max_sd_pixels, uint32_t max_hd_pixels, uint32_t max_uhd1_pixels, double clear_lead_in_seconds)
Definition: segmenter.cc:51
-
virtual Status AddSample(scoped_refptr< MediaSample > sample)
Definition: fragmenter.cc:46
virtual Status GetKey(TrackType track_type, EncryptionKey *key)=0
This class listens to progress updates events.
+
virtual Status AddSample(std::shared_ptr< MediaSample > sample)
Definition: fragmenter.cc:46
+
Status AddSample(std::shared_ptr< MediaSample > sample)
Definition: segmenter.cc:124
- +
static bool GenerateRandomIv(FourCC protection_scheme, std::vector< uint8_t > *iv)
Definition: aes_cryptor.cc:107
-
EncryptingFragmenter generates MP4 fragments with sample encrypted.
+
EncryptingFragmenter generates MP4 fragments with sample encrypted.
virtual void OnProgress(double progress)=0
@@ -595,12 +595,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
void UpdateProgress(uint64_t progress)
Update segmentation progress using ProgressListener.
Definition: segmenter.cc:268
- + diff --git a/docs/d2/da9/classshaka_1_1media_1_1BufferWriter-members.html b/docs/d2/da9/classshaka_1_1media_1_1BufferWriter-members.html index ae884a4b9b..d52cb23941 100644 --- a/docs/d2/da9/classshaka_1_1media_1_1BufferWriter-members.html +++ b/docs/d2/da9/classshaka_1_1media_1_1BufferWriter-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dae/classshaka_1_1MockAdaptationSet-members.html b/docs/d2/dae/classshaka_1_1MockAdaptationSet-members.html index 4919de8e9b..9618cad833 100644 --- a/docs/d2/dae/classshaka_1_1MockAdaptationSet-members.html +++ b/docs/d2/dae/classshaka_1_1MockAdaptationSet-members.html @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dae/webm__muxer_8cc_source.html b/docs/d2/dae/webm__muxer_8cc_source.html index c5c6ea01c0..56e86f54a5 100644 --- a/docs/d2/dae/webm__muxer_8cc_source.html +++ b/docs/d2/dae/webm__muxer_8cc_source.html @@ -163,7 +163,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
74 }
75 
76 Status WebMMuxer::DoAddSample(const MediaStream* stream,
-
77  scoped_refptr<MediaSample> sample) {
+
77  std::shared_ptr<MediaSample> sample) {
78  DCHECK(segmenter_);
79  DCHECK(stream == streams()[0]);
80  return segmenter_->AddSample(sample);
@@ -215,7 +215,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:18
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:176
- +
virtual void OnMediaStart(const MuxerOptions &muxer_options, const StreamInfo &stream_info, uint32_t time_scale, ContainerType container_type)=0
WebMMuxer(const MuxerOptions &options)
Create a WebMMuxer object from MuxerOptions.
Definition: webm_muxer.cc:22
@@ -223,7 +223,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/db1/structshaka_1_1media_1_1mp4_1_1SampleToGroup-members.html b/docs/d2/db1/structshaka_1_1media_1_1mp4_1_1SampleToGroup-members.html index bd992235df..a57276e924 100644 --- a/docs/d2/db1/structshaka_1_1media_1_1mp4_1_1SampleToGroup-members.html +++ b/docs/d2/db1/structshaka_1_1media_1_1mp4_1_1SampleToGroup-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/db6/structshaka_1_1media_1_1mp4_1_1FileType-members.html b/docs/d2/db6/structshaka_1_1media_1_1mp4_1_1FileType-members.html index 0c4c2c2337..41596e27b0 100644 --- a/docs/d2/db6/structshaka_1_1media_1_1mp4_1_1FileType-members.html +++ b/docs/d2/db6/structshaka_1_1media_1_1mp4_1_1FileType-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/db8/structshaka_1_1media_1_1mp4_1_1CueSourceIDBox-members.html b/docs/d2/db8/structshaka_1_1media_1_1mp4_1_1CueSourceIDBox-members.html index 8eb115f776..ccc9c16b1d 100644 --- a/docs/d2/db8/structshaka_1_1media_1_1mp4_1_1CueSourceIDBox-members.html +++ b/docs/d2/db8/structshaka_1_1media_1_1mp4_1_1CueSourceIDBox-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dba/classshaka_1_1media_1_1SegmentTestBase.html b/docs/d2/dba/classshaka_1_1media_1_1SegmentTestBase.html index 5c7247cf18..0c008e3d38 100644 --- a/docs/d2/dba/classshaka_1_1media_1_1SegmentTestBase.html +++ b/docs/d2/dba/classshaka_1_1media_1_1SegmentTestBase.html @@ -134,10 +134,10 @@ template<typename S > void CreateAndInitializeSegmenter (const MuxerOptions &options, StreamInfo *info, KeySource *key_source, std::unique_ptr< webm::Segmenter > *result) const  Creates a Segmenter of the given type and initializes it.
  - -scoped_refptr< MediaSampleCreateSample (KeyFrameFlag key_frame_flag, uint64_t duration, SideDataFlag side_data_flag) - Creates a new media sample.
-  + +std::shared_ptr< MediaSampleCreateSample (KeyFrameFlag key_frame_flag, uint64_t duration, SideDataFlag side_data_flag) + Creates a new media sample.
MuxerOptions CreateMuxerOptions () const  Creates a Muxer options object for testing.
@@ -180,7 +180,7 @@ bool single_segment_ diff --git a/docs/d2/dc3/structshaka_1_1media_1_1mp4_1_1Track-members.html b/docs/d2/dc3/structshaka_1_1media_1_1mp4_1_1Track-members.html index a0c99c6794..a0f2738005 100644 --- a/docs/d2/dc3/structshaka_1_1media_1_1mp4_1_1Track-members.html +++ b/docs/d2/dc3/structshaka_1_1media_1_1mp4_1_1Track-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dc7/structshaka_1_1MpdOptions-members.html b/docs/d2/dc7/structshaka_1_1MpdOptions-members.html index 26636d74d6..f137a341e7 100644 --- a/docs/d2/dc7/structshaka_1_1MpdOptions-members.html +++ b/docs/d2/dc7/structshaka_1_1MpdOptions-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dcd/program__map__table__writer_8h_source.html b/docs/d2/dcd/program__map__table__writer_8h_source.html index dc47a79023..ef7b587a21 100644 --- a/docs/d2/dcd/program__map__table__writer_8h_source.html +++ b/docs/d2/dcd/program__map__table__writer_8h_source.html @@ -190,7 +190,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dcd/structshaka_1_1media_1_1mp4_1_1EditList-members.html b/docs/d2/dcd/structshaka_1_1media_1_1mp4_1_1EditList-members.html index d5d846fec3..ffe8ed0c1f 100644 --- a/docs/d2/dcd/structshaka_1_1media_1_1mp4_1_1EditList-members.html +++ b/docs/d2/dcd/structshaka_1_1media_1_1mp4_1_1EditList-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dd5/classshaka_1_1media_1_1webm_1_1MultiSegmentSegmenter.html b/docs/d2/dd5/classshaka_1_1media_1_1webm_1_1MultiSegmentSegmenter.html index 14a893153e..32eb676831 100644 --- a/docs/d2/dd5/classshaka_1_1media_1_1webm_1_1MultiSegmentSegmenter.html +++ b/docs/d2/dd5/classshaka_1_1media_1_1webm_1_1MultiSegmentSegmenter.html @@ -124,8 +124,8 @@ Public Member Functions   Status Finalize ()   -Status AddSample (scoped_refptr< MediaSample > sample) -  +Status AddSample (std::shared_ptr< MediaSample > sample) +  float GetDuration () const   @@ -277,7 +277,7 @@ uint64_t  - + @@ -115,18 +115,19 @@ Public Member Functions - - - - + + + +
cluster_length_in diff --git a/docs/d2/dd6/mkv__writer_8h_source.html b/docs/d2/dd6/mkv__writer_8h_source.html index f8f0ef8930..7c3aaaf29e 100644 --- a/docs/d2/dd6/mkv__writer_8h_source.html +++ b/docs/d2/dd6/mkv__writer_8h_source.html @@ -152,7 +152,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html b/docs/d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html index 834dc1915a..f974be3697 100644 --- a/docs/d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html +++ b/docs/d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html @@ -105,7 +105,7 @@ Inheritance diagram for shaka::media::WebMMediaParser:

Public Member Functions

MediaParser implementation overrides.
void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
 
bool Flush () override WARN_UNUSED_RESULT
 

Additional Inherited Members

- Public Types inherited from shaka::media::MediaParser
typedef base::Callback< void(const
-std::vector< scoped_refptr
-< StreamInfo > > &stream_info)> 
InitCB
 
typedef base::Callback< bool(uint32_t
-track_id, const scoped_refptr
-< MediaSample > &media_sample)> 
NewSampleCB
 
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
 

Detailed Description

-

Definition at line 19 of file webm_media_parser.h.

+

Definition at line 18 of file webm_media_parser.h.

Member Function Documentation

@@ -167,13 +168,13 @@ track_id, const scoped_refptr
void shaka::media::WebMMediaParser::Init ( - const InitCB &  + const InitCBinit_cb, - const NewSampleCB &  + const NewSampleCBnew_sample_cb, @@ -256,7 +257,7 @@ track_id, const scoped_refptr
diff --git a/docs/d2/de3/classshaka_1_1media_1_1mp2t_1_1TsSectionPmt.html b/docs/d2/de3/classshaka_1_1media_1_1mp2t_1_1TsSectionPmt.html index 050cd20f1c..9ce957b883 100644 --- a/docs/d2/de3/classshaka_1_1media_1_1mp2t_1_1TsSectionPmt.html +++ b/docs/d2/de3/classshaka_1_1media_1_1mp2t_1_1TsSectionPmt.html @@ -155,7 +155,7 @@ void Reset () override diff --git a/docs/d2/de6/packager__main_8cc_source.html b/docs/d2/de6/packager__main_8cc_source.html index b21688d93d..de16ef29c0 100644 --- a/docs/d2/de6/packager__main_8cc_source.html +++ b/docs/d2/de6/packager__main_8cc_source.html @@ -686,7 +686,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/de7/classshaka_1_1media_1_1TextStreamInfo-members.html b/docs/d2/de7/classshaka_1_1media_1_1TextStreamInfo-members.html index 853c256f36..0b81c15fc0 100644 --- a/docs/d2/de7/classshaka_1_1media_1_1TextStreamInfo-members.html +++ b/docs/d2/de7/classshaka_1_1media_1_1TextStreamInfo-members.html @@ -113,12 +113,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); ToString() const shaka::media::StreamInfovirtual track_id() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline width() const (defined in shaka::media::TextStreamInfo)shaka::media::TextStreamInfoinline - ~StreamInfo() (defined in shaka::media::StreamInfo)shaka::media::StreamInfoprotectedvirtual - ~TextStreamInfo() override (defined in shaka::media::TextStreamInfo)shaka::media::TextStreamInfoprotected + ~StreamInfo() (defined in shaka::media::StreamInfo)shaka::media::StreamInfovirtual + ~TextStreamInfo() override (defined in shaka::media::TextStreamInfo)shaka::media::TextStreamInfo diff --git a/docs/d2/de7/structshaka_1_1media_1_1mp4_1_1Edit-members.html b/docs/d2/de7/structshaka_1_1media_1_1mp4_1_1Edit-members.html index f42a47fde9..ca9d437424 100644 --- a/docs/d2/de7/structshaka_1_1media_1_1mp4_1_1Edit-members.html +++ b/docs/d2/de7/structshaka_1_1media_1_1mp4_1_1Edit-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/de9/mock__muxer__listener_8h_source.html b/docs/d2/de9/mock__muxer__listener_8h_source.html index c5e3823f50..ca53feb064 100644 --- a/docs/d2/de9/mock__muxer__listener_8h_source.html +++ b/docs/d2/de9/mock__muxer__listener_8h_source.html @@ -153,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
virtual void OnNewSegment(const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size)=0
virtual void OnEncryptionInfoReady(bool is_initial_encryption_info, FourCC protection_scheme, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv, const std::vector< ProtectionSystemSpecificInfo > &key_system_info)=0
virtual void OnMediaEnd(bool has_init_range, uint64_t init_range_start, uint64_t init_range_end, bool has_index_range, uint64_t index_range_start, uint64_t index_range_end, float duration_seconds, uint64_t file_size)=0
-
Abstract class holds stream information.
Definition: stream_info.h:53
+
Abstract class holds stream information.
Definition: stream_info.h:51
virtual void OnSampleDurationReady(uint32_t sample_duration)=0
virtual void OnEncryptionStart()=0
@@ -163,7 +163,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/deb/es__parser_8h_source.html b/docs/d2/deb/es__parser_8h_source.html index 4c1d69a271..ff2b914861 100644 --- a/docs/d2/deb/es__parser_8h_source.html +++ b/docs/d2/deb/es__parser_8h_source.html @@ -97,55 +97,54 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
8 #include <stdint.h>
9 
10 #include "packager/base/callback.h"
-
11 #include "packager/base/memory/ref_counted.h"
-
12 
-
13 namespace shaka {
-
14 namespace media {
-
15 
-
16 class MediaSample;
-
17 class StreamInfo;
-
18 
-
19 namespace mp2t {
-
20 
-
21 class EsParser {
-
22  public:
-
23  typedef base::Callback<void(const scoped_refptr<StreamInfo>&)>
-
24  NewStreamInfoCB;
-
25  typedef base::Callback<void(uint32_t, const scoped_refptr<MediaSample>&)>
-
26  EmitSampleCB;
-
27 
-
28  EsParser(uint32_t pid) : pid_(pid) {}
-
29  virtual ~EsParser() {}
-
30 
-
31  // ES parsing.
-
32  // Should use kNoTimestamp when a timestamp is not valid.
-
33  virtual bool Parse(const uint8_t* buf,
-
34  int size,
-
35  int64_t pts,
-
36  int64_t dts) = 0;
-
37 
-
38  // Flush any pending buffer.
-
39  virtual void Flush() = 0;
-
40 
-
41  // Reset the state of the ES parser.
-
42  virtual void Reset() = 0;
-
43 
-
44  uint32_t pid() { return pid_; }
-
45 
-
46  private:
-
47  uint32_t pid_;
-
48 };
-
49 
-
50 } // namespace mp2t
-
51 } // namespace media
-
52 } // namespace shaka
-
53 
-
54 #endif
- +
11 
+
12 namespace shaka {
+
13 namespace media {
+
14 
+
15 class MediaSample;
+
16 class StreamInfo;
+
17 
+
18 namespace mp2t {
+
19 
+
20 class EsParser {
+
21  public:
+
22  typedef base::Callback<void(const std::shared_ptr<StreamInfo>&)>
+
23  NewStreamInfoCB;
+
24  typedef base::Callback<void(uint32_t, const std::shared_ptr<MediaSample>&)>
+
25  EmitSampleCB;
+
26 
+
27  EsParser(uint32_t pid) : pid_(pid) {}
+
28  virtual ~EsParser() {}
+
29 
+
30  // ES parsing.
+
31  // Should use kNoTimestamp when a timestamp is not valid.
+
32  virtual bool Parse(const uint8_t* buf,
+
33  int size,
+
34  int64_t pts,
+
35  int64_t dts) = 0;
+
36 
+
37  // Flush any pending buffer.
+
38  virtual void Flush() = 0;
+
39 
+
40  // Reset the state of the ES parser.
+
41  virtual void Reset() = 0;
+
42 
+
43  uint32_t pid() { return pid_; }
+
44 
+
45  private:
+
46  uint32_t pid_;
+
47 };
+
48 
+
49 } // namespace mp2t
+
50 } // namespace media
+
51 } // namespace shaka
+
52 
+
53 #endif
+ diff --git a/docs/d2/dee/classshaka_1_1media_1_1mp2t_1_1TsSectionPes-members.html b/docs/d2/dee/classshaka_1_1media_1_1mp2t_1_1TsSectionPes-members.html index c44ad8192d..fb290e3082 100644 --- a/docs/d2/dee/classshaka_1_1media_1_1mp2t_1_1TsSectionPes-members.html +++ b/docs/d2/dee/classshaka_1_1media_1_1mp2t_1_1TsSectionPes-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dee/pes__packet__generator_8cc_source.html b/docs/d2/dee/pes__packet__generator_8cc_source.html index 57d38c37b4..014d8899bb 100644 --- a/docs/d2/dee/pes__packet__generator_8cc_source.html +++ b/docs/d2/dee/pes__packet__generator_8cc_source.html @@ -213,7 +213,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
124  return false;
125 }
126 
-
127 bool PesPacketGenerator::PushSample(scoped_refptr<MediaSample> sample) {
+
127 bool PesPacketGenerator::PushSample(std::shared_ptr<MediaSample> sample) {
128  if (!current_processing_pes_)
129  current_processing_pes_.reset(new PesPacket());
130 
@@ -310,7 +310,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
221 } // namespace mp2t
222 } // namespace media
223 } // namespace shaka
-
Abstract class holds stream information.
Definition: stream_info.h:53
+
Abstract class holds stream information.
Definition: stream_info.h:51
virtual std::unique_ptr< PesPacket > GetNextPesPacket()
@@ -320,15 +320,15 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
virtual bool Initialize(const StreamInfo &stream)
Implements pattern-based encryption/decryption.
Class that carries PES packet information.
Definition: pes_packet.h:20
+
virtual bool PushSample(std::shared_ptr< MediaSample > sample)
virtual bool SetEncryptionKey(std::unique_ptr< EncryptionKey > encryption_key)
Holds video stream information.
Holds audio stream information.
-
virtual bool PushSample(scoped_refptr< MediaSample > sample)
- + diff --git a/docs/d2/df8/classshaka_1_1media_1_1SegmentTestBase_1_1ClusterParser.html b/docs/d2/df8/classshaka_1_1media_1_1SegmentTestBase_1_1ClusterParser.html index 45f435c910..77cda713ec 100644 --- a/docs/d2/df8/classshaka_1_1media_1_1SegmentTestBase_1_1ClusterParser.html +++ b/docs/d2/df8/classshaka_1_1media_1_1SegmentTestBase_1_1ClusterParser.html @@ -128,7 +128,7 @@ size_t cluster_count ( diff --git a/docs/d2/dfc/classshaka_1_1media_1_1MkvWriter-members.html b/docs/d2/dfc/classshaka_1_1media_1_1MkvWriter-members.html index d02b2f1b0e..95de23efd9 100644 --- a/docs/d2/dfc/classshaka_1_1media_1_1MkvWriter-members.html +++ b/docs/d2/dfc/classshaka_1_1media_1_1MkvWriter-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d2/dfd/adts__header_8h_source.html b/docs/d2/dfd/adts__header_8h_source.html index bc41a1b410..d61b1b71c1 100644 --- a/docs/d2/dfd/adts__header_8h_source.html +++ b/docs/d2/dfd/adts__header_8h_source.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d07/classshaka_1_1media_1_1mp4_1_1BoxReader-members.html b/docs/d3/d07/classshaka_1_1media_1_1mp4_1_1BoxReader-members.html index 06b44e2bab..703c9e62d8 100644 --- a/docs/d3/d07/classshaka_1_1media_1_1mp4_1_1BoxReader-members.html +++ b/docs/d3/d07/classshaka_1_1media_1_1mp4_1_1BoxReader-members.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d09/classshaka_1_1media_1_1mp4_1_1SyncSampleIterator-members.html b/docs/d3/d09/classshaka_1_1media_1_1mp4_1_1SyncSampleIterator-members.html index fe6aaeeb55..40a62a620d 100644 --- a/docs/d3/d09/classshaka_1_1media_1_1mp4_1_1SyncSampleIterator-members.html +++ b/docs/d3/d09/classshaka_1_1media_1_1mp4_1_1SyncSampleIterator-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d0a/classshaka_1_1media_1_1MediaParser.html b/docs/d3/d0a/classshaka_1_1media_1_1MediaParser.html index 03464a6a84..54a5dd0b28 100644 --- a/docs/d3/d0a/classshaka_1_1media_1_1MediaParser.html +++ b/docs/d3/d0a/classshaka_1_1media_1_1MediaParser.html @@ -110,18 +110,19 @@ Inheritance diagram for shaka::media::MediaParser: - - - - + + + +

Public Types

typedef base::Callback< void(const
-std::vector< scoped_refptr
-< StreamInfo > > &stream_info)> 
InitCB
 
typedef base::Callback< bool(uint32_t
-track_id, const scoped_refptr
-< MediaSample > &media_sample)> 
NewSampleCB
 
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
 
- + @@ -130,14 +131,14 @@ Public Member Functions

Public Member Functions

virtual void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source)=0
virtual void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source)=0
 
virtual bool Flush () WARN_UNUSED_RESULT=0
 

Detailed Description

-

Definition at line 25 of file media_parser.h.

+

Definition at line 24 of file media_parser.h.

Member Typedef Documentation

- +
- +
typedef base::Callback< void(const std::vector<scoped_refptr<StreamInfo> >& stream_info)> shaka::media::MediaParser::InitCBtypedef base::Callback<void( const std::vector<std::shared_ptr<StreamInfo> >& stream_info)> shaka::media::MediaParser::InitCB
@@ -153,12 +154,12 @@ Public Member Functions
- +
- +
typedef base::Callback<bool(uint32_t track_id, const scoped_refptr<MediaSample>& media_sample)> shaka::media::MediaParser::NewSampleCBtypedef base::Callback<bool(uint32_t track_id, const std::shared_ptr<MediaSample>& media_sample)> shaka::media::MediaParser::NewSampleCB
@@ -214,13 +215,13 @@ Public Member Functions virtual void shaka::media::MediaParser::Init ( - const InitCB &  + const InitCBinit_cb, - const NewSampleCB &  + const NewSampleCBnew_sample_cb, @@ -298,7 +299,7 @@ Public Member Functions
diff --git a/docs/d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html b/docs/d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html index 0d29992b82..55fb726e9b 100644 --- a/docs/d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html +++ b/docs/d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html @@ -336,7 +336,7 @@ Static Public Member Functions
diff --git a/docs/d3/d12/classshaka_1_1media_1_1LibcryptoThreading-members.html b/docs/d3/d12/classshaka_1_1media_1_1LibcryptoThreading-members.html index a72f43b3c3..1d25e19d84 100644 --- a/docs/d3/d12/classshaka_1_1media_1_1LibcryptoThreading-members.html +++ b/docs/d3/d12/classshaka_1_1media_1_1LibcryptoThreading-members.html @@ -98,7 +98,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d18/classshaka_1_1media_1_1mp2t_1_1TsSectionPat-members.html b/docs/d3/d18/classshaka_1_1media_1_1mp2t_1_1TsSectionPat-members.html index b47dfaad2e..09e7eacce8 100644 --- a/docs/d3/d18/classshaka_1_1media_1_1mp2t_1_1TsSectionPat-members.html +++ b/docs/d3/d18/classshaka_1_1media_1_1mp2t_1_1TsSectionPat-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d19/io__cache_8h_source.html b/docs/d3/d19/io__cache_8h_source.html index 006f4a77f2..448cdedcb4 100644 --- a/docs/d3/d19/io__cache_8h_source.html +++ b/docs/d3/d19/io__cache_8h_source.html @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d35/video__slice__header__parser_8cc_source.html b/docs/d3/d35/video__slice__header__parser_8cc_source.html index 4f714d66e3..c9e0ec6c41 100644 --- a/docs/d3/d35/video__slice__header__parser_8cc_source.html +++ b/docs/d3/d35/video__slice__header__parser_8cc_source.html @@ -199,7 +199,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d47/structshaka_1_1media_1_1mp4_1_1PrivFrame.html b/docs/d3/d47/structshaka_1_1media_1_1mp4_1_1PrivFrame.html index 8b4a4b1c36..4159b061ad 100644 --- a/docs/d3/d47/structshaka_1_1media_1_1mp4_1_1PrivFrame.html +++ b/docs/d3/d47/structshaka_1_1media_1_1mp4_1_1PrivFrame.html @@ -129,7 +129,7 @@ std::string value diff --git a/docs/d3/d51/classshaka_1_1media_1_1LibcryptoThreading.html b/docs/d3/d51/classshaka_1_1media_1_1LibcryptoThreading.html index 0c428d0a26..922fc2bc22 100644 --- a/docs/d3/d51/classshaka_1_1media_1_1LibcryptoThreading.html +++ b/docs/d3/d51/classshaka_1_1media_1_1LibcryptoThreading.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d56/decrypt__config_8cc_source.html b/docs/d3/d56/decrypt__config_8cc_source.html index 9685b05fce..155ec1324b 100644 --- a/docs/d3/d56/decrypt__config_8cc_source.html +++ b/docs/d3/d56/decrypt__config_8cc_source.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d61/classshaka_1_1media_1_1File.html b/docs/d3/d61/classshaka_1_1media_1_1File.html index 461d1ad484..756d6607be 100644 --- a/docs/d3/d61/classshaka_1_1media_1_1File.html +++ b/docs/d3/d61/classshaka_1_1media_1_1File.html @@ -811,7 +811,7 @@ class ThreadedIoFile diff --git a/docs/d3/d62/continuity__counter_8h_source.html b/docs/d3/d62/continuity__counter_8h_source.html index 64547052c5..b8043bc911 100644 --- a/docs/d3/d62/continuity__counter_8h_source.html +++ b/docs/d3/d62/continuity__counter_8h_source.html @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d62/rcheck_8h_source.html b/docs/d3/d62/rcheck_8h_source.html index 0eaefc9f68..26c760b0f9 100644 --- a/docs/d3/d62/rcheck_8h_source.html +++ b/docs/d3/d62/rcheck_8h_source.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d66/structshaka_1_1media_1_1mp4_1_1DataEntryUrl-members.html b/docs/d3/d66/structshaka_1_1media_1_1mp4_1_1DataEntryUrl-members.html index df9a1018b7..22ac728870 100644 --- a/docs/d3/d66/structshaka_1_1media_1_1mp4_1_1DataEntryUrl-members.html +++ b/docs/d3/d66/structshaka_1_1media_1_1mp4_1_1DataEntryUrl-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d67/classshaka_1_1media_1_1WebMVideoClient.html b/docs/d3/d67/classshaka_1_1media_1_1WebMVideoClient.html index c8d26c9666..b1b3b364bc 100644 --- a/docs/d3/d67/classshaka_1_1media_1_1WebMVideoClient.html +++ b/docs/d3/d67/classshaka_1_1media_1_1WebMVideoClient.html @@ -114,8 +114,8 @@ Public Member Functions void Reset ()  Reset this object's state so it can process a new video track element.
  -scoped_refptr< VideoStreamInfoGetVideoStreamInfo (int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted) -  +std::shared_ptr< VideoStreamInfoGetVideoStreamInfo (int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted) +  - Public Member Functions inherited from shaka::media::WebMParserClient virtual WebMParserClientOnListStart (int id) @@ -139,12 +139,12 @@ Additional Inherited Members

Definition at line 20 of file webm_video_client.h.

Member Function Documentation

- +
- + @@ -175,9 +175,9 @@ Additional Inherited Members
scoped_refptr< VideoStreamInfo > shaka::media::WebMVideoClient::GetVideoStreamInfo std::shared_ptr< VideoStreamInfo > shaka::media::WebMVideoClient::GetVideoStreamInfo ( int64_t  track_num,

Create a VideoStreamInfo with the data in |track_num|, |codec_id|, |codec_private|, |is_encrypted| and the fields parsed from the last video track element this object was used to parse.

-
Returns
A VideoStreamInfo scoped_refptr if successful.
+
Returns
A VideoStreamInfo if successful.
-An empty scoped_refptr if there was unexpected values in the provided parameters or video track element fields.
+An empty pointer if there was unexpected values in the provided parameters or video track element fields.

Definition at line 50 of file webm_video_client.cc.

@@ -190,7 +190,7 @@ An empty scoped_refptr if there was unexpected values in the provided parameters
diff --git a/docs/d3/d6b/fixed__key__source_8cc_source.html b/docs/d3/d6b/fixed__key__source_8cc_source.html index 5aa7120b04..c52c2ffd1f 100644 --- a/docs/d3/d6b/fixed__key__source_8cc_source.html +++ b/docs/d3/d6b/fixed__key__source_8cc_source.html @@ -247,7 +247,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
diff --git a/docs/d3/d71/classshaka_1_1media_1_1mp2t_1_1TsMuxer.html b/docs/d3/d71/classshaka_1_1media_1_1mp2t_1_1TsMuxer.html index bef29b61da..5ef35956f3 100644 --- a/docs/d3/d71/classshaka_1_1media_1_1mp2t_1_1TsMuxer.html +++ b/docs/d3/d71/classshaka_1_1media_1_1mp2t_1_1TsMuxer.html @@ -184,7 +184,7 @@ FourCC protection_scheme diff --git a/docs/d3/d72/fixed__key__source_8h_source.html b/docs/d3/d72/fixed__key__source_8h_source.html index da0b65baf9..8ef90c30a3 100644 --- a/docs/d3/d72/fixed__key__source_8h_source.html +++ b/docs/d3/d72/fixed__key__source_8h_source.html @@ -160,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d73/classshaka_1_1media_1_1webm_1_1WebMMuxer.html b/docs/d3/d73/classshaka_1_1media_1_1webm_1_1WebMMuxer.html index 6f6e7f443e..73195f8a46 100644 --- a/docs/d3/d73/classshaka_1_1media_1_1webm_1_1WebMMuxer.html +++ b/docs/d3/d73/classshaka_1_1media_1_1webm_1_1WebMMuxer.html @@ -188,7 +188,7 @@ FourCC protection_scheme diff --git a/docs/d3/d75/classshaka_1_1media_1_1AesEncryptor.html b/docs/d3/d75/classshaka_1_1media_1_1AesEncryptor.html index 4e074a0ce5..a296c15072 100644 --- a/docs/d3/d75/classshaka_1_1media_1_1AesEncryptor.html +++ b/docs/d3/d75/classshaka_1_1media_1_1AesEncryptor.html @@ -236,7 +236,7 @@ AES_KEY * mutable_aes_key< diff --git a/docs/d3/d75/classshaka_1_1media_1_1mp4_1_1ChunkInfoIterator-members.html b/docs/d3/d75/classshaka_1_1media_1_1mp4_1_1ChunkInfoIterator-members.html index 13c21caae5..f83993cfcc 100644 --- a/docs/d3/d75/classshaka_1_1media_1_1mp4_1_1ChunkInfoIterator-members.html +++ b/docs/d3/d75/classshaka_1_1media_1_1mp4_1_1ChunkInfoIterator-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d76/muxer__flags_8h_source.html b/docs/d3/d76/muxer__flags_8h_source.html index a25c24a9d0..6d679a7708 100644 --- a/docs/d3/d76/muxer__flags_8h_source.html +++ b/docs/d3/d76/muxer__flags_8h_source.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d77/structshaka_1_1media_1_1mp4_1_1TextSampleEntry-members.html b/docs/d3/d77/structshaka_1_1media_1_1mp4_1_1TextSampleEntry-members.html index 86347efcee..88673819a3 100644 --- a/docs/d3/d77/structshaka_1_1media_1_1mp4_1_1TextSampleEntry-members.html +++ b/docs/d3/d77/structshaka_1_1media_1_1mp4_1_1TextSampleEntry-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d7b/classshaka_1_1media_1_1RsaPublicKey-members.html b/docs/d3/d7b/classshaka_1_1media_1_1RsaPublicKey-members.html index 6da3bda776..6c65599ae7 100644 --- a/docs/d3/d7b/classshaka_1_1media_1_1RsaPublicKey-members.html +++ b/docs/d3/d7b/classshaka_1_1media_1_1RsaPublicKey-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html b/docs/d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html index 4ae345b5f1..5a2acf46be 100644 --- a/docs/d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html +++ b/docs/d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html @@ -114,8 +114,8 @@ Public Member Functions void Reset ()  Reset this object's state so it can process a new audio track element.
  -scoped_refptr< AudioStreamInfoGetAudioStreamInfo (int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted) -  +std::shared_ptr< AudioStreamInfoGetAudioStreamInfo (int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted) +  - Public Member Functions inherited from shaka::media::WebMParserClient virtual WebMParserClientOnListStart (int id) @@ -142,12 +142,12 @@ Additional Inherited Members

Definition at line 20 of file webm_audio_client.h.

Member Function Documentation

- +
- + @@ -208,9 +208,9 @@ Additional Inherited Members
scoped_refptr< AudioStreamInfo > shaka::media::WebMAudioClient::GetAudioStreamInfo std::shared_ptr< AudioStreamInfo > shaka::media::WebMAudioClient::GetAudioStreamInfo ( int64_t  track_num,
-
Returns
An AudioStreamInfo scoped_refptr if successful.
+
Returns
An AudioStreamInfo if successful.
-An empty scoped_refptr if there was unexpected values in the provided parameters or audio track element fields.
+An empty pointer if there was unexpected values in the provided parameters or audio track element fields.

Definition at line 31 of file webm_audio_client.cc.

@@ -223,7 +223,7 @@ An empty scoped_refptr if there was unexpected values in the provided parameters
diff --git a/docs/d3/d80/muxer__util_8h_source.html b/docs/d3/d80/muxer__util_8h_source.html index 0556a14eba..003897422e 100644 --- a/docs/d3/d80/muxer__util_8h_source.html +++ b/docs/d3/d80/muxer__util_8h_source.html @@ -129,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
diff --git a/docs/d3/d87/structshaka_1_1media_1_1mp4_1_1SampleToChunk.html b/docs/d3/d87/structshaka_1_1media_1_1mp4_1_1SampleToChunk.html index e6c4a55963..e5cd79cdb6 100644 --- a/docs/d3/d87/structshaka_1_1media_1_1mp4_1_1SampleToChunk.html +++ b/docs/d3/d87/structshaka_1_1media_1_1mp4_1_1SampleToChunk.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d3/d8b/structshaka_1_1media_1_1FileCloser.html b/docs/d3/d8b/structshaka_1_1media_1_1FileCloser.html index ed5138d357..9d202d830a 100644 --- a/docs/d3/d8b/structshaka_1_1media_1_1FileCloser.html +++ b/docs/d3/d8b/structshaka_1_1media_1_1FileCloser.html @@ -112,7 +112,7 @@ void operator() ( diff --git a/docs/d3/d8d/webm__audio__client_8h_source.html b/docs/d3/d8d/webm__audio__client_8h_source.html index 2ac5767d4a..6d2874ccfd 100644 --- a/docs/d3/d8d/webm__audio__client_8h_source.html +++ b/docs/d3/d8d/webm__audio__client_8h_source.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
24 
26  void Reset();
27 
-
43  scoped_refptr<AudioStreamInfo> GetAudioStreamInfo(
+
43  std::shared_ptr<AudioStreamInfo> GetAudioStreamInfo(
44  int64_t track_num,
45  const std::string& codec_id,
46  const std::vector<uint8_t>& codec_private,
@@ -137,14 +137,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
65 } // namespace shaka
66 
67 #endif // MEDIA_FORMATS_WEBM_WEBM_AUDIO_CLIENT_H_
+
std::shared_ptr< AudioStreamInfo > GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted)
void Reset()
Reset this object's state so it can process a new audio track element.
-
scoped_refptr< AudioStreamInfo > GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted)
Helper class used to parse an Audio element inside a TrackEntry element.
diff --git a/docs/d3/d90/ec3__audio__util_8cc_source.html b/docs/d3/d90/ec3__audio__util_8cc_source.html index c5340bd0c8..73de77d0d4 100644 --- a/docs/d3/d90/ec3__audio__util_8cc_source.html +++ b/docs/d3/d90/ec3__audio__util_8cc_source.html @@ -245,7 +245,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d91/classshaka_1_1media_1_1H264Parser.html b/docs/d3/d91/classshaka_1_1media_1_1H264Parser.html index dcf1aae56b..e974303f44 100644 --- a/docs/d3/d91/classshaka_1_1media_1_1H264Parser.html +++ b/docs/d3/d91/classshaka_1_1media_1_1H264Parser.html @@ -135,7 +135,7 @@ Result ParseSEI (const diff --git a/docs/d3/da0/ec3__audio__util_8h_source.html b/docs/d3/da0/ec3__audio__util_8h_source.html index 372da17f65..9bceec72ef 100644 --- a/docs/d3/da0/ec3__audio__util_8h_source.html +++ b/docs/d3/da0/ec3__audio__util_8h_source.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/da1/classshaka_1_1media_1_1webm_1_1SingleSegmentSegmenter.html b/docs/d3/da1/classshaka_1_1media_1_1webm_1_1SingleSegmentSegmenter.html index e9c1ba0766..24326e0359 100644 --- a/docs/d3/da1/classshaka_1_1media_1_1webm_1_1SingleSegmentSegmenter.html +++ b/docs/d3/da1/classshaka_1_1media_1_1webm_1_1SingleSegmentSegmenter.html @@ -125,8 +125,8 @@ Public Member Functions   Status Finalize ()   -Status AddSample (scoped_refptr< MediaSample > sample) -  +Status AddSample (std::shared_ptr< MediaSample > sample) +  float GetDuration () const   @@ -296,7 +296,7 @@ uint64_t  diff --git a/docs/d3/dad/structshaka_1_1media_1_1mp4_1_1ID3v2.html b/docs/d3/dad/structshaka_1_1media_1_1mp4_1_1ID3v2.html index 486af797d1..117e61a22b 100644 --- a/docs/d3/dad/structshaka_1_1media_1_1mp4_1_1ID3v2.html +++ b/docs/d3/dad/structshaka_1_1media_1_1mp4_1_1ID3v2.html @@ -189,7 +189,7 @@ Additional Inherited Members diff --git a/docs/d3/db4/classshaka_1_1media_1_1WebMWebVTTParser-members.html b/docs/d3/db4/classshaka_1_1media_1_1WebMWebVTTParser-members.html index e03e5ca6e5..87e6919b76 100644 --- a/docs/d3/db4/classshaka_1_1media_1_1WebMWebVTTParser-members.html +++ b/docs/d3/db4/classshaka_1_1media_1_1WebMWebVTTParser-members.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
cluster_length_in diff --git a/docs/d3/da2/structshaka_1_1media_1_1mp4_1_1SchemeType.html b/docs/d3/da2/structshaka_1_1media_1_1mp4_1_1SchemeType.html index c039eb892d..b31a9e2705 100644 --- a/docs/d3/da2/structshaka_1_1media_1_1mp4_1_1SchemeType.html +++ b/docs/d3/da2/structshaka_1_1media_1_1mp4_1_1SchemeType.html @@ -185,7 +185,7 @@ Additional Inherited Members
diff --git a/docs/d3/db5/structshaka_1_1media_1_1mp4_1_1Track.html b/docs/d3/db5/structshaka_1_1media_1_1mp4_1_1Track.html index 1306cef019..79736e1211 100644 --- a/docs/d3/db5/structshaka_1_1media_1_1mp4_1_1Track.html +++ b/docs/d3/db5/structshaka_1_1media_1_1mp4_1_1Track.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d3/db6/webm__parser_8cc_source.html b/docs/d3/db6/webm__parser_8cc_source.html index 04457429c9..be498a9e33 100644 --- a/docs/d3/db6/webm__parser_8cc_source.html +++ b/docs/d3/db6/webm__parser_8cc_source.html @@ -1069,7 +1069,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/dbc/seek__head_8cc_source.html b/docs/d3/dbc/seek__head_8cc_source.html index 08ac9ea2e9..155fdba86d 100644 --- a/docs/d3/dbc/seek__head_8cc_source.html +++ b/docs/d3/dbc/seek__head_8cc_source.html @@ -206,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/dbe/demuxer_8cc_source.html b/docs/d3/dbe/demuxer_8cc_source.html index 5d35f5b46c..417e094b20 100644 --- a/docs/d3/dbe/demuxer_8cc_source.html +++ b/docs/d3/dbe/demuxer_8cc_source.html @@ -208,19 +208,19 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
119 }
120 
121 void Demuxer::ParserInitEvent(
-
122  const std::vector<scoped_refptr<StreamInfo>>& stream_infos) {
+
122  const std::vector<std::shared_ptr<StreamInfo>>& stream_infos) {
123  init_event_received_ = true;
-
124  for (const scoped_refptr<StreamInfo>& stream_info : stream_infos)
+
124  for (const std::shared_ptr<StreamInfo>& stream_info : stream_infos)
125  streams_.emplace_back(new MediaStream(stream_info, this));
126 }
127 
128 Demuxer::QueuedSample::QueuedSample(uint32_t local_track_id,
-
129  scoped_refptr<MediaSample> local_sample)
+
129  std::shared_ptr<MediaSample> local_sample)
130  : track_id(local_track_id), sample(local_sample) {}
131 Demuxer::QueuedSample::~QueuedSample() {}
132 
133 bool Demuxer::NewSampleEvent(uint32_t track_id,
-
134  const scoped_refptr<MediaSample>& sample) {
+
134  const std::shared_ptr<MediaSample>& sample) {
135  if (!init_event_received_) {
136  if (queued_samples_.size() >= kQueuedSamplesLimit) {
137  LOG(ERROR) << "Queued samples limit reached: " << kQueuedSamplesLimit;
@@ -240,7 +240,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
151 }
152 
153 bool Demuxer::PushSample(uint32_t track_id,
-
154  const scoped_refptr<MediaSample>& sample) {
+
154  const std::shared_ptr<MediaSample>& sample) {
155  for (const std::unique_ptr<MediaStream>& stream : streams_) {
156  if (track_id == stream->info()->track_id()) {
157  Status status = stream->PushSample(sample);
@@ -273,7 +273,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
184 
185  if (status.error_code() == error::END_OF_STREAM) {
186  // Push EOS sample to muxer to indicate end of stream.
-
187  const scoped_refptr<MediaSample>& sample = MediaSample::CreateEOSBuffer();
+
187  const std::shared_ptr<MediaSample>& sample = MediaSample::CreateEOSBuffer();
188  for (const std::unique_ptr<MediaStream>& stream : streams_) {
189  status = stream->PushSample(sample);
190  if (!status.ok())
@@ -316,25 +316,25 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
227 } // namespace shaka
virtual bool Open()=0
Internal open. Should not be used directly.
+
static std::shared_ptr< MediaSample > CreateEOSBuffer()
Definition: media_sample.cc:79
virtual bool Close()=0
- - + +
void SetKeySource(std::unique_ptr< KeySource > key_source)
Definition: demuxer.cc:50
virtual int64_t Read(void *buffer, uint64_t length)=0
-
static scoped_refptr< MediaSample > CreateEOSBuffer()
Definition: media_sample.cc:80
Status Parse()
Read from the source and send it to the parser.
Definition: demuxer.cc:197
Status Initialize()
Definition: demuxer.cc:54
Demuxer(const std::string &file_name)
Definition: demuxer.cc:36
- - + + diff --git a/docs/d3/dbe/structshaka_1_1media_1_1mp4_1_1EditList.html b/docs/d3/dbe/structshaka_1_1media_1_1mp4_1_1EditList.html index e9057d78cf..0c7d186cb9 100644 --- a/docs/d3/dbe/structshaka_1_1media_1_1mp4_1_1EditList.html +++ b/docs/d3/dbe/structshaka_1_1media_1_1mp4_1_1EditList.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html b/docs/d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html index 0b54de3525..e64c8e5b5b 100644 --- a/docs/d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html +++ b/docs/d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html @@ -105,7 +105,7 @@ Inheritance diagram for shaka::media::mp2t::Mp2tMediaParser:

Public Member Functions

MediaParser implementation overrides.
-void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override +void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override   bool Flush () override WARN_UNUSED_RESULT   @@ -115,18 +115,19 @@ Public Member Functions

Additional Inherited Members

- Public Types inherited from shaka::media::MediaParser -typedef base::Callback< void(const
-std::vector< scoped_refptr
-< StreamInfo > > &stream_info)> InitCB -  -typedef base::Callback< bool(uint32_t
-track_id, const scoped_refptr
-< MediaSample > &media_sample)> NewSampleCB -  +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

Detailed Description

-

Definition at line 30 of file mp2t_media_parser.h.

+

Definition at line 29 of file mp2t_media_parser.h.

Member Function Documentation

@@ -153,7 +154,7 @@ track_id, const scoped_refptr

Implements shaka::media::MediaParser.

-

Definition at line 170 of file mp2t_media_parser.cc.

+

Definition at line 172 of file mp2t_media_parser.cc.

@@ -167,13 +168,13 @@ track_id, const scoped_refptr
void shaka::media::mp2t::Mp2tMediaParser::Init ( - const InitCB &  + const InitCBinit_cb, - const NewSampleCB &  + const NewSampleCBnew_sample_cb, @@ -205,7 +206,7 @@ track_id, const scoped_refptr

Implements shaka::media::MediaParser.

-

Definition at line 157 of file mp2t_media_parser.cc.

+

Definition at line 159 of file mp2t_media_parser.cc.

@@ -245,7 +246,7 @@ track_id, const scoped_refptr

Implements shaka::media::MediaParser.

-

Definition at line 188 of file mp2t_media_parser.cc.

+

Definition at line 190 of file mp2t_media_parser.cc.

@@ -256,7 +257,7 @@ track_id, const scoped_refptr
diff --git a/docs/d3/dd0/classshaka_1_1MpdNotifier.html b/docs/d3/dd0/classshaka_1_1MpdNotifier.html index eab6b875cd..0442d21281 100644 --- a/docs/d3/dd0/classshaka_1_1MpdNotifier.html +++ b/docs/d3/dd0/classshaka_1_1MpdNotifier.html @@ -500,7 +500,7 @@ Public Member Functions diff --git a/docs/d3/dd0/structshaka_1_1media_1_1mp4_1_1SegmentType.html b/docs/d3/dd0/structshaka_1_1media_1_1mp4_1_1SegmentType.html index d76a024cd2..6b2d031098 100644 --- a/docs/d3/dd0/structshaka_1_1media_1_1mp4_1_1SegmentType.html +++ b/docs/d3/dd0/structshaka_1_1media_1_1mp4_1_1SegmentType.html @@ -177,7 +177,7 @@ std::vector< FourCC > < diff --git a/docs/d3/de4/seek__head_8h_source.html b/docs/d3/de4/seek__head_8h_source.html index b7a6dab369..e28043d1ed 100644 --- a/docs/d3/de4/seek__head_8h_source.html +++ b/docs/d3/de4/seek__head_8h_source.html @@ -153,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/de9/classshaka_1_1media_1_1mp4_1_1BoxBuffer-members.html b/docs/d3/de9/classshaka_1_1media_1_1mp4_1_1BoxBuffer-members.html index a101da0d36..d1754c4404 100644 --- a/docs/d3/de9/classshaka_1_1media_1_1mp4_1_1BoxBuffer-members.html +++ b/docs/d3/de9/classshaka_1_1media_1_1mp4_1_1BoxBuffer-members.html @@ -121,7 +121,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/de9/structshaka_1_1media_1_1mp4_1_1SampleGroupDescription-members.html b/docs/d3/de9/structshaka_1_1media_1_1mp4_1_1SampleGroupDescription-members.html index b043ff9bcd..65f0baa92d 100644 --- a/docs/d3/de9/structshaka_1_1media_1_1mp4_1_1SampleGroupDescription-members.html +++ b/docs/d3/de9/structshaka_1_1media_1_1mp4_1_1SampleGroupDescription-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/df1/box__reader_8cc_source.html b/docs/d3/df1/box__reader_8cc_source.html index 7407e2efe6..40798b9804 100644 --- a/docs/d3/df1/box__reader_8cc_source.html +++ b/docs/d3/df1/box__reader_8cc_source.html @@ -259,7 +259,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/dfe/classshaka_1_1media_1_1AesPatternCryptor.html b/docs/d3/dfe/classshaka_1_1media_1_1AesPatternCryptor.html index 9e8278f4e8..30d73bdb92 100644 --- a/docs/d3/dfe/classshaka_1_1media_1_1AesPatternCryptor.html +++ b/docs/d3/dfe/classshaka_1_1media_1_1AesPatternCryptor.html @@ -297,7 +297,7 @@ AES_KEY * mutable_aes_key< diff --git a/docs/d4/d00/mp4_2multi__segment__segmenter_8cc_source.html b/docs/d4/d00/mp4_2multi__segment__segmenter_8cc_source.html index bc17b0580a..703a9f9666 100644 --- a/docs/d4/d00/mp4_2multi__segment__segmenter_8cc_source.html +++ b/docs/d4/d00/mp4_2multi__segment__segmenter_8cc_source.html @@ -295,7 +295,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
virtual bool Close()=0
Define an abstract file interface.
Definition: file.h:24
-
uint32_t sample_duration() const
Definition: segmenter.h:111
+
uint32_t sample_duration() const
Definition: segmenter.h:110
bool GetInitRange(size_t *offset, size_t *size) override
bool GetIndexRange(size_t *offset, size_t *size) override
@@ -306,7 +306,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d08/classshaka_1_1media_1_1mp4_1_1MP4MediaParser-members.html b/docs/d4/d08/classshaka_1_1media_1_1mp4_1_1MP4MediaParser-members.html index e09a7cc12b..29ee6454bd 100644 --- a/docs/d4/d08/classshaka_1_1media_1_1mp4_1_1MP4MediaParser-members.html +++ b/docs/d4/d08/classshaka_1_1media_1_1mp4_1_1MP4MediaParser-members.html @@ -95,18 +95,18 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + - +
Flush() override WARN_UNUSED_RESULTshaka::media::mp4::MP4MediaParservirtual
Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) overrideshaka::media::mp4::MP4MediaParservirtual
InitCB typedefshaka::media::MediaParser
InitCB typedefshaka::media::MediaParser
LoadMoov(const std::string &file_path)shaka::media::mp4::MP4MediaParser
MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinline
MP4MediaParser() (defined in shaka::media::mp4::MP4MediaParser)shaka::media::mp4::MP4MediaParser
NewSampleCB typedefshaka::media::MediaParser
NewSampleCB typedefshaka::media::MediaParser
Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULTshaka::media::mp4::MP4MediaParservirtual
~MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinlinevirtual
~MP4MediaParser() override (defined in shaka::media::mp4::MP4MediaParser)shaka::media::mp4::MP4MediaParser
diff --git a/docs/d4/d0b/classshaka_1_1media_1_1TextTrack.html b/docs/d4/d0b/classshaka_1_1media_1_1TextTrack.html index 793ec4dfff..c60f1fcb6c 100644 --- a/docs/d4/d0b/classshaka_1_1media_1_1TextTrack.html +++ b/docs/d4/d0b/classshaka_1_1media_1_1TextTrack.html @@ -109,7 +109,7 @@ virtual void addWebVTTCue< diff --git a/docs/d4/d14/classshaka_1_1media_1_1WebVttMediaParser-members.html b/docs/d4/d14/classshaka_1_1media_1_1WebVttMediaParser-members.html index 429cbad382..09ce613565 100644 --- a/docs/d4/d14/classshaka_1_1media_1_1WebVttMediaParser-members.html +++ b/docs/d4/d14/classshaka_1_1media_1_1WebVttMediaParser-members.html @@ -95,9 +95,9 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + - + @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
Flush() override WARN_UNUSED_RESULTshaka::media::WebVttMediaParservirtual
Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) overrideshaka::media::WebVttMediaParservirtual
InitCB typedefshaka::media::MediaParser
InitCB typedefshaka::media::MediaParser
MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinline
NewSampleCB typedefshaka::media::MediaParser
NewSampleCB typedefshaka::media::MediaParser
Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULTshaka::media::WebVttMediaParservirtual
WebVttMediaParser() (defined in shaka::media::WebVttMediaParser)shaka::media::WebVttMediaParser
~MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinlinevirtual
diff --git a/docs/d4/d18/structshaka_1_1media_1_1mp4_1_1EditListEntry.html b/docs/d4/d18/structshaka_1_1media_1_1mp4_1_1EditListEntry.html index 76b0c9fc3a..5f8a127a15 100644 --- a/docs/d4/d18/structshaka_1_1media_1_1mp4_1_1EditListEntry.html +++ b/docs/d4/d18/structshaka_1_1media_1_1mp4_1_1EditListEntry.html @@ -118,7 +118,7 @@ int16_t media_rate_fractio diff --git a/docs/d4/d20/classshaka_1_1media_1_1AesCbcEncryptor.html b/docs/d4/d20/classshaka_1_1media_1_1AesCbcEncryptor.html index 158d0743c4..9dd793a8cd 100644 --- a/docs/d4/d20/classshaka_1_1media_1_1AesCbcEncryptor.html +++ b/docs/d4/d20/classshaka_1_1media_1_1AesCbcEncryptor.html @@ -235,7 +235,7 @@ AES_KEY * mutable_aes_key< diff --git a/docs/d4/d20/structshaka_1_1media_1_1mp4_1_1ChunkLargeOffset-members.html b/docs/d4/d20/structshaka_1_1media_1_1mp4_1_1ChunkLargeOffset-members.html index eb51184d69..b23e7b5cc9 100644 --- a/docs/d4/d20/structshaka_1_1media_1_1mp4_1_1ChunkLargeOffset-members.html +++ b/docs/d4/d20/structshaka_1_1media_1_1mp4_1_1ChunkLargeOffset-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d2c/structshaka_1_1media_1_1mp4_1_1ID3v2-members.html b/docs/d4/d2c/structshaka_1_1media_1_1mp4_1_1ID3v2-members.html index d3216ce98b..49118bad0d 100644 --- a/docs/d4/d2c/structshaka_1_1media_1_1mp4_1_1ID3v2-members.html +++ b/docs/d4/d2c/structshaka_1_1media_1_1mp4_1_1ID3v2-members.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d33/structshaka_1_1media_1_1mp4_1_1WebVTTSourceLabelBox.html b/docs/d4/d33/structshaka_1_1media_1_1mp4_1_1WebVTTSourceLabelBox.html index 497a6181c1..f5077c9b86 100644 --- a/docs/d4/d33/structshaka_1_1media_1_1mp4_1_1WebVTTSourceLabelBox.html +++ b/docs/d4/d33/structshaka_1_1media_1_1mp4_1_1WebVTTSourceLabelBox.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d4/d37/io__cache_8cc_source.html b/docs/d4/d37/io__cache_8cc_source.html index 86f6ea73f2..777e1932a2 100644 --- a/docs/d4/d37/io__cache_8cc_source.html +++ b/docs/d4/d37/io__cache_8cc_source.html @@ -246,7 +246,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d3a/structshaka_1_1media_1_1H264Sps-members.html b/docs/d4/d3a/structshaka_1_1media_1_1H264Sps-members.html index 3efa078f8f..151add94ac 100644 --- a/docs/d4/d3a/structshaka_1_1media_1_1H264Sps-members.html +++ b/docs/d4/d3a/structshaka_1_1media_1_1H264Sps-members.html @@ -142,7 +142,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d4a/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationOffset-members.html b/docs/d4/d4a/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationOffset-members.html index 24e2253b66..4ba432b29a 100644 --- a/docs/d4/d4a/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationOffset-members.html +++ b/docs/d4/d4a/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationOffset-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d4c/structshaka_1_1media_1_1H264WeightingFactors.html b/docs/d4/d4c/structshaka_1_1media_1_1H264WeightingFactors.html index 4fa608d4ab..793f178dba 100644 --- a/docs/d4/d4c/structshaka_1_1media_1_1H264WeightingFactors.html +++ b/docs/d4/d4c/structshaka_1_1media_1_1H264WeightingFactors.html @@ -124,7 +124,7 @@ int chroma_offset [32] diff --git a/docs/d4/d58/classshaka_1_1media_1_1Nalu-members.html b/docs/d4/d58/classshaka_1_1media_1_1Nalu-members.html index 1c84777004..ee6f17aa48 100644 --- a/docs/d4/d58/classshaka_1_1media_1_1Nalu-members.html +++ b/docs/d4/d58/classshaka_1_1media_1_1Nalu-members.html @@ -158,7 +158,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d59/classshaka_1_1media_1_1WebMWebVTTParser.html b/docs/d4/d59/classshaka_1_1media_1_1WebMWebVTTParser.html index 240b558d68..27a99b8573 100644 --- a/docs/d4/d59/classshaka_1_1media_1_1WebMWebVTTParser.html +++ b/docs/d4/d59/classshaka_1_1media_1_1WebMWebVTTParser.html @@ -111,7 +111,7 @@ static void  diff --git a/docs/d4/d5c/classshaka_1_1media_1_1DecryptConfig-members.html b/docs/d4/d5c/classshaka_1_1media_1_1DecryptConfig-members.html index c01e2dd435..0b981e9fb5 100644 --- a/docs/d4/d5c/classshaka_1_1media_1_1DecryptConfig-members.html +++ b/docs/d4/d5c/classshaka_1_1media_1_1DecryptConfig-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d5d/classshaka_1_1media_1_1UdpFile-members.html b/docs/d4/d5d/classshaka_1_1media_1_1UdpFile-members.html index 0d67c6adbc..4ab4e22ebf 100644 --- a/docs/d4/d5d/classshaka_1_1media_1_1UdpFile-members.html +++ b/docs/d4/d5d/classshaka_1_1media_1_1UdpFile-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d70/classshaka_1_1DashIopMpdNotifier.html b/docs/d4/d70/classshaka_1_1DashIopMpdNotifier.html index c34f8cb90c..089aae1a1a 100644 --- a/docs/d4/d70/classshaka_1_1DashIopMpdNotifier.html +++ b/docs/d4/d70/classshaka_1_1DashIopMpdNotifier.html @@ -475,7 +475,7 @@ class DashIopMpdNotifierTe diff --git a/docs/d4/d70/structshaka_1_1SegmentInfo-members.html b/docs/d4/d70/structshaka_1_1SegmentInfo-members.html index bf6aff11be..9a9ec78eb2 100644 --- a/docs/d4/d70/structshaka_1_1SegmentInfo-members.html +++ b/docs/d4/d70/structshaka_1_1SegmentInfo-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d87/nalu__reader_8h_source.html b/docs/d4/d87/nalu__reader_8h_source.html index 0bd678a478..bf5fad7ead 100644 --- a/docs/d4/d87/nalu__reader_8h_source.html +++ b/docs/d4/d87/nalu__reader_8h_source.html @@ -299,7 +299,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d8a/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord.html b/docs/d4/d8a/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord.html index b693e32501..738e97e775 100644 --- a/docs/d4/d8a/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord.html +++ b/docs/d4/d8a/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord.html @@ -171,7 +171,7 @@ void  diff --git a/docs/d4/d8d/structshaka_1_1media_1_1mp4_1_1EC3Specific.html b/docs/d4/d8d/structshaka_1_1media_1_1mp4_1_1EC3Specific.html index a692edb9a7..07f2636c30 100644 --- a/docs/d4/d8d/structshaka_1_1media_1_1mp4_1_1EC3Specific.html +++ b/docs/d4/d8d/structshaka_1_1media_1_1mp4_1_1EC3Specific.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d4/d8e/classshaka_1_1media_1_1UdpOptions.html b/docs/d4/d8e/classshaka_1_1media_1_1UdpOptions.html index ba957be529..e4cbff5c04 100644 --- a/docs/d4/d8e/classshaka_1_1media_1_1UdpOptions.html +++ b/docs/d4/d8e/classshaka_1_1media_1_1UdpOptions.html @@ -170,7 +170,7 @@ Static Public Member Functions diff --git a/docs/d4/da6/classshaka_1_1media_1_1PlayReadyKeySource.html b/docs/d4/da6/classshaka_1_1media_1_1PlayReadyKeySource.html index 36fe24b091..20bd9d0fba 100644 --- a/docs/d4/da6/classshaka_1_1media_1_1PlayReadyKeySource.html +++ b/docs/d4/da6/classshaka_1_1media_1_1PlayReadyKeySource.html @@ -556,7 +556,7 @@ Additional Inherited Members diff --git a/docs/d4/da7/segmenter__test__base_8cc_source.html b/docs/d4/da7/segmenter__test__base_8cc_source.html index ba7c46e2d3..5822489e9d 100644 --- a/docs/d4/da7/segmenter__test__base_8cc_source.html +++ b/docs/d4/da7/segmenter__test__base_8cc_source.html @@ -138,19 +138,19 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
50 }
51 
-
52 scoped_refptr<MediaSample> SegmentTestBase::CreateSample(
+
52 std::shared_ptr<MediaSample> SegmentTestBase::CreateSample(
53  KeyFrameFlag key_frame_flag,
54  uint64_t duration,
55  SideDataFlag side_data_flag) {
-
56  scoped_refptr<MediaSample> sample;
+
56  std::shared_ptr<MediaSample> sample;
57  const bool is_key_frame = key_frame_flag == kKeyFrame;
58  if (side_data_flag == kGenerateSideData) {
-
59  sample = MediaSample::CopyFrom(
+
59  sample = MediaSample::CopyFrom(
60  kTestMediaSampleData, sizeof(kTestMediaSampleData),
61  kTestMediaSampleSideData, sizeof(kTestMediaSampleSideData),
62  is_key_frame);
63  } else {
-
64  sample = MediaSample::CopyFrom(kTestMediaSampleData,
+
64  sample = MediaSample::CopyFrom(kTestMediaSampleData,
65  sizeof(kTestMediaSampleData), is_key_frame);
66  }
67  sample->set_dts(cur_time_timescale_);
@@ -288,18 +288,18 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:18
std::string OutputFileName() const
Gets the file name of the current output file.
-
scoped_refptr< MediaSample > CreateSample(KeyFrameFlag key_frame_flag, uint64_t duration, SideDataFlag side_data_flag)
Creates a new media sample.
+
std::shared_ptr< MediaSample > CreateSample(KeyFrameFlag key_frame_flag, uint64_t duration, SideDataFlag side_data_flag)
Creates a new media sample.
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:185
std::string temp_dir
Specify temporary directory for intermediate files.
Definition: muxer_options.h:67
MuxerOptions CreateMuxerOptions() const
Creates a Muxer options object for testing.
+
static std::shared_ptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
Definition: media_sample.cc:45
-
static scoped_refptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
Definition: media_sample.cc:45
Holds video stream information.
diff --git a/docs/d4/dad/structshaka_1_1media_1_1mp4_1_1SampleEncryption.html b/docs/d4/dad/structshaka_1_1media_1_1mp4_1_1SampleEncryption.html index 92c0de52d8..6eb894e50c 100644 --- a/docs/d4/dad/structshaka_1_1media_1_1mp4_1_1SampleEncryption.html +++ b/docs/d4/dad/structshaka_1_1media_1_1mp4_1_1SampleEncryption.html @@ -250,7 +250,7 @@ Additional Inherited Members diff --git a/docs/d4/db1/structshaka_1_1media_1_1mp4_1_1CompactSampleSize-members.html b/docs/d4/db1/structshaka_1_1media_1_1mp4_1_1CompactSampleSize-members.html index 60a2b369d9..61fe604b93 100644 --- a/docs/d4/db1/structshaka_1_1media_1_1mp4_1_1CompactSampleSize-members.html +++ b/docs/d4/db1/structshaka_1_1media_1_1mp4_1_1CompactSampleSize-members.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/db2/cluster__builder_8h_source.html b/docs/d4/db2/cluster__builder_8h_source.html index 5078ed4a52..0f9a42bf9d 100644 --- a/docs/d4/db2/cluster__builder_8h_source.html +++ b/docs/d4/db2/cluster__builder_8h_source.html @@ -181,7 +181,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/db4/classshaka_1_1MpdNotifierFactory.html b/docs/d4/db4/classshaka_1_1MpdNotifierFactory.html index 106224516a..bef2e65f29 100644 --- a/docs/d4/db4/classshaka_1_1MpdNotifierFactory.html +++ b/docs/d4/db4/classshaka_1_1MpdNotifierFactory.html @@ -113,7 +113,7 @@ virtual std::unique_ptr
diff --git a/docs/d4/db9/structshaka_1_1media_1_1mp4_1_1MediaHeader.html b/docs/d4/db9/structshaka_1_1media_1_1mp4_1_1MediaHeader.html index 4fba188c72..d8aee6de68 100644 --- a/docs/d4/db9/structshaka_1_1media_1_1mp4_1_1MediaHeader.html +++ b/docs/d4/db9/structshaka_1_1media_1_1mp4_1_1MediaHeader.html @@ -194,7 +194,7 @@ Additional Inherited Members diff --git a/docs/d4/dc8/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter.html b/docs/d4/dc8/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter.html index 81dd212a71..20af7b7d26 100644 --- a/docs/d4/dc8/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter.html +++ b/docs/d4/dc8/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter.html @@ -140,7 +140,7 @@ static const uint8_t kElem diff --git a/docs/d4/dd3/bit__reader_8h_source.html b/docs/d4/dd3/bit__reader_8h_source.html index 6fda75a94d..01182edb10 100644 --- a/docs/d4/dd3/bit__reader_8h_source.html +++ b/docs/d4/dd3/bit__reader_8h_source.html @@ -186,7 +186,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/dd4/structshaka_1_1media_1_1mp4_1_1FullBox-members.html b/docs/d4/dd4/structshaka_1_1media_1_1mp4_1_1FullBox-members.html index 6a01be3e75..efaabb5382 100644 --- a/docs/d4/dd4/structshaka_1_1media_1_1mp4_1_1FullBox-members.html +++ b/docs/d4/dd4/structshaka_1_1media_1_1mp4_1_1FullBox-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/ddb/classshaka_1_1media_1_1MemoryFile-members.html b/docs/d4/ddb/classshaka_1_1media_1_1MemoryFile-members.html index 01416a36a2..6c3e7612e9 100644 --- a/docs/d4/ddb/classshaka_1_1media_1_1MemoryFile-members.html +++ b/docs/d4/ddb/classshaka_1_1media_1_1MemoryFile-members.html @@ -119,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/dde/webvtt__util_8h_source.html b/docs/d4/dde/webvtt__util_8h_source.html index 89673ad7b2..c938b1c6fc 100644 --- a/docs/d4/dde/webvtt__util_8h_source.html +++ b/docs/d4/dde/webvtt__util_8h_source.html @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/de3/structshaka_1_1media_1_1mp4_1_1DataReference.html b/docs/d4/de3/structshaka_1_1media_1_1mp4_1_1DataReference.html index f963cdac01..bab46c7443 100644 --- a/docs/d4/de3/structshaka_1_1media_1_1mp4_1_1DataReference.html +++ b/docs/d4/de3/structshaka_1_1media_1_1mp4_1_1DataReference.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d4/de6/classshaka_1_1media_1_1ProgressListener.html b/docs/d4/de6/classshaka_1_1media_1_1ProgressListener.html index 71d46087c5..93a8428591 100644 --- a/docs/d4/de6/classshaka_1_1media_1_1ProgressListener.html +++ b/docs/d4/de6/classshaka_1_1media_1_1ProgressListener.html @@ -146,7 +146,7 @@ Public Member Functions diff --git a/docs/d4/de7/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener-members.html b/docs/d4/de7/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener-members.html index 62781e0159..5ae6b5215b 100644 --- a/docs/d4/de7/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener-members.html +++ b/docs/d4/de7/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/dec/hls__flags_8h_source.html b/docs/d4/dec/hls__flags_8h_source.html index c5b6c46597..63b4a3f7fb 100644 --- a/docs/d4/dec/hls__flags_8h_source.html +++ b/docs/d4/dec/hls__flags_8h_source.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/df5/request__signer_8cc_source.html b/docs/d4/df5/request__signer_8cc_source.html index ec5d8a28b7..27c2b0b3f2 100644 --- a/docs/d4/df5/request__signer_8cc_source.html +++ b/docs/d4/df5/request__signer_8cc_source.html @@ -179,7 +179,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/df9/structshaka_1_1media_1_1mp4_1_1SegmentIndex.html b/docs/d4/df9/structshaka_1_1media_1_1mp4_1_1SegmentIndex.html index 97f8459583..475660a424 100644 --- a/docs/d4/df9/structshaka_1_1media_1_1mp4_1_1SegmentIndex.html +++ b/docs/d4/df9/structshaka_1_1media_1_1mp4_1_1SegmentIndex.html @@ -194,7 +194,7 @@ Additional Inherited Members diff --git a/docs/d4/dfa/structshaka_1_1media_1_1mp4_1_1AC3Specific.html b/docs/d4/dfa/structshaka_1_1media_1_1mp4_1_1AC3Specific.html index c52302c893..ea1812f4ca 100644 --- a/docs/d4/dfa/structshaka_1_1media_1_1mp4_1_1AC3Specific.html +++ b/docs/d4/dfa/structshaka_1_1media_1_1mp4_1_1AC3Specific.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d4/dfd/structshaka_1_1media_1_1H265Sps.html b/docs/d4/dfd/structshaka_1_1media_1_1H265Sps.html index 60581ee058..d4ea1e180a 100644 --- a/docs/d4/dfd/structshaka_1_1media_1_1H265Sps.html +++ b/docs/d4/dfd/structshaka_1_1media_1_1H265Sps.html @@ -256,7 +256,7 @@ bool vui_parameters_presen diff --git a/docs/d4/dff/webm__media__parser_8cc_source.html b/docs/d4/dff/webm__media__parser_8cc_source.html index 76de1efa63..9dcc5ddcd3 100644 --- a/docs/d4/dff/webm__media__parser_8cc_source.html +++ b/docs/d4/dff/webm__media__parser_8cc_source.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
26 WebMMediaParser::~WebMMediaParser() {}
27 
28 void WebMMediaParser::Init(const InitCB& init_cb,
-
29  const NewSampleCB& new_sample_cb,
+
29  const NewSampleCB& new_sample_cb,
30  KeySource* decryption_key_source) {
31  DCHECK_EQ(state_, kWaitingForInit);
32  DCHECK(init_cb_.is_null());
@@ -273,7 +273,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
184  double timecode_scale_in_us = info_parser.timecode_scale() / 1000.0;
185  int64_t duration_in_us = info_parser.duration() * timecode_scale_in_us;
186 
-
187  scoped_refptr<AudioStreamInfo> audio_stream_info =
+
187  std::shared_ptr<AudioStreamInfo> audio_stream_info =
188  tracks_parser.audio_stream_info();
189  if (audio_stream_info) {
190  audio_stream_info->set_duration(duration_in_us);
@@ -281,7 +281,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
192  VLOG(1) << "No audio track info found.";
193  }
194 
-
195  scoped_refptr<VideoStreamInfo> video_stream_info =
+
195  std::shared_ptr<VideoStreamInfo> video_stream_info =
196  tracks_parser.video_stream_info();
197  if (video_stream_info) {
198  video_stream_info->set_duration(duration_in_us);
@@ -357,14 +357,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
void Push(const uint8_t *data, int size)
Append new bytes to the end of the queue.
Definition: byte_queue.cc:29
void Pop(int count)
Definition: byte_queue.cc:70
virtual Status FetchKeys(const std::vector< uint8_t > &pssh_box)=0
+
base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
Definition: media_parser.h:43
void Reset()
Reset the queue to the empty state.
Definition: byte_queue.cc:24
void Peek(const uint8_t **data, int *size) const
Definition: byte_queue.cc:63
-
base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
Definition: media_parser.h:43
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:30
diff --git a/docs/d5/d03/structshaka_1_1media_1_1mp4_1_1FileType.html b/docs/d5/d03/structshaka_1_1media_1_1mp4_1_1FileType.html index 86817c927a..8446916c9b 100644 --- a/docs/d5/d03/structshaka_1_1media_1_1mp4_1_1FileType.html +++ b/docs/d5/d03/structshaka_1_1media_1_1mp4_1_1FileType.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d5/d05/structshaka_1_1media_1_1mp4_1_1OriginalFormat.html b/docs/d5/d05/structshaka_1_1media_1_1mp4_1_1OriginalFormat.html index 6d41b46fe2..3265902735 100644 --- a/docs/d5/d05/structshaka_1_1media_1_1mp4_1_1OriginalFormat.html +++ b/docs/d5/d05/structshaka_1_1media_1_1mp4_1_1OriginalFormat.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d5/d09/structshaka_1_1media_1_1mp4_1_1CueIDBox.html b/docs/d5/d09/structshaka_1_1media_1_1mp4_1_1CueIDBox.html index a17e4d8eec..36b4303e4d 100644 --- a/docs/d5/d09/structshaka_1_1media_1_1mp4_1_1CueIDBox.html +++ b/docs/d5/d09/structshaka_1_1media_1_1mp4_1_1CueIDBox.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d5/d11/classshaka_1_1media_1_1WebMInfoParser-members.html b/docs/d5/d11/classshaka_1_1media_1_1WebMInfoParser-members.html index 30693fcda2..da5e447a41 100644 --- a/docs/d5/d11/classshaka_1_1media_1_1WebMInfoParser-members.html +++ b/docs/d5/d11/classshaka_1_1media_1_1WebMInfoParser-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d11/structshaka_1_1media_1_1mp4_1_1ElementaryStreamDescriptor.html b/docs/d5/d11/structshaka_1_1media_1_1mp4_1_1ElementaryStreamDescriptor.html index ee7dc20875..bd1235ce6f 100644 --- a/docs/d5/d11/structshaka_1_1media_1_1mp4_1_1ElementaryStreamDescriptor.html +++ b/docs/d5/d11/structshaka_1_1media_1_1mp4_1_1ElementaryStreamDescriptor.html @@ -185,7 +185,7 @@ Additional Inherited Members diff --git a/docs/d5/d13/classshaka_1_1media_1_1ESDescriptor.html b/docs/d5/d13/classshaka_1_1media_1_1ESDescriptor.html index 1b73c16e2a..424714ae7f 100644 --- a/docs/d5/d13/classshaka_1_1media_1_1ESDescriptor.html +++ b/docs/d5/d13/classshaka_1_1media_1_1ESDescriptor.html @@ -181,7 +181,7 @@ bool IsDTS () const diff --git a/docs/d5/d15/producer__consumer__queue_8h_source.html b/docs/d5/d15/producer__consumer__queue_8h_source.html index 6a84e0de1d..c00c8346a6 100644 --- a/docs/d5/d15/producer__consumer__queue_8h_source.html +++ b/docs/d5/d15/producer__consumer__queue_8h_source.html @@ -374,7 +374,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d1a/ts__section_8h_source.html b/docs/d5/d1a/ts__section_8h_source.html index feb8898771..b3eade0b68 100644 --- a/docs/d5/d1a/ts__section_8h_source.html +++ b/docs/d5/d1a/ts__section_8h_source.html @@ -134,7 +134,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d26/classshaka_1_1media_1_1mp4_1_1TrackRunIterator-members.html b/docs/d5/d26/classshaka_1_1media_1_1mp4_1_1TrackRunIterator-members.html index ad8bab8a73..b102c85254 100644 --- a/docs/d5/d26/classshaka_1_1media_1_1mp4_1_1TrackRunIterator-members.html +++ b/docs/d5/d26/classshaka_1_1media_1_1mp4_1_1TrackRunIterator-members.html @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d27/key__fetcher_8cc_source.html b/docs/d5/d27/key__fetcher_8cc_source.html index 8ef013f0f2..65fe8166ce 100644 --- a/docs/d5/d27/key__fetcher_8cc_source.html +++ b/docs/d5/d27/key__fetcher_8cc_source.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html b/docs/d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html index e15b61a3a6..c5e0fba161 100644 --- a/docs/d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html +++ b/docs/d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html @@ -501,7 +501,7 @@ template<class T > diff --git a/docs/d5/d3b/structshaka_1_1media_1_1mp4_1_1Media-members.html b/docs/d5/d3b/structshaka_1_1media_1_1mp4_1_1Media-members.html index 4ef47354b6..4c38520e20 100644 --- a/docs/d5/d3b/structshaka_1_1media_1_1mp4_1_1Media-members.html +++ b/docs/d5/d3b/structshaka_1_1media_1_1mp4_1_1Media-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d40/webm_2single__segment__segmenter_8h_source.html b/docs/d5/d40/webm_2single__segment__segmenter_8h_source.html index 2a7e82ed07..b8adfba089 100644 --- a/docs/d5/d40/webm_2single__segment__segmenter_8h_source.html +++ b/docs/d5/d40/webm_2single__segment__segmenter_8h_source.html @@ -154,12 +154,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
bool GetIndexRangeStartAndEnd(uint64_t *start, uint64_t *end) override
This structure contains the list of configuration options for Muxer.
Definition: muxer_options.h:18
An implementation of IMkvWriter using our File type.
Definition: mkv_writer.h:21
- + diff --git a/docs/d5/d4b/classshaka_1_1media_1_1mp2t_1_1TsSectionPsi-members.html b/docs/d5/d4b/classshaka_1_1media_1_1mp2t_1_1TsSectionPsi-members.html index 2e3f3caf25..15988e3308 100644 --- a/docs/d5/d4b/classshaka_1_1media_1_1mp2t_1_1TsSectionPsi-members.html +++ b/docs/d5/d4b/classshaka_1_1media_1_1mp2t_1_1TsSectionPsi-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d4d/box_8cc_source.html b/docs/d5/d4d/box_8cc_source.html index ec68e8b564..9b49107246 100644 --- a/docs/d5/d4d/box_8cc_source.html +++ b/docs/d5/d4d/box_8cc_source.html @@ -195,7 +195,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d52/ts__section__pes_8h_source.html b/docs/d5/d52/ts__section__pes_8h_source.html index 6da2d354c2..7b1e1c8384 100644 --- a/docs/d5/d52/ts__section__pes_8h_source.html +++ b/docs/d5/d52/ts__section__pes_8h_source.html @@ -160,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d53/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationSize-members.html b/docs/d5/d53/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationSize-members.html index 233ce49887..9d94f598ab 100644 --- a/docs/d5/d53/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationSize-members.html +++ b/docs/d5/d53/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationSize-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d57/classshaka_1_1RepresentationStateChangeListener-members.html b/docs/d5/d57/classshaka_1_1RepresentationStateChangeListener-members.html index 1fb235d2c0..6c42ab96b6 100644 --- a/docs/d5/d57/classshaka_1_1RepresentationStateChangeListener-members.html +++ b/docs/d5/d57/classshaka_1_1RepresentationStateChangeListener-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d59/classshaka_1_1MockRepresentation-members.html b/docs/d5/d59/classshaka_1_1MockRepresentation-members.html index 69f68d97d5..64bf015e73 100644 --- a/docs/d5/d59/classshaka_1_1MockRepresentation-members.html +++ b/docs/d5/d59/classshaka_1_1MockRepresentation-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d5c/continuity__counter_8cc_source.html b/docs/d5/d5c/continuity__counter_8cc_source.html index 4c2bdde1d7..86d76c2638 100644 --- a/docs/d5/d5c/continuity__counter_8cc_source.html +++ b/docs/d5/d5c/continuity__counter_8cc_source.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d63/classshaka_1_1media_1_1mp2t_1_1EsParserH265.html b/docs/d5/d63/classshaka_1_1media_1_1mp2t_1_1EsParserH265.html index 9d952ebefa..a8387b58e6 100644 --- a/docs/d5/d63/classshaka_1_1media_1_1mp2t_1_1EsParserH265.html +++ b/docs/d5/d63/classshaka_1_1media_1_1mp2t_1_1EsParserH265.html @@ -136,15 +136,15 @@ uint32_t pid ()

Additional Inherited Members

- Public Types inherited from shaka::media::mp2t::EsParser - + typedef base::Callback< void(const
-scoped_refptr< StreamInfo > &)> NewStreamInfoCB -  - +std::shared_ptr< StreamInfo > &)> NewStreamInfoCB +  + typedef base::Callback< void(uint32_t,
-const scoped_refptr
+const std::shared_ptr
< MediaSample > &)> EmitSampleCB -  +  - Protected Member Functions inherited from shaka::media::mp2t::EsParserH26x const
@@ -161,7 +161,7 @@ const
diff --git a/docs/d5/d63/network__util_8cc_source.html b/docs/d5/d63/network__util_8cc_source.html index 1687892e9a..7e892ddb20 100644 --- a/docs/d5/d63/network__util_8cc_source.html +++ b/docs/d5/d63/network__util_8cc_source.html @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html b/docs/d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html index 704d0801b5..b2d9ecfe9a 100644 --- a/docs/d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html +++ b/docs/d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html @@ -112,7 +112,7 @@ class NalUnitToByteStreamC

Detailed Description

-

Definition at line 35 of file nal_unit_to_byte_stream_converter.h.

+

Definition at line 34 of file nal_unit_to_byte_stream_converter.h.

Member Function Documentation

@@ -296,7 +296,7 @@ class NalUnitToByteStreamC
diff --git a/docs/d5/d6f/vlog__flags_8cc_source.html b/docs/d5/d6f/vlog__flags_8cc_source.html index af97800dcb..a401325194 100644 --- a/docs/d5/d6f/vlog__flags_8cc_source.html +++ b/docs/d5/d6f/vlog__flags_8cc_source.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d72/avc__decoder__configuration__record_8cc_source.html b/docs/d5/d72/avc__decoder__configuration__record_8cc_source.html index 0ab6efbaff..1105c70880 100644 --- a/docs/d5/d72/avc__decoder__configuration__record_8cc_source.html +++ b/docs/d5/d72/avc__decoder__configuration__record_8cc_source.html @@ -202,7 +202,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d7b/box__definitions_8h_source.html b/docs/d5/d7b/box__definitions_8h_source.html index 6fb98faaa3..7894db750e 100644 --- a/docs/d5/d7b/box__definitions_8h_source.html +++ b/docs/d5/d7b/box__definitions_8h_source.html @@ -1000,7 +1000,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d86/structshaka_1_1media_1_1mp4_1_1MediaInformation.html b/docs/d5/d86/structshaka_1_1media_1_1mp4_1_1MediaInformation.html index b314c62806..f9d9052b86 100644 --- a/docs/d5/d86/structshaka_1_1media_1_1mp4_1_1MediaInformation.html +++ b/docs/d5/d86/structshaka_1_1media_1_1mp4_1_1MediaInformation.html @@ -185,7 +185,7 @@ Additional Inherited Members diff --git a/docs/d5/d89/widevine__key__source_8cc_source.html b/docs/d5/d89/widevine__key__source_8cc_source.html index 5c4f70e9fc..8dc49a77e2 100644 --- a/docs/d5/d89/widevine__key__source_8cc_source.html +++ b/docs/d5/d89/widevine__key__source_8cc_source.html @@ -101,628 +101,601 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
12 #include "packager/base/bind.h"
13 #include "packager/base/json/json_reader.h"
14 #include "packager/base/json/json_writer.h"
-
15 #include "packager/base/memory/ref_counted.h"
-
16 #include "packager/media/base/fixed_key_source.h"
-
17 #include "packager/media/base/http_key_fetcher.h"
-
18 #include "packager/media/base/producer_consumer_queue.h"
-
19 #include "packager/media/base/protection_system_specific_info.h"
-
20 #include "packager/media/base/rcheck.h"
-
21 #include "packager/media/base/request_signer.h"
-
22 #include "packager/media/base/widevine_pssh_data.pb.h"
-
23 
-
24 namespace shaka {
-
25 namespace {
-
26 
-
27 const bool kEnableKeyRotation = true;
-
28 
-
29 const char kLicenseStatusOK[] = "OK";
-
30 // Server may return INTERNAL_ERROR intermittently, which is a transient error
-
31 // and the next client request may succeed without problem.
-
32 const char kLicenseStatusTransientError[] = "INTERNAL_ERROR";
-
33 
-
34 // Number of times to retry requesting keys in case of a transient error from
-
35 // the server.
-
36 const int kNumTransientErrorRetries = 5;
-
37 const int kFirstRetryDelayMilliseconds = 1000;
-
38 
-
39 // Default crypto period count, which is the number of keys to fetch on every
-
40 // key rotation enabled request.
-
41 const int kDefaultCryptoPeriodCount = 10;
-
42 const int kGetKeyTimeoutInSeconds = 5 * 60; // 5 minutes.
-
43 const int kKeyFetchTimeoutInSeconds = 60; // 1 minute.
-
44 
-
45 bool Base64StringToBytes(const std::string& base64_string,
-
46  std::vector<uint8_t>* bytes) {
-
47  DCHECK(bytes);
-
48  std::string str;
-
49  if (!base::Base64Decode(base64_string, &str))
-
50  return false;
-
51  bytes->assign(str.begin(), str.end());
-
52  return true;
-
53 }
-
54 
-
55 void BytesToBase64String(const std::vector<uint8_t>& bytes,
-
56  std::string* base64_string) {
-
57  DCHECK(base64_string);
-
58  base::Base64Encode(base::StringPiece(reinterpret_cast<const char*>
-
59  (bytes.data()), bytes.size()),
-
60  base64_string);
-
61 }
-
62 
-
63 bool GetKeyFromTrack(const base::DictionaryValue& track_dict,
-
64  std::vector<uint8_t>* key) {
-
65  DCHECK(key);
-
66  std::string key_base64_string;
-
67  RCHECK(track_dict.GetString("key", &key_base64_string));
-
68  VLOG(2) << "Key:" << key_base64_string;
-
69  RCHECK(Base64StringToBytes(key_base64_string, key));
-
70  return true;
-
71 }
-
72 
-
73 bool GetKeyIdFromTrack(const base::DictionaryValue& track_dict,
-
74  std::vector<uint8_t>* key_id) {
-
75  DCHECK(key_id);
-
76  std::string key_id_base64_string;
-
77  RCHECK(track_dict.GetString("key_id", &key_id_base64_string));
-
78  VLOG(2) << "Keyid:" << key_id_base64_string;
-
79  RCHECK(Base64StringToBytes(key_id_base64_string, key_id));
-
80  return true;
-
81 }
-
82 
-
83 bool GetPsshDataFromTrack(const base::DictionaryValue& track_dict,
-
84  std::vector<uint8_t>* pssh_data) {
-
85  DCHECK(pssh_data);
-
86 
-
87  const base::ListValue* pssh_list;
-
88  RCHECK(track_dict.GetList("pssh", &pssh_list));
-
89  // Invariant check. We don't want to crash in release mode if possible.
-
90  // The following code handles it gracefully if GetSize() does not return 1.
-
91  DCHECK_EQ(1u, pssh_list->GetSize());
-
92 
-
93  const base::DictionaryValue* pssh_dict;
-
94  RCHECK(pssh_list->GetDictionary(0, &pssh_dict));
-
95  std::string drm_type;
-
96  RCHECK(pssh_dict->GetString("drm_type", &drm_type));
-
97  if (drm_type != "WIDEVINE") {
-
98  LOG(ERROR) << "Expecting drm_type 'WIDEVINE', get '" << drm_type << "'.";
-
99  return false;
-
100  }
-
101  std::string pssh_data_base64_string;
-
102  RCHECK(pssh_dict->GetString("data", &pssh_data_base64_string));
-
103 
-
104  VLOG(2) << "Pssh Data:" << pssh_data_base64_string;
-
105  RCHECK(Base64StringToBytes(pssh_data_base64_string, pssh_data));
-
106  return true;
-
107 }
-
108 
-
109 } // namespace
-
110 
-
111 namespace media {
-
112 
-
113 // A ref counted wrapper for EncryptionKeyMap.
-
114 class WidevineKeySource::RefCountedEncryptionKeyMap
-
115  : public base::RefCountedThreadSafe<RefCountedEncryptionKeyMap> {
-
116  public:
-
117  explicit RefCountedEncryptionKeyMap(EncryptionKeyMap* encryption_key_map) {
-
118  DCHECK(encryption_key_map);
-
119  encryption_key_map_.swap(*encryption_key_map);
-
120  }
-
121 
-
122  const EncryptionKeyMap& map() { return encryption_key_map_; }
-
123 
-
124  private:
-
125  friend class base::RefCountedThreadSafe<RefCountedEncryptionKeyMap>;
-
126 
-
127  ~RefCountedEncryptionKeyMap() {}
-
128 
-
129  EncryptionKeyMap encryption_key_map_;
-
130 
-
131  DISALLOW_COPY_AND_ASSIGN(RefCountedEncryptionKeyMap);
-
132 };
-
133 
-
134 WidevineKeySource::WidevineKeySource(const std::string& server_url,
-
135  bool add_common_pssh)
-
136  : key_production_thread_("KeyProductionThread",
-
137  base::Bind(&WidevineKeySource::FetchKeysTask,
-
138  base::Unretained(this))),
-
139  key_fetcher_(new HttpKeyFetcher(kKeyFetchTimeoutInSeconds)),
-
140  server_url_(server_url),
-
141  crypto_period_count_(kDefaultCryptoPeriodCount),
-
142  add_common_pssh_(add_common_pssh),
-
143  key_production_started_(false),
-
144  start_key_production_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
-
145  base::WaitableEvent::InitialState::NOT_SIGNALED),
-
146  first_crypto_period_index_(0) {
-
147  key_production_thread_.Start();
+
15 #include "packager/media/base/fixed_key_source.h"
+
16 #include "packager/media/base/http_key_fetcher.h"
+
17 #include "packager/media/base/producer_consumer_queue.h"
+
18 #include "packager/media/base/protection_system_specific_info.h"
+
19 #include "packager/media/base/rcheck.h"
+
20 #include "packager/media/base/request_signer.h"
+
21 #include "packager/media/base/widevine_pssh_data.pb.h"
+
22 
+
23 namespace shaka {
+
24 namespace {
+
25 
+
26 const bool kEnableKeyRotation = true;
+
27 
+
28 const char kLicenseStatusOK[] = "OK";
+
29 // Server may return INTERNAL_ERROR intermittently, which is a transient error
+
30 // and the next client request may succeed without problem.
+
31 const char kLicenseStatusTransientError[] = "INTERNAL_ERROR";
+
32 
+
33 // Number of times to retry requesting keys in case of a transient error from
+
34 // the server.
+
35 const int kNumTransientErrorRetries = 5;
+
36 const int kFirstRetryDelayMilliseconds = 1000;
+
37 
+
38 // Default crypto period count, which is the number of keys to fetch on every
+
39 // key rotation enabled request.
+
40 const int kDefaultCryptoPeriodCount = 10;
+
41 const int kGetKeyTimeoutInSeconds = 5 * 60; // 5 minutes.
+
42 const int kKeyFetchTimeoutInSeconds = 60; // 1 minute.
+
43 
+
44 bool Base64StringToBytes(const std::string& base64_string,
+
45  std::vector<uint8_t>* bytes) {
+
46  DCHECK(bytes);
+
47  std::string str;
+
48  if (!base::Base64Decode(base64_string, &str))
+
49  return false;
+
50  bytes->assign(str.begin(), str.end());
+
51  return true;
+
52 }
+
53 
+
54 void BytesToBase64String(const std::vector<uint8_t>& bytes,
+
55  std::string* base64_string) {
+
56  DCHECK(base64_string);
+
57  base::Base64Encode(base::StringPiece(reinterpret_cast<const char*>
+
58  (bytes.data()), bytes.size()),
+
59  base64_string);
+
60 }
+
61 
+
62 bool GetKeyFromTrack(const base::DictionaryValue& track_dict,
+
63  std::vector<uint8_t>* key) {
+
64  DCHECK(key);
+
65  std::string key_base64_string;
+
66  RCHECK(track_dict.GetString("key", &key_base64_string));
+
67  VLOG(2) << "Key:" << key_base64_string;
+
68  RCHECK(Base64StringToBytes(key_base64_string, key));
+
69  return true;
+
70 }
+
71 
+
72 bool GetKeyIdFromTrack(const base::DictionaryValue& track_dict,
+
73  std::vector<uint8_t>* key_id) {
+
74  DCHECK(key_id);
+
75  std::string key_id_base64_string;
+
76  RCHECK(track_dict.GetString("key_id", &key_id_base64_string));
+
77  VLOG(2) << "Keyid:" << key_id_base64_string;
+
78  RCHECK(Base64StringToBytes(key_id_base64_string, key_id));
+
79  return true;
+
80 }
+
81 
+
82 bool GetPsshDataFromTrack(const base::DictionaryValue& track_dict,
+
83  std::vector<uint8_t>* pssh_data) {
+
84  DCHECK(pssh_data);
+
85 
+
86  const base::ListValue* pssh_list;
+
87  RCHECK(track_dict.GetList("pssh", &pssh_list));
+
88  // Invariant check. We don't want to crash in release mode if possible.
+
89  // The following code handles it gracefully if GetSize() does not return 1.
+
90  DCHECK_EQ(1u, pssh_list->GetSize());
+
91 
+
92  const base::DictionaryValue* pssh_dict;
+
93  RCHECK(pssh_list->GetDictionary(0, &pssh_dict));
+
94  std::string drm_type;
+
95  RCHECK(pssh_dict->GetString("drm_type", &drm_type));
+
96  if (drm_type != "WIDEVINE") {
+
97  LOG(ERROR) << "Expecting drm_type 'WIDEVINE', get '" << drm_type << "'.";
+
98  return false;
+
99  }
+
100  std::string pssh_data_base64_string;
+
101  RCHECK(pssh_dict->GetString("data", &pssh_data_base64_string));
+
102 
+
103  VLOG(2) << "Pssh Data:" << pssh_data_base64_string;
+
104  RCHECK(Base64StringToBytes(pssh_data_base64_string, pssh_data));
+
105  return true;
+
106 }
+
107 
+
108 } // namespace
+
109 
+
110 namespace media {
+
111 
+
112 WidevineKeySource::WidevineKeySource(const std::string& server_url,
+
113  bool add_common_pssh)
+
114  : key_production_thread_("KeyProductionThread",
+
115  base::Bind(&WidevineKeySource::FetchKeysTask,
+
116  base::Unretained(this))),
+
117  key_fetcher_(new HttpKeyFetcher(kKeyFetchTimeoutInSeconds)),
+
118  server_url_(server_url),
+
119  crypto_period_count_(kDefaultCryptoPeriodCount),
+
120  add_common_pssh_(add_common_pssh),
+
121  key_production_started_(false),
+
122  start_key_production_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
+
123  base::WaitableEvent::InitialState::NOT_SIGNALED),
+
124  first_crypto_period_index_(0) {
+
125  key_production_thread_.Start();
+
126 }
+
127 
+
128 WidevineKeySource::~WidevineKeySource() {
+
129  if (key_pool_)
+
130  key_pool_->Stop();
+
131  if (key_production_thread_.HasBeenStarted()) {
+
132  // Signal the production thread to start key production if it is not
+
133  // signaled yet so the thread can be joined.
+
134  start_key_production_.Signal();
+
135  key_production_thread_.Join();
+
136  }
+
137 }
+
138 
+
139 Status WidevineKeySource::FetchKeys(const std::vector<uint8_t>& content_id,
+
140  const std::string& policy) {
+
141  base::AutoLock scoped_lock(lock_);
+
142  request_dict_.Clear();
+
143  std::string content_id_base64_string;
+
144  BytesToBase64String(content_id, &content_id_base64_string);
+
145  request_dict_.SetString("content_id", content_id_base64_string);
+
146  request_dict_.SetString("policy", policy);
+
147  return FetchKeysInternal(!kEnableKeyRotation, 0, false);
148 }
149 
-
150 WidevineKeySource::~WidevineKeySource() {
-
151  if (key_pool_)
-
152  key_pool_->Stop();
-
153  if (key_production_thread_.HasBeenStarted()) {
-
154  // Signal the production thread to start key production if it is not
-
155  // signaled yet so the thread can be joined.
-
156  start_key_production_.Signal();
-
157  key_production_thread_.Join();
-
158  }
-
159 }
-
160 
-
161 Status WidevineKeySource::FetchKeys(const std::vector<uint8_t>& content_id,
-
162  const std::string& policy) {
-
163  base::AutoLock scoped_lock(lock_);
-
164  request_dict_.Clear();
-
165  std::string content_id_base64_string;
-
166  BytesToBase64String(content_id, &content_id_base64_string);
-
167  request_dict_.SetString("content_id", content_id_base64_string);
-
168  request_dict_.SetString("policy", policy);
-
169  return FetchKeysInternal(!kEnableKeyRotation, 0, false);
-
170 }
-
171 
-
172 Status WidevineKeySource::FetchKeys(const std::vector<uint8_t>& pssh_box) {
-
173  const std::vector<uint8_t> widevine_system_id(
-
174  kWidevineSystemId, kWidevineSystemId + arraysize(kWidevineSystemId));
-
175 
- -
177  if (!info.Parse(pssh_box.data(), pssh_box.size()))
-
178  return Status(error::PARSER_FAILURE, "Error parsing the PSSH box.");
-
179 
-
180  if (info.system_id() == widevine_system_id) {
-
181  base::AutoLock scoped_lock(lock_);
-
182  request_dict_.Clear();
-
183  std::string pssh_data_base64_string;
-
184 
-
185  BytesToBase64String(info.pssh_data(), &pssh_data_base64_string);
-
186  request_dict_.SetString("pssh_data", pssh_data_base64_string);
-
187  return FetchKeysInternal(!kEnableKeyRotation, 0, false);
-
188  } else if (!info.key_ids().empty()) {
-
189  // This is not a Widevine PSSH box. Try making the request for the key-IDs.
-
190  // Even if this is a different key-system, it should still work. Either
-
191  // the server will not recognize it and return an error, or it will
-
192  // recognize it and the key must be correct (or the content is bad).
-
193  return FetchKeys(info.key_ids());
-
194  } else {
-
195  return Status(error::NOT_FOUND, "No key IDs given in PSSH box.");
-
196  }
-
197 }
-
198 
- -
200  const std::vector<std::vector<uint8_t>>& key_ids) {
-
201  base::AutoLock scoped_lock(lock_);
-
202  request_dict_.Clear();
-
203  std::string pssh_data_base64_string;
-
204 
-
205  // Generate Widevine PSSH data from the key-IDs.
-
206  WidevinePsshData widevine_pssh_data;
-
207  for (size_t i = 0; i < key_ids.size(); i++) {
-
208  widevine_pssh_data.add_key_id(key_ids[i].data(), key_ids[i].size());
-
209  }
-
210 
-
211  const std::string serialized_string = widevine_pssh_data.SerializeAsString();
-
212  std::vector<uint8_t> pssh_data(serialized_string.begin(),
-
213  serialized_string.end());
-
214 
-
215  BytesToBase64String(pssh_data, &pssh_data_base64_string);
-
216  request_dict_.SetString("pssh_data", pssh_data_base64_string);
-
217  return FetchKeysInternal(!kEnableKeyRotation, 0, false);
-
218 }
-
219 
- -
221  base::AutoLock scoped_lock(lock_);
-
222  request_dict_.Clear();
-
223  // Javascript/JSON does not support int64_t or unsigned numbers. Use double
-
224  // instead as 32-bit integer can be lossless represented using double.
-
225  request_dict_.SetDouble("asset_id", asset_id);
-
226  return FetchKeysInternal(!kEnableKeyRotation, 0, true);
-
227 }
-
228 
-
229 Status WidevineKeySource::GetKey(TrackType track_type, EncryptionKey* key) {
-
230  DCHECK(key);
-
231  if (encryption_key_map_.find(track_type) == encryption_key_map_.end()) {
-
232  return Status(error::INTERNAL_ERROR,
-
233  "Cannot find key of type " + TrackTypeToString(track_type));
-
234  }
-
235  *key = *encryption_key_map_[track_type];
-
236  return Status::OK;
-
237 }
-
238 
-
239 Status WidevineKeySource::GetKey(const std::vector<uint8_t>& key_id,
-
240  EncryptionKey* key) {
-
241  DCHECK(key);
-
242  for (const auto& pair : encryption_key_map_) {
-
243  if (pair.second->key_id == key_id) {
-
244  *key = *pair.second;
-
245  return Status::OK;
-
246  }
-
247  }
-
248  return Status(error::INTERNAL_ERROR,
-
249  "Cannot find key with specified key ID");
+
150 Status WidevineKeySource::FetchKeys(const std::vector<uint8_t>& pssh_box) {
+
151  const std::vector<uint8_t> widevine_system_id(
+
152  kWidevineSystemId, kWidevineSystemId + arraysize(kWidevineSystemId));
+
153 
+ +
155  if (!info.Parse(pssh_box.data(), pssh_box.size()))
+
156  return Status(error::PARSER_FAILURE, "Error parsing the PSSH box.");
+
157 
+
158  if (info.system_id() == widevine_system_id) {
+
159  base::AutoLock scoped_lock(lock_);
+
160  request_dict_.Clear();
+
161  std::string pssh_data_base64_string;
+
162 
+
163  BytesToBase64String(info.pssh_data(), &pssh_data_base64_string);
+
164  request_dict_.SetString("pssh_data", pssh_data_base64_string);
+
165  return FetchKeysInternal(!kEnableKeyRotation, 0, false);
+
166  } else if (!info.key_ids().empty()) {
+
167  // This is not a Widevine PSSH box. Try making the request for the key-IDs.
+
168  // Even if this is a different key-system, it should still work. Either
+
169  // the server will not recognize it and return an error, or it will
+
170  // recognize it and the key must be correct (or the content is bad).
+
171  return FetchKeys(info.key_ids());
+
172  } else {
+
173  return Status(error::NOT_FOUND, "No key IDs given in PSSH box.");
+
174  }
+
175 }
+
176 
+ +
178  const std::vector<std::vector<uint8_t>>& key_ids) {
+
179  base::AutoLock scoped_lock(lock_);
+
180  request_dict_.Clear();
+
181  std::string pssh_data_base64_string;
+
182 
+
183  // Generate Widevine PSSH data from the key-IDs.
+
184  WidevinePsshData widevine_pssh_data;
+
185  for (size_t i = 0; i < key_ids.size(); i++) {
+
186  widevine_pssh_data.add_key_id(key_ids[i].data(), key_ids[i].size());
+
187  }
+
188 
+
189  const std::string serialized_string = widevine_pssh_data.SerializeAsString();
+
190  std::vector<uint8_t> pssh_data(serialized_string.begin(),
+
191  serialized_string.end());
+
192 
+
193  BytesToBase64String(pssh_data, &pssh_data_base64_string);
+
194  request_dict_.SetString("pssh_data", pssh_data_base64_string);
+
195  return FetchKeysInternal(!kEnableKeyRotation, 0, false);
+
196 }
+
197 
+ +
199  base::AutoLock scoped_lock(lock_);
+
200  request_dict_.Clear();
+
201  // Javascript/JSON does not support int64_t or unsigned numbers. Use double
+
202  // instead as 32-bit integer can be lossless represented using double.
+
203  request_dict_.SetDouble("asset_id", asset_id);
+
204  return FetchKeysInternal(!kEnableKeyRotation, 0, true);
+
205 }
+
206 
+
207 Status WidevineKeySource::GetKey(TrackType track_type, EncryptionKey* key) {
+
208  DCHECK(key);
+
209  if (encryption_key_map_.find(track_type) == encryption_key_map_.end()) {
+
210  return Status(error::INTERNAL_ERROR,
+
211  "Cannot find key of type " + TrackTypeToString(track_type));
+
212  }
+
213  *key = *encryption_key_map_[track_type];
+
214  return Status::OK;
+
215 }
+
216 
+
217 Status WidevineKeySource::GetKey(const std::vector<uint8_t>& key_id,
+
218  EncryptionKey* key) {
+
219  DCHECK(key);
+
220  for (const auto& pair : encryption_key_map_) {
+
221  if (pair.second->key_id == key_id) {
+
222  *key = *pair.second;
+
223  return Status::OK;
+
224  }
+
225  }
+
226  return Status(error::INTERNAL_ERROR,
+
227  "Cannot find key with specified key ID");
+
228 }
+
229 
+
230 Status WidevineKeySource::GetCryptoPeriodKey(uint32_t crypto_period_index,
+
231  TrackType track_type,
+
232  EncryptionKey* key) {
+
233  DCHECK(key_production_thread_.HasBeenStarted());
+
234  // TODO(kqyang): This is not elegant. Consider refactoring later.
+
235  {
+
236  base::AutoLock scoped_lock(lock_);
+
237  if (!key_production_started_) {
+
238  // Another client may have a slightly smaller starting crypto period
+
239  // index. Set the initial value to account for that.
+
240  first_crypto_period_index_ =
+
241  crypto_period_index ? crypto_period_index - 1 : 0;
+
242  DCHECK(!key_pool_);
+
243  key_pool_.reset(new EncryptionKeyQueue(crypto_period_count_,
+
244  first_crypto_period_index_));
+
245  start_key_production_.Signal();
+
246  key_production_started_ = true;
+
247  }
+
248  }
+
249  return GetKeyInternal(crypto_period_index, track_type, key);
250 }
251 
-
252 Status WidevineKeySource::GetCryptoPeriodKey(uint32_t crypto_period_index,
-
253  TrackType track_type,
-
254  EncryptionKey* key) {
-
255  DCHECK(key_production_thread_.HasBeenStarted());
-
256  // TODO(kqyang): This is not elegant. Consider refactoring later.
-
257  {
-
258  base::AutoLock scoped_lock(lock_);
-
259  if (!key_production_started_) {
-
260  // Another client may have a slightly smaller starting crypto period
-
261  // index. Set the initial value to account for that.
-
262  first_crypto_period_index_ =
-
263  crypto_period_index ? crypto_period_index - 1 : 0;
-
264  DCHECK(!key_pool_);
-
265  key_pool_.reset(new EncryptionKeyQueue(crypto_period_count_,
-
266  first_crypto_period_index_));
-
267  start_key_production_.Signal();
-
268  key_production_started_ = true;
-
269  }
-
270  }
-
271  return GetKeyInternal(crypto_period_index, track_type, key);
-
272 }
-
273 
-
274 void WidevineKeySource::set_signer(std::unique_ptr<RequestSigner> signer) {
-
275  signer_ = std::move(signer);
-
276 }
-
277 
- -
279  std::unique_ptr<KeyFetcher> key_fetcher) {
-
280  key_fetcher_ = std::move(key_fetcher);
-
281 }
-
282 
-
283 Status WidevineKeySource::GetKeyInternal(uint32_t crypto_period_index,
-
284  TrackType track_type,
-
285  EncryptionKey* key) {
-
286  DCHECK(key_pool_);
-
287  DCHECK(key);
-
288  DCHECK_LE(track_type, NUM_VALID_TRACK_TYPES);
-
289  DCHECK_NE(track_type, TRACK_TYPE_UNKNOWN);
-
290 
-
291  scoped_refptr<RefCountedEncryptionKeyMap> ref_counted_encryption_key_map;
-
292  Status status =
-
293  key_pool_->Peek(crypto_period_index, &ref_counted_encryption_key_map,
-
294  kGetKeyTimeoutInSeconds * 1000);
-
295  if (!status.ok()) {
-
296  if (status.error_code() == error::STOPPED) {
-
297  CHECK(!common_encryption_request_status_.ok());
-
298  return common_encryption_request_status_;
-
299  }
-
300  return status;
-
301  }
-
302 
-
303  const EncryptionKeyMap& encryption_key_map =
-
304  ref_counted_encryption_key_map->map();
-
305  if (encryption_key_map.find(track_type) == encryption_key_map.end()) {
-
306  return Status(error::INTERNAL_ERROR,
-
307  "Cannot find key of type " + TrackTypeToString(track_type));
-
308  }
-
309  *key = *encryption_key_map.at(track_type);
-
310  return Status::OK;
-
311 }
-
312 
-
313 void WidevineKeySource::FetchKeysTask() {
-
314  // Wait until key production is signaled.
-
315  start_key_production_.Wait();
-
316  if (!key_pool_ || key_pool_->Stopped())
-
317  return;
-
318 
-
319  Status status = FetchKeysInternal(kEnableKeyRotation,
-
320  first_crypto_period_index_,
-
321  false);
-
322  while (status.ok()) {
-
323  first_crypto_period_index_ += crypto_period_count_;
-
324  status = FetchKeysInternal(kEnableKeyRotation,
-
325  first_crypto_period_index_,
-
326  false);
-
327  }
-
328  common_encryption_request_status_ = status;
-
329  key_pool_->Stop();
-
330 }
-
331 
-
332 Status WidevineKeySource::FetchKeysInternal(bool enable_key_rotation,
-
333  uint32_t first_crypto_period_index,
-
334  bool widevine_classic) {
-
335  std::string request;
-
336  FillRequest(enable_key_rotation,
-
337  first_crypto_period_index,
-
338  &request);
-
339 
-
340  std::string message;
-
341  Status status = GenerateKeyMessage(request, &message);
-
342  if (!status.ok())
-
343  return status;
-
344  VLOG(1) << "Message: " << message;
-
345 
-
346  std::string raw_response;
-
347  int64_t sleep_duration = kFirstRetryDelayMilliseconds;
-
348 
-
349  // Perform client side retries if seeing server transient error to workaround
-
350  // server limitation.
-
351  for (int i = 0; i < kNumTransientErrorRetries; ++i) {
-
352  status = key_fetcher_->FetchKeys(server_url_, message, &raw_response);
-
353  if (status.ok()) {
-
354  VLOG(1) << "Retry [" << i << "] Response:" << raw_response;
-
355 
-
356  std::string response;
-
357  if (!DecodeResponse(raw_response, &response)) {
-
358  return Status(error::SERVER_ERROR,
-
359  "Failed to decode response '" + raw_response + "'.");
-
360  }
-
361 
-
362  bool transient_error = false;
-
363  if (ExtractEncryptionKey(enable_key_rotation,
-
364  widevine_classic,
-
365  response,
-
366  &transient_error))
-
367  return Status::OK;
-
368 
-
369  if (!transient_error) {
-
370  return Status(
-
371  error::SERVER_ERROR,
-
372  "Failed to extract encryption key from '" + response + "'.");
-
373  }
-
374  } else if (status.error_code() != error::TIME_OUT) {
-
375  return status;
-
376  }
-
377 
-
378  // Exponential backoff.
-
379  if (i != kNumTransientErrorRetries - 1) {
-
380  base::PlatformThread::Sleep(
-
381  base::TimeDelta::FromMilliseconds(sleep_duration));
-
382  sleep_duration *= 2;
-
383  }
-
384  }
-
385  return Status(error::SERVER_ERROR,
-
386  "Failed to recover from server internal error.");
-
387 }
+
252 void WidevineKeySource::set_signer(std::unique_ptr<RequestSigner> signer) {
+
253  signer_ = std::move(signer);
+
254 }
+
255 
+ +
257  std::unique_ptr<KeyFetcher> key_fetcher) {
+
258  key_fetcher_ = std::move(key_fetcher);
+
259 }
+
260 
+
261 Status WidevineKeySource::GetKeyInternal(uint32_t crypto_period_index,
+
262  TrackType track_type,
+
263  EncryptionKey* key) {
+
264  DCHECK(key_pool_);
+
265  DCHECK(key);
+
266  DCHECK_LE(track_type, NUM_VALID_TRACK_TYPES);
+
267  DCHECK_NE(track_type, TRACK_TYPE_UNKNOWN);
+
268 
+
269  std::shared_ptr<EncryptionKeyMap> encryption_key_map;
+
270  Status status = key_pool_->Peek(crypto_period_index, &encryption_key_map,
+
271  kGetKeyTimeoutInSeconds * 1000);
+
272  if (!status.ok()) {
+
273  if (status.error_code() == error::STOPPED) {
+
274  CHECK(!common_encryption_request_status_.ok());
+
275  return common_encryption_request_status_;
+
276  }
+
277  return status;
+
278  }
+
279 
+
280  if (encryption_key_map->find(track_type) == encryption_key_map->end()) {
+
281  return Status(error::INTERNAL_ERROR,
+
282  "Cannot find key of type " + TrackTypeToString(track_type));
+
283  }
+
284  *key = *encryption_key_map->at(track_type);
+
285  return Status::OK;
+
286 }
+
287 
+
288 void WidevineKeySource::FetchKeysTask() {
+
289  // Wait until key production is signaled.
+
290  start_key_production_.Wait();
+
291  if (!key_pool_ || key_pool_->Stopped())
+
292  return;
+
293 
+
294  Status status = FetchKeysInternal(kEnableKeyRotation,
+
295  first_crypto_period_index_,
+
296  false);
+
297  while (status.ok()) {
+
298  first_crypto_period_index_ += crypto_period_count_;
+
299  status = FetchKeysInternal(kEnableKeyRotation,
+
300  first_crypto_period_index_,
+
301  false);
+
302  }
+
303  common_encryption_request_status_ = status;
+
304  key_pool_->Stop();
+
305 }
+
306 
+
307 Status WidevineKeySource::FetchKeysInternal(bool enable_key_rotation,
+
308  uint32_t first_crypto_period_index,
+
309  bool widevine_classic) {
+
310  std::string request;
+
311  FillRequest(enable_key_rotation,
+
312  first_crypto_period_index,
+
313  &request);
+
314 
+
315  std::string message;
+
316  Status status = GenerateKeyMessage(request, &message);
+
317  if (!status.ok())
+
318  return status;
+
319  VLOG(1) << "Message: " << message;
+
320 
+
321  std::string raw_response;
+
322  int64_t sleep_duration = kFirstRetryDelayMilliseconds;
+
323 
+
324  // Perform client side retries if seeing server transient error to workaround
+
325  // server limitation.
+
326  for (int i = 0; i < kNumTransientErrorRetries; ++i) {
+
327  status = key_fetcher_->FetchKeys(server_url_, message, &raw_response);
+
328  if (status.ok()) {
+
329  VLOG(1) << "Retry [" << i << "] Response:" << raw_response;
+
330 
+
331  std::string response;
+
332  if (!DecodeResponse(raw_response, &response)) {
+
333  return Status(error::SERVER_ERROR,
+
334  "Failed to decode response '" + raw_response + "'.");
+
335  }
+
336 
+
337  bool transient_error = false;
+
338  if (ExtractEncryptionKey(enable_key_rotation,
+
339  widevine_classic,
+
340  response,
+
341  &transient_error))
+
342  return Status::OK;
+
343 
+
344  if (!transient_error) {
+
345  return Status(
+
346  error::SERVER_ERROR,
+
347  "Failed to extract encryption key from '" + response + "'.");
+
348  }
+
349  } else if (status.error_code() != error::TIME_OUT) {
+
350  return status;
+
351  }
+
352 
+
353  // Exponential backoff.
+
354  if (i != kNumTransientErrorRetries - 1) {
+
355  base::PlatformThread::Sleep(
+
356  base::TimeDelta::FromMilliseconds(sleep_duration));
+
357  sleep_duration *= 2;
+
358  }
+
359  }
+
360  return Status(error::SERVER_ERROR,
+
361  "Failed to recover from server internal error.");
+
362 }
+
363 
+
364 void WidevineKeySource::FillRequest(bool enable_key_rotation,
+
365  uint32_t first_crypto_period_index,
+
366  std::string* request) {
+
367  DCHECK(request);
+
368  DCHECK(!request_dict_.empty());
+
369 
+
370  // Build tracks.
+
371  base::ListValue* tracks = new base::ListValue();
+
372 
+
373  base::DictionaryValue* track_sd = new base::DictionaryValue();
+
374  track_sd->SetString("type", "SD");
+
375  tracks->Append(track_sd);
+
376  base::DictionaryValue* track_hd = new base::DictionaryValue();
+
377  track_hd->SetString("type", "HD");
+
378  tracks->Append(track_hd);
+
379  base::DictionaryValue* track_uhd1 = new base::DictionaryValue();
+
380  track_uhd1->SetString("type", "UHD1");
+
381  tracks->Append(track_uhd1);
+
382  base::DictionaryValue* track_uhd2 = new base::DictionaryValue();
+
383  track_uhd2->SetString("type", "UHD2");
+
384  tracks->Append(track_uhd2);
+
385  base::DictionaryValue* track_audio = new base::DictionaryValue();
+
386  track_audio->SetString("type", "AUDIO");
+
387  tracks->Append(track_audio);
388 
-
389 void WidevineKeySource::FillRequest(bool enable_key_rotation,
-
390  uint32_t first_crypto_period_index,
-
391  std::string* request) {
-
392  DCHECK(request);
-
393  DCHECK(!request_dict_.empty());
-
394 
-
395  // Build tracks.
-
396  base::ListValue* tracks = new base::ListValue();
-
397 
-
398  base::DictionaryValue* track_sd = new base::DictionaryValue();
-
399  track_sd->SetString("type", "SD");
-
400  tracks->Append(track_sd);
-
401  base::DictionaryValue* track_hd = new base::DictionaryValue();
-
402  track_hd->SetString("type", "HD");
-
403  tracks->Append(track_hd);
-
404  base::DictionaryValue* track_uhd1 = new base::DictionaryValue();
-
405  track_uhd1->SetString("type", "UHD1");
-
406  tracks->Append(track_uhd1);
-
407  base::DictionaryValue* track_uhd2 = new base::DictionaryValue();
-
408  track_uhd2->SetString("type", "UHD2");
-
409  tracks->Append(track_uhd2);
-
410  base::DictionaryValue* track_audio = new base::DictionaryValue();
-
411  track_audio->SetString("type", "AUDIO");
-
412  tracks->Append(track_audio);
-
413 
-
414  request_dict_.Set("tracks", tracks);
+
389  request_dict_.Set("tracks", tracks);
+
390 
+
391  // Build DRM types.
+
392  base::ListValue* drm_types = new base::ListValue();
+
393  drm_types->AppendString("WIDEVINE");
+
394  request_dict_.Set("drm_types", drm_types);
+
395 
+
396  // Build key rotation fields.
+
397  if (enable_key_rotation) {
+
398  // Javascript/JSON does not support int64_t or unsigned numbers. Use double
+
399  // instead as 32-bit integer can be lossless represented using double.
+
400  request_dict_.SetDouble("first_crypto_period_index",
+
401  first_crypto_period_index);
+
402  request_dict_.SetInteger("crypto_period_count", crypto_period_count_);
+
403  }
+
404 
+
405  base::JSONWriter::WriteWithOptions(
+
406  request_dict_,
+
407  // Write doubles that have no fractional part as a normal integer, i.e.
+
408  // without using exponential notation or appending a '.0'.
+
409  base::JSONWriter::OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION, request);
+
410 }
+
411 
+
412 Status WidevineKeySource::GenerateKeyMessage(const std::string& request,
+
413  std::string* message) {
+
414  DCHECK(message);
415 
-
416  // Build DRM types.
-
417  base::ListValue* drm_types = new base::ListValue();
-
418  drm_types->AppendString("WIDEVINE");
-
419  request_dict_.Set("drm_types", drm_types);
-
420 
-
421  // Build key rotation fields.
-
422  if (enable_key_rotation) {
-
423  // Javascript/JSON does not support int64_t or unsigned numbers. Use double
-
424  // instead as 32-bit integer can be lossless represented using double.
-
425  request_dict_.SetDouble("first_crypto_period_index",
-
426  first_crypto_period_index);
-
427  request_dict_.SetInteger("crypto_period_count", crypto_period_count_);
-
428  }
-
429 
-
430  base::JSONWriter::WriteWithOptions(
-
431  request_dict_,
-
432  // Write doubles that have no fractional part as a normal integer, i.e.
-
433  // without using exponential notation or appending a '.0'.
-
434  base::JSONWriter::OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION, request);
-
435 }
-
436 
-
437 Status WidevineKeySource::GenerateKeyMessage(const std::string& request,
-
438  std::string* message) {
-
439  DCHECK(message);
-
440 
-
441  std::string request_base64_string;
-
442  base::Base64Encode(request, &request_base64_string);
+
416  std::string request_base64_string;
+
417  base::Base64Encode(request, &request_base64_string);
+
418 
+
419  base::DictionaryValue request_dict;
+
420  request_dict.SetString("request", request_base64_string);
+
421 
+
422  // Sign the request.
+
423  if (signer_) {
+
424  std::string signature;
+
425  if (!signer_->GenerateSignature(request, &signature))
+
426  return Status(error::INTERNAL_ERROR, "Signature generation failed.");
+
427 
+
428  std::string signature_base64_string;
+
429  base::Base64Encode(signature, &signature_base64_string);
+
430 
+
431  request_dict.SetString("signature", signature_base64_string);
+
432  request_dict.SetString("signer", signer_->signer_name());
+
433  }
+
434 
+
435  base::JSONWriter::Write(request_dict, message);
+
436  return Status::OK;
+
437 }
+
438 
+
439 bool WidevineKeySource::DecodeResponse(
+
440  const std::string& raw_response,
+
441  std::string* response) {
+
442  DCHECK(response);
443 
-
444  base::DictionaryValue request_dict;
-
445  request_dict.SetString("request", request_base64_string);
-
446 
-
447  // Sign the request.
-
448  if (signer_) {
-
449  std::string signature;
-
450  if (!signer_->GenerateSignature(request, &signature))
-
451  return Status(error::INTERNAL_ERROR, "Signature generation failed.");
+
444  // Extract base64 formatted response from JSON formatted raw response.
+
445  std::unique_ptr<base::Value> root(base::JSONReader::Read(raw_response));
+
446  if (!root) {
+
447  LOG(ERROR) << "'" << raw_response << "' is not in JSON format.";
+
448  return false;
+
449  }
+
450  const base::DictionaryValue* response_dict = NULL;
+
451  RCHECK(root->GetAsDictionary(&response_dict));
452 
-
453  std::string signature_base64_string;
-
454  base::Base64Encode(signature, &signature_base64_string);
-
455 
-
456  request_dict.SetString("signature", signature_base64_string);
-
457  request_dict.SetString("signer", signer_->signer_name());
-
458  }
-
459 
-
460  base::JSONWriter::Write(request_dict, message);
-
461  return Status::OK;
-
462 }
-
463 
-
464 bool WidevineKeySource::DecodeResponse(
-
465  const std::string& raw_response,
-
466  std::string* response) {
-
467  DCHECK(response);
-
468 
-
469  // Extract base64 formatted response from JSON formatted raw response.
-
470  std::unique_ptr<base::Value> root(base::JSONReader::Read(raw_response));
-
471  if (!root) {
-
472  LOG(ERROR) << "'" << raw_response << "' is not in JSON format.";
-
473  return false;
-
474  }
-
475  const base::DictionaryValue* response_dict = NULL;
-
476  RCHECK(root->GetAsDictionary(&response_dict));
-
477 
-
478  std::string response_base64_string;
-
479  RCHECK(response_dict->GetString("response", &response_base64_string));
-
480  RCHECK(base::Base64Decode(response_base64_string, response));
-
481  return true;
-
482 }
+
453  std::string response_base64_string;
+
454  RCHECK(response_dict->GetString("response", &response_base64_string));
+
455  RCHECK(base::Base64Decode(response_base64_string, response));
+
456  return true;
+
457 }
+
458 
+
459 bool WidevineKeySource::ExtractEncryptionKey(
+
460  bool enable_key_rotation,
+
461  bool widevine_classic,
+
462  const std::string& response,
+
463  bool* transient_error) {
+
464  DCHECK(transient_error);
+
465  *transient_error = false;
+
466 
+
467  std::unique_ptr<base::Value> root(base::JSONReader::Read(response));
+
468  if (!root) {
+
469  LOG(ERROR) << "'" << response << "' is not in JSON format.";
+
470  return false;
+
471  }
+
472 
+
473  const base::DictionaryValue* license_dict = NULL;
+
474  RCHECK(root->GetAsDictionary(&license_dict));
+
475 
+
476  std::string license_status;
+
477  RCHECK(license_dict->GetString("status", &license_status));
+
478  if (license_status != kLicenseStatusOK) {
+
479  LOG(ERROR) << "Received non-OK license response: " << response;
+
480  *transient_error = (license_status == kLicenseStatusTransientError);
+
481  return false;
+
482  }
483 
-
484 bool WidevineKeySource::ExtractEncryptionKey(
-
485  bool enable_key_rotation,
-
486  bool widevine_classic,
-
487  const std::string& response,
-
488  bool* transient_error) {
-
489  DCHECK(transient_error);
-
490  *transient_error = false;
+
484  const base::ListValue* tracks;
+
485  RCHECK(license_dict->GetList("tracks", &tracks));
+
486  // Should have at least one track per crypto_period.
+
487  RCHECK(enable_key_rotation ? tracks->GetSize() >= 1 * crypto_period_count_
+
488  : tracks->GetSize() >= 1);
+
489 
+
490  int current_crypto_period_index = first_crypto_period_index_;
491 
-
492  std::unique_ptr<base::Value> root(base::JSONReader::Read(response));
-
493  if (!root) {
-
494  LOG(ERROR) << "'" << response << "' is not in JSON format.";
-
495  return false;
-
496  }
-
497 
-
498  const base::DictionaryValue* license_dict = NULL;
-
499  RCHECK(root->GetAsDictionary(&license_dict));
-
500 
-
501  std::string license_status;
-
502  RCHECK(license_dict->GetString("status", &license_status));
-
503  if (license_status != kLicenseStatusOK) {
-
504  LOG(ERROR) << "Received non-OK license response: " << response;
-
505  *transient_error = (license_status == kLicenseStatusTransientError);
-
506  return false;
-
507  }
-
508 
-
509  const base::ListValue* tracks;
-
510  RCHECK(license_dict->GetList("tracks", &tracks));
-
511  // Should have at least one track per crypto_period.
-
512  RCHECK(enable_key_rotation ? tracks->GetSize() >= 1 * crypto_period_count_
-
513  : tracks->GetSize() >= 1);
+
492  EncryptionKeyMap encryption_key_map;
+
493  for (size_t i = 0; i < tracks->GetSize(); ++i) {
+
494  const base::DictionaryValue* track_dict;
+
495  RCHECK(tracks->GetDictionary(i, &track_dict));
+
496 
+
497  if (enable_key_rotation) {
+
498  int crypto_period_index;
+
499  RCHECK(
+
500  track_dict->GetInteger("crypto_period_index", &crypto_period_index));
+
501  if (crypto_period_index != current_crypto_period_index) {
+
502  if (crypto_period_index != current_crypto_period_index + 1) {
+
503  LOG(ERROR) << "Expecting crypto period index "
+
504  << current_crypto_period_index << " or "
+
505  << current_crypto_period_index + 1 << "; Seen "
+
506  << crypto_period_index << " at track " << i;
+
507  return false;
+
508  }
+
509  if (!PushToKeyPool(&encryption_key_map))
+
510  return false;
+
511  ++current_crypto_period_index;
+
512  }
+
513  }
514 
-
515  int current_crypto_period_index = first_crypto_period_index_;
-
516 
-
517  EncryptionKeyMap encryption_key_map;
-
518  for (size_t i = 0; i < tracks->GetSize(); ++i) {
-
519  const base::DictionaryValue* track_dict;
-
520  RCHECK(tracks->GetDictionary(i, &track_dict));
-
521 
-
522  if (enable_key_rotation) {
-
523  int crypto_period_index;
-
524  RCHECK(
-
525  track_dict->GetInteger("crypto_period_index", &crypto_period_index));
-
526  if (crypto_period_index != current_crypto_period_index) {
-
527  if (crypto_period_index != current_crypto_period_index + 1) {
-
528  LOG(ERROR) << "Expecting crypto period index "
-
529  << current_crypto_period_index << " or "
-
530  << current_crypto_period_index + 1 << "; Seen "
-
531  << crypto_period_index << " at track " << i;
-
532  return false;
-
533  }
-
534  if (!PushToKeyPool(&encryption_key_map))
-
535  return false;
-
536  ++current_crypto_period_index;
-
537  }
-
538  }
-
539 
-
540  std::string track_type_str;
-
541  RCHECK(track_dict->GetString("type", &track_type_str));
-
542  TrackType track_type = GetTrackTypeFromString(track_type_str);
-
543  DCHECK_NE(TRACK_TYPE_UNKNOWN, track_type);
-
544  RCHECK(encryption_key_map.find(track_type) == encryption_key_map.end());
+
515  std::string track_type_str;
+
516  RCHECK(track_dict->GetString("type", &track_type_str));
+
517  TrackType track_type = GetTrackTypeFromString(track_type_str);
+
518  DCHECK_NE(TRACK_TYPE_UNKNOWN, track_type);
+
519  RCHECK(encryption_key_map.find(track_type) == encryption_key_map.end());
+
520 
+
521  std::unique_ptr<EncryptionKey> encryption_key(new EncryptionKey());
+
522 
+
523  if (!GetKeyFromTrack(*track_dict, &encryption_key->key))
+
524  return false;
+
525 
+
526  // Get key ID and PSSH data for CENC content only.
+
527  if (!widevine_classic) {
+
528  if (!GetKeyIdFromTrack(*track_dict, &encryption_key->key_id))
+
529  return false;
+
530 
+
531  ProtectionSystemSpecificInfo info;
+
532  info.add_key_id(encryption_key->key_id);
+
533  info.set_system_id(kWidevineSystemId, arraysize(kWidevineSystemId));
+
534  info.set_pssh_box_version(0);
+
535 
+
536  std::vector<uint8_t> pssh_data;
+
537  if (!GetPsshDataFromTrack(*track_dict, &pssh_data))
+
538  return false;
+
539  info.set_pssh_data(pssh_data);
+
540 
+
541  encryption_key->key_system_info.push_back(info);
+
542  }
+
543  encryption_key_map[track_type] = std::move(encryption_key);
+
544  }
545 
-
546  std::unique_ptr<EncryptionKey> encryption_key(new EncryptionKey());
-
547 
-
548  if (!GetKeyFromTrack(*track_dict, &encryption_key->key))
-
549  return false;
-
550 
-
551  // Get key ID and PSSH data for CENC content only.
-
552  if (!widevine_classic) {
-
553  if (!GetKeyIdFromTrack(*track_dict, &encryption_key->key_id))
-
554  return false;
-
555 
-
556  ProtectionSystemSpecificInfo info;
-
557  info.add_key_id(encryption_key->key_id);
-
558  info.set_system_id(kWidevineSystemId, arraysize(kWidevineSystemId));
-
559  info.set_pssh_box_version(0);
-
560 
-
561  std::vector<uint8_t> pssh_data;
-
562  if (!GetPsshDataFromTrack(*track_dict, &pssh_data))
-
563  return false;
-
564  info.set_pssh_data(pssh_data);
-
565 
-
566  encryption_key->key_system_info.push_back(info);
-
567  }
-
568  encryption_key_map[track_type] = std::move(encryption_key);
-
569  }
-
570 
-
571  // If the flag exists, create a common system ID PSSH box that contains the
-
572  // key IDs of all the keys.
-
573  if (add_common_pssh_ && !widevine_classic) {
-
574  std::set<std::vector<uint8_t>> key_ids;
-
575  for (const EncryptionKeyMap::value_type& pair : encryption_key_map) {
-
576  key_ids.insert(pair.second->key_id);
-
577  }
-
578 
-
579  // Create a common system PSSH box.
-
580  ProtectionSystemSpecificInfo info;
-
581  info.set_system_id(kCommonSystemId, arraysize(kCommonSystemId));
-
582  info.set_pssh_box_version(1);
-
583  for (const std::vector<uint8_t>& key_id : key_ids) {
-
584  info.add_key_id(key_id);
-
585  }
-
586 
-
587  for (const EncryptionKeyMap::value_type& pair : encryption_key_map) {
-
588  pair.second->key_system_info.push_back(info);
-
589  }
-
590  }
-
591 
-
592  DCHECK(!encryption_key_map.empty());
-
593  if (!enable_key_rotation) {
-
594  encryption_key_map_.swap(encryption_key_map);
-
595  return true;
-
596  }
-
597  return PushToKeyPool(&encryption_key_map);
-
598 }
-
599 
-
600 bool WidevineKeySource::PushToKeyPool(
-
601  EncryptionKeyMap* encryption_key_map) {
-
602  DCHECK(key_pool_);
-
603  DCHECK(encryption_key_map);
-
604  Status status =
-
605  key_pool_->Push(scoped_refptr<RefCountedEncryptionKeyMap>(
-
606  new RefCountedEncryptionKeyMap(encryption_key_map)),
-
607  kInfiniteTimeout);
-
608  encryption_key_map->clear();
-
609  if (!status.ok()) {
-
610  DCHECK_EQ(error::STOPPED, status.error_code());
-
611  return false;
-
612  }
-
613  return true;
-
614 }
-
615 
-
616 } // namespace media
-
617 } // namespace shaka
+
546  // If the flag exists, create a common system ID PSSH box that contains the
+
547  // key IDs of all the keys.
+
548  if (add_common_pssh_ && !widevine_classic) {
+
549  std::set<std::vector<uint8_t>> key_ids;
+
550  for (const EncryptionKeyMap::value_type& pair : encryption_key_map) {
+
551  key_ids.insert(pair.second->key_id);
+
552  }
+
553 
+
554  // Create a common system PSSH box.
+
555  ProtectionSystemSpecificInfo info;
+
556  info.set_system_id(kCommonSystemId, arraysize(kCommonSystemId));
+
557  info.set_pssh_box_version(1);
+
558  for (const std::vector<uint8_t>& key_id : key_ids) {
+
559  info.add_key_id(key_id);
+
560  }
+
561 
+
562  for (const EncryptionKeyMap::value_type& pair : encryption_key_map) {
+
563  pair.second->key_system_info.push_back(info);
+
564  }
+
565  }
+
566 
+
567  DCHECK(!encryption_key_map.empty());
+
568  if (!enable_key_rotation) {
+
569  encryption_key_map_.swap(encryption_key_map);
+
570  return true;
+
571  }
+
572  return PushToKeyPool(&encryption_key_map);
+
573 }
+
574 
+
575 bool WidevineKeySource::PushToKeyPool(
+
576  EncryptionKeyMap* encryption_key_map) {
+
577  DCHECK(key_pool_);
+
578  DCHECK(encryption_key_map);
+
579  auto encryption_key_map_shared = std::make_shared<EncryptionKeyMap>();
+
580  encryption_key_map_shared->swap(*encryption_key_map);
+
581  Status status = key_pool_->Push(encryption_key_map_shared, kInfiniteTimeout);
+
582  if (!status.ok()) {
+
583  DCHECK_EQ(error::STOPPED, status.error_code());
+
584  return false;
+
585  }
+
586  return true;
+
587 }
+
588 
+
589 } // namespace media
+
590 } // namespace shaka
-
Status FetchKeys(const std::vector< uint8_t > &pssh_box) override
-
Status GetCryptoPeriodKey(uint32_t crypto_period_index, TrackType track_type, EncryptionKey *key) override
-
Status GetKey(TrackType track_type, EncryptionKey *key) override
+
Status FetchKeys(const std::vector< uint8_t > &pssh_box) override
+
Status GetCryptoPeriodKey(uint32_t crypto_period_index, TrackType track_type, EncryptionKey *key) override
+
Status GetKey(TrackType track_type, EncryptionKey *key) override
static std::string TrackTypeToString(TrackType track_type)
Convert TrackType to string.
Definition: key_source.cc:37
static TrackType GetTrackTypeFromString(const std::string &track_type_string)
Convert string representation of track type to enum representation.
Definition: key_source.cc:19
-
void set_key_fetcher(std::unique_ptr< KeyFetcher > key_fetcher)
-
WidevineKeySource(const std::string &server_url, bool add_common_pssh)
+
void set_key_fetcher(std::unique_ptr< KeyFetcher > key_fetcher)
+
WidevineKeySource(const std::string &server_url, bool add_common_pssh)
-
void set_signer(std::unique_ptr< RequestSigner > signer)
+
void set_signer(std::unique_ptr< RequestSigner > signer)
bool Parse(const uint8_t *data, size_t data_size)
diff --git a/docs/d5/d8c/structshaka_1_1media_1_1mp4_1_1CompositionOffset.html b/docs/d5/d8c/structshaka_1_1media_1_1mp4_1_1CompositionOffset.html index 7e310d003b..178d5089ed 100644 --- a/docs/d5/d8c/structshaka_1_1media_1_1mp4_1_1CompositionOffset.html +++ b/docs/d5/d8c/structshaka_1_1media_1_1mp4_1_1CompositionOffset.html @@ -112,7 +112,7 @@ int64_t sample_offset< diff --git a/docs/d5/d8f/webm__cluster__parser_8cc_source.html b/docs/d5/d8f/webm__cluster__parser_8cc_source.html index 14ca26f113..268a96cda1 100644 --- a/docs/d5/d8f/webm__cluster__parser_8cc_source.html +++ b/docs/d5/d8f/webm__cluster__parser_8cc_source.html @@ -115,18 +115,18 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
26 
27 } // namespace
28 
- +
30  int64_t timecode_scale,
-
31  scoped_refptr<AudioStreamInfo> audio_stream_info,
-
32  scoped_refptr<VideoStreamInfo> video_stream_info,
+
31  std::shared_ptr<AudioStreamInfo> audio_stream_info,
+
32  std::shared_ptr<VideoStreamInfo> video_stream_info,
33  int64_t audio_default_duration,
34  int64_t video_default_duration,
35  const WebMTracksParser::TextTracks& text_tracks,
36  const std::set<int64_t>& ignored_tracks,
37  const std::string& audio_encryption_key_id,
38  const std::string& video_encryption_key_id,
-
39  const MediaParser::NewSampleCB& new_sample_cb,
-
40  const MediaParser::InitCB& init_cb,
+
39  const MediaParser::NewSampleCB& new_sample_cb,
+
40  const MediaParser::InitCB& init_cb,
41  KeySource* decryption_key_source)
42  : timecode_multiplier_(timecode_scale / 1000.0),
43  audio_stream_info_(audio_stream_info),
@@ -441,7 +441,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
352 
353  int64_t timestamp = (cluster_timecode_ + timecode) * timecode_multiplier_;
354 
-
355  scoped_refptr<MediaSample> buffer;
+
355  std::shared_ptr<MediaSample> buffer;
356  if (stream_type != kStreamText) {
357  // Every encrypted Block has a signal byte and IV prepended to it. Current
358  // encrypted WebM request for comments specification is here
@@ -457,7 +457,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
368  return false;
369  }
370 
-
371  buffer = MediaSample::CopyFrom(data + data_offset, size - data_offset,
+
371  buffer = MediaSample::CopyFrom(data + data_offset, size - data_offset,
372  additional, additional_size, is_key_frame);
373 
374  if (decrypt_config) {
@@ -482,7 +482,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
393  settings.begin(), settings.end(),
394  &side_data);
395 
-
396  buffer = MediaSample::CopyFrom(
+
396  buffer = MediaSample::CopyFrom(
397  reinterpret_cast<const uint8_t*>(content.data()), content.length(),
398  &side_data[0], side_data.size(), true);
399  }
@@ -496,7 +496,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
407  : kNoTimestamp);
408 
409  if (!init_cb_.is_null() && !initialized_) {
-
410  std::vector<scoped_refptr<StreamInfo>> streams;
+
410  std::vector<std::shared_ptr<StreamInfo>> streams;
411  if (audio_stream_info_)
412  streams.push_back(audio_stream_info_);
413  if (video_stream_info_) {
@@ -551,7 +551,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
462 WebMClusterParser::Track::Track(int track_num,
463  bool is_video,
464  int64_t default_duration,
-
465  const MediaParser::NewSampleCB& new_sample_cb)
+
465  const MediaParser::NewSampleCB& new_sample_cb)
466  : track_num_(track_num),
467  is_video_(is_video),
468  default_duration_(default_duration),
@@ -563,7 +563,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
474 WebMClusterParser::Track::~Track() {}
475 
476 bool WebMClusterParser::Track::EmitBuffer(
-
477  const scoped_refptr<MediaSample>& buffer) {
+
477  const std::shared_ptr<MediaSample>& buffer) {
478  DVLOG(2) << "EmitBuffer() : " << track_num_
479  << " ts " << buffer->pts()
480  << " dur " << buffer->duration()
@@ -582,7 +582,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
493  << last_added_buffer_missing_duration_->duration()
494  << " kf " << last_added_buffer_missing_duration_->is_key_frame()
495  << " size " << last_added_buffer_missing_duration_->data_size();
-
496  scoped_refptr<MediaSample> updated_buffer =
+
496  std::shared_ptr<MediaSample> updated_buffer =
497  last_added_buffer_missing_duration_;
498  last_added_buffer_missing_duration_ = NULL;
499  if (!EmitBufferHelp(updated_buffer))
@@ -629,7 +629,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
540 }
541 
542 bool WebMClusterParser::Track::EmitBufferHelp(
-
543  const scoped_refptr<MediaSample>& buffer) {
+
543  const std::shared_ptr<MediaSample>& buffer) {
544  DCHECK(!last_added_buffer_missing_duration_.get());
545 
546  int64_t duration = buffer->duration();
@@ -705,24 +705,24 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
616 
617 } // namespace media
618 } // namespace shaka
-
base::Callback< void(const std::vector< scoped_refptr< StreamInfo > > &stream_info)> InitCB
Definition: media_parser.h:34
int Parse(const uint8_t *buf, int size)
+
base::Callback< void(const std::vector< std::shared_ptr< StreamInfo > > &stream_info)> InitCB
Definition: media_parser.h:34
+
base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
Definition: media_parser.h:43
void Reset()
Resets the state of the parser so it can start parsing a new list.
Definition: webm_parser.cc:714
int Parse(const uint8_t *buf, int size)
Definition: webm_parser.cc:719
bool Flush() WARN_UNUSED_RESULT
static void Parse(const uint8_t *payload, int payload_size, std::string *id, std::string *settings, std::string *content)
Utility function to parse the WebVTT cue from a byte stream.
-
base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
Definition: media_parser.h:43
+
static std::shared_ptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
Definition: media_sample.cc:45
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:30
-
static scoped_refptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
Definition: media_sample.cc:45
-
WebMClusterParser(int64_t timecode_scale, scoped_refptr< AudioStreamInfo > audio_stream_info, scoped_refptr< VideoStreamInfo > video_stream_info, int64_t audio_default_duration, int64_t video_default_duration, const WebMTracksParser::TextTracks &text_tracks, const std::set< int64_t > &ignored_tracks, const std::string &audio_encryption_key_id, const std::string &video_encryption_key_id, const MediaParser::NewSampleCB &new_sample_cb, const MediaParser::InitCB &init_cb, KeySource *decryption_key_source)
DecryptorSource wraps KeySource and is responsible for decryptor management.
+
WebMClusterParser(int64_t timecode_scale, std::shared_ptr< AudioStreamInfo > audio_stream_info, std::shared_ptr< VideoStreamInfo > video_stream_info, int64_t audio_default_duration, int64_t video_default_duration, const WebMTracksParser::TextTracks &text_tracks, const std::set< int64_t > &ignored_tracks, const std::string &audio_encryption_key_id, const std::string &video_encryption_key_id, const MediaParser::NewSampleCB &new_sample_cb, const MediaParser::InitCB &init_cb, KeySource *decryption_key_source)
void Reset()
Resets the parser state so it can accept a new cluster.
diff --git a/docs/d5/d91/es__parser__adts_8cc_source.html b/docs/d5/d91/es__parser__adts_8cc_source.html index 0b835738d9..c4d9ff500b 100644 --- a/docs/d5/d91/es__parser__adts_8cc_source.html +++ b/docs/d5/d91/es__parser__adts_8cc_source.html @@ -248,126 +248,123 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
159  // Emit an audio frame.
160  bool is_key_frame = true;
161 
-
162  scoped_refptr<MediaSample> sample =
- -
164  frame_ptr + header_size,
-
165  frame_size - header_size,
-
166  is_key_frame);
-
167  sample->set_pts(current_pts);
-
168  sample->set_dts(current_pts);
-
169  sample->set_duration(frame_duration);
-
170  emit_sample_cb_.Run(pid(), sample);
+
162  std::shared_ptr<MediaSample> sample = MediaSample::CopyFrom(
+
163  frame_ptr + header_size, frame_size - header_size, is_key_frame);
+
164  sample->set_pts(current_pts);
+
165  sample->set_dts(current_pts);
+
166  sample->set_duration(frame_duration);
+
167  emit_sample_cb_.Run(pid(), sample);
+
168 
+
169  // Update the PTS of the next frame.
+
170  audio_timestamp_helper_->AddFrames(kSamplesPerAACFrame);
171 
-
172  // Update the PTS of the next frame.
-
173  audio_timestamp_helper_->AddFrames(kSamplesPerAACFrame);
-
174 
-
175  // Skip the current frame.
-
176  es_position += frame_size;
-
177  }
+
172  // Skip the current frame.
+
173  es_position += frame_size;
+
174  }
+
175 
+
176  // Discard all the bytes that have been processed.
+
177  DiscardEs(es_position);
178 
-
179  // Discard all the bytes that have been processed.
-
180  DiscardEs(es_position);
+
179  return true;
+
180 }
181 
-
182  return true;
+
182 void EsParserAdts::Flush() {
183 }
184 
-
185 void EsParserAdts::Flush() {
-
186 }
-
187 
-
188 void EsParserAdts::Reset() {
-
189  es_byte_queue_.Reset();
-
190  pts_list_.clear();
-
191  last_audio_decoder_config_ = scoped_refptr<AudioStreamInfo>();
-
192 }
-
193 
-
194 bool EsParserAdts::UpdateAudioConfiguration(const uint8_t* adts_frame,
-
195  size_t adts_frame_size) {
-
196  const uint8_t kAacSampleSizeBits(16);
-
197 
-
198  AdtsHeader adts_header;
-
199  if (!adts_header.Parse(adts_frame, adts_frame_size)) {
-
200  LOG(ERROR) << "Error parsing ADTS frame header.";
-
201  return false;
-
202  }
-
203  std::vector<uint8_t> audio_specific_config;
-
204  if (!adts_header.GetAudioSpecificConfig(&audio_specific_config))
-
205  return false;
-
206 
-
207  if (last_audio_decoder_config_) {
-
208  // Verify that the audio decoder config has not changed.
-
209  if (last_audio_decoder_config_->codec_config() == audio_specific_config) {
-
210  // Audio configuration has not changed.
-
211  return true;
-
212  }
-
213  NOTIMPLEMENTED() << "Varying audio configurations are not supported.";
-
214  return false;
-
215  }
-
216 
-
217  // The following code is written according to ISO 14496 Part 3 Table 1.11 and
-
218  // Table 1.22. (Table 1.11 refers to the capping to 48000, Table 1.22 refers
-
219  // to SBR doubling the AAC sample rate.)
-
220  int samples_per_second = adts_header.GetSamplingFrequency();
-
221  int extended_samples_per_second = sbr_in_mimetype_
-
222  ? std::min(2 * samples_per_second, 48000)
-
223  : samples_per_second;
-
224 
-
225  last_audio_decoder_config_ = scoped_refptr<StreamInfo>(new AudioStreamInfo(
-
226  pid(), kMpeg2Timescale, kInfiniteDuration, kCodecAAC,
-
227  AudioStreamInfo::GetCodecString(kCodecAAC, adts_header.GetObjectType()),
-
228  audio_specific_config.data(), audio_specific_config.size(),
-
229  kAacSampleSizeBits, adts_header.GetNumChannels(),
-
230  extended_samples_per_second, 0 /* seek preroll */, 0 /* codec delay */,
-
231  0 /* max bitrate */, 0 /* avg bitrate */, std::string(), false));
-
232 
-
233  DVLOG(1) << "Sampling frequency: " << samples_per_second;
-
234  DVLOG(1) << "Extended sampling frequency: " << extended_samples_per_second;
-
235  DVLOG(1) << "Channel config: " << adts_header.GetNumChannels();
-
236  DVLOG(1) << "Object type: " << adts_header.GetObjectType();
-
237  // Reset the timestamp helper to use a new sampling frequency.
-
238  if (audio_timestamp_helper_) {
-
239  int64_t base_timestamp = audio_timestamp_helper_->GetTimestamp();
-
240  audio_timestamp_helper_.reset(
-
241  new AudioTimestampHelper(kMpeg2Timescale, samples_per_second));
-
242  audio_timestamp_helper_->SetBaseTimestamp(base_timestamp);
-
243  } else {
-
244  audio_timestamp_helper_.reset(
-
245  new AudioTimestampHelper(kMpeg2Timescale, extended_samples_per_second));
-
246  }
+
185 void EsParserAdts::Reset() {
+
186  es_byte_queue_.Reset();
+
187  pts_list_.clear();
+
188  last_audio_decoder_config_ = std::shared_ptr<AudioStreamInfo>();
+
189 }
+
190 
+
191 bool EsParserAdts::UpdateAudioConfiguration(const uint8_t* adts_frame,
+
192  size_t adts_frame_size) {
+
193  const uint8_t kAacSampleSizeBits(16);
+
194 
+
195  AdtsHeader adts_header;
+
196  if (!adts_header.Parse(adts_frame, adts_frame_size)) {
+
197  LOG(ERROR) << "Error parsing ADTS frame header.";
+
198  return false;
+
199  }
+
200  std::vector<uint8_t> audio_specific_config;
+
201  if (!adts_header.GetAudioSpecificConfig(&audio_specific_config))
+
202  return false;
+
203 
+
204  if (last_audio_decoder_config_) {
+
205  // Verify that the audio decoder config has not changed.
+
206  if (last_audio_decoder_config_->codec_config() == audio_specific_config) {
+
207  // Audio configuration has not changed.
+
208  return true;
+
209  }
+
210  NOTIMPLEMENTED() << "Varying audio configurations are not supported.";
+
211  return false;
+
212  }
+
213 
+
214  // The following code is written according to ISO 14496 Part 3 Table 1.11 and
+
215  // Table 1.22. (Table 1.11 refers to the capping to 48000, Table 1.22 refers
+
216  // to SBR doubling the AAC sample rate.)
+
217  int samples_per_second = adts_header.GetSamplingFrequency();
+
218  int extended_samples_per_second = sbr_in_mimetype_
+
219  ? std::min(2 * samples_per_second, 48000)
+
220  : samples_per_second;
+
221 
+
222  last_audio_decoder_config_ = std::make_shared<AudioStreamInfo>(
+
223  pid(), kMpeg2Timescale, kInfiniteDuration, kCodecAAC,
+
224  AudioStreamInfo::GetCodecString(kCodecAAC, adts_header.GetObjectType()),
+
225  audio_specific_config.data(), audio_specific_config.size(),
+
226  kAacSampleSizeBits, adts_header.GetNumChannels(),
+
227  extended_samples_per_second, 0 /* seek preroll */, 0 /* codec delay */,
+
228  0 /* max bitrate */, 0 /* avg bitrate */, std::string(), false);
+
229 
+
230  DVLOG(1) << "Sampling frequency: " << samples_per_second;
+
231  DVLOG(1) << "Extended sampling frequency: " << extended_samples_per_second;
+
232  DVLOG(1) << "Channel config: " << adts_header.GetNumChannels();
+
233  DVLOG(1) << "Object type: " << adts_header.GetObjectType();
+
234  // Reset the timestamp helper to use a new sampling frequency.
+
235  if (audio_timestamp_helper_) {
+
236  int64_t base_timestamp = audio_timestamp_helper_->GetTimestamp();
+
237  audio_timestamp_helper_.reset(
+
238  new AudioTimestampHelper(kMpeg2Timescale, samples_per_second));
+
239  audio_timestamp_helper_->SetBaseTimestamp(base_timestamp);
+
240  } else {
+
241  audio_timestamp_helper_.reset(
+
242  new AudioTimestampHelper(kMpeg2Timescale, extended_samples_per_second));
+
243  }
+
244 
+
245  // Audio config notification.
+
246  new_stream_info_cb_.Run(last_audio_decoder_config_);
247 
-
248  // Audio config notification.
-
249  new_stream_info_cb_.Run(last_audio_decoder_config_);
+
248  return true;
+
249 }
250 
-
251  return true;
-
252 }
-
253 
-
254 void EsParserAdts::DiscardEs(int nbytes) {
-
255  DCHECK_GE(nbytes, 0);
-
256  if (nbytes <= 0)
-
257  return;
-
258 
-
259  // Adjust the ES position of each PTS.
-
260  for (EsPtsList::iterator it = pts_list_.begin(); it != pts_list_.end(); ++it)
-
261  it->first -= nbytes;
-
262 
-
263  // Discard |nbytes| of ES.
-
264  es_byte_queue_.Pop(nbytes);
-
265 }
-
266 
-
267 } // namespace mp2t
-
268 } // namespace media
-
269 } // namespace shaka
+
251 void EsParserAdts::DiscardEs(int nbytes) {
+
252  DCHECK_GE(nbytes, 0);
+
253  if (nbytes <= 0)
+
254  return;
+
255 
+
256  // Adjust the ES position of each PTS.
+
257  for (EsPtsList::iterator it = pts_list_.begin(); it != pts_list_.end(); ++it)
+
258  it->first -= nbytes;
+
259 
+
260  // Discard |nbytes| of ES.
+
261  es_byte_queue_.Pop(nbytes);
+
262 }
+
263 
+
264 } // namespace mp2t
+
265 } // namespace media
+
266 } // namespace shaka
void Push(const uint8_t *data, int size)
Append new bytes to the end of the queue.
Definition: byte_queue.cc:29
void Pop(int count)
Definition: byte_queue.cc:70
static size_t GetAdtsFrameSize(const uint8_t *data, size_t num_bytes)
Definition: adts_header.cc:23
void Reset()
Reset the queue to the empty state.
Definition: byte_queue.cc:24
void Peek(const uint8_t **data, int *size) const
Definition: byte_queue.cc:63
static std::string GetCodecString(Codec codec, uint8_t audio_object_type)
-
static scoped_refptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
Definition: media_sample.cc:45
+
static std::shared_ptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
Definition: media_sample.cc:45
static size_t GetAdtsHeaderSize(const uint8_t *data, size_t num_bytes)
Definition: adts_header.cc:31
diff --git a/docs/d5/d95/structshaka_1_1media_1_1mp4_1_1EditListEntry-members.html b/docs/d5/d95/structshaka_1_1media_1_1mp4_1_1EditListEntry-members.html index 543c1587c9..e6cb69e5ec 100644 --- a/docs/d5/d95/structshaka_1_1media_1_1mp4_1_1EditListEntry-members.html +++ b/docs/d5/d95/structshaka_1_1media_1_1mp4_1_1EditListEntry-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d98/encryptor_8cc_source.html b/docs/d5/d98/encryptor_8cc_source.html index 82b2433493..794df63d2f 100644 --- a/docs/d5/d98/encryptor_8cc_source.html +++ b/docs/d5/d98/encryptor_8cc_source.html @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
73  return CreateContentEncryption(track, key_.get());
74 }
75 
-
76 Status Encryptor::EncryptFrame(scoped_refptr<MediaSample> sample,
+
76 Status Encryptor::EncryptFrame(std::shared_ptr<MediaSample> sample,
77  bool encrypt_frame) {
78  DCHECK(encryptor_);
79 
@@ -306,19 +306,19 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
virtual Status GetKey(TrackType track_type, EncryptionKey *key)=0
const uint8_t * Buffer() const
Definition: buffer_writer.h:59
+
Status EncryptFrame(std::shared_ptr< MediaSample > sample, bool encrypt_frame)
Definition: encryptor.cc:76
Status Initialize(MuxerListener *muxer_listener, KeySource::TrackType track_type, Codec codec, KeySource *key_source, bool webm_subsample_encryption)
Definition: encryptor.cc:61
static bool GenerateRandomIv(FourCC protection_scheme, std::vector< uint8_t > *iv)
Definition: aes_cryptor.cc:107
Class to parse a vp9 bit stream.
Definition: vp9_parser.h:20
-
Status EncryptFrame(scoped_refptr< MediaSample > sample, bool encrypt_frame)
Definition: encryptor.cc:76
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:30
diff --git a/docs/d5/d9b/vp__codec__configuration__record_8h_source.html b/docs/d5/d9b/vp__codec__configuration__record_8h_source.html index 6b99fee49d..554ce6468f 100644 --- a/docs/d5/d9b/vp__codec__configuration__record_8h_source.html +++ b/docs/d5/d9b/vp__codec__configuration__record_8h_source.html @@ -224,7 +224,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d9d/structshaka_1_1media_1_1H265ReferencePictureListModifications.html b/docs/d5/d9d/structshaka_1_1media_1_1H265ReferencePictureListModifications.html index f0ac46f9ee..41cdbaea79 100644 --- a/docs/d5/d9d/structshaka_1_1media_1_1H265ReferencePictureListModifications.html +++ b/docs/d5/d9d/structshaka_1_1media_1_1H265ReferencePictureListModifications.html @@ -119,7 +119,7 @@ std::vector< int > l diff --git a/docs/d5/da4/aes__encryptor_8cc_source.html b/docs/d5/da4/aes__encryptor_8cc_source.html index 77873d7ffd..acc871ec85 100644 --- a/docs/d5/da4/aes__encryptor_8cc_source.html +++ b/docs/d5/da4/aes__encryptor_8cc_source.html @@ -297,7 +297,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/dad/structshaka_1_1media_1_1H265ReferencePictureSet.html b/docs/d5/dad/structshaka_1_1media_1_1H265ReferencePictureSet.html index f84364e363..0ecd053240 100644 --- a/docs/d5/dad/structshaka_1_1media_1_1H265ReferencePictureSet.html +++ b/docs/d5/dad/structshaka_1_1media_1_1H265ReferencePictureSet.html @@ -127,7 +127,7 @@ int num_delta_pocs diff --git a/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.html b/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.html index c878d8a9c3..050c3fba14 100644 --- a/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.html +++ b/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.html @@ -88,7 +88,6 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
shaka::media::StreamInfo Class Referenceabstract
@@ -105,9 +104,9 @@ Inheritance diagram for shaka::media::StreamInfo:
-shaka::media::AudioStreamInfo -shaka::media::TextStreamInfo -shaka::media::VideoStreamInfo +shaka::media::AudioStreamInfo +shaka::media::TextStreamInfo +shaka::media::VideoStreamInfo
@@ -162,17 +161,11 @@ void  -
set_codec_string
void set_language (const std::string &language)
 
- - -

-Friends

-class base::RefCountedThreadSafe< StreamInfo >
 

Detailed Description

Abstract class holds stream information.

-

Definition at line 53 of file stream_info.h.

+

Definition at line 51 of file stream_info.h.

Member Function Documentation

@@ -235,7 +228,7 @@ class base::RefCountedThre
diff --git a/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.png b/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.png index d743535b17..22697a216d 100644 Binary files a/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.png and b/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.png differ diff --git a/docs/d5/db9/classshaka_1_1media_1_1mp2t_1_1EsParserH264.html b/docs/d5/db9/classshaka_1_1media_1_1mp2t_1_1EsParserH264.html index 86110052f6..36c01bb887 100644 --- a/docs/d5/db9/classshaka_1_1media_1_1mp2t_1_1EsParserH264.html +++ b/docs/d5/db9/classshaka_1_1media_1_1mp2t_1_1EsParserH264.html @@ -136,15 +136,15 @@ uint32_t pid ()

Additional Inherited Members

- Public Types inherited from shaka::media::mp2t::EsParser - + typedef base::Callback< void(const
-scoped_refptr< StreamInfo > &)> NewStreamInfoCB -  - +std::shared_ptr< StreamInfo > &)> NewStreamInfoCB +  + typedef base::Callback< void(uint32_t,
-const scoped_refptr
+const std::shared_ptr
< MediaSample > &)> EmitSampleCB -  +  - Protected Member Functions inherited from shaka::media::mp2t::EsParserH26x const
@@ -161,7 +161,7 @@ const
diff --git a/docs/d5/dba/ts__packet_8cc_source.html b/docs/d5/dba/ts__packet_8cc_source.html index 3337b0d6b8..49b6f9a3f1 100644 --- a/docs/d5/dba/ts__packet_8cc_source.html +++ b/docs/d5/dba/ts__packet_8cc_source.html @@ -307,7 +307,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/dc1/webm__webvtt__parser_8cc_source.html b/docs/d5/dc1/webm__webvtt__parser_8cc_source.html index e00775f3a3..6cedcda38e 100644 --- a/docs/d5/dc1/webm__webvtt__parser_8cc_source.html +++ b/docs/d5/dc1/webm__webvtt__parser_8cc_source.html @@ -171,7 +171,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/dc8/structshaka_1_1media_1_1mp4_1_1TrackFragment-members.html b/docs/d5/dc8/structshaka_1_1media_1_1mp4_1_1TrackFragment-members.html index 27ddb271f9..1b989bb986 100644 --- a/docs/d5/dc8/structshaka_1_1media_1_1mp4_1_1TrackFragment-members.html +++ b/docs/d5/dc8/structshaka_1_1media_1_1mp4_1_1TrackFragment-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/dca/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationOffset.html b/docs/d5/dca/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationOffset.html index 5ab2481be3..a7fc7ce80f 100644 --- a/docs/d5/dca/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationOffset.html +++ b/docs/d5/dca/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationOffset.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d5/dcf/rsa__key_8h_source.html b/docs/d5/dcf/rsa__key_8h_source.html index d97fa54b11..d355386b1b 100644 --- a/docs/d5/dcf/rsa__key_8h_source.html +++ b/docs/d5/dcf/rsa__key_8h_source.html @@ -165,7 +165,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/dda/ts__section__psi_8h_source.html b/docs/d5/dda/ts__section__psi_8h_source.html index 8011c6017f..5e60bb75ef 100644 --- a/docs/d5/dda/ts__section__psi_8h_source.html +++ b/docs/d5/dda/ts__section__psi_8h_source.html @@ -151,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/de0/bit__reader_8cc_source.html b/docs/d5/de0/bit__reader_8cc_source.html index 0bd0de65a1..f04bbd26ca 100644 --- a/docs/d5/de0/bit__reader_8cc_source.html +++ b/docs/d5/de0/bit__reader_8cc_source.html @@ -197,7 +197,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html b/docs/d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html index 7f637e60b8..2c8d0dfc21 100644 --- a/docs/d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html +++ b/docs/d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html @@ -101,8 +101,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); Public Member Functions virtual bool Initialize (const StreamInfo &stream)   -virtual bool PushSample (scoped_refptr< MediaSample > sample) -  +virtual bool PushSample (std::shared_ptr< MediaSample > sample) +  virtual bool SetEncryptionKey (std::unique_ptr< EncryptionKey > encryption_key)   virtual size_t NumberOfReadyPesPackets () @@ -202,7 +202,7 @@ class PesPacketGeneratorTe

Initialize the object. This clears the internal state first so any PesPackets that have not been flushed will be lost.

Parameters
- +
streamis the stream info for the elementary stream that will be added via PushSample().
streamis the stream info for the elementary stream that will be added via PushSample().
@@ -238,7 +238,7 @@ class PesPacketGeneratorTe - +
@@ -248,7 +248,7 @@ class  - + @@ -307,7 +307,7 @@ class  diff --git a/docs/d5/dec/decoder__configuration__record_8cc_source.html b/docs/d5/dec/decoder__configuration__record_8cc_source.html index 5781e9363a..7d82729501 100644 --- a/docs/d5/dec/decoder__configuration__record_8cc_source.html +++ b/docs/d5/dec/decoder__configuration__record_8cc_source.html @@ -120,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/dec/structshaka_1_1media_1_1mp4_1_1WebVTTConfigurationBox-members.html b/docs/d5/dec/structshaka_1_1media_1_1mp4_1_1WebVTTConfigurationBox-members.html index 402e675eab..9e2436a4a2 100644 --- a/docs/d5/dec/structshaka_1_1media_1_1mp4_1_1WebVTTConfigurationBox-members.html +++ b/docs/d5/dec/structshaka_1_1media_1_1mp4_1_1WebVTTConfigurationBox-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
PesPacketGeneratorTe
bool shaka::media::mp2t::PesPacketGenerator::PushSample (scoped_refptr< MediaSamplestd::shared_ptr< MediaSample sample)
PesPacketGeneratorTe diff --git a/docs/d5/dec/classshaka_1_1media_1_1WebMParserClient.html b/docs/d5/dec/classshaka_1_1media_1_1WebMParserClient.html index 3160e34337..5d9c6d4c2c 100644 --- a/docs/d5/dec/classshaka_1_1media_1_1WebMParserClient.html +++ b/docs/d5/dec/classshaka_1_1media_1_1WebMParserClient.html @@ -151,7 +151,7 @@ Protected Member Functions
diff --git a/docs/d5/def/ts__section__pmt_8h_source.html b/docs/d5/def/ts__section__pmt_8h_source.html index a3f99880a4..4e7881399c 100644 --- a/docs/d5/def/ts__section__pmt_8h_source.html +++ b/docs/d5/def/ts__section__pmt_8h_source.html @@ -133,7 +133,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
diff --git a/docs/d5/dfa/classshaka_1_1media_1_1HlsNotifyMuxerListener.html b/docs/d5/dfa/classshaka_1_1media_1_1HlsNotifyMuxerListener.html index 267e46dc03..fffecbf5a2 100644 --- a/docs/d5/dfa/classshaka_1_1media_1_1HlsNotifyMuxerListener.html +++ b/docs/d5/dfa/classshaka_1_1media_1_1HlsNotifyMuxerListener.html @@ -535,7 +535,7 @@ Additional Inherited Members diff --git a/docs/d5/dfa/classshaka_1_1media_1_1MediaParser-members.html b/docs/d5/dfa/classshaka_1_1media_1_1MediaParser-members.html index d4b76835eb..7a40ab04cb 100644 --- a/docs/d5/dfa/classshaka_1_1media_1_1MediaParser-members.html +++ b/docs/d5/dfa/classshaka_1_1media_1_1MediaParser-members.html @@ -95,15 +95,15 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + - +
Flush() WARN_UNUSED_RESULT=0shaka::media::MediaParserpure virtual
Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source)=0shaka::media::MediaParserpure virtual
InitCB typedefshaka::media::MediaParser
InitCB typedefshaka::media::MediaParser
MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinline
NewSampleCB typedefshaka::media::MediaParser
NewSampleCB typedefshaka::media::MediaParser
Parse(const uint8_t *buf, int size) WARN_UNUSED_RESULT=0shaka::media::MediaParserpure virtual
~MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinlinevirtual
diff --git a/docs/d5/dfc/file_8cc_source.html b/docs/d5/dfc/file_8cc_source.html index e28e2198f2..079e6809de 100644 --- a/docs/d5/dfc/file_8cc_source.html +++ b/docs/d5/dfc/file_8cc_source.html @@ -376,7 +376,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d02/playready__key__encryption__flags_8h_source.html b/docs/d6/d02/playready__key__encryption__flags_8h_source.html index e40dc1430f..672ab2ff93 100644 --- a/docs/d6/d02/playready__key__encryption__flags_8h_source.html +++ b/docs/d6/d02/playready__key__encryption__flags_8h_source.html @@ -121,7 +121,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d03/classshaka_1_1media_1_1AesCbcDecryptor-members.html b/docs/d6/d03/classshaka_1_1media_1_1AesCbcDecryptor-members.html index 0b1976a687..79fea48462 100644 --- a/docs/d6/d03/classshaka_1_1media_1_1AesCbcDecryptor-members.html +++ b/docs/d6/d03/classshaka_1_1media_1_1AesCbcDecryptor-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d09/aes__pattern__cryptor_8h_source.html b/docs/d6/d09/aes__pattern__cryptor_8h_source.html index 210bcadc37..fa206a2b31 100644 --- a/docs/d6/d09/aes__pattern__cryptor_8h_source.html +++ b/docs/d6/d09/aes__pattern__cryptor_8h_source.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d16/text__stream__info_8cc_source.html b/docs/d6/d16/text__stream__info_8cc_source.html index 4d5732e860..5431bae823 100644 --- a/docs/d6/d16/text__stream__info_8cc_source.html +++ b/docs/d6/d16/text__stream__info_8cc_source.html @@ -118,13 +118,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
29 
30 } // namespace media
31 } // namespace shaka
-
Abstract class holds stream information.
Definition: stream_info.h:53
+
Abstract class holds stream information.
Definition: stream_info.h:51
TextStreamInfo(int track_id, uint32_t time_scale, uint64_t duration, const std::string &codec_string, const std::string &codec_config, uint16_t width, uint16_t height, const std::string &language)
bool IsValidConfig() const override
diff --git a/docs/d6/d17/es__parser__h264_8cc_source.html b/docs/d6/d17/es__parser__h264_8cc_source.html index 2c75c92248..0791ba5f93 100644 --- a/docs/d6/d17/es__parser__h264_8cc_source.html +++ b/docs/d6/d17/es__parser__h264_8cc_source.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
36 void EsParserH264::Reset() {
37  DVLOG(1) << "EsParserH264::Reset";
38  h264_parser_.reset(new H264Parser());
-
39  last_video_decoder_config_ = scoped_refptr<StreamInfo>();
+
39  last_video_decoder_config_ = std::shared_ptr<StreamInfo>();
40  decoder_config_check_pending_ = false;
41  EsParserH26x::Reset();
42 }
@@ -235,33 +235,34 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
146  return false;
147  }
148 
-
149  last_video_decoder_config_ = scoped_refptr<StreamInfo>(new VideoStreamInfo(
-
150  pid(), kMpeg2Timescale, kInfiniteDuration, kCodecH264,
-
151  AVCDecoderConfigurationRecord::GetCodecString(decoder_config_record[1],
-
152  decoder_config_record[2],
-
153  decoder_config_record[3]),
-
154  decoder_config_record.data(), decoder_config_record.size(), coded_width,
-
155  coded_height, pixel_width, pixel_height, 0,
-
156  H264ByteToUnitStreamConverter::kUnitStreamNaluLengthSize, std::string(),
-
157  false));
-
158  DVLOG(1) << "Profile IDC: " << sps->profile_idc;
-
159  DVLOG(1) << "Level IDC: " << sps->level_idc;
-
160  DVLOG(1) << "log2_max_frame_num_minus4: " << sps->log2_max_frame_num_minus4;
-
161 
-
162  // Video config notification.
-
163  new_stream_info_cb_.Run(last_video_decoder_config_);
-
164 
-
165  return true;
-
166 }
-
167 
-
168 } // namespace mp2t
-
169 } // namespace media
-
170 } // namespace shaka
+
149  const uint8_t nalu_length_size =
+
150  H26xByteToUnitStreamConverter::kUnitStreamNaluLengthSize;
+
151  last_video_decoder_config_ = std::make_shared<VideoStreamInfo>(
+
152  pid(), kMpeg2Timescale, kInfiniteDuration, kCodecH264,
+
153  AVCDecoderConfigurationRecord::GetCodecString(decoder_config_record[1],
+
154  decoder_config_record[2],
+
155  decoder_config_record[3]),
+
156  decoder_config_record.data(), decoder_config_record.size(), coded_width,
+
157  coded_height, pixel_width, pixel_height, 0, nalu_length_size,
+
158  std::string(), false);
+
159  DVLOG(1) << "Profile IDC: " << sps->profile_idc;
+
160  DVLOG(1) << "Level IDC: " << sps->level_idc;
+
161  DVLOG(1) << "log2_max_frame_num_minus4: " << sps->log2_max_frame_num_minus4;
+
162 
+
163  // Video config notification.
+
164  new_stream_info_cb_.Run(last_video_decoder_config_);
+
165 
+
166  return true;
+
167 }
+
168 
+
169 } // namespace mp2t
+
170 } // namespace media
+
171 } // namespace shaka
diff --git a/docs/d6/d1a/structshaka_1_1media_1_1mp4_1_1MovieHeader.html b/docs/d6/d1a/structshaka_1_1media_1_1mp4_1_1MovieHeader.html index e755a32850..2307cdb35f 100644 --- a/docs/d6/d1a/structshaka_1_1media_1_1mp4_1_1MovieHeader.html +++ b/docs/d6/d1a/structshaka_1_1media_1_1mp4_1_1MovieHeader.html @@ -200,7 +200,7 @@ Additional Inherited Members diff --git a/docs/d6/d1a/ts__packet__writer__util_8cc_source.html b/docs/d6/d1a/ts__packet__writer__util_8cc_source.html index 86d154fbfc..737d2b651a 100644 --- a/docs/d6/d1a/ts__packet__writer__util_8cc_source.html +++ b/docs/d6/d1a/ts__packet__writer__util_8cc_source.html @@ -255,7 +255,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d26/structshaka_1_1media_1_1VideoStreamInfoParameters.html b/docs/d6/d26/structshaka_1_1media_1_1VideoStreamInfoParameters.html index c3dc2e3fbb..3d160d8d0b 100644 --- a/docs/d6/d26/structshaka_1_1media_1_1VideoStreamInfoParameters.html +++ b/docs/d6/d26/structshaka_1_1media_1_1VideoStreamInfoParameters.html @@ -138,7 +138,7 @@ bool is_encrypted

Detailed Description

-

Definition at line 57 of file muxer_listener_test_helper.h.

+

Definition at line 56 of file muxer_listener_test_helper.h.


The documentation for this struct was generated from the following files:
  • media/event/muxer_listener_test_helper.h
  • media/event/muxer_listener_test_helper.cc
  • @@ -146,7 +146,7 @@ bool is_encrypted diff --git a/docs/d6/d2e/mpd__notifier__util_8cc_source.html b/docs/d6/d2e/mpd__notifier__util_8cc_source.html index 9333a7b8a9..c2b271bb37 100644 --- a/docs/d6/d2e/mpd__notifier__util_8cc_source.html +++ b/docs/d6/d2e/mpd__notifier__util_8cc_source.html @@ -170,7 +170,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d32/classshaka_1_1media_1_1TextTrack-members.html b/docs/d6/d32/classshaka_1_1media_1_1TextTrack-members.html index 23b28de321..fa92a597b2 100644 --- a/docs/d6/d32/classshaka_1_1media_1_1TextTrack-members.html +++ b/docs/d6/d32/classshaka_1_1media_1_1TextTrack-members.html @@ -98,7 +98,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d35/webm__content__encodings_8cc_source.html b/docs/d6/d35/webm__content__encodings_8cc_source.html index fbafa96f04..c3d0c9f270 100644 --- a/docs/d6/d35/webm__content__encodings_8cc_source.html +++ b/docs/d6/d35/webm__content__encodings_8cc_source.html @@ -120,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d3b/chunk__info__iterator_8cc_source.html b/docs/d6/d3b/chunk__info__iterator_8cc_source.html index b5c383b262..17feaa3f4c 100644 --- a/docs/d6/d3b/chunk__info__iterator_8cc_source.html +++ b/docs/d6/d3b/chunk__info__iterator_8cc_source.html @@ -171,7 +171,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d41/encrypting__fragmenter_8cc_source.html b/docs/d6/d41/encrypting__fragmenter_8cc_source.html index d7c16795f3..957f026311 100644 --- a/docs/d6/d41/encrypting__fragmenter_8cc_source.html +++ b/docs/d6/d41/encrypting__fragmenter_8cc_source.html @@ -147,8 +147,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    58 }
    59 } // namespace
    60 
    - -
    62  scoped_refptr<StreamInfo> info,
    + +
    62  std::shared_ptr<StreamInfo> info,
    63  TrackFragment* traf,
    64  std::unique_ptr<EncryptionKey> encryption_key,
    65  int64_t clear_time,
    @@ -192,7 +192,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    103 
    104 EncryptingFragmenter::~EncryptingFragmenter() {}
    105 
    -
    106 Status EncryptingFragmenter::AddSample(scoped_refptr<MediaSample> sample) {
    +
    106 Status EncryptingFragmenter::AddSample(std::shared_ptr<MediaSample> sample) {
    107  DCHECK(sample);
    108  if (!fragment_initialized()) {
    109  Status status = InitializeFragment(sample->dts());
    @@ -204,7 +204,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    115  if (!status.ok())
    116  return status;
    117  }
    -
    118  return Fragmenter::AddSample(sample);
    +
    118  return Fragmenter::AddSample(sample);
    119 }
    120 
    @@ -337,155 +337,157 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    248  CHECK(encryptor_->Crypt(data, size, data));
    249 }
    250 
    -
    251 Status EncryptingFragmenter::EncryptSample(scoped_refptr<MediaSample> sample) {
    -
    252  DCHECK(encryptor_);
    -
    253 
    -
    254  SampleEncryptionEntry sample_encryption_entry;
    -
    255  // For 'cbcs' scheme, Constant IVs SHALL be used.
    -
    256  if (protection_scheme_ != FOURCC_cbcs)
    -
    257  sample_encryption_entry.initialization_vector = encryptor_->iv();
    -
    258  uint8_t* data = sample->writable_data();
    -
    259  if (IsSubsampleEncryptionRequired()) {
    -
    260  if (vpx_parser_) {
    -
    261  std::vector<VPxFrameInfo> vpx_frames;
    -
    262  if (!vpx_parser_->Parse(sample->data(), sample->data_size(),
    -
    263  &vpx_frames)) {
    -
    264  return Status(error::MUXER_FAILURE, "Failed to parse vpx frame.");
    -
    265  }
    -
    266 
    -
    267  const bool is_superframe = vpx_frames.size() > 1;
    -
    268  for (const VPxFrameInfo& frame : vpx_frames) {
    -
    269  SubsampleEntry subsample;
    -
    270  subsample.clear_bytes =
    -
    271  static_cast<uint16_t>(frame.uncompressed_header_size);
    -
    272  subsample.cipher_bytes = static_cast<uint32_t>(
    -
    273  frame.frame_size - frame.uncompressed_header_size);
    -
    274 
    -
    275  // "VP Codec ISO Media File Format Binding" document requires that the
    -
    276  // encrypted bytes of each frame within the superframe must be block
    -
    277  // aligned so that the counter state can be computed for each frame
    -
    278  // within the superframe.
    -
    279  // ISO/IEC 23001-7:2016 10.2 'cbc1' 10.3 'cens'
    -
    280  // The BytesOfProtectedData size SHALL be a multiple of 16 bytes to
    -
    281  // avoid partial blocks in Subsamples.
    -
    282  if (is_superframe || protection_scheme_ == FOURCC_cbc1 ||
    -
    283  protection_scheme_ == FOURCC_cens) {
    -
    284  const uint16_t misalign_bytes =
    -
    285  subsample.cipher_bytes % kCencBlockSize;
    -
    286  subsample.clear_bytes += misalign_bytes;
    -
    287  subsample.cipher_bytes -= misalign_bytes;
    -
    288  }
    -
    289 
    -
    290  sample_encryption_entry.subsamples.push_back(subsample);
    -
    291  if (subsample.cipher_bytes > 0)
    -
    292  EncryptBytes(data + subsample.clear_bytes, subsample.cipher_bytes);
    -
    293  data += frame.frame_size;
    -
    294  }
    -
    295  // Add subsample for the superframe index if exists.
    -
    296  if (is_superframe) {
    -
    297  size_t index_size = sample->data() + sample->data_size() - data;
    -
    298  DCHECK_LE(index_size, 2 + vpx_frames.size() * 4);
    -
    299  DCHECK_GE(index_size, 2 + vpx_frames.size() * 1);
    -
    300  SubsampleEntry subsample;
    -
    301  subsample.clear_bytes = static_cast<uint16_t>(index_size);
    -
    302  subsample.cipher_bytes = 0;
    -
    303  sample_encryption_entry.subsamples.push_back(subsample);
    -
    304  }
    -
    305  } else {
    -
    306  const Nalu::CodecType nalu_type =
    -
    307  (video_codec_ == kCodecHVC1 || video_codec_ == kCodecHEV1)
    -
    308  ? Nalu::kH265
    -
    309  : Nalu::kH264;
    -
    310  NaluReader reader(nalu_type, nalu_length_size_, data,
    -
    311  sample->data_size());
    -
    312 
    -
    313  // Store the current length of clear data. This is used to squash
    -
    314  // multiple unencrypted NAL units into fewer subsample entries.
    -
    315  uint64_t accumulated_clear_bytes = 0;
    -
    316 
    -
    317  Nalu nalu;
    -
    318  NaluReader::Result result;
    -
    319  while ((result = reader.Advance(&nalu)) == NaluReader::kOk) {
    -
    320  if (nalu.is_video_slice()) {
    -
    321  // For video-slice NAL units, encrypt the video slice. This skips
    -
    322  // the frame header. If this is an unrecognized codec (e.g. H.265),
    -
    323  // the whole NAL unit will be encrypted.
    -
    324  const int64_t video_slice_header_size =
    -
    325  header_parser_ ? header_parser_->GetHeaderSize(nalu) : 0;
    -
    326  if (video_slice_header_size < 0)
    -
    327  return Status(error::MUXER_FAILURE, "Failed to read slice header.");
    -
    328 
    -
    329  uint64_t current_clear_bytes =
    -
    330  nalu.header_size() + video_slice_header_size;
    -
    331  uint64_t cipher_bytes = nalu.payload_size() - video_slice_header_size;
    -
    332 
    -
    333  // ISO/IEC 23001-7:2016 10.2 'cbc1' 10.3 'cens'
    -
    334  // The BytesOfProtectedData size SHALL be a multiple of 16 bytes to
    -
    335  // avoid partial blocks in Subsamples.
    -
    336  if (protection_scheme_ == FOURCC_cbc1 ||
    -
    337  protection_scheme_ == FOURCC_cens) {
    -
    338  const uint16_t misalign_bytes = cipher_bytes % kCencBlockSize;
    -
    339  current_clear_bytes += misalign_bytes;
    -
    340  cipher_bytes -= misalign_bytes;
    -
    341  }
    -
    342 
    -
    343  const uint8_t* nalu_data = nalu.data() + current_clear_bytes;
    -
    344  EncryptBytes(const_cast<uint8_t*>(nalu_data), cipher_bytes);
    -
    345 
    -
    346  AddSubsamples(
    -
    347  accumulated_clear_bytes + nalu_length_size_ + current_clear_bytes,
    -
    348  cipher_bytes, &sample_encryption_entry.subsamples);
    -
    349  accumulated_clear_bytes = 0;
    -
    350  } else {
    -
    351  // For non-video-slice NAL units, don't encrypt.
    -
    352  accumulated_clear_bytes +=
    -
    353  nalu_length_size_ + nalu.header_size() + nalu.payload_size();
    -
    354  }
    -
    355  }
    -
    356  if (result != NaluReader::kEOStream)
    -
    357  return Status(error::MUXER_FAILURE, "Failed to parse NAL units.");
    -
    358  AddSubsamples(accumulated_clear_bytes, 0,
    -
    359  &sample_encryption_entry.subsamples);
    -
    360  }
    -
    361  DCHECK_EQ(sample_encryption_entry.GetTotalSizeOfSubsamples(),
    -
    362  sample->data_size());
    -
    363 
    -
    364  // The length of per-sample auxiliary datum, defined in CENC ch. 7.
    -
    365  traf()->auxiliary_size.sample_info_sizes.push_back(
    -
    366  sample_encryption_entry.ComputeSize());
    -
    367  } else {
    -
    368  DCHECK_LE(crypt_byte_block(), 1u);
    -
    369  DCHECK_EQ(skip_byte_block(), 0u);
    -
    370  EncryptBytes(data, sample->data_size());
    -
    371  }
    -
    372 
    -
    373  traf()->sample_encryption.sample_encryption_entries.push_back(
    -
    374  sample_encryption_entry);
    -
    375  encryptor_->UpdateIv();
    -
    376  return Status::OK;
    -
    377 }
    -
    378 
    -
    379 bool EncryptingFragmenter::IsSubsampleEncryptionRequired() {
    -
    380  return vpx_parser_ || nalu_length_size_ != 0;
    -
    381 }
    -
    382 
    -
    383 } // namespace mp4
    -
    384 } // namespace media
    -
    385 } // namespace shaka
    +
    251 Status EncryptingFragmenter::EncryptSample(
    +
    252  std::shared_ptr<MediaSample> sample) {
    +
    253  DCHECK(encryptor_);
    +
    254 
    +
    255  SampleEncryptionEntry sample_encryption_entry;
    +
    256  // For 'cbcs' scheme, Constant IVs SHALL be used.
    +
    257  if (protection_scheme_ != FOURCC_cbcs)
    +
    258  sample_encryption_entry.initialization_vector = encryptor_->iv();
    +
    259  uint8_t* data = sample->writable_data();
    +
    260  if (IsSubsampleEncryptionRequired()) {
    +
    261  if (vpx_parser_) {
    +
    262  std::vector<VPxFrameInfo> vpx_frames;
    +
    263  if (!vpx_parser_->Parse(sample->data(), sample->data_size(),
    +
    264  &vpx_frames)) {
    +
    265  return Status(error::MUXER_FAILURE, "Failed to parse vpx frame.");
    +
    266  }
    +
    267 
    +
    268  const bool is_superframe = vpx_frames.size() > 1;
    +
    269  for (const VPxFrameInfo& frame : vpx_frames) {
    +
    270  SubsampleEntry subsample;
    +
    271  subsample.clear_bytes =
    +
    272  static_cast<uint16_t>(frame.uncompressed_header_size);
    +
    273  subsample.cipher_bytes = static_cast<uint32_t>(
    +
    274  frame.frame_size - frame.uncompressed_header_size);
    +
    275 
    +
    276  // "VP Codec ISO Media File Format Binding" document requires that the
    +
    277  // encrypted bytes of each frame within the superframe must be block
    +
    278  // aligned so that the counter state can be computed for each frame
    +
    279  // within the superframe.
    +
    280  // ISO/IEC 23001-7:2016 10.2 'cbc1' 10.3 'cens'
    +
    281  // The BytesOfProtectedData size SHALL be a multiple of 16 bytes to
    +
    282  // avoid partial blocks in Subsamples.
    +
    283  if (is_superframe || protection_scheme_ == FOURCC_cbc1 ||
    +
    284  protection_scheme_ == FOURCC_cens) {
    +
    285  const uint16_t misalign_bytes =
    +
    286  subsample.cipher_bytes % kCencBlockSize;
    +
    287  subsample.clear_bytes += misalign_bytes;
    +
    288  subsample.cipher_bytes -= misalign_bytes;
    +
    289  }
    +
    290 
    +
    291  sample_encryption_entry.subsamples.push_back(subsample);
    +
    292  if (subsample.cipher_bytes > 0)
    +
    293  EncryptBytes(data + subsample.clear_bytes, subsample.cipher_bytes);
    +
    294  data += frame.frame_size;
    +
    295  }
    +
    296  // Add subsample for the superframe index if exists.
    +
    297  if (is_superframe) {
    +
    298  size_t index_size = sample->data() + sample->data_size() - data;
    +
    299  DCHECK_LE(index_size, 2 + vpx_frames.size() * 4);
    +
    300  DCHECK_GE(index_size, 2 + vpx_frames.size() * 1);
    +
    301  SubsampleEntry subsample;
    +
    302  subsample.clear_bytes = static_cast<uint16_t>(index_size);
    +
    303  subsample.cipher_bytes = 0;
    +
    304  sample_encryption_entry.subsamples.push_back(subsample);
    +
    305  }
    +
    306  } else {
    +
    307  const Nalu::CodecType nalu_type =
    +
    308  (video_codec_ == kCodecHVC1 || video_codec_ == kCodecHEV1)
    +
    309  ? Nalu::kH265
    +
    310  : Nalu::kH264;
    +
    311  NaluReader reader(nalu_type, nalu_length_size_, data,
    +
    312  sample->data_size());
    +
    313 
    +
    314  // Store the current length of clear data. This is used to squash
    +
    315  // multiple unencrypted NAL units into fewer subsample entries.
    +
    316  uint64_t accumulated_clear_bytes = 0;
    +
    317 
    +
    318  Nalu nalu;
    +
    319  NaluReader::Result result;
    +
    320  while ((result = reader.Advance(&nalu)) == NaluReader::kOk) {
    +
    321  if (nalu.is_video_slice()) {
    +
    322  // For video-slice NAL units, encrypt the video slice. This skips
    +
    323  // the frame header. If this is an unrecognized codec (e.g. H.265),
    +
    324  // the whole NAL unit will be encrypted.
    +
    325  const int64_t video_slice_header_size =
    +
    326  header_parser_ ? header_parser_->GetHeaderSize(nalu) : 0;
    +
    327  if (video_slice_header_size < 0)
    +
    328  return Status(error::MUXER_FAILURE, "Failed to read slice header.");
    +
    329 
    +
    330  uint64_t current_clear_bytes =
    +
    331  nalu.header_size() + video_slice_header_size;
    +
    332  uint64_t cipher_bytes = nalu.payload_size() - video_slice_header_size;
    +
    333 
    +
    334  // ISO/IEC 23001-7:2016 10.2 'cbc1' 10.3 'cens'
    +
    335  // The BytesOfProtectedData size SHALL be a multiple of 16 bytes to
    +
    336  // avoid partial blocks in Subsamples.
    +
    337  if (protection_scheme_ == FOURCC_cbc1 ||
    +
    338  protection_scheme_ == FOURCC_cens) {
    +
    339  const uint16_t misalign_bytes = cipher_bytes % kCencBlockSize;
    +
    340  current_clear_bytes += misalign_bytes;
    +
    341  cipher_bytes -= misalign_bytes;
    +
    342  }
    +
    343 
    +
    344  const uint8_t* nalu_data = nalu.data() + current_clear_bytes;
    +
    345  EncryptBytes(const_cast<uint8_t*>(nalu_data), cipher_bytes);
    +
    346 
    +
    347  AddSubsamples(
    +
    348  accumulated_clear_bytes + nalu_length_size_ + current_clear_bytes,
    +
    349  cipher_bytes, &sample_encryption_entry.subsamples);
    +
    350  accumulated_clear_bytes = 0;
    +
    351  } else {
    +
    352  // For non-video-slice NAL units, don't encrypt.
    +
    353  accumulated_clear_bytes +=
    +
    354  nalu_length_size_ + nalu.header_size() + nalu.payload_size();
    +
    355  }
    +
    356  }
    +
    357  if (result != NaluReader::kEOStream)
    +
    358  return Status(error::MUXER_FAILURE, "Failed to parse NAL units.");
    +
    359  AddSubsamples(accumulated_clear_bytes, 0,
    +
    360  &sample_encryption_entry.subsamples);
    +
    361  }
    +
    362  DCHECK_EQ(sample_encryption_entry.GetTotalSizeOfSubsamples(),
    +
    363  sample->data_size());
    +
    364 
    +
    365  // The length of per-sample auxiliary datum, defined in CENC ch. 7.
    +
    366  traf()->auxiliary_size.sample_info_sizes.push_back(
    +
    367  sample_encryption_entry.ComputeSize());
    +
    368  } else {
    +
    369  DCHECK_LE(crypt_byte_block(), 1u);
    +
    370  DCHECK_EQ(skip_byte_block(), 0u);
    +
    371  EncryptBytes(data, sample->data_size());
    +
    372  }
    +
    373 
    +
    374  traf()->sample_encryption.sample_encryption_entries.push_back(
    +
    375  sample_encryption_entry);
    +
    376  encryptor_->UpdateIv();
    +
    377  return Status::OK;
    +
    378 }
    +
    379 
    +
    380 bool EncryptingFragmenter::IsSubsampleEncryptionRequired() {
    +
    381  return vpx_parser_ || nalu_length_size_ != 0;
    +
    382 }
    +
    383 
    +
    384 } // namespace mp4
    +
    385 } // namespace media
    +
    386 } // namespace shaka
    -
    Status AddSample(scoped_refptr< MediaSample > sample) override
    Status InitializeFragment(int64_t first_sample_dts) override
    -
    virtual Status AddSample(scoped_refptr< MediaSample > sample)
    Definition: fragmenter.cc:46
    virtual void OnEncryptionStart()=0
    +
    EncryptingFragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)
    void FinalizeFragment() override
    Finalize and optimize the fragment.
    virtual Status InitializeFragment(int64_t first_sample_dts)
    Definition: fragmenter.cc:92
    +
    Status AddSample(std::shared_ptr< MediaSample > sample) override
    virtual void FinalizeFragment()
    Finalize and optimize the fragment.
    Definition: fragmenter.cc:111
    +
    virtual Status AddSample(std::shared_ptr< MediaSample > sample)
    Definition: fragmenter.cc:46
    virtual void FinalizeFragmentForEncryption()
    Finalize current fragment for encryption.
    - +
    Class to parse a vp9 bit stream.
    Definition: vp9_parser.h:20
    Implements pattern-based encryption/decryption.
    @@ -494,13 +496,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    virtual Status PrepareFragmentForEncryption(bool enable_encryption)
    -
    EncryptingFragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)
    -
    bool OptimizeSampleEntries(std::vector< T > *entries, T *default_value)
    Definition: fragmenter.h:101
    +
    bool OptimizeSampleEntries(std::vector< T > *entries, T *default_value)
    Definition: fragmenter.h:100
    diff --git a/docs/d6/d4e/webm_2multi__segment__segmenter_8cc_source.html b/docs/d6/d4e/webm_2multi__segment__segmenter_8cc_source.html index 9f8c8a92a3..345058be1a 100644 --- a/docs/d6/d4e/webm_2multi__segment__segmenter_8cc_source.html +++ b/docs/d6/d4e/webm_2multi__segment__segmenter_8cc_source.html @@ -187,7 +187,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d55/aes__cryptor_8cc_source.html b/docs/d6/d55/aes__cryptor_8cc_source.html index 507d3b32bb..70834ee908 100644 --- a/docs/d6/d55/aes__cryptor_8cc_source.html +++ b/docs/d6/d55/aes__cryptor_8cc_source.html @@ -227,7 +227,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d57/classshaka_1_1media_1_1AVCDecoderConfigurationRecord.html b/docs/d6/d57/classshaka_1_1media_1_1AVCDecoderConfigurationRecord.html index 5ad28548bc..dd409cd8db 100644 --- a/docs/d6/d57/classshaka_1_1media_1_1AVCDecoderConfigurationRecord.html +++ b/docs/d6/d57/classshaka_1_1media_1_1AVCDecoderConfigurationRecord.html @@ -244,7 +244,7 @@ void  diff --git a/docs/d6/d59/protection__system__specific__info_8h_source.html b/docs/d6/d59/protection__system__specific__info_8h_source.html index 01c929e47c..efa8fc1de5 100644 --- a/docs/d6/d59/protection__system__specific__info_8h_source.html +++ b/docs/d6/d59/protection__system__specific__info_8h_source.html @@ -163,7 +163,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d60/classshaka_1_1media_1_1VPCodecConfigurationRecord-members.html b/docs/d6/d60/classshaka_1_1media_1_1VPCodecConfigurationRecord-members.html index 90f6477110..3c69cffb51 100644 --- a/docs/d6/d60/classshaka_1_1media_1_1VPCodecConfigurationRecord-members.html +++ b/docs/d6/d60/classshaka_1_1media_1_1VPCodecConfigurationRecord-members.html @@ -134,7 +134,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d6c/h26x__bit__reader_8cc_source.html b/docs/d6/d6c/h26x__bit__reader_8cc_source.html index bbad270760..8187622b68 100644 --- a/docs/d6/d6c/h26x__bit__reader_8cc_source.html +++ b/docs/d6/d6c/h26x__bit__reader_8cc_source.html @@ -259,7 +259,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d6e/ts__section__pes_8cc_source.html b/docs/d6/d6e/ts__section__pes_8cc_source.html index 2d90d3f1c4..87a28b335e 100644 --- a/docs/d6/d6e/ts__section__pes_8cc_source.html +++ b/docs/d6/d6e/ts__section__pes_8cc_source.html @@ -407,7 +407,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d71/scoped__xml__ptr_8h_source.html b/docs/d6/d71/scoped__xml__ptr_8h_source.html index 8f80dc830f..33e95137e9 100644 --- a/docs/d6/d71/scoped__xml__ptr_8h_source.html +++ b/docs/d6/d71/scoped__xml__ptr_8h_source.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d77/dash__iop__mpd__notifier_8h_source.html b/docs/d6/d77/dash__iop__mpd__notifier_8h_source.html index dda5a3fe2f..db115efdf0 100644 --- a/docs/d6/d77/dash__iop__mpd__notifier_8h_source.html +++ b/docs/d6/d77/dash__iop__mpd__notifier_8h_source.html @@ -206,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d79/structshaka_1_1media_1_1mp4_1_1VTTAdditionalTextBox.html b/docs/d6/d79/structshaka_1_1media_1_1mp4_1_1VTTAdditionalTextBox.html index 6e99f9b8a1..577aa084a4 100644 --- a/docs/d6/d79/structshaka_1_1media_1_1mp4_1_1VTTAdditionalTextBox.html +++ b/docs/d6/d79/structshaka_1_1media_1_1mp4_1_1VTTAdditionalTextBox.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d6/d7b/webm__tracks__parser_8h_source.html b/docs/d6/d7b/webm__tracks__parser_8h_source.html index 6bc9f464ec..2559fdf8df 100644 --- a/docs/d6/d7b/webm__tracks__parser_8h_source.html +++ b/docs/d6/d7b/webm__tracks__parser_8h_source.html @@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    51  return audio_encryption_key_id_;
    52  }
    53 
    -
    54  scoped_refptr<AudioStreamInfo> audio_stream_info() {
    +
    54  std::shared_ptr<AudioStreamInfo> audio_stream_info() {
    55  return audio_stream_info_;
    56  }
    57 
    @@ -139,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    59  return video_encryption_key_id_;
    60  }
    61 
    -
    62  scoped_refptr<VideoStreamInfo> video_stream_info() {
    +
    62  std::shared_ptr<VideoStreamInfo> video_stream_info() {
    63  return video_stream_info_;
    64  }
    65 
    @@ -180,10 +180,10 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    100  std::string video_encryption_key_id_;
    101 
    102  WebMAudioClient audio_client_;
    -
    103  scoped_refptr<AudioStreamInfo> audio_stream_info_;
    +
    103  std::shared_ptr<AudioStreamInfo> audio_stream_info_;
    104 
    105  WebMVideoClient video_client_;
    -
    106  scoped_refptr<VideoStreamInfo> video_stream_info_;
    +
    106  std::shared_ptr<VideoStreamInfo> video_stream_info_;
    107 
    108  DISALLOW_COPY_AND_ASSIGN(WebMTracksParser);
    109 };
    @@ -201,7 +201,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d7c/structshaka_1_1media_1_1mp4_1_1AC3Specific-members.html b/docs/d6/d7c/structshaka_1_1media_1_1mp4_1_1AC3Specific-members.html index 5b33b553fe..1bc4bb629d 100644 --- a/docs/d6/d7c/structshaka_1_1media_1_1mp4_1_1AC3Specific-members.html +++ b/docs/d6/d7c/structshaka_1_1media_1_1mp4_1_1AC3Specific-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d86/bandwidth__estimator_8cc_source.html b/docs/d6/d86/bandwidth__estimator_8cc_source.html index c15731914b..cecfa229ff 100644 --- a/docs/d6/d86/bandwidth__estimator_8cc_source.html +++ b/docs/d6/d86/bandwidth__estimator_8cc_source.html @@ -154,7 +154,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d8a/vp9__parser_8cc_source.html b/docs/d6/d8a/vp9__parser_8cc_source.html index 893627cc65..0bb4c4be80 100644 --- a/docs/d6/d8a/vp9__parser_8cc_source.html +++ b/docs/d6/d8a/vp9__parser_8cc_source.html @@ -660,7 +660,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d8f/classshaka_1_1xml_1_1RepresentationBaseXmlNode-members.html b/docs/d6/d8f/classshaka_1_1xml_1_1RepresentationBaseXmlNode-members.html index 608d9f4fc7..1f70f2b15e 100644 --- a/docs/d6/d8f/classshaka_1_1xml_1_1RepresentationBaseXmlNode-members.html +++ b/docs/d6/d8f/classshaka_1_1xml_1_1RepresentationBaseXmlNode-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d9b/h264__parser_8h_source.html b/docs/d6/d9b/h264__parser_8h_source.html index 6625fb1fb2..ea7ce68af8 100644 --- a/docs/d6/d9b/h264__parser_8h_source.html +++ b/docs/d6/d9b/h264__parser_8h_source.html @@ -448,7 +448,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d9f/hls__flags_8cc_source.html b/docs/d6/d9f/hls__flags_8cc_source.html index 9a5f01e82e..4b3240bf51 100644 --- a/docs/d6/d9f/hls__flags_8cc_source.html +++ b/docs/d6/d9f/hls__flags_8cc_source.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/da0/ts__section__pat_8h_source.html b/docs/d6/da0/ts__section__pat_8h_source.html index e0346a8253..581d6bec38 100644 --- a/docs/d6/da0/ts__section__pat_8h_source.html +++ b/docs/d6/da0/ts__section__pat_8h_source.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/da3/mpd__builder_8h_source.html b/docs/d6/da3/mpd__builder_8h_source.html index 849b754f27..a22aeae7e6 100644 --- a/docs/d6/da3/mpd__builder_8h_source.html +++ b/docs/d6/da3/mpd__builder_8h_source.html @@ -522,7 +522,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/da4/classshaka_1_1media_1_1AVCDecoderConfigurationRecord-members.html b/docs/d6/da4/classshaka_1_1media_1_1AVCDecoderConfigurationRecord-members.html index d135b8d20a..ca28a921bb 100644 --- a/docs/d6/da4/classshaka_1_1media_1_1AVCDecoderConfigurationRecord-members.html +++ b/docs/d6/da4/classshaka_1_1media_1_1AVCDecoderConfigurationRecord-members.html @@ -119,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/da6/structshaka_1_1media_1_1H265SliceHeader_1_1LongTermPicsInfo-members.html b/docs/d6/da6/structshaka_1_1media_1_1H265SliceHeader_1_1LongTermPicsInfo-members.html index 8e087fb57d..0af4de831e 100644 --- a/docs/d6/da6/structshaka_1_1media_1_1H265SliceHeader_1_1LongTermPicsInfo-members.html +++ b/docs/d6/da6/structshaka_1_1media_1_1H265SliceHeader_1_1LongTermPicsInfo-members.html @@ -98,7 +98,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/da9/classshaka_1_1media_1_1BitReader.html b/docs/d6/da9/classshaka_1_1media_1_1BitReader.html index 6f566fd080..936a05974b 100644 --- a/docs/d6/da9/classshaka_1_1media_1_1BitReader.html +++ b/docs/d6/da9/classshaka_1_1media_1_1BitReader.html @@ -365,7 +365,7 @@ template<typename T > diff --git a/docs/d6/daa/structshaka_1_1media_1_1mp4_1_1VTTCueBox.html b/docs/d6/daa/structshaka_1_1media_1_1mp4_1_1VTTCueBox.html index 158c8a9e75..fa260d46d2 100644 --- a/docs/d6/daa/structshaka_1_1media_1_1mp4_1_1VTTCueBox.html +++ b/docs/d6/daa/structshaka_1_1media_1_1mp4_1_1VTTCueBox.html @@ -185,7 +185,7 @@ Additional Inherited Members diff --git a/docs/d6/db1/classshaka_1_1media_1_1MediaStream-members.html b/docs/d6/db1/classshaka_1_1media_1_1MediaStream-members.html index a41cad4ce5..1e9e3df522 100644 --- a/docs/d6/db1/classshaka_1_1media_1_1MediaStream-members.html +++ b/docs/d6/db1/classshaka_1_1media_1_1MediaStream-members.html @@ -98,18 +98,18 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); info() const (defined in shaka::media::MediaStream)shaka::media::MediaStream kPull enum value (defined in shaka::media::MediaStream)shaka::media::MediaStream kPush enum value (defined in shaka::media::MediaStream)shaka::media::MediaStream - MediaStream(scoped_refptr< StreamInfo > info, Demuxer *demuxer)shaka::media::MediaStream + MediaStream(std::shared_ptr< StreamInfo > info, Demuxer *demuxer)shaka::media::MediaStream MediaStreamOperation enum name (defined in shaka::media::MediaStream)shaka::media::MediaStream muxer() (defined in shaka::media::MediaStream)shaka::media::MediaStreaminline - PullSample(scoped_refptr< MediaSample > *sample)shaka::media::MediaStream - PushSample(const scoped_refptr< MediaSample > &sample)shaka::media::MediaStream + PullSample(std::shared_ptr< MediaSample > *sample)shaka::media::MediaStream + PushSample(const std::shared_ptr< MediaSample > &sample)shaka::media::MediaStream Start(MediaStreamOperation operation)shaka::media::MediaStream ToString() const shaka::media::MediaStream ~MediaStream() (defined in shaka::media::MediaStream)shaka::media::MediaStream diff --git a/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html b/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html index 974077a8f7..fad08d0c14 100644 --- a/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html +++ b/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html @@ -104,7 +104,7 @@ Inheritance diagram for shaka::media::VideoStreamInfo:
    -shaka::media::StreamInfo +shaka::media::StreamInfo
    @@ -369,7 +369,7 @@ void 
    set_language (con

    Returns the pixel height.

    Returns
    0 if unknown.
    -

    Definition at line 42 of file video_stream_info.h.

    +

    Definition at line 44 of file video_stream_info.h.

    @@ -396,7 +396,7 @@ void 
    set_language (con

    Returns the pixel width.

    Returns
    0 if unknown.
    -

    Definition at line 39 of file video_stream_info.h.

    +

    Definition at line 41 of file video_stream_info.h.

    @@ -435,7 +435,7 @@ void 
    set_language (con diff --git a/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.png b/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.png index a081022344..438e2159d2 100644 Binary files a/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.png and b/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.png differ diff --git a/docs/d6/db1/structshaka_1_1media_1_1VideoStreamInfoParameters-members.html b/docs/d6/db1/structshaka_1_1media_1_1VideoStreamInfoParameters-members.html index 2f3796ea8f..7aa3ebd360 100644 --- a/docs/d6/db1/structshaka_1_1media_1_1VideoStreamInfoParameters-members.html +++ b/docs/d6/db1/structshaka_1_1media_1_1VideoStreamInfoParameters-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/d6/dc6/structshaka_1_1media_1_1mp2t_1_1EsParserH26x_1_1VideoSliceInfo-members.html b/docs/d6/dc6/structshaka_1_1media_1_1mp2t_1_1EsParserH26x_1_1VideoSliceInfo-members.html index cc75ff38dd..cfda26b383 100644 --- a/docs/d6/dc6/structshaka_1_1media_1_1mp2t_1_1EsParserH26x_1_1VideoSliceInfo-members.html +++ b/docs/d6/dc6/structshaka_1_1media_1_1mp2t_1_1EsParserH26x_1_1VideoSliceInfo-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/dc7/classshaka_1_1media_1_1mp2t_1_1EsParserH26x-members.html b/docs/d6/dc7/classshaka_1_1media_1_1mp2t_1_1EsParserH26x-members.html index 3cd756b7b9..eaaa52be3f 100644 --- a/docs/d6/dc7/classshaka_1_1media_1_1mp2t_1_1EsParserH26x-members.html +++ b/docs/d6/dc7/classshaka_1_1media_1_1mp2t_1_1EsParserH26x-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/dc8/mkv__writer_8cc_source.html b/docs/d6/dc8/mkv__writer_8cc_source.html index 3abd726240..88a2f4b07a 100644 --- a/docs/d6/dc8/mkv__writer_8cc_source.html +++ b/docs/d6/dc8/mkv__writer_8cc_source.html @@ -195,7 +195,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/dcb/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry.html b/docs/d6/dcb/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry.html index 38c187c44f..3c2bd9575e 100644 --- a/docs/d6/dcb/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry.html +++ b/docs/d6/dcb/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry.html @@ -250,7 +250,7 @@ std::vector< diff --git a/docs/d6/dcc/classshaka_1_1media_1_1VP9Parser-members.html b/docs/d6/dcc/classshaka_1_1media_1_1VP9Parser-members.html index 8f7314e397..786573ae19 100644 --- a/docs/d6/dcc/classshaka_1_1media_1_1VP9Parser-members.html +++ b/docs/d6/dcc/classshaka_1_1media_1_1VP9Parser-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/dce/structshaka_1_1media_1_1mp4_1_1SegmentReference-members.html b/docs/d6/dce/structshaka_1_1media_1_1mp4_1_1SegmentReference-members.html index 27ebab450e..3a9aaf83f9 100644 --- a/docs/d6/dce/structshaka_1_1media_1_1mp4_1_1SegmentReference-members.html +++ b/docs/d6/dce/structshaka_1_1media_1_1mp4_1_1SegmentReference-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/dcf/classshaka_1_1media_1_1mp2t_1_1EsParserAdts.html b/docs/d6/dcf/classshaka_1_1media_1_1mp2t_1_1EsParserAdts.html index 57f96da047..9d00100ef2 100644 --- a/docs/d6/dcf/classshaka_1_1media_1_1mp2t_1_1EsParserAdts.html +++ b/docs/d6/dcf/classshaka_1_1media_1_1mp2t_1_1EsParserAdts.html @@ -128,15 +128,15 @@ uint32_t pid ()

    Additional Inherited Members

    - Public Types inherited from shaka::media::mp2t::EsParser - + typedef base::Callback< void(const
    -scoped_refptr< StreamInfo > &)> NewStreamInfoCB -  - +std::shared_ptr< StreamInfo > &)> NewStreamInfoCB +  + typedef base::Callback< void(uint32_t,
    -const scoped_refptr
    +const std::shared_ptr
    < MediaSample > &)> EmitSampleCB -  + 

    Detailed Description

    @@ -148,7 +148,7 @@ const scoped_refptr
    diff --git a/docs/d6/dd0/structshaka_1_1media_1_1H264SEIMessage.html b/docs/d6/dd0/structshaka_1_1media_1_1H264SEIMessage.html index 9f63cc093d..e35c561cf9 100644 --- a/docs/d6/dd0/structshaka_1_1media_1_1H264SEIMessage.html +++ b/docs/d6/dd0/structshaka_1_1media_1_1H264SEIMessage.html @@ -127,7 +127,7 @@ union { diff --git a/docs/d6/dde/structshaka_1_1media_1_1H265VuiParameters-members.html b/docs/d6/dde/structshaka_1_1media_1_1H265VuiParameters-members.html index 53bbb2f85e..694b1abafb 100644 --- a/docs/d6/dde/structshaka_1_1media_1_1H265VuiParameters-members.html +++ b/docs/d6/dde/structshaka_1_1media_1_1H265VuiParameters-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/de4/structshaka_1_1media_1_1mp4_1_1CueTimeBox-members.html b/docs/d6/de4/structshaka_1_1media_1_1mp4_1_1CueTimeBox-members.html index 3a4fa23e6b..f4b175b17d 100644 --- a/docs/d6/de4/structshaka_1_1media_1_1mp4_1_1CueTimeBox-members.html +++ b/docs/d6/de4/structshaka_1_1media_1_1mp4_1_1CueTimeBox-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/de7/structshaka_1_1media_1_1VPxFrameInfo-members.html b/docs/d6/de7/structshaka_1_1media_1_1VPxFrameInfo-members.html index c750e09dc7..d1e8c3ff5f 100644 --- a/docs/d6/de7/structshaka_1_1media_1_1VPxFrameInfo-members.html +++ b/docs/d6/de7/structshaka_1_1media_1_1VPxFrameInfo-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/de8/local__file_8cc_source.html b/docs/d6/de8/local__file_8cc_source.html index dbc81e6e71..bc373f1a57 100644 --- a/docs/d6/de8/local__file_8cc_source.html +++ b/docs/d6/de8/local__file_8cc_source.html @@ -211,7 +211,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/de8/network__util_8h_source.html b/docs/d6/de8/network__util_8h_source.html index 8bb6baebf2..8e18e9a0a8 100644 --- a/docs/d6/de8/network__util_8h_source.html +++ b/docs/d6/de8/network__util_8h_source.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/de9/ts__segmenter_8cc_source.html b/docs/d6/de9/ts__segmenter_8cc_source.html index ed6e691f1c..9c405ce0b0 100644 --- a/docs/d6/de9/ts__segmenter_8cc_source.html +++ b/docs/d6/de9/ts__segmenter_8cc_source.html @@ -177,7 +177,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    88 // First checks whether the sample is a key frame. If so and the segment has
    89 // passed the segment duration, then flush the generator and write all the data
    90 // to file.
    -
    91 Status TsSegmenter::AddSample(scoped_refptr<MediaSample> sample) {
    +
    91 Status TsSegmenter::AddSample(std::shared_ptr<MediaSample> sample) {
    92  const bool passed_segment_duration =
    93  current_segment_total_sample_duration_ > muxer_options_.segment_duration;
    94  if (sample->is_key_frame() && passed_segment_duration) {
    @@ -292,12 +292,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    virtual void OnNewSegment(const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size)=0
    virtual void OnEncryptionInfoReady(bool is_initial_encryption_info, FourCC protection_scheme, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv, const std::vector< ProtectionSystemSpecificInfo > &key_system_info)=0
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    -
    Status AddSample(scoped_refptr< MediaSample > sample)
    Definition: ts_segmenter.cc:91
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    virtual void OnEncryptionStart()=0
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    virtual Status GetKey(TrackType track_type, EncryptionKey *key)=0
    +
    Status AddSample(std::shared_ptr< MediaSample > sample)
    Definition: ts_segmenter.cc:91
    TsSegmenter(const MuxerOptions &options, MuxerListener *listener)
    Definition: ts_segmenter.cc:27
    static bool GenerateRandomIv(FourCC protection_scheme, std::vector< uint8_t > *iv)
    Definition: aes_cryptor.cc:107
    @@ -316,7 +316,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/ded/ts__packet_8h_source.html b/docs/d6/ded/ts__packet_8h_source.html index 05094f69dd..5a052190f6 100644 --- a/docs/d6/ded/ts__packet_8h_source.html +++ b/docs/d6/ded/ts__packet_8h_source.html @@ -169,7 +169,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/def/sync__sample__iterator_8cc_source.html b/docs/d6/def/sync__sample__iterator_8cc_source.html index 3e66872a61..13078b5199 100644 --- a/docs/d6/def/sync__sample__iterator_8cc_source.html +++ b/docs/d6/def/sync__sample__iterator_8cc_source.html @@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/dff/classshaka_1_1media_1_1Nalu.html b/docs/d6/dff/classshaka_1_1media_1_1Nalu.html index 23d9c79ab3..f0b00ca468 100644 --- a/docs/d6/dff/classshaka_1_1media_1_1Nalu.html +++ b/docs/d6/dff/classshaka_1_1media_1_1Nalu.html @@ -243,7 +243,7 @@ bool can_start_access_unit diff --git a/docs/d7/d01/structshaka_1_1media_1_1mp4_1_1SampleGroupDescription.html b/docs/d7/d01/structshaka_1_1media_1_1mp4_1_1SampleGroupDescription.html index 595ddb3a72..1ee3505e62 100644 --- a/docs/d7/d01/structshaka_1_1media_1_1mp4_1_1SampleGroupDescription.html +++ b/docs/d7/d01/structshaka_1_1media_1_1mp4_1_1SampleGroupDescription.html @@ -194,7 +194,7 @@ Additional Inherited Members diff --git a/docs/d7/d07/structshaka_1_1media_1_1mp4_1_1SoundMediaHeader.html b/docs/d7/d07/structshaka_1_1media_1_1mp4_1_1SoundMediaHeader.html index 71317fa483..1a50422f19 100644 --- a/docs/d7/d07/structshaka_1_1media_1_1mp4_1_1SoundMediaHeader.html +++ b/docs/d7/d07/structshaka_1_1media_1_1mp4_1_1SoundMediaHeader.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d7/d0b/muxer__listener__test__helper_8h_source.html b/docs/d7/d0b/muxer__listener__test__helper_8h_source.html index bc4523274f..0d01d59a2d 100644 --- a/docs/d7/d0b/muxer__listener__test__helper_8h_source.html +++ b/docs/d7/d0b/muxer__listener__test__helper_8h_source.html @@ -99,114 +99,113 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    10 #include <stdint.h>
    11 #include <vector>
    12 
    -
    13 #include "packager/base/memory/ref_counted.h"
    -
    14 #include "packager/media/base/key_source.h"
    -
    15 #include "packager/media/base/muxer_options.h"
    -
    16 #include "packager/media/base/stream_info.h"
    -
    17 #include "packager/media/base/video_stream_info.h"
    -
    18 #include "packager/mpd/base/media_info.pb.h"
    -
    19 
    -
    20 namespace shaka {
    -
    21 
    -
    22 namespace media {
    -
    23 
    -
    24 // A string containing the escaped PSSH box (for use with a MediaInfo proto).
    -
    25 // This is a full v0 PSSH box with the Widevine system ID and the PSSH data
    -
    26 // 'pssh'
    -
    27 const char kExpectedDefaultPsshBox[] =
    -
    28  "\\000\\000\\000$pssh\\000\\000\\000\\000\\000\\001\\002\\003\\004\\005"
    -
    29  "\\006\\007\\010\\t\\n\\013\\014\\r\\016\\017\\000\\000\\000\\004pssh";
    -
    30 const char kExpectedDefaultMediaInfo[] =
    -
    31  "bandwidth: 7620\n"
    -
    32  "video_info {\n"
    -
    33  " codec: 'avc1.010101'\n"
    -
    34  " width: 720\n"
    -
    35  " height: 480\n"
    -
    36  " time_scale: 10\n"
    -
    37  " pixel_width: 1\n"
    -
    38  " pixel_height: 1\n"
    -
    39  "}\n"
    -
    40  "init_range {\n"
    -
    41  " begin: 0\n"
    -
    42  " end: 120\n"
    -
    43  "}\n"
    -
    44  "index_range {\n"
    -
    45  " begin: 121\n"
    -
    46  " end: 221\n"
    -
    47  "}\n"
    -
    48  "reference_time_scale: 1000\n"
    -
    49  "container_type: 1\n"
    -
    50  "media_file_name: 'test_output_file_name.mp4'\n"
    -
    51  "media_duration_seconds: 10.5\n";
    -
    52 const uint32_t kDefaultReferenceTimeScale = 1000u;
    -
    53 
    -
    54 // Struct that gets passed for to CreateVideoStreamInfo() to create a
    -
    55 // StreamInfo instance. Useful for generating multiple VideoStreamInfo with
    -
    56 // slightly different parameters.
    - - - -
    60  int track_id;
    -
    61  uint32_t time_scale;
    -
    62  uint64_t duration;
    -
    63  Codec codec;
    -
    64  std::string codec_string;
    -
    65  std::string language;
    -
    66  uint16_t width;
    -
    67  uint16_t height;
    -
    68  uint32_t pixel_width;
    -
    69  uint32_t pixel_height;
    -
    70  uint8_t nalu_length_size;
    -
    71  std::vector<uint8_t> codec_config;
    -
    72  bool is_encrypted;
    -
    73 };
    -
    74 
    -
    75 // Note that this does not have vector of StreamInfo pointer.
    - -
    77  bool has_init_range;
    -
    78  uint64_t init_range_start;
    -
    79  uint64_t init_range_end;
    -
    80  bool has_index_range;
    -
    81  uint64_t index_range_start;
    -
    82  uint64_t index_range_end;
    -
    83  float duration_seconds;
    -
    84  uint64_t file_size;
    -
    85 };
    -
    86 
    -
    87 // Creates StreamInfo instance from VideoStreamInfoParameters.
    -
    88 scoped_refptr<StreamInfo> CreateVideoStreamInfo(
    -
    89  const VideoStreamInfoParameters& param);
    -
    90 
    -
    91 // Returns the "default" VideoStreamInfoParameters for testing.
    -
    92 VideoStreamInfoParameters GetDefaultVideoStreamInfoParams();
    -
    93 
    -
    94 // Returns the "default" values for OnMediaEnd().
    -
    95 OnMediaEndParameters GetDefaultOnMediaEndParams();
    -
    96 
    -
    97 // Returns the "default" ProtectionSystemSpecificInfo for testing.
    -
    98 std::vector<ProtectionSystemSpecificInfo> GetDefaultKeySystemInfo();
    -
    99 
    -
    100 // Sets "default" values for muxer_options for testing.
    -
    101 void SetDefaultMuxerOptionsValues(MuxerOptions* muxer_options);
    -
    102 
    -
    103 // Expect that expect and actual are equal.
    -
    104 void ExpectMediaInfoEqual(const MediaInfo& expect, const MediaInfo& actual);
    -
    105 
    -
    106 // Returns true if expect and actual are equal.
    -
    107 bool MediaInfoEqual(const MediaInfo& expect, const MediaInfo& actual);
    -
    108 
    -
    109 } // namespace media
    -
    110 
    -
    111 } // namespace shaka
    -
    112 
    -
    113 #endif // MEDIA_EVENT_MUXER_LISTENER_TEST_HELPER_H_
    +
    13 #include "packager/media/base/key_source.h"
    +
    14 #include "packager/media/base/muxer_options.h"
    +
    15 #include "packager/media/base/stream_info.h"
    +
    16 #include "packager/media/base/video_stream_info.h"
    +
    17 #include "packager/mpd/base/media_info.pb.h"
    +
    18 
    +
    19 namespace shaka {
    +
    20 
    +
    21 namespace media {
    +
    22 
    +
    23 // A string containing the escaped PSSH box (for use with a MediaInfo proto).
    +
    24 // This is a full v0 PSSH box with the Widevine system ID and the PSSH data
    +
    25 // 'pssh'
    +
    26 const char kExpectedDefaultPsshBox[] =
    +
    27  "\\000\\000\\000$pssh\\000\\000\\000\\000\\000\\001\\002\\003\\004\\005"
    +
    28  "\\006\\007\\010\\t\\n\\013\\014\\r\\016\\017\\000\\000\\000\\004pssh";
    +
    29 const char kExpectedDefaultMediaInfo[] =
    +
    30  "bandwidth: 7620\n"
    +
    31  "video_info {\n"
    +
    32  " codec: 'avc1.010101'\n"
    +
    33  " width: 720\n"
    +
    34  " height: 480\n"
    +
    35  " time_scale: 10\n"
    +
    36  " pixel_width: 1\n"
    +
    37  " pixel_height: 1\n"
    +
    38  "}\n"
    +
    39  "init_range {\n"
    +
    40  " begin: 0\n"
    +
    41  " end: 120\n"
    +
    42  "}\n"
    +
    43  "index_range {\n"
    +
    44  " begin: 121\n"
    +
    45  " end: 221\n"
    +
    46  "}\n"
    +
    47  "reference_time_scale: 1000\n"
    +
    48  "container_type: 1\n"
    +
    49  "media_file_name: 'test_output_file_name.mp4'\n"
    +
    50  "media_duration_seconds: 10.5\n";
    +
    51 const uint32_t kDefaultReferenceTimeScale = 1000u;
    +
    52 
    +
    53 // Struct that gets passed for to CreateVideoStreamInfo() to create a
    +
    54 // StreamInfo instance. Useful for generating multiple VideoStreamInfo with
    +
    55 // slightly different parameters.
    + + + +
    59  int track_id;
    +
    60  uint32_t time_scale;
    +
    61  uint64_t duration;
    +
    62  Codec codec;
    +
    63  std::string codec_string;
    +
    64  std::string language;
    +
    65  uint16_t width;
    +
    66  uint16_t height;
    +
    67  uint32_t pixel_width;
    +
    68  uint32_t pixel_height;
    +
    69  uint8_t nalu_length_size;
    +
    70  std::vector<uint8_t> codec_config;
    +
    71  bool is_encrypted;
    +
    72 };
    +
    73 
    +
    74 // Note that this does not have vector of StreamInfo pointer.
    + +
    76  bool has_init_range;
    +
    77  uint64_t init_range_start;
    +
    78  uint64_t init_range_end;
    +
    79  bool has_index_range;
    +
    80  uint64_t index_range_start;
    +
    81  uint64_t index_range_end;
    +
    82  float duration_seconds;
    +
    83  uint64_t file_size;
    +
    84 };
    +
    85 
    +
    86 // Creates StreamInfo instance from VideoStreamInfoParameters.
    +
    87 std::shared_ptr<StreamInfo> CreateVideoStreamInfo(
    +
    88  const VideoStreamInfoParameters& param);
    +
    89 
    +
    90 // Returns the "default" VideoStreamInfoParameters for testing.
    +
    91 VideoStreamInfoParameters GetDefaultVideoStreamInfoParams();
    +
    92 
    +
    93 // Returns the "default" values for OnMediaEnd().
    +
    94 OnMediaEndParameters GetDefaultOnMediaEndParams();
    +
    95 
    +
    96 // Returns the "default" ProtectionSystemSpecificInfo for testing.
    +
    97 std::vector<ProtectionSystemSpecificInfo> GetDefaultKeySystemInfo();
    +
    98 
    +
    99 // Sets "default" values for muxer_options for testing.
    +
    100 void SetDefaultMuxerOptionsValues(MuxerOptions* muxer_options);
    +
    101 
    +
    102 // Expect that expect and actual are equal.
    +
    103 void ExpectMediaInfoEqual(const MediaInfo& expect, const MediaInfo& actual);
    +
    104 
    +
    105 // Returns true if expect and actual are equal.
    +
    106 bool MediaInfoEqual(const MediaInfo& expect, const MediaInfo& actual);
    +
    107 
    +
    108 } // namespace media
    +
    109 
    +
    110 } // namespace shaka
    +
    111 
    +
    112 #endif // MEDIA_EVENT_MUXER_LISTENER_TEST_HELPER_H_
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    - - + + diff --git a/docs/d7/d12/media__parser_8h_source.html b/docs/d7/d12/media__parser_8h_source.html index 304245fa38..5320814c01 100644 --- a/docs/d7/d12/media__parser_8h_source.html +++ b/docs/d7/d12/media__parser_8h_source.html @@ -101,30 +101,30 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    12 #include <vector>
    13 #include "packager/base/callback.h"
    14 #include "packager/base/compiler_specific.h"
    -
    15 #include "packager/base/memory/ref_counted.h"
    -
    16 #include "packager/media/base/container_names.h"
    -
    17 
    -
    18 namespace shaka {
    -
    19 namespace media {
    -
    20 
    -
    21 class KeySource;
    -
    22 class MediaSample;
    -
    23 class StreamInfo;
    -
    24 
    -
    25 class MediaParser {
    -
    26  public:
    -
    27  MediaParser() {}
    -
    28  virtual ~MediaParser() {}
    -
    29 
    -
    33  typedef base::Callback<
    -
    34  void(const std::vector<scoped_refptr<StreamInfo> >& stream_info)> InitCB;
    +
    15 #include "packager/media/base/container_names.h"
    +
    16 
    +
    17 namespace shaka {
    +
    18 namespace media {
    +
    19 
    +
    20 class KeySource;
    +
    21 class MediaSample;
    +
    22 class StreamInfo;
    +
    23 
    +
    24 class MediaParser {
    +
    25  public:
    +
    26  MediaParser() {}
    +
    27  virtual ~MediaParser() {}
    +
    28 
    +
    32  typedef base::Callback<void(
    +
    33  const std::vector<std::shared_ptr<StreamInfo> >& stream_info)>
    +
    35 
    41  typedef base::Callback<bool(uint32_t track_id,
    -
    42  const scoped_refptr<MediaSample>& media_sample)>
    - +
    42  const std::shared_ptr<MediaSample>& media_sample)>
    +
    44 
    -
    52  virtual void Init(const InitCB& init_cb,
    -
    53  const NewSampleCB& new_sample_cb,
    +
    52  virtual void Init(const InitCB& init_cb,
    +
    53  const NewSampleCB& new_sample_cb,
    54  KeySource* decryption_key_source) = 0;
    55 
    59  virtual bool Flush() WARN_UNUSED_RESULT = 0;
    @@ -139,17 +139,17 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    70 } // namespace shaka
    71 
    72 #endif // MEDIA_BASE_MEDIA_PARSER_H_
    - -
    base::Callback< void(const std::vector< scoped_refptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    virtual bool Parse(const uint8_t *buf, int size) WARN_UNUSED_RESULT=0
    +
    base::Callback< void(const std::vector< std::shared_ptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    virtual void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source)=0
    virtual bool Flush() WARN_UNUSED_RESULT=0
    -
    base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    diff --git a/docs/d7/d15/mpd__notifier_8h_source.html b/docs/d7/d15/mpd__notifier_8h_source.html index 5f53341f4c..32d5f718ef 100644 --- a/docs/d7/d15/mpd__notifier_8h_source.html +++ b/docs/d7/d15/mpd__notifier_8h_source.html @@ -169,7 +169,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d16/structshaka_1_1media_1_1mp4_1_1VideoSampleEntry-members.html b/docs/d7/d16/structshaka_1_1media_1_1mp4_1_1VideoSampleEntry-members.html index 106367038a..2530d97013 100644 --- a/docs/d7/d16/structshaka_1_1media_1_1mp4_1_1VideoSampleEntry-members.html +++ b/docs/d7/d16/structshaka_1_1media_1_1mp4_1_1VideoSampleEntry-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d22/libcrypto__threading_8h_source.html b/docs/d7/d22/libcrypto__threading_8h_source.html index 236f6c7d4c..5e3251de9e 100644 --- a/docs/d7/d22/libcrypto__threading_8h_source.html +++ b/docs/d7/d22/libcrypto__threading_8h_source.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d26/classshaka_1_1media_1_1mp4_1_1SyncSampleIterator.html b/docs/d7/d26/classshaka_1_1media_1_1mp4_1_1SyncSampleIterator.html index 49079b839b..7d64ff5f12 100644 --- a/docs/d7/d26/classshaka_1_1media_1_1mp4_1_1SyncSampleIterator.html +++ b/docs/d7/d26/classshaka_1_1media_1_1mp4_1_1SyncSampleIterator.html @@ -177,7 +177,7 @@ Public Member Functions diff --git a/docs/d7/d29/structshaka_1_1media_1_1H265Sps-members.html b/docs/d7/d29/structshaka_1_1media_1_1H265Sps-members.html index a2a0ed4464..97db824d9a 100644 --- a/docs/d7/d29/structshaka_1_1media_1_1H265Sps-members.html +++ b/docs/d7/d29/structshaka_1_1media_1_1H265Sps-members.html @@ -146,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d29/structshaka_1_1media_1_1mp4_1_1CompositionTimeToSample-members.html b/docs/d7/d29/structshaka_1_1media_1_1mp4_1_1CompositionTimeToSample-members.html index 9cb310cc60..6cd960a55f 100644 --- a/docs/d7/d29/structshaka_1_1media_1_1mp4_1_1CompositionTimeToSample-members.html +++ b/docs/d7/d29/structshaka_1_1media_1_1mp4_1_1CompositionTimeToSample-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d36/classshaka_1_1media_1_1ContentEncoding-members.html b/docs/d7/d36/classshaka_1_1media_1_1ContentEncoding-members.html index cef095f8f3..4302a6a53e 100644 --- a/docs/d7/d36/classshaka_1_1media_1_1ContentEncoding-members.html +++ b/docs/d7/d36/classshaka_1_1media_1_1ContentEncoding-members.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d42/protection__system__specific__info_8cc_source.html b/docs/d7/d42/protection__system__specific__info_8cc_source.html index cf44fa5564..0c77091f4e 100644 --- a/docs/d7/d42/protection__system__specific__info_8cc_source.html +++ b/docs/d7/d42/protection__system__specific__info_8cc_source.html @@ -219,7 +219,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d42/structshaka_1_1media_1_1mp4_1_1SampleSize.html b/docs/d7/d42/structshaka_1_1media_1_1mp4_1_1SampleSize.html index cec0bbb10a..af420c4c55 100644 --- a/docs/d7/d42/structshaka_1_1media_1_1mp4_1_1SampleSize.html +++ b/docs/d7/d42/structshaka_1_1media_1_1mp4_1_1SampleSize.html @@ -188,7 +188,7 @@ Additional Inherited Members diff --git a/docs/d7/d44/structshaka_1_1media_1_1mp4_1_1SampleEncryption-members.html b/docs/d7/d44/structshaka_1_1media_1_1mp4_1_1SampleEncryption-members.html index 33e4b8d87a..b580b85ae8 100644 --- a/docs/d7/d44/structshaka_1_1media_1_1mp4_1_1SampleEncryption-members.html +++ b/docs/d7/d44/structshaka_1_1media_1_1mp4_1_1SampleEncryption-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d46/classshaka_1_1media_1_1WebMListParser-members.html b/docs/d7/d46/classshaka_1_1media_1_1WebMListParser-members.html index 04c6434c4f..f72255c490 100644 --- a/docs/d7/d46/classshaka_1_1media_1_1WebMListParser-members.html +++ b/docs/d7/d46/classshaka_1_1media_1_1WebMListParser-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d54/classshaka_1_1media_1_1H26xByteToUnitStreamConverter-members.html b/docs/d7/d54/classshaka_1_1media_1_1H26xByteToUnitStreamConverter-members.html index 4b86928c72..d601dfa57f 100644 --- a/docs/d7/d54/classshaka_1_1media_1_1H26xByteToUnitStreamConverter-members.html +++ b/docs/d7/d54/classshaka_1_1media_1_1H26xByteToUnitStreamConverter-members.html @@ -95,13 +95,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - +
    ConvertByteStreamToNalUnitStream(const uint8_t *input_frame, size_t input_frame_size, std::vector< uint8_t > *output_frame)shaka::media::H26xByteToUnitStreamConverter
    GetDecoderConfigurationRecord(std::vector< uint8_t > *decoder_config) const =0shaka::media::H26xByteToUnitStreamConverterpure virtual
    H26xByteToUnitStreamConverter(Nalu::CodecType type) (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverter
    H26xByteToUnitStreamConverter(Nalu::CodecType type) (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverterexplicit
    kUnitStreamNaluLengthSize (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverterstatic
    ~H26xByteToUnitStreamConverter() (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConvertervirtual
    diff --git a/docs/d7/d59/classshaka_1_1media_1_1DecryptorSource.html b/docs/d7/d59/classshaka_1_1media_1_1DecryptorSource.html index 4db7eb3547..b517f7b9ac 100644 --- a/docs/d7/d59/classshaka_1_1media_1_1DecryptorSource.html +++ b/docs/d7/d59/classshaka_1_1media_1_1DecryptorSource.html @@ -119,7 +119,7 @@ bool DecryptSampleBuffer diff --git a/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.html b/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.html index 98bb470cdb..319571136e 100644 --- a/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.html +++ b/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.html @@ -89,7 +89,6 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    shaka::media::MediaSample Class Reference
    @@ -100,17 +99,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); More...

    #include <media_sample.h>

    -
    -Inheritance diagram for shaka::media::MediaSample:
    -
    -
    - - - -
    + + @@ -182,31 +176,30 @@ void 

    Public Member Functions

    MediaSample (const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)
     
    int64_t dts () const
     
    set_config_id (co
    - - - - - - - - - - - -

    Static Public Member Functions

    static scoped_refptr< MediaSampleCopyFrom (const uint8_t *data, size_t size, bool is_key_frame)
     
    static scoped_refptr< MediaSampleCopyFrom (const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)
     
    static scoped_refptr< MediaSampleFromMetadata (const uint8_t *metadata, size_t metadata_size)
     
    -static scoped_refptr< MediaSampleCreateEmptyMediaSample ()
     Create a MediaSample object with default members.
     
    static scoped_refptr< MediaSampleCreateEOSBuffer ()
     
    - - - + + + + + + + + + + +

    -Friends

    -class base::RefCountedThreadSafe< MediaSample >
     
    static std::shared_ptr
    +< MediaSample
    CopyFrom (const uint8_t *data, size_t size, bool is_key_frame)
     
    static std::shared_ptr
    +< MediaSample
    CopyFrom (const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)
     
    static std::shared_ptr
    +< MediaSample
    FromMetadata (const uint8_t *metadata, size_t metadata_size)
     
    +static std::shared_ptr
    +< MediaSample
    CreateEmptyMediaSample ()
     Create a MediaSample object with default members.
     
    static std::shared_ptr
    +< MediaSample
    CreateEOSBuffer ()
     

    Detailed Description

    Class to hold a media sample.

    Definition at line 22 of file media_sample.h.

    Member Function Documentation

    - +
    @@ -214,7 +207,7 @@ class 
    base::RefCountedThre - + @@ -257,7 +250,7 @@ class 
    scoped_refptr< MediaSample > shaka::media::MediaSample::CopyFrom std::shared_ptr< MediaSample > shaka::media::MediaSample::CopyFrom ( const uint8_t *  data, base::RefCountedThre - +
    @@ -265,7 +258,7 @@ class  - +
    base::RefCountedThre - + @@ -322,7 +315,7 @@ class  - + - + @@ -208,7 +209,7 @@ track_id, const scoped_refptr

    Implements shaka::media::MediaParser.

    -

    Definition at line 95 of file mp4_media_parser.cc.

    +

    Definition at line 94 of file mp4_media_parser.cc.

    @@ -234,7 +235,7 @@ track_id, const scoped_refptr
    Returns
    true if successful, false otherwise.
    -

    Definition at line 159 of file mp4_media_parser.cc.

    +

    Definition at line 158 of file mp4_media_parser.cc.

    @@ -274,7 +275,7 @@ track_id, const scoped_refptr

    Implements shaka::media::MediaParser.

    -

    Definition at line 125 of file mp4_media_parser.cc.

    +

    Definition at line 124 of file mp4_media_parser.cc.

    @@ -285,7 +286,7 @@ track_id, const scoped_refptr
    diff --git a/docs/d7/dd6/key__source_8cc_source.html b/docs/d7/dd6/key__source_8cc_source.html index 6e6d8f5df4..4cfd2c2fa6 100644 --- a/docs/d7/dd6/key__source_8cc_source.html +++ b/docs/d7/dd6/key__source_8cc_source.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/dda/classshaka_1_1media_1_1ByteQueue.html b/docs/d7/dda/classshaka_1_1media_1_1ByteQueue.html index 6b0abc372c..b37fdbe000 100644 --- a/docs/d7/dda/classshaka_1_1media_1_1ByteQueue.html +++ b/docs/d7/dda/classshaka_1_1media_1_1ByteQueue.html @@ -177,7 +177,7 @@ void  diff --git a/docs/d7/de0/classshaka_1_1media_1_1HttpKeyFetcher.html b/docs/d7/de0/classshaka_1_1media_1_1HttpKeyFetcher.html index f829fe5ef1..00f374fd8a 100644 --- a/docs/d7/de0/classshaka_1_1media_1_1HttpKeyFetcher.html +++ b/docs/d7/de0/classshaka_1_1media_1_1HttpKeyFetcher.html @@ -399,7 +399,7 @@ KeyFetcher implementation overrides. diff --git a/docs/d7/de0/structshaka_1_1media_1_1mp4_1_1SampleToGroupEntry.html b/docs/d7/de0/structshaka_1_1media_1_1mp4_1_1SampleToGroupEntry.html index 8acd00a735..081cf04ab8 100644 --- a/docs/d7/de0/structshaka_1_1media_1_1mp4_1_1SampleToGroupEntry.html +++ b/docs/d7/de0/structshaka_1_1media_1_1mp4_1_1SampleToGroupEntry.html @@ -120,7 +120,7 @@ uint32_t  - - + +
    scoped_refptr< MediaSample > shaka::media::MediaSample::CopyFrom std::shared_ptr< MediaSample > shaka::media::MediaSample::CopyFrom ( const uint8_t *  data, base::RefCountedThre - +
    @@ -330,7 +323,7 @@ class  diff --git a/docs/d7/dc6/byte__queue_8h_source.html b/docs/d7/dc6/byte__queue_8h_source.html index 32d30c6f12..e8c0683ad1 100644 --- a/docs/d7/dc6/byte__queue_8h_source.html +++ b/docs/d7/dc6/byte__queue_8h_source.html @@ -146,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/dd0/mpd__notifier__util_8h_source.html b/docs/d7/dd0/mpd__notifier__util_8h_source.html index 5aeb5ea23f..2335bacde6 100644 --- a/docs/d7/dd0/mpd__notifier__util_8h_source.html +++ b/docs/d7/dd0/mpd__notifier__util_8h_source.html @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/dd4/request__signer_8h_source.html b/docs/d7/dd4/request__signer_8h_source.html index da7ab2235f..c3284b46dc 100644 --- a/docs/d7/dd4/request__signer_8h_source.html +++ b/docs/d7/dd4/request__signer_8h_source.html @@ -179,7 +179,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html b/docs/d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html index f00942e8de..a3fbde7fa3 100644 --- a/docs/d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html +++ b/docs/d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html @@ -108,7 +108,7 @@ Public Member Functions - + @@ -118,18 +118,19 @@ Public Member Functions - - - - + + + +
    base::RefCountedThre - + @@ -344,11 +337,11 @@ class  diff --git a/docs/d7/d7c/vlog__flags_8h_source.html b/docs/d7/d7c/vlog__flags_8h_source.html index 4118e703da..bad1737393 100644 --- a/docs/d7/d7c/vlog__flags_8h_source.html +++ b/docs/d7/d7c/vlog__flags_8h_source.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d87/video__stream__info_8h_source.html b/docs/d7/d87/video__stream__info_8h_source.html index f546955c55..33afa9e313 100644 --- a/docs/d7/d87/video__stream__info_8h_source.html +++ b/docs/d7/d87/video__stream__info_8h_source.html @@ -111,29 +111,29 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    26  uint8_t nalu_length_size, const std::string& language,
    27  bool is_encrypted);
    28 
    -
    31  bool IsValidConfig() const override;
    -
    32  std::string ToString() const override;
    -
    34 
    -
    35  uint16_t width() const { return width_; }
    -
    36  uint16_t height() const { return height_; }
    -
    39  uint32_t pixel_width() const { return pixel_width_; }
    -
    42  uint32_t pixel_height() const { return pixel_height_; }
    -
    43  uint8_t nalu_length_size() const { return nalu_length_size_; }
    -
    44  int16_t trick_play_rate() const { return trick_play_rate_; }
    -
    45  const std::vector<uint8_t>& eme_init_data() const { return eme_init_data_; }
    -
    46 
    -
    47  void set_width(uint32_t width) { width_ = width; }
    -
    48  void set_height(uint32_t height) { height_ = height; }
    -
    49  void set_pixel_width(uint32_t pixel_width) { pixel_width_ = pixel_width; }
    -
    50  void set_pixel_height(uint32_t pixel_height) { pixel_height_ = pixel_height; }
    -
    51  void set_eme_init_data(const uint8_t* eme_init_data,
    -
    52  size_t eme_init_data_size) {
    -
    53  eme_init_data_.assign(eme_init_data, eme_init_data + eme_init_data_size);
    -
    54  }
    -
    55 
    -
    56  private:
    -
    57  ~VideoStreamInfo() override;
    -
    58 
    +
    29  ~VideoStreamInfo() override;
    +
    30 
    +
    33  bool IsValidConfig() const override;
    +
    34  std::string ToString() const override;
    +
    36 
    +
    37  uint16_t width() const { return width_; }
    +
    38  uint16_t height() const { return height_; }
    +
    41  uint32_t pixel_width() const { return pixel_width_; }
    +
    44  uint32_t pixel_height() const { return pixel_height_; }
    +
    45  uint8_t nalu_length_size() const { return nalu_length_size_; }
    +
    46  int16_t trick_play_rate() const { return trick_play_rate_; }
    +
    47  const std::vector<uint8_t>& eme_init_data() const { return eme_init_data_; }
    +
    48 
    +
    49  void set_width(uint32_t width) { width_ = width; }
    +
    50  void set_height(uint32_t height) { height_ = height; }
    +
    51  void set_pixel_width(uint32_t pixel_width) { pixel_width_ = pixel_width; }
    +
    52  void set_pixel_height(uint32_t pixel_height) { pixel_height_ = pixel_height; }
    +
    53  void set_eme_init_data(const uint8_t* eme_init_data,
    +
    54  size_t eme_init_data_size) {
    +
    55  eme_init_data_.assign(eme_init_data, eme_init_data + eme_init_data_size);
    +
    56  }
    +
    57 
    +
    58  private:
    59  uint16_t width_;
    60  uint16_t height_;
    61 
    @@ -161,17 +161,17 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    83 } // namespace shaka
    84 
    85 #endif // MEDIA_BASE_VIDEO_STREAM_INFO_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    bool IsValidConfig() const override
    - - + +
    Holds video stream information.
    std::string ToString() const override
    VideoStreamInfo(int track_id, uint32_t time_scale, uint64_t duration, Codec codec, const std::string &codec_string, const uint8_t *codec_config, size_t codec_config_size, uint16_t width, uint16_t height, uint32_t pixel_width, uint32_t pixel_height, int16_t trick_play_rate, uint8_t nalu_length_size, const std::string &language, bool is_encrypted)
    diff --git a/docs/d7/d9c/structshaka_1_1media_1_1H265SliceHeader_1_1LongTermPicsInfo.html b/docs/d7/d9c/structshaka_1_1media_1_1H265SliceHeader_1_1LongTermPicsInfo.html index df7994a8e0..008cf65f4b 100644 --- a/docs/d7/d9c/structshaka_1_1media_1_1H265SliceHeader_1_1LongTermPicsInfo.html +++ b/docs/d7/d9c/structshaka_1_1media_1_1H265SliceHeader_1_1LongTermPicsInfo.html @@ -112,7 +112,7 @@ int  diff --git a/docs/d7/db0/mpd__writer_8h_source.html b/docs/d7/db0/mpd__writer_8h_source.html index cd3be00d87..2285446dc7 100644 --- a/docs/d7/db0/mpd__writer_8h_source.html +++ b/docs/d7/db0/mpd__writer_8h_source.html @@ -182,7 +182,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/db7/structshaka_1_1media_1_1mp4_1_1SampleToChunk-members.html b/docs/d7/db7/structshaka_1_1media_1_1mp4_1_1SampleToChunk-members.html index 14bbf2e06a..ca279f2c4f 100644 --- a/docs/d7/db7/structshaka_1_1media_1_1mp4_1_1SampleToChunk-members.html +++ b/docs/d7/db7/structshaka_1_1media_1_1mp4_1_1SampleToChunk-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    scoped_refptr< MediaSample > shaka::media::MediaSample::CreateEOSBuffer std::shared_ptr< MediaSample > shaka::media::MediaSample::CreateEOSBuffer ( ) base::RefCountedThre

    Create a MediaSample indicating we've reached end of stream. Calling any method other than end_of_stream() on the resulting buffer is disallowed.

    -

    Definition at line 80 of file media_sample.cc.

    +

    Definition at line 79 of file media_sample.cc.

    - +
    @@ -356,7 +349,7 @@ class 
    base::RefCountedThre - + @@ -406,7 +399,7 @@ class 
    scoped_refptr< MediaSample > shaka::media::MediaSample::FromMetadata std::shared_ptr< MediaSample > shaka::media::MediaSample::FromMetadata ( const uint8_t *  metadata, base::RefCountedThre
    Returns
    a human-readable string describing |*this|.
    -

    Definition at line 84 of file media_sample.cc.

    +

    Definition at line 83 of file media_sample.cc.

    @@ -417,7 +410,7 @@ class 
    base::RefCountedThre diff --git a/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.png b/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.png deleted file mode 100644 index c64936c628..0000000000 Binary files a/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.png and /dev/null differ diff --git a/docs/d7/d75/structshaka_1_1media_1_1mp4_1_1MediaHeader-members.html b/docs/d7/d75/structshaka_1_1media_1_1mp4_1_1MediaHeader-members.html index 3c89cfcc4b..2f695f08fd 100644 --- a/docs/d7/d75/structshaka_1_1media_1_1mp4_1_1MediaHeader-members.html +++ b/docs/d7/d75/structshaka_1_1media_1_1mp4_1_1MediaHeader-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/d7/d78/structshaka_1_1media_1_1H264SEIMessage-members.html b/docs/d7/d78/structshaka_1_1media_1_1H264SEIMessage-members.html index 12241e67cd..e31277894f 100644 --- a/docs/d7/d78/structshaka_1_1media_1_1H264SEIMessage-members.html +++ b/docs/d7/d78/structshaka_1_1media_1_1H264SEIMessage-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/d7/d7a/classshaka_1_1media_1_1UdpFile.html b/docs/d7/d7a/classshaka_1_1media_1_1UdpFile.html index dd9c6954be..a0cf00543d 100644 --- a/docs/d7/d7a/classshaka_1_1media_1_1UdpFile.html +++ b/docs/d7/d7a/classshaka_1_1media_1_1UdpFile.html @@ -462,7 +462,7 @@ Additional Inherited Members
    delta_poc_msb_cycle_lt diff --git a/docs/d7/d9d/progress__listener_8h_source.html b/docs/d7/d9d/progress__listener_8h_source.html index ef98f8ec5b..fa3e182137 100644 --- a/docs/d7/d9d/progress__listener_8h_source.html +++ b/docs/d7/d9d/progress__listener_8h_source.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/da4/track__run__iterator_8h_source.html b/docs/d7/da4/track__run__iterator_8h_source.html index 607b5ad309..6f873309bf 100644 --- a/docs/d7/da4/track__run__iterator_8h_source.html +++ b/docs/d7/da4/track__run__iterator_8h_source.html @@ -195,7 +195,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/dae/structshaka_1_1media_1_1mp4_1_1MediaData.html b/docs/d7/dae/structshaka_1_1media_1_1mp4_1_1MediaData.html index d97daecdb8..0be3157c16 100644 --- a/docs/d7/dae/structshaka_1_1media_1_1mp4_1_1MediaData.html +++ b/docs/d7/dae/structshaka_1_1media_1_1mp4_1_1MediaData.html @@ -173,7 +173,7 @@ Additional Inherited Members
    diff --git a/docs/d7/dc3/structshaka_1_1media_1_1mp4_1_1TextSampleEntry.html b/docs/d7/dc3/structshaka_1_1media_1_1mp4_1_1TextSampleEntry.html index 8054c66f82..766edb552f 100644 --- a/docs/d7/dc3/structshaka_1_1media_1_1mp4_1_1TextSampleEntry.html +++ b/docs/d7/dc3/structshaka_1_1media_1_1mp4_1_1TextSampleEntry.html @@ -182,7 +182,7 @@ Additional Inherited Members
    bool LoadMoov (const std::string &file_path)
     
    MediaParser implementation overrides.
    void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
     
    bool Flush () override WARN_UNUSED_RESULT
     

    Additional Inherited Members

    - Public Types inherited from shaka::media::MediaParser
    typedef base::Callback< void(const
    -std::vector< scoped_refptr
    -< StreamInfo > > &stream_info)> 
    InitCB
     
    typedef base::Callback< bool(uint32_t
    -track_id, const scoped_refptr
    -< MediaSample > &media_sample)> 
    NewSampleCB
     
    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
     

    Detailed Description

    -

    Definition at line 31 of file mp4_media_parser.h.

    +

    Definition at line 30 of file mp4_media_parser.h.

    Member Function Documentation

    @@ -156,7 +157,7 @@ track_id, const scoped_refptr

    Implements shaka::media::MediaParser.

    -

    Definition at line 118 of file mp4_media_parser.cc.

    +

    Definition at line 117 of file mp4_media_parser.cc.

    @@ -170,13 +171,13 @@ track_id, const scoped_refptr
    void shaka::media::mp4::MP4MediaParser::Init (const InitCBconst InitCB init_cb,
    const NewSampleCBconst NewSampleCB new_sample_cb,
    diff --git a/docs/d7/ddd/classshaka_1_1media_1_1RsaRequestSigner.html b/docs/d7/ddd/classshaka_1_1media_1_1RsaRequestSigner.html index c6b44f8548..de8d306198 100644 --- a/docs/d7/ddd/classshaka_1_1media_1_1RsaRequestSigner.html +++ b/docs/d7/ddd/classshaka_1_1media_1_1RsaRequestSigner.html @@ -182,7 +182,7 @@ Additional Inherited Members
    group_description diff --git a/docs/d7/dec/h264__byte__to__unit__stream__converter_8h_source.html b/docs/d7/dec/h264__byte__to__unit__stream__converter_8h_source.html index f342981a89..9207b49dce 100644 --- a/docs/d7/dec/h264__byte__to__unit__stream__converter_8h_source.html +++ b/docs/d7/dec/h264__byte__to__unit__stream__converter_8h_source.html @@ -134,7 +134,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/dee/mpd__generator_8cc_source.html b/docs/d7/dee/mpd__generator_8cc_source.html index 0f6f0fcfbb..20b41c9125 100644 --- a/docs/d7/dee/mpd__generator_8cc_source.html +++ b/docs/d7/dee/mpd__generator_8cc_source.html @@ -231,7 +231,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/def/mp4__media__parser_8cc_source.html b/docs/d7/def/mp4__media__parser_8cc_source.html index c784c571f7..5160d0251c 100644 --- a/docs/d7/def/mp4__media__parser_8cc_source.html +++ b/docs/d7/def/mp4__media__parser_8cc_source.html @@ -99,780 +99,779 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    10 #include "packager/base/callback.h"
    11 #include "packager/base/callback_helpers.h"
    12 #include "packager/base/logging.h"
    -
    13 #include "packager/base/memory/ref_counted.h"
    -
    14 #include "packager/base/strings/string_number_conversions.h"
    -
    15 #include "packager/media/base/audio_stream_info.h"
    -
    16 #include "packager/media/base/buffer_reader.h"
    -
    17 #include "packager/media/base/decrypt_config.h"
    -
    18 #include "packager/media/base/key_source.h"
    -
    19 #include "packager/media/base/macros.h"
    -
    20 #include "packager/media/base/media_sample.h"
    -
    21 #include "packager/media/base/rcheck.h"
    -
    22 #include "packager/media/base/video_stream_info.h"
    -
    23 #include "packager/media/codecs/avc_decoder_configuration_record.h"
    -
    24 #include "packager/media/codecs/es_descriptor.h"
    -
    25 #include "packager/media/codecs/hevc_decoder_configuration_record.h"
    -
    26 #include "packager/media/codecs/vp_codec_configuration_record.h"
    -
    27 #include "packager/media/file/file.h"
    -
    28 #include "packager/media/file/file_closer.h"
    -
    29 #include "packager/media/formats/mp4/box_definitions.h"
    -
    30 #include "packager/media/formats/mp4/box_reader.h"
    -
    31 #include "packager/media/formats/mp4/track_run_iterator.h"
    -
    32 
    -
    33 namespace shaka {
    -
    34 namespace media {
    -
    35 namespace mp4 {
    -
    36 namespace {
    -
    37 
    -
    38 uint64_t Rescale(uint64_t time_in_old_scale,
    -
    39  uint32_t old_scale,
    -
    40  uint32_t new_scale) {
    -
    41  return (static_cast<double>(time_in_old_scale) / old_scale) * new_scale;
    -
    42 }
    -
    43 
    -
    44 Codec FourCCToCodec(FourCC fourcc) {
    -
    45  switch (fourcc) {
    -
    46  case FOURCC_avc1:
    -
    47  return kCodecH264;
    -
    48  case FOURCC_hev1:
    -
    49  return kCodecHEV1;
    -
    50  case FOURCC_hvc1:
    -
    51  return kCodecHVC1;
    -
    52  case FOURCC_vp08:
    -
    53  return kCodecVP8;
    -
    54  case FOURCC_vp09:
    -
    55  return kCodecVP9;
    -
    56  case FOURCC_vp10:
    -
    57  return kCodecVP10;
    -
    58  case FOURCC_Opus:
    -
    59  return kCodecOpus;
    -
    60  case FOURCC_dtsc:
    -
    61  return kCodecDTSC;
    -
    62  case FOURCC_dtsh:
    -
    63  return kCodecDTSH;
    -
    64  case FOURCC_dtsl:
    -
    65  return kCodecDTSL;
    -
    66  case FOURCC_dtse:
    -
    67  return kCodecDTSE;
    -
    68  case FOURCC_dtsp:
    -
    69  return kCodecDTSP;
    -
    70  case FOURCC_dtsm:
    -
    71  return kCodecDTSM;
    -
    72  case FOURCC_ac_3:
    -
    73  return kCodecAC3;
    -
    74  case FOURCC_ec_3:
    -
    75  return kCodecEAC3;
    -
    76  default:
    -
    77  return kUnknownCodec;
    -
    78  }
    -
    79 }
    -
    80 
    -
    81 // Default DTS audio number of channels for 5.1 channel layout.
    -
    82 const uint8_t kDtsAudioNumChannels = 6;
    -
    83 const uint64_t kNanosecondsPerSecond = 1000000000ull;
    -
    84 
    -
    85 } // namespace
    -
    86 
    -
    87 MP4MediaParser::MP4MediaParser()
    -
    88  : state_(kWaitingForInit),
    -
    89  decryption_key_source_(NULL),
    -
    90  moof_head_(0),
    -
    91  mdat_tail_(0) {}
    -
    92 
    -
    93 MP4MediaParser::~MP4MediaParser() {}
    -
    94 
    -
    95 void MP4MediaParser::Init(const InitCB& init_cb,
    -
    96  const NewSampleCB& new_sample_cb,
    -
    97  KeySource* decryption_key_source) {
    -
    98  DCHECK_EQ(state_, kWaitingForInit);
    -
    99  DCHECK(init_cb_.is_null());
    -
    100  DCHECK(!init_cb.is_null());
    -
    101  DCHECK(!new_sample_cb.is_null());
    -
    102 
    -
    103  ChangeState(kParsingBoxes);
    -
    104  init_cb_ = init_cb;
    -
    105  new_sample_cb_ = new_sample_cb;
    -
    106  decryption_key_source_ = decryption_key_source;
    -
    107  if (decryption_key_source)
    -
    108  decryptor_source_.reset(new DecryptorSource(decryption_key_source));
    -
    109 }
    -
    110 
    -
    111 void MP4MediaParser::Reset() {
    -
    112  queue_.Reset();
    -
    113  runs_.reset();
    -
    114  moof_head_ = 0;
    -
    115  mdat_tail_ = 0;
    -
    116 }
    -
    117 
    - -
    119  DCHECK_NE(state_, kWaitingForInit);
    -
    120  Reset();
    -
    121  ChangeState(kParsingBoxes);
    -
    122  return true;
    -
    123 }
    -
    124 
    -
    125 bool MP4MediaParser::Parse(const uint8_t* buf, int size) {
    -
    126  DCHECK_NE(state_, kWaitingForInit);
    -
    127 
    -
    128  if (state_ == kError)
    -
    129  return false;
    -
    130 
    -
    131  queue_.Push(buf, size);
    -
    132 
    -
    133  bool result, err = false;
    -
    134 
    -
    135  do {
    -
    136  if (state_ == kParsingBoxes) {
    -
    137  result = ParseBox(&err);
    -
    138  } else {
    -
    139  DCHECK_EQ(kEmittingSamples, state_);
    -
    140  result = EnqueueSample(&err);
    -
    141  if (result) {
    -
    142  int64_t max_clear = runs_->GetMaxClearOffset() + moof_head_;
    -
    143  err = !ReadAndDiscardMDATsUntil(max_clear);
    -
    144  }
    -
    145  }
    -
    146  } while (result && !err);
    -
    147 
    -
    148  if (err) {
    -
    149  DLOG(ERROR) << "Error while parsing MP4";
    -
    150  moov_.reset();
    -
    151  Reset();
    -
    152  ChangeState(kError);
    -
    153  return false;
    -
    154  }
    -
    155 
    -
    156  return true;
    -
    157 }
    -
    158 
    -
    159 bool MP4MediaParser::LoadMoov(const std::string& file_path) {
    -
    160  std::unique_ptr<File, FileCloser> file(
    -
    161  File::OpenWithNoBuffering(file_path.c_str(), "r"));
    -
    162  if (!file) {
    -
    163  LOG(ERROR) << "Unable to open media file '" << file_path << "'";
    -
    164  return false;
    -
    165  }
    -
    166  if (!file->Seek(0)) {
    -
    167  LOG(WARNING) << "Filesystem does not support seeking on file '" << file_path
    -
    168  << "'";
    -
    169  return false;
    -
    170  }
    -
    171 
    -
    172  uint64_t file_position(0);
    -
    173  bool mdat_seen(false);
    -
    174  while (true) {
    -
    175  const uint32_t kBoxHeaderReadSize(16);
    -
    176  std::vector<uint8_t> buffer(kBoxHeaderReadSize);
    -
    177  int64_t bytes_read = file->Read(&buffer[0], kBoxHeaderReadSize);
    -
    178  if (bytes_read == 0) {
    -
    179  LOG(ERROR) << "Could not find 'moov' box in file '" << file_path << "'";
    -
    180  return false;
    -
    181  }
    -
    182  if (bytes_read < kBoxHeaderReadSize) {
    -
    183  LOG(ERROR) << "Error reading media file '" << file_path << "'";
    -
    184  return false;
    -
    185  }
    -
    186  uint64_t box_size;
    -
    187  FourCC box_type;
    -
    188  bool err;
    -
    189  if (!BoxReader::StartBox(&buffer[0], kBoxHeaderReadSize, &box_type,
    -
    190  &box_size, &err)) {
    -
    191  LOG(ERROR) << "Could not start box from file '" << file_path << "'";
    -
    192  return false;
    -
    193  }
    -
    194  if (box_type == FOURCC_mdat) {
    -
    195  mdat_seen = true;
    -
    196  } else if (box_type == FOURCC_moov) {
    -
    197  if (!mdat_seen) {
    -
    198  // 'moov' is before 'mdat'. Nothing to do.
    -
    199  break;
    -
    200  }
    -
    201  // 'mdat' before 'moov'. Read and parse 'moov'.
    -
    202  if (!Parse(&buffer[0], bytes_read)) {
    -
    203  LOG(ERROR) << "Error parsing mp4 file '" << file_path << "'";
    -
    204  return false;
    -
    205  }
    -
    206  uint64_t bytes_to_read = box_size - bytes_read;
    -
    207  buffer.resize(bytes_to_read);
    -
    208  while (bytes_to_read > 0) {
    -
    209  bytes_read = file->Read(&buffer[0], bytes_to_read);
    -
    210  if (bytes_read <= 0) {
    -
    211  LOG(ERROR) << "Error reading 'moov' contents from file '" << file_path
    -
    212  << "'";
    -
    213  return false;
    -
    214  }
    -
    215  if (!Parse(&buffer[0], bytes_read)) {
    -
    216  LOG(ERROR) << "Error parsing mp4 file '" << file_path << "'";
    -
    217  return false;
    -
    218  }
    -
    219  bytes_to_read -= bytes_read;
    -
    220  }
    -
    221  queue_.Reset(); // So that we don't need to adjust data offsets.
    -
    222  mdat_tail_ = 0; // So it will skip boxes until mdat.
    -
    223  break; // Done.
    -
    224  }
    -
    225  file_position += box_size;
    -
    226  if (!file->Seek(file_position)) {
    -
    227  LOG(ERROR) << "Error skipping box in mp4 file '" << file_path << "'";
    -
    228  return false;
    -
    229  }
    -
    230  }
    -
    231  return true;
    -
    232 }
    -
    233 
    -
    234 bool MP4MediaParser::ParseBox(bool* err) {
    -
    235  const uint8_t* buf;
    -
    236  int size;
    -
    237  queue_.Peek(&buf, &size);
    -
    238  if (!size)
    -
    239  return false;
    -
    240 
    -
    241  std::unique_ptr<BoxReader> reader(BoxReader::ReadBox(buf, size, err));
    -
    242  if (reader.get() == NULL)
    -
    243  return false;
    -
    244 
    -
    245  if (reader->type() == FOURCC_mdat) {
    -
    246  // The code ends up here only if a MOOV box is not yet seen.
    -
    247  DCHECK(!moov_);
    -
    248 
    -
    249  NOTIMPLEMENTED() << " Files with MDAT before MOOV is not supported yet.";
    -
    250  *err = true;
    -
    251  return false;
    -
    252  }
    -
    253 
    -
    254  // Set up mdat offset for ReadMDATsUntil().
    -
    255  mdat_tail_ = queue_.head() + reader->size();
    -
    256 
    -
    257  if (reader->type() == FOURCC_moov) {
    -
    258  *err = !ParseMoov(reader.get());
    -
    259  } else if (reader->type() == FOURCC_moof) {
    -
    260  moof_head_ = queue_.head();
    -
    261  *err = !ParseMoof(reader.get());
    -
    262 
    -
    263  // Return early to avoid evicting 'moof' data from queue. Auxiliary info may
    -
    264  // be located anywhere in the file, including inside the 'moof' itself.
    -
    265  // (Since 'default-base-is-moof' is mandated, no data references can come
    -
    266  // before the head of the 'moof', so keeping this box around is sufficient.)
    -
    267  return !(*err);
    -
    268  } else {
    -
    269  VLOG(2) << "Skipping top-level box: " << FourCCToString(reader->type());
    -
    270  }
    -
    271 
    -
    272  queue_.Pop(static_cast<int>(reader->size()));
    -
    273  return !(*err);
    -
    274 }
    -
    275 
    -
    276 bool MP4MediaParser::ParseMoov(BoxReader* reader) {
    -
    277  if (moov_)
    -
    278  return true; // Already parsed the 'moov' box.
    -
    279 
    -
    280  moov_.reset(new Movie);
    -
    281  RCHECK(moov_->Parse(reader));
    -
    282  runs_.reset();
    -
    283 
    -
    284  std::vector<scoped_refptr<StreamInfo> > streams;
    -
    285 
    -
    286  for (std::vector<Track>::const_iterator track = moov_->tracks.begin();
    -
    287  track != moov_->tracks.end(); ++track) {
    -
    288  const uint32_t timescale = track->media.header.timescale;
    -
    289 
    -
    290  // Calculate duration (based on timescale).
    -
    291  uint64_t duration = 0;
    -
    292  if (track->media.header.duration > 0) {
    -
    293  duration = track->media.header.duration;
    -
    294  } else if (moov_->extends.header.fragment_duration > 0) {
    -
    295  DCHECK(moov_->header.timescale != 0);
    -
    296  duration = Rescale(moov_->extends.header.fragment_duration,
    -
    297  moov_->header.timescale,
    -
    298  timescale);
    -
    299  } else if (moov_->header.duration > 0 &&
    -
    300  moov_->header.duration != std::numeric_limits<uint64_t>::max()) {
    -
    301  DCHECK(moov_->header.timescale != 0);
    -
    302  duration =
    -
    303  Rescale(moov_->header.duration, moov_->header.timescale, timescale);
    -
    304  }
    -
    305 
    -
    306  const SampleDescription& samp_descr =
    -
    307  track->media.information.sample_table.description;
    -
    308 
    -
    309  size_t desc_idx = 0;
    -
    310 
    -
    311  // Read sample description index from mvex if it exists otherwise read
    -
    312  // from the first entry in Sample To Chunk box.
    -
    313  if (moov_->extends.tracks.size() > 0) {
    -
    314  for (size_t t = 0; t < moov_->extends.tracks.size(); t++) {
    -
    315  const TrackExtends& trex = moov_->extends.tracks[t];
    -
    316  if (trex.track_id == track->header.track_id) {
    -
    317  desc_idx = trex.default_sample_description_index;
    -
    318  break;
    -
    319  }
    -
    320  }
    -
    321  } else {
    -
    322  const std::vector<ChunkInfo>& chunk_info =
    -
    323  track->media.information.sample_table.sample_to_chunk.chunk_info;
    -
    324  RCHECK(chunk_info.size() > 0);
    -
    325  desc_idx = chunk_info[0].sample_description_index;
    -
    326  }
    -
    327  RCHECK(desc_idx > 0);
    -
    328  desc_idx -= 1; // BMFF descriptor index is one-based
    -
    329 
    -
    330  if (samp_descr.type == kAudio) {
    -
    331  RCHECK(!samp_descr.audio_entries.empty());
    -
    332 
    -
    333  // It is not uncommon to find otherwise-valid files with incorrect sample
    -
    334  // description indices, so we fail gracefully in that case.
    -
    335  if (desc_idx >= samp_descr.audio_entries.size())
    -
    336  desc_idx = 0;
    -
    337 
    -
    338  const AudioSampleEntry& entry = samp_descr.audio_entries[desc_idx];
    -
    339  const FourCC actual_format = entry.GetActualFormat();
    -
    340  Codec codec = FourCCToCodec(actual_format);
    -
    341  uint8_t num_channels = 0;
    -
    342  uint32_t sampling_frequency = 0;
    -
    343  uint64_t codec_delay_ns = 0;
    -
    344  uint8_t audio_object_type = 0;
    -
    345  uint32_t max_bitrate = 0;
    -
    346  uint32_t avg_bitrate = 0;
    -
    347  std::vector<uint8_t> codec_config;
    -
    348 
    -
    349  switch (actual_format) {
    -
    350  case FOURCC_mp4a:
    -
    351  // Check if it is MPEG4 AAC defined in ISO 14496 Part 3 or
    -
    352  // supported MPEG2 AAC variants.
    -
    353  if (entry.esds.es_descriptor.IsAAC()) {
    -
    354  codec = kCodecAAC;
    -
    355  const AACAudioSpecificConfig& aac_audio_specific_config =
    -
    356  entry.esds.aac_audio_specific_config;
    -
    357  num_channels = aac_audio_specific_config.num_channels();
    -
    358  sampling_frequency = aac_audio_specific_config.frequency();
    -
    359  audio_object_type = aac_audio_specific_config.audio_object_type();
    -
    360  codec_config = entry.esds.es_descriptor.decoder_specific_info();
    -
    361  break;
    -
    362  } else if (entry.esds.es_descriptor.IsDTS()) {
    -
    363  ObjectType audio_type = entry.esds.es_descriptor.object_type();
    -
    364  switch (audio_type) {
    -
    365  case kDTSC:
    -
    366  codec = kCodecDTSC;
    -
    367  break;
    -
    368  case kDTSE:
    -
    369  codec = kCodecDTSE;
    -
    370  break;
    -
    371  case kDTSH:
    -
    372  codec = kCodecDTSH;
    -
    373  break;
    -
    374  case kDTSL:
    -
    375  codec = kCodecDTSL;
    -
    376  break;
    -
    377  default:
    -
    378  LOG(ERROR) << "Unsupported audio type " << audio_type
    -
    379  << " in stsd box.";
    -
    380  return false;
    -
    381  }
    -
    382  num_channels = entry.esds.aac_audio_specific_config.num_channels();
    -
    383  // For dts audio in esds, current supported number of channels is 6
    -
    384  // as the only supported channel layout is 5.1.
    -
    385  if (num_channels != kDtsAudioNumChannels) {
    -
    386  LOG(ERROR) << "Unsupported channel count " << num_channels
    -
    387  << " for audio type " << audio_type << ".";
    -
    388  return false;
    -
    389  }
    -
    390  sampling_frequency = entry.samplerate;
    -
    391  max_bitrate = entry.esds.es_descriptor.max_bitrate();
    -
    392  avg_bitrate = entry.esds.es_descriptor.avg_bitrate();
    -
    393  } else {
    -
    394  LOG(ERROR) << "Unsupported audio format 0x" << std::hex
    -
    395  << actual_format << " in stsd box.";
    -
    396  return false;
    -
    397  }
    -
    398  break;
    -
    399  case FOURCC_dtsc:
    -
    400  FALLTHROUGH_INTENDED;
    -
    401  case FOURCC_dtsh:
    -
    402  FALLTHROUGH_INTENDED;
    -
    403  case FOURCC_dtsl:
    -
    404  FALLTHROUGH_INTENDED;
    -
    405  case FOURCC_dtse:
    -
    406  FALLTHROUGH_INTENDED;
    -
    407  case FOURCC_dtsm:
    -
    408  codec_config = entry.ddts.extra_data;
    -
    409  max_bitrate = entry.ddts.max_bitrate;
    -
    410  avg_bitrate = entry.ddts.avg_bitrate;
    -
    411  num_channels = entry.channelcount;
    -
    412  sampling_frequency = entry.samplerate;
    -
    413  break;
    -
    414  case FOURCC_ac_3:
    -
    415  codec_config = entry.dac3.data;
    -
    416  num_channels = entry.channelcount;
    -
    417  sampling_frequency = entry.samplerate;
    -
    418  break;
    -
    419  case FOURCC_ec_3:
    -
    420  codec_config = entry.dec3.data;
    -
    421  num_channels = entry.channelcount;
    -
    422  sampling_frequency = entry.samplerate;
    -
    423  break;
    -
    424  case FOURCC_Opus:
    -
    425  codec_config = entry.dops.opus_identification_header;
    -
    426  num_channels = entry.channelcount;
    -
    427  sampling_frequency = entry.samplerate;
    -
    428  RCHECK(sampling_frequency != 0);
    -
    429  codec_delay_ns =
    -
    430  entry.dops.preskip * kNanosecondsPerSecond / sampling_frequency;
    -
    431  break;
    -
    432  default:
    -
    433  LOG(ERROR) << "Unsupported audio format 0x" << std::hex
    -
    434  << actual_format << " in stsd box.";
    -
    435  return false;
    -
    436  }
    -
    437 
    -
    438  // Extract possible seek preroll.
    -
    439  uint64_t seek_preroll_ns = 0;
    -
    440  for (const auto& sample_group_description :
    -
    441  track->media.information.sample_table.sample_group_descriptions) {
    -
    442  if (sample_group_description.grouping_type != FOURCC_roll)
    -
    443  continue;
    -
    444  const auto& audio_roll_recovery_entries =
    -
    445  sample_group_description.audio_roll_recovery_entries;
    -
    446  if (audio_roll_recovery_entries.size() != 1) {
    -
    447  LOG(WARNING) << "Unexpected number of entries in "
    -
    448  "SampleGroupDescription table with grouping type "
    -
    449  "'roll'.";
    -
    450  break;
    -
    451  }
    -
    452  const int16_t roll_distance_in_samples =
    -
    453  audio_roll_recovery_entries[0].roll_distance;
    -
    454  if (roll_distance_in_samples < 0) {
    -
    455  RCHECK(sampling_frequency != 0);
    -
    456  seek_preroll_ns = kNanosecondsPerSecond *
    -
    457  (-roll_distance_in_samples) / sampling_frequency;
    -
    458  } else {
    -
    459  LOG(WARNING)
    -
    460  << "Roll distance is supposed to be negative, but seeing "
    -
    461  << roll_distance_in_samples;
    -
    462  }
    -
    463  break;
    -
    464  }
    -
    465 
    -
    466  const bool is_encrypted =
    -
    467  entry.sinf.info.track_encryption.default_is_protected == 1;
    -
    468  DVLOG(1) << "is_audio_track_encrypted_: " << is_encrypted;
    -
    469  streams.push_back(new AudioStreamInfo(
    -
    470  track->header.track_id, timescale, duration, codec,
    -
    471  AudioStreamInfo::GetCodecString(codec, audio_object_type),
    -
    472  codec_config.data(), codec_config.size(), entry.samplesize,
    -
    473  num_channels, sampling_frequency, seek_preroll_ns, codec_delay_ns,
    -
    474  max_bitrate, avg_bitrate, track->media.header.language.code,
    -
    475  is_encrypted));
    -
    476  }
    -
    477 
    -
    478  if (samp_descr.type == kVideo) {
    -
    479  RCHECK(!samp_descr.video_entries.empty());
    -
    480  if (desc_idx >= samp_descr.video_entries.size())
    -
    481  desc_idx = 0;
    -
    482  const VideoSampleEntry& entry = samp_descr.video_entries[desc_idx];
    -
    483 
    -
    484  uint32_t coded_width = entry.width;
    -
    485  uint32_t coded_height = entry.height;
    -
    486  uint32_t pixel_width = entry.pixel_aspect.h_spacing;
    -
    487  uint32_t pixel_height = entry.pixel_aspect.v_spacing;
    -
    488  if (pixel_width == 0 && pixel_height == 0) {
    -
    489  pixel_width = 1;
    -
    490  pixel_height = 1;
    -
    491  }
    -
    492  std::string codec_string;
    -
    493  uint8_t nalu_length_size = 0;
    -
    494 
    -
    495  const FourCC actual_format = entry.GetActualFormat();
    -
    496  const Codec video_codec = FourCCToCodec(actual_format);
    -
    497  switch (actual_format) {
    -
    498  case FOURCC_avc1: {
    -
    499  AVCDecoderConfigurationRecord avc_config;
    -
    500  if (!avc_config.Parse(entry.codec_configuration.data)) {
    -
    501  LOG(ERROR) << "Failed to parse avcc.";
    -
    502  return false;
    -
    503  }
    -
    504  codec_string = avc_config.GetCodecString();
    -
    505  nalu_length_size = avc_config.nalu_length_size();
    -
    506 
    -
    507  if (coded_width != avc_config.coded_width() ||
    -
    508  coded_height != avc_config.coded_height()) {
    -
    509  LOG(WARNING) << "Resolution in VisualSampleEntry (" << coded_width
    -
    510  << "," << coded_height
    -
    511  << ") does not match with resolution in "
    -
    512  "AVCDecoderConfigurationRecord ("
    -
    513  << avc_config.coded_width() << ","
    -
    514  << avc_config.coded_height()
    -
    515  << "). Use AVCDecoderConfigurationRecord.";
    -
    516  coded_width = avc_config.coded_width();
    -
    517  coded_height = avc_config.coded_height();
    -
    518  }
    -
    519 
    -
    520  if (pixel_width != avc_config.pixel_width() ||
    -
    521  pixel_height != avc_config.pixel_height()) {
    -
    522  LOG_IF(WARNING, pixel_width != 1 || pixel_height != 1)
    -
    523  << "Pixel aspect ratio in PASP box (" << pixel_width << ","
    -
    524  << pixel_height
    -
    525  << ") does not match with SAR in AVCDecoderConfigurationRecord "
    -
    526  "("
    -
    527  << avc_config.pixel_width() << "," << avc_config.pixel_height()
    -
    528  << "). Use AVCDecoderConfigurationRecord.";
    -
    529  pixel_width = avc_config.pixel_width();
    -
    530  pixel_height = avc_config.pixel_height();
    -
    531  }
    -
    532  break;
    -
    533  }
    -
    534  case FOURCC_hev1:
    -
    535  case FOURCC_hvc1: {
    -
    536  HEVCDecoderConfigurationRecord hevc_config;
    -
    537  if (!hevc_config.Parse(entry.codec_configuration.data)) {
    -
    538  LOG(ERROR) << "Failed to parse hevc.";
    -
    539  return false;
    -
    540  }
    -
    541  codec_string = hevc_config.GetCodecString(video_codec);
    -
    542  nalu_length_size = hevc_config.nalu_length_size();
    -
    543  break;
    -
    544  }
    -
    545  case FOURCC_vp08:
    -
    546  case FOURCC_vp09:
    -
    547  case FOURCC_vp10: {
    -
    548  VPCodecConfigurationRecord vp_config;
    -
    549  if (!vp_config.ParseMP4(entry.codec_configuration.data)) {
    -
    550  LOG(ERROR) << "Failed to parse vpcc.";
    -
    551  return false;
    -
    552  }
    -
    553  codec_string = vp_config.GetCodecString(video_codec);
    -
    554  break;
    -
    555  }
    -
    556  default:
    -
    557  LOG(ERROR) << "Unsupported video format "
    -
    558  << FourCCToString(actual_format) << " in stsd box.";
    -
    559  return false;
    -
    560  }
    -
    561 
    -
    562  const bool is_encrypted =
    -
    563  entry.sinf.info.track_encryption.default_is_protected == 1;
    -
    564  DVLOG(1) << "is_video_track_encrypted_: " << is_encrypted;
    -
    565  scoped_refptr<VideoStreamInfo> video_stream_info(new VideoStreamInfo(
    -
    566  track->header.track_id, timescale, duration, video_codec,
    -
    567  codec_string, entry.codec_configuration.data.data(),
    -
    568  entry.codec_configuration.data.size(), coded_width, coded_height,
    -
    569  pixel_width, pixel_height,
    -
    570  0, // trick_play_rate
    -
    571  nalu_length_size, track->media.header.language.code, is_encrypted));
    -
    572 
    -
    573  // Set pssh raw data if it has.
    -
    574  if (moov_->pssh.size() > 0) {
    -
    575  std::vector<uint8_t> pssh_raw_data;
    -
    576  for (const auto& pssh : moov_->pssh) {
    -
    577  pssh_raw_data.insert(pssh_raw_data.end(), pssh.raw_box.begin(),
    -
    578  pssh.raw_box.end());
    -
    579  }
    -
    580  video_stream_info->set_eme_init_data(pssh_raw_data.data(),
    -
    581  pssh_raw_data.size());
    -
    582  }
    -
    583 
    -
    584  streams.push_back(video_stream_info);
    -
    585  }
    -
    586  }
    -
    587 
    -
    588  init_cb_.Run(streams);
    -
    589  if (!FetchKeysIfNecessary(moov_->pssh))
    -
    590  return false;
    -
    591  runs_.reset(new TrackRunIterator(moov_.get()));
    -
    592  RCHECK(runs_->Init());
    -
    593  ChangeState(kEmittingSamples);
    -
    594  return true;
    -
    595 }
    -
    596 
    -
    597 bool MP4MediaParser::ParseMoof(BoxReader* reader) {
    -
    598  // Must already have initialization segment.
    -
    599  RCHECK(moov_.get());
    -
    600  MovieFragment moof;
    -
    601  RCHECK(moof.Parse(reader));
    -
    602  if (!runs_)
    -
    603  runs_.reset(new TrackRunIterator(moov_.get()));
    -
    604  RCHECK(runs_->Init(moof));
    -
    605  if (!FetchKeysIfNecessary(moof.pssh))
    -
    606  return false;
    -
    607  ChangeState(kEmittingSamples);
    -
    608  return true;
    -
    609 }
    -
    610 
    -
    611 bool MP4MediaParser::FetchKeysIfNecessary(
    -
    612  const std::vector<ProtectionSystemSpecificHeader>& headers) {
    -
    613  if (headers.empty())
    -
    614  return true;
    -
    615 
    -
    616  // An error will be returned later if the samples need to be decrypted.
    -
    617  if (!decryption_key_source_)
    -
    618  return true;
    -
    619 
    -
    620  Status status;
    -
    621  for (std::vector<ProtectionSystemSpecificHeader>::const_iterator iter =
    -
    622  headers.begin(); iter != headers.end(); ++iter) {
    -
    623  status = decryption_key_source_->FetchKeys(iter->raw_box);
    -
    624  if (!status.ok()) {
    -
    625  // If there is an error, try using the next PSSH box and report if none
    -
    626  // work.
    -
    627  VLOG(1) << "Unable to fetch decryption keys: " << status
    -
    628  << ", trying the next PSSH box";
    -
    629  continue;
    -
    630  }
    -
    631  return true;
    -
    632  }
    -
    633 
    -
    634  if (!status.ok()) {
    -
    635  LOG(ERROR) << "Error fetching decryption keys: " << status;
    -
    636  return false;
    -
    637  }
    -
    638 
    -
    639  LOG(ERROR) << "No viable 'pssh' box found for content decryption.";
    -
    640  return false;
    -
    641 }
    -
    642 
    -
    643 bool MP4MediaParser::EnqueueSample(bool* err) {
    -
    644  if (!runs_->IsRunValid()) {
    -
    645  // Remain in kEnqueueingSamples state, discarding data, until the end of
    -
    646  // the current 'mdat' box has been appended to the queue.
    -
    647  if (!queue_.Trim(mdat_tail_))
    -
    648  return false;
    -
    649 
    -
    650  ChangeState(kParsingBoxes);
    -
    651  return true;
    -
    652  }
    -
    653 
    -
    654  if (!runs_->IsSampleValid()) {
    -
    655  runs_->AdvanceRun();
    -
    656  return true;
    -
    657  }
    -
    658 
    -
    659  DCHECK(!(*err));
    -
    660 
    -
    661  const uint8_t* buf;
    -
    662  int buf_size;
    -
    663  queue_.Peek(&buf, &buf_size);
    -
    664  if (!buf_size)
    -
    665  return false;
    -
    666 
    -
    667  // Skip this entire track if it is not audio nor video.
    -
    668  if (!runs_->is_audio() && !runs_->is_video())
    -
    669  runs_->AdvanceRun();
    -
    670 
    -
    671  // Attempt to cache the auxiliary information first. Aux info is usually
    -
    672  // placed in a contiguous block before the sample data, rather than being
    -
    673  // interleaved. If we didn't cache it, this would require that we retain the
    -
    674  // start of the segment buffer while reading samples. Aux info is typically
    -
    675  // quite small compared to sample data, so this pattern is useful on
    -
    676  // memory-constrained devices where the source buffer consumes a substantial
    -
    677  // portion of the total system memory.
    -
    678  if (runs_->AuxInfoNeedsToBeCached()) {
    -
    679  queue_.PeekAt(runs_->aux_info_offset() + moof_head_, &buf, &buf_size);
    -
    680  if (buf_size < runs_->aux_info_size())
    -
    681  return false;
    -
    682  *err = !runs_->CacheAuxInfo(buf, buf_size);
    -
    683  return !*err;
    -
    684  }
    -
    685 
    -
    686  int64_t sample_offset = runs_->sample_offset() + moof_head_;
    -
    687  queue_.PeekAt(sample_offset, &buf, &buf_size);
    -
    688  if (buf_size < runs_->sample_size()) {
    -
    689  if (sample_offset < queue_.head()) {
    -
    690  LOG(ERROR) << "Incorrect sample offset " << sample_offset
    -
    691  << " < " << queue_.head();
    -
    692  *err = true;
    -
    693  }
    -
    694  return false;
    -
    695  }
    -
    696 
    -
    697  scoped_refptr<MediaSample> stream_sample(MediaSample::CopyFrom(
    -
    698  buf, runs_->sample_size(), runs_->is_keyframe()));
    -
    699  if (runs_->is_encrypted()) {
    -
    700  std::unique_ptr<DecryptConfig> decrypt_config = runs_->GetDecryptConfig();
    -
    701  if (!decrypt_config) {
    -
    702  *err = true;
    -
    703  LOG(ERROR) << "Missing decrypt config.";
    -
    704  return false;
    -
    705  }
    -
    706 
    -
    707  if (!decryptor_source_) {
    -
    708  // If the demuxer does not have the decryptor_source_, store
    -
    709  // decrypt_config so that the demuxed sample can be decrypted later.
    -
    710  stream_sample->set_decrypt_config(std::move(decrypt_config));
    -
    711  stream_sample->set_is_encrypted(true);
    -
    712  } else if (!decryptor_source_->DecryptSampleBuffer(
    -
    713  decrypt_config.get(), stream_sample->writable_data(),
    -
    714  stream_sample->data_size())) {
    -
    715  *err = true;
    -
    716  LOG(ERROR) << "Cannot decrypt samples.";
    -
    717  return false;
    -
    718  }
    -
    719  }
    -
    720 
    -
    721  stream_sample->set_dts(runs_->dts());
    -
    722  stream_sample->set_pts(runs_->cts());
    -
    723  stream_sample->set_duration(runs_->duration());
    -
    724 
    -
    725  DVLOG(3) << "Pushing frame: "
    -
    726  << ", key=" << runs_->is_keyframe()
    -
    727  << ", dur=" << runs_->duration()
    -
    728  << ", dts=" << runs_->dts()
    -
    729  << ", cts=" << runs_->cts()
    -
    730  << ", size=" << runs_->sample_size();
    -
    731 
    -
    732  if (!new_sample_cb_.Run(runs_->track_id(), stream_sample)) {
    -
    733  *err = true;
    -
    734  LOG(ERROR) << "Failed to process the sample.";
    -
    735  return false;
    -
    736  }
    -
    737 
    -
    738  runs_->AdvanceSample();
    -
    739  return true;
    -
    740 }
    -
    741 
    -
    742 bool MP4MediaParser::ReadAndDiscardMDATsUntil(const int64_t offset) {
    -
    743  bool err = false;
    -
    744  while (mdat_tail_ < offset) {
    -
    745  const uint8_t* buf;
    -
    746  int size;
    -
    747  queue_.PeekAt(mdat_tail_, &buf, &size);
    -
    748 
    -
    749  FourCC type;
    -
    750  uint64_t box_sz;
    -
    751  if (!BoxReader::StartBox(buf, size, &type, &box_sz, &err))
    -
    752  break;
    -
    753 
    -
    754  mdat_tail_ += box_sz;
    -
    755  }
    -
    756  queue_.Trim(std::min(mdat_tail_, offset));
    -
    757  return !err;
    -
    758 }
    -
    759 
    -
    760 void MP4MediaParser::ChangeState(State new_state) {
    -
    761  DVLOG(2) << "Changing state: " << new_state;
    -
    762  state_ = new_state;
    -
    763 }
    -
    764 
    -
    765 } // namespace mp4
    -
    766 } // namespace media
    -
    767 } // namespace shaka
    +
    13 #include "packager/base/strings/string_number_conversions.h"
    +
    14 #include "packager/media/base/audio_stream_info.h"
    +
    15 #include "packager/media/base/buffer_reader.h"
    +
    16 #include "packager/media/base/decrypt_config.h"
    +
    17 #include "packager/media/base/key_source.h"
    +
    18 #include "packager/media/base/macros.h"
    +
    19 #include "packager/media/base/media_sample.h"
    +
    20 #include "packager/media/base/rcheck.h"
    +
    21 #include "packager/media/base/video_stream_info.h"
    +
    22 #include "packager/media/codecs/avc_decoder_configuration_record.h"
    +
    23 #include "packager/media/codecs/es_descriptor.h"
    +
    24 #include "packager/media/codecs/hevc_decoder_configuration_record.h"
    +
    25 #include "packager/media/codecs/vp_codec_configuration_record.h"
    +
    26 #include "packager/media/file/file.h"
    +
    27 #include "packager/media/file/file_closer.h"
    +
    28 #include "packager/media/formats/mp4/box_definitions.h"
    +
    29 #include "packager/media/formats/mp4/box_reader.h"
    +
    30 #include "packager/media/formats/mp4/track_run_iterator.h"
    +
    31 
    +
    32 namespace shaka {
    +
    33 namespace media {
    +
    34 namespace mp4 {
    +
    35 namespace {
    +
    36 
    +
    37 uint64_t Rescale(uint64_t time_in_old_scale,
    +
    38  uint32_t old_scale,
    +
    39  uint32_t new_scale) {
    +
    40  return (static_cast<double>(time_in_old_scale) / old_scale) * new_scale;
    +
    41 }
    +
    42 
    +
    43 Codec FourCCToCodec(FourCC fourcc) {
    +
    44  switch (fourcc) {
    +
    45  case FOURCC_avc1:
    +
    46  return kCodecH264;
    +
    47  case FOURCC_hev1:
    +
    48  return kCodecHEV1;
    +
    49  case FOURCC_hvc1:
    +
    50  return kCodecHVC1;
    +
    51  case FOURCC_vp08:
    +
    52  return kCodecVP8;
    +
    53  case FOURCC_vp09:
    +
    54  return kCodecVP9;
    +
    55  case FOURCC_vp10:
    +
    56  return kCodecVP10;
    +
    57  case FOURCC_Opus:
    +
    58  return kCodecOpus;
    +
    59  case FOURCC_dtsc:
    +
    60  return kCodecDTSC;
    +
    61  case FOURCC_dtsh:
    +
    62  return kCodecDTSH;
    +
    63  case FOURCC_dtsl:
    +
    64  return kCodecDTSL;
    +
    65  case FOURCC_dtse:
    +
    66  return kCodecDTSE;
    +
    67  case FOURCC_dtsp:
    +
    68  return kCodecDTSP;
    +
    69  case FOURCC_dtsm:
    +
    70  return kCodecDTSM;
    +
    71  case FOURCC_ac_3:
    +
    72  return kCodecAC3;
    +
    73  case FOURCC_ec_3:
    +
    74  return kCodecEAC3;
    +
    75  default:
    +
    76  return kUnknownCodec;
    +
    77  }
    +
    78 }
    +
    79 
    +
    80 // Default DTS audio number of channels for 5.1 channel layout.
    +
    81 const uint8_t kDtsAudioNumChannels = 6;
    +
    82 const uint64_t kNanosecondsPerSecond = 1000000000ull;
    +
    83 
    +
    84 } // namespace
    +
    85 
    +
    86 MP4MediaParser::MP4MediaParser()
    +
    87  : state_(kWaitingForInit),
    +
    88  decryption_key_source_(NULL),
    +
    89  moof_head_(0),
    +
    90  mdat_tail_(0) {}
    +
    91 
    +
    92 MP4MediaParser::~MP4MediaParser() {}
    +
    93 
    +
    94 void MP4MediaParser::Init(const InitCB& init_cb,
    +
    95  const NewSampleCB& new_sample_cb,
    +
    96  KeySource* decryption_key_source) {
    +
    97  DCHECK_EQ(state_, kWaitingForInit);
    +
    98  DCHECK(init_cb_.is_null());
    +
    99  DCHECK(!init_cb.is_null());
    +
    100  DCHECK(!new_sample_cb.is_null());
    +
    101 
    +
    102  ChangeState(kParsingBoxes);
    +
    103  init_cb_ = init_cb;
    +
    104  new_sample_cb_ = new_sample_cb;
    +
    105  decryption_key_source_ = decryption_key_source;
    +
    106  if (decryption_key_source)
    +
    107  decryptor_source_.reset(new DecryptorSource(decryption_key_source));
    +
    108 }
    +
    109 
    +
    110 void MP4MediaParser::Reset() {
    +
    111  queue_.Reset();
    +
    112  runs_.reset();
    +
    113  moof_head_ = 0;
    +
    114  mdat_tail_ = 0;
    +
    115 }
    +
    116 
    + +
    118  DCHECK_NE(state_, kWaitingForInit);
    +
    119  Reset();
    +
    120  ChangeState(kParsingBoxes);
    +
    121  return true;
    +
    122 }
    +
    123 
    +
    124 bool MP4MediaParser::Parse(const uint8_t* buf, int size) {
    +
    125  DCHECK_NE(state_, kWaitingForInit);
    +
    126 
    +
    127  if (state_ == kError)
    +
    128  return false;
    +
    129 
    +
    130  queue_.Push(buf, size);
    +
    131 
    +
    132  bool result, err = false;
    +
    133 
    +
    134  do {
    +
    135  if (state_ == kParsingBoxes) {
    +
    136  result = ParseBox(&err);
    +
    137  } else {
    +
    138  DCHECK_EQ(kEmittingSamples, state_);
    +
    139  result = EnqueueSample(&err);
    +
    140  if (result) {
    +
    141  int64_t max_clear = runs_->GetMaxClearOffset() + moof_head_;
    +
    142  err = !ReadAndDiscardMDATsUntil(max_clear);
    +
    143  }
    +
    144  }
    +
    145  } while (result && !err);
    +
    146 
    +
    147  if (err) {
    +
    148  DLOG(ERROR) << "Error while parsing MP4";
    +
    149  moov_.reset();
    +
    150  Reset();
    +
    151  ChangeState(kError);
    +
    152  return false;
    +
    153  }
    +
    154 
    +
    155  return true;
    +
    156 }
    +
    157 
    +
    158 bool MP4MediaParser::LoadMoov(const std::string& file_path) {
    +
    159  std::unique_ptr<File, FileCloser> file(
    +
    160  File::OpenWithNoBuffering(file_path.c_str(), "r"));
    +
    161  if (!file) {
    +
    162  LOG(ERROR) << "Unable to open media file '" << file_path << "'";
    +
    163  return false;
    +
    164  }
    +
    165  if (!file->Seek(0)) {
    +
    166  LOG(WARNING) << "Filesystem does not support seeking on file '" << file_path
    +
    167  << "'";
    +
    168  return false;
    +
    169  }
    +
    170 
    +
    171  uint64_t file_position(0);
    +
    172  bool mdat_seen(false);
    +
    173  while (true) {
    +
    174  const uint32_t kBoxHeaderReadSize(16);
    +
    175  std::vector<uint8_t> buffer(kBoxHeaderReadSize);
    +
    176  int64_t bytes_read = file->Read(&buffer[0], kBoxHeaderReadSize);
    +
    177  if (bytes_read == 0) {
    +
    178  LOG(ERROR) << "Could not find 'moov' box in file '" << file_path << "'";
    +
    179  return false;
    +
    180  }
    +
    181  if (bytes_read < kBoxHeaderReadSize) {
    +
    182  LOG(ERROR) << "Error reading media file '" << file_path << "'";
    +
    183  return false;
    +
    184  }
    +
    185  uint64_t box_size;
    +
    186  FourCC box_type;
    +
    187  bool err;
    +
    188  if (!BoxReader::StartBox(&buffer[0], kBoxHeaderReadSize, &box_type,
    +
    189  &box_size, &err)) {
    +
    190  LOG(ERROR) << "Could not start box from file '" << file_path << "'";
    +
    191  return false;
    +
    192  }
    +
    193  if (box_type == FOURCC_mdat) {
    +
    194  mdat_seen = true;
    +
    195  } else if (box_type == FOURCC_moov) {
    +
    196  if (!mdat_seen) {
    +
    197  // 'moov' is before 'mdat'. Nothing to do.
    +
    198  break;
    +
    199  }
    +
    200  // 'mdat' before 'moov'. Read and parse 'moov'.
    +
    201  if (!Parse(&buffer[0], bytes_read)) {
    +
    202  LOG(ERROR) << "Error parsing mp4 file '" << file_path << "'";
    +
    203  return false;
    +
    204  }
    +
    205  uint64_t bytes_to_read = box_size - bytes_read;
    +
    206  buffer.resize(bytes_to_read);
    +
    207  while (bytes_to_read > 0) {
    +
    208  bytes_read = file->Read(&buffer[0], bytes_to_read);
    +
    209  if (bytes_read <= 0) {
    +
    210  LOG(ERROR) << "Error reading 'moov' contents from file '" << file_path
    +
    211  << "'";
    +
    212  return false;
    +
    213  }
    +
    214  if (!Parse(&buffer[0], bytes_read)) {
    +
    215  LOG(ERROR) << "Error parsing mp4 file '" << file_path << "'";
    +
    216  return false;
    +
    217  }
    +
    218  bytes_to_read -= bytes_read;
    +
    219  }
    +
    220  queue_.Reset(); // So that we don't need to adjust data offsets.
    +
    221  mdat_tail_ = 0; // So it will skip boxes until mdat.
    +
    222  break; // Done.
    +
    223  }
    +
    224  file_position += box_size;
    +
    225  if (!file->Seek(file_position)) {
    +
    226  LOG(ERROR) << "Error skipping box in mp4 file '" << file_path << "'";
    +
    227  return false;
    +
    228  }
    +
    229  }
    +
    230  return true;
    +
    231 }
    +
    232 
    +
    233 bool MP4MediaParser::ParseBox(bool* err) {
    +
    234  const uint8_t* buf;
    +
    235  int size;
    +
    236  queue_.Peek(&buf, &size);
    +
    237  if (!size)
    +
    238  return false;
    +
    239 
    +
    240  std::unique_ptr<BoxReader> reader(BoxReader::ReadBox(buf, size, err));
    +
    241  if (reader.get() == NULL)
    +
    242  return false;
    +
    243 
    +
    244  if (reader->type() == FOURCC_mdat) {
    +
    245  // The code ends up here only if a MOOV box is not yet seen.
    +
    246  DCHECK(!moov_);
    +
    247 
    +
    248  NOTIMPLEMENTED() << " Files with MDAT before MOOV is not supported yet.";
    +
    249  *err = true;
    +
    250  return false;
    +
    251  }
    +
    252 
    +
    253  // Set up mdat offset for ReadMDATsUntil().
    +
    254  mdat_tail_ = queue_.head() + reader->size();
    +
    255 
    +
    256  if (reader->type() == FOURCC_moov) {
    +
    257  *err = !ParseMoov(reader.get());
    +
    258  } else if (reader->type() == FOURCC_moof) {
    +
    259  moof_head_ = queue_.head();
    +
    260  *err = !ParseMoof(reader.get());
    +
    261 
    +
    262  // Return early to avoid evicting 'moof' data from queue. Auxiliary info may
    +
    263  // be located anywhere in the file, including inside the 'moof' itself.
    +
    264  // (Since 'default-base-is-moof' is mandated, no data references can come
    +
    265  // before the head of the 'moof', so keeping this box around is sufficient.)
    +
    266  return !(*err);
    +
    267  } else {
    +
    268  VLOG(2) << "Skipping top-level box: " << FourCCToString(reader->type());
    +
    269  }
    +
    270 
    +
    271  queue_.Pop(static_cast<int>(reader->size()));
    +
    272  return !(*err);
    +
    273 }
    +
    274 
    +
    275 bool MP4MediaParser::ParseMoov(BoxReader* reader) {
    +
    276  if (moov_)
    +
    277  return true; // Already parsed the 'moov' box.
    +
    278 
    +
    279  moov_.reset(new Movie);
    +
    280  RCHECK(moov_->Parse(reader));
    +
    281  runs_.reset();
    +
    282 
    +
    283  std::vector<std::shared_ptr<StreamInfo>> streams;
    +
    284 
    +
    285  for (std::vector<Track>::const_iterator track = moov_->tracks.begin();
    +
    286  track != moov_->tracks.end(); ++track) {
    +
    287  const uint32_t timescale = track->media.header.timescale;
    +
    288 
    +
    289  // Calculate duration (based on timescale).
    +
    290  uint64_t duration = 0;
    +
    291  if (track->media.header.duration > 0) {
    +
    292  duration = track->media.header.duration;
    +
    293  } else if (moov_->extends.header.fragment_duration > 0) {
    +
    294  DCHECK(moov_->header.timescale != 0);
    +
    295  duration = Rescale(moov_->extends.header.fragment_duration,
    +
    296  moov_->header.timescale,
    +
    297  timescale);
    +
    298  } else if (moov_->header.duration > 0 &&
    +
    299  moov_->header.duration != std::numeric_limits<uint64_t>::max()) {
    +
    300  DCHECK(moov_->header.timescale != 0);
    +
    301  duration =
    +
    302  Rescale(moov_->header.duration, moov_->header.timescale, timescale);
    +
    303  }
    +
    304 
    +
    305  const SampleDescription& samp_descr =
    +
    306  track->media.information.sample_table.description;
    +
    307 
    +
    308  size_t desc_idx = 0;
    +
    309 
    +
    310  // Read sample description index from mvex if it exists otherwise read
    +
    311  // from the first entry in Sample To Chunk box.
    +
    312  if (moov_->extends.tracks.size() > 0) {
    +
    313  for (size_t t = 0; t < moov_->extends.tracks.size(); t++) {
    +
    314  const TrackExtends& trex = moov_->extends.tracks[t];
    +
    315  if (trex.track_id == track->header.track_id) {
    +
    316  desc_idx = trex.default_sample_description_index;
    +
    317  break;
    +
    318  }
    +
    319  }
    +
    320  } else {
    +
    321  const std::vector<ChunkInfo>& chunk_info =
    +
    322  track->media.information.sample_table.sample_to_chunk.chunk_info;
    +
    323  RCHECK(chunk_info.size() > 0);
    +
    324  desc_idx = chunk_info[0].sample_description_index;
    +
    325  }
    +
    326  RCHECK(desc_idx > 0);
    +
    327  desc_idx -= 1; // BMFF descriptor index is one-based
    +
    328 
    +
    329  if (samp_descr.type == kAudio) {
    +
    330  RCHECK(!samp_descr.audio_entries.empty());
    +
    331 
    +
    332  // It is not uncommon to find otherwise-valid files with incorrect sample
    +
    333  // description indices, so we fail gracefully in that case.
    +
    334  if (desc_idx >= samp_descr.audio_entries.size())
    +
    335  desc_idx = 0;
    +
    336 
    +
    337  const AudioSampleEntry& entry = samp_descr.audio_entries[desc_idx];
    +
    338  const FourCC actual_format = entry.GetActualFormat();
    +
    339  Codec codec = FourCCToCodec(actual_format);
    +
    340  uint8_t num_channels = 0;
    +
    341  uint32_t sampling_frequency = 0;
    +
    342  uint64_t codec_delay_ns = 0;
    +
    343  uint8_t audio_object_type = 0;
    +
    344  uint32_t max_bitrate = 0;
    +
    345  uint32_t avg_bitrate = 0;
    +
    346  std::vector<uint8_t> codec_config;
    +
    347 
    +
    348  switch (actual_format) {
    +
    349  case FOURCC_mp4a:
    +
    350  // Check if it is MPEG4 AAC defined in ISO 14496 Part 3 or
    +
    351  // supported MPEG2 AAC variants.
    +
    352  if (entry.esds.es_descriptor.IsAAC()) {
    +
    353  codec = kCodecAAC;
    +
    354  const AACAudioSpecificConfig& aac_audio_specific_config =
    +
    355  entry.esds.aac_audio_specific_config;
    +
    356  num_channels = aac_audio_specific_config.num_channels();
    +
    357  sampling_frequency = aac_audio_specific_config.frequency();
    +
    358  audio_object_type = aac_audio_specific_config.audio_object_type();
    +
    359  codec_config = entry.esds.es_descriptor.decoder_specific_info();
    +
    360  break;
    +
    361  } else if (entry.esds.es_descriptor.IsDTS()) {
    +
    362  ObjectType audio_type = entry.esds.es_descriptor.object_type();
    +
    363  switch (audio_type) {
    +
    364  case kDTSC:
    +
    365  codec = kCodecDTSC;
    +
    366  break;
    +
    367  case kDTSE:
    +
    368  codec = kCodecDTSE;
    +
    369  break;
    +
    370  case kDTSH:
    +
    371  codec = kCodecDTSH;
    +
    372  break;
    +
    373  case kDTSL:
    +
    374  codec = kCodecDTSL;
    +
    375  break;
    +
    376  default:
    +
    377  LOG(ERROR) << "Unsupported audio type " << audio_type
    +
    378  << " in stsd box.";
    +
    379  return false;
    +
    380  }
    +
    381  num_channels = entry.esds.aac_audio_specific_config.num_channels();
    +
    382  // For dts audio in esds, current supported number of channels is 6
    +
    383  // as the only supported channel layout is 5.1.
    +
    384  if (num_channels != kDtsAudioNumChannels) {
    +
    385  LOG(ERROR) << "Unsupported channel count " << num_channels
    +
    386  << " for audio type " << audio_type << ".";
    +
    387  return false;
    +
    388  }
    +
    389  sampling_frequency = entry.samplerate;
    +
    390  max_bitrate = entry.esds.es_descriptor.max_bitrate();
    +
    391  avg_bitrate = entry.esds.es_descriptor.avg_bitrate();
    +
    392  } else {
    +
    393  LOG(ERROR) << "Unsupported audio format 0x" << std::hex
    +
    394  << actual_format << " in stsd box.";
    +
    395  return false;
    +
    396  }
    +
    397  break;
    +
    398  case FOURCC_dtsc:
    +
    399  FALLTHROUGH_INTENDED;
    +
    400  case FOURCC_dtsh:
    +
    401  FALLTHROUGH_INTENDED;
    +
    402  case FOURCC_dtsl:
    +
    403  FALLTHROUGH_INTENDED;
    +
    404  case FOURCC_dtse:
    +
    405  FALLTHROUGH_INTENDED;
    +
    406  case FOURCC_dtsm:
    +
    407  codec_config = entry.ddts.extra_data;
    +
    408  max_bitrate = entry.ddts.max_bitrate;
    +
    409  avg_bitrate = entry.ddts.avg_bitrate;
    +
    410  num_channels = entry.channelcount;
    +
    411  sampling_frequency = entry.samplerate;
    +
    412  break;
    +
    413  case FOURCC_ac_3:
    +
    414  codec_config = entry.dac3.data;
    +
    415  num_channels = entry.channelcount;
    +
    416  sampling_frequency = entry.samplerate;
    +
    417  break;
    +
    418  case FOURCC_ec_3:
    +
    419  codec_config = entry.dec3.data;
    +
    420  num_channels = entry.channelcount;
    +
    421  sampling_frequency = entry.samplerate;
    +
    422  break;
    +
    423  case FOURCC_Opus:
    +
    424  codec_config = entry.dops.opus_identification_header;
    +
    425  num_channels = entry.channelcount;
    +
    426  sampling_frequency = entry.samplerate;
    +
    427  RCHECK(sampling_frequency != 0);
    +
    428  codec_delay_ns =
    +
    429  entry.dops.preskip * kNanosecondsPerSecond / sampling_frequency;
    +
    430  break;
    +
    431  default:
    +
    432  LOG(ERROR) << "Unsupported audio format 0x" << std::hex
    +
    433  << actual_format << " in stsd box.";
    +
    434  return false;
    +
    435  }
    +
    436 
    +
    437  // Extract possible seek preroll.
    +
    438  uint64_t seek_preroll_ns = 0;
    +
    439  for (const auto& sample_group_description :
    +
    440  track->media.information.sample_table.sample_group_descriptions) {
    +
    441  if (sample_group_description.grouping_type != FOURCC_roll)
    +
    442  continue;
    +
    443  const auto& audio_roll_recovery_entries =
    +
    444  sample_group_description.audio_roll_recovery_entries;
    +
    445  if (audio_roll_recovery_entries.size() != 1) {
    +
    446  LOG(WARNING) << "Unexpected number of entries in "
    +
    447  "SampleGroupDescription table with grouping type "
    +
    448  "'roll'.";
    +
    449  break;
    +
    450  }
    +
    451  const int16_t roll_distance_in_samples =
    +
    452  audio_roll_recovery_entries[0].roll_distance;
    +
    453  if (roll_distance_in_samples < 0) {
    +
    454  RCHECK(sampling_frequency != 0);
    +
    455  seek_preroll_ns = kNanosecondsPerSecond *
    +
    456  (-roll_distance_in_samples) / sampling_frequency;
    +
    457  } else {
    +
    458  LOG(WARNING)
    +
    459  << "Roll distance is supposed to be negative, but seeing "
    +
    460  << roll_distance_in_samples;
    +
    461  }
    +
    462  break;
    +
    463  }
    +
    464 
    +
    465  const bool is_encrypted =
    +
    466  entry.sinf.info.track_encryption.default_is_protected == 1;
    +
    467  DVLOG(1) << "is_audio_track_encrypted_: " << is_encrypted;
    +
    468  streams.emplace_back(new AudioStreamInfo(
    +
    469  track->header.track_id, timescale, duration, codec,
    +
    470  AudioStreamInfo::GetCodecString(codec, audio_object_type),
    +
    471  codec_config.data(), codec_config.size(), entry.samplesize,
    +
    472  num_channels, sampling_frequency, seek_preroll_ns, codec_delay_ns,
    +
    473  max_bitrate, avg_bitrate, track->media.header.language.code,
    +
    474  is_encrypted));
    +
    475  }
    +
    476 
    +
    477  if (samp_descr.type == kVideo) {
    +
    478  RCHECK(!samp_descr.video_entries.empty());
    +
    479  if (desc_idx >= samp_descr.video_entries.size())
    +
    480  desc_idx = 0;
    +
    481  const VideoSampleEntry& entry = samp_descr.video_entries[desc_idx];
    +
    482 
    +
    483  uint32_t coded_width = entry.width;
    +
    484  uint32_t coded_height = entry.height;
    +
    485  uint32_t pixel_width = entry.pixel_aspect.h_spacing;
    +
    486  uint32_t pixel_height = entry.pixel_aspect.v_spacing;
    +
    487  if (pixel_width == 0 && pixel_height == 0) {
    +
    488  pixel_width = 1;
    +
    489  pixel_height = 1;
    +
    490  }
    +
    491  std::string codec_string;
    +
    492  uint8_t nalu_length_size = 0;
    +
    493 
    +
    494  const FourCC actual_format = entry.GetActualFormat();
    +
    495  const Codec video_codec = FourCCToCodec(actual_format);
    +
    496  switch (actual_format) {
    +
    497  case FOURCC_avc1: {
    +
    498  AVCDecoderConfigurationRecord avc_config;
    +
    499  if (!avc_config.Parse(entry.codec_configuration.data)) {
    +
    500  LOG(ERROR) << "Failed to parse avcc.";
    +
    501  return false;
    +
    502  }
    +
    503  codec_string = avc_config.GetCodecString();
    +
    504  nalu_length_size = avc_config.nalu_length_size();
    +
    505 
    +
    506  if (coded_width != avc_config.coded_width() ||
    +
    507  coded_height != avc_config.coded_height()) {
    +
    508  LOG(WARNING) << "Resolution in VisualSampleEntry (" << coded_width
    +
    509  << "," << coded_height
    +
    510  << ") does not match with resolution in "
    +
    511  "AVCDecoderConfigurationRecord ("
    +
    512  << avc_config.coded_width() << ","
    +
    513  << avc_config.coded_height()
    +
    514  << "). Use AVCDecoderConfigurationRecord.";
    +
    515  coded_width = avc_config.coded_width();
    +
    516  coded_height = avc_config.coded_height();
    +
    517  }
    +
    518 
    +
    519  if (pixel_width != avc_config.pixel_width() ||
    +
    520  pixel_height != avc_config.pixel_height()) {
    +
    521  LOG_IF(WARNING, pixel_width != 1 || pixel_height != 1)
    +
    522  << "Pixel aspect ratio in PASP box (" << pixel_width << ","
    +
    523  << pixel_height
    +
    524  << ") does not match with SAR in AVCDecoderConfigurationRecord "
    +
    525  "("
    +
    526  << avc_config.pixel_width() << "," << avc_config.pixel_height()
    +
    527  << "). Use AVCDecoderConfigurationRecord.";
    +
    528  pixel_width = avc_config.pixel_width();
    +
    529  pixel_height = avc_config.pixel_height();
    +
    530  }
    +
    531  break;
    +
    532  }
    +
    533  case FOURCC_hev1:
    +
    534  case FOURCC_hvc1: {
    +
    535  HEVCDecoderConfigurationRecord hevc_config;
    +
    536  if (!hevc_config.Parse(entry.codec_configuration.data)) {
    +
    537  LOG(ERROR) << "Failed to parse hevc.";
    +
    538  return false;
    +
    539  }
    +
    540  codec_string = hevc_config.GetCodecString(video_codec);
    +
    541  nalu_length_size = hevc_config.nalu_length_size();
    +
    542  break;
    +
    543  }
    +
    544  case FOURCC_vp08:
    +
    545  case FOURCC_vp09:
    +
    546  case FOURCC_vp10: {
    +
    547  VPCodecConfigurationRecord vp_config;
    +
    548  if (!vp_config.ParseMP4(entry.codec_configuration.data)) {
    +
    549  LOG(ERROR) << "Failed to parse vpcc.";
    +
    550  return false;
    +
    551  }
    +
    552  codec_string = vp_config.GetCodecString(video_codec);
    +
    553  break;
    +
    554  }
    +
    555  default:
    +
    556  LOG(ERROR) << "Unsupported video format "
    +
    557  << FourCCToString(actual_format) << " in stsd box.";
    +
    558  return false;
    +
    559  }
    +
    560 
    +
    561  const bool is_encrypted =
    +
    562  entry.sinf.info.track_encryption.default_is_protected == 1;
    +
    563  DVLOG(1) << "is_video_track_encrypted_: " << is_encrypted;
    +
    564  std::shared_ptr<VideoStreamInfo> video_stream_info(new VideoStreamInfo(
    +
    565  track->header.track_id, timescale, duration, video_codec,
    +
    566  codec_string, entry.codec_configuration.data.data(),
    +
    567  entry.codec_configuration.data.size(), coded_width, coded_height,
    +
    568  pixel_width, pixel_height,
    +
    569  0, // trick_play_rate
    +
    570  nalu_length_size, track->media.header.language.code, is_encrypted));
    +
    571 
    +
    572  // Set pssh raw data if it has.
    +
    573  if (moov_->pssh.size() > 0) {
    +
    574  std::vector<uint8_t> pssh_raw_data;
    +
    575  for (const auto& pssh : moov_->pssh) {
    +
    576  pssh_raw_data.insert(pssh_raw_data.end(), pssh.raw_box.begin(),
    +
    577  pssh.raw_box.end());
    +
    578  }
    +
    579  video_stream_info->set_eme_init_data(pssh_raw_data.data(),
    +
    580  pssh_raw_data.size());
    +
    581  }
    +
    582 
    +
    583  streams.push_back(video_stream_info);
    +
    584  }
    +
    585  }
    +
    586 
    +
    587  init_cb_.Run(streams);
    +
    588  if (!FetchKeysIfNecessary(moov_->pssh))
    +
    589  return false;
    +
    590  runs_.reset(new TrackRunIterator(moov_.get()));
    +
    591  RCHECK(runs_->Init());
    +
    592  ChangeState(kEmittingSamples);
    +
    593  return true;
    +
    594 }
    +
    595 
    +
    596 bool MP4MediaParser::ParseMoof(BoxReader* reader) {
    +
    597  // Must already have initialization segment.
    +
    598  RCHECK(moov_.get());
    +
    599  MovieFragment moof;
    +
    600  RCHECK(moof.Parse(reader));
    +
    601  if (!runs_)
    +
    602  runs_.reset(new TrackRunIterator(moov_.get()));
    +
    603  RCHECK(runs_->Init(moof));
    +
    604  if (!FetchKeysIfNecessary(moof.pssh))
    +
    605  return false;
    +
    606  ChangeState(kEmittingSamples);
    +
    607  return true;
    +
    608 }
    +
    609 
    +
    610 bool MP4MediaParser::FetchKeysIfNecessary(
    +
    611  const std::vector<ProtectionSystemSpecificHeader>& headers) {
    +
    612  if (headers.empty())
    +
    613  return true;
    +
    614 
    +
    615  // An error will be returned later if the samples need to be decrypted.
    +
    616  if (!decryption_key_source_)
    +
    617  return true;
    +
    618 
    +
    619  Status status;
    +
    620  for (std::vector<ProtectionSystemSpecificHeader>::const_iterator iter =
    +
    621  headers.begin(); iter != headers.end(); ++iter) {
    +
    622  status = decryption_key_source_->FetchKeys(iter->raw_box);
    +
    623  if (!status.ok()) {
    +
    624  // If there is an error, try using the next PSSH box and report if none
    +
    625  // work.
    +
    626  VLOG(1) << "Unable to fetch decryption keys: " << status
    +
    627  << ", trying the next PSSH box";
    +
    628  continue;
    +
    629  }
    +
    630  return true;
    +
    631  }
    +
    632 
    +
    633  if (!status.ok()) {
    +
    634  LOG(ERROR) << "Error fetching decryption keys: " << status;
    +
    635  return false;
    +
    636  }
    +
    637 
    +
    638  LOG(ERROR) << "No viable 'pssh' box found for content decryption.";
    +
    639  return false;
    +
    640 }
    +
    641 
    +
    642 bool MP4MediaParser::EnqueueSample(bool* err) {
    +
    643  if (!runs_->IsRunValid()) {
    +
    644  // Remain in kEnqueueingSamples state, discarding data, until the end of
    +
    645  // the current 'mdat' box has been appended to the queue.
    +
    646  if (!queue_.Trim(mdat_tail_))
    +
    647  return false;
    +
    648 
    +
    649  ChangeState(kParsingBoxes);
    +
    650  return true;
    +
    651  }
    +
    652 
    +
    653  if (!runs_->IsSampleValid()) {
    +
    654  runs_->AdvanceRun();
    +
    655  return true;
    +
    656  }
    +
    657 
    +
    658  DCHECK(!(*err));
    +
    659 
    +
    660  const uint8_t* buf;
    +
    661  int buf_size;
    +
    662  queue_.Peek(&buf, &buf_size);
    +
    663  if (!buf_size)
    +
    664  return false;
    +
    665 
    +
    666  // Skip this entire track if it is not audio nor video.
    +
    667  if (!runs_->is_audio() && !runs_->is_video())
    +
    668  runs_->AdvanceRun();
    +
    669 
    +
    670  // Attempt to cache the auxiliary information first. Aux info is usually
    +
    671  // placed in a contiguous block before the sample data, rather than being
    +
    672  // interleaved. If we didn't cache it, this would require that we retain the
    +
    673  // start of the segment buffer while reading samples. Aux info is typically
    +
    674  // quite small compared to sample data, so this pattern is useful on
    +
    675  // memory-constrained devices where the source buffer consumes a substantial
    +
    676  // portion of the total system memory.
    +
    677  if (runs_->AuxInfoNeedsToBeCached()) {
    +
    678  queue_.PeekAt(runs_->aux_info_offset() + moof_head_, &buf, &buf_size);
    +
    679  if (buf_size < runs_->aux_info_size())
    +
    680  return false;
    +
    681  *err = !runs_->CacheAuxInfo(buf, buf_size);
    +
    682  return !*err;
    +
    683  }
    +
    684 
    +
    685  int64_t sample_offset = runs_->sample_offset() + moof_head_;
    +
    686  queue_.PeekAt(sample_offset, &buf, &buf_size);
    +
    687  if (buf_size < runs_->sample_size()) {
    +
    688  if (sample_offset < queue_.head()) {
    +
    689  LOG(ERROR) << "Incorrect sample offset " << sample_offset
    +
    690  << " < " << queue_.head();
    +
    691  *err = true;
    +
    692  }
    +
    693  return false;
    +
    694  }
    +
    695 
    +
    696  std::shared_ptr<MediaSample> stream_sample(
    +
    697  MediaSample::CopyFrom(buf, runs_->sample_size(), runs_->is_keyframe()));
    +
    698  if (runs_->is_encrypted()) {
    +
    699  std::unique_ptr<DecryptConfig> decrypt_config = runs_->GetDecryptConfig();
    +
    700  if (!decrypt_config) {
    +
    701  *err = true;
    +
    702  LOG(ERROR) << "Missing decrypt config.";
    +
    703  return false;
    +
    704  }
    +
    705 
    +
    706  if (!decryptor_source_) {
    +
    707  // If the demuxer does not have the decryptor_source_, store
    +
    708  // decrypt_config so that the demuxed sample can be decrypted later.
    +
    709  stream_sample->set_decrypt_config(std::move(decrypt_config));
    +
    710  stream_sample->set_is_encrypted(true);
    +
    711  } else if (!decryptor_source_->DecryptSampleBuffer(
    +
    712  decrypt_config.get(), stream_sample->writable_data(),
    +
    713  stream_sample->data_size())) {
    +
    714  *err = true;
    +
    715  LOG(ERROR) << "Cannot decrypt samples.";
    +
    716  return false;
    +
    717  }
    +
    718  }
    +
    719 
    +
    720  stream_sample->set_dts(runs_->dts());
    +
    721  stream_sample->set_pts(runs_->cts());
    +
    722  stream_sample->set_duration(runs_->duration());
    +
    723 
    +
    724  DVLOG(3) << "Pushing frame: "
    +
    725  << ", key=" << runs_->is_keyframe()
    +
    726  << ", dur=" << runs_->duration()
    +
    727  << ", dts=" << runs_->dts()
    +
    728  << ", cts=" << runs_->cts()
    +
    729  << ", size=" << runs_->sample_size();
    +
    730 
    +
    731  if (!new_sample_cb_.Run(runs_->track_id(), stream_sample)) {
    +
    732  *err = true;
    +
    733  LOG(ERROR) << "Failed to process the sample.";
    +
    734  return false;
    +
    735  }
    +
    736 
    +
    737  runs_->AdvanceSample();
    +
    738  return true;
    +
    739 }
    +
    740 
    +
    741 bool MP4MediaParser::ReadAndDiscardMDATsUntil(const int64_t offset) {
    +
    742  bool err = false;
    +
    743  while (mdat_tail_ < offset) {
    +
    744  const uint8_t* buf;
    +
    745  int size;
    +
    746  queue_.PeekAt(mdat_tail_, &buf, &size);
    +
    747 
    +
    748  FourCC type;
    +
    749  uint64_t box_sz;
    +
    750  if (!BoxReader::StartBox(buf, size, &type, &box_sz, &err))
    +
    751  break;
    +
    752 
    +
    753  mdat_tail_ += box_sz;
    +
    754  }
    +
    755  queue_.Trim(std::min(mdat_tail_, offset));
    +
    756  return !err;
    +
    757 }
    +
    758 
    +
    759 void MP4MediaParser::ChangeState(State new_state) {
    +
    760  DVLOG(2) << "Changing state: " << new_state;
    +
    761  state_ = new_state;
    +
    762 }
    +
    763 
    +
    764 } // namespace mp4
    +
    765 } // namespace media
    +
    766 } // namespace shaka
    void PeekAt(int64_t offset, const uint8_t **buf, int *size)
    static File * OpenWithNoBuffering(const char *file_name, const char *mode)
    Definition: file.cc:152
    -
    bool Flush() override WARN_UNUSED_RESULT
    +
    bool Flush() override WARN_UNUSED_RESULT
    bool Trim(int64_t max_offset)
    -
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    +
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    virtual Status FetchKeys(const std::vector< uint8_t > &pssh_box)=0
    static std::string GetCodecString(Codec codec, uint8_t audio_object_type)
    -
    bool LoadMoov(const std::string &file_path)
    +
    bool LoadMoov(const std::string &file_path)
    +
    static std::shared_ptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
    Definition: media_sample.cc:45
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    -
    static scoped_refptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
    Definition: media_sample.cc:45
    -
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    +
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    DecryptorSource wraps KeySource and is responsible for decryptor management.
    static bool StartBox(const uint8_t *buf, const size_t buf_size, FourCC *type, uint64_t *box_size, bool *err) WARN_UNUSED_RESULT
    Definition: box_reader.cc:54
    static BoxReader * ReadBox(const uint8_t *buf, const size_t buf_size, bool *err)
    Definition: box_reader.cc:36
    diff --git a/docs/d7/df9/byte__queue_8cc_source.html b/docs/d7/df9/byte__queue_8cc_source.html index 0bc5891244..321d5c2aa8 100644 --- a/docs/d7/df9/byte__queue_8cc_source.html +++ b/docs/d7/df9/byte__queue_8cc_source.html @@ -182,7 +182,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d08/classshaka_1_1media_1_1H264ByteToUnitStreamConverter.html b/docs/d8/d08/classshaka_1_1media_1_1H264ByteToUnitStreamConverter.html index 0e3580ffe8..3950f99b7e 100644 --- a/docs/d8/d08/classshaka_1_1media_1_1H264ByteToUnitStreamConverter.html +++ b/docs/d8/d08/classshaka_1_1media_1_1H264ByteToUnitStreamConverter.html @@ -119,9 +119,9 @@ Public Member Functions

    Additional Inherited Members

    - Static Public Attributes inherited from shaka::media::H26xByteToUnitStreamConverter
    -static const size_t kUnitStreamNaluLengthSize = 4
     
    +static constexpr size_t kUnitStreamNaluLengthSize = 4
     

    Detailed Description

    Class which converts H.264 byte streams (as specified in ISO/IEC 14496-10 Annex B) into H.264 NAL unit streams (as specified in ISO/IEC 14496-15).

    @@ -171,7 +171,7 @@ static const size_t 
    kUnitS diff --git a/docs/d8/d08/classshaka_1_1media_1_1WebMClusterParser-members.html b/docs/d8/d08/classshaka_1_1media_1_1WebMClusterParser-members.html index 9dfeb372d4..d08aaffcb2 100644 --- a/docs/d8/d08/classshaka_1_1media_1_1WebMClusterParser-members.html +++ b/docs/d8/d08/classshaka_1_1media_1_1WebMClusterParser-members.html @@ -103,14 +103,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    OnString(int id, const std::string &str) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientvirtual
    Parse(const uint8_t *buf, int size)shaka::media::WebMClusterParser
    Reset()shaka::media::WebMClusterParser
    WebMClusterParser(int64_t timecode_scale, scoped_refptr< AudioStreamInfo > audio_stream_info, scoped_refptr< VideoStreamInfo > video_stream_info, int64_t audio_default_duration, int64_t video_default_duration, const WebMTracksParser::TextTracks &text_tracks, const std::set< int64_t > &ignored_tracks, const std::string &audio_encryption_key_id, const std::string &video_encryption_key_id, const MediaParser::NewSampleCB &new_sample_cb, const MediaParser::InitCB &init_cb, KeySource *decryption_key_source)shaka::media::WebMClusterParser
    WebMClusterParser(int64_t timecode_scale, std::shared_ptr< AudioStreamInfo > audio_stream_info, std::shared_ptr< VideoStreamInfo > video_stream_info, int64_t audio_default_duration, int64_t video_default_duration, const WebMTracksParser::TextTracks &text_tracks, const std::set< int64_t > &ignored_tracks, const std::string &audio_encryption_key_id, const std::string &video_encryption_key_id, const MediaParser::NewSampleCB &new_sample_cb, const MediaParser::InitCB &init_cb, KeySource *decryption_key_source)shaka::media::WebMClusterParser
    WebMParserClient() (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientprotected
    ~WebMClusterParser() override (defined in shaka::media::WebMClusterParser)shaka::media::WebMClusterParser
    ~WebMParserClient() (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientvirtual
    diff --git a/docs/d8/d08/classshaka_1_1media_1_1mp2t_1_1TsWriter-members.html b/docs/d8/d08/classshaka_1_1media_1_1mp2t_1_1TsWriter-members.html index 29b8f03f84..3dbf6c8aee 100644 --- a/docs/d8/d08/classshaka_1_1media_1_1mp2t_1_1TsWriter-members.html +++ b/docs/d8/d08/classshaka_1_1media_1_1mp2t_1_1TsWriter-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/d8/d08/structshaka_1_1media_1_1mp4_1_1MovieHeader-members.html b/docs/d8/d08/structshaka_1_1media_1_1mp4_1_1MovieHeader-members.html index e5fbd9741d..9d1d96b483 100644 --- a/docs/d8/d08/structshaka_1_1media_1_1mp4_1_1MovieHeader-members.html +++ b/docs/d8/d08/structshaka_1_1media_1_1mp4_1_1MovieHeader-members.html @@ -119,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/d8/d0d/media__sample_8cc_source.html b/docs/d8/d0d/media__sample_8cc_source.html index 523e075d5e..5710d561e5 100644 --- a/docs/d8/d0d/media__sample_8cc_source.html +++ b/docs/d8/d0d/media__sample_8cc_source.html @@ -131,71 +131,69 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    42 MediaSample::~MediaSample() {}
    43 
    44 // static
    -
    45 scoped_refptr<MediaSample> MediaSample::CopyFrom(const uint8_t* data,
    -
    46  size_t data_size,
    -
    47  bool is_key_frame) {
    +
    45 std::shared_ptr<MediaSample> MediaSample::CopyFrom(const uint8_t* data,
    +
    46  size_t data_size,
    +
    47  bool is_key_frame) {
    48  // If you hit this CHECK you likely have a bug in a demuxer. Go fix it.
    49  CHECK(data);
    -
    50  return make_scoped_refptr(
    -
    51  new MediaSample(data, data_size, NULL, 0u, is_key_frame));
    +
    50  return std::make_shared<MediaSample>(data, data_size, nullptr, 0u,
    +
    51  is_key_frame);
    52 }
    53 
    54 // static
    -
    55 scoped_refptr<MediaSample> MediaSample::CopyFrom(const uint8_t* data,
    -
    56  size_t data_size,
    -
    57  const uint8_t* side_data,
    -
    58  size_t side_data_size,
    -
    59  bool is_key_frame) {
    +
    55 std::shared_ptr<MediaSample> MediaSample::CopyFrom(const uint8_t* data,
    +
    56  size_t data_size,
    +
    57  const uint8_t* side_data,
    +
    58  size_t side_data_size,
    +
    59  bool is_key_frame) {
    60  // If you hit this CHECK you likely have a bug in a demuxer. Go fix it.
    61  CHECK(data);
    -
    62  return make_scoped_refptr(new MediaSample(
    -
    63  data, data_size, side_data, side_data_size, is_key_frame));
    +
    62  return std::make_shared<MediaSample>(data, data_size, side_data,
    +
    63  side_data_size, is_key_frame);
    64 }
    65 
    66 // static
    -
    67 scoped_refptr<MediaSample> MediaSample::FromMetadata(const uint8_t* metadata,
    -
    68  size_t metadata_size) {
    -
    69  return make_scoped_refptr(
    -
    70  new MediaSample(nullptr, 0, metadata, metadata_size, false));
    +
    67 std::shared_ptr<MediaSample> MediaSample::FromMetadata(const uint8_t* metadata,
    +
    68  size_t metadata_size) {
    +
    69  return std::make_shared<MediaSample>(nullptr, 0, metadata, metadata_size,
    +
    70  false);
    71 }
    72 
    73 // static
    -
    74 scoped_refptr<MediaSample> MediaSample::CreateEmptyMediaSample() {
    -
    75  MediaSample* media_sample = new MediaSample();
    -
    76  return make_scoped_refptr(media_sample);
    -
    77 }
    -
    78 
    -
    79 // static
    -
    80 scoped_refptr<MediaSample> MediaSample::CreateEOSBuffer() {
    -
    81  return make_scoped_refptr(new MediaSample(NULL, 0, NULL, 0, false));
    -
    82 }
    -
    83 
    -
    84 std::string MediaSample::ToString() const {
    -
    85  if (end_of_stream())
    -
    86  return "End of stream sample\n";
    -
    87  return base::StringPrintf(
    -
    88  "dts: %" PRId64 "\n pts: %" PRId64 "\n duration: %" PRId64 "\n "
    -
    89  "is_key_frame: %s\n size: %zu\n side_data_size: %zu\n",
    -
    90  dts_,
    -
    91  pts_,
    -
    92  duration_,
    -
    93  is_key_frame_ ? "true" : "false",
    -
    94  data_.size(),
    -
    95  side_data_.size());
    -
    96 }
    -
    97 
    -
    98 } // namespace media
    -
    99 } // namespace shaka
    -
    static scoped_refptr< MediaSample > FromMetadata(const uint8_t *metadata, size_t metadata_size)
    Definition: media_sample.cc:67
    -
    static scoped_refptr< MediaSample > CreateEOSBuffer()
    Definition: media_sample.cc:80
    -
    std::string ToString() const
    Definition: media_sample.cc:84
    -
    Class to hold a media sample.
    Definition: media_sample.h:22
    -
    static scoped_refptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
    Definition: media_sample.cc:45
    -
    static scoped_refptr< MediaSample > CreateEmptyMediaSample()
    Create a MediaSample object with default members.
    Definition: media_sample.cc:74
    +
    74 std::shared_ptr<MediaSample> MediaSample::CreateEmptyMediaSample() {
    +
    75  return std::make_shared<MediaSample>();
    +
    76 }
    +
    77 
    +
    78 // static
    +
    79 std::shared_ptr<MediaSample> MediaSample::CreateEOSBuffer() {
    +
    80  return std::make_shared<MediaSample>(nullptr, 0, nullptr, 0, false);
    +
    81 }
    +
    82 
    +
    83 std::string MediaSample::ToString() const {
    +
    84  if (end_of_stream())
    +
    85  return "End of stream sample\n";
    +
    86  return base::StringPrintf(
    +
    87  "dts: %" PRId64 "\n pts: %" PRId64 "\n duration: %" PRId64 "\n "
    +
    88  "is_key_frame: %s\n size: %zu\n side_data_size: %zu\n",
    +
    89  dts_,
    +
    90  pts_,
    +
    91  duration_,
    +
    92  is_key_frame_ ? "true" : "false",
    +
    93  data_.size(),
    +
    94  side_data_.size());
    +
    95 }
    +
    96 
    +
    97 } // namespace media
    +
    98 } // namespace shaka
    +
    static std::shared_ptr< MediaSample > CreateEOSBuffer()
    Definition: media_sample.cc:79
    +
    static std::shared_ptr< MediaSample > CreateEmptyMediaSample()
    Create a MediaSample object with default members.
    Definition: media_sample.cc:74
    +
    std::string ToString() const
    Definition: media_sample.cc:83
    +
    static std::shared_ptr< MediaSample > FromMetadata(const uint8_t *metadata, size_t metadata_size)
    Definition: media_sample.cc:67
    +
    static std::shared_ptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
    Definition: media_sample.cc:45
    diff --git a/docs/d8/d12/structshaka_1_1media_1_1mp4_1_1DecodingTime.html b/docs/d8/d12/structshaka_1_1media_1_1mp4_1_1DecodingTime.html index 42028c9160..b199866115 100644 --- a/docs/d8/d12/structshaka_1_1media_1_1mp4_1_1DecodingTime.html +++ b/docs/d8/d12/structshaka_1_1media_1_1mp4_1_1DecodingTime.html @@ -112,7 +112,7 @@ uint32_t sample_delta< diff --git a/docs/d8/d12/structshaka_1_1media_1_1mp4_1_1PrivFrame-members.html b/docs/d8/d12/structshaka_1_1media_1_1mp4_1_1PrivFrame-members.html index 0ef37705e2..9ed7dd2b8f 100644 --- a/docs/d8/d12/structshaka_1_1media_1_1mp4_1_1PrivFrame-members.html +++ b/docs/d8/d12/structshaka_1_1media_1_1mp4_1_1PrivFrame-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d13/classshaka_1_1media_1_1BitReader-members.html b/docs/d8/d13/classshaka_1_1media_1_1BitReader-members.html index 60995e1540..d6b4c777a4 100644 --- a/docs/d8/d13/classshaka_1_1media_1_1BitReader-members.html +++ b/docs/d8/d13/classshaka_1_1media_1_1BitReader-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d14/classshaka_1_1media_1_1VP8Parser.html b/docs/d8/d14/classshaka_1_1media_1_1VP8Parser.html index bbdb8685db..eb33687d65 100644 --- a/docs/d8/d14/classshaka_1_1media_1_1VP8Parser.html +++ b/docs/d8/d14/classshaka_1_1media_1_1VP8Parser.html @@ -235,7 +235,7 @@ Additional Inherited Members diff --git a/docs/d8/d16/structshaka_1_1media_1_1MuxerOptions-members.html b/docs/d8/d16/structshaka_1_1media_1_1MuxerOptions-members.html index 7d141dbc73..7a24e4bf90 100644 --- a/docs/d8/d16/structshaka_1_1media_1_1MuxerOptions-members.html +++ b/docs/d8/d16/structshaka_1_1media_1_1MuxerOptions-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d19/bandwidth__estimator_8h_source.html b/docs/d8/d19/bandwidth__estimator_8h_source.html index 5b1ed44d72..7ab0a9b37c 100644 --- a/docs/d8/d19/bandwidth__estimator_8h_source.html +++ b/docs/d8/d19/bandwidth__estimator_8h_source.html @@ -133,7 +133,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d20/structshaka_1_1media_1_1mp4_1_1WebVTTConfigurationBox.html b/docs/d8/d20/structshaka_1_1media_1_1mp4_1_1WebVTTConfigurationBox.html index 62f28b2d12..7749b40cac 100644 --- a/docs/d8/d20/structshaka_1_1media_1_1mp4_1_1WebVTTConfigurationBox.html +++ b/docs/d8/d20/structshaka_1_1media_1_1mp4_1_1WebVTTConfigurationBox.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d8/d23/structshaka_1_1media_1_1SubsampleEntry-members.html b/docs/d8/d23/structshaka_1_1media_1_1SubsampleEntry-members.html index 213de98668..02f2ea3799 100644 --- a/docs/d8/d23/structshaka_1_1media_1_1SubsampleEntry-members.html +++ b/docs/d8/d23/structshaka_1_1media_1_1SubsampleEntry-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d28/es__parser__h265_8h_source.html b/docs/d8/d28/es__parser__h265_8h_source.html index 8819e40692..c9d2f1f783 100644 --- a/docs/d8/d28/es__parser__h265_8h_source.html +++ b/docs/d8/d28/es__parser__h265_8h_source.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    46  NewStreamInfoCB new_stream_info_cb_;
    47 
    48  // Last video decoder config.
    -
    49  scoped_refptr<StreamInfo> last_video_decoder_config_;
    +
    49  std::shared_ptr<StreamInfo> last_video_decoder_config_;
    50  bool decoder_config_check_pending_;
    51 
    52  std::unique_ptr<H265Parser> h265_parser_;
    @@ -153,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d33/webm__content__encodings__client_8h_source.html b/docs/d8/d33/webm__content__encodings__client_8h_source.html index d250232c69..e2d600f994 100644 --- a/docs/d8/d33/webm__content__encodings__client_8h_source.html +++ b/docs/d8/d33/webm__content__encodings__client_8h_source.html @@ -139,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d3e/classshaka_1_1media_1_1StreamDescriptorCompareFn.html b/docs/d8/d3e/classshaka_1_1media_1_1StreamDescriptorCompareFn.html index 95aa832aef..46b8950aec 100644 --- a/docs/d8/d3e/classshaka_1_1media_1_1StreamDescriptorCompareFn.html +++ b/docs/d8/d3e/classshaka_1_1media_1_1StreamDescriptorCompareFn.html @@ -109,7 +109,7 @@ bool operator() (const diff --git a/docs/d8/d4d/aes__decryptor_8h_source.html b/docs/d8/d4d/aes__decryptor_8h_source.html index 75d8605fae..2291fdec52 100644 --- a/docs/d8/d4d/aes__decryptor_8h_source.html +++ b/docs/d8/d4d/aes__decryptor_8h_source.html @@ -147,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d5b/structshaka_1_1media_1_1mp4_1_1AudioSampleEntry.html b/docs/d8/d5b/structshaka_1_1media_1_1mp4_1_1AudioSampleEntry.html index 389b32a6d7..3a057e2e01 100644 --- a/docs/d8/d5b/structshaka_1_1media_1_1mp4_1_1AudioSampleEntry.html +++ b/docs/d8/d5b/structshaka_1_1media_1_1mp4_1_1AudioSampleEntry.html @@ -206,7 +206,7 @@ Additional Inherited Members diff --git a/docs/d8/d5c/classshaka_1_1media_1_1MediaStream.html b/docs/d8/d5c/classshaka_1_1media_1_1MediaStream.html index 99d2a8a927..21277eb4b9 100644 --- a/docs/d8/d5c/classshaka_1_1media_1_1MediaStream.html +++ b/docs/d8/d5c/classshaka_1_1media_1_1MediaStream.html @@ -106,47 +106,47 @@ Public Types - - + + - - - - - - + + + + + + - - + +

    Public Member Functions

     MediaStream (scoped_refptr< StreamInfo > info, Demuxer *demuxer)
     
     MediaStream (std::shared_ptr< StreamInfo > info, Demuxer *demuxer)
     
    void Connect (Muxer *muxer)
     
    Status Start (MediaStreamOperation operation)
     Start the stream for pushing or pulling.
     
    -Status PushSample (const scoped_refptr< MediaSample > &sample)
     Push sample to Muxer (triggered by Demuxer).
     
    -Status PullSample (scoped_refptr< MediaSample > *sample)
     Pull sample from Demuxer (triggered by Muxer).
     
    +Status PushSample (const std::shared_ptr< MediaSample > &sample)
     Push sample to Muxer (triggered by Demuxer).
     
    +Status PullSample (std::shared_ptr< MediaSample > *sample)
     Pull sample from Demuxer (triggered by Muxer).
     
    Demuxerdemuxer ()
     
    Muxermuxer ()
     
    -const scoped_refptr< StreamInfoinfo () const
     
    +const std::shared_ptr< StreamInfoinfo () const
     
    std::string ToString () const
     

    Detailed Description

    MediaStream connects Demuxer to Muxer. It is an abstraction for a media elementary stream.

    -

    Definition at line 26 of file media_stream.h.

    +

    Definition at line 25 of file media_stream.h.

    Constructor & Destructor Documentation

    - +
    - + @@ -214,7 +214,7 @@ const scoped_refptr<
    Returns
    a human-readable string describing |*this|.
    -

    Definition at line 103 of file media_stream.cc.

    +

    Definition at line 105 of file media_stream.cc.

    @@ -225,7 +225,7 @@ const scoped_refptr< diff --git a/docs/d8/d6a/classshaka_1_1media_1_1ClusterBuilder-members.html b/docs/d8/d6a/classshaka_1_1media_1_1ClusterBuilder-members.html index 64e221ee1f..88f9bbcf4f 100644 --- a/docs/d8/d6a/classshaka_1_1media_1_1ClusterBuilder-members.html +++ b/docs/d8/d6a/classshaka_1_1media_1_1ClusterBuilder-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    shaka::media::MediaStream::MediaStream (scoped_refptr< StreamInfostd::shared_ptr< StreamInfo info,
    diff --git a/docs/d8/d6d/structshaka_1_1media_1_1mp4_1_1DataInformation.html b/docs/d8/d6d/structshaka_1_1media_1_1mp4_1_1DataInformation.html index 031a737402..624e09d1a3 100644 --- a/docs/d8/d6d/structshaka_1_1media_1_1mp4_1_1DataInformation.html +++ b/docs/d8/d6d/structshaka_1_1media_1_1mp4_1_1DataInformation.html @@ -173,7 +173,7 @@ Additional Inherited Members
    diff --git a/docs/d8/d70/structshaka_1_1media_1_1mp4_1_1Metadata-members.html b/docs/d8/d70/structshaka_1_1media_1_1mp4_1_1Metadata-members.html index d01d5f0461..f0a5e0e178 100644 --- a/docs/d8/d70/structshaka_1_1media_1_1mp4_1_1Metadata-members.html +++ b/docs/d8/d70/structshaka_1_1media_1_1mp4_1_1Metadata-members.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d74/classshaka_1_1media_1_1TracksBuilder.html b/docs/d8/d74/classshaka_1_1media_1_1TracksBuilder.html index 1f5d700079..38845c5be2 100644 --- a/docs/d8/d74/classshaka_1_1media_1_1TracksBuilder.html +++ b/docs/d8/d74/classshaka_1_1media_1_1TracksBuilder.html @@ -123,7 +123,7 @@ std::vector< uint8_t >  diff --git a/docs/d8/d86/classshaka_1_1media_1_1WebMTracksParser.html b/docs/d8/d86/classshaka_1_1media_1_1WebMTracksParser.html index 3ff505d146..fdcf31af1c 100644 --- a/docs/d8/d86/classshaka_1_1media_1_1WebMTracksParser.html +++ b/docs/d8/d86/classshaka_1_1media_1_1WebMTracksParser.html @@ -140,15 +140,15 @@ const std::set< int64_t > &  const std::string & audio_encryption_key_id () const   - -scoped_refptr< AudioStreamInfoaudio_stream_info () -  + +std::shared_ptr< AudioStreamInfoaudio_stream_info () +  const std::string & video_encryption_key_id () const   - -scoped_refptr< VideoStreamInfovideo_stream_info () -  + +std::shared_ptr< VideoStreamInfovideo_stream_info () +  const TextTracks & text_tracks () const   @@ -225,7 +225,7 @@ The number of bytes parsed on success. diff --git a/docs/d8/d88/structshaka_1_1media_1_1mp4_1_1MovieExtends-members.html b/docs/d8/d88/structshaka_1_1media_1_1mp4_1_1MovieExtends-members.html index dc4f89d857..61d15bc833 100644 --- a/docs/d8/d88/structshaka_1_1media_1_1mp4_1_1MovieExtends-members.html +++ b/docs/d8/d88/structshaka_1_1media_1_1mp4_1_1MovieExtends-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d8e/classshaka_1_1AdaptationSet.html b/docs/d8/d8e/classshaka_1_1AdaptationSet.html index c89b39b2fc..56202c779f 100644 --- a/docs/d8/d8e/classshaka_1_1AdaptationSet.html +++ b/docs/d8/d8e/classshaka_1_1AdaptationSet.html @@ -568,7 +568,7 @@ template<DashProfile profile> diff --git a/docs/d8/d91/classshaka_1_1media_1_1AesCtrEncryptor-members.html b/docs/d8/d91/classshaka_1_1media_1_1AesCtrEncryptor-members.html index 4abf4f8908..d20c56b227 100644 --- a/docs/d8/d91/classshaka_1_1media_1_1AesCtrEncryptor-members.html +++ b/docs/d8/d91/classshaka_1_1media_1_1AesCtrEncryptor-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d92/classshaka_1_1media_1_1AesRequestSigner-members.html b/docs/d8/d92/classshaka_1_1media_1_1AesRequestSigner-members.html index c9a21d34bd..5e240887db 100644 --- a/docs/d8/d92/classshaka_1_1media_1_1AesRequestSigner-members.html +++ b/docs/d8/d92/classshaka_1_1media_1_1AesRequestSigner-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d92/structshaka_1_1media_1_1H264DecRefPicMarking-members.html b/docs/d8/d92/structshaka_1_1media_1_1H264DecRefPicMarking-members.html index 46a0825fa4..f3e3044642 100644 --- a/docs/d8/d92/structshaka_1_1media_1_1H264DecRefPicMarking-members.html +++ b/docs/d8/d92/structshaka_1_1media_1_1H264DecRefPicMarking-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d93/structshaka_1_1media_1_1mp4_1_1SubtitleMediaHeader-members.html b/docs/d8/d93/structshaka_1_1media_1_1mp4_1_1SubtitleMediaHeader-members.html index d46402a479..1935353e25 100644 --- a/docs/d8/d93/structshaka_1_1media_1_1mp4_1_1SubtitleMediaHeader-members.html +++ b/docs/d8/d93/structshaka_1_1media_1_1mp4_1_1SubtitleMediaHeader-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d94/adts__constants_8cc_source.html b/docs/d8/d94/adts__constants_8cc_source.html index bc19552b9a..c702f7ad10 100644 --- a/docs/d8/d94/adts__constants_8cc_source.html +++ b/docs/d8/d94/adts__constants_8cc_source.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d94/pes__packet_8h_source.html b/docs/d8/d94/pes__packet_8h_source.html index 48b8996ac5..00520fd4e9 100644 --- a/docs/d8/d94/pes__packet_8h_source.html +++ b/docs/d8/d94/pes__packet_8h_source.html @@ -159,7 +159,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d99/structshaka_1_1media_1_1mp4_1_1VTTAdditionalTextBox-members.html b/docs/d8/d99/structshaka_1_1media_1_1mp4_1_1VTTAdditionalTextBox-members.html index e0fb586a93..0bb16724ef 100644 --- a/docs/d8/d99/structshaka_1_1media_1_1mp4_1_1VTTAdditionalTextBox-members.html +++ b/docs/d8/d99/structshaka_1_1media_1_1mp4_1_1VTTAdditionalTextBox-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d9a/fragmenter_8cc_source.html b/docs/d8/d9a/fragmenter_8cc_source.html index b33441628e..5660139295 100644 --- a/docs/d8/d9a/fragmenter_8cc_source.html +++ b/docs/d8/d9a/fragmenter_8cc_source.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    29 }
    30 } // namespace
    31 
    -
    32 Fragmenter::Fragmenter(scoped_refptr<StreamInfo> info, TrackFragment* traf)
    +
    32 Fragmenter::Fragmenter(std::shared_ptr<StreamInfo> info, TrackFragment* traf)
    33  : use_decoding_timestamp_in_timeline_(false),
    34  traf_(traf),
    35  seek_preroll_(GetSeekPreroll(*info)),
    @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    43 
    44 Fragmenter::~Fragmenter() {}
    45 
    -
    46 Status Fragmenter::AddSample(scoped_refptr<MediaSample> sample) {
    +
    46 Status Fragmenter::AddSample(std::shared_ptr<MediaSample> sample) {
    47  DCHECK(sample);
    48  if (sample->duration() == 0) {
    49  LOG(WARNING) << "Unexpected sample with zero duration @ dts "
    @@ -289,20 +289,20 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    200 } // namespace shaka
    -
    Fragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf)
    Definition: fragmenter.cc:32
    -
    virtual Status AddSample(scoped_refptr< MediaSample > sample)
    Definition: fragmenter.cc:46
    virtual Status InitializeFragment(int64_t first_sample_dts)
    Definition: fragmenter.cc:92
    virtual void FinalizeFragment()
    Finalize and optimize the fragment.
    Definition: fragmenter.cc:111
    +
    Fragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf)
    Definition: fragmenter.cc:32
    +
    virtual Status AddSample(std::shared_ptr< MediaSample > sample)
    Definition: fragmenter.cc:46
    void GenerateSegmentReference(SegmentReference *reference)
    Fill reference with current fragment information.
    Definition: fragmenter.cc:169
    -
    bool OptimizeSampleEntries(std::vector< T > *entries, T *default_value)
    Definition: fragmenter.h:101
    +
    bool OptimizeSampleEntries(std::vector< T > *entries, T *default_value)
    Definition: fragmenter.h:100
    diff --git a/docs/d8/d9c/webm__tracks__parser_8cc_source.html b/docs/d8/d9c/webm__tracks__parser_8cc_source.html index 08d5db0f88..42469ab40e 100644 --- a/docs/d8/d9c/webm__tracks__parser_8cc_source.html +++ b/docs/d8/d9c/webm__tracks__parser_8cc_source.html @@ -291,7 +291,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    202  audio_default_duration_ = default_duration_;
    203 
    204  DCHECK(!audio_stream_info_);
    -
    205  audio_stream_info_ = audio_client_.GetAudioStreamInfo(
    +
    205  audio_stream_info_ = audio_client_.GetAudioStreamInfo(
    206  audio_track_num_, codec_id_, codec_private_, seek_preroll_,
    207  codec_delay_, track_language_, !audio_encryption_key_id_.empty());
    208  if (!audio_stream_info_)
    @@ -313,7 +313,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    224  video_default_duration_ = default_duration_;
    225 
    226  DCHECK(!video_stream_info_);
    -
    227  video_stream_info_ = video_client_.GetVideoStreamInfo(
    +
    227  video_stream_info_ = video_client_.GetVideoStreamInfo(
    228  video_track_num_, codec_id_, codec_private_,
    229  !video_encryption_key_id_.empty());
    230  if (!video_stream_info_)
    @@ -429,18 +429,18 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    340 } // namespace media
    341 } // namespace shaka
    int64_t GetAudioDefaultDuration(const double timecode_scale_in_us) const
    +
    std::shared_ptr< VideoStreamInfo > GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)
    void Reset()
    Reset this object's state so it can process a new video track element.
    +
    std::shared_ptr< AudioStreamInfo > GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted)
    int Parse(const uint8_t *buf, int size)
    Definition: webm_parser.cc:719
    -
    scoped_refptr< VideoStreamInfo > GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)
    int Parse(const uint8_t *buf, int size)
    void Reset()
    Reset this object's state so it can process a new audio track element.
    -
    scoped_refptr< AudioStreamInfo > GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted)
    diff --git a/docs/d8/d9f/udp__file_8h_source.html b/docs/d8/d9f/udp__file_8h_source.html index 0000e4c39e..ca29f3e33e 100644 --- a/docs/d8/d9f/udp__file_8h_source.html +++ b/docs/d8/d9f/udp__file_8h_source.html @@ -153,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/da3/classshaka_1_1media_1_1DecryptorSource-members.html b/docs/d8/da3/classshaka_1_1media_1_1DecryptorSource-members.html index 3aa23d8537..08ad733e18 100644 --- a/docs/d8/da3/classshaka_1_1media_1_1DecryptorSource-members.html +++ b/docs/d8/da3/classshaka_1_1media_1_1DecryptorSource-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/da5/structshaka_1_1media_1_1mp4_1_1SampleSize-members.html b/docs/d8/da5/structshaka_1_1media_1_1mp4_1_1SampleSize-members.html index 6b2e924bb4..78230d619d 100644 --- a/docs/d8/da5/structshaka_1_1media_1_1mp4_1_1SampleSize-members.html +++ b/docs/d8/da5/structshaka_1_1media_1_1mp4_1_1SampleSize-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/da6/classshaka_1_1media_1_1NaluReader-members.html b/docs/d8/da6/classshaka_1_1media_1_1NaluReader-members.html index 091cc6bfe8..968c1e4965 100644 --- a/docs/d8/da6/classshaka_1_1media_1_1NaluReader-members.html +++ b/docs/d8/da6/classshaka_1_1media_1_1NaluReader-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/daa/stream__info_8h_source.html b/docs/d8/daa/stream__info_8h_source.html index 6b6439e451..3813adb16b 100644 --- a/docs/d8/daa/stream__info_8h_source.html +++ b/docs/d8/daa/stream__info_8h_source.html @@ -99,51 +99,51 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    10 #include <string>
    11 #include <vector>
    12 
    -
    13 #include "packager/base/memory/ref_counted.h"
    -
    14 
    -
    15 namespace shaka {
    -
    16 namespace media {
    -
    17 
    -
    18 enum StreamType {
    -
    19  kStreamUnknown = 0,
    -
    20  kStreamAudio,
    -
    21  kStreamVideo,
    -
    22  kStreamText,
    -
    23 };
    -
    24 
    -
    25 enum Codec {
    -
    26  kUnknownCodec = 0,
    -
    27  kCodecH264,
    -
    28  kCodecHEV1,
    -
    29  kCodecHVC1,
    -
    30  kCodecVC1,
    -
    31  kCodecMPEG2,
    -
    32  kCodecMPEG4,
    -
    33  kCodecTheora,
    -
    34  kCodecVP8,
    -
    35  kCodecVP9,
    -
    36  kCodecVP10,
    -
    37  kCodecAAC,
    -
    38  kCodecAC3,
    -
    39  kCodecDTSC,
    -
    40  kCodecDTSE,
    -
    41  kCodecDTSH,
    -
    42  kCodecDTSL,
    -
    43  kCodecDTSM,
    -
    44  kCodecDTSP,
    -
    45  kCodecEAC3,
    -
    46  kCodecOpus,
    -
    47  kCodecVorbis,
    -
    48  kCodecText,
    -
    49  kNumCodec
    -
    50 };
    -
    51 
    -
    53 class StreamInfo : public base::RefCountedThreadSafe<StreamInfo> {
    -
    54  public:
    -
    55  StreamInfo(StreamType stream_type, int track_id, uint32_t time_scale,
    -
    56  uint64_t duration, Codec codec, const std::string& codec_string,
    -
    57  const uint8_t* codec_config, size_t codec_config_size,
    -
    58  const std::string& language, bool is_encrypted);
    +
    13 namespace shaka {
    +
    14 namespace media {
    +
    15 
    +
    16 enum StreamType {
    +
    17  kStreamUnknown = 0,
    +
    18  kStreamAudio,
    +
    19  kStreamVideo,
    +
    20  kStreamText,
    +
    21 };
    +
    22 
    +
    23 enum Codec {
    +
    24  kUnknownCodec = 0,
    +
    25  kCodecH264,
    +
    26  kCodecHEV1,
    +
    27  kCodecHVC1,
    +
    28  kCodecVC1,
    +
    29  kCodecMPEG2,
    +
    30  kCodecMPEG4,
    +
    31  kCodecTheora,
    +
    32  kCodecVP8,
    +
    33  kCodecVP9,
    +
    34  kCodecVP10,
    +
    35  kCodecAAC,
    +
    36  kCodecAC3,
    +
    37  kCodecDTSC,
    +
    38  kCodecDTSE,
    +
    39  kCodecDTSH,
    +
    40  kCodecDTSL,
    +
    41  kCodecDTSM,
    +
    42  kCodecDTSP,
    +
    43  kCodecEAC3,
    +
    44  kCodecOpus,
    +
    45  kCodecVorbis,
    +
    46  kCodecText,
    +
    47  kNumCodec
    +
    48 };
    +
    49 
    +
    51 class StreamInfo {
    +
    52  public:
    +
    53  StreamInfo(StreamType stream_type, int track_id, uint32_t time_scale,
    +
    54  uint64_t duration, Codec codec, const std::string& codec_string,
    +
    55  const uint8_t* codec_config, size_t codec_config_size,
    +
    56  const std::string& language, bool is_encrypted);
    +
    57 
    +
    58  virtual ~StreamInfo();
    59 
    62  virtual bool IsValidConfig() const = 0;
    63 
    @@ -167,45 +167,41 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    82  }
    83  void set_language(const std::string& language) { language_ = language; }
    84 
    -
    85  protected:
    -
    86  friend class base::RefCountedThreadSafe<StreamInfo>;
    -
    87  virtual ~StreamInfo();
    -
    88 
    -
    89  private:
    -
    90  // Whether the stream is Audio or Video.
    -
    91  StreamType stream_type_;
    -
    92  uint32_t track_id_;
    -
    93  // The actual time is calculated as time / time_scale_ in seconds.
    -
    94  uint32_t time_scale_;
    -
    95  // Duration base on time_scale.
    -
    96  uint64_t duration_;
    -
    97  Codec codec_;
    -
    98  std::string codec_string_;
    -
    99  std::string language_;
    -
    100  // Whether the stream is potentially encrypted.
    -
    101  // Note that in a potentially encrypted stream, individual buffers
    -
    102  // can be encrypted or not encrypted.
    -
    103  bool is_encrypted_;
    -
    104  // Optional byte data required for some audio/video decoders such as Vorbis
    -
    105  // codebooks.
    -
    106  std::vector<uint8_t> codec_config_;
    -
    107 
    -
    108  // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler
    -
    109  // generated copy constructor and assignment operator. Since the extra data is
    -
    110  // typically small, the performance impact is minimal.
    -
    111 };
    -
    112 
    -
    113 } // namespace media
    -
    114 } // namespace shaka
    -
    115 
    -
    116 #endif // MEDIA_BASE_STREAM_INFO_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    85  private:
    +
    86  // Whether the stream is Audio or Video.
    +
    87  StreamType stream_type_;
    +
    88  uint32_t track_id_;
    +
    89  // The actual time is calculated as time / time_scale_ in seconds.
    +
    90  uint32_t time_scale_;
    +
    91  // Duration base on time_scale.
    +
    92  uint64_t duration_;
    +
    93  Codec codec_;
    +
    94  std::string codec_string_;
    +
    95  std::string language_;
    +
    96  // Whether the stream is potentially encrypted.
    +
    97  // Note that in a potentially encrypted stream, individual buffers
    +
    98  // can be encrypted or not encrypted.
    +
    99  bool is_encrypted_;
    +
    100  // Optional byte data required for some audio/video decoders such as Vorbis
    +
    101  // codebooks.
    +
    102  std::vector<uint8_t> codec_config_;
    +
    103 
    +
    104  // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler
    +
    105  // generated copy constructor and assignment operator. Since the extra data is
    +
    106  // typically small, the performance impact is minimal.
    +
    107 };
    +
    108 
    +
    109 } // namespace media
    +
    110 } // namespace shaka
    +
    111 
    +
    112 #endif // MEDIA_BASE_STREAM_INFO_H_
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    virtual bool IsValidConfig() const =0
    virtual std::string ToString() const
    Definition: stream_info.cc:37
    diff --git a/docs/d8/daf/namespaceshaka.html b/docs/d8/daf/namespaceshaka.html index 95bb7bda6a..78369d81b6 100644 --- a/docs/d8/daf/namespaceshaka.html +++ b/docs/d8/daf/namespaceshaka.html @@ -658,7 +658,7 @@ const char kPsshElementNam diff --git a/docs/d8/db7/classshaka_1_1media_1_1mp4_1_1MultiSegmentSegmenter.html b/docs/d8/db7/classshaka_1_1media_1_1mp4_1_1MultiSegmentSegmenter.html index fbf2c15a05..e810493b2d 100644 --- a/docs/d8/db7/classshaka_1_1media_1_1mp4_1_1MultiSegmentSegmenter.html +++ b/docs/d8/db7/classshaka_1_1media_1_1mp4_1_1MultiSegmentSegmenter.html @@ -123,8 +123,8 @@ Public Member Functions   Status Finalize ()   -Status AddSample (const MediaStream *stream, scoped_refptr< MediaSample > sample) -  +Status AddSample (const MediaStream *stream, std::shared_ptr< MediaSample > sample) +  uint32_t GetReferenceTimeScale () const   @@ -259,7 +259,7 @@ void set_progress_target diff --git a/docs/d8/db9/classshaka_1_1media_1_1WebMContentEncodingsClient-members.html b/docs/d8/db9/classshaka_1_1media_1_1WebMContentEncodingsClient-members.html index 59b537aa16..cab86fbaca 100644 --- a/docs/d8/db9/classshaka_1_1media_1_1WebMContentEncodingsClient-members.html +++ b/docs/d8/db9/classshaka_1_1media_1_1WebMContentEncodingsClient-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/dc2/structshaka_1_1media_1_1mp2t_1_1EsParserH26x_1_1VideoSliceInfo.html b/docs/d8/dc2/structshaka_1_1media_1_1mp2t_1_1EsParserH26x_1_1VideoSliceInfo.html index 14546f1806..680d78e592 100644 --- a/docs/d8/dc2/structshaka_1_1media_1_1mp2t_1_1EsParserH26x_1_1VideoSliceInfo.html +++ b/docs/d8/dc2/structshaka_1_1media_1_1mp2t_1_1EsParserH26x_1_1VideoSliceInfo.html @@ -118,7 +118,7 @@ int frame_num = 0 diff --git a/docs/d8/dc3/structshaka_1_1media_1_1mp4_1_1CueTimeBox.html b/docs/d8/dc3/structshaka_1_1media_1_1mp4_1_1CueTimeBox.html index dc0f70d10b..3ffa20fc47 100644 --- a/docs/d8/dc3/structshaka_1_1media_1_1mp4_1_1CueTimeBox.html +++ b/docs/d8/dc3/structshaka_1_1media_1_1mp4_1_1CueTimeBox.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d8/dca/ts__writer_8h_source.html b/docs/d8/dca/ts__writer_8h_source.html index fe3c40e0f3..2082a89a76 100644 --- a/docs/d8/dca/ts__writer_8h_source.html +++ b/docs/d8/dca/ts__writer_8h_source.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    79 } // namespace shaka
    80 
    81 #endif // PACKAGER_MEDIA_FORMATS_MP2T_TS_WRITER_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    virtual bool NewSegment(const std::string &file_name)
    Definition: ts_writer.cc:198
    virtual bool AddPesPacket(std::unique_ptr< PesPacket > pes_packet)
    Definition: ts_writer.cc:237
    @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/dcd/structshaka_1_1media_1_1mp4_1_1DecodingTime-members.html b/docs/d8/dcd/structshaka_1_1media_1_1mp4_1_1DecodingTime-members.html index c234472b3f..b991bdb9ca 100644 --- a/docs/d8/dcd/structshaka_1_1media_1_1mp4_1_1DecodingTime-members.html +++ b/docs/d8/dcd/structshaka_1_1media_1_1mp4_1_1DecodingTime-members.html @@ -98,7 +98,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/dcd/structshaka_1_1media_1_1mp4_1_1TrackExtends-members.html b/docs/d8/dcd/structshaka_1_1media_1_1mp4_1_1TrackExtends-members.html index 47f59ff985..c390e2b7be 100644 --- a/docs/d8/dcd/structshaka_1_1media_1_1mp4_1_1TrackExtends-members.html +++ b/docs/d8/dcd/structshaka_1_1media_1_1mp4_1_1TrackExtends-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/dd6/classshaka_1_1media_1_1mp2t_1_1ContinuityCounter.html b/docs/d8/dd6/classshaka_1_1media_1_1mp2t_1_1ContinuityCounter.html index 3fd86d4d13..c010400d68 100644 --- a/docs/d8/dd6/classshaka_1_1media_1_1mp2t_1_1ContinuityCounter.html +++ b/docs/d8/dd6/classshaka_1_1media_1_1mp2t_1_1ContinuityCounter.html @@ -129,7 +129,7 @@ Public Member Functions diff --git a/docs/d8/dd6/structshaka_1_1media_1_1mp4_1_1CencSampleEncryptionInfoEntry.html b/docs/d8/dd6/structshaka_1_1media_1_1mp4_1_1CencSampleEncryptionInfoEntry.html index 993ad6e47b..eaf91ba85c 100644 --- a/docs/d8/dd6/structshaka_1_1media_1_1mp4_1_1CencSampleEncryptionInfoEntry.html +++ b/docs/d8/dd6/structshaka_1_1media_1_1mp4_1_1CencSampleEncryptionInfoEntry.html @@ -135,7 +135,7 @@ std::vector< uint8_t >  diff --git a/docs/d8/de1/classshaka_1_1SimpleMpdNotifier.html b/docs/d8/de1/classshaka_1_1SimpleMpdNotifier.html index 482f9a1433..cfbdcc25d8 100644 --- a/docs/d8/de1/classshaka_1_1SimpleMpdNotifier.html +++ b/docs/d8/de1/classshaka_1_1SimpleMpdNotifier.html @@ -473,7 +473,7 @@ class SimpleMpdNotifierTes diff --git a/docs/d8/de6/webm__crypto__helpers_8h_source.html b/docs/d8/de6/webm__crypto__helpers_8h_source.html index 881855d4dd..87bf38d03a 100644 --- a/docs/d8/de6/webm__crypto__helpers_8h_source.html +++ b/docs/d8/de6/webm__crypto__helpers_8h_source.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/deb/classshaka_1_1media_1_1mp2t_1_1EsParser-members.html b/docs/d8/deb/classshaka_1_1media_1_1mp2t_1_1EsParser-members.html index 0748406770..b4a4e9161a 100644 --- a/docs/d8/deb/classshaka_1_1media_1_1mp2t_1_1EsParser-members.html +++ b/docs/d8/deb/classshaka_1_1media_1_1mp2t_1_1EsParser-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/deb/retired__flags_8cc_source.html b/docs/d8/deb/retired__flags_8cc_source.html index 1657b52620..3d94e26b27 100644 --- a/docs/d8/deb/retired__flags_8cc_source.html +++ b/docs/d8/deb/retired__flags_8cc_source.html @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/dee/classshaka_1_1media_1_1AudioTimestampHelper-members.html b/docs/d8/dee/classshaka_1_1media_1_1AudioTimestampHelper-members.html index 1a17e08e82..2d4f2ac620 100644 --- a/docs/d8/dee/classshaka_1_1media_1_1AudioTimestampHelper-members.html +++ b/docs/d8/dee/classshaka_1_1media_1_1AudioTimestampHelper-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/dee/classshaka_1_1media_1_1VPxParser-members.html b/docs/d8/dee/classshaka_1_1media_1_1VPxParser-members.html index eded3f7c95..16f02191ae 100644 --- a/docs/d8/dee/classshaka_1_1media_1_1VPxParser-members.html +++ b/docs/d8/dee/classshaka_1_1media_1_1VPxParser-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/df0/webm_2single__segment__segmenter_8cc_source.html b/docs/d8/df0/webm_2single__segment__segmenter_8cc_source.html index abc220d1f3..b6402188f0 100644 --- a/docs/d8/df0/webm_2single__segment__segmenter_8cc_source.html +++ b/docs/d8/df0/webm_2single__segment__segmenter_8cc_source.html @@ -181,7 +181,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/df7/classshaka_1_1media_1_1SegmentTestBase-members.html b/docs/d8/df7/classshaka_1_1media_1_1SegmentTestBase-members.html index 75ff5bb188..b87f90c2cd 100644 --- a/docs/d8/df7/classshaka_1_1media_1_1SegmentTestBase-members.html +++ b/docs/d8/df7/classshaka_1_1media_1_1SegmentTestBase-members.html @@ -95,7 +95,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    CreateAndInitializeSegmenter(const MuxerOptions &options, StreamInfo *info, KeySource *key_source, std::unique_ptr< webm::Segmenter > *result) const shaka::media::SegmentTestBaseinlineprotected
    CreateMuxerOptions() const shaka::media::SegmentTestBaseprotected
    CreateSample(KeyFrameFlag key_frame_flag, uint64_t duration, SideDataFlag side_data_flag)shaka::media::SegmentTestBaseprotected
    CreateSample(KeyFrameFlag key_frame_flag, uint64_t duration, SideDataFlag side_data_flag)shaka::media::SegmentTestBaseprotected
    CreateVideoStreamInfo() const shaka::media::SegmentTestBaseprotected
    cur_time_timescale_ (defined in shaka::media::SegmentTestBase)shaka::media::SegmentTestBaseprotected
    KeyFrameFlag enum name (defined in shaka::media::SegmentTestBase)shaka::media::SegmentTestBase
    diff --git a/docs/d8/dfa/nal__unit__to__byte__stream__converter_8h_source.html b/docs/d8/dfa/nal__unit__to__byte__stream__converter_8h_source.html index 47f08892d2..f115581563 100644 --- a/docs/d8/dfa/nal__unit__to__byte__stream__converter_8h_source.html +++ b/docs/d8/dfa/nal__unit__to__byte__stream__converter_8h_source.html @@ -100,63 +100,62 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    11 #include <vector>
    12 
    13 #include "packager/base/macros.h"
    -
    14 #include "packager/base/memory/ref_counted.h"
    -
    15 #include "packager/media/base/decrypt_config.h"
    -
    16 
    -
    17 namespace shaka {
    -
    18 namespace media {
    -
    19 
    -
    20 class BufferWriter;
    -
    21 class VideoStreamInfo;
    -
    22 
    -
    30 void EscapeNalByteSequence(const uint8_t* input,
    -
    31  size_t input_size,
    -
    32  BufferWriter* output);
    -
    33 
    -
    34 // Methods are virtual for mocking.
    - -
    36  public:
    - - -
    39 
    -
    48  virtual bool Initialize(const uint8_t* decoder_configuration_data,
    -
    49  size_t decoder_configuration_data_size,
    -
    50  bool escape_data);
    -
    51 
    -
    59  virtual bool ConvertUnitToByteStream(const uint8_t* sample,
    -
    60  size_t sample_size,
    -
    61  bool is_key_frame,
    -
    62  std::vector<uint8_t>* output);
    -
    63 
    - -
    75  const uint8_t* sample,
    -
    76  size_t sample_size,
    -
    77  bool is_key_frame,
    -
    78  std::vector<uint8_t>* output,
    -
    79  std::vector<SubsampleEntry>* subsamples);
    -
    80 
    -
    81  private:
    -
    82  friend class NalUnitToByteStreamConverterTest;
    -
    83 
    -
    84  int nalu_length_size_;
    -
    85  std::vector<uint8_t> decoder_configuration_in_byte_stream_;
    -
    86  bool escape_data_;
    -
    87 
    -
    88  DISALLOW_COPY_AND_ASSIGN(NalUnitToByteStreamConverter);
    -
    89 };
    -
    90 
    -
    91 } // namespace media
    -
    92 } // namespace shaka
    -
    93 
    -
    94 #endif // PACKAGER_MEDIA_CODECS_NAL_UNIT_TO_BYTE_STREAM_CONVERTER_H_
    +
    14 #include "packager/media/base/decrypt_config.h"
    +
    15 
    +
    16 namespace shaka {
    +
    17 namespace media {
    +
    18 
    +
    19 class BufferWriter;
    +
    20 class VideoStreamInfo;
    +
    21 
    +
    29 void EscapeNalByteSequence(const uint8_t* input,
    +
    30  size_t input_size,
    +
    31  BufferWriter* output);
    +
    32 
    +
    33 // Methods are virtual for mocking.
    + +
    35  public:
    + + +
    38 
    +
    47  virtual bool Initialize(const uint8_t* decoder_configuration_data,
    +
    48  size_t decoder_configuration_data_size,
    +
    49  bool escape_data);
    +
    50 
    +
    58  virtual bool ConvertUnitToByteStream(const uint8_t* sample,
    +
    59  size_t sample_size,
    +
    60  bool is_key_frame,
    +
    61  std::vector<uint8_t>* output);
    +
    62 
    + +
    74  const uint8_t* sample,
    +
    75  size_t sample_size,
    +
    76  bool is_key_frame,
    +
    77  std::vector<uint8_t>* output,
    +
    78  std::vector<SubsampleEntry>* subsamples);
    +
    79 
    +
    80  private:
    +
    81  friend class NalUnitToByteStreamConverterTest;
    +
    82 
    +
    83  int nalu_length_size_;
    +
    84  std::vector<uint8_t> decoder_configuration_in_byte_stream_;
    +
    85  bool escape_data_;
    +
    86 
    +
    87  DISALLOW_COPY_AND_ASSIGN(NalUnitToByteStreamConverter);
    +
    88 };
    +
    89 
    +
    90 } // namespace media
    +
    91 } // namespace shaka
    +
    92 
    +
    93 #endif // PACKAGER_MEDIA_CODECS_NAL_UNIT_TO_BYTE_STREAM_CONVERTER_H_
    virtual bool ConvertUnitToByteStreamWithSubsamples(const uint8_t *sample, size_t sample_size, bool is_key_frame, std::vector< uint8_t > *output, std::vector< SubsampleEntry > *subsamples)
    virtual bool ConvertUnitToByteStream(const uint8_t *sample, size_t sample_size, bool is_key_frame, std::vector< uint8_t > *output)
    virtual bool Initialize(const uint8_t *decoder_configuration_data, size_t decoder_configuration_data_size, bool escape_data)
    - + diff --git a/docs/d9/d00/structshaka_1_1media_1_1OnMediaEndParameters-members.html b/docs/d9/d00/structshaka_1_1media_1_1OnMediaEndParameters-members.html index abce58a232..374e500dfd 100644 --- a/docs/d9/d00/structshaka_1_1media_1_1OnMediaEndParameters-members.html +++ b/docs/d9/d00/structshaka_1_1media_1_1OnMediaEndParameters-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d01/mp4_2single__segment__segmenter_8h_source.html b/docs/d9/d01/mp4_2single__segment__segmenter_8h_source.html index 83dfc7e0e4..c603f7c3a4 100644 --- a/docs/d9/d01/mp4_2single__segment__segmenter_8h_source.html +++ b/docs/d9/d01/mp4_2single__segment__segmenter_8h_source.html @@ -133,14 +133,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    58 #endif // MEDIA_FORMATS_MP4_SINGLE_SEGMENT_SEGMENTER_H_
    bool GetIndexRange(size_t *offset, size_t *size) override
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    - +
    bool GetInitRange(size_t *offset, size_t *size) override
    diff --git a/docs/d9/d08/mock__mpd__builder_8h_source.html b/docs/d9/d08/mock__mpd__builder_8h_source.html index 8e712a1e3b..b114ad7ba4 100644 --- a/docs/d9/d08/mock__mpd__builder_8h_source.html +++ b/docs/d9/d08/mock__mpd__builder_8h_source.html @@ -172,7 +172,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d0b/classshaka_1_1media_1_1HlsNotifyMuxerListener-members.html b/docs/d9/d0b/classshaka_1_1media_1_1HlsNotifyMuxerListener-members.html index eba048f0d4..6f32895909 100644 --- a/docs/d9/d0b/classshaka_1_1media_1_1HlsNotifyMuxerListener-members.html +++ b/docs/d9/d0b/classshaka_1_1media_1_1HlsNotifyMuxerListener-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d0c/classshaka_1_1media_1_1RsaPublicKey.html b/docs/d9/d0c/classshaka_1_1media_1_1RsaPublicKey.html index ebc65e39b9..16baa7b838 100644 --- a/docs/d9/d0c/classshaka_1_1media_1_1RsaPublicKey.html +++ b/docs/d9/d0c/classshaka_1_1media_1_1RsaPublicKey.html @@ -218,7 +218,7 @@ Static Public Member Functions diff --git a/docs/d9/d13/classshaka_1_1media_1_1BufferReader.html b/docs/d9/d13/classshaka_1_1media_1_1BufferReader.html index 386db11db7..8f270f9116 100644 --- a/docs/d9/d13/classshaka_1_1media_1_1BufferReader.html +++ b/docs/d9/d13/classshaka_1_1media_1_1BufferReader.html @@ -276,7 +276,7 @@ bool ReadNBytesInto8s diff --git a/docs/d9/d15/key__rotation__fragmenter_8cc_source.html b/docs/d9/d15/key__rotation__fragmenter_8cc_source.html index 78cae71eab..a005ae69c7 100644 --- a/docs/d9/d15/key__rotation__fragmenter_8cc_source.html +++ b/docs/d9/d15/key__rotation__fragmenter_8cc_source.html @@ -106,8 +106,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    17 const bool kInitialEncryptionInfo = true;
    18 } // namespace
    19 
    - -
    21  scoped_refptr<StreamInfo> info,
    + +
    21  std::shared_ptr<StreamInfo> info,
    22  TrackFragment* traf,
    23  KeySource* encryption_key_source,
    24  KeySource::TrackType track_type,
    @@ -226,14 +226,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    137 } // namespace media
    138 } // namespace shaka
    virtual void OnEncryptionInfoReady(bool is_initial_encryption_info, FourCC protection_scheme, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv, const std::vector< ProtectionSystemSpecificInfo > &key_system_info)=0
    -
    KeyRotationFragmenter(MovieFragment *moof, scoped_refptr< StreamInfo > info, TrackFragment *traf, KeySource *encryption_key_source, KeySource::TrackType track_type, int64_t crypto_period_duration, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *muxer_listener)
    virtual Status GetCryptoPeriodKey(uint32_t crypto_period_index, TrackType track_type, EncryptionKey *key)=0
    +
    KeyRotationFragmenter(MovieFragment *moof, std::shared_ptr< StreamInfo > info, TrackFragment *traf, KeySource *encryption_key_source, KeySource::TrackType track_type, int64_t crypto_period_duration, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *muxer_listener)
    const std::vector< uint8_t > & iv() const
    Definition: aes_cryptor.h:81
    static bool GenerateRandomIv(FourCC protection_scheme, std::vector< uint8_t > *iv)
    Definition: aes_cryptor.cc:107
    -
    EncryptingFragmenter generates MP4 fragments with sample encrypted.
    +
    EncryptingFragmenter generates MP4 fragments with sample encrypted.
    @@ -244,7 +244,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d1f/structshaka_1_1media_1_1mp4_1_1MovieFragment.html b/docs/d9/d1f/structshaka_1_1media_1_1mp4_1_1MovieFragment.html index b8723a3041..0a496d6060 100644 --- a/docs/d9/d1f/structshaka_1_1media_1_1mp4_1_1MovieFragment.html +++ b/docs/d9/d1f/structshaka_1_1media_1_1mp4_1_1MovieFragment.html @@ -180,7 +180,7 @@ Additional Inherited Members diff --git a/docs/d9/d26/classshaka_1_1media_1_1AesEncryptor-members.html b/docs/d9/d26/classshaka_1_1media_1_1AesEncryptor-members.html index b869a9696e..212b159749 100644 --- a/docs/d9/d26/classshaka_1_1media_1_1AesEncryptor-members.html +++ b/docs/d9/d26/classshaka_1_1media_1_1AesEncryptor-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html b/docs/d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html index 1f5b4ad47b..75b0995da6 100644 --- a/docs/d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html +++ b/docs/d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html @@ -116,8 +116,8 @@ Public Member Functions   Status Finalize ()   -Status AddSample (const MediaStream *stream, scoped_refptr< MediaSample > sample) -  +Status AddSample (const MediaStream *stream, std::shared_ptr< MediaSample > sample) +  virtual bool GetInitRange (size_t *offset, size_t *size)=0   virtual bool GetIndexRange (size_t *offset, size_t *size)=0 @@ -168,9 +168,9 @@ void set_progress_target

    Detailed Description

    This class defines the Segmenter which is responsible for organizing fragments into segments/subsegments and package them into a MP4 file. Inherited by MultiSegmentSegmenter and SingleSegmentSegmenter. SingleSegmentSegmenter defines the Segmenter for DASH Video-On-Demand with a single segment for each media presentation while MultiSegmentSegmenter handles all other cases including DASH live profile.

    -

    Definition at line 41 of file segmenter.h.

    +

    Definition at line 40 of file segmenter.h.

    Member Function Documentation

    - +
    @@ -183,7 +183,7 @@ void  - + @@ -433,7 +433,7 @@ void 
    set_progress_target scoped_refptr< MediaSamplestd::shared_ptr< MediaSample sample 
    set_progress_target
    Returns
    The sample duration in the timescale of the media. Returns 0 if no samples are added yet.
    -

    Definition at line 111 of file segmenter.h.

    +

    Definition at line 110 of file segmenter.h.

    @@ -444,7 +444,7 @@ void 
    set_progress_target diff --git a/docs/d9/d36/classshaka_1_1media_1_1TracksBuilder-members.html b/docs/d9/d36/classshaka_1_1media_1_1TracksBuilder-members.html index 4e0ff219ce..185944c4c7 100644 --- a/docs/d9/d36/classshaka_1_1media_1_1TracksBuilder-members.html +++ b/docs/d9/d36/classshaka_1_1media_1_1TracksBuilder-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/d9/d3a/classshaka_1_1media_1_1File-members.html b/docs/d9/d3a/classshaka_1_1media_1_1File-members.html index 877c7b9c07..119957f374 100644 --- a/docs/d9/d3a/classshaka_1_1media_1_1File-members.html +++ b/docs/d9/d3a/classshaka_1_1media_1_1File-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/d9/d3b/webm__content__encodings_8h_source.html b/docs/d9/d3b/webm__content__encodings_8h_source.html index 731ee23815..ecb933c299 100644 --- a/docs/d9/d3b/webm__content__encodings_8h_source.html +++ b/docs/d9/d3b/webm__content__encodings_8h_source.html @@ -178,7 +178,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d3c/structshaka_1_1media_1_1mp4_1_1VTTEmptyCueBox.html b/docs/d9/d3c/structshaka_1_1media_1_1mp4_1_1VTTEmptyCueBox.html index c67555a61f..4d600da180 100644 --- a/docs/d9/d3c/structshaka_1_1media_1_1mp4_1_1VTTEmptyCueBox.html +++ b/docs/d9/d3c/structshaka_1_1media_1_1mp4_1_1VTTEmptyCueBox.html @@ -166,7 +166,7 @@ Additional Inherited Members diff --git a/docs/d9/d3e/structshaka_1_1media_1_1mp4_1_1CueSourceIDBox.html b/docs/d9/d3e/structshaka_1_1media_1_1mp4_1_1CueSourceIDBox.html index a745fc285f..b70249ce2d 100644 --- a/docs/d9/d3e/structshaka_1_1media_1_1mp4_1_1CueSourceIDBox.html +++ b/docs/d9/d3e/structshaka_1_1media_1_1mp4_1_1CueSourceIDBox.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d9/d57/classshaka_1_1media_1_1mp4_1_1ChunkInfoIterator.html b/docs/d9/d57/classshaka_1_1media_1_1mp4_1_1ChunkInfoIterator.html index 7751cda507..c8a318911a 100644 --- a/docs/d9/d57/classshaka_1_1media_1_1mp4_1_1ChunkInfoIterator.html +++ b/docs/d9/d57/classshaka_1_1media_1_1mp4_1_1ChunkInfoIterator.html @@ -320,7 +320,7 @@ Public Member Functions diff --git a/docs/d9/d66/classshaka_1_1media_1_1mp2t_1_1EsParserAdts-members.html b/docs/d9/d66/classshaka_1_1media_1_1mp2t_1_1EsParserAdts-members.html index 85c6d8926c..a4d50a2634 100644 --- a/docs/d9/d66/classshaka_1_1media_1_1mp2t_1_1EsParserAdts-members.html +++ b/docs/d9/d66/classshaka_1_1media_1_1mp2t_1_1EsParserAdts-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d67/structshaka_1_1media_1_1H265VuiParameters.html b/docs/d9/d67/structshaka_1_1media_1_1H265VuiParameters.html index 3a47c80d5e..9cf89bf817 100644 --- a/docs/d9/d67/structshaka_1_1media_1_1H265VuiParameters.html +++ b/docs/d9/d67/structshaka_1_1media_1_1H265VuiParameters.html @@ -131,7 +131,7 @@ int min_spatial_segmentati diff --git a/docs/d9/d6a/structshaka_1_1media_1_1H264SliceHeader-members.html b/docs/d9/d6a/structshaka_1_1media_1_1H264SliceHeader-members.html index 8b2fe15bbe..1d125cdbb1 100644 --- a/docs/d9/d6a/structshaka_1_1media_1_1H264SliceHeader-members.html +++ b/docs/d9/d6a/structshaka_1_1media_1_1H264SliceHeader-members.html @@ -154,7 +154,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d76/ts__muxer_8cc_source.html b/docs/d9/d76/ts__muxer_8cc_source.html index 64386a9e86..4ab09acc35 100644 --- a/docs/d9/d76/ts__muxer_8cc_source.html +++ b/docs/d9/d76/ts__muxer_8cc_source.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    36 }
    37 
    38 Status TsMuxer::DoAddSample(const MediaStream* stream,
    -
    39  scoped_refptr<MediaSample> sample) {
    +
    39  std::shared_ptr<MediaSample> sample) {
    40  return segmenter_->AddSample(sample);
    41 }
    42 
    @@ -156,7 +156,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d81/classshaka_1_1media_1_1ClosureThread-members.html b/docs/d9/d81/classshaka_1_1media_1_1ClosureThread-members.html index 7648719d71..3ed89f6461 100644 --- a/docs/d9/d81/classshaka_1_1media_1_1ClosureThread-members.html +++ b/docs/d9/d81/classshaka_1_1media_1_1ClosureThread-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d86/limits_8h_source.html b/docs/d9/d86/limits_8h_source.html index 9eda8359fc..aa4705aff3 100644 --- a/docs/d9/d86/limits_8h_source.html +++ b/docs/d9/d86/limits_8h_source.html @@ -141,7 +141,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d87/classshaka_1_1media_1_1WebMContentEncodingsClient.html b/docs/d9/d87/classshaka_1_1media_1_1WebMContentEncodingsClient.html index 8921790213..23902f7347 100644 --- a/docs/d9/d87/classshaka_1_1media_1_1WebMContentEncodingsClient.html +++ b/docs/d9/d87/classshaka_1_1media_1_1WebMContentEncodingsClient.html @@ -152,7 +152,7 @@ Additional Inherited Members diff --git a/docs/d9/d8c/classshaka_1_1media_1_1AesRequestSigner.html b/docs/d9/d8c/classshaka_1_1media_1_1AesRequestSigner.html index c55845907b..f7a90d21ab 100644 --- a/docs/d9/d8c/classshaka_1_1media_1_1AesRequestSigner.html +++ b/docs/d9/d8c/classshaka_1_1media_1_1AesRequestSigner.html @@ -188,7 +188,7 @@ Additional Inherited Members diff --git a/docs/d9/d90/classshaka_1_1media_1_1ProtectionSystemSpecificInfo-members.html b/docs/d9/d90/classshaka_1_1media_1_1ProtectionSystemSpecificInfo-members.html index e04aa8c9d9..3893a53ebb 100644 --- a/docs/d9/d90/classshaka_1_1media_1_1ProtectionSystemSpecificInfo-members.html +++ b/docs/d9/d90/classshaka_1_1media_1_1ProtectionSystemSpecificInfo-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d90/text__track_8h_source.html b/docs/d9/d90/text__track_8h_source.html index fa505f7ed5..a54fbe0563 100644 --- a/docs/d9/d90/text__track_8h_source.html +++ b/docs/d9/d90/text__track_8h_source.html @@ -134,7 +134,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d93/media__stream_8h_source.html b/docs/d9/d93/media__stream_8h_source.html index 8eb17dc3cc..ed90b25242 100644 --- a/docs/d9/d93/media__stream_8h_source.html +++ b/docs/d9/d93/media__stream_8h_source.html @@ -99,78 +99,78 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    10 #include <deque>
    11 #include <memory>
    12 
    -
    13 #include "packager/base/memory/ref_counted.h"
    -
    14 #include "packager/media/base/status.h"
    -
    15 
    -
    16 namespace shaka {
    -
    17 namespace media {
    -
    18 
    -
    19 class Demuxer;
    -
    20 class Muxer;
    -
    21 class MediaSample;
    -
    22 class StreamInfo;
    -
    23 
    -
    26 class MediaStream {
    -
    27  public:
    -
    28  enum MediaStreamOperation {
    -
    29  kPush,
    -
    30  kPull,
    -
    31  };
    -
    34  MediaStream(scoped_refptr<StreamInfo> info, Demuxer* demuxer);
    -
    35  ~MediaStream();
    -
    36 
    -
    39  void Connect(Muxer* muxer);
    -
    40 
    -
    42  Status Start(MediaStreamOperation operation);
    -
    43 
    -
    45  Status PushSample(const scoped_refptr<MediaSample>& sample);
    -
    46 
    -
    48  Status PullSample(scoped_refptr<MediaSample>* sample);
    -
    49 
    -
    50  Demuxer* demuxer() { return demuxer_; }
    -
    51  Muxer* muxer() { return muxer_; }
    -
    52  const scoped_refptr<StreamInfo> info() const;
    -
    53 
    -
    55  std::string ToString() const;
    -
    56 
    -
    57  private:
    -
    58  // State transition diagram available @ http://goo.gl/ThJQbl.
    -
    59  enum State {
    -
    60  kIdle,
    -
    61  kConnected,
    -
    62  kDisconnected,
    -
    63  kPushing,
    -
    64  kPulling,
    -
    65  };
    -
    66 
    -
    67  scoped_refptr<StreamInfo> info_;
    -
    68  Demuxer* demuxer_;
    -
    69  Muxer* muxer_;
    -
    70  State state_;
    -
    71  // An internal buffer to store samples temporarily.
    -
    72  std::deque<scoped_refptr<MediaSample> > samples_;
    -
    73 
    -
    74  DISALLOW_COPY_AND_ASSIGN(MediaStream);
    +
    13 #include "packager/media/base/status.h"
    +
    14 
    +
    15 namespace shaka {
    +
    16 namespace media {
    +
    17 
    +
    18 class Demuxer;
    +
    19 class Muxer;
    +
    20 class MediaSample;
    +
    21 class StreamInfo;
    +
    22 
    +
    25 class MediaStream {
    +
    26  public:
    +
    27  enum MediaStreamOperation {
    +
    28  kPush,
    +
    29  kPull,
    +
    30  };
    +
    33  MediaStream(std::shared_ptr<StreamInfo> info, Demuxer* demuxer);
    +
    34  ~MediaStream();
    +
    35 
    +
    38  void Connect(Muxer* muxer);
    +
    39 
    +
    41  Status Start(MediaStreamOperation operation);
    +
    42 
    +
    44  Status PushSample(const std::shared_ptr<MediaSample>& sample);
    +
    45 
    +
    47  Status PullSample(std::shared_ptr<MediaSample>* sample);
    +
    48 
    +
    49  Demuxer* demuxer() { return demuxer_; }
    +
    50  Muxer* muxer() { return muxer_; }
    +
    51  const std::shared_ptr<StreamInfo> info() const;
    +
    52 
    +
    54  std::string ToString() const;
    +
    55 
    +
    56  private:
    +
    57  MediaStream(const MediaStream&) = delete;
    +
    58  MediaStream& operator=(const MediaStream&) = delete;
    +
    59 
    +
    60  // State transition diagram available @ http://goo.gl/ThJQbl.
    +
    61  enum State {
    +
    62  kIdle,
    +
    63  kConnected,
    +
    64  kDisconnected,
    +
    65  kPushing,
    +
    66  kPulling,
    +
    67  };
    +
    68 
    +
    69  std::shared_ptr<StreamInfo> info_;
    +
    70  Demuxer* demuxer_;
    +
    71  Muxer* muxer_;
    +
    72  State state_;
    +
    73  // An internal buffer to store samples temporarily.
    +
    74  std::deque<std::shared_ptr<MediaSample>> samples_;
    75 };
    76 
    77 } // namespace media
    78 } // namespace shaka
    79 
    80 #endif // MEDIA_BASE_MEDIA_STREAM_H_
    -
    Status PullSample(scoped_refptr< MediaSample > *sample)
    Pull sample from Demuxer (triggered by Muxer).
    Definition: media_stream.cc:24
    +
    MediaStream(std::shared_ptr< StreamInfo > info, Demuxer *demuxer)
    Definition: media_stream.cc:19
    +
    Status PushSample(const std::shared_ptr< MediaSample > &sample)
    Push sample to Muxer (triggered by Demuxer).
    Definition: media_stream.cc:39
    Status Start(MediaStreamOperation operation)
    Start the stream for pushing or pulling.
    Definition: media_stream.cc:62
    -
    Status PushSample(const scoped_refptr< MediaSample > &sample)
    Push sample to Muxer (triggered by Demuxer).
    Definition: media_stream.cc:39
    -
    MediaStream(scoped_refptr< StreamInfo > info, Demuxer *demuxer)
    Definition: media_stream.cc:19
    - +
    void Connect(Muxer *muxer)
    Definition: media_stream.cc:55
    - +
    Status PullSample(std::shared_ptr< MediaSample > *sample)
    Pull sample from Demuxer (triggered by Muxer).
    Definition: media_stream.cc:24
    + -
    std::string ToString() const
    - +
    std::string ToString() const
    + diff --git a/docs/d9/da4/stream__descriptor_8h_source.html b/docs/d9/da4/stream__descriptor_8h_source.html index 1e3c10a77e..aaa24880dc 100644 --- a/docs/d9/da4/stream__descriptor_8h_source.html +++ b/docs/d9/da4/stream__descriptor_8h_source.html @@ -144,7 +144,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/da5/classshaka_1_1media_1_1MpdNotifyMuxerListener.html b/docs/d9/da5/classshaka_1_1media_1_1MpdNotifyMuxerListener.html index ab21b858b0..6a5b9a3256 100644 --- a/docs/d9/da5/classshaka_1_1media_1_1MpdNotifyMuxerListener.html +++ b/docs/d9/da5/classshaka_1_1media_1_1MpdNotifyMuxerListener.html @@ -513,7 +513,7 @@ Additional Inherited Members diff --git a/docs/d9/da6/structshaka_1_1media_1_1Cue-members.html b/docs/d9/da6/structshaka_1_1media_1_1Cue-members.html index 1770e0f5ad..5a8b6e3312 100644 --- a/docs/d9/da6/structshaka_1_1media_1_1Cue-members.html +++ b/docs/d9/da6/structshaka_1_1media_1_1Cue-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/da7/classshaka_1_1media_1_1mp4_1_1Segmenter-members.html b/docs/d9/da7/classshaka_1_1media_1_1mp4_1_1Segmenter-members.html index f7a92b62ec..15c5e3c151 100644 --- a/docs/d9/da7/classshaka_1_1media_1_1mp4_1_1Segmenter-members.html +++ b/docs/d9/da7/classshaka_1_1media_1_1mp4_1_1Segmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::mp4::Segmenter, including all inherited members.

    - + @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(const MediaStream *stream, scoped_refptr< MediaSample > sample)shaka::media::mp4::Segmenter
    AddSample(const MediaStream *stream, std::shared_ptr< MediaSample > sample)shaka::media::mp4::Segmenter
    Finalize()shaka::media::mp4::Segmenter
    fragment_buffer() (defined in shaka::media::mp4::Segmenter)shaka::media::mp4::Segmenterinlineprotected
    ftyp() (defined in shaka::media::mp4::Segmenter)shaka::media::mp4::Segmenterinlineprotected
    diff --git a/docs/d9/db2/classshaka_1_1media_1_1mp4_1_1CompositionOffsetIterator-members.html b/docs/d9/db2/classshaka_1_1media_1_1mp4_1_1CompositionOffsetIterator-members.html index 03a8ccfab9..147fabb22f 100644 --- a/docs/d9/db2/classshaka_1_1media_1_1mp4_1_1CompositionOffsetIterator-members.html +++ b/docs/d9/db2/classshaka_1_1media_1_1mp4_1_1CompositionOffsetIterator-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/db9/content__protection__element_8cc_source.html b/docs/d9/db9/content__protection__element_8cc_source.html index ba3b328cf2..5ddf6aa59f 100644 --- a/docs/d9/db9/content__protection__element_8cc_source.html +++ b/docs/d9/db9/content__protection__element_8cc_source.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/db9/muxer_8cc_source.html b/docs/d9/db9/muxer_8cc_source.html index 4fa2055a1b..e3c89fa259 100644 --- a/docs/d9/db9/muxer_8cc_source.html +++ b/docs/d9/db9/muxer_8cc_source.html @@ -160,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    71  if (cancelled_)
    72  return Status(error::CANCELLED, "muxer run cancelled");
    73 
    -
    74  scoped_refptr<MediaSample> sample;
    +
    74  std::shared_ptr<MediaSample> sample;
    75  status = streams_[current_stream_id]->PullSample(&sample);
    76  if (!status.ok())
    77  break;
    @@ -190,7 +190,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    101 }
    102 
    103 Status Muxer::AddSample(const MediaStream* stream,
    -
    104  scoped_refptr<MediaSample> sample) {
    +
    104  std::shared_ptr<MediaSample> sample) {
    105  DCHECK(std::find(streams_.begin(), streams_.end(), stream) != streams_.end());
    106 
    107  if (!initialized_) {
    @@ -221,12 +221,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    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)
    Definition: muxer.cc:33
    - +
    void SetMuxerListener(std::unique_ptr< MuxerListener > muxer_listener)
    Definition: muxer.cc:94
    diff --git a/docs/d9/dbd/classshaka_1_1media_1_1MemoryFile.html b/docs/d9/dbd/classshaka_1_1media_1_1MemoryFile.html index b21a597499..70bff4ead0 100644 --- a/docs/d9/dbd/classshaka_1_1media_1_1MemoryFile.html +++ b/docs/d9/dbd/classshaka_1_1media_1_1MemoryFile.html @@ -485,7 +485,7 @@ bool  diff --git a/docs/d9/dc4/classshaka_1_1media_1_1BufferReader-members.html b/docs/d9/dc4/classshaka_1_1media_1_1BufferReader-members.html index 5aefe368a9..c776025779 100644 --- a/docs/d9/dc4/classshaka_1_1media_1_1BufferReader-members.html +++ b/docs/d9/dc4/classshaka_1_1media_1_1BufferReader-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/dc4/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry-members.html b/docs/d9/dc4/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry-members.html index 7461dec680..d1624597cf 100644 --- a/docs/d9/dc4/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry-members.html +++ b/docs/d9/dc4/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/dc8/webm__constants_8cc_source.html b/docs/d9/dc8/webm__constants_8cc_source.html index 68184d8f2a..3b13006f8b 100644 --- a/docs/d9/dc8/webm__constants_8cc_source.html +++ b/docs/d9/dc8/webm__constants_8cc_source.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/dcc/webm__video__client_8h_source.html b/docs/d9/dcc/webm__video__client_8h_source.html index 865076904e..58e1bf972d 100644 --- a/docs/d9/dcc/webm__video__client_8h_source.html +++ b/docs/d9/dcc/webm__video__client_8h_source.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    24 
    26  void Reset();
    27 
    -
    34  scoped_refptr<VideoStreamInfo> GetVideoStreamInfo(
    +
    34  std::shared_ptr<VideoStreamInfo> GetVideoStreamInfo(
    35  int64_t track_num,
    36  const std::string& codec_id,
    37  const std::vector<uint8_t>& codec_private,
    @@ -142,14 +142,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    61 } // namespace shaka
    62 
    63 #endif // MEDIA_FORMATS_WEBM_WEBM_VIDEO_CLIENT_H_
    +
    std::shared_ptr< VideoStreamInfo > GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)
    void Reset()
    Reset this object's state so it can process a new video track element.
    Helper class used to parse a Video element inside a TrackEntry element.
    -
    scoped_refptr< VideoStreamInfo > GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)
    diff --git a/docs/d9/de3/muxer__listener__internal_8cc_source.html b/docs/d9/de3/muxer__listener__internal_8cc_source.html index 9b4b1410cd..8ef4931833 100644 --- a/docs/d9/de3/muxer__listener__internal_8cc_source.html +++ b/docs/d9/de3/muxer__listener__internal_8cc_source.html @@ -347,7 +347,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/de6/classshaka_1_1media_1_1LocalFile.html b/docs/d9/de6/classshaka_1_1media_1_1LocalFile.html index f6ed79791d..244bebe802 100644 --- a/docs/d9/de6/classshaka_1_1media_1_1LocalFile.html +++ b/docs/d9/de6/classshaka_1_1media_1_1LocalFile.html @@ -502,7 +502,7 @@ bool  diff --git a/docs/d9/dea/classshaka_1_1media_1_1FixedKeySource-members.html b/docs/d9/dea/classshaka_1_1media_1_1FixedKeySource-members.html index 9be00acbe2..5e0ec3fb9d 100644 --- a/docs/d9/dea/classshaka_1_1media_1_1FixedKeySource-members.html +++ b/docs/d9/dea/classshaka_1_1media_1_1FixedKeySource-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/ded/aac__audio__specific__config_8cc_source.html b/docs/d9/ded/aac__audio__specific__config_8cc_source.html index 11f9886229..9906da7950 100644 --- a/docs/d9/ded/aac__audio__specific__config_8cc_source.html +++ b/docs/d9/ded/aac__audio__specific__config_8cc_source.html @@ -358,7 +358,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/df8/structshaka_1_1media_1_1mp4_1_1TrackFragmentDecodeTime-members.html b/docs/d9/df8/structshaka_1_1media_1_1mp4_1_1TrackFragmentDecodeTime-members.html index ddd98610eb..48f9049546 100644 --- a/docs/d9/df8/structshaka_1_1media_1_1mp4_1_1TrackFragmentDecodeTime-members.html +++ b/docs/d9/df8/structshaka_1_1media_1_1mp4_1_1TrackFragmentDecodeTime-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/df9/classshaka_1_1media_1_1OffsetByteQueue.html b/docs/d9/df9/classshaka_1_1media_1_1OffsetByteQueue.html index c64435a4ab..2dd8aa97a8 100644 --- a/docs/d9/df9/classshaka_1_1media_1_1OffsetByteQueue.html +++ b/docs/d9/df9/classshaka_1_1media_1_1OffsetByteQueue.html @@ -242,7 +242,7 @@ false if max_offset > diff --git a/docs/d9/dff/structshaka_1_1media_1_1H264ModificationOfPicNum.html b/docs/d9/dff/structshaka_1_1media_1_1H264ModificationOfPicNum.html index c66f61b61e..5f6807a2bd 100644 --- a/docs/d9/dff/structshaka_1_1media_1_1H264ModificationOfPicNum.html +++ b/docs/d9/dff/structshaka_1_1media_1_1H264ModificationOfPicNum.html @@ -119,7 +119,7 @@ union { diff --git a/docs/da/d04/audio__stream__info_8cc_source.html b/docs/da/d04/audio__stream__info_8cc_source.html index 439c43d1b4..ca9b88e73c 100644 --- a/docs/da/d04/audio__stream__info_8cc_source.html +++ b/docs/da/d04/audio__stream__info_8cc_source.html @@ -214,7 +214,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    125 
    126 } // namespace media
    127 } // namespace shaka
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    std::string ToString() const override
    bool IsValidConfig() const override
    static std::string GetCodecString(Codec codec, uint8_t audio_object_type)
    @@ -223,7 +223,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d10/classshaka_1_1media_1_1mp2t_1_1EsParser.html b/docs/da/d10/classshaka_1_1media_1_1mp2t_1_1EsParser.html index 99518fe89b..e37a9cebd9 100644 --- a/docs/da/d10/classshaka_1_1media_1_1mp2t_1_1EsParser.html +++ b/docs/da/d10/classshaka_1_1media_1_1mp2t_1_1EsParser.html @@ -109,15 +109,15 @@ Inheritance diagram for shaka::media::mp2t::EsParser: - - - + + - +

    Public Types

    +
    typedef base::Callback< void(const
    -scoped_refptr< StreamInfo > &)> 
    NewStreamInfoCB
     
    +std::shared_ptr< StreamInfo > &)> NewStreamInfoCB
     
    typedef base::Callback< void(uint32_t,
    -const scoped_refptr
    +const std::shared_ptr
    < MediaSample > &)> 
    EmitSampleCB
     
     
    @@ -139,14 +139,14 @@ uint32_t 

    Detailed Description

    -

    Definition at line 21 of file es_parser.h.

    +

    Definition at line 20 of file es_parser.h.


    The documentation for this class was generated from the following file: diff --git a/docs/da/d1a/structshaka_1_1media_1_1mp4_1_1Language.html b/docs/da/d1a/structshaka_1_1media_1_1mp4_1_1Language.html index 9afd6e4e2c..9b9f4df61e 100644 --- a/docs/da/d1a/structshaka_1_1media_1_1mp4_1_1Language.html +++ b/docs/da/d1a/structshaka_1_1media_1_1mp4_1_1Language.html @@ -120,7 +120,7 @@ std::string < diff --git a/docs/da/d1c/classshaka_1_1media_1_1mp2t_1_1TsSection.html b/docs/da/d1c/classshaka_1_1media_1_1mp2t_1_1TsSection.html index a248006447..283d404831 100644 --- a/docs/da/d1c/classshaka_1_1media_1_1mp2t_1_1TsSection.html +++ b/docs/da/d1c/classshaka_1_1media_1_1mp2t_1_1TsSection.html @@ -141,7 +141,7 @@ virtual void  - - - + + - +

    Public Member Functions

    pid () code Reset ()= diff --git a/docs/da/d1d/udp__options_8cc_source.html b/docs/da/d1d/udp__options_8cc_source.html index 9bed1cf216..23b19e1146 100644 --- a/docs/da/d1d/udp__options_8cc_source.html +++ b/docs/da/d1d/udp__options_8cc_source.html @@ -224,7 +224,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d22/key__rotation__fragmenter_8h_source.html b/docs/da/d22/key__rotation__fragmenter_8h_source.html index 3a3021607f..12cf3b2c0d 100644 --- a/docs/da/d22/key__rotation__fragmenter_8h_source.html +++ b/docs/da/d22/key__rotation__fragmenter_8h_source.html @@ -109,8 +109,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    20 
    24  public:
    - -
    45  scoped_refptr<StreamInfo> info,
    + +
    45  std::shared_ptr<StreamInfo> info,
    46  TrackFragment* traf,
    47  KeySource* encryption_key_source,
    48  KeySource::TrackType track_type,
    @@ -144,10 +144,10 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    79 } // namespace shaka
    80 
    81 #endif // MEDIA_FORMATS_MP4_KEY_ROTATION_FRAGMENTER_H_
    -
    KeyRotationFragmenter(MovieFragment *moof, scoped_refptr< StreamInfo > info, TrackFragment *traf, KeySource *encryption_key_source, KeySource::TrackType track_type, int64_t crypto_period_duration, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *muxer_listener)
    +
    KeyRotationFragmenter(MovieFragment *moof, std::shared_ptr< StreamInfo > info, TrackFragment *traf, KeySource *encryption_key_source, KeySource::TrackType track_type, int64_t crypto_period_duration, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *muxer_listener)
    -
    EncryptingFragmenter generates MP4 fragments with sample encrypted.
    +
    EncryptingFragmenter generates MP4 fragments with sample encrypted.
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    @@ -156,7 +156,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d23/classshaka_1_1media_1_1mp2t_1_1EsParserH26x.html b/docs/da/d23/classshaka_1_1media_1_1mp2t_1_1EsParserH26x.html index a57d9fc04b..774d1f05f4 100644 --- a/docs/da/d23/classshaka_1_1media_1_1mp2t_1_1EsParserH26x.html +++ b/docs/da/d23/classshaka_1_1media_1_1mp2t_1_1EsParserH26x.html @@ -144,15 +144,15 @@ const

    Additional Inherited Members

    - Public Types inherited from shaka::media::mp2t::EsParser
    +
    typedef base::Callback< void(const
    -scoped_refptr< StreamInfo > &)> 
    NewStreamInfoCB
     
    +std::shared_ptr< StreamInfo > &)> NewStreamInfoCB
     
    typedef base::Callback< void(uint32_t,
    -const scoped_refptr
    +const std::shared_ptr
    < MediaSample > &)> 
    EmitSampleCB
     
     

    Detailed Description

    @@ -164,7 +164,7 @@ const scoped_refptr
    diff --git a/docs/da/d23/ts__muxer_8h_source.html b/docs/da/d23/ts__muxer_8h_source.html index b83c1a1402..494f216f35 100644 --- a/docs/da/d23/ts__muxer_8h_source.html +++ b/docs/da/d23/ts__muxer_8h_source.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    27  Status Initialize() override;
    28  Status Finalize() override;
    29  Status DoAddSample(const MediaStream* stream,
    -
    30  scoped_refptr<MediaSample> sample) override;
    +
    30  std::shared_ptr<MediaSample> sample) override;
    31 
    32  void FireOnMediaStartEvent();
    33  void FireOnMediaEndEvent();
    @@ -130,14 +130,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    43 
    44 #endif // PACKAGER_MEDIA_FORMATS_MP2T_TS_MUXER_H_
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    - + - + diff --git a/docs/da/d24/h265__parser_8h_source.html b/docs/da/d24/h265__parser_8h_source.html index 3050ec6e02..06a9a856ec 100644 --- a/docs/da/d24/h265__parser_8h_source.html +++ b/docs/da/d24/h265__parser_8h_source.html @@ -454,7 +454,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d2a/text__stream__info_8h_source.html b/docs/da/d2a/text__stream__info_8h_source.html index 06b5663984..7e3d4bd789 100644 --- a/docs/da/d2a/text__stream__info_8h_source.html +++ b/docs/da/d2a/text__stream__info_8h_source.html @@ -110,33 +110,32 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    32  const std::string& codec_config, uint16_t width,
    33  uint16_t height, const std::string& language);
    34 
    -
    35  bool IsValidConfig() const override;
    +
    35  ~TextStreamInfo() override;
    36 
    -
    37  uint16_t width() const { return width_; }
    -
    38  uint16_t height() const { return height_; }
    -
    39 
    -
    40  protected:
    -
    41  ~TextStreamInfo() override;
    -
    42 
    -
    43  private:
    -
    44  uint16_t width_;
    -
    45  uint16_t height_;
    -
    46 
    -
    47  // Allow copying. This is very light weight.
    -
    48 };
    -
    49 
    -
    50 } // namespace media
    -
    51 } // namespace shaka
    -
    52 
    -
    53 #endif // PACKAGER_MEDIA_BASE_TEXT_STREAM_INFO_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    37  bool IsValidConfig() const override;
    +
    38 
    +
    39  uint16_t width() const { return width_; }
    +
    40  uint16_t height() const { return height_; }
    +
    41 
    +
    42  private:
    +
    43  uint16_t width_;
    +
    44  uint16_t height_;
    +
    45 
    +
    46  // Allow copying. This is very light weight.
    +
    47 };
    +
    48 
    +
    49 } // namespace media
    +
    50 } // namespace shaka
    +
    51 
    +
    52 #endif // PACKAGER_MEDIA_BASE_TEXT_STREAM_INFO_H_
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    TextStreamInfo(int track_id, uint32_t time_scale, uint64_t duration, const std::string &codec_string, const std::string &codec_config, uint16_t width, uint16_t height, const std::string &language)
    bool IsValidConfig() const override
    diff --git a/docs/da/d2d/classshaka_1_1media_1_1webm_1_1WebMMuxer-members.html b/docs/da/d2d/classshaka_1_1media_1_1webm_1_1WebMMuxer-members.html index 9c06cbf54f..2243a92aba 100644 --- a/docs/da/d2d/classshaka_1_1media_1_1webm_1_1WebMMuxer-members.html +++ b/docs/da/d2d/classshaka_1_1media_1_1webm_1_1WebMMuxer-members.html @@ -119,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d3e/structshaka_1_1media_1_1mp4_1_1PixelAspectRatio-members.html b/docs/da/d3e/structshaka_1_1media_1_1mp4_1_1PixelAspectRatio-members.html index 2538cd428f..e2915cd9d9 100644 --- a/docs/da/d3e/structshaka_1_1media_1_1mp4_1_1PixelAspectRatio-members.html +++ b/docs/da/d3e/structshaka_1_1media_1_1mp4_1_1PixelAspectRatio-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d41/mp4_2multi__segment__segmenter_8h_source.html b/docs/da/d41/mp4_2multi__segment__segmenter_8h_source.html index ba5c72461c..beb59f5e97 100644 --- a/docs/da/d41/mp4_2multi__segment__segmenter_8h_source.html +++ b/docs/da/d41/mp4_2multi__segment__segmenter_8h_source.html @@ -137,13 +137,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    bool GetInitRange(size_t *offset, size_t *size) override
    bool GetIndexRange(size_t *offset, size_t *size) override
    - + diff --git a/docs/da/d43/structshaka_1_1ContentProtectionElement.html b/docs/da/d43/structshaka_1_1ContentProtectionElement.html index 74f770c2dd..c29fee6d60 100644 --- a/docs/da/d43/structshaka_1_1ContentProtectionElement.html +++ b/docs/da/d43/structshaka_1_1ContentProtectionElement.html @@ -123,7 +123,7 @@ std::vector< El diff --git a/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html b/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html index 6e5fa5b55d..37c7391ecd 100644 --- a/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html +++ b/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html @@ -105,7 +105,7 @@ Inheritance diagram for shaka::media::AudioStreamInfo:
    -shaka::media::StreamInfo +shaka::media::StreamInfo
    @@ -313,7 +313,7 @@ Static Public Member Functions diff --git a/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.png b/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.png index b7190cc739..cd167e4cdc 100644 Binary files a/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.png and b/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.png differ diff --git a/docs/da/d50/structshaka_1_1media_1_1mp4_1_1MovieExtendsHeader.html b/docs/da/d50/structshaka_1_1media_1_1mp4_1_1MovieExtendsHeader.html index a7dbe5b159..b339a8fcee 100644 --- a/docs/da/d50/structshaka_1_1media_1_1mp4_1_1MovieExtendsHeader.html +++ b/docs/da/d50/structshaka_1_1media_1_1mp4_1_1MovieExtendsHeader.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/da/d53/es__parser__h265_8cc_source.html b/docs/da/d53/es__parser__h265_8cc_source.html index e7c6a87662..e2b06263b4 100644 --- a/docs/da/d53/es__parser__h265_8cc_source.html +++ b/docs/da/d53/es__parser__h265_8cc_source.html @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    39 void EsParserH265::Reset() {
    40  DVLOG(1) << "EsParserH265::Reset";
    41  h265_parser_.reset(new H265Parser());
    -
    42  last_video_decoder_config_ = scoped_refptr<StreamInfo>();
    +
    42  last_video_decoder_config_ = std::shared_ptr<StreamInfo>();
    43  decoder_config_check_pending_ = false;
    44  EsParserH26x::Reset();
    45 }
    @@ -240,26 +240,27 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    151  return false;
    152  }
    153 
    -
    154  last_video_decoder_config_ = scoped_refptr<StreamInfo>(new VideoStreamInfo(
    -
    155  pid(), kMpeg2Timescale, kInfiniteDuration, kCodecHVC1,
    -
    156  decoder_config.GetCodecString(kCodecHVC1), decoder_config_record.data(),
    -
    157  decoder_config_record.size(), coded_width, coded_height, pixel_width,
    -
    158  pixel_height, 0, H26xByteToUnitStreamConverter::kUnitStreamNaluLengthSize,
    -
    159  std::string(), false));
    -
    160 
    -
    161  // Video config notification.
    -
    162  new_stream_info_cb_.Run(last_video_decoder_config_);
    -
    163 
    -
    164  return true;
    -
    165 }
    -
    166 
    -
    167 } // namespace mp2t
    -
    168 } // namespace media
    -
    169 } // namespace shaka
    +
    154  const uint8_t nalu_length_size =
    +
    155  H26xByteToUnitStreamConverter::kUnitStreamNaluLengthSize;
    +
    156  last_video_decoder_config_ = std::make_shared<VideoStreamInfo>(
    +
    157  pid(), kMpeg2Timescale, kInfiniteDuration, kCodecHVC1,
    +
    158  decoder_config.GetCodecString(kCodecHVC1), decoder_config_record.data(),
    +
    159  decoder_config_record.size(), coded_width, coded_height, pixel_width,
    +
    160  pixel_height, 0, nalu_length_size, std::string(), false);
    +
    161 
    +
    162  // Video config notification.
    +
    163  new_stream_info_cb_.Run(last_video_decoder_config_);
    +
    164 
    +
    165  return true;
    +
    166 }
    +
    167 
    +
    168 } // namespace mp2t
    +
    169 } // namespace media
    +
    170 } // namespace shaka
    diff --git a/docs/da/d59/structshaka_1_1media_1_1mp4_1_1CompactSampleSize.html b/docs/da/d59/structshaka_1_1media_1_1mp4_1_1CompactSampleSize.html index cee82e8cb3..69a9a8cd15 100644 --- a/docs/da/d59/structshaka_1_1media_1_1mp4_1_1CompactSampleSize.html +++ b/docs/da/d59/structshaka_1_1media_1_1mp4_1_1CompactSampleSize.html @@ -185,7 +185,7 @@ Additional Inherited Members diff --git a/docs/da/d5c/widevine__key__source_8h_source.html b/docs/da/d5c/widevine__key__source_8h_source.html index 1e375368a8..2030ad7621 100644 --- a/docs/da/d5c/widevine__key__source_8h_source.html +++ b/docs/da/d5c/widevine__key__source_8h_source.html @@ -143,86 +143,85 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    68 
    69  private:
    70  typedef std::map<TrackType, std::unique_ptr<EncryptionKey>> EncryptionKeyMap;
    -
    71  class RefCountedEncryptionKeyMap;
    - - -
    74 
    -
    75  // Internal routine for getting keys.
    -
    76  Status GetKeyInternal(uint32_t crypto_period_index,
    -
    77  TrackType track_type,
    -
    78  EncryptionKey* key);
    -
    79 
    -
    80  // The closure task to fetch keys repeatedly.
    -
    81  void FetchKeysTask();
    -
    82 
    -
    83  // Fetch keys from server.
    -
    84  Status FetchKeysInternal(bool enable_key_rotation,
    -
    85  uint32_t first_crypto_period_index,
    -
    86  bool widevine_classic);
    -
    87 
    -
    88  // Fill |request| with necessary fields for Widevine encryption request.
    -
    89  // |request| should not be NULL.
    -
    90  void FillRequest(bool enable_key_rotation,
    -
    91  uint32_t first_crypto_period_index,
    -
    92  std::string* request);
    -
    93  // Base64 escape and format the request. Optionally sign the request if a
    -
    94  // signer is provided. |message| should not be NULL. Return OK on success.
    -
    95  Status GenerateKeyMessage(const std::string& request, std::string* message);
    -
    96  // Decode |response| from JSON formatted |raw_response|.
    -
    97  // |response| should not be NULL.
    -
    98  bool DecodeResponse(const std::string& raw_response, std::string* response);
    -
    99  // Extract encryption key from |response|, which is expected to be properly
    -
    100  // formatted. |transient_error| will be set to true if it fails and the
    -
    101  // failure is because of a transient error from the server. |transient_error|
    -
    102  // should not be NULL.
    -
    103  bool ExtractEncryptionKey(bool enable_key_rotation,
    -
    104  bool widevine_classic,
    -
    105  const std::string& response,
    -
    106  bool* transient_error);
    -
    107  // Push the keys to the key pool.
    -
    108  bool PushToKeyPool(EncryptionKeyMap* encryption_key_map);
    -
    109 
    -
    110  // The fetcher object used to fetch keys from the license service.
    -
    111  // It is initialized to a default fetcher on class initialization.
    -
    112  // Can be overridden using set_key_fetcher for testing or other purposes.
    -
    113  std::unique_ptr<KeyFetcher> key_fetcher_;
    -
    114  std::string server_url_;
    -
    115  std::unique_ptr<RequestSigner> signer_;
    -
    116  base::DictionaryValue request_dict_;
    -
    117 
    -
    118  const uint32_t crypto_period_count_;
    -
    119  base::Lock lock_;
    -
    120  bool add_common_pssh_;
    -
    121  bool key_production_started_;
    -
    122  base::WaitableEvent start_key_production_;
    -
    123  uint32_t first_crypto_period_index_;
    -
    124  std::unique_ptr<EncryptionKeyQueue> key_pool_;
    -
    125  EncryptionKeyMap encryption_key_map_; // For non key rotation request.
    -
    126  Status common_encryption_request_status_;
    -
    127 
    -
    128  DISALLOW_COPY_AND_ASSIGN(WidevineKeySource);
    -
    129 };
    -
    130 
    -
    131 } // namespace media
    -
    132 } // namespace shaka
    -
    133 
    -
    134 #endif // MEDIA_BASE_WIDEVINE_KEY_SOURCE_H_
    -
    Status FetchKeys(const std::vector< uint8_t > &pssh_box) override
    -
    Status GetCryptoPeriodKey(uint32_t crypto_period_index, TrackType track_type, EncryptionKey *key) override
    -
    Status GetKey(TrackType track_type, EncryptionKey *key) override
    + + +
    73 
    +
    74  // Internal routine for getting keys.
    +
    75  Status GetKeyInternal(uint32_t crypto_period_index,
    +
    76  TrackType track_type,
    +
    77  EncryptionKey* key);
    +
    78 
    +
    79  // The closure task to fetch keys repeatedly.
    +
    80  void FetchKeysTask();
    +
    81 
    +
    82  // Fetch keys from server.
    +
    83  Status FetchKeysInternal(bool enable_key_rotation,
    +
    84  uint32_t first_crypto_period_index,
    +
    85  bool widevine_classic);
    +
    86 
    +
    87  // Fill |request| with necessary fields for Widevine encryption request.
    +
    88  // |request| should not be NULL.
    +
    89  void FillRequest(bool enable_key_rotation,
    +
    90  uint32_t first_crypto_period_index,
    +
    91  std::string* request);
    +
    92  // Base64 escape and format the request. Optionally sign the request if a
    +
    93  // signer is provided. |message| should not be NULL. Return OK on success.
    +
    94  Status GenerateKeyMessage(const std::string& request, std::string* message);
    +
    95  // Decode |response| from JSON formatted |raw_response|.
    +
    96  // |response| should not be NULL.
    +
    97  bool DecodeResponse(const std::string& raw_response, std::string* response);
    +
    98  // Extract encryption key from |response|, which is expected to be properly
    +
    99  // formatted. |transient_error| will be set to true if it fails and the
    +
    100  // failure is because of a transient error from the server. |transient_error|
    +
    101  // should not be NULL.
    +
    102  bool ExtractEncryptionKey(bool enable_key_rotation,
    +
    103  bool widevine_classic,
    +
    104  const std::string& response,
    +
    105  bool* transient_error);
    +
    106  // Push the keys to the key pool.
    +
    107  bool PushToKeyPool(EncryptionKeyMap* encryption_key_map);
    +
    108 
    +
    109  // The fetcher object used to fetch keys from the license service.
    +
    110  // It is initialized to a default fetcher on class initialization.
    +
    111  // Can be overridden using set_key_fetcher for testing or other purposes.
    +
    112  std::unique_ptr<KeyFetcher> key_fetcher_;
    +
    113  std::string server_url_;
    +
    114  std::unique_ptr<RequestSigner> signer_;
    +
    115  base::DictionaryValue request_dict_;
    +
    116 
    +
    117  const uint32_t crypto_period_count_;
    +
    118  base::Lock lock_;
    +
    119  bool add_common_pssh_;
    +
    120  bool key_production_started_;
    +
    121  base::WaitableEvent start_key_production_;
    +
    122  uint32_t first_crypto_period_index_;
    +
    123  std::unique_ptr<EncryptionKeyQueue> key_pool_;
    +
    124  EncryptionKeyMap encryption_key_map_; // For non key rotation request.
    +
    125  Status common_encryption_request_status_;
    +
    126 
    +
    127  DISALLOW_COPY_AND_ASSIGN(WidevineKeySource);
    +
    128 };
    +
    129 
    +
    130 } // namespace media
    +
    131 } // namespace shaka
    +
    132 
    +
    133 #endif // MEDIA_BASE_WIDEVINE_KEY_SOURCE_H_
    +
    Status FetchKeys(const std::vector< uint8_t > &pssh_box) override
    +
    Status GetCryptoPeriodKey(uint32_t crypto_period_index, TrackType track_type, EncryptionKey *key) override
    +
    Status GetKey(TrackType track_type, EncryptionKey *key) override
    -
    void set_key_fetcher(std::unique_ptr< KeyFetcher > key_fetcher)
    -
    WidevineKeySource(const std::string &server_url, bool add_common_pssh)
    +
    void set_key_fetcher(std::unique_ptr< KeyFetcher > key_fetcher)
    +
    WidevineKeySource(const std::string &server_url, bool add_common_pssh)
    -
    void set_signer(std::unique_ptr< RequestSigner > signer)
    +
    void set_signer(std::unique_ptr< RequestSigner > signer)
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    diff --git a/docs/da/d5e/classshaka_1_1media_1_1H264VideoSliceHeaderParser-members.html b/docs/da/d5e/classshaka_1_1media_1_1H264VideoSliceHeaderParser-members.html index 7891effc9a..a3d647af9a 100644 --- a/docs/da/d5e/classshaka_1_1media_1_1H264VideoSliceHeaderParser-members.html +++ b/docs/da/d5e/classshaka_1_1media_1_1H264VideoSliceHeaderParser-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/da/d60/classshaka_1_1media_1_1mp4_1_1SingleSegmentSegmenter-members.html b/docs/da/d60/classshaka_1_1media_1_1mp4_1_1SingleSegmentSegmenter-members.html index 77e098d112..3342c06d72 100644 --- a/docs/da/d60/classshaka_1_1media_1_1mp4_1_1SingleSegmentSegmenter-members.html +++ b/docs/da/d60/classshaka_1_1media_1_1mp4_1_1SingleSegmentSegmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::mp4::SingleSegmentSegmenter, including all inherited members.

    - + @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(const MediaStream *stream, scoped_refptr< MediaSample > sample)shaka::media::mp4::Segmenter
    AddSample(const MediaStream *stream, std::shared_ptr< MediaSample > sample)shaka::media::mp4::Segmenter
    Finalize()shaka::media::mp4::Segmenter
    fragment_buffer() (defined in shaka::media::mp4::Segmenter)shaka::media::mp4::Segmenterinlineprotected
    ftyp() (defined in shaka::media::mp4::Segmenter)shaka::media::mp4::Segmenterinlineprotected
    diff --git a/docs/da/d64/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter-members.html b/docs/da/d64/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter-members.html index 30180e0442..c1e4ab4ea3 100644 --- a/docs/da/d64/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter-members.html +++ b/docs/da/d64/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d6e/structshaka_1_1media_1_1mp4_1_1AudioRollRecoveryEntry.html b/docs/da/d6e/structshaka_1_1media_1_1mp4_1_1AudioRollRecoveryEntry.html index 00d98f0599..40fe9d6639 100644 --- a/docs/da/d6e/structshaka_1_1media_1_1mp4_1_1AudioRollRecoveryEntry.html +++ b/docs/da/d6e/structshaka_1_1media_1_1mp4_1_1AudioRollRecoveryEntry.html @@ -120,7 +120,7 @@ int16_t roll_distance< diff --git a/docs/da/d7a/fixed__key__encryption__flags_8h_source.html b/docs/da/d7a/fixed__key__encryption__flags_8h_source.html index d636dee018..f82120f8e5 100644 --- a/docs/da/d7a/fixed__key__encryption__flags_8h_source.html +++ b/docs/da/d7a/fixed__key__encryption__flags_8h_source.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d85/classshaka_1_1media_1_1mp2t_1_1TsSegmenter-members.html b/docs/da/d85/classshaka_1_1media_1_1mp2t_1_1TsSegmenter-members.html index 835e311f58..2a262644a7 100644 --- a/docs/da/d85/classshaka_1_1media_1_1mp2t_1_1TsSegmenter-members.html +++ b/docs/da/d85/classshaka_1_1media_1_1mp2t_1_1TsSegmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::mp2t::TsSegmenter, including all inherited members.

    - + @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(scoped_refptr< MediaSample > sample)shaka::media::mp2t::TsSegmenter
    AddSample(std::shared_ptr< MediaSample > sample)shaka::media::mp2t::TsSegmenter
    Finalize()shaka::media::mp2t::TsSegmenter
    Initialize(const StreamInfo &stream_info, KeySource *encryption_key_source, uint32_t max_sd_pixels, uint32_t max_hd_pixels, uint32_t max_uhd1_pixels, double clear_lead_in_seconds)shaka::media::mp2t::TsSegmenter
    InjectPesPacketGeneratorForTesting(std::unique_ptr< PesPacketGenerator > generator)shaka::media::mp2t::TsSegmenter
    diff --git a/docs/da/d88/mp4__muxer_8cc_source.html b/docs/da/d88/mp4__muxer_8cc_source.html index 1429c94d39..8621f85ffb 100644 --- a/docs/da/d88/mp4__muxer_8cc_source.html +++ b/docs/da/d88/mp4__muxer_8cc_source.html @@ -257,7 +257,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    168 }
    169 
    170 Status MP4Muxer::DoAddSample(const MediaStream* stream,
    -
    171  scoped_refptr<MediaSample> sample) {
    +
    171  std::shared_ptr<MediaSample> sample) {
    172  DCHECK(segmenter_);
    173  return segmenter_->AddSample(stream, sample);
    174 }
    @@ -498,13 +498,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    MP4Muxer(const MuxerOptions &options)
    Create a MP4Muxer object from MuxerOptions.
    Definition: mp4_muxer.cc:82
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    static int64_t GetFileSize(const char *file_name)
    Definition: file.cc:176
    - +
    virtual void OnMediaStart(const MuxerOptions &muxer_options, const StreamInfo &stream_info, uint32_t time_scale, ContainerType container_type)=0
    diff --git a/docs/da/d8b/classshaka_1_1media_1_1WebMMediaParser-members.html b/docs/da/d8b/classshaka_1_1media_1_1WebMMediaParser-members.html index f149f538cc..bf4fe5d5c6 100644 --- a/docs/da/d8b/classshaka_1_1media_1_1WebMMediaParser-members.html +++ b/docs/da/d8b/classshaka_1_1media_1_1WebMMediaParser-members.html @@ -95,9 +95,9 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + - + @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    Flush() override WARN_UNUSED_RESULTshaka::media::WebMMediaParservirtual
    Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) overrideshaka::media::WebMMediaParservirtual
    InitCB typedefshaka::media::MediaParser
    InitCB typedefshaka::media::MediaParser
    MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinline
    NewSampleCB typedefshaka::media::MediaParser
    NewSampleCB typedefshaka::media::MediaParser
    Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULTshaka::media::WebMMediaParservirtual
    WebMMediaParser() (defined in shaka::media::WebMMediaParser)shaka::media::WebMMediaParser
    ~MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinlinevirtual
    diff --git a/docs/da/d8e/container__names_8cc_source.html b/docs/da/d8e/container__names_8cc_source.html index f3917491b1..d4f57198e2 100644 --- a/docs/da/d8e/container__names_8cc_source.html +++ b/docs/da/d8e/container__names_8cc_source.html @@ -1866,7 +1866,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d9b/structshaka_1_1media_1_1mp4_1_1CompositionOffset-members.html b/docs/da/d9b/structshaka_1_1media_1_1mp4_1_1CompositionOffset-members.html index cbe809de38..ff10b560a3 100644 --- a/docs/da/d9b/structshaka_1_1media_1_1mp4_1_1CompositionOffset-members.html +++ b/docs/da/d9b/structshaka_1_1media_1_1mp4_1_1CompositionOffset-members.html @@ -98,7 +98,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d9d/structshaka_1_1media_1_1mp4_1_1EC3Specific-members.html b/docs/da/d9d/structshaka_1_1media_1_1mp4_1_1EC3Specific-members.html index a01b4584be..d84f94a7a7 100644 --- a/docs/da/d9d/structshaka_1_1media_1_1mp4_1_1EC3Specific-members.html +++ b/docs/da/d9d/structshaka_1_1media_1_1mp4_1_1EC3Specific-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d9f/classshaka_1_1MpdNotifierFactory-members.html b/docs/da/d9f/classshaka_1_1MpdNotifierFactory-members.html index 8ed7be9426..2af4ab3cb2 100644 --- a/docs/da/d9f/classshaka_1_1MpdNotifierFactory-members.html +++ b/docs/da/d9f/classshaka_1_1MpdNotifierFactory-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d9f/classshaka_1_1media_1_1MockMuxerListener-members.html b/docs/da/d9f/classshaka_1_1media_1_1MockMuxerListener-members.html index 0bfcebb272..bf5d932fb2 100644 --- a/docs/da/d9f/classshaka_1_1media_1_1MockMuxerListener-members.html +++ b/docs/da/d9f/classshaka_1_1media_1_1MockMuxerListener-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/da1/classshaka_1_1media_1_1mp2t_1_1TsPacket.html b/docs/da/da1/classshaka_1_1media_1_1mp2t_1_1TsPacket.html index a32593f571..c7a989488e 100644 --- a/docs/da/da1/classshaka_1_1media_1_1mp2t_1_1TsPacket.html +++ b/docs/da/da1/classshaka_1_1media_1_1mp2t_1_1TsPacket.html @@ -145,7 +145,7 @@ static const int kPacketSi diff --git a/docs/da/db2/classshaka_1_1Representation-members.html b/docs/da/db2/classshaka_1_1Representation-members.html index ed75b41b68..0e3a188810 100644 --- a/docs/da/db2/classshaka_1_1Representation-members.html +++ b/docs/da/db2/classshaka_1_1Representation-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/dbb/structshaka_1_1media_1_1mp4_1_1HandlerReference.html b/docs/da/dbb/structshaka_1_1media_1_1mp4_1_1HandlerReference.html index 16a70dbd56..928a8dfa5b 100644 --- a/docs/da/dbb/structshaka_1_1media_1_1mp4_1_1HandlerReference.html +++ b/docs/da/dbb/structshaka_1_1media_1_1mp4_1_1HandlerReference.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/da/dc3/status_8cc_source.html b/docs/da/dc3/status_8cc_source.html index 1e4164f945..1754ee0f7e 100644 --- a/docs/da/dc3/status_8cc_source.html +++ b/docs/da/dc3/status_8cc_source.html @@ -168,7 +168,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/dc4/structshaka_1_1media_1_1mp4_1_1TrackHeader.html b/docs/da/dc4/structshaka_1_1media_1_1mp4_1_1TrackHeader.html index 423351e918..e51ec87af4 100644 --- a/docs/da/dc4/structshaka_1_1media_1_1mp4_1_1TrackHeader.html +++ b/docs/da/dc4/structshaka_1_1media_1_1mp4_1_1TrackHeader.html @@ -215,7 +215,7 @@ Additional Inherited Members diff --git a/docs/da/dcb/es__descriptor_8h_source.html b/docs/da/dcb/es__descriptor_8h_source.html index 7a3e256755..f47049f6f8 100644 --- a/docs/da/dcb/es__descriptor_8h_source.html +++ b/docs/da/dcb/es__descriptor_8h_source.html @@ -183,7 +183,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/dd0/playready__key__source_8cc_source.html b/docs/da/dd0/playready__key__source_8cc_source.html index f857bbeb7d..faf88de47c 100644 --- a/docs/da/dd0/playready__key__source_8cc_source.html +++ b/docs/da/dd0/playready__key__source_8cc_source.html @@ -460,7 +460,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/dd0/structshaka_1_1media_1_1mp4_1_1Edit.html b/docs/da/dd0/structshaka_1_1media_1_1mp4_1_1Edit.html index ec0312046d..6b54e6299b 100644 --- a/docs/da/dd0/structshaka_1_1media_1_1mp4_1_1Edit.html +++ b/docs/da/dd0/structshaka_1_1media_1_1mp4_1_1Edit.html @@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/da/dd0/webm__info__parser_8h_source.html b/docs/da/dd0/webm__info__parser_8h_source.html index 7d7d35b169..55be65c2dd 100644 --- a/docs/da/dd0/webm__info__parser_8h_source.html +++ b/docs/da/dd0/webm__info__parser_8h_source.html @@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/dd1/fragmenter_8h_source.html b/docs/da/dd1/fragmenter_8h_source.html index 748cba41e1..15b56b9bc4 100644 --- a/docs/da/dd1/fragmenter_8h_source.html +++ b/docs/da/dd1/fragmenter_8h_source.html @@ -100,112 +100,111 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    11 #include <vector>
    12 
    13 #include "packager/base/logging.h"
    -
    14 #include "packager/base/memory/ref_counted.h"
    -
    15 #include "packager/media/base/status.h"
    -
    16 
    -
    17 namespace shaka {
    -
    18 namespace media {
    -
    19 
    -
    20 class BufferWriter;
    -
    21 class MediaSample;
    -
    22 class StreamInfo;
    -
    23 
    -
    24 namespace mp4 {
    -
    25 
    -
    26 struct SegmentReference;
    -
    27 struct TrackFragment;
    -
    28 
    -
    31 class Fragmenter {
    -
    32  public:
    -
    35  Fragmenter(scoped_refptr<StreamInfo> info, TrackFragment* traf);
    -
    36 
    -
    37  virtual ~Fragmenter();
    -
    38 
    -
    42  virtual Status AddSample(scoped_refptr<MediaSample> sample);
    -
    43 
    -
    48  virtual Status InitializeFragment(int64_t first_sample_dts);
    -
    49 
    -
    51  virtual void FinalizeFragment();
    -
    52 
    - -
    55 
    -
    56  uint64_t fragment_duration() const { return fragment_duration_; }
    -
    57  uint64_t first_sap_time() const { return first_sap_time_; }
    -
    58  uint64_t earliest_presentation_time() const {
    -
    59  return earliest_presentation_time_;
    -
    60  }
    -
    61  bool fragment_initialized() const { return fragment_initialized_; }
    -
    62  bool fragment_finalized() const { return fragment_finalized_; }
    -
    63  BufferWriter* data() { return data_.get(); }
    -
    64 
    - -
    70  bool use_decoding_timestamp_in_timeline) {
    -
    71  use_decoding_timestamp_in_timeline_ = use_decoding_timestamp_in_timeline;
    -
    72  }
    -
    73 
    -
    74  protected:
    -
    75  TrackFragment* traf() { return traf_; }
    -
    76 
    -
    80  template <typename T>
    -
    81  bool OptimizeSampleEntries(std::vector<T>* entries, T* default_value);
    -
    82 
    -
    83  private:
    -
    84  // Check if the current fragment starts with SAP.
    -
    85  bool StartsWithSAP();
    -
    86 
    -
    87  bool use_decoding_timestamp_in_timeline_;
    -
    88  TrackFragment* traf_;
    -
    89  uint64_t seek_preroll_;
    -
    90  bool fragment_initialized_;
    -
    91  bool fragment_finalized_;
    -
    92  uint64_t fragment_duration_;
    -
    93  int64_t earliest_presentation_time_;
    -
    94  int64_t first_sap_time_;
    -
    95  std::unique_ptr<BufferWriter> data_;
    -
    96 
    -
    97  DISALLOW_COPY_AND_ASSIGN(Fragmenter);
    -
    98 };
    -
    99 
    -
    100 template <typename T>
    -
    101 bool Fragmenter::OptimizeSampleEntries(std::vector<T>* entries,
    -
    102  T* default_value) {
    -
    103  DCHECK(entries);
    -
    104  DCHECK(default_value);
    -
    105  DCHECK(!entries->empty());
    -
    106 
    -
    107  typename std::vector<T>::const_iterator it = entries->begin();
    -
    108  T value = *it;
    -
    109  for (; it < entries->end(); ++it)
    -
    110  if (value != *it)
    -
    111  return false;
    -
    112 
    -
    113  // Clear |entries| if it contains only one value.
    -
    114  entries->clear();
    -
    115  *default_value = value;
    -
    116  return true;
    -
    117 }
    -
    118 
    -
    119 } // namespace mp4
    -
    120 } // namespace media
    -
    121 } // namespace shaka
    -
    122 
    -
    123 #endif // MEDIA_FORMATS_MP4_FRAGMENTER_H_
    -
    void set_use_decoding_timestamp_in_timeline(bool use_decoding_timestamp_in_timeline)
    Definition: fragmenter.h:69
    +
    14 #include "packager/media/base/status.h"
    +
    15 
    +
    16 namespace shaka {
    +
    17 namespace media {
    +
    18 
    +
    19 class BufferWriter;
    +
    20 class MediaSample;
    +
    21 class StreamInfo;
    +
    22 
    +
    23 namespace mp4 {
    +
    24 
    +
    25 struct SegmentReference;
    +
    26 struct TrackFragment;
    +
    27 
    +
    30 class Fragmenter {
    +
    31  public:
    +
    34  Fragmenter(std::shared_ptr<StreamInfo> info, TrackFragment* traf);
    +
    35 
    +
    36  virtual ~Fragmenter();
    +
    37 
    +
    41  virtual Status AddSample(std::shared_ptr<MediaSample> sample);
    +
    42 
    +
    47  virtual Status InitializeFragment(int64_t first_sample_dts);
    +
    48 
    +
    50  virtual void FinalizeFragment();
    +
    51 
    + +
    54 
    +
    55  uint64_t fragment_duration() const { return fragment_duration_; }
    +
    56  uint64_t first_sap_time() const { return first_sap_time_; }
    +
    57  uint64_t earliest_presentation_time() const {
    +
    58  return earliest_presentation_time_;
    +
    59  }
    +
    60  bool fragment_initialized() const { return fragment_initialized_; }
    +
    61  bool fragment_finalized() const { return fragment_finalized_; }
    +
    62  BufferWriter* data() { return data_.get(); }
    +
    63 
    + +
    69  bool use_decoding_timestamp_in_timeline) {
    +
    70  use_decoding_timestamp_in_timeline_ = use_decoding_timestamp_in_timeline;
    +
    71  }
    +
    72 
    +
    73  protected:
    +
    74  TrackFragment* traf() { return traf_; }
    +
    75 
    +
    79  template <typename T>
    +
    80  bool OptimizeSampleEntries(std::vector<T>* entries, T* default_value);
    +
    81 
    +
    82  private:
    +
    83  // Check if the current fragment starts with SAP.
    +
    84  bool StartsWithSAP();
    +
    85 
    +
    86  bool use_decoding_timestamp_in_timeline_;
    +
    87  TrackFragment* traf_;
    +
    88  uint64_t seek_preroll_;
    +
    89  bool fragment_initialized_;
    +
    90  bool fragment_finalized_;
    +
    91  uint64_t fragment_duration_;
    +
    92  int64_t earliest_presentation_time_;
    +
    93  int64_t first_sap_time_;
    +
    94  std::unique_ptr<BufferWriter> data_;
    +
    95 
    +
    96  DISALLOW_COPY_AND_ASSIGN(Fragmenter);
    +
    97 };
    +
    98 
    +
    99 template <typename T>
    +
    100 bool Fragmenter::OptimizeSampleEntries(std::vector<T>* entries,
    +
    101  T* default_value) {
    +
    102  DCHECK(entries);
    +
    103  DCHECK(default_value);
    +
    104  DCHECK(!entries->empty());
    +
    105 
    +
    106  typename std::vector<T>::const_iterator it = entries->begin();
    +
    107  T value = *it;
    +
    108  for (; it < entries->end(); ++it)
    +
    109  if (value != *it)
    +
    110  return false;
    +
    111 
    +
    112  // Clear |entries| if it contains only one value.
    +
    113  entries->clear();
    +
    114  *default_value = value;
    +
    115  return true;
    +
    116 }
    +
    117 
    +
    118 } // namespace mp4
    +
    119 } // namespace media
    +
    120 } // namespace shaka
    +
    121 
    +
    122 #endif // MEDIA_FORMATS_MP4_FRAGMENTER_H_
    +
    void set_use_decoding_timestamp_in_timeline(bool use_decoding_timestamp_in_timeline)
    Definition: fragmenter.h:68
    -
    Fragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf)
    Definition: fragmenter.cc:32
    -
    virtual Status AddSample(scoped_refptr< MediaSample > sample)
    Definition: fragmenter.cc:46
    virtual Status InitializeFragment(int64_t first_sample_dts)
    Definition: fragmenter.cc:92
    virtual void FinalizeFragment()
    Finalize and optimize the fragment.
    Definition: fragmenter.cc:111
    - +
    Fragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf)
    Definition: fragmenter.cc:32
    +
    virtual Status AddSample(std::shared_ptr< MediaSample > sample)
    Definition: fragmenter.cc:46
    +
    void GenerateSegmentReference(SegmentReference *reference)
    Fill reference with current fragment information.
    Definition: fragmenter.cc:169
    -
    bool OptimizeSampleEntries(std::vector< T > *entries, T *default_value)
    Definition: fragmenter.h:101
    +
    bool OptimizeSampleEntries(std::vector< T > *entries, T *default_value)
    Definition: fragmenter.h:100
    diff --git a/docs/da/dd2/classshaka_1_1media_1_1mp2t_1_1TsPacket-members.html b/docs/da/dd2/classshaka_1_1media_1_1mp2t_1_1TsPacket-members.html index dd2bf6ad35..e52053317e 100644 --- a/docs/da/dd2/classshaka_1_1media_1_1mp2t_1_1TsPacket-members.html +++ b/docs/da/dd2/classshaka_1_1media_1_1mp2t_1_1TsPacket-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/dd6/classshaka_1_1media_1_1H264ByteToUnitStreamConverter-members.html b/docs/da/dd6/classshaka_1_1media_1_1H264ByteToUnitStreamConverter-members.html index dc1ad3ff24..12e294f9c6 100644 --- a/docs/da/dd6/classshaka_1_1media_1_1H264ByteToUnitStreamConverter-members.html +++ b/docs/da/dd6/classshaka_1_1media_1_1H264ByteToUnitStreamConverter-members.html @@ -96,14 +96,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); ConvertByteStreamToNalUnitStream(const uint8_t *input_frame, size_t input_frame_size, std::vector< uint8_t > *output_frame)shaka::media::H26xByteToUnitStreamConverter GetDecoderConfigurationRecord(std::vector< uint8_t > *decoder_config) const overrideshaka::media::H264ByteToUnitStreamConvertervirtual H264ByteToUnitStreamConverter() (defined in shaka::media::H264ByteToUnitStreamConverter)shaka::media::H264ByteToUnitStreamConverter - H26xByteToUnitStreamConverter(Nalu::CodecType type) (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverter + H26xByteToUnitStreamConverter(Nalu::CodecType type) (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverterexplicit kUnitStreamNaluLengthSize (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConverterstatic ~H264ByteToUnitStreamConverter() override (defined in shaka::media::H264ByteToUnitStreamConverter)shaka::media::H264ByteToUnitStreamConverter ~H26xByteToUnitStreamConverter() (defined in shaka::media::H26xByteToUnitStreamConverter)shaka::media::H26xByteToUnitStreamConvertervirtual diff --git a/docs/da/dd8/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser-members.html b/docs/da/dd8/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser-members.html index 2a9eced579..6e250296d2 100644 --- a/docs/da/dd8/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser-members.html +++ b/docs/da/dd8/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser-members.html @@ -95,17 +95,17 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + - +
    Flush() override WARN_UNUSED_RESULTshaka::media::mp2t::Mp2tMediaParservirtual
    Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) overrideshaka::media::mp2t::Mp2tMediaParservirtual
    InitCB typedefshaka::media::MediaParser
    InitCB typedefshaka::media::MediaParser
    MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinline
    Mp2tMediaParser() (defined in shaka::media::mp2t::Mp2tMediaParser)shaka::media::mp2t::Mp2tMediaParser
    NewSampleCB typedefshaka::media::MediaParser
    NewSampleCB typedefshaka::media::MediaParser
    Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULTshaka::media::mp2t::Mp2tMediaParservirtual
    ~MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinlinevirtual
    ~Mp2tMediaParser() override (defined in shaka::media::mp2t::Mp2tMediaParser)shaka::media::mp2t::Mp2tMediaParser
    diff --git a/docs/da/dda/structshaka_1_1media_1_1H264SEIRecoveryPoint-members.html b/docs/da/dda/structshaka_1_1media_1_1H264SEIRecoveryPoint-members.html index 4b5ad42046..1eff006ba0 100644 --- a/docs/da/dda/structshaka_1_1media_1_1H264SEIRecoveryPoint-members.html +++ b/docs/da/dda/structshaka_1_1media_1_1H264SEIRecoveryPoint-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/ddd/classshaka_1_1media_1_1WidevineKeySource.html b/docs/da/ddd/classshaka_1_1media_1_1WidevineKeySource.html index 641ebeb86c..548749951b 100644 --- a/docs/da/ddd/classshaka_1_1media_1_1WidevineKeySource.html +++ b/docs/da/ddd/classshaka_1_1media_1_1WidevineKeySource.html @@ -197,7 +197,7 @@ static std::string 134 of file widevine_key_source.cc.

    +

    Definition at line 112 of file widevine_key_source.cc.

    @@ -234,7 +234,7 @@ static std::string shaka::media::KeySource.

    -

    Definition at line 172 of file widevine_key_source.cc.

    +

    Definition at line 150 of file widevine_key_source.cc.

    @@ -270,7 +270,7 @@ static std::string shaka::media::KeySource.

    -

    Definition at line 199 of file widevine_key_source.cc.

    +

    Definition at line 177 of file widevine_key_source.cc.

    @@ -306,7 +306,7 @@ static std::string shaka::media::KeySource.

    -

    Definition at line 220 of file widevine_key_source.cc.

    +

    Definition at line 198 of file widevine_key_source.cc.

    @@ -343,7 +343,7 @@ static std::string 
    Returns
    OK on success, an error status otherwise.
    -

    Definition at line 161 of file widevine_key_source.cc.

    +

    Definition at line 139 of file widevine_key_source.cc.

    @@ -397,7 +397,7 @@ static std::string shaka::media::KeySource.

    -

    Definition at line 252 of file widevine_key_source.cc.

    +

    Definition at line 230 of file widevine_key_source.cc.

    @@ -444,7 +444,7 @@ static std::string shaka::media::KeySource.

    -

    Definition at line 229 of file widevine_key_source.cc.

    +

    Definition at line 207 of file widevine_key_source.cc.

    @@ -491,7 +491,7 @@ static std::string shaka::media::KeySource.

    -

    Definition at line 239 of file widevine_key_source.cc.

    +

    Definition at line 217 of file widevine_key_source.cc.

    @@ -516,7 +516,7 @@ static std::string 278 of file widevine_key_source.cc.

    +

    Definition at line 256 of file widevine_key_source.cc.

    @@ -541,7 +541,7 @@ static std::string 274 of file widevine_key_source.cc.

    +

    Definition at line 252 of file widevine_key_source.cc.

    @@ -552,7 +552,7 @@ static std::string  diff --git a/docs/da/ddf/structshaka_1_1media_1_1mp4_1_1SampleDescription-members.html b/docs/da/ddf/structshaka_1_1media_1_1mp4_1_1SampleDescription-members.html index f83de8c8ae..1aa826caa5 100644 --- a/docs/da/ddf/structshaka_1_1media_1_1mp4_1_1SampleDescription-members.html +++ b/docs/da/ddf/structshaka_1_1media_1_1mp4_1_1SampleDescription-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/de2/mock__mpd__builder_8cc_source.html b/docs/da/de2/mock__mpd__builder_8cc_source.html index de413a876c..b0a9f20df8 100644 --- a/docs/da/de2/mock__mpd__builder_8cc_source.html +++ b/docs/da/de2/mock__mpd__builder_8cc_source.html @@ -120,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/de4/classshaka_1_1media_1_1WebMClusterParser.html b/docs/da/de4/classshaka_1_1media_1_1WebMClusterParser.html index 1746de325d..bbe8bb9358 100644 --- a/docs/da/de4/classshaka_1_1media_1_1WebMClusterParser.html +++ b/docs/da/de4/classshaka_1_1media_1_1WebMClusterParser.html @@ -114,8 +114,8 @@ Public Types - - + + @@ -172,7 +172,7 @@ Additional Inherited Members

    Constructor & Destructor Documentation

    - +

    Public Member Functions

     WebMClusterParser (int64_t timecode_scale, scoped_refptr< AudioStreamInfo > audio_stream_info, scoped_refptr< VideoStreamInfo > video_stream_info, int64_t audio_default_duration, int64_t video_default_duration, const WebMTracksParser::TextTracks &text_tracks, const std::set< int64_t > &ignored_tracks, const std::string &audio_encryption_key_id, const std::string &video_encryption_key_id, const MediaParser::NewSampleCB &new_sample_cb, const MediaParser::InitCB &init_cb, KeySource *decryption_key_source)
     
     WebMClusterParser (int64_t timecode_scale, std::shared_ptr< AudioStreamInfo > audio_stream_info, std::shared_ptr< VideoStreamInfo > video_stream_info, int64_t audio_default_duration, int64_t video_default_duration, const WebMTracksParser::TextTracks &text_tracks, const std::set< int64_t > &ignored_tracks, const std::string &audio_encryption_key_id, const std::string &video_encryption_key_id, const MediaParser::NewSampleCB &new_sample_cb, const MediaParser::InitCB &init_cb, KeySource *decryption_key_source)
     
    void Reset ()
     Resets the parser state so it can accept a new cluster.
    @@ -185,13 +185,13 @@ Additional Inherited Members - + - + @@ -233,13 +233,13 @@ Additional Inherited Members - + - + @@ -365,7 +365,7 @@ The number of bytes parsed on success. diff --git a/docs/da/de6/structshaka_1_1media_1_1mp4_1_1SchemeType-members.html b/docs/da/de6/structshaka_1_1media_1_1mp4_1_1SchemeType-members.html index 36c2c8bcff..6ff89debe5 100644 --- a/docs/da/de6/structshaka_1_1media_1_1mp4_1_1SchemeType-members.html +++ b/docs/da/de6/structshaka_1_1media_1_1mp4_1_1SchemeType-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    scoped_refptr< AudioStreamInfostd::shared_ptr< AudioStreamInfo audio_stream_info,
    scoped_refptr< VideoStreamInfostd::shared_ptr< VideoStreamInfo video_stream_info,
    const MediaParser::NewSampleCBconst MediaParser::NewSampleCB new_sample_cb,
    const MediaParser::InitCBconst MediaParser::InitCB init_cb,
    diff --git a/docs/da/de8/classshaka_1_1media_1_1AudioStreamInfo-members.html b/docs/da/de8/classshaka_1_1media_1_1AudioStreamInfo-members.html index 31ab07bfa2..bb8ca14a0e 100644 --- a/docs/da/de8/classshaka_1_1media_1_1AudioStreamInfo-members.html +++ b/docs/da/de8/classshaka_1_1media_1_1AudioStreamInfo-members.html @@ -122,11 +122,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); time_scale() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline ToString() const overrideshaka::media::AudioStreamInfovirtual track_id() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline - ~StreamInfo() (defined in shaka::media::StreamInfo)shaka::media::StreamInfoprotectedvirtual + ~AudioStreamInfo() override (defined in shaka::media::AudioStreamInfo)shaka::media::AudioStreamInfo + ~StreamInfo() (defined in shaka::media::StreamInfo)shaka::media::StreamInfovirtual diff --git a/docs/da/de9/structshaka_1_1media_1_1mp4_1_1ProtectionSchemeInfo.html b/docs/da/de9/structshaka_1_1media_1_1mp4_1_1ProtectionSchemeInfo.html index 32d88babb9..9274ab5b93 100644 --- a/docs/da/de9/structshaka_1_1media_1_1mp4_1_1ProtectionSchemeInfo.html +++ b/docs/da/de9/structshaka_1_1media_1_1mp4_1_1ProtectionSchemeInfo.html @@ -179,7 +179,7 @@ Additional Inherited Members diff --git a/docs/da/df0/classshaka_1_1media_1_1H264VideoSliceHeaderParser.html b/docs/da/df0/classshaka_1_1media_1_1H264VideoSliceHeaderParser.html index c67f2175c5..c81abf26cc 100644 --- a/docs/da/df0/classshaka_1_1media_1_1H264VideoSliceHeaderParser.html +++ b/docs/da/df0/classshaka_1_1media_1_1H264VideoSliceHeaderParser.html @@ -152,7 +152,7 @@ int64_t  diff --git a/docs/da/df4/aes__decryptor_8cc_source.html b/docs/da/df4/aes__decryptor_8cc_source.html index bfcc81fb6b..1cc9f60b93 100644 --- a/docs/da/df4/aes__decryptor_8cc_source.html +++ b/docs/da/df4/aes__decryptor_8cc_source.html @@ -258,7 +258,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/df5/structshaka_1_1media_1_1mp4_1_1SampleDescription.html b/docs/da/df5/structshaka_1_1media_1_1mp4_1_1SampleDescription.html index afc98c306c..c64bd53bb5 100644 --- a/docs/da/df5/structshaka_1_1media_1_1mp4_1_1SampleDescription.html +++ b/docs/da/df5/structshaka_1_1media_1_1mp4_1_1SampleDescription.html @@ -191,7 +191,7 @@ Additional Inherited Members diff --git a/docs/da/df9/classshaka_1_1media_1_1AesPatternCryptor-members.html b/docs/da/df9/classshaka_1_1media_1_1AesPatternCryptor-members.html index 4fbb779442..42220427ca 100644 --- a/docs/da/df9/classshaka_1_1media_1_1AesPatternCryptor-members.html +++ b/docs/da/df9/classshaka_1_1media_1_1AesPatternCryptor-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d05/structshaka_1_1media_1_1H265SliceHeader.html b/docs/db/d05/structshaka_1_1media_1_1H265SliceHeader.html index 634f40e38b..f74f6e0796 100644 --- a/docs/db/d05/structshaka_1_1media_1_1H265SliceHeader.html +++ b/docs/db/d05/structshaka_1_1media_1_1H265SliceHeader.html @@ -236,7 +236,7 @@ std::vector< int > e diff --git a/docs/db/d11/structshaka_1_1media_1_1mp4_1_1CodecConfiguration.html b/docs/db/d11/structshaka_1_1media_1_1mp4_1_1CodecConfiguration.html index 5cf2fdfe0a..245afca400 100644 --- a/docs/db/d11/structshaka_1_1media_1_1mp4_1_1CodecConfiguration.html +++ b/docs/db/d11/structshaka_1_1media_1_1mp4_1_1CodecConfiguration.html @@ -176,7 +176,7 @@ Additional Inherited Members diff --git a/docs/db/d14/classshaka_1_1media_1_1H265Parser-members.html b/docs/db/d14/classshaka_1_1media_1_1H265Parser-members.html index 28d0fe8448..f2aae17829 100644 --- a/docs/db/d14/classshaka_1_1media_1_1H265Parser-members.html +++ b/docs/db/d14/classshaka_1_1media_1_1H265Parser-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d14/structshaka_1_1media_1_1H264WeightingFactors-members.html b/docs/db/d14/structshaka_1_1media_1_1H264WeightingFactors-members.html index 3bdf61bba2..29dda84f95 100644 --- a/docs/db/d14/structshaka_1_1media_1_1H264WeightingFactors-members.html +++ b/docs/db/d14/structshaka_1_1media_1_1H264WeightingFactors-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d21/structshaka_1_1media_1_1mp4_1_1SubtitleMediaHeader.html b/docs/db/d21/structshaka_1_1media_1_1mp4_1_1SubtitleMediaHeader.html index 04c8f46d56..b202f584e7 100644 --- a/docs/db/d21/structshaka_1_1media_1_1mp4_1_1SubtitleMediaHeader.html +++ b/docs/db/d21/structshaka_1_1media_1_1mp4_1_1SubtitleMediaHeader.html @@ -175,7 +175,7 @@ uint32_t flags diff --git a/docs/db/d30/classshaka_1_1media_1_1mp4_1_1MP4Muxer.html b/docs/db/d30/classshaka_1_1media_1_1mp4_1_1MP4Muxer.html index 8ffb02fdbc..b3851beba9 100644 --- a/docs/db/d30/classshaka_1_1media_1_1mp4_1_1MP4Muxer.html +++ b/docs/db/d30/classshaka_1_1media_1_1mp4_1_1MP4Muxer.html @@ -185,7 +185,7 @@ FourCC protection_scheme diff --git a/docs/db/d31/h26x__byte__to__unit__stream__converter_8h_source.html b/docs/db/d31/h26x__byte__to__unit__stream__converter_8h_source.html index 5598ff4952..9dd91e3a93 100644 --- a/docs/db/d31/h26x__byte__to__unit__stream__converter_8h_source.html +++ b/docs/db/d31/h26x__byte__to__unit__stream__converter_8h_source.html @@ -109,9 +109,9 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    20 
    23  public:
    -
    24  static const size_t kUnitStreamNaluLengthSize = 4;
    +
    24  static constexpr size_t kUnitStreamNaluLengthSize = 4;
    25 
    -
    26  H26xByteToUnitStreamConverter(Nalu::CodecType type);
    +
    26  explicit H26xByteToUnitStreamConverter(Nalu::CodecType type);
    28 
    37  bool ConvertByteStreamToNalUnitStream(const uint8_t* input_frame,
    @@ -135,7 +135,6 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    61 } // namespace shaka
    62 
    63 #endif // MEDIA_CODECS_H26x_BYTE_TO_UNIT_STREAM_CONVERTER_H_
    -
    64 
    bool ConvertByteStreamToNalUnitStream(const uint8_t *input_frame, size_t input_frame_size, std::vector< uint8_t > *output_frame)
    A base class that is used to convert H.26x byte streams to NAL unit streams.
    @@ -143,7 +142,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d31/track__run__iterator_8cc_source.html b/docs/db/d31/track__run__iterator_8cc_source.html index b34b139e7c..f95b59240f 100644 --- a/docs/db/d31/track__run__iterator_8cc_source.html +++ b/docs/db/d31/track__run__iterator_8cc_source.html @@ -775,7 +775,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d38/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator-members.html b/docs/db/d38/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator-members.html index ed677ccc92..c58d39465d 100644 --- a/docs/db/d38/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator-members.html +++ b/docs/db/d38/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator-members.html @@ -99,13 +99,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); NumberOfReadyPesPackets()shaka::media::mp2t::PesPacketGeneratorvirtual PesPacketGenerator() (defined in shaka::media::mp2t::PesPacketGenerator)shaka::media::mp2t::PesPacketGenerator PesPacketGeneratorTest (defined in shaka::media::mp2t::PesPacketGenerator)shaka::media::mp2t::PesPacketGeneratorfriend - PushSample(scoped_refptr< MediaSample > sample)shaka::media::mp2t::PesPacketGeneratorvirtual + PushSample(std::shared_ptr< MediaSample > sample)shaka::media::mp2t::PesPacketGeneratorvirtual SetEncryptionKey(std::unique_ptr< EncryptionKey > encryption_key)shaka::media::mp2t::PesPacketGeneratorvirtual ~PesPacketGenerator() (defined in shaka::media::mp2t::PesPacketGenerator)shaka::media::mp2t::PesPacketGeneratorvirtual diff --git a/docs/db/d3b/classshaka_1_1media_1_1VideoSliceHeaderParser-members.html b/docs/db/d3b/classshaka_1_1media_1_1VideoSliceHeaderParser-members.html index fb9e2d1c09..a95094abdb 100644 --- a/docs/db/d3b/classshaka_1_1media_1_1VideoSliceHeaderParser-members.html +++ b/docs/db/d3b/classshaka_1_1media_1_1VideoSliceHeaderParser-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d45/mpd__notify__muxer__listener_8h_source.html b/docs/db/d45/mpd__notify__muxer__listener_8h_source.html index c46af604f4..dd56d838d2 100644 --- a/docs/db/d45/mpd__notify__muxer__listener_8h_source.html +++ b/docs/db/d45/mpd__notify__muxer__listener_8h_source.html @@ -175,7 +175,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    91 
    92 #endif // MEDIA_EVENT_MPD_NOTIFY_MUXER_LISTENER_H_
    void OnNewSegment(const std::string &file_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size) override
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    void OnMediaEnd(bool has_init_range, uint64_t init_range_start, uint64_t init_range_end, bool has_index_range, uint64_t index_range_start, uint64_t index_range_end, float duration_seconds, uint64_t file_size) override
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    @@ -189,7 +189,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d4b/classshaka_1_1MockAdaptationSet.html b/docs/db/d4b/classshaka_1_1MockAdaptationSet.html index 597a975825..1395c99824 100644 --- a/docs/db/d4b/classshaka_1_1MockAdaptationSet.html +++ b/docs/db/d4b/classshaka_1_1MockAdaptationSet.html @@ -177,7 +177,7 @@ Additional Inherited Members diff --git a/docs/db/d4e/classshaka_1_1media_1_1mp4_1_1CompositionOffsetIterator.html b/docs/db/d4e/classshaka_1_1media_1_1mp4_1_1CompositionOffsetIterator.html index be41d0ab3f..ff03e7a814 100644 --- a/docs/db/d4e/classshaka_1_1media_1_1mp4_1_1CompositionOffsetIterator.html +++ b/docs/db/d4e/classshaka_1_1media_1_1mp4_1_1CompositionOffsetIterator.html @@ -225,7 +225,7 @@ Public Member Functions diff --git a/docs/db/d51/mp2t__media__parser_8h_source.html b/docs/db/d51/mp2t__media__parser_8h_source.html index 2abdbfeb93..91a52b2321 100644 --- a/docs/db/d51/mp2t__media__parser_8h_source.html +++ b/docs/db/d51/mp2t__media__parser_8h_source.html @@ -98,101 +98,100 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    9 #include <map>
    10 #include <memory>
    11 
    -
    12 #include "packager/base/memory/ref_counted.h"
    -
    13 #include "packager/media/base/byte_queue.h"
    -
    14 #include "packager/media/base/media_parser.h"
    -
    15 #include "packager/media/base/stream_info.h"
    -
    16 
    -
    17 namespace shaka {
    -
    18 namespace media {
    -
    19 
    -
    20 class MediaSample;
    -
    21 
    -
    22 namespace mp2t {
    -
    23 
    -
    24 class PidState;
    -
    25 class TsPacket;
    -
    26 class TsSection;
    -
    27 
    -
    28 typedef std::deque<scoped_refptr<MediaSample> > SampleQueue;
    -
    29 
    -
    30 class Mp2tMediaParser : public MediaParser {
    -
    31  public:
    - -
    33  ~Mp2tMediaParser() override;
    -
    34 
    -
    37  void Init(const InitCB& init_cb,
    -
    38  const NewSampleCB& new_sample_cb,
    -
    39  KeySource* decryption_key_source) override;
    -
    40  bool Flush() override WARN_UNUSED_RESULT;
    -
    41  bool Parse(const uint8_t* buf, int size) override WARN_UNUSED_RESULT;
    -
    43 
    -
    44  private:
    -
    45  typedef std::map<int, std::unique_ptr<PidState>> PidMap;
    -
    46 
    -
    47  // Callback invoked to register a Program Map Table.
    -
    48  // Note: Does nothing if the PID is already registered.
    -
    49  void RegisterPmt(int program_number, int pmt_pid);
    -
    50 
    -
    51  // Callback invoked to register a PES pid.
    -
    52  // Possible values for |media_type| are defined in:
    -
    53  // ISO-13818.1 / ITU H.222 Table 2.34 "Media type assignments".
    -
    54  // |pes_pid| is part of the Program Map Table refered by |pmt_pid|.
    -
    55  void RegisterPes(int pmt_pid, int pes_pid, int media_type);
    -
    56 
    -
    57  // Callback invoked each time the audio/video decoder configuration is
    -
    58  // changed.
    -
    59  void OnNewStreamInfo(const scoped_refptr<StreamInfo>& new_stream_info);
    -
    60 
    -
    61  // Callback invoked by the ES media parser
    -
    62  // to emit a new audio/video access unit.
    -
    63  void OnEmitSample(uint32_t pes_pid,
    -
    64  const scoped_refptr<MediaSample>& new_sample);
    -
    65 
    -
    66  // Invoke the initialization callback if needed.
    -
    67  bool FinishInitializationIfNeeded();
    -
    68 
    -
    69  bool EmitRemainingSamples();
    -
    70 
    -
    73  void set_sbr_in_mime_type(bool sbr_in_mimetype) {
    -
    74  sbr_in_mimetype_ = sbr_in_mimetype; }
    -
    75 
    -
    76  // List of callbacks.
    -
    77  InitCB init_cb_;
    -
    78  NewSampleCB new_sample_cb_;
    -
    79 
    -
    80  bool sbr_in_mimetype_;
    -
    81 
    -
    82  // Bytes of the TS media.
    -
    83  ByteQueue ts_byte_queue_;
    -
    84 
    -
    85  // List of PIDs and their states.
    -
    86  PidMap pids_;
    -
    87 
    -
    88  // Whether |init_cb_| has been invoked.
    -
    89  bool is_initialized_;
    -
    90 
    -
    91  DISALLOW_COPY_AND_ASSIGN(Mp2tMediaParser);
    -
    92 };
    -
    93 
    -
    94 } // namespace mp2t
    -
    95 } // namespace media
    -
    96 } // namespace shaka
    -
    97 
    -
    98 #endif
    - -
    base::Callback< void(const std::vector< scoped_refptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    -
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    - -
    bool Flush() override WARN_UNUSED_RESULT
    -
    base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    +
    12 #include "packager/media/base/byte_queue.h"
    +
    13 #include "packager/media/base/media_parser.h"
    +
    14 #include "packager/media/base/stream_info.h"
    +
    15 
    +
    16 namespace shaka {
    +
    17 namespace media {
    +
    18 
    +
    19 class MediaSample;
    +
    20 
    +
    21 namespace mp2t {
    +
    22 
    +
    23 class PidState;
    +
    24 class TsPacket;
    +
    25 class TsSection;
    +
    26 
    +
    27 typedef std::deque<std::shared_ptr<MediaSample>> SampleQueue;
    +
    28 
    +
    29 class Mp2tMediaParser : public MediaParser {
    +
    30  public:
    + +
    32  ~Mp2tMediaParser() override;
    +
    33 
    +
    36  void Init(const InitCB& init_cb,
    +
    37  const NewSampleCB& new_sample_cb,
    +
    38  KeySource* decryption_key_source) override;
    +
    39  bool Flush() override WARN_UNUSED_RESULT;
    +
    40  bool Parse(const uint8_t* buf, int size) override WARN_UNUSED_RESULT;
    +
    42 
    +
    43  private:
    +
    44  typedef std::map<int, std::unique_ptr<PidState>> PidMap;
    +
    45 
    +
    46  // Callback invoked to register a Program Map Table.
    +
    47  // Note: Does nothing if the PID is already registered.
    +
    48  void RegisterPmt(int program_number, int pmt_pid);
    +
    49 
    +
    50  // Callback invoked to register a PES pid.
    +
    51  // Possible values for |media_type| are defined in:
    +
    52  // ISO-13818.1 / ITU H.222 Table 2.34 "Media type assignments".
    +
    53  // |pes_pid| is part of the Program Map Table refered by |pmt_pid|.
    +
    54  void RegisterPes(int pmt_pid, int pes_pid, int media_type);
    +
    55 
    +
    56  // Callback invoked each time the audio/video decoder configuration is
    +
    57  // changed.
    +
    58  void OnNewStreamInfo(const std::shared_ptr<StreamInfo>& new_stream_info);
    +
    59 
    +
    60  // Callback invoked by the ES media parser
    +
    61  // to emit a new audio/video access unit.
    +
    62  void OnEmitSample(uint32_t pes_pid,
    +
    63  const std::shared_ptr<MediaSample>& new_sample);
    +
    64 
    +
    65  // Invoke the initialization callback if needed.
    +
    66  bool FinishInitializationIfNeeded();
    +
    67 
    +
    68  bool EmitRemainingSamples();
    +
    69 
    +
    72  void set_sbr_in_mime_type(bool sbr_in_mimetype) {
    +
    73  sbr_in_mimetype_ = sbr_in_mimetype; }
    +
    74 
    +
    75  // List of callbacks.
    +
    76  InitCB init_cb_;
    +
    77  NewSampleCB new_sample_cb_;
    +
    78 
    +
    79  bool sbr_in_mimetype_;
    +
    80 
    +
    81  // Bytes of the TS media.
    +
    82  ByteQueue ts_byte_queue_;
    +
    83 
    +
    84  // List of PIDs and their states.
    +
    85  PidMap pids_;
    +
    86 
    +
    87  // Whether |init_cb_| has been invoked.
    +
    88  bool is_initialized_;
    +
    89 
    +
    90  DISALLOW_COPY_AND_ASSIGN(Mp2tMediaParser);
    +
    91 };
    +
    92 
    +
    93 } // namespace mp2t
    +
    94 } // namespace media
    +
    95 } // namespace shaka
    +
    96 
    +
    97 #endif
    + +
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    + +
    base::Callback< void(const std::vector< std::shared_ptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    bool Flush() override WARN_UNUSED_RESULT
    +
    base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    -
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    +
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    diff --git a/docs/db/d51/two__pass__single__segment__segmenter_8h_source.html b/docs/db/d51/two__pass__single__segment__segmenter_8h_source.html index d9d7aa75ae..58e72b0ff8 100644 --- a/docs/db/d51/two__pass__single__segment__segmenter_8h_source.html +++ b/docs/db/d51/two__pass__single__segment__segmenter_8h_source.html @@ -144,7 +144,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d5a/classshaka_1_1media_1_1VP9Parser.html b/docs/db/d5a/classshaka_1_1media_1_1VP9Parser.html index abf6740020..e83cf3b81a 100644 --- a/docs/db/d5a/classshaka_1_1media_1_1VP9Parser.html +++ b/docs/db/d5a/classshaka_1_1media_1_1VP9Parser.html @@ -238,7 +238,7 @@ Additional Inherited Members diff --git a/docs/db/d60/mpd__options_8h_source.html b/docs/db/d60/mpd__options_8h_source.html index 092e0bcd59..d711eec850 100644 --- a/docs/db/d60/mpd__options_8h_source.html +++ b/docs/db/d60/mpd__options_8h_source.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d64/webvtt__media__parser_8h_source.html b/docs/db/d64/webvtt__media__parser_8h_source.html index aa862940c3..2efb6b6705 100644 --- a/docs/db/d64/webvtt__media__parser_8h_source.html +++ b/docs/db/d64/webvtt__media__parser_8h_source.html @@ -128,8 +128,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    40  ~WebVttMediaParser() override;
    41 
    -
    44  void Init(const InitCB& init_cb,
    -
    45  const NewSampleCB& new_sample_cb,
    +
    44  void Init(const InitCB& init_cb,
    +
    45  const NewSampleCB& new_sample_cb,
    46  KeySource* decryption_key_source) override;
    47  bool Flush() override WARN_UNUSED_RESULT;
    48  bool Parse(const uint8_t* buf, int size) override WARN_UNUSED_RESULT;
    @@ -145,8 +145,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    59  kParseError,
    60  };
    61 
    -
    62  InitCB init_cb_;
    -
    63  NewSampleCB new_sample_cb_;
    +
    62  InitCB init_cb_;
    +
    63  NewSampleCB new_sample_cb_;
    64 
    65  // All the unprocessed data passed to this parser.
    66  std::string data_;
    @@ -169,19 +169,19 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    83 } // namespace shaka
    84 
    85 #endif // MEDIA_FORMATS_WEBVTT_WEBVTT_MEDIA_PARSER_H_
    -
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    - +
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    + -
    base::Callback< void(const std::vector< scoped_refptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    -
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    -
    bool Flush() override WARN_UNUSED_RESULT
    -
    base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    +
    base::Callback< void(const std::vector< std::shared_ptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    +
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    +
    bool Flush() override WARN_UNUSED_RESULT
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    diff --git a/docs/db/d66/structshaka_1_1media_1_1mp4_1_1SegmentType-members.html b/docs/db/d66/structshaka_1_1media_1_1mp4_1_1SegmentType-members.html index e20e66b83f..bf70dce76e 100644 --- a/docs/db/d66/structshaka_1_1media_1_1mp4_1_1SegmentType-members.html +++ b/docs/db/d66/structshaka_1_1media_1_1mp4_1_1SegmentType-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d66/udp__file_8cc_source.html b/docs/db/d66/udp__file_8cc_source.html index a607fc32ac..1e64c0a9c0 100644 --- a/docs/db/d66/udp__file_8cc_source.html +++ b/docs/db/d66/udp__file_8cc_source.html @@ -343,7 +343,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d71/http__key__fetcher_8h_source.html b/docs/db/d71/http__key__fetcher_8h_source.html index 10449e5948..08f8d4b726 100644 --- a/docs/db/d71/http__key__fetcher_8h_source.html +++ b/docs/db/d71/http__key__fetcher_8h_source.html @@ -167,7 +167,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d74/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord-members.html b/docs/db/d74/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord-members.html index 4b6ff0dd58..a4713bb8db 100644 --- a/docs/db/d74/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord-members.html +++ b/docs/db/d74/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d75/classshaka_1_1media_1_1webm_1_1TwoPassSingleSegmentSegmenter-members.html b/docs/db/d75/classshaka_1_1media_1_1webm_1_1TwoPassSingleSegmentSegmenter-members.html index 813f1b3f0b..36d1888db1 100644 --- a/docs/db/d75/classshaka_1_1media_1_1webm_1_1TwoPassSingleSegmentSegmenter-members.html +++ b/docs/db/d75/classshaka_1_1media_1_1webm_1_1TwoPassSingleSegmentSegmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::webm::TwoPassSingleSegmentSegmenter, including all inherited members.

    - + @@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(scoped_refptr< MediaSample > sample)shaka::media::webm::Segmenter
    AddSample(std::shared_ptr< MediaSample > sample)shaka::media::webm::Segmenter
    cluster() (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    cluster_length_in_time_scale() const (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    cues() (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    diff --git a/docs/db/d78/classshaka_1_1media_1_1mp2t_1_1ContinuityCounter-members.html b/docs/db/d78/classshaka_1_1media_1_1mp2t_1_1ContinuityCounter-members.html index 45f17024ab..351b9f92ed 100644 --- a/docs/db/d78/classshaka_1_1media_1_1mp2t_1_1ContinuityCounter-members.html +++ b/docs/db/d78/classshaka_1_1media_1_1mp2t_1_1ContinuityCounter-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d7e/muxer__options_8cc_source.html b/docs/db/d7e/muxer__options_8cc_source.html index 3c49111669..ac8cec0d81 100644 --- a/docs/db/d7e/muxer__options_8cc_source.html +++ b/docs/db/d7e/muxer__options_8cc_source.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d84/classshaka_1_1media_1_1AACAudioSpecificConfig-members.html b/docs/db/d84/classshaka_1_1media_1_1AACAudioSpecificConfig-members.html index ef8bcd137c..28008e7811 100644 --- a/docs/db/d84/classshaka_1_1media_1_1AACAudioSpecificConfig-members.html +++ b/docs/db/d84/classshaka_1_1media_1_1AACAudioSpecificConfig-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d86/classshaka_1_1media_1_1NaluReader.html b/docs/db/d86/classshaka_1_1media_1_1NaluReader.html index 50113413d9..3e1925b0a9 100644 --- a/docs/db/d86/classshaka_1_1media_1_1NaluReader.html +++ b/docs/db/d86/classshaka_1_1media_1_1NaluReader.html @@ -228,7 +228,7 @@ static bool FindStartCode< diff --git a/docs/db/d8f/mp4__muxer_8h_source.html b/docs/db/d8f/mp4__muxer_8h_source.html index b60796ae81..646c18594b 100644 --- a/docs/db/d8f/mp4__muxer_8h_source.html +++ b/docs/db/d8f/mp4__muxer_8h_source.html @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    38  Status Initialize() override;
    39  Status Finalize() override;
    40  Status DoAddSample(const MediaStream* stream,
    -
    41  scoped_refptr<MediaSample> sample) override;
    +
    41  std::shared_ptr<MediaSample> sample) override;
    42 
    43  // Generate Audio/Video Track box.
    44  void InitializeTrak(const StreamInfo* info, Track* trak);
    @@ -160,20 +160,20 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    74 } // namespace shaka
    75 
    76 #endif // MEDIA_FORMATS_MP4_MP4_MUXER_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    MP4Muxer(const MuxerOptions &options)
    Create a MP4Muxer object from MuxerOptions.
    Definition: mp4_muxer.cc:82
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    - +
    Holds video stream information.
    Holds audio stream information.
    - + diff --git a/docs/db/d94/classshaka_1_1media_1_1ClusterBuilder.html b/docs/db/d94/classshaka_1_1media_1_1ClusterBuilder.html index 679b1ed13f..50f6ba6c02 100644 --- a/docs/db/d94/classshaka_1_1media_1_1ClusterBuilder.html +++ b/docs/db/d94/classshaka_1_1media_1_1ClusterBuilder.html @@ -125,7 +125,7 @@ std::unique_ptr< diff --git a/docs/db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html b/docs/db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html index 9e002a6fc5..bdb4ed2718 100644 --- a/docs/db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html +++ b/docs/db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html @@ -109,10 +109,10 @@ Inheritance diagram for shaka::media::mp4::Fragmenter: - - - - + + + +

    Detailed Description

    Fragmenter is responsible for the generation of MP4 fragments, i.e. 'traf' box and corresponding 'mdat' box.

    -

    Definition at line 31 of file fragmenter.h.

    +

    Definition at line 30 of file fragmenter.h.

    Constructor & Destructor Documentation

    - +

    Public Member Functions

     Fragmenter (scoped_refptr< StreamInfo > info, TrackFragment *traf)
     
    virtual Status AddSample (scoped_refptr< MediaSample > sample)
     
     Fragmenter (std::shared_ptr< StreamInfo > info, TrackFragment *traf)
     
    virtual Status AddSample (std::shared_ptr< MediaSample > sample)
     
    virtual Status InitializeFragment (int64_t first_sample_dts)
     
    @@ -156,16 +156,16 @@ Protected Member Functions
    - + @@ -194,7 +194,7 @@ Protected Member Functions

    Member Function Documentation

    - +
    shaka::media::mp4::Fragmenter::Fragmenter (scoped_refptr< StreamInfostd::shared_ptr< StreamInfo info,
    @@ -204,7 +204,7 @@ Protected Member Functions - + @@ -224,7 +224,7 @@ Protected Member Functions
    Returns
    OK on success, an error status otherwise.
    -

    Reimplemented in shaka::media::mp4::EncryptingFragmenter.

    +

    Reimplemented in shaka::media::mp4::EncryptingFragmenter.

    Definition at line 46 of file fragmenter.cc.

    @@ -301,7 +301,7 @@ template<typename T >

    Optimize sample entries table. If all values in entries are identical, then entries is cleared and the value is assigned to default_value; otherwise it is a NOP. Return true if the table is optimized.

    -

    Definition at line 101 of file fragmenter.h.

    +

    Definition at line 100 of file fragmenter.h.

    @@ -328,7 +328,7 @@ template<typename T >

    Set the flag use_decoding_timestamp_in_timeline, which if set to true, use decoding timestamp instead of presentation timestamp in media timeline, which is needed to workaround a Chromium bug that decoding timestamp is used in buffered range, https://crbug.com/398130.

    -

    Definition at line 69 of file fragmenter.h.

    +

    Definition at line 68 of file fragmenter.h.

    @@ -339,7 +339,7 @@ template<typename T > diff --git a/docs/db/d95/structshaka_1_1media_1_1mp4_1_1ChunkLargeOffset.html b/docs/db/d95/structshaka_1_1media_1_1mp4_1_1ChunkLargeOffset.html index bbcf2c8c06..c11365b2c4 100644 --- a/docs/db/d95/structshaka_1_1media_1_1mp4_1_1ChunkLargeOffset.html +++ b/docs/db/d95/structshaka_1_1media_1_1mp4_1_1ChunkLargeOffset.html @@ -185,7 +185,7 @@ Additional Inherited Members diff --git a/docs/db/d96/wvm__media__parser_8h_source.html b/docs/db/d96/wvm__media__parser_8h_source.html index c39a41c299..719f00e594 100644 --- a/docs/db/d96/wvm__media__parser_8h_source.html +++ b/docs/db/d96/wvm__media__parser_8h_source.html @@ -121,7 +121,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    33  uint32_t demux_stream_id;
    34  uint32_t parsed_audio_or_video_stream_id;
    -
    35  scoped_refptr<MediaSample> media_sample;
    +
    35  std::shared_ptr<MediaSample> media_sample;
    36 };
    37 
    @@ -129,8 +129,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    41  ~PrevSampleData();
    42  void Reset();
    -
    43  scoped_refptr<MediaSample> audio_sample;
    -
    44  scoped_refptr<MediaSample> video_sample;
    +
    43  std::shared_ptr<MediaSample> audio_sample;
    +
    44  std::shared_ptr<MediaSample> video_sample;
    45  uint32_t audio_stream_id;
    46  uint32_t video_stream_id;
    47  int64_t audio_sample_duration;
    @@ -142,8 +142,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    54  ~WvmMediaParser() override;
    55 
    -
    58  void Init(const InitCB& init_cb,
    -
    59  const NewSampleCB& new_sample_cb,
    +
    58  void Init(const InitCB& init_cb,
    +
    59  const NewSampleCB& new_sample_cb,
    60  KeySource* decryption_key_source) override;
    61  bool Flush() override WARN_UNUSED_RESULT;
    62  bool Parse(const uint8_t* buf, int size) override WARN_UNUSED_RESULT;
    @@ -292,17 +292,17 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    206  // to emit a new audio/video access unit.
    207  bool EmitSample(uint32_t parsed_audio_or_video_stream_id,
    208  uint32_t stream_id,
    -
    209  scoped_refptr<MediaSample>& new_sample,
    +
    209  const std::shared_ptr<MediaSample>& new_sample,
    210  bool isLastSample);
    211 
    212  bool EmitPendingSamples();
    213 
    214  bool EmitLastSample(uint32_t stream_id,
    -
    215  scoped_refptr<MediaSample>& new_sample);
    +
    215  const std::shared_ptr<MediaSample>& new_sample);
    216 
    217  // List of callbacks.t
    -
    218  InitCB init_cb_;
    -
    219  NewSampleCB new_sample_cb_;
    +
    218  InitCB init_cb_;
    +
    219  NewSampleCB new_sample_cb_;
    220 
    221  // Whether |init_cb_| has been invoked.
    222  bool is_initialized_;
    @@ -323,17 +323,17 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    237  uint64_t pts_;
    238  uint64_t dts_;
    239  uint8_t index_program_id_;
    -
    240  scoped_refptr<MediaSample> media_sample_;
    +
    240  std::shared_ptr<MediaSample> media_sample_;
    241  size_t crypto_unit_start_pos_;
    242  PrevSampleData prev_media_sample_data_;
    243  H264ByteToUnitStreamConverter byte_to_unit_stream_converter_;
    244 
    -
    245  std::vector<uint8_t, std::allocator<uint8_t> > ecm_;
    +
    245  std::vector<uint8_t, std::allocator<uint8_t>> ecm_;
    246  std::vector<uint8_t> psm_data_;
    247  std::vector<uint8_t> index_data_;
    248  std::map<std::string, uint32_t> program_demux_stream_map_;
    249  int stream_id_count_;
    -
    250  std::vector<scoped_refptr<StreamInfo> > stream_infos_;
    +
    250  std::vector<std::shared_ptr<StreamInfo>> stream_infos_;
    251  std::deque<DemuxStreamIdMediaSample> media_sample_queue_;
    252  std::vector<uint8_t> sample_data_;
    253  KeySource* decryption_key_source_;
    @@ -347,22 +347,22 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    261 } // namespace shaka
    262 
    263 #endif // MEDIA_FORMATS_WVM_WVM_MEDIA_PARSER_H_
    - +
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    -
    bool Flush() override WARN_UNUSED_RESULT
    -
    base::Callback< void(const std::vector< scoped_refptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    bool Flush() override WARN_UNUSED_RESULT
    +
    base::Callback< void(const std::vector< std::shared_ptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    -
    base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    diff --git a/docs/db/da4/classBandwidthEstimator-members.html b/docs/db/da4/classBandwidthEstimator-members.html index 770f4a29a9..cd6b08f01f 100644 --- a/docs/db/da4/classBandwidthEstimator-members.html +++ b/docs/db/da4/classBandwidthEstimator-members.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    Status shaka::media::mp4::Fragmenter::AddSample (scoped_refptr< MediaSamplestd::shared_ptr< MediaSample sample)
    diff --git a/docs/db/da6/memory__file_8h_source.html b/docs/db/da6/memory__file_8h_source.html index 57364bf938..7320d22fa5 100644 --- a/docs/db/da6/memory__file_8h_source.html +++ b/docs/db/da6/memory__file_8h_source.html @@ -154,7 +154,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.html b/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.html index a7b6ecdf90..16e0ec423a 100644 --- a/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.html +++ b/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.html @@ -99,7 +99,7 @@ Inheritance diagram for shaka::media::TextStreamInfo:
    -shaka::media::StreamInfo +shaka::media::StreamInfo
    @@ -282,7 +282,7 @@ void 
    set_language (con diff --git a/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.png b/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.png index 6ab3fb0cb5..5dcb2e888a 100644 Binary files a/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.png and b/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.png differ diff --git a/docs/db/dae/classshaka_1_1media_1_1WebMInfoParser.html b/docs/db/dae/classshaka_1_1media_1_1WebMInfoParser.html index b4506a5087..5d6a339a7e 100644 --- a/docs/db/dae/classshaka_1_1media_1_1WebMInfoParser.html +++ b/docs/db/dae/classshaka_1_1media_1_1WebMInfoParser.html @@ -175,7 +175,7 @@ The number of bytes parsed on success. diff --git a/docs/db/dae/structshaka_1_1media_1_1mp4_1_1SoundMediaHeader-members.html b/docs/db/dae/structshaka_1_1media_1_1mp4_1_1SoundMediaHeader-members.html index b76ffc3826..aaa41a31f7 100644 --- a/docs/db/dae/structshaka_1_1media_1_1mp4_1_1SoundMediaHeader-members.html +++ b/docs/db/dae/structshaka_1_1media_1_1mp4_1_1SoundMediaHeader-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/db/db1/structshaka_1_1media_1_1mp4_1_1CencSampleEncryptionInfoEntry-members.html b/docs/db/db1/structshaka_1_1media_1_1mp4_1_1CencSampleEncryptionInfoEntry-members.html index 03e8a9d116..03c26e5af7 100644 --- a/docs/db/db1/structshaka_1_1media_1_1mp4_1_1CencSampleEncryptionInfoEntry-members.html +++ b/docs/db/db1/structshaka_1_1media_1_1mp4_1_1CencSampleEncryptionInfoEntry-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/db8/structshaka_1_1media_1_1OnMediaEndParameters.html b/docs/db/db8/structshaka_1_1media_1_1OnMediaEndParameters.html index 1339af1579..b0f9d586a5 100644 --- a/docs/db/db8/structshaka_1_1media_1_1OnMediaEndParameters.html +++ b/docs/db/db8/structshaka_1_1media_1_1OnMediaEndParameters.html @@ -123,14 +123,14 @@ uint64_t file_size

    Detailed Description

    -

    Definition at line 76 of file muxer_listener_test_helper.h.

    +

    Definition at line 75 of file muxer_listener_test_helper.h.


    The documentation for this struct was generated from the following file: diff --git a/docs/db/db8/structshaka_1_1media_1_1mp4_1_1TrackEncryption.html b/docs/db/db8/structshaka_1_1media_1_1mp4_1_1TrackEncryption.html index df413139b6..2b5f17c4c7 100644 --- a/docs/db/db8/structshaka_1_1media_1_1mp4_1_1TrackEncryption.html +++ b/docs/db/db8/structshaka_1_1media_1_1mp4_1_1TrackEncryption.html @@ -197,7 +197,7 @@ Additional Inherited Members diff --git a/docs/db/dcb/classshaka_1_1media_1_1VPxParser.html b/docs/db/dcb/classshaka_1_1media_1_1VPxParser.html index 1d22b7ce47..5f00ecc7ae 100644 --- a/docs/db/dcb/classshaka_1_1media_1_1VPxParser.html +++ b/docs/db/dcb/classshaka_1_1media_1_1VPxParser.html @@ -205,7 +205,7 @@ Protected Member Functions diff --git a/docs/db/dcc/classshaka_1_1media_1_1webm_1_1Encryptor-members.html b/docs/db/dcc/classshaka_1_1media_1_1webm_1_1Encryptor-members.html index ffc4d6ed2e..9e3e9b0cec 100644 --- a/docs/db/dcc/classshaka_1_1media_1_1webm_1_1Encryptor-members.html +++ b/docs/db/dcc/classshaka_1_1media_1_1webm_1_1Encryptor-members.html @@ -94,14 +94,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::webm::Encryptor, including all inherited members.

    - +
    AddTrackInfo(mkvmuxer::Track *track)shaka::media::webm::Encryptor
    EncryptFrame(scoped_refptr< MediaSample > sample, bool encrypt_frame)shaka::media::webm::Encryptor
    EncryptFrame(std::shared_ptr< MediaSample > sample, bool encrypt_frame)shaka::media::webm::Encryptor
    Encryptor() (defined in shaka::media::webm::Encryptor)shaka::media::webm::Encryptor
    Initialize(MuxerListener *muxer_listener, KeySource::TrackType track_type, Codec codec, KeySource *key_source, bool webm_subsample_encryption)shaka::media::webm::Encryptor
    ~Encryptor() (defined in shaka::media::webm::Encryptor)shaka::media::webm::Encryptor
    diff --git a/docs/db/dcd/classshaka_1_1MpdWriter.html b/docs/db/dcd/classshaka_1_1MpdWriter.html index c1cd66369f..840bb700a3 100644 --- a/docs/db/dcd/classshaka_1_1MpdWriter.html +++ b/docs/db/dcd/classshaka_1_1MpdWriter.html @@ -123,7 +123,7 @@ class MpdWriterTest diff --git a/docs/db/dcd/structshaka_1_1media_1_1mp4_1_1DTSSpecific-members.html b/docs/db/dcd/structshaka_1_1media_1_1mp4_1_1DTSSpecific-members.html index 85c7331a1b..974172e2f5 100644 --- a/docs/db/dcd/structshaka_1_1media_1_1mp4_1_1DTSSpecific-members.html +++ b/docs/db/dcd/structshaka_1_1media_1_1mp4_1_1DTSSpecific-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dd0/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener.html b/docs/db/dd0/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener.html index bc9a2621a2..98edb61771 100644 --- a/docs/db/dd0/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener.html +++ b/docs/db/dd0/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener.html @@ -531,7 +531,7 @@ Additional Inherited Members diff --git a/docs/db/dd2/chunk__info__iterator_8h_source.html b/docs/db/dd2/chunk__info__iterator_8h_source.html index 627aaa8e22..dcc45e34c6 100644 --- a/docs/db/dd2/chunk__info__iterator_8h_source.html +++ b/docs/db/dd2/chunk__info__iterator_8h_source.html @@ -161,7 +161,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dd9/sync__sample__iterator_8h_source.html b/docs/db/dd9/sync__sample__iterator_8h_source.html index 00e2b268a2..ee8f7053b2 100644 --- a/docs/db/dd9/sync__sample__iterator_8h_source.html +++ b/docs/db/dd9/sync__sample__iterator_8h_source.html @@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dde/h265__parser_8cc_source.html b/docs/db/dde/h265__parser_8cc_source.html index 677a41804f..61654be00b 100644 --- a/docs/db/dde/h265__parser_8cc_source.html +++ b/docs/db/dde/h265__parser_8cc_source.html @@ -1212,7 +1212,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dec/audio__timestamp__helper_8cc_source.html b/docs/db/dec/audio__timestamp__helper_8cc_source.html index cbf59fc5fb..1ed054ced7 100644 --- a/docs/db/dec/audio__timestamp__helper_8cc_source.html +++ b/docs/db/dec/audio__timestamp__helper_8cc_source.html @@ -165,7 +165,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dee/pes__packet_8cc_source.html b/docs/db/dee/pes__packet_8cc_source.html index 2b63787241..cd017818a5 100644 --- a/docs/db/dee/pes__packet_8cc_source.html +++ b/docs/db/dee/pes__packet_8cc_source.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/df2/structshaka_1_1media_1_1H265SliceHeader-members.html b/docs/db/df2/structshaka_1_1media_1_1H265SliceHeader-members.html index 3d70765e56..87d438f1b4 100644 --- a/docs/db/df2/structshaka_1_1media_1_1H265SliceHeader-members.html +++ b/docs/db/df2/structshaka_1_1media_1_1H265SliceHeader-members.html @@ -139,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/df6/classshaka_1_1media_1_1Cluster-members.html b/docs/db/df6/classshaka_1_1media_1_1Cluster-members.html index a57b78c23d..f5a140c395 100644 --- a/docs/db/df6/classshaka_1_1media_1_1Cluster-members.html +++ b/docs/db/df6/classshaka_1_1media_1_1Cluster-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/df6/muxer_8h_source.html b/docs/db/df6/muxer_8h_source.html index e11d6ab19e..6fb2bff263 100644 --- a/docs/db/df6/muxer_8h_source.html +++ b/docs/db/df6/muxer_8h_source.html @@ -101,127 +101,126 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    12 #include <memory>
    13 #include <vector>
    14 
    -
    15 #include "packager/base/memory/ref_counted.h"
    -
    16 #include "packager/base/time/clock.h"
    -
    17 #include "packager/media/base/fourccs.h"
    -
    18 #include "packager/media/base/muxer_options.h"
    -
    19 #include "packager/media/base/status.h"
    -
    20 #include "packager/media/event/muxer_listener.h"
    -
    21 #include "packager/media/event/progress_listener.h"
    -
    22 
    -
    23 namespace shaka {
    -
    24 namespace media {
    -
    25 
    -
    26 class KeySource;
    -
    27 class MediaSample;
    -
    28 class MediaStream;
    -
    29 
    -
    33 class Muxer {
    -
    34  public:
    -
    35  explicit Muxer(const MuxerOptions& options);
    -
    36  virtual ~Muxer();
    -
    37 
    -
    38  // TODO(kqyang): refactor max_sd_pixels through crypto_period_duration into
    -
    39  // an encapsulated EncryptionParams structure.
    -
    40 
    -
    61  void SetKeySource(KeySource* encryption_key_source,
    -
    62  uint32_t max_sd_pixels,
    -
    63  uint32_t max_hd_pixels,
    -
    64  uint32_t max_uhd1_pixels,
    -
    65  double clear_lead_in_seconds,
    -
    66  double crypto_period_duration_in_seconds,
    -
    67  FourCC protection_scheme);
    -
    68 
    -
    70  void AddStream(MediaStream* stream);
    -
    71 
    -
    73  Status Run();
    -
    74 
    -
    77  void Cancel();
    -
    78 
    -
    81  void SetMuxerListener(std::unique_ptr<MuxerListener> muxer_listener);
    -
    82 
    -
    85  void SetProgressListener(std::unique_ptr<ProgressListener> progress_listener);
    -
    86 
    -
    87  const std::vector<MediaStream*>& streams() const { return streams_; }
    -
    88 
    -
    95  void set_clock(base::Clock* clock) {
    -
    96  clock_ = clock;
    -
    97  }
    -
    98 
    -
    99  protected:
    -
    100  const MuxerOptions& options() const { return options_; }
    -
    101  KeySource* encryption_key_source() {
    -
    102  return encryption_key_source_;
    -
    103  }
    -
    104  uint32_t max_sd_pixels() const { return max_sd_pixels_; }
    -
    105  uint32_t max_hd_pixels() const { return max_hd_pixels_; }
    -
    106  uint32_t max_uhd1_pixels() const { return max_uhd1_pixels_; }
    -
    107  double clear_lead_in_seconds() const { return clear_lead_in_seconds_; }
    -
    108  double crypto_period_duration_in_seconds() const {
    -
    109  return crypto_period_duration_in_seconds_;
    -
    110  }
    -
    111  MuxerListener* muxer_listener() { return muxer_listener_.get(); }
    -
    112  ProgressListener* progress_listener() { return progress_listener_.get(); }
    -
    113  base::Clock* clock() { return clock_; }
    -
    114  FourCC protection_scheme() const { return protection_scheme_; }
    -
    115 
    -
    116  private:
    -
    117  friend class MediaStream; // Needed to access AddSample.
    -
    118 
    -
    119  // Add new media sample.
    -
    120  Status AddSample(const MediaStream* stream,
    -
    121  scoped_refptr<MediaSample> sample);
    -
    122 
    -
    123  // Initialize the muxer.
    -
    124  virtual Status Initialize() = 0;
    -
    125 
    -
    126  // Final clean up.
    -
    127  virtual Status Finalize() = 0;
    -
    128 
    -
    129  // AddSample implementation.
    -
    130  virtual Status DoAddSample(const MediaStream* stream,
    -
    131  scoped_refptr<MediaSample> sample) = 0;
    -
    132 
    -
    133  MuxerOptions options_;
    -
    134  bool initialized_;
    -
    135  std::vector<MediaStream*> streams_;
    -
    136  KeySource* encryption_key_source_;
    -
    137  uint32_t max_sd_pixels_;
    -
    138  uint32_t max_hd_pixels_;
    -
    139  uint32_t max_uhd1_pixels_;
    -
    140  double clear_lead_in_seconds_;
    -
    141  double crypto_period_duration_in_seconds_;
    -
    142  FourCC protection_scheme_;
    -
    143  bool cancelled_;
    -
    144 
    -
    145  std::unique_ptr<MuxerListener> muxer_listener_;
    -
    146  std::unique_ptr<ProgressListener> progress_listener_;
    -
    147  // An external injected clock, can be NULL.
    -
    148  base::Clock* clock_;
    -
    149 
    -
    150  DISALLOW_COPY_AND_ASSIGN(Muxer);
    -
    151 };
    -
    152 
    -
    153 } // namespace media
    -
    154 } // namespace shaka
    -
    155 
    -
    156 #endif // MEDIA_BASE_MUXER_H_
    +
    15 #include "packager/base/time/clock.h"
    +
    16 #include "packager/media/base/fourccs.h"
    +
    17 #include "packager/media/base/muxer_options.h"
    +
    18 #include "packager/media/base/status.h"
    +
    19 #include "packager/media/event/muxer_listener.h"
    +
    20 #include "packager/media/event/progress_listener.h"
    +
    21 
    +
    22 namespace shaka {
    +
    23 namespace media {
    +
    24 
    +
    25 class KeySource;
    +
    26 class MediaSample;
    +
    27 class MediaStream;
    +
    28 
    +
    32 class Muxer {
    +
    33  public:
    +
    34  explicit Muxer(const MuxerOptions& options);
    +
    35  virtual ~Muxer();
    +
    36 
    +
    37  // TODO(kqyang): refactor max_sd_pixels through crypto_period_duration into
    +
    38  // an encapsulated EncryptionParams structure.
    +
    39 
    +
    60  void SetKeySource(KeySource* encryption_key_source,
    +
    61  uint32_t max_sd_pixels,
    +
    62  uint32_t max_hd_pixels,
    +
    63  uint32_t max_uhd1_pixels,
    +
    64  double clear_lead_in_seconds,
    +
    65  double crypto_period_duration_in_seconds,
    +
    66  FourCC protection_scheme);
    +
    67 
    +
    69  void AddStream(MediaStream* stream);
    +
    70 
    +
    72  Status Run();
    +
    73 
    +
    76  void Cancel();
    +
    77 
    +
    80  void SetMuxerListener(std::unique_ptr<MuxerListener> muxer_listener);
    +
    81 
    +
    84  void SetProgressListener(std::unique_ptr<ProgressListener> progress_listener);
    +
    85 
    +
    86  const std::vector<MediaStream*>& streams() const { return streams_; }
    +
    87 
    +
    94  void set_clock(base::Clock* clock) {
    +
    95  clock_ = clock;
    +
    96  }
    +
    97 
    +
    98  protected:
    +
    99  const MuxerOptions& options() const { return options_; }
    +
    100  KeySource* encryption_key_source() {
    +
    101  return encryption_key_source_;
    +
    102  }
    +
    103  uint32_t max_sd_pixels() const { return max_sd_pixels_; }
    +
    104  uint32_t max_hd_pixels() const { return max_hd_pixels_; }
    +
    105  uint32_t max_uhd1_pixels() const { return max_uhd1_pixels_; }
    +
    106  double clear_lead_in_seconds() const { return clear_lead_in_seconds_; }
    +
    107  double crypto_period_duration_in_seconds() const {
    +
    108  return crypto_period_duration_in_seconds_;
    +
    109  }
    +
    110  MuxerListener* muxer_listener() { return muxer_listener_.get(); }
    +
    111  ProgressListener* progress_listener() { return progress_listener_.get(); }
    +
    112  base::Clock* clock() { return clock_; }
    +
    113  FourCC protection_scheme() const { return protection_scheme_; }
    +
    114 
    +
    115  private:
    +
    116  friend class MediaStream; // Needed to access AddSample.
    +
    117 
    +
    118  // Add new media sample.
    +
    119  Status AddSample(const MediaStream* stream,
    +
    120  std::shared_ptr<MediaSample> sample);
    +
    121 
    +
    122  // Initialize the muxer.
    +
    123  virtual Status Initialize() = 0;
    +
    124 
    +
    125  // Final clean up.
    +
    126  virtual Status Finalize() = 0;
    +
    127 
    +
    128  // AddSample implementation.
    +
    129  virtual Status DoAddSample(const MediaStream* stream,
    +
    130  std::shared_ptr<MediaSample> sample) = 0;
    +
    131 
    +
    132  MuxerOptions options_;
    +
    133  bool initialized_;
    +
    134  std::vector<MediaStream*> streams_;
    +
    135  KeySource* encryption_key_source_;
    +
    136  uint32_t max_sd_pixels_;
    +
    137  uint32_t max_hd_pixels_;
    +
    138  uint32_t max_uhd1_pixels_;
    +
    139  double clear_lead_in_seconds_;
    +
    140  double crypto_period_duration_in_seconds_;
    +
    141  FourCC protection_scheme_;
    +
    142  bool cancelled_;
    +
    143 
    +
    144  std::unique_ptr<MuxerListener> muxer_listener_;
    +
    145  std::unique_ptr<ProgressListener> progress_listener_;
    +
    146  // An external injected clock, can be NULL.
    +
    147  base::Clock* clock_;
    +
    148 
    +
    149  DISALLOW_COPY_AND_ASSIGN(Muxer);
    +
    150 };
    +
    151 
    +
    152 } // namespace media
    +
    153 } // namespace shaka
    +
    154 
    +
    155 #endif // MEDIA_BASE_MUXER_H_
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    void AddStream(MediaStream *stream)
    Add video/audio stream.
    Definition: muxer.cc:50
    Status Run()
    Drive the remuxing from muxer side (pull).
    Definition: muxer.cc:56
    void SetProgressListener(std::unique_ptr< ProgressListener > progress_listener)
    Definition: muxer.cc:98
    - +
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    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)
    Definition: muxer.cc:33
    -
    void set_clock(base::Clock *clock)
    Definition: muxer.h:95
    - +
    void set_clock(base::Clock *clock)
    Definition: muxer.h:94
    +
    void SetMuxerListener(std::unique_ptr< MuxerListener > muxer_listener)
    Definition: muxer.cc:94
    diff --git a/docs/db/df8/classshaka_1_1media_1_1H265ByteToUnitStreamConverter.html b/docs/db/df8/classshaka_1_1media_1_1H265ByteToUnitStreamConverter.html index a79bc6210f..84c6b27ce9 100644 --- a/docs/db/df8/classshaka_1_1media_1_1H265ByteToUnitStreamConverter.html +++ b/docs/db/df8/classshaka_1_1media_1_1H265ByteToUnitStreamConverter.html @@ -119,9 +119,9 @@ Public Member Functions

    Additional Inherited Members

    - Static Public Attributes inherited from shaka::media::H26xByteToUnitStreamConverter - -static const size_t kUnitStreamNaluLengthSize = 4 -  + +static constexpr size_t kUnitStreamNaluLengthSize = 4 + 

    Detailed Description

    Class which converts H.265 byte streams (as specified in ISO/IEC 14496-10 Annex B) into H.265 NAL unit streams (as specified in ISO/IEC 14496-15).

    @@ -171,7 +171,7 @@ static const size_t kUnitS
    diff --git a/docs/db/dfb/mpd__utils_8cc_source.html b/docs/db/dfb/mpd__utils_8cc_source.html index e98e6008d2..a6d461d778 100644 --- a/docs/db/dfb/mpd__utils_8cc_source.html +++ b/docs/db/dfb/mpd__utils_8cc_source.html @@ -453,7 +453,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dfc/mpd__notify__muxer__listener_8cc_source.html b/docs/db/dfc/mpd__notify__muxer__listener_8cc_source.html index 57ff215ada..dd4ee07ce0 100644 --- a/docs/db/dfc/mpd__notify__muxer__listener_8cc_source.html +++ b/docs/db/dfc/mpd__notify__muxer__listener_8cc_source.html @@ -259,7 +259,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    170 } // namespace shaka
    void OnNewSegment(const std::string &file_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size) override
    virtual bool Flush()=0
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    virtual bool NotifyNewSegment(uint32_t container_id, uint64_t start_time, uint64_t duration, uint64_t size)=0
    void OnMediaEnd(bool has_init_range, uint64_t init_range_start, uint64_t init_range_end, bool has_index_range, uint64_t index_range_start, uint64_t index_range_end, float duration_seconds, uint64_t file_size) override
    virtual bool NotifySampleDuration(uint32_t container_id, uint32_t sample_duration)=0
    @@ -278,7 +278,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dff/structshaka_1_1media_1_1mp4_1_1ChunkInfo-members.html b/docs/db/dff/structshaka_1_1media_1_1mp4_1_1ChunkInfo-members.html index 700861db6e..76107bcd62 100644 --- a/docs/db/dff/structshaka_1_1media_1_1mp4_1_1ChunkInfo-members.html +++ b/docs/db/dff/structshaka_1_1media_1_1mp4_1_1ChunkInfo-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d02/classshaka_1_1media_1_1IoCache-members.html b/docs/dc/d02/classshaka_1_1media_1_1IoCache-members.html index 79c211a32b..c529e4186e 100644 --- a/docs/dc/d02/classshaka_1_1media_1_1IoCache-members.html +++ b/docs/dc/d02/classshaka_1_1media_1_1IoCache-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d03/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter.html b/docs/dc/d03/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter.html index ce1429ce38..87eace0335 100644 --- a/docs/dc/d03/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter.html +++ b/docs/dc/d03/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter.html @@ -138,7 +138,7 @@ static const uint8_t kElem diff --git a/docs/dc/d06/classshaka_1_1media_1_1StreamInfo-members.html b/docs/dc/d06/classshaka_1_1media_1_1StreamInfo-members.html index 1a0343ec00..06883e0de7 100644 --- a/docs/dc/d06/classshaka_1_1media_1_1StreamInfo-members.html +++ b/docs/dc/d06/classshaka_1_1media_1_1StreamInfo-members.html @@ -93,29 +93,28 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::StreamInfo, including all inherited members.

    - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
    base::RefCountedThreadSafe< StreamInfo > (defined in shaka::media::StreamInfo)shaka::media::StreamInfofriend
    codec() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    codec_config() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    codec_string() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    duration() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    is_encrypted() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    IsValidConfig() const =0shaka::media::StreamInfopure virtual
    language() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_codec(Codec codec) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_codec_config(const std::vector< uint8_t > &data) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_codec_string(const std::string &codec_string) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_duration(int duration) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_language(const std::string &language) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    stream_type() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    StreamInfo(StreamType stream_type, int track_id, uint32_t time_scale, uint64_t duration, Codec codec, const std::string &codec_string, const uint8_t *codec_config, size_t codec_config_size, const std::string &language, bool is_encrypted) (defined in shaka::media::StreamInfo)shaka::media::StreamInfo
    time_scale() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    ToString() const shaka::media::StreamInfovirtual
    track_id() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    ~StreamInfo() (defined in shaka::media::StreamInfo)shaka::media::StreamInfoprotectedvirtual
    codec() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    codec_config() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    codec_string() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    duration() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    is_encrypted() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    IsValidConfig() const =0shaka::media::StreamInfopure virtual
    language() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_codec(Codec codec) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_codec_config(const std::vector< uint8_t > &data) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_codec_string(const std::string &codec_string) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_duration(int duration) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    set_language(const std::string &language) (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    stream_type() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    StreamInfo(StreamType stream_type, int track_id, uint32_t time_scale, uint64_t duration, Codec codec, const std::string &codec_string, const uint8_t *codec_config, size_t codec_config_size, const std::string &language, bool is_encrypted) (defined in shaka::media::StreamInfo)shaka::media::StreamInfo
    time_scale() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    ToString() const shaka::media::StreamInfovirtual
    track_id() const (defined in shaka::media::StreamInfo)shaka::media::StreamInfoinline
    ~StreamInfo() (defined in shaka::media::StreamInfo)shaka::media::StreamInfovirtual
    diff --git a/docs/dc/d0b/classshaka_1_1media_1_1ESDescriptor-members.html b/docs/dc/d0b/classshaka_1_1media_1_1ESDescriptor-members.html index f219e48813..b7e4e9d3ac 100644 --- a/docs/dc/d0b/classshaka_1_1media_1_1ESDescriptor-members.html +++ b/docs/dc/d0b/classshaka_1_1media_1_1ESDescriptor-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d16/classshaka_1_1media_1_1SeekHead.html b/docs/dc/d16/classshaka_1_1media_1_1SeekHead.html index 5ad2d340f8..fb215a9d91 100644 --- a/docs/dc/d16/classshaka_1_1media_1_1SeekHead.html +++ b/docs/dc/d16/classshaka_1_1media_1_1SeekHead.html @@ -149,7 +149,7 @@ void set_tracks_pos (u diff --git a/docs/dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html b/docs/dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html index c6ee57b2a6..b51ce80c87 100644 --- a/docs/dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html +++ b/docs/dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html @@ -105,7 +105,7 @@ Inheritance diagram for shaka::media::wvm::WvmMediaParser:

    Public Member Functions

    MediaParser implementation overrides.
    -void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override +void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override   bool Flush () override WARN_UNUSED_RESULT   @@ -115,14 +115,15 @@ Public Member Functions

    Additional Inherited Members

    - Public Types inherited from shaka::media::MediaParser -typedef base::Callback< void(const
    -std::vector< scoped_refptr
    -< StreamInfo > > &stream_info)> InitCB -  -typedef base::Callback< bool(uint32_t
    -track_id, const scoped_refptr
    -< MediaSample > &media_sample)> NewSampleCB -  +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

    Detailed Description

    @@ -153,7 +154,7 @@ track_id, const scoped_refptr

    Implements shaka::media::MediaParser.

    -

    Definition at line 518 of file wvm_media_parser.cc.

    +

    Definition at line 519 of file wvm_media_parser.cc.

    @@ -167,13 +168,13 @@ track_id, const scoped_refptr
    void shaka::media::wvm::WvmMediaParser::Init ( - const InitCB &  + const InitCBinit_cb, - const NewSampleCB &  + const NewSampleCBnew_sample_cb, @@ -256,7 +257,7 @@ track_id, const scoped_refptr
    diff --git a/docs/dc/d18/structshaka_1_1media_1_1mp4_1_1ProtectionSchemeInfo-members.html b/docs/dc/d18/structshaka_1_1media_1_1mp4_1_1ProtectionSchemeInfo-members.html index b61a2b4aec..80feb5fa31 100644 --- a/docs/dc/d18/structshaka_1_1media_1_1mp4_1_1ProtectionSchemeInfo-members.html +++ b/docs/dc/d18/structshaka_1_1media_1_1mp4_1_1ProtectionSchemeInfo-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d19/box_8h_source.html b/docs/dc/d19/box_8h_source.html index 08e9bf1c6b..cd5e5f248b 100644 --- a/docs/dc/d19/box_8h_source.html +++ b/docs/dc/d19/box_8h_source.html @@ -184,7 +184,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d22/dash__iop__mpd__notifier_8cc_source.html b/docs/dc/d22/dash__iop__mpd__notifier_8cc_source.html index 580241a010..dc8124ae46 100644 --- a/docs/dc/d22/dash__iop__mpd__notifier_8cc_source.html +++ b/docs/dc/d22/dash__iop__mpd__notifier_8cc_source.html @@ -383,7 +383,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d3b/fixed__key__encryption__flags_8cc_source.html b/docs/dc/d3b/fixed__key__encryption__flags_8cc_source.html index b7625308f9..95514c6631 100644 --- a/docs/dc/d3b/fixed__key__encryption__flags_8cc_source.html +++ b/docs/dc/d3b/fixed__key__encryption__flags_8cc_source.html @@ -166,7 +166,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d3c/webm__cluster__parser_8h_source.html b/docs/dc/d3c/webm__cluster__parser_8h_source.html index fa953382f8..87710b2a11 100644 --- a/docs/dc/d3c/webm__cluster__parser_8h_source.html +++ b/docs/dc/d3c/webm__cluster__parser_8h_source.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    41  Track(int track_num,
    42  bool is_video,
    43  int64_t default_duration,
    -
    44  const MediaParser::NewSampleCB& new_sample_cb);
    +
    44  const MediaParser::NewSampleCB& new_sample_cb);
    45  ~Track();
    46 
    47  int track_num() const { return track_num_; }
    @@ -134,7 +134,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    50  // relative to |buffer|'s timestamp, and emits it and unsets
    51  // |last_added_buffer_missing_duration_|. Otherwise, if |buffer| is missing
    52  // duration, saves |buffer| into |last_added_buffer_missing_duration_|.
    -
    53  bool EmitBuffer(const scoped_refptr<MediaSample>& buffer);
    +
    53  bool EmitBuffer(const std::shared_ptr<MediaSample>& buffer);
    54 
    55  // If |last_added_buffer_missing_duration_| is set, estimate the duration
    56  // for this buffer using helper function GetDurationEstimate() then emits it
    @@ -151,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    67  // |estimated_next_frame_duration_|, and emits |buffer|.
    68  // Returns false if |buffer| failed sanity check and therefore was not
    69  // emitted. Returns true otherwise.
    -
    70  bool EmitBufferHelp(const scoped_refptr<MediaSample>& buffer);
    +
    70  bool EmitBufferHelp(const std::shared_ptr<MediaSample>& buffer);
    71 
    72  // Helper function that calculates the buffer duration to use in
    73  // ApplyDurationEstimateIfNeeded().
    @@ -163,7 +163,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    79  // Holding the sample that is missing duration. The duration will be
    80  // computed from the difference in timestamp when next sample arrives; or
    81  // estimated if it is the last sample in this track.
    -
    82  scoped_refptr<MediaSample> last_added_buffer_missing_duration_;
    +
    82  std::shared_ptr<MediaSample> last_added_buffer_missing_duration_;
    83 
    84  // If kNoTimestamp, then |estimated_next_frame_duration_| will be used.
    85  int64_t default_duration_;
    @@ -173,25 +173,25 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    89  // only if |default_duration_| is kNoTimestamp.
    90  int64_t estimated_next_frame_duration_;
    91 
    -
    92  MediaParser::NewSampleCB new_sample_cb_;
    +
    92  MediaParser::NewSampleCB new_sample_cb_;
    93  };
    94 
    95  typedef std::map<int, Track> TextTrackMap;
    96 
    97  public:
    -
    120  WebMClusterParser(int64_t timecode_scale,
    -
    121  scoped_refptr<AudioStreamInfo> audio_stream_info,
    -
    122  scoped_refptr<VideoStreamInfo> video_stream_info,
    +
    120  WebMClusterParser(int64_t timecode_scale,
    +
    121  std::shared_ptr<AudioStreamInfo> audio_stream_info,
    +
    122  std::shared_ptr<VideoStreamInfo> video_stream_info,
    123  int64_t audio_default_duration,
    124  int64_t video_default_duration,
    125  const WebMTracksParser::TextTracks& text_tracks,
    126  const std::set<int64_t>& ignored_tracks,
    127  const std::string& audio_encryption_key_id,
    128  const std::string& video_encryption_key_id,
    -
    129  const MediaParser::NewSampleCB& new_sample_cb,
    -
    130  const MediaParser::InitCB& init_cb,
    +
    129  const MediaParser::NewSampleCB& new_sample_cb,
    +
    130  const MediaParser::InitCB& init_cb,
    131  KeySource* decryption_key_source);
    -
    132  ~WebMClusterParser() override;
    +
    132  ~WebMClusterParser() override;
    133 
    135  void Reset();
    136 
    @@ -239,8 +239,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    186  // Multiplier used to convert timecodes into microseconds.
    187  double timecode_multiplier_;
    188 
    -
    189  scoped_refptr<AudioStreamInfo> audio_stream_info_;
    -
    190  scoped_refptr<VideoStreamInfo> video_stream_info_;
    +
    189  std::shared_ptr<AudioStreamInfo> audio_stream_info_;
    +
    190  std::shared_ptr<VideoStreamInfo> video_stream_info_;
    191  std::set<int64_t> ignored_tracks_;
    192 
    193  std::unique_ptr<DecryptorSource> decryptor_source_;
    @@ -253,7 +253,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    200  // have codec configuration of video stream, which is extracted from the first
    201  // video sample.
    202  bool initialized_;
    -
    203  MediaParser::InitCB init_cb_;
    +
    203  MediaParser::InitCB init_cb_;
    204 
    205  int64_t last_block_timecode_ = -1;
    206  std::unique_ptr<uint8_t[]> block_data_;
    @@ -288,20 +288,20 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    235 #endif // MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_
    -
    base::Callback< void(const std::vector< scoped_refptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    int Parse(const uint8_t *buf, int size)
    +
    base::Callback< void(const std::vector< std::shared_ptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    bool Flush() WARN_UNUSED_RESULT
    -
    base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    -
    WebMClusterParser(int64_t timecode_scale, scoped_refptr< AudioStreamInfo > audio_stream_info, scoped_refptr< VideoStreamInfo > video_stream_info, int64_t audio_default_duration, int64_t video_default_duration, const WebMTracksParser::TextTracks &text_tracks, const std::set< int64_t > &ignored_tracks, const std::string &audio_encryption_key_id, const std::string &video_encryption_key_id, const MediaParser::NewSampleCB &new_sample_cb, const MediaParser::InitCB &init_cb, KeySource *decryption_key_source)
    +
    WebMClusterParser(int64_t timecode_scale, std::shared_ptr< AudioStreamInfo > audio_stream_info, std::shared_ptr< VideoStreamInfo > video_stream_info, int64_t audio_default_duration, int64_t video_default_duration, const WebMTracksParser::TextTracks &text_tracks, const std::set< int64_t > &ignored_tracks, const std::string &audio_encryption_key_id, const std::string &video_encryption_key_id, const MediaParser::NewSampleCB &new_sample_cb, const MediaParser::InitCB &init_cb, KeySource *decryption_key_source)
    void Reset()
    Resets the parser state so it can accept a new cluster.
    diff --git a/docs/dc/d3f/key__source_8h_source.html b/docs/dc/d3f/key__source_8h_source.html index 58075459b0..f6f2a9ce98 100644 --- a/docs/dc/d3f/key__source_8h_source.html +++ b/docs/dc/d3f/key__source_8h_source.html @@ -170,7 +170,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d40/classshaka_1_1xml_1_1XmlNode-members.html b/docs/dc/d40/classshaka_1_1xml_1_1XmlNode-members.html index ba875a7d4c..f7eff00ab9 100644 --- a/docs/dc/d40/classshaka_1_1xml_1_1XmlNode-members.html +++ b/docs/dc/d40/classshaka_1_1xml_1_1XmlNode-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d41/classshaka_1_1media_1_1BufferWriter.html b/docs/dc/d41/classshaka_1_1media_1_1BufferWriter.html index 5629a1f91e..aad9f8ad28 100644 --- a/docs/dc/d41/classshaka_1_1media_1_1BufferWriter.html +++ b/docs/dc/d41/classshaka_1_1media_1_1BufferWriter.html @@ -301,7 +301,7 @@ void AppendInt (int64_ diff --git a/docs/dc/d4a/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader-members.html b/docs/dc/d4a/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader-members.html index e687c65534..d5e838e8ef 100644 --- a/docs/dc/d4a/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader-members.html +++ b/docs/dc/d4a/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d4f/structshaka_1_1media_1_1mp4_1_1TrackHeader-members.html b/docs/dc/d4f/structshaka_1_1media_1_1mp4_1_1TrackHeader-members.html index 0c83e8ec04..8fc0623923 100644 --- a/docs/dc/d4f/structshaka_1_1media_1_1mp4_1_1TrackHeader-members.html +++ b/docs/dc/d4f/structshaka_1_1media_1_1mp4_1_1TrackHeader-members.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d51/h265__byte__to__unit__stream__converter_8cc_source.html b/docs/dc/d51/h265__byte__to__unit__stream__converter_8cc_source.html index 5b861159b0..99c31301ae 100644 --- a/docs/dc/d51/h265__byte__to__unit__stream__converter_8cc_source.html +++ b/docs/dc/d51/h265__byte__to__unit__stream__converter_8cc_source.html @@ -226,7 +226,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d52/decoding__time__iterator_8h_source.html b/docs/dc/d52/decoding__time__iterator_8h_source.html index a5fa66a520..2f2f0c9cc2 100644 --- a/docs/dc/d52/decoding__time__iterator_8h_source.html +++ b/docs/dc/d52/decoding__time__iterator_8h_source.html @@ -147,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d53/webm_2segmenter_8cc_source.html b/docs/dc/d53/webm_2segmenter_8cc_source.html index 56c30ab87f..58e5128b12 100644 --- a/docs/dc/d53/webm_2segmenter_8cc_source.html +++ b/docs/dc/d53/webm_2segmenter_8cc_source.html @@ -210,7 +210,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    121  return DoFinalize();
    122 }
    123 
    -
    124 Status Segmenter::AddSample(scoped_refptr<MediaSample> sample) {
    +
    124 Status Segmenter::AddSample(std::shared_ptr<MediaSample> sample) {
    125  if (sample_duration_ == 0) {
    126  first_timestamp_ = sample->pts();
    127  sample_duration_ = sample->duration();
    @@ -541,15 +541,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    452 } // namespace webm
    453 } // namespace media
    454 } // namespace shaka
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    void UpdateProgress(uint64_t progress)
    Update segmentation progress using ProgressListener.
    Definition: segmenter.cc:390
    virtual void OnSampleDurationReady(uint32_t sample_duration)=0
    Class for parsing or writing VP codec configuration record.
    virtual void OnEncryptionStart()=0
    -
    Status AddSample(const MediaStream *stream, scoped_refptr< MediaSample > sample)
    Definition: segmenter.cc:323
    - +
    This class listens to progress updates events.
    mkvmuxer::int64 Position() const override
    Definition: mkv_writer.cc:71
    Status Initialize(const std::vector< MediaStream * > &streams, MuxerListener *muxer_listener, ProgressListener *progress_listener, 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)
    Definition: segmenter.cc:165
    @@ -559,17 +558,18 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    virtual void OnProgress(double progress)=0
    - +
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    double GetDuration() const
    Definition: segmenter.cc:381
    Holds video stream information.
    +
    Status AddSample(const MediaStream *stream, std::shared_ptr< MediaSample > sample)
    Definition: segmenter.cc:323
    diff --git a/docs/dc/d54/structshaka_1_1media_1_1H264DecRefPicMarking.html b/docs/dc/d54/structshaka_1_1media_1_1H264DecRefPicMarking.html index 360259a5fc..c8fb471ffb 100644 --- a/docs/dc/d54/structshaka_1_1media_1_1H264DecRefPicMarking.html +++ b/docs/dc/d54/structshaka_1_1media_1_1H264DecRefPicMarking.html @@ -121,7 +121,7 @@ int max_long_term_frame_id diff --git a/docs/dc/d58/webm__media__parser_8h_source.html b/docs/dc/d58/webm__media__parser_8h_source.html index cbc3011cef..0ccdcf5045 100644 --- a/docs/dc/d58/webm__media__parser_8h_source.html +++ b/docs/dc/d58/webm__media__parser_8h_source.html @@ -96,90 +96,89 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    7 
    8 #include "packager/base/callback_forward.h"
    9 #include "packager/base/compiler_specific.h"
    -
    10 #include "packager/base/memory/ref_counted.h"
    -
    11 #include "packager/media/base/byte_queue.h"
    -
    12 #include "packager/media/base/media_parser.h"
    -
    13 
    -
    14 namespace shaka {
    -
    15 namespace media {
    -
    16 
    -
    17 class WebMClusterParser;
    -
    18 
    -
    19 class WebMMediaParser : public MediaParser {
    -
    20  public:
    - -
    22  ~WebMMediaParser() override;
    -
    23 
    -
    26  void Init(const InitCB& init_cb,
    -
    27  const NewSampleCB& new_sample_cb,
    -
    28  KeySource* decryption_key_source) override;
    -
    29  bool Flush() override WARN_UNUSED_RESULT;
    -
    30  bool Parse(const uint8_t* buf, int size) override WARN_UNUSED_RESULT;
    -
    32 
    -
    33  private:
    -
    34  enum State {
    -
    35  kWaitingForInit,
    -
    36  kParsingHeaders,
    -
    37  kParsingClusters,
    -
    38  kError
    -
    39  };
    -
    40 
    -
    41  void ChangeState(State new_state);
    -
    42 
    -
    43  // Parses WebM Header, Info, Tracks elements. It also skips other level 1
    -
    44  // elements that are not used right now. Once the Info & Tracks elements have
    -
    45  // been parsed, this method will transition the parser from PARSING_HEADERS to
    -
    46  // PARSING_CLUSTERS.
    -
    47  //
    -
    48  // Returns < 0 if the parse fails.
    -
    49  // Returns 0 if more data is needed.
    -
    50  // Returning > 0 indicates success & the number of bytes parsed.
    -
    51  int ParseInfoAndTracks(const uint8_t* data, int size);
    -
    52 
    -
    53  // Incrementally parses WebM cluster elements. This method also skips
    -
    54  // CUES elements if they are encountered since we currently don't use the
    -
    55  // data in these elements.
    -
    56  //
    -
    57  // Returns < 0 if the parse fails.
    -
    58  // Returns 0 if more data is needed.
    -
    59  // Returning > 0 indicates success & the number of bytes parsed.
    -
    60  int ParseCluster(const uint8_t* data, int size);
    -
    61 
    -
    62  // Fetch keys for the input key ids. Returns true on success, false otherwise.
    -
    63  bool FetchKeysIfNecessary(const std::string& audio_encryption_key_id,
    -
    64  const std::string& video_encryption_key_id);
    -
    65 
    -
    66  State state_;
    -
    67  InitCB init_cb_;
    -
    68  NewSampleCB new_sample_cb_;
    -
    69  KeySource* decryption_key_source_;
    -
    70  bool ignore_text_tracks_;
    -
    71 
    -
    72  bool unknown_segment_size_;
    -
    73 
    -
    74  std::unique_ptr<WebMClusterParser> cluster_parser_;
    -
    75  ByteQueue byte_queue_;
    -
    76 
    -
    77  DISALLOW_COPY_AND_ASSIGN(WebMMediaParser);
    -
    78 };
    -
    79 
    -
    80 } // namespace media
    -
    81 } // namespace shaka
    -
    82 
    -
    83 #endif // MEDIA_FORMATS_WEBM_WEBM_MEDIA_PARSER_H_
    - -
    base::Callback< void(const std::vector< scoped_refptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    10 #include "packager/media/base/byte_queue.h"
    +
    11 #include "packager/media/base/media_parser.h"
    +
    12 
    +
    13 namespace shaka {
    +
    14 namespace media {
    +
    15 
    +
    16 class WebMClusterParser;
    +
    17 
    +
    18 class WebMMediaParser : public MediaParser {
    +
    19  public:
    + +
    21  ~WebMMediaParser() override;
    +
    22 
    +
    25  void Init(const InitCB& init_cb,
    +
    26  const NewSampleCB& new_sample_cb,
    +
    27  KeySource* decryption_key_source) override;
    +
    28  bool Flush() override WARN_UNUSED_RESULT;
    +
    29  bool Parse(const uint8_t* buf, int size) override WARN_UNUSED_RESULT;
    +
    31 
    +
    32  private:
    +
    33  enum State {
    +
    34  kWaitingForInit,
    +
    35  kParsingHeaders,
    +
    36  kParsingClusters,
    +
    37  kError
    +
    38  };
    +
    39 
    +
    40  void ChangeState(State new_state);
    +
    41 
    +
    42  // Parses WebM Header, Info, Tracks elements. It also skips other level 1
    +
    43  // elements that are not used right now. Once the Info & Tracks elements have
    +
    44  // been parsed, this method will transition the parser from PARSING_HEADERS to
    +
    45  // PARSING_CLUSTERS.
    +
    46  //
    +
    47  // Returns < 0 if the parse fails.
    +
    48  // Returns 0 if more data is needed.
    +
    49  // Returning > 0 indicates success & the number of bytes parsed.
    +
    50  int ParseInfoAndTracks(const uint8_t* data, int size);
    +
    51 
    +
    52  // Incrementally parses WebM cluster elements. This method also skips
    +
    53  // CUES elements if they are encountered since we currently don't use the
    +
    54  // data in these elements.
    +
    55  //
    +
    56  // Returns < 0 if the parse fails.
    +
    57  // Returns 0 if more data is needed.
    +
    58  // Returning > 0 indicates success & the number of bytes parsed.
    +
    59  int ParseCluster(const uint8_t* data, int size);
    +
    60 
    +
    61  // Fetch keys for the input key ids. Returns true on success, false otherwise.
    +
    62  bool FetchKeysIfNecessary(const std::string& audio_encryption_key_id,
    +
    63  const std::string& video_encryption_key_id);
    +
    64 
    +
    65  State state_;
    +
    66  InitCB init_cb_;
    +
    67  NewSampleCB new_sample_cb_;
    +
    68  KeySource* decryption_key_source_;
    +
    69  bool ignore_text_tracks_;
    +
    70 
    +
    71  bool unknown_segment_size_;
    +
    72 
    +
    73  std::unique_ptr<WebMClusterParser> cluster_parser_;
    +
    74  ByteQueue byte_queue_;
    +
    75 
    +
    76  DISALLOW_COPY_AND_ASSIGN(WebMMediaParser);
    +
    77 };
    +
    78 
    +
    79 } // namespace media
    +
    80 } // namespace shaka
    +
    81 
    +
    82 #endif // MEDIA_FORMATS_WEBM_WEBM_MEDIA_PARSER_H_
    +
    bool Flush() override WARN_UNUSED_RESULT
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    - -
    base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    +
    base::Callback< void(const std::vector< std::shared_ptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    + +
    base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    diff --git a/docs/dc/d5c/classshaka_1_1MockMpdNotifier.html b/docs/dc/d5c/classshaka_1_1MockMpdNotifier.html index 508c0aa02d..0b1a9488bd 100644 --- a/docs/dc/d5c/classshaka_1_1MockMpdNotifier.html +++ b/docs/dc/d5c/classshaka_1_1MockMpdNotifier.html @@ -162,7 +162,7 @@ Public Member Functions diff --git a/docs/dc/d69/structshaka_1_1media_1_1mp4_1_1CueSettingsBox-members.html b/docs/dc/d69/structshaka_1_1media_1_1mp4_1_1CueSettingsBox-members.html index 47753de208..c7a4c57d48 100644 --- a/docs/dc/d69/structshaka_1_1media_1_1mp4_1_1CueSettingsBox-members.html +++ b/docs/dc/d69/structshaka_1_1media_1_1mp4_1_1CueSettingsBox-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d6f/classshaka_1_1media_1_1webm_1_1Segmenter-members.html b/docs/dc/d6f/classshaka_1_1media_1_1webm_1_1Segmenter-members.html index 25a87b5d4a..79500bd501 100644 --- a/docs/dc/d6f/classshaka_1_1media_1_1webm_1_1Segmenter-members.html +++ b/docs/dc/d6f/classshaka_1_1media_1_1webm_1_1Segmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::webm::Segmenter, including all inherited members.

    - + @@ -121,7 +121,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(scoped_refptr< MediaSample > sample)shaka::media::webm::Segmenter
    AddSample(std::shared_ptr< MediaSample > sample)shaka::media::webm::Segmenter
    cluster() (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    cluster_length_in_time_scale() const (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    cues() (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    diff --git a/docs/dc/d71/classshaka_1_1media_1_1mp2t_1_1TsSection-members.html b/docs/dc/d71/classshaka_1_1media_1_1mp2t_1_1TsSection-members.html index b760b9d84e..8e02ff2d62 100644 --- a/docs/dc/d71/classshaka_1_1media_1_1mp2t_1_1TsSection-members.html +++ b/docs/dc/d71/classshaka_1_1media_1_1mp2t_1_1TsSection-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d73/classshaka_1_1media_1_1MockMuxerListener.html b/docs/dc/d73/classshaka_1_1media_1_1MockMuxerListener.html index 1eda1a2534..1739c635b0 100644 --- a/docs/dc/d73/classshaka_1_1media_1_1MockMuxerListener.html +++ b/docs/dc/d73/classshaka_1_1media_1_1MockMuxerListener.html @@ -157,7 +157,7 @@ Additional Inherited Members diff --git a/docs/dc/d7b/closure__thread_8cc_source.html b/docs/dc/d7b/closure__thread_8cc_source.html index aeeb33c17f..f662c20c73 100644 --- a/docs/dc/d7b/closure__thread_8cc_source.html +++ b/docs/dc/d7b/closure__thread_8cc_source.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d7b/h264__parser_8cc_source.html b/docs/dc/d7b/h264__parser_8cc_source.html index 43ff33c495..1edc59a536 100644 --- a/docs/dc/d7b/h264__parser_8cc_source.html +++ b/docs/dc/d7b/h264__parser_8cc_source.html @@ -1256,7 +1256,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d86/structshaka_1_1media_1_1mp4_1_1ElementaryStreamDescriptor-members.html b/docs/dc/d86/structshaka_1_1media_1_1mp4_1_1ElementaryStreamDescriptor-members.html index e8d16f11f3..a1451f0ae2 100644 --- a/docs/dc/d86/structshaka_1_1media_1_1mp4_1_1ElementaryStreamDescriptor-members.html +++ b/docs/dc/d86/structshaka_1_1media_1_1mp4_1_1ElementaryStreamDescriptor-members.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d8f/structshaka_1_1media_1_1mp4_1_1MovieFragmentHeader.html b/docs/dc/d8f/structshaka_1_1media_1_1mp4_1_1MovieFragmentHeader.html index 484e22c2f1..e3ddd695ec 100644 --- a/docs/dc/d8f/structshaka_1_1media_1_1mp4_1_1MovieFragmentHeader.html +++ b/docs/dc/d8f/structshaka_1_1media_1_1mp4_1_1MovieFragmentHeader.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/dc/da0/structshaka_1_1media_1_1mp4_1_1DTSSpecific.html b/docs/dc/da0/structshaka_1_1media_1_1mp4_1_1DTSSpecific.html index 685ec52a87..66789cf58a 100644 --- a/docs/dc/da0/structshaka_1_1media_1_1mp4_1_1DTSSpecific.html +++ b/docs/dc/da0/structshaka_1_1media_1_1mp4_1_1DTSSpecific.html @@ -185,7 +185,7 @@ Additional Inherited Members diff --git a/docs/dc/da1/classshaka_1_1MpdBuilder.html b/docs/dc/da1/classshaka_1_1MpdBuilder.html index 23cda7a32b..87a7f75c44 100644 --- a/docs/dc/da1/classshaka_1_1MpdBuilder.html +++ b/docs/dc/da1/classshaka_1_1MpdBuilder.html @@ -351,7 +351,7 @@ template<DashProfile profile> diff --git a/docs/dc/da6/classshaka_1_1media_1_1ContentEncoding.html b/docs/dc/da6/classshaka_1_1media_1_1ContentEncoding.html index e639de5889..de5f1c6795 100644 --- a/docs/dc/da6/classshaka_1_1media_1_1ContentEncoding.html +++ b/docs/dc/da6/classshaka_1_1media_1_1ContentEncoding.html @@ -208,7 +208,7 @@ Static Public Attributes diff --git a/docs/dc/dbd/structshaka_1_1media_1_1FileCloser-members.html b/docs/dc/dbd/structshaka_1_1media_1_1FileCloser-members.html index f3832162b1..6594e1cae0 100644 --- a/docs/dc/dbd/structshaka_1_1media_1_1FileCloser-members.html +++ b/docs/dc/dbd/structshaka_1_1media_1_1FileCloser-members.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/dbf/box__buffer_8h_source.html b/docs/dc/dbf/box__buffer_8h_source.html index 11c0359be5..2469ad8f3e 100644 --- a/docs/dc/dbf/box__buffer_8h_source.html +++ b/docs/dc/dbf/box__buffer_8h_source.html @@ -294,7 +294,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/dc1/classshaka_1_1xml_1_1RepresentationXmlNode-members.html b/docs/dc/dc1/classshaka_1_1xml_1_1RepresentationXmlNode-members.html index c19f966218..451089bebc 100644 --- a/docs/dc/dc1/classshaka_1_1xml_1_1RepresentationXmlNode-members.html +++ b/docs/dc/dc1/classshaka_1_1xml_1_1RepresentationXmlNode-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/dca/classshaka_1_1media_1_1WebMListParser.html b/docs/dc/dca/classshaka_1_1media_1_1WebMListParser.html index 4db3ce6409..add2554c0f 100644 --- a/docs/dc/dca/classshaka_1_1media_1_1WebMListParser.html +++ b/docs/dc/dca/classshaka_1_1media_1_1WebMListParser.html @@ -210,7 +210,7 @@ void  diff --git a/docs/dc/dd9/rsa__key_8cc_source.html b/docs/dc/dd9/rsa__key_8cc_source.html index 1d24b4b7f2..122cb217cc 100644 --- a/docs/dc/dd9/rsa__key_8cc_source.html +++ b/docs/dc/dd9/rsa__key_8cc_source.html @@ -340,7 +340,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/ddf/structshaka_1_1media_1_1mp4_1_1Media.html b/docs/dc/ddf/structshaka_1_1media_1_1mp4_1_1Media.html index e9617cd73e..b12fdaa14e 100644 --- a/docs/dc/ddf/structshaka_1_1media_1_1mp4_1_1Media.html +++ b/docs/dc/ddf/structshaka_1_1media_1_1mp4_1_1Media.html @@ -179,7 +179,7 @@ Additional Inherited Members diff --git a/docs/dc/de1/structshaka_1_1SegmentInfo.html b/docs/dc/de1/structshaka_1_1SegmentInfo.html index a47878cdaa..8b5a944987 100644 --- a/docs/dc/de1/structshaka_1_1SegmentInfo.html +++ b/docs/dc/de1/structshaka_1_1SegmentInfo.html @@ -118,7 +118,7 @@ uint64_t repeat diff --git a/docs/dc/deb/classshaka_1_1media_1_1mp4_1_1Fragmenter-members.html b/docs/dc/deb/classshaka_1_1media_1_1mp4_1_1Fragmenter-members.html index 1f08b489f3..f6708d577a 100644 --- a/docs/dc/deb/classshaka_1_1media_1_1mp4_1_1Fragmenter-members.html +++ b/docs/dc/deb/classshaka_1_1media_1_1mp4_1_1Fragmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::mp4::Fragmenter, including all inherited members.

    - + @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(scoped_refptr< MediaSample > sample)shaka::media::mp4::Fragmentervirtual
    AddSample(std::shared_ptr< MediaSample > sample)shaka::media::mp4::Fragmentervirtual
    data() (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    earliest_presentation_time() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    FinalizeFragment()shaka::media::mp4::Fragmentervirtual
    fragment_duration() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    fragment_finalized() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    fragment_initialized() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    Fragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf)shaka::media::mp4::Fragmenter
    Fragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf)shaka::media::mp4::Fragmenter
    GenerateSegmentReference(SegmentReference *reference)shaka::media::mp4::Fragmenter
    InitializeFragment(int64_t first_sample_dts)shaka::media::mp4::Fragmentervirtual
    OptimizeSampleEntries(std::vector< T > *entries, T *default_value)shaka::media::mp4::Fragmenterprotected
    diff --git a/docs/dc/deb/h265__byte__to__unit__stream__converter_8h_source.html b/docs/dc/deb/h265__byte__to__unit__stream__converter_8h_source.html index f6722e035c..8deb2ac2af 100644 --- a/docs/dc/deb/h265__byte__to__unit__stream__converter_8h_source.html +++ b/docs/dc/deb/h265__byte__to__unit__stream__converter_8h_source.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/dec/ts__section__pmt_8cc_source.html b/docs/dc/dec/ts__section__pmt_8cc_source.html index 51fd2de691..78a58bc177 100644 --- a/docs/dc/dec/ts__section__pmt_8cc_source.html +++ b/docs/dc/dec/ts__section__pmt_8cc_source.html @@ -208,7 +208,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/df0/classshaka_1_1media_1_1ClosureThread.html b/docs/dc/df0/classshaka_1_1media_1_1ClosureThread.html index fc74f24569..9a688e285c 100644 --- a/docs/dc/df0/classshaka_1_1media_1_1ClosureThread.html +++ b/docs/dc/df0/classshaka_1_1media_1_1ClosureThread.html @@ -179,7 +179,7 @@ void  diff --git a/docs/dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html b/docs/dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html index f0119e0567..59bc501d05 100644 --- a/docs/dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html +++ b/docs/dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html @@ -105,7 +105,7 @@ Inheritance diagram for shaka::media::WebVttMediaParser:

    Public Member Functions

    MediaParser implementation overrides.
    -void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override +void Init (const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override   bool Flush () override WARN_UNUSED_RESULT   @@ -115,14 +115,15 @@ Public Member Functions

    Additional Inherited Members

    - Public Types inherited from shaka::media::MediaParser -typedef base::Callback< void(const
    -std::vector< scoped_refptr
    -< StreamInfo > > &stream_info)> InitCB -  -typedef base::Callback< bool(uint32_t
    -track_id, const scoped_refptr
    -< MediaSample > &media_sample)> NewSampleCB -  +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

    Detailed Description

    @@ -153,7 +154,7 @@ track_id, const scoped_refptr

    Implements shaka::media::MediaParser.

    -

    Definition at line 228 of file webvtt_media_parser.cc.

    +

    Definition at line 226 of file webvtt_media_parser.cc.

    @@ -167,13 +168,13 @@ track_id, const scoped_refptr
    void shaka::media::WebVttMediaParser::Init ( - const InitCB &  + const InitCBinit_cb, - const NewSampleCB &  + const NewSampleCBnew_sample_cb, @@ -205,7 +206,7 @@ track_id, const scoped_refptr

    Implements shaka::media::MediaParser.

    -

    Definition at line 221 of file webvtt_media_parser.cc.

    +

    Definition at line 219 of file webvtt_media_parser.cc.

    @@ -245,7 +246,7 @@ track_id, const scoped_refptr

    Implements shaka::media::MediaParser.

    -

    Definition at line 250 of file webvtt_media_parser.cc.

    +

    Definition at line 248 of file webvtt_media_parser.cc.

    @@ -256,7 +257,7 @@ track_id, const scoped_refptr
    diff --git a/docs/dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html b/docs/dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html index 8221ef189a..aefbc8e12a 100644 --- a/docs/dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html +++ b/docs/dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html @@ -112,11 +112,11 @@ Inheritance diagram for shaka::media::mp4::EncryptingFragmenter: - - + + - - + + - - + + @@ -190,16 +190,16 @@ void 

    Public Member Functions

     EncryptingFragmenter (scoped_refptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)
     
     EncryptingFragmenter (std::shared_ptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)
     
    Fragmenter implementation overrides.
    Status AddSample (scoped_refptr< MediaSample > sample) override
     
    Status AddSample (std::shared_ptr< MediaSample > sample) override
     
    Status InitializeFragment (int64_t first_sample_dts) override
     
    @@ -124,8 +124,8 @@ void  Finalize and optimize the fragment.
     
    - Public Member Functions inherited from shaka::media::mp4::Fragmenter
     Fragmenter (scoped_refptr< StreamInfo > info, TrackFragment *traf)
     
     Fragmenter (std::shared_ptr< StreamInfo > info, TrackFragment *traf)
     
    void GenerateSegmentReference (SegmentReference *reference)
     Fill reference with current fragment information.
    set_encryption_key

    Detailed Description

    EncryptingFragmenter generates MP4 fragments with sample encrypted.

    -

    Definition at line 28 of file encrypting_fragmenter.h.

    +

    Definition at line 27 of file encrypting_fragmenter.h.

    Constructor & Destructor Documentation

    - +
    - + @@ -269,7 +269,7 @@ void  diff --git a/docs/dd/d11/mpd__builder_8cc_source.html b/docs/dd/d11/mpd__builder_8cc_source.html index 5fd1ec6a6a..e59869bbb7 100644 --- a/docs/dd/d11/mpd__builder_8cc_source.html +++ b/docs/dd/d11/mpd__builder_8cc_source.html @@ -1521,7 +1521,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d12/mpd__writer_8cc_source.html b/docs/dd/d12/mpd__writer_8cc_source.html index bc0f4ad1cc..481ab1253f 100644 --- a/docs/dd/d12/mpd__writer_8cc_source.html +++ b/docs/dd/d12/mpd__writer_8cc_source.html @@ -219,7 +219,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d13/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationSize.html b/docs/dd/d13/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationSize.html index 8c5925fcac..2299896fc6 100644 --- a/docs/dd/d13/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationSize.html +++ b/docs/dd/d13/structshaka_1_1media_1_1mp4_1_1SampleAuxiliaryInformationSize.html @@ -188,7 +188,7 @@ Additional Inherited Members diff --git a/docs/dd/d17/classshaka_1_1media_1_1Demuxer.html b/docs/dd/d17/classshaka_1_1media_1_1Demuxer.html index ec563cd9b3..7606fa2176 100644 --- a/docs/dd/d17/classshaka_1_1media_1_1Demuxer.html +++ b/docs/dd/d17/classshaka_1_1media_1_1Demuxer.html @@ -122,7 +122,7 @@ Public Member Functions

    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.

    +

    Definition at line 31 of file demuxer.h.

    Constructor & Destructor Documentation

    @@ -197,7 +197,7 @@ Public Member Functions
    Returns
    Container name (type). Value is CONTAINER_UNKNOWN if the demuxer is not initialized.
    -

    Definition at line 74 of file demuxer.h.

    +

    Definition at line 73 of file demuxer.h.

    @@ -285,7 +285,7 @@ Public Member Functions
    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.

    +

    Definition at line 67 of file demuxer.h.

    @@ -296,7 +296,7 @@ Public Member Functions diff --git a/docs/dd/d18/es__parser__adts_8h_source.html b/docs/dd/d18/es__parser__adts_8h_source.html index 32709c122a..2b7857b6e5 100644 --- a/docs/dd/d18/es__parser__adts_8h_source.html +++ b/docs/dd/d18/es__parser__adts_8h_source.html @@ -156,7 +156,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    67  // Interpolated PTS for frames that don't have one.
    68  std::unique_ptr<AudioTimestampHelper> audio_timestamp_helper_;
    69 
    -
    70  scoped_refptr<StreamInfo> last_audio_decoder_config_;
    +
    70  std::shared_ptr<StreamInfo> last_audio_decoder_config_;
    71 
    72  DISALLOW_COPY_AND_ASSIGN(EsParserAdts);
    73 };
    @@ -168,11 +168,11 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    79 #endif
    - + diff --git a/docs/dd/d19/video__stream__info_8cc_source.html b/docs/dd/d19/video__stream__info_8cc_source.html index 3ec62f3632..aa730f433e 100644 --- a/docs/dd/d19/video__stream__info_8cc_source.html +++ b/docs/dd/d19/video__stream__info_8cc_source.html @@ -171,7 +171,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    82 
    83 } // namespace media
    84 } // namespace shaka
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    bool IsValidConfig() const override
    virtual std::string ToString() const
    Definition: stream_info.cc:37
    std::string ToString() const override
    @@ -179,7 +179,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d30/wvm__media__parser_8cc_source.html b/docs/dd/d30/wvm__media__parser_8cc_source.html index 6c7384a83a..c6716f9fbc 100644 --- a/docs/dd/d30/wvm__media__parser_8cc_source.html +++ b/docs/dd/d30/wvm__media__parser_8cc_source.html @@ -576,696 +576,697 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    487  return true;
    488 }
    489 
    -
    490 bool WvmMediaParser::EmitLastSample(uint32_t stream_id,
    -
    491  scoped_refptr<MediaSample>& new_sample) {
    -
    492  std::string key = base::UintToString(current_program_id_)
    -
    493  .append(":")
    -
    494  .append(base::UintToString(stream_id));
    -
    495  std::map<std::string, uint32_t>::iterator it =
    -
    496  program_demux_stream_map_.find(key);
    -
    497  if (it == program_demux_stream_map_.end())
    -
    498  return false;
    -
    499  return EmitSample(stream_id, (*it).second, new_sample, true);
    -
    500 }
    -
    501 
    -
    502 bool WvmMediaParser::EmitPendingSamples() {
    -
    503  // Emit queued samples which were built when not initialized.
    -
    504  while (!media_sample_queue_.empty()) {
    -
    505  DemuxStreamIdMediaSample& demux_stream_media_sample =
    -
    506  media_sample_queue_.front();
    -
    507  if (!EmitSample(demux_stream_media_sample.parsed_audio_or_video_stream_id,
    -
    508  demux_stream_media_sample.demux_stream_id,
    -
    509  demux_stream_media_sample.media_sample,
    -
    510  false)) {
    -
    511  return false;
    -
    512  }
    -
    513  media_sample_queue_.pop_front();
    -
    514  }
    -
    515  return true;
    -
    516 }
    -
    517 
    -
    518 bool WvmMediaParser::Flush() {
    -
    519  // Flush the last audio and video sample for current program.
    -
    520  // Reset the streamID when successfully emitted.
    -
    521  if (prev_media_sample_data_.audio_sample != NULL) {
    -
    522  if (!EmitLastSample(prev_pes_stream_id_,
    -
    523  prev_media_sample_data_.audio_sample)) {
    -
    524  LOG(ERROR) << "Did not emit last sample for audio stream with ID = "
    -
    525  << prev_pes_stream_id_;
    -
    526  return false;
    -
    527  }
    -
    528  }
    -
    529  if (prev_media_sample_data_.video_sample != NULL) {
    -
    530  if (!EmitLastSample(prev_pes_stream_id_,
    -
    531  prev_media_sample_data_.video_sample)) {
    -
    532  LOG(ERROR) << "Did not emit last sample for video stream with ID = "
    -
    533  << prev_pes_stream_id_;
    -
    534  return false;
    -
    535  }
    -
    536  }
    -
    537  return true;
    -
    538 }
    -
    539 
    -
    540 bool WvmMediaParser::ParseIndexEntry() {
    -
    541  // Do not parse index entry at the beginning of any track *after* the first
    -
    542  // track.
    -
    543  if (current_program_id_ > 0) {
    -
    544  return true;
    -
    545  }
    -
    546  uint32_t index_size = 0;
    -
    547  if (index_data_.size() < kIndexVersion4HeaderSize) {
    -
    548  return false;
    -
    549  }
    -
    550 
    -
    551  const uint8_t* read_ptr = index_data_.data();
    -
    552  if (ntohlFromBuffer(read_ptr) != kIndexMagic) {
    -
    553  index_data_.clear();
    -
    554  return false;
    -
    555  }
    -
    556  read_ptr += 4;
    -
    557 
    -
    558  uint32_t version = ntohlFromBuffer(read_ptr);
    -
    559  read_ptr += 4;
    -
    560  if (version == kVersion4) {
    -
    561  index_size = kIndexVersion4HeaderSize + ntohlFromBuffer(read_ptr);
    -
    562  if (index_data_.size() < index_size) {
    -
    563  // We do not yet have the full index. Keep accumulating index data.
    -
    564  return true;
    -
    565  }
    -
    566  read_ptr += sizeof(uint32_t);
    -
    567 
    -
    568  // Index metadata
    -
    569  uint32_t index_metadata_max_size = index_size - kIndexVersion4HeaderSize;
    -
    570  if (index_metadata_max_size < sizeof(uint8_t)) {
    -
    571  index_data_.clear();
    -
    572  return false;
    -
    573  }
    -
    574 
    -
    575  uint64_t track_duration = 0;
    -
    576  int16_t trick_play_rate = 0;
    -
    577  uint32_t sampling_frequency = kDefaultSamplingFrequency;
    -
    578  uint32_t time_scale = kMpeg2ClockRate;
    -
    579  uint16_t video_width = 0;
    -
    580  uint16_t video_height = 0;
    -
    581  uint32_t pixel_width = 0;
    -
    582  uint32_t pixel_height = 0;
    -
    583  uint8_t nalu_length_size = kNaluLengthSize;
    -
    584  uint8_t num_channels = 0;
    -
    585  int audio_pes_stream_id = 0;
    -
    586  int video_pes_stream_id = 0;
    -
    587  bool has_video = false;
    -
    588  bool has_audio = false;
    -
    589  std::vector<uint8_t> audio_codec_config;
    -
    590  std::vector<uint8_t> video_codec_config;
    -
    591  uint8_t num_index_entries = *read_ptr;
    -
    592  ++read_ptr;
    -
    593  --index_metadata_max_size;
    -
    594 
    -
    595  for (uint8_t idx = 0; idx < num_index_entries; ++idx) {
    -
    596  if (index_metadata_max_size < (2 * sizeof(uint8_t)) + sizeof(uint32_t)) {
    -
    597  return false;
    -
    598  }
    -
    599  uint8_t tag = *read_ptr;
    -
    600  ++read_ptr;
    -
    601  uint8_t type = *read_ptr;
    -
    602  ++read_ptr;
    -
    603  uint32_t length = ntohlFromBuffer(read_ptr);
    -
    604  read_ptr += sizeof(uint32_t);
    -
    605  index_metadata_max_size -= (2 * sizeof(uint8_t)) + sizeof(uint32_t);
    -
    606  if (index_metadata_max_size < length) {
    -
    607  return false;
    -
    608  }
    -
    609  int64_t value = 0;
    -
    610  Tag tagtype = Unset;
    -
    611  std::vector<uint8_t> binary_data;
    -
    612  switch (Type(type)) {
    -
    613  case Type_uint8:
    -
    614  if (length == sizeof(uint8_t)) {
    -
    615  tagtype = GetTag(tag, length, read_ptr, &value);
    -
    616  } else {
    -
    617  return false;
    -
    618  }
    -
    619  break;
    -
    620  case Type_int8:
    -
    621  if (length == sizeof(int8_t)) {
    -
    622  tagtype = GetTag(tag, length, read_ptr, &value);
    -
    623  } else {
    -
    624  return false;
    -
    625  }
    -
    626  break;
    -
    627  case Type_uint16:
    -
    628  if (length == sizeof(uint16_t)) {
    -
    629  tagtype = GetTag(tag, length, read_ptr, &value);
    -
    630  } else {
    -
    631  return false;
    -
    632  }
    -
    633  break;
    -
    634  case Type_int16:
    -
    635  if (length == sizeof(int16_t)) {
    -
    636  tagtype = GetTag(tag, length, read_ptr, &value);
    -
    637  } else {
    -
    638  return false;
    -
    639  }
    -
    640  break;
    -
    641  case Type_uint32:
    -
    642  if (length == sizeof(uint32_t)) {
    -
    643  tagtype = GetTag(tag, length, read_ptr, &value);
    -
    644  } else {
    -
    645  return false;
    -
    646  }
    -
    647  break;
    -
    648  case Type_int32:
    -
    649  if (length == sizeof(int32_t)) {
    -
    650  tagtype = GetTag(tag, length, read_ptr, &value);
    -
    651  } else {
    -
    652  return false;
    -
    653  }
    -
    654  break;
    -
    655  case Type_uint64:
    -
    656  if (length == sizeof(uint64_t)) {
    -
    657  tagtype = GetTag(tag, length, read_ptr, &value);
    -
    658  } else {
    -
    659  return false;
    -
    660  }
    -
    661  break;
    -
    662  case Type_int64:
    -
    663  if (length == sizeof(int64_t)) {
    -
    664  tagtype = GetTag(tag, length, read_ptr, &value);
    -
    665  } else {
    -
    666  return false;
    -
    667  }
    -
    668  break;
    -
    669  case Type_string:
    -
    670  case Type_BinaryData:
    -
    671  binary_data.assign(read_ptr, read_ptr + length);
    -
    672  tagtype = Tag(tag);
    -
    673  break;
    -
    674  default:
    -
    675  break;
    -
    676  }
    -
    677 
    -
    678  switch (tagtype) {
    -
    679  case TrackDuration:
    -
    680  track_duration = value;
    -
    681  break;
    -
    682  case TrackTrickPlayRate:
    -
    683  trick_play_rate = value;
    -
    684  break;
    -
    685  case VideoStreamId:
    -
    686  video_pes_stream_id = value;
    -
    687  break;
    -
    688  case AudioStreamId:
    -
    689  audio_pes_stream_id = value;
    -
    690  break;
    -
    691  case VideoWidth:
    -
    692  video_width = (uint16_t)value;
    -
    693  break;
    -
    694  case VideoHeight:
    -
    695  video_height = (uint16_t)value;
    -
    696  break;
    -
    697  case AudioNumChannels:
    -
    698  num_channels = (uint8_t)value;
    -
    699  break;
    -
    700  case VideoType:
    -
    701  has_video = true;
    -
    702  break;
    -
    703  case AudioType:
    -
    704  has_audio = true;
    -
    705  break;
    -
    706  case VideoPixelWidth:
    -
    707  pixel_width = static_cast<uint32_t>(value);
    -
    708  break;
    -
    709  case VideoPixelHeight:
    -
    710  pixel_height = static_cast<uint32_t>(value);
    -
    711  break;
    -
    712  case Audio_EsDescriptor: {
    -
    713  ESDescriptor descriptor;
    -
    714  if (!descriptor.Parse(binary_data)) {
    -
    715  LOG(ERROR) <<
    -
    716  "Could not extract AudioSpecificConfig from ES_Descriptor";
    -
    717  return false;
    -
    718  }
    -
    719  audio_codec_config = descriptor.decoder_specific_info();
    -
    720  break;
    -
    721  }
    -
    722  case Audio_EC3SpecificData:
    -
    723  case Audio_DtsSpecificData:
    -
    724  case Audio_AC3SpecificData:
    -
    725  LOG(ERROR) << "Audio type not supported.";
    -
    726  return false;
    -
    727  case Video_AVCDecoderConfigurationRecord:
    -
    728  video_codec_config = binary_data;
    -
    729  break;
    -
    730  default:
    -
    731  break;
    -
    732  }
    -
    733 
    -
    734  read_ptr += length;
    -
    735  index_metadata_max_size -= length;
    -
    736  }
    -
    737  // End Index metadata
    -
    738  index_size = read_ptr - index_data_.data();
    -
    739 
    -
    740  if (has_video) {
    -
    741  Codec video_codec = kCodecH264;
    -
    742  stream_infos_.push_back(new VideoStreamInfo(
    -
    743  stream_id_count_, time_scale, track_duration, video_codec,
    -
    744  std::string(), video_codec_config.data(), video_codec_config.size(),
    -
    745  video_width, video_height, pixel_width, pixel_height, trick_play_rate,
    -
    746  nalu_length_size, std::string(), true));
    -
    747  program_demux_stream_map_[base::UintToString(index_program_id_) + ":" +
    -
    748  base::UintToString(
    -
    749  video_pes_stream_id
    -
    750  ? video_pes_stream_id
    -
    751  : kDefaultVideoStreamId)] =
    -
    752  stream_id_count_++;
    -
    753  }
    -
    754  if (has_audio) {
    -
    755  const Codec audio_codec = kCodecAAC;
    -
    756  // TODO(beil): Pass in max and average bitrate in wvm container.
    -
    757  stream_infos_.push_back(new AudioStreamInfo(
    -
    758  stream_id_count_, time_scale, track_duration, audio_codec,
    -
    759  std::string(), audio_codec_config.data(), audio_codec_config.size(),
    -
    760  kAacSampleSizeBits, num_channels, sampling_frequency,
    -
    761  0 /* seek preroll */, 0 /* codec delay */, 0 /* max bitrate */,
    -
    762  0 /* avg bitrate */, std::string(), true));
    -
    763  program_demux_stream_map_[base::UintToString(index_program_id_) + ":" +
    -
    764  base::UintToString(
    -
    765  audio_pes_stream_id
    -
    766  ? audio_pes_stream_id
    -
    767  : kDefaultAudioStreamId)] =
    -
    768  stream_id_count_++;
    -
    769  }
    -
    770  }
    -
    771 
    -
    772  index_program_id_++;
    -
    773  index_data_.clear();
    -
    774  return true;
    -
    775 }
    -
    776 
    -
    777 bool WvmMediaParser::DemuxNextPes(bool is_program_end) {
    -
    778  bool output_encrypted_sample = false;
    -
    779  if (!sample_data_.empty() && (prev_pes_flags_1_ & kScramblingBitsMask)) {
    -
    780  // Decrypt crypto unit.
    -
    781  if (!content_decryptor_) {
    -
    782  output_encrypted_sample = true;
    -
    783  } else {
    -
    784  content_decryptor_->Crypt(&sample_data_[crypto_unit_start_pos_],
    -
    785  sample_data_.size() - crypto_unit_start_pos_,
    -
    786  &sample_data_[crypto_unit_start_pos_]);
    -
    787  }
    -
    788  }
    -
    789  // Demux media sample if we are at program end or if we are not at a
    -
    790  // continuation PES.
    -
    791  if ((pes_flags_2_ & kPesOptPts) || is_program_end) {
    -
    792  if (!sample_data_.empty()) {
    -
    793  if (!Output(output_encrypted_sample)) {
    -
    794  return false;
    -
    795  }
    -
    796  }
    -
    797  StartMediaSampleDemux();
    -
    798  }
    -
    799 
    -
    800  crypto_unit_start_pos_ = sample_data_.size();
    -
    801  return true;
    -
    802 }
    -
    803 
    -
    804 void WvmMediaParser::StartMediaSampleDemux() {
    -
    805  bool is_key_frame = ((pes_flags_1_ & kPesOptAlign) != 0);
    -
    806  media_sample_ = MediaSample::CreateEmptyMediaSample();
    -
    807  media_sample_->set_dts(dts_);
    -
    808  media_sample_->set_pts(pts_);
    -
    809  media_sample_->set_is_key_frame(is_key_frame);
    -
    810 
    -
    811  sample_data_.clear();
    -
    812 }
    -
    813 
    -
    814 bool WvmMediaParser::Output(bool output_encrypted_sample) {
    -
    815  if (output_encrypted_sample) {
    -
    816  media_sample_->set_data(sample_data_.data(), sample_data_.size());
    -
    817  media_sample_->set_is_encrypted(true);
    -
    818  } else {
    -
    819  if ((prev_pes_stream_id_ & kPesStreamIdVideoMask) == kPesStreamIdVideo) {
    -
    820  // Convert video stream to unit stream and get config.
    -
    821  std::vector<uint8_t> nal_unit_stream;
    -
    822  if (!byte_to_unit_stream_converter_.ConvertByteStreamToNalUnitStream(
    -
    823  sample_data_.data(), sample_data_.size(), &nal_unit_stream)) {
    -
    824  LOG(ERROR) << "Could not convert h.264 byte stream sample";
    -
    825  return false;
    -
    826  }
    -
    827  media_sample_->set_data(nal_unit_stream.data(), nal_unit_stream.size());
    -
    828  if (!is_initialized_) {
    -
    829  // Set extra data for video stream from AVC Decoder Config Record.
    -
    830  // Also, set codec string from the AVC Decoder Config Record.
    -
    831  std::vector<uint8_t> decoder_config_record;
    -
    832  byte_to_unit_stream_converter_.GetDecoderConfigurationRecord(
    -
    833  &decoder_config_record);
    -
    834  for (uint32_t i = 0; i < stream_infos_.size(); i++) {
    -
    835  if (stream_infos_[i]->stream_type() == kStreamVideo &&
    -
    836  stream_infos_[i]->codec_string().empty()) {
    -
    837  const std::vector<uint8_t>* stream_config;
    -
    838  if (stream_infos_[i]->codec_config().empty()) {
    -
    839  // Decoder config record not available for stream. Use the one
    -
    840  // computed from the first video stream.
    -
    841  stream_infos_[i]->set_codec_config(decoder_config_record);
    -
    842  stream_config = &decoder_config_record;
    -
    843  } else {
    -
    844  // Use stream-specific config record.
    -
    845  stream_config = &stream_infos_[i]->codec_config();
    -
    846  }
    -
    847  DCHECK(stream_config);
    -
    848 
    -
    849  VideoStreamInfo* video_stream_info =
    -
    850  reinterpret_cast<VideoStreamInfo*>(stream_infos_[i].get());
    -
    851  AVCDecoderConfigurationRecord avc_config;
    -
    852  if (!avc_config.Parse(*stream_config)) {
    -
    853  LOG(WARNING) << "Failed to parse AVCDecoderConfigurationRecord. "
    -
    854  "Using computed configuration record instead.";
    -
    855  video_stream_info->set_codec_config(decoder_config_record);
    -
    856  if (!avc_config.Parse(decoder_config_record)) {
    -
    857  LOG(ERROR) << "Failed to parse AVCDecoderConfigurationRecord.";
    -
    858  return false;
    -
    859  }
    -
    860  }
    -
    861  video_stream_info->set_codec_string(avc_config.GetCodecString());
    -
    862 
    -
    863  if (avc_config.pixel_width() != video_stream_info->pixel_width() ||
    -
    864  avc_config.pixel_height() !=
    -
    865  video_stream_info->pixel_height()) {
    -
    866  LOG_IF(WARNING, video_stream_info->pixel_width() != 0 ||
    -
    867  video_stream_info->pixel_height() != 0)
    -
    868  << "Pixel aspect ratio in WVM metadata ("
    -
    869  << video_stream_info->pixel_width() << ","
    -
    870  << video_stream_info->pixel_height()
    -
    871  << ") does not match with SAR in "
    -
    872  "AVCDecoderConfigurationRecord ("
    -
    873  << avc_config.pixel_width() << ","
    -
    874  << avc_config.pixel_height()
    -
    875  << "). Use AVCDecoderConfigurationRecord.";
    -
    876  video_stream_info->set_pixel_width(avc_config.pixel_width());
    -
    877  video_stream_info->set_pixel_height(avc_config.pixel_height());
    -
    878  }
    -
    879  if (avc_config.coded_width() != video_stream_info->width() ||
    -
    880  avc_config.coded_height() != video_stream_info->height()) {
    -
    881  LOG(WARNING) << "Resolution in WVM metadata ("
    -
    882  << video_stream_info->width() << ","
    -
    883  << video_stream_info->height()
    -
    884  << ") does not match with resolution in "
    -
    885  "AVCDecoderConfigurationRecord ("
    -
    886  << avc_config.coded_width() << ","
    -
    887  << avc_config.coded_height()
    -
    888  << "). Use AVCDecoderConfigurationRecord.";
    -
    889  video_stream_info->set_width(avc_config.coded_width());
    -
    890  video_stream_info->set_height(avc_config.coded_height());
    -
    891  }
    -
    892  }
    -
    893  }
    -
    894  }
    -
    895  } else if ((prev_pes_stream_id_ & kPesStreamIdAudioMask) ==
    -
    896  kPesStreamIdAudio) {
    -
    897  // Set data on the audio stream.
    -
    898  int frame_size = static_cast<int>(mp2t::AdtsHeader::GetAdtsFrameSize(
    -
    899  sample_data_.data(), kAdtsHeaderMinSize));
    -
    900  mp2t::AdtsHeader adts_header;
    -
    901  const uint8_t* frame_ptr = sample_data_.data();
    -
    902  if (!adts_header.Parse(frame_ptr, frame_size)) {
    -
    903  LOG(ERROR) << "Could not parse ADTS header";
    -
    904  return false;
    -
    905  }
    -
    906  size_t header_size = adts_header.GetAdtsHeaderSize(frame_ptr,
    -
    907  frame_size);
    -
    908  media_sample_->set_data(frame_ptr + header_size,
    -
    909  frame_size - header_size);
    -
    910  if (!is_initialized_) {
    -
    911  for (uint32_t i = 0; i < stream_infos_.size(); i++) {
    -
    912  if (stream_infos_[i]->stream_type() == kStreamAudio &&
    -
    913  stream_infos_[i]->codec_string().empty()) {
    -
    914  AudioStreamInfo* audio_stream_info =
    -
    915  reinterpret_cast<AudioStreamInfo*>(stream_infos_[i].get());
    -
    916  if (audio_stream_info->codec_config().empty()) {
    -
    917  // Set AudioStreamInfo fields using information from the ADTS
    -
    918  // header.
    -
    919  audio_stream_info->set_sampling_frequency(
    -
    920  adts_header.GetSamplingFrequency());
    -
    921  std::vector<uint8_t> audio_specific_config;
    -
    922  if (!adts_header.GetAudioSpecificConfig(&audio_specific_config)) {
    -
    923  LOG(ERROR) << "Could not compute AACaudiospecificconfig";
    -
    924  return false;
    -
    925  }
    -
    926  audio_stream_info->set_codec_config(audio_specific_config);
    -
    927  audio_stream_info->set_codec_string(
    - -
    929  kCodecAAC, adts_header.GetObjectType()));
    -
    930  } else {
    -
    931  // Set AudioStreamInfo fields using information from the
    -
    932  // AACAudioSpecificConfig record.
    -
    933  AACAudioSpecificConfig aac_config;
    -
    934  if (!aac_config.Parse(stream_infos_[i]->codec_config())) {
    -
    935  LOG(ERROR) << "Could not parse AACAudioSpecificconfig";
    -
    936  return false;
    -
    937  }
    -
    938  audio_stream_info->set_sampling_frequency(aac_config.frequency());
    -
    939  audio_stream_info->set_codec_string(
    - -
    941  kCodecAAC, aac_config.audio_object_type()));
    -
    942  }
    -
    943  }
    -
    944  }
    -
    945  }
    -
    946  }
    -
    947  }
    -
    948 
    -
    949  if (!is_initialized_) {
    -
    950  bool all_streams_have_config = true;
    -
    951  // Check if all collected stream infos have codec_config set.
    -
    952  for (uint32_t i = 0; i < stream_infos_.size(); i++) {
    -
    953  if (stream_infos_[i]->codec_string().empty()) {
    -
    954  all_streams_have_config = false;
    -
    955  break;
    -
    956  }
    -
    957  }
    -
    958  if (all_streams_have_config) {
    -
    959  init_cb_.Run(stream_infos_);
    -
    960  is_initialized_ = true;
    -
    961  }
    -
    962  }
    -
    963 
    -
    964  DCHECK_GT(media_sample_->data_size(), 0UL);
    -
    965  std::string key = base::UintToString(current_program_id_).append(":")
    -
    966  .append(base::UintToString(prev_pes_stream_id_));
    -
    967  std::map<std::string, uint32_t>::iterator it =
    -
    968  program_demux_stream_map_.find(key);
    -
    969  if (it == program_demux_stream_map_.end()) {
    -
    970  // TODO(ramjic): Log error message here and in other error cases through
    -
    971  // this method.
    -
    972  return false;
    -
    973  }
    -
    974  DemuxStreamIdMediaSample demux_stream_media_sample;
    -
    975  demux_stream_media_sample.parsed_audio_or_video_stream_id =
    -
    976  prev_pes_stream_id_;
    -
    977  demux_stream_media_sample.demux_stream_id = (*it).second;
    -
    978  demux_stream_media_sample.media_sample = media_sample_;
    -
    979  // Check if sample can be emitted.
    -
    980  if (!is_initialized_) {
    -
    981  media_sample_queue_.push_back(demux_stream_media_sample);
    -
    982  } else {
    -
    983  // flush the sample queue and emit all queued samples.
    -
    984  while (!media_sample_queue_.empty()) {
    -
    985  if (!EmitPendingSamples())
    -
    986  return false;
    -
    987  }
    -
    988  // Emit current sample.
    -
    989  if (!EmitSample(prev_pes_stream_id_, (*it).second, media_sample_, false))
    -
    990  return false;
    -
    991  }
    -
    992  return true;
    -
    993 }
    -
    994 
    -
    995 bool WvmMediaParser::EmitSample(uint32_t parsed_audio_or_video_stream_id,
    -
    996  uint32_t stream_id,
    -
    997  scoped_refptr<MediaSample>& new_sample,
    -
    998  bool isLastSample) {
    -
    999  DCHECK(new_sample);
    -
    1000  if (isLastSample) {
    -
    1001  if ((parsed_audio_or_video_stream_id & kPesStreamIdVideoMask) ==
    -
    1002  kPesStreamIdVideo) {
    -
    1003  new_sample->set_duration(prev_media_sample_data_.video_sample_duration);
    -
    1004  } else if ((parsed_audio_or_video_stream_id & kPesStreamIdAudioMask) ==
    -
    1005  kPesStreamIdAudio) {
    -
    1006  new_sample->set_duration(prev_media_sample_data_.audio_sample_duration);
    -
    1007  }
    -
    1008  if (!new_sample_cb_.Run(stream_id, new_sample)) {
    -
    1009  LOG(ERROR) << "Failed to process the last sample.";
    -
    1010  return false;
    -
    1011  }
    -
    1012  return true;
    -
    1013  }
    -
    1014 
    -
    1015  // Cannot emit current sample. Compute duration first and then,
    -
    1016  // emit previous sample.
    -
    1017  if ((parsed_audio_or_video_stream_id & kPesStreamIdVideoMask) ==
    -
    1018  kPesStreamIdVideo) {
    -
    1019  if (prev_media_sample_data_.video_sample == NULL) {
    -
    1020  prev_media_sample_data_.video_sample = new_sample;
    -
    1021  prev_media_sample_data_.video_stream_id = stream_id;
    -
    1022  return true;
    -
    1023  }
    -
    1024  prev_media_sample_data_.video_sample->set_duration(
    -
    1025  new_sample->dts() - prev_media_sample_data_.video_sample->dts());
    -
    1026  prev_media_sample_data_.video_sample_duration =
    -
    1027  prev_media_sample_data_.video_sample->duration();
    -
    1028  if (!new_sample_cb_.Run(prev_media_sample_data_.video_stream_id,
    -
    1029  prev_media_sample_data_.video_sample)) {
    -
    1030  LOG(ERROR) << "Failed to process the video sample.";
    -
    1031  return false;
    -
    1032  }
    -
    1033  prev_media_sample_data_.video_sample = new_sample;
    -
    1034  prev_media_sample_data_.video_stream_id = stream_id;
    -
    1035  } else if ((parsed_audio_or_video_stream_id & kPesStreamIdAudioMask) ==
    -
    1036  kPesStreamIdAudio) {
    -
    1037  if (prev_media_sample_data_.audio_sample == NULL) {
    -
    1038  prev_media_sample_data_.audio_sample = new_sample;
    -
    1039  prev_media_sample_data_.audio_stream_id = stream_id;
    -
    1040  return true;
    -
    1041  }
    -
    1042  prev_media_sample_data_.audio_sample->set_duration(
    -
    1043  new_sample->dts() - prev_media_sample_data_.audio_sample->dts());
    -
    1044  prev_media_sample_data_.audio_sample_duration =
    -
    1045  prev_media_sample_data_.audio_sample->duration();
    -
    1046  if (!new_sample_cb_.Run(prev_media_sample_data_.audio_stream_id,
    -
    1047  prev_media_sample_data_.audio_sample)) {
    -
    1048  LOG(ERROR) << "Failed to process the audio sample.";
    -
    1049  return false;
    -
    1050  }
    -
    1051  prev_media_sample_data_.audio_sample = new_sample;
    -
    1052  prev_media_sample_data_.audio_stream_id = stream_id;
    -
    1053  }
    -
    1054  return true;
    -
    1055 }
    -
    1056 
    -
    1057 bool WvmMediaParser::GetAssetKey(const uint32_t asset_id,
    -
    1058  EncryptionKey* encryption_key) {
    -
    1059  DCHECK(decryption_key_source_);
    -
    1060  Status status = decryption_key_source_->FetchKeys(asset_id);
    -
    1061  if (!status.ok()) {
    -
    1062  LOG(ERROR) << "Fetch Key(s) failed for AssetID = " << asset_id
    -
    1063  << ", error = " << status;
    -
    1064  return false;
    -
    1065  }
    -
    1066 
    -
    1067  status = decryption_key_source_->GetKey(KeySource::TRACK_TYPE_HD,
    -
    1068  encryption_key);
    -
    1069  if (!status.ok()) {
    -
    1070  LOG(ERROR) << "Fetch Key(s) failed for AssetID = " << asset_id
    -
    1071  << ", error = " << status;
    -
    1072  return false;
    -
    1073  }
    -
    1074 
    -
    1075  return true;
    -
    1076 }
    -
    1077 
    -
    1078 bool WvmMediaParser::ProcessEcm() {
    -
    1079  // An error will be returned later if the samples need to be decrypted.
    -
    1080  if (!decryption_key_source_)
    -
    1081  return true;
    -
    1082 
    -
    1083  if (current_program_id_ > 0) {
    -
    1084  return true;
    -
    1085  }
    -
    1086  if (ecm_.size() != kEcmSizeBytes) {
    -
    1087  LOG(ERROR) << "Unexpected ECM size = " << ecm_.size()
    -
    1088  << ", expected size = " << kEcmSizeBytes;
    -
    1089  return false;
    -
    1090  }
    -
    1091  const uint8_t* ecm_data = ecm_.data();
    -
    1092  DCHECK(ecm_data);
    -
    1093  ecm_data += sizeof(uint32_t); // old version field - skip.
    -
    1094  ecm_data += sizeof(uint32_t); // clear lead - skip.
    -
    1095  ecm_data += sizeof(uint32_t); // system id(includes ECM version) - skip.
    -
    1096  uint32_t asset_id = ntohlFromBuffer(ecm_data);
    -
    1097  if (asset_id == 0) {
    -
    1098  LOG(ERROR) << "AssetID in ECM is not valid.";
    -
    1099  return false;
    -
    1100  }
    -
    1101  ecm_data += sizeof(uint32_t); // asset_id.
    -
    1102  EncryptionKey encryption_key;
    -
    1103  if (!GetAssetKey(asset_id, &encryption_key)) {
    -
    1104  return false;
    -
    1105  }
    -
    1106  if (encryption_key.key.size() < kAssetKeySizeBytes) {
    -
    1107  LOG(ERROR) << "Asset Key size of " << encryption_key.key.size()
    -
    1108  << " for AssetID = " << asset_id
    -
    1109  << " is less than minimum asset key size.";
    -
    1110  return false;
    -
    1111  }
    -
    1112  // Legacy WVM content may have asset keys > 16 bytes.
    -
    1113  // Use only the first 16 bytes of the asset key to get
    -
    1114  // the content key.
    -
    1115  std::vector<uint8_t> asset_key(
    -
    1116  encryption_key.key.begin(),
    -
    1117  encryption_key.key.begin() + kAssetKeySizeBytes);
    -
    1118  // WVM format always uses all zero IV.
    -
    1119  std::vector<uint8_t> zero_iv(kInitializationVectorSizeBytes, 0);
    -
    1120  AesCbcDecryptor asset_decryptor(kCtsPadding, AesCryptor::kUseConstantIv);
    -
    1121  if (!asset_decryptor.InitializeWithIv(asset_key, zero_iv)) {
    -
    1122  LOG(ERROR) << "Failed to initialize asset_decryptor.";
    -
    1123  return false;
    -
    1124  }
    -
    1125 
    -
    1126  const size_t content_key_buffer_size =
    -
    1127  kEcmFlagsSizeBytes + kEcmContentKeySizeBytes +
    -
    1128  kEcmPaddingSizeBytes; // flags + contentKey + padding.
    -
    1129  std::vector<uint8_t> content_key_buffer(content_key_buffer_size);
    -
    1130  CHECK(asset_decryptor.Crypt(ecm_data, content_key_buffer_size,
    -
    1131  content_key_buffer.data()));
    -
    1132 
    -
    1133  std::vector<uint8_t> decrypted_content_key_vec(
    -
    1134  content_key_buffer.begin() + 4,
    -
    1135  content_key_buffer.begin() + 20);
    -
    1136  std::unique_ptr<AesCbcDecryptor> content_decryptor(
    -
    1137  new AesCbcDecryptor(kCtsPadding, AesCryptor::kUseConstantIv));
    -
    1138  if (!content_decryptor->InitializeWithIv(decrypted_content_key_vec,
    -
    1139  zero_iv)) {
    -
    1140  LOG(ERROR) << "Failed to initialize content decryptor.";
    -
    1141  return false;
    -
    1142  }
    -
    1143 
    -
    1144  content_decryptor_ = std::move(content_decryptor);
    -
    1145  return true;
    -
    1146 }
    -
    1147 
    -
    1148 DemuxStreamIdMediaSample::DemuxStreamIdMediaSample() :
    -
    1149  demux_stream_id(0),
    -
    1150  parsed_audio_or_video_stream_id(0) {}
    -
    1151 
    -
    1152 DemuxStreamIdMediaSample::~DemuxStreamIdMediaSample() {}
    -
    1153 
    -
    1154 PrevSampleData::PrevSampleData() {
    -
    1155  Reset();
    -
    1156 }
    -
    1157 
    -
    1158 PrevSampleData::~PrevSampleData() {}
    -
    1159 
    -
    1160 void PrevSampleData::Reset() {
    -
    1161  audio_sample = NULL;
    -
    1162  video_sample = NULL;
    -
    1163  audio_stream_id = 0;
    -
    1164  video_stream_id = 0;
    -
    1165  audio_sample_duration = 0;
    -
    1166  video_sample_duration = 0;
    -
    1167 }
    -
    1168 
    -
    1169 } // namespace wvm
    -
    1170 } // namespace media
    -
    1171 } // namespace shaka
    +
    490 bool WvmMediaParser::EmitLastSample(
    +
    491  uint32_t stream_id,
    +
    492  const std::shared_ptr<MediaSample>& new_sample) {
    +
    493  std::string key = base::UintToString(current_program_id_)
    +
    494  .append(":")
    +
    495  .append(base::UintToString(stream_id));
    +
    496  std::map<std::string, uint32_t>::iterator it =
    +
    497  program_demux_stream_map_.find(key);
    +
    498  if (it == program_demux_stream_map_.end())
    +
    499  return false;
    +
    500  return EmitSample(stream_id, (*it).second, new_sample, true);
    +
    501 }
    +
    502 
    +
    503 bool WvmMediaParser::EmitPendingSamples() {
    +
    504  // Emit queued samples which were built when not initialized.
    +
    505  while (!media_sample_queue_.empty()) {
    +
    506  DemuxStreamIdMediaSample& demux_stream_media_sample =
    +
    507  media_sample_queue_.front();
    +
    508  if (!EmitSample(demux_stream_media_sample.parsed_audio_or_video_stream_id,
    +
    509  demux_stream_media_sample.demux_stream_id,
    +
    510  demux_stream_media_sample.media_sample,
    +
    511  false)) {
    +
    512  return false;
    +
    513  }
    +
    514  media_sample_queue_.pop_front();
    +
    515  }
    +
    516  return true;
    +
    517 }
    +
    518 
    +
    519 bool WvmMediaParser::Flush() {
    +
    520  // Flush the last audio and video sample for current program.
    +
    521  // Reset the streamID when successfully emitted.
    +
    522  if (prev_media_sample_data_.audio_sample != NULL) {
    +
    523  if (!EmitLastSample(prev_pes_stream_id_,
    +
    524  prev_media_sample_data_.audio_sample)) {
    +
    525  LOG(ERROR) << "Did not emit last sample for audio stream with ID = "
    +
    526  << prev_pes_stream_id_;
    +
    527  return false;
    +
    528  }
    +
    529  }
    +
    530  if (prev_media_sample_data_.video_sample != NULL) {
    +
    531  if (!EmitLastSample(prev_pes_stream_id_,
    +
    532  prev_media_sample_data_.video_sample)) {
    +
    533  LOG(ERROR) << "Did not emit last sample for video stream with ID = "
    +
    534  << prev_pes_stream_id_;
    +
    535  return false;
    +
    536  }
    +
    537  }
    +
    538  return true;
    +
    539 }
    +
    540 
    +
    541 bool WvmMediaParser::ParseIndexEntry() {
    +
    542  // Do not parse index entry at the beginning of any track *after* the first
    +
    543  // track.
    +
    544  if (current_program_id_ > 0) {
    +
    545  return true;
    +
    546  }
    +
    547  uint32_t index_size = 0;
    +
    548  if (index_data_.size() < kIndexVersion4HeaderSize) {
    +
    549  return false;
    +
    550  }
    +
    551 
    +
    552  const uint8_t* read_ptr = index_data_.data();
    +
    553  if (ntohlFromBuffer(read_ptr) != kIndexMagic) {
    +
    554  index_data_.clear();
    +
    555  return false;
    +
    556  }
    +
    557  read_ptr += 4;
    +
    558 
    +
    559  uint32_t version = ntohlFromBuffer(read_ptr);
    +
    560  read_ptr += 4;
    +
    561  if (version == kVersion4) {
    +
    562  index_size = kIndexVersion4HeaderSize + ntohlFromBuffer(read_ptr);
    +
    563  if (index_data_.size() < index_size) {
    +
    564  // We do not yet have the full index. Keep accumulating index data.
    +
    565  return true;
    +
    566  }
    +
    567  read_ptr += sizeof(uint32_t);
    +
    568 
    +
    569  // Index metadata
    +
    570  uint32_t index_metadata_max_size = index_size - kIndexVersion4HeaderSize;
    +
    571  if (index_metadata_max_size < sizeof(uint8_t)) {
    +
    572  index_data_.clear();
    +
    573  return false;
    +
    574  }
    +
    575 
    +
    576  uint64_t track_duration = 0;
    +
    577  int16_t trick_play_rate = 0;
    +
    578  uint32_t sampling_frequency = kDefaultSamplingFrequency;
    +
    579  uint32_t time_scale = kMpeg2ClockRate;
    +
    580  uint16_t video_width = 0;
    +
    581  uint16_t video_height = 0;
    +
    582  uint32_t pixel_width = 0;
    +
    583  uint32_t pixel_height = 0;
    +
    584  uint8_t nalu_length_size = kNaluLengthSize;
    +
    585  uint8_t num_channels = 0;
    +
    586  int audio_pes_stream_id = 0;
    +
    587  int video_pes_stream_id = 0;
    +
    588  bool has_video = false;
    +
    589  bool has_audio = false;
    +
    590  std::vector<uint8_t> audio_codec_config;
    +
    591  std::vector<uint8_t> video_codec_config;
    +
    592  uint8_t num_index_entries = *read_ptr;
    +
    593  ++read_ptr;
    +
    594  --index_metadata_max_size;
    +
    595 
    +
    596  for (uint8_t idx = 0; idx < num_index_entries; ++idx) {
    +
    597  if (index_metadata_max_size < (2 * sizeof(uint8_t)) + sizeof(uint32_t)) {
    +
    598  return false;
    +
    599  }
    +
    600  uint8_t tag = *read_ptr;
    +
    601  ++read_ptr;
    +
    602  uint8_t type = *read_ptr;
    +
    603  ++read_ptr;
    +
    604  uint32_t length = ntohlFromBuffer(read_ptr);
    +
    605  read_ptr += sizeof(uint32_t);
    +
    606  index_metadata_max_size -= (2 * sizeof(uint8_t)) + sizeof(uint32_t);
    +
    607  if (index_metadata_max_size < length) {
    +
    608  return false;
    +
    609  }
    +
    610  int64_t value = 0;
    +
    611  Tag tagtype = Unset;
    +
    612  std::vector<uint8_t> binary_data;
    +
    613  switch (Type(type)) {
    +
    614  case Type_uint8:
    +
    615  if (length == sizeof(uint8_t)) {
    +
    616  tagtype = GetTag(tag, length, read_ptr, &value);
    +
    617  } else {
    +
    618  return false;
    +
    619  }
    +
    620  break;
    +
    621  case Type_int8:
    +
    622  if (length == sizeof(int8_t)) {
    +
    623  tagtype = GetTag(tag, length, read_ptr, &value);
    +
    624  } else {
    +
    625  return false;
    +
    626  }
    +
    627  break;
    +
    628  case Type_uint16:
    +
    629  if (length == sizeof(uint16_t)) {
    +
    630  tagtype = GetTag(tag, length, read_ptr, &value);
    +
    631  } else {
    +
    632  return false;
    +
    633  }
    +
    634  break;
    +
    635  case Type_int16:
    +
    636  if (length == sizeof(int16_t)) {
    +
    637  tagtype = GetTag(tag, length, read_ptr, &value);
    +
    638  } else {
    +
    639  return false;
    +
    640  }
    +
    641  break;
    +
    642  case Type_uint32:
    +
    643  if (length == sizeof(uint32_t)) {
    +
    644  tagtype = GetTag(tag, length, read_ptr, &value);
    +
    645  } else {
    +
    646  return false;
    +
    647  }
    +
    648  break;
    +
    649  case Type_int32:
    +
    650  if (length == sizeof(int32_t)) {
    +
    651  tagtype = GetTag(tag, length, read_ptr, &value);
    +
    652  } else {
    +
    653  return false;
    +
    654  }
    +
    655  break;
    +
    656  case Type_uint64:
    +
    657  if (length == sizeof(uint64_t)) {
    +
    658  tagtype = GetTag(tag, length, read_ptr, &value);
    +
    659  } else {
    +
    660  return false;
    +
    661  }
    +
    662  break;
    +
    663  case Type_int64:
    +
    664  if (length == sizeof(int64_t)) {
    +
    665  tagtype = GetTag(tag, length, read_ptr, &value);
    +
    666  } else {
    +
    667  return false;
    +
    668  }
    +
    669  break;
    +
    670  case Type_string:
    +
    671  case Type_BinaryData:
    +
    672  binary_data.assign(read_ptr, read_ptr + length);
    +
    673  tagtype = Tag(tag);
    +
    674  break;
    +
    675  default:
    +
    676  break;
    +
    677  }
    +
    678 
    +
    679  switch (tagtype) {
    +
    680  case TrackDuration:
    +
    681  track_duration = value;
    +
    682  break;
    +
    683  case TrackTrickPlayRate:
    +
    684  trick_play_rate = value;
    +
    685  break;
    +
    686  case VideoStreamId:
    +
    687  video_pes_stream_id = value;
    +
    688  break;
    +
    689  case AudioStreamId:
    +
    690  audio_pes_stream_id = value;
    +
    691  break;
    +
    692  case VideoWidth:
    +
    693  video_width = (uint16_t)value;
    +
    694  break;
    +
    695  case VideoHeight:
    +
    696  video_height = (uint16_t)value;
    +
    697  break;
    +
    698  case AudioNumChannels:
    +
    699  num_channels = (uint8_t)value;
    +
    700  break;
    +
    701  case VideoType:
    +
    702  has_video = true;
    +
    703  break;
    +
    704  case AudioType:
    +
    705  has_audio = true;
    +
    706  break;
    +
    707  case VideoPixelWidth:
    +
    708  pixel_width = static_cast<uint32_t>(value);
    +
    709  break;
    +
    710  case VideoPixelHeight:
    +
    711  pixel_height = static_cast<uint32_t>(value);
    +
    712  break;
    +
    713  case Audio_EsDescriptor: {
    +
    714  ESDescriptor descriptor;
    +
    715  if (!descriptor.Parse(binary_data)) {
    +
    716  LOG(ERROR) <<
    +
    717  "Could not extract AudioSpecificConfig from ES_Descriptor";
    +
    718  return false;
    +
    719  }
    +
    720  audio_codec_config = descriptor.decoder_specific_info();
    +
    721  break;
    +
    722  }
    +
    723  case Audio_EC3SpecificData:
    +
    724  case Audio_DtsSpecificData:
    +
    725  case Audio_AC3SpecificData:
    +
    726  LOG(ERROR) << "Audio type not supported.";
    +
    727  return false;
    +
    728  case Video_AVCDecoderConfigurationRecord:
    +
    729  video_codec_config = binary_data;
    +
    730  break;
    +
    731  default:
    +
    732  break;
    +
    733  }
    +
    734 
    +
    735  read_ptr += length;
    +
    736  index_metadata_max_size -= length;
    +
    737  }
    +
    738  // End Index metadata
    +
    739  index_size = read_ptr - index_data_.data();
    +
    740 
    +
    741  if (has_video) {
    +
    742  Codec video_codec = kCodecH264;
    +
    743  stream_infos_.emplace_back(new VideoStreamInfo(
    +
    744  stream_id_count_, time_scale, track_duration, video_codec,
    +
    745  std::string(), video_codec_config.data(), video_codec_config.size(),
    +
    746  video_width, video_height, pixel_width, pixel_height, trick_play_rate,
    +
    747  nalu_length_size, std::string(), true));
    +
    748  program_demux_stream_map_[base::UintToString(index_program_id_) + ":" +
    +
    749  base::UintToString(
    +
    750  video_pes_stream_id
    +
    751  ? video_pes_stream_id
    +
    752  : kDefaultVideoStreamId)] =
    +
    753  stream_id_count_++;
    +
    754  }
    +
    755  if (has_audio) {
    +
    756  const Codec audio_codec = kCodecAAC;
    +
    757  // TODO(beil): Pass in max and average bitrate in wvm container.
    +
    758  stream_infos_.emplace_back(new AudioStreamInfo(
    +
    759  stream_id_count_, time_scale, track_duration, audio_codec,
    +
    760  std::string(), audio_codec_config.data(), audio_codec_config.size(),
    +
    761  kAacSampleSizeBits, num_channels, sampling_frequency,
    +
    762  0 /* seek preroll */, 0 /* codec delay */, 0 /* max bitrate */,
    +
    763  0 /* avg bitrate */, std::string(), true));
    +
    764  program_demux_stream_map_[base::UintToString(index_program_id_) + ":" +
    +
    765  base::UintToString(
    +
    766  audio_pes_stream_id
    +
    767  ? audio_pes_stream_id
    +
    768  : kDefaultAudioStreamId)] =
    +
    769  stream_id_count_++;
    +
    770  }
    +
    771  }
    +
    772 
    +
    773  index_program_id_++;
    +
    774  index_data_.clear();
    +
    775  return true;
    +
    776 }
    +
    777 
    +
    778 bool WvmMediaParser::DemuxNextPes(bool is_program_end) {
    +
    779  bool output_encrypted_sample = false;
    +
    780  if (!sample_data_.empty() && (prev_pes_flags_1_ & kScramblingBitsMask)) {
    +
    781  // Decrypt crypto unit.
    +
    782  if (!content_decryptor_) {
    +
    783  output_encrypted_sample = true;
    +
    784  } else {
    +
    785  content_decryptor_->Crypt(&sample_data_[crypto_unit_start_pos_],
    +
    786  sample_data_.size() - crypto_unit_start_pos_,
    +
    787  &sample_data_[crypto_unit_start_pos_]);
    +
    788  }
    +
    789  }
    +
    790  // Demux media sample if we are at program end or if we are not at a
    +
    791  // continuation PES.
    +
    792  if ((pes_flags_2_ & kPesOptPts) || is_program_end) {
    +
    793  if (!sample_data_.empty()) {
    +
    794  if (!Output(output_encrypted_sample)) {
    +
    795  return false;
    +
    796  }
    +
    797  }
    +
    798  StartMediaSampleDemux();
    +
    799  }
    +
    800 
    +
    801  crypto_unit_start_pos_ = sample_data_.size();
    +
    802  return true;
    +
    803 }
    +
    804 
    +
    805 void WvmMediaParser::StartMediaSampleDemux() {
    +
    806  bool is_key_frame = ((pes_flags_1_ & kPesOptAlign) != 0);
    +
    807  media_sample_ = MediaSample::CreateEmptyMediaSample();
    +
    808  media_sample_->set_dts(dts_);
    +
    809  media_sample_->set_pts(pts_);
    +
    810  media_sample_->set_is_key_frame(is_key_frame);
    +
    811 
    +
    812  sample_data_.clear();
    +
    813 }
    +
    814 
    +
    815 bool WvmMediaParser::Output(bool output_encrypted_sample) {
    +
    816  if (output_encrypted_sample) {
    +
    817  media_sample_->set_data(sample_data_.data(), sample_data_.size());
    +
    818  media_sample_->set_is_encrypted(true);
    +
    819  } else {
    +
    820  if ((prev_pes_stream_id_ & kPesStreamIdVideoMask) == kPesStreamIdVideo) {
    +
    821  // Convert video stream to unit stream and get config.
    +
    822  std::vector<uint8_t> nal_unit_stream;
    +
    823  if (!byte_to_unit_stream_converter_.ConvertByteStreamToNalUnitStream(
    +
    824  sample_data_.data(), sample_data_.size(), &nal_unit_stream)) {
    +
    825  LOG(ERROR) << "Could not convert h.264 byte stream sample";
    +
    826  return false;
    +
    827  }
    +
    828  media_sample_->set_data(nal_unit_stream.data(), nal_unit_stream.size());
    +
    829  if (!is_initialized_) {
    +
    830  // Set extra data for video stream from AVC Decoder Config Record.
    +
    831  // Also, set codec string from the AVC Decoder Config Record.
    +
    832  std::vector<uint8_t> decoder_config_record;
    +
    833  byte_to_unit_stream_converter_.GetDecoderConfigurationRecord(
    +
    834  &decoder_config_record);
    +
    835  for (uint32_t i = 0; i < stream_infos_.size(); i++) {
    +
    836  if (stream_infos_[i]->stream_type() == kStreamVideo &&
    +
    837  stream_infos_[i]->codec_string().empty()) {
    +
    838  const std::vector<uint8_t>* stream_config;
    +
    839  if (stream_infos_[i]->codec_config().empty()) {
    +
    840  // Decoder config record not available for stream. Use the one
    +
    841  // computed from the first video stream.
    +
    842  stream_infos_[i]->set_codec_config(decoder_config_record);
    +
    843  stream_config = &decoder_config_record;
    +
    844  } else {
    +
    845  // Use stream-specific config record.
    +
    846  stream_config = &stream_infos_[i]->codec_config();
    +
    847  }
    +
    848  DCHECK(stream_config);
    +
    849 
    +
    850  VideoStreamInfo* video_stream_info =
    +
    851  reinterpret_cast<VideoStreamInfo*>(stream_infos_[i].get());
    +
    852  AVCDecoderConfigurationRecord avc_config;
    +
    853  if (!avc_config.Parse(*stream_config)) {
    +
    854  LOG(WARNING) << "Failed to parse AVCDecoderConfigurationRecord. "
    +
    855  "Using computed configuration record instead.";
    +
    856  video_stream_info->set_codec_config(decoder_config_record);
    +
    857  if (!avc_config.Parse(decoder_config_record)) {
    +
    858  LOG(ERROR) << "Failed to parse AVCDecoderConfigurationRecord.";
    +
    859  return false;
    +
    860  }
    +
    861  }
    +
    862  video_stream_info->set_codec_string(avc_config.GetCodecString());
    +
    863 
    +
    864  if (avc_config.pixel_width() != video_stream_info->pixel_width() ||
    +
    865  avc_config.pixel_height() !=
    +
    866  video_stream_info->pixel_height()) {
    +
    867  LOG_IF(WARNING, video_stream_info->pixel_width() != 0 ||
    +
    868  video_stream_info->pixel_height() != 0)
    +
    869  << "Pixel aspect ratio in WVM metadata ("
    +
    870  << video_stream_info->pixel_width() << ","
    +
    871  << video_stream_info->pixel_height()
    +
    872  << ") does not match with SAR in "
    +
    873  "AVCDecoderConfigurationRecord ("
    +
    874  << avc_config.pixel_width() << ","
    +
    875  << avc_config.pixel_height()
    +
    876  << "). Use AVCDecoderConfigurationRecord.";
    +
    877  video_stream_info->set_pixel_width(avc_config.pixel_width());
    +
    878  video_stream_info->set_pixel_height(avc_config.pixel_height());
    +
    879  }
    +
    880  if (avc_config.coded_width() != video_stream_info->width() ||
    +
    881  avc_config.coded_height() != video_stream_info->height()) {
    +
    882  LOG(WARNING) << "Resolution in WVM metadata ("
    +
    883  << video_stream_info->width() << ","
    +
    884  << video_stream_info->height()
    +
    885  << ") does not match with resolution in "
    +
    886  "AVCDecoderConfigurationRecord ("
    +
    887  << avc_config.coded_width() << ","
    +
    888  << avc_config.coded_height()
    +
    889  << "). Use AVCDecoderConfigurationRecord.";
    +
    890  video_stream_info->set_width(avc_config.coded_width());
    +
    891  video_stream_info->set_height(avc_config.coded_height());
    +
    892  }
    +
    893  }
    +
    894  }
    +
    895  }
    +
    896  } else if ((prev_pes_stream_id_ & kPesStreamIdAudioMask) ==
    +
    897  kPesStreamIdAudio) {
    +
    898  // Set data on the audio stream.
    +
    899  int frame_size = static_cast<int>(mp2t::AdtsHeader::GetAdtsFrameSize(
    +
    900  sample_data_.data(), kAdtsHeaderMinSize));
    +
    901  mp2t::AdtsHeader adts_header;
    +
    902  const uint8_t* frame_ptr = sample_data_.data();
    +
    903  if (!adts_header.Parse(frame_ptr, frame_size)) {
    +
    904  LOG(ERROR) << "Could not parse ADTS header";
    +
    905  return false;
    +
    906  }
    +
    907  size_t header_size = adts_header.GetAdtsHeaderSize(frame_ptr,
    +
    908  frame_size);
    +
    909  media_sample_->set_data(frame_ptr + header_size,
    +
    910  frame_size - header_size);
    +
    911  if (!is_initialized_) {
    +
    912  for (uint32_t i = 0; i < stream_infos_.size(); i++) {
    +
    913  if (stream_infos_[i]->stream_type() == kStreamAudio &&
    +
    914  stream_infos_[i]->codec_string().empty()) {
    +
    915  AudioStreamInfo* audio_stream_info =
    +
    916  reinterpret_cast<AudioStreamInfo*>(stream_infos_[i].get());
    +
    917  if (audio_stream_info->codec_config().empty()) {
    +
    918  // Set AudioStreamInfo fields using information from the ADTS
    +
    919  // header.
    +
    920  audio_stream_info->set_sampling_frequency(
    +
    921  adts_header.GetSamplingFrequency());
    +
    922  std::vector<uint8_t> audio_specific_config;
    +
    923  if (!adts_header.GetAudioSpecificConfig(&audio_specific_config)) {
    +
    924  LOG(ERROR) << "Could not compute AACaudiospecificconfig";
    +
    925  return false;
    +
    926  }
    +
    927  audio_stream_info->set_codec_config(audio_specific_config);
    +
    928  audio_stream_info->set_codec_string(
    + +
    930  kCodecAAC, adts_header.GetObjectType()));
    +
    931  } else {
    +
    932  // Set AudioStreamInfo fields using information from the
    +
    933  // AACAudioSpecificConfig record.
    +
    934  AACAudioSpecificConfig aac_config;
    +
    935  if (!aac_config.Parse(stream_infos_[i]->codec_config())) {
    +
    936  LOG(ERROR) << "Could not parse AACAudioSpecificconfig";
    +
    937  return false;
    +
    938  }
    +
    939  audio_stream_info->set_sampling_frequency(aac_config.frequency());
    +
    940  audio_stream_info->set_codec_string(
    + +
    942  kCodecAAC, aac_config.audio_object_type()));
    +
    943  }
    +
    944  }
    +
    945  }
    +
    946  }
    +
    947  }
    +
    948  }
    +
    949 
    +
    950  if (!is_initialized_) {
    +
    951  bool all_streams_have_config = true;
    +
    952  // Check if all collected stream infos have codec_config set.
    +
    953  for (uint32_t i = 0; i < stream_infos_.size(); i++) {
    +
    954  if (stream_infos_[i]->codec_string().empty()) {
    +
    955  all_streams_have_config = false;
    +
    956  break;
    +
    957  }
    +
    958  }
    +
    959  if (all_streams_have_config) {
    +
    960  init_cb_.Run(stream_infos_);
    +
    961  is_initialized_ = true;
    +
    962  }
    +
    963  }
    +
    964 
    +
    965  DCHECK_GT(media_sample_->data_size(), 0UL);
    +
    966  std::string key = base::UintToString(current_program_id_).append(":")
    +
    967  .append(base::UintToString(prev_pes_stream_id_));
    +
    968  std::map<std::string, uint32_t>::iterator it =
    +
    969  program_demux_stream_map_.find(key);
    +
    970  if (it == program_demux_stream_map_.end()) {
    +
    971  // TODO(ramjic): Log error message here and in other error cases through
    +
    972  // this method.
    +
    973  return false;
    +
    974  }
    +
    975  DemuxStreamIdMediaSample demux_stream_media_sample;
    +
    976  demux_stream_media_sample.parsed_audio_or_video_stream_id =
    +
    977  prev_pes_stream_id_;
    +
    978  demux_stream_media_sample.demux_stream_id = (*it).second;
    +
    979  demux_stream_media_sample.media_sample = media_sample_;
    +
    980  // Check if sample can be emitted.
    +
    981  if (!is_initialized_) {
    +
    982  media_sample_queue_.push_back(demux_stream_media_sample);
    +
    983  } else {
    +
    984  // flush the sample queue and emit all queued samples.
    +
    985  while (!media_sample_queue_.empty()) {
    +
    986  if (!EmitPendingSamples())
    +
    987  return false;
    +
    988  }
    +
    989  // Emit current sample.
    +
    990  if (!EmitSample(prev_pes_stream_id_, (*it).second, media_sample_, false))
    +
    991  return false;
    +
    992  }
    +
    993  return true;
    +
    994 }
    +
    995 
    +
    996 bool WvmMediaParser::EmitSample(uint32_t parsed_audio_or_video_stream_id,
    +
    997  uint32_t stream_id,
    +
    998  const std::shared_ptr<MediaSample>& new_sample,
    +
    999  bool isLastSample) {
    +
    1000  DCHECK(new_sample);
    +
    1001  if (isLastSample) {
    +
    1002  if ((parsed_audio_or_video_stream_id & kPesStreamIdVideoMask) ==
    +
    1003  kPesStreamIdVideo) {
    +
    1004  new_sample->set_duration(prev_media_sample_data_.video_sample_duration);
    +
    1005  } else if ((parsed_audio_or_video_stream_id & kPesStreamIdAudioMask) ==
    +
    1006  kPesStreamIdAudio) {
    +
    1007  new_sample->set_duration(prev_media_sample_data_.audio_sample_duration);
    +
    1008  }
    +
    1009  if (!new_sample_cb_.Run(stream_id, new_sample)) {
    +
    1010  LOG(ERROR) << "Failed to process the last sample.";
    +
    1011  return false;
    +
    1012  }
    +
    1013  return true;
    +
    1014  }
    +
    1015 
    +
    1016  // Cannot emit current sample. Compute duration first and then,
    +
    1017  // emit previous sample.
    +
    1018  if ((parsed_audio_or_video_stream_id & kPesStreamIdVideoMask) ==
    +
    1019  kPesStreamIdVideo) {
    +
    1020  if (prev_media_sample_data_.video_sample == NULL) {
    +
    1021  prev_media_sample_data_.video_sample = new_sample;
    +
    1022  prev_media_sample_data_.video_stream_id = stream_id;
    +
    1023  return true;
    +
    1024  }
    +
    1025  prev_media_sample_data_.video_sample->set_duration(
    +
    1026  new_sample->dts() - prev_media_sample_data_.video_sample->dts());
    +
    1027  prev_media_sample_data_.video_sample_duration =
    +
    1028  prev_media_sample_data_.video_sample->duration();
    +
    1029  if (!new_sample_cb_.Run(prev_media_sample_data_.video_stream_id,
    +
    1030  prev_media_sample_data_.video_sample)) {
    +
    1031  LOG(ERROR) << "Failed to process the video sample.";
    +
    1032  return false;
    +
    1033  }
    +
    1034  prev_media_sample_data_.video_sample = new_sample;
    +
    1035  prev_media_sample_data_.video_stream_id = stream_id;
    +
    1036  } else if ((parsed_audio_or_video_stream_id & kPesStreamIdAudioMask) ==
    +
    1037  kPesStreamIdAudio) {
    +
    1038  if (prev_media_sample_data_.audio_sample == NULL) {
    +
    1039  prev_media_sample_data_.audio_sample = new_sample;
    +
    1040  prev_media_sample_data_.audio_stream_id = stream_id;
    +
    1041  return true;
    +
    1042  }
    +
    1043  prev_media_sample_data_.audio_sample->set_duration(
    +
    1044  new_sample->dts() - prev_media_sample_data_.audio_sample->dts());
    +
    1045  prev_media_sample_data_.audio_sample_duration =
    +
    1046  prev_media_sample_data_.audio_sample->duration();
    +
    1047  if (!new_sample_cb_.Run(prev_media_sample_data_.audio_stream_id,
    +
    1048  prev_media_sample_data_.audio_sample)) {
    +
    1049  LOG(ERROR) << "Failed to process the audio sample.";
    +
    1050  return false;
    +
    1051  }
    +
    1052  prev_media_sample_data_.audio_sample = new_sample;
    +
    1053  prev_media_sample_data_.audio_stream_id = stream_id;
    +
    1054  }
    +
    1055  return true;
    +
    1056 }
    +
    1057 
    +
    1058 bool WvmMediaParser::GetAssetKey(const uint32_t asset_id,
    +
    1059  EncryptionKey* encryption_key) {
    +
    1060  DCHECK(decryption_key_source_);
    +
    1061  Status status = decryption_key_source_->FetchKeys(asset_id);
    +
    1062  if (!status.ok()) {
    +
    1063  LOG(ERROR) << "Fetch Key(s) failed for AssetID = " << asset_id
    +
    1064  << ", error = " << status;
    +
    1065  return false;
    +
    1066  }
    +
    1067 
    +
    1068  status = decryption_key_source_->GetKey(KeySource::TRACK_TYPE_HD,
    +
    1069  encryption_key);
    +
    1070  if (!status.ok()) {
    +
    1071  LOG(ERROR) << "Fetch Key(s) failed for AssetID = " << asset_id
    +
    1072  << ", error = " << status;
    +
    1073  return false;
    +
    1074  }
    +
    1075 
    +
    1076  return true;
    +
    1077 }
    +
    1078 
    +
    1079 bool WvmMediaParser::ProcessEcm() {
    +
    1080  // An error will be returned later if the samples need to be decrypted.
    +
    1081  if (!decryption_key_source_)
    +
    1082  return true;
    +
    1083 
    +
    1084  if (current_program_id_ > 0) {
    +
    1085  return true;
    +
    1086  }
    +
    1087  if (ecm_.size() != kEcmSizeBytes) {
    +
    1088  LOG(ERROR) << "Unexpected ECM size = " << ecm_.size()
    +
    1089  << ", expected size = " << kEcmSizeBytes;
    +
    1090  return false;
    +
    1091  }
    +
    1092  const uint8_t* ecm_data = ecm_.data();
    +
    1093  DCHECK(ecm_data);
    +
    1094  ecm_data += sizeof(uint32_t); // old version field - skip.
    +
    1095  ecm_data += sizeof(uint32_t); // clear lead - skip.
    +
    1096  ecm_data += sizeof(uint32_t); // system id(includes ECM version) - skip.
    +
    1097  uint32_t asset_id = ntohlFromBuffer(ecm_data);
    +
    1098  if (asset_id == 0) {
    +
    1099  LOG(ERROR) << "AssetID in ECM is not valid.";
    +
    1100  return false;
    +
    1101  }
    +
    1102  ecm_data += sizeof(uint32_t); // asset_id.
    +
    1103  EncryptionKey encryption_key;
    +
    1104  if (!GetAssetKey(asset_id, &encryption_key)) {
    +
    1105  return false;
    +
    1106  }
    +
    1107  if (encryption_key.key.size() < kAssetKeySizeBytes) {
    +
    1108  LOG(ERROR) << "Asset Key size of " << encryption_key.key.size()
    +
    1109  << " for AssetID = " << asset_id
    +
    1110  << " is less than minimum asset key size.";
    +
    1111  return false;
    +
    1112  }
    +
    1113  // Legacy WVM content may have asset keys > 16 bytes.
    +
    1114  // Use only the first 16 bytes of the asset key to get
    +
    1115  // the content key.
    +
    1116  std::vector<uint8_t> asset_key(
    +
    1117  encryption_key.key.begin(),
    +
    1118  encryption_key.key.begin() + kAssetKeySizeBytes);
    +
    1119  // WVM format always uses all zero IV.
    +
    1120  std::vector<uint8_t> zero_iv(kInitializationVectorSizeBytes, 0);
    +
    1121  AesCbcDecryptor asset_decryptor(kCtsPadding, AesCryptor::kUseConstantIv);
    +
    1122  if (!asset_decryptor.InitializeWithIv(asset_key, zero_iv)) {
    +
    1123  LOG(ERROR) << "Failed to initialize asset_decryptor.";
    +
    1124  return false;
    +
    1125  }
    +
    1126 
    +
    1127  const size_t content_key_buffer_size =
    +
    1128  kEcmFlagsSizeBytes + kEcmContentKeySizeBytes +
    +
    1129  kEcmPaddingSizeBytes; // flags + contentKey + padding.
    +
    1130  std::vector<uint8_t> content_key_buffer(content_key_buffer_size);
    +
    1131  CHECK(asset_decryptor.Crypt(ecm_data, content_key_buffer_size,
    +
    1132  content_key_buffer.data()));
    +
    1133 
    +
    1134  std::vector<uint8_t> decrypted_content_key_vec(
    +
    1135  content_key_buffer.begin() + 4,
    +
    1136  content_key_buffer.begin() + 20);
    +
    1137  std::unique_ptr<AesCbcDecryptor> content_decryptor(
    +
    1138  new AesCbcDecryptor(kCtsPadding, AesCryptor::kUseConstantIv));
    +
    1139  if (!content_decryptor->InitializeWithIv(decrypted_content_key_vec,
    +
    1140  zero_iv)) {
    +
    1141  LOG(ERROR) << "Failed to initialize content decryptor.";
    +
    1142  return false;
    +
    1143  }
    +
    1144 
    +
    1145  content_decryptor_ = std::move(content_decryptor);
    +
    1146  return true;
    +
    1147 }
    +
    1148 
    +
    1149 DemuxStreamIdMediaSample::DemuxStreamIdMediaSample() :
    +
    1150  demux_stream_id(0),
    +
    1151  parsed_audio_or_video_stream_id(0) {}
    +
    1152 
    +
    1153 DemuxStreamIdMediaSample::~DemuxStreamIdMediaSample() {}
    +
    1154 
    +
    1155 PrevSampleData::PrevSampleData() {
    +
    1156  Reset();
    +
    1157 }
    +
    1158 
    +
    1159 PrevSampleData::~PrevSampleData() {}
    +
    1160 
    +
    1161 void PrevSampleData::Reset() {
    +
    1162  audio_sample = NULL;
    +
    1163  video_sample = NULL;
    +
    1164  audio_stream_id = 0;
    +
    1165  video_stream_id = 0;
    +
    1166  audio_sample_duration = 0;
    +
    1167  video_sample_duration = 0;
    +
    1168 }
    +
    1169 
    +
    1170 } // namespace wvm
    +
    1171 } // namespace media
    +
    1172 } // namespace shaka
    +
    static std::shared_ptr< MediaSample > CreateEmptyMediaSample()
    Create a MediaSample object with default members.
    Definition: media_sample.cc:74
    static size_t GetAdtsFrameSize(const uint8_t *data, size_t num_bytes)
    Definition: adts_header.cc:23
    static std::string GetCodecString(Codec codec, uint8_t audio_object_type)
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    -
    static scoped_refptr< MediaSample > CreateEmptyMediaSample()
    Create a MediaSample object with default members.
    Definition: media_sample.cc:74
    diff --git a/docs/dd/d3b/mp4_2segmenter_8h_source.html b/docs/dd/d3b/mp4_2segmenter_8h_source.html index f4d57d8e4e..f195886d97 100644 --- a/docs/dd/d3b/mp4_2segmenter_8h_source.html +++ b/docs/dd/d3b/mp4_2segmenter_8h_source.html @@ -100,129 +100,128 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    11 #include <memory>
    12 #include <vector>
    13 
    -
    14 #include "packager/base/memory/ref_counted.h"
    -
    15 #include "packager/media/base/fourccs.h"
    -
    16 #include "packager/media/base/status.h"
    -
    17 #include "packager/media/formats/mp4/box_definitions.h"
    -
    18 
    -
    19 namespace shaka {
    -
    20 namespace media {
    -
    21 
    -
    22 struct MuxerOptions;
    -
    23 
    -
    24 class BufferWriter;
    -
    25 class KeySource;
    -
    26 class MediaSample;
    -
    27 class MediaStream;
    -
    28 class MuxerListener;
    -
    29 class ProgressListener;
    -
    30 
    -
    31 namespace mp4 {
    -
    32 
    -
    33 class Fragmenter;
    -
    34 
    -
    41 class Segmenter {
    -
    42  public:
    -
    43  Segmenter(const MuxerOptions& options,
    -
    44  std::unique_ptr<FileType> ftyp,
    -
    45  std::unique_ptr<Movie> moov);
    -
    46  virtual ~Segmenter();
    -
    47 
    -
    73  Status Initialize(const std::vector<MediaStream*>& streams,
    -
    74  MuxerListener* muxer_listener,
    -
    75  ProgressListener* progress_listener,
    -
    76  KeySource* encryption_key_source,
    -
    77  uint32_t max_sd_pixels,
    -
    78  uint32_t max_hd_pixels,
    -
    79  uint32_t max_uhd1_pixels,
    -
    80  double clear_lead_in_seconds,
    -
    81  double crypto_period_duration_in_seconds,
    -
    82  FourCC protection_scheme);
    -
    83 
    -
    86  Status Finalize();
    -
    87 
    -
    93  Status AddSample(const MediaStream* stream,
    -
    94  scoped_refptr<MediaSample> sample);
    -
    95 
    -
    98  virtual bool GetInitRange(size_t* offset, size_t* size) = 0;
    -
    99 
    -
    102  virtual bool GetIndexRange(size_t* offset, size_t* size) = 0;
    -
    103 
    -
    104  uint32_t GetReferenceTimeScale() const;
    -
    105 
    -
    107  double GetDuration() const;
    -
    108 
    -
    111  uint32_t sample_duration() const { return sample_duration_; }
    -
    112 
    -
    113  protected:
    -
    115  void UpdateProgress(uint64_t progress);
    -
    117  void SetComplete();
    -
    118 
    -
    119  const MuxerOptions& options() const { return options_; }
    -
    120  FileType* ftyp() { return ftyp_.get(); }
    -
    121  Movie* moov() { return moov_.get(); }
    -
    122  BufferWriter* fragment_buffer() { return fragment_buffer_.get(); }
    -
    123  SegmentIndex* sidx() { return sidx_.get(); }
    -
    124  MuxerListener* muxer_listener() { return muxer_listener_; }
    -
    125  uint64_t progress_target() { return progress_target_; }
    -
    126 
    -
    127  void set_progress_target(uint64_t progress_target) {
    -
    128  progress_target_ = progress_target;
    -
    129  }
    -
    130 
    -
    131  private:
    -
    132  virtual Status DoInitialize() = 0;
    -
    133  virtual Status DoFinalize() = 0;
    -
    134  virtual Status DoFinalizeSegment() = 0;
    -
    135 
    -
    136  Status FinalizeSegment();
    -
    137  uint32_t GetReferenceStreamId();
    -
    138 
    -
    139  Status FinalizeFragment(bool finalize_segment, Fragmenter* fragment);
    -
    140 
    -
    141  const MuxerOptions& options_;
    -
    142  std::unique_ptr<FileType> ftyp_;
    -
    143  std::unique_ptr<Movie> moov_;
    -
    144  std::unique_ptr<MovieFragment> moof_;
    -
    145  std::unique_ptr<BufferWriter> fragment_buffer_;
    -
    146  std::unique_ptr<SegmentIndex> sidx_;
    -
    147  std::vector<std::unique_ptr<Fragmenter>> fragmenters_;
    -
    148  std::vector<uint64_t> segment_durations_;
    -
    149  std::map<const MediaStream*, uint32_t> stream_map_;
    -
    150  MuxerListener* muxer_listener_;
    -
    151  ProgressListener* progress_listener_;
    -
    152  uint64_t progress_target_;
    -
    153  uint64_t accumulated_progress_;
    -
    154  uint32_t sample_duration_;
    -
    155 
    -
    156  DISALLOW_COPY_AND_ASSIGN(Segmenter);
    -
    157 };
    -
    158 
    -
    159 } // namespace mp4
    -
    160 } // namespace media
    -
    161 } // namespace shaka
    -
    162 
    -
    163 #endif // MEDIA_FORMATS_MP4_SEGMENTER_H_
    +
    14 #include "packager/media/base/fourccs.h"
    +
    15 #include "packager/media/base/status.h"
    +
    16 #include "packager/media/formats/mp4/box_definitions.h"
    +
    17 
    +
    18 namespace shaka {
    +
    19 namespace media {
    +
    20 
    +
    21 struct MuxerOptions;
    +
    22 
    +
    23 class BufferWriter;
    +
    24 class KeySource;
    +
    25 class MediaSample;
    +
    26 class MediaStream;
    +
    27 class MuxerListener;
    +
    28 class ProgressListener;
    +
    29 
    +
    30 namespace mp4 {
    +
    31 
    +
    32 class Fragmenter;
    +
    33 
    +
    40 class Segmenter {
    +
    41  public:
    +
    42  Segmenter(const MuxerOptions& options,
    +
    43  std::unique_ptr<FileType> ftyp,
    +
    44  std::unique_ptr<Movie> moov);
    +
    45  virtual ~Segmenter();
    +
    46 
    +
    72  Status Initialize(const std::vector<MediaStream*>& streams,
    +
    73  MuxerListener* muxer_listener,
    +
    74  ProgressListener* progress_listener,
    +
    75  KeySource* encryption_key_source,
    +
    76  uint32_t max_sd_pixels,
    +
    77  uint32_t max_hd_pixels,
    +
    78  uint32_t max_uhd1_pixels,
    +
    79  double clear_lead_in_seconds,
    +
    80  double crypto_period_duration_in_seconds,
    +
    81  FourCC protection_scheme);
    +
    82 
    +
    85  Status Finalize();
    +
    86 
    +
    92  Status AddSample(const MediaStream* stream,
    +
    93  std::shared_ptr<MediaSample> sample);
    +
    94 
    +
    97  virtual bool GetInitRange(size_t* offset, size_t* size) = 0;
    +
    98 
    +
    101  virtual bool GetIndexRange(size_t* offset, size_t* size) = 0;
    +
    102 
    +
    103  uint32_t GetReferenceTimeScale() const;
    +
    104 
    +
    106  double GetDuration() const;
    +
    107 
    +
    110  uint32_t sample_duration() const { return sample_duration_; }
    +
    111 
    +
    112  protected:
    +
    114  void UpdateProgress(uint64_t progress);
    +
    116  void SetComplete();
    +
    117 
    +
    118  const MuxerOptions& options() const { return options_; }
    +
    119  FileType* ftyp() { return ftyp_.get(); }
    +
    120  Movie* moov() { return moov_.get(); }
    +
    121  BufferWriter* fragment_buffer() { return fragment_buffer_.get(); }
    +
    122  SegmentIndex* sidx() { return sidx_.get(); }
    +
    123  MuxerListener* muxer_listener() { return muxer_listener_; }
    +
    124  uint64_t progress_target() { return progress_target_; }
    +
    125 
    +
    126  void set_progress_target(uint64_t progress_target) {
    +
    127  progress_target_ = progress_target;
    +
    128  }
    +
    129 
    +
    130  private:
    +
    131  virtual Status DoInitialize() = 0;
    +
    132  virtual Status DoFinalize() = 0;
    +
    133  virtual Status DoFinalizeSegment() = 0;
    +
    134 
    +
    135  Status FinalizeSegment();
    +
    136  uint32_t GetReferenceStreamId();
    +
    137 
    +
    138  Status FinalizeFragment(bool finalize_segment, Fragmenter* fragment);
    +
    139 
    +
    140  const MuxerOptions& options_;
    +
    141  std::unique_ptr<FileType> ftyp_;
    +
    142  std::unique_ptr<Movie> moov_;
    +
    143  std::unique_ptr<MovieFragment> moof_;
    +
    144  std::unique_ptr<BufferWriter> fragment_buffer_;
    +
    145  std::unique_ptr<SegmentIndex> sidx_;
    +
    146  std::vector<std::unique_ptr<Fragmenter>> fragmenters_;
    +
    147  std::vector<uint64_t> segment_durations_;
    +
    148  std::map<const MediaStream*, uint32_t> stream_map_;
    +
    149  MuxerListener* muxer_listener_;
    +
    150  ProgressListener* progress_listener_;
    +
    151  uint64_t progress_target_;
    +
    152  uint64_t accumulated_progress_;
    +
    153  uint32_t sample_duration_;
    +
    154 
    +
    155  DISALLOW_COPY_AND_ASSIGN(Segmenter);
    +
    156 };
    +
    157 
    +
    158 } // namespace mp4
    +
    159 } // namespace media
    +
    160 } // namespace shaka
    +
    161 
    +
    162 #endif // MEDIA_FORMATS_MP4_SEGMENTER_H_
    void UpdateProgress(uint64_t progress)
    Update segmentation progress using ProgressListener.
    Definition: segmenter.cc:390
    void SetComplete()
    Set progress to 100%.
    Definition: segmenter.cc:406
    virtual bool GetInitRange(size_t *offset, size_t *size)=0
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    -
    uint32_t sample_duration() const
    Definition: segmenter.h:111
    -
    Status AddSample(const MediaStream *stream, scoped_refptr< MediaSample > sample)
    Definition: segmenter.cc:323
    +
    uint32_t sample_duration() const
    Definition: segmenter.h:110
    This class listens to progress updates events.
    Status Initialize(const std::vector< MediaStream * > &streams, MuxerListener *muxer_listener, ProgressListener *progress_listener, 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)
    Definition: segmenter.cc:165
    - +
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    double GetDuration() const
    Definition: segmenter.cc:381
    virtual bool GetIndexRange(size_t *offset, size_t *size)=0
    - +
    Status AddSample(const MediaStream *stream, std::shared_ptr< MediaSample > sample)
    Definition: segmenter.cc:323
    + diff --git a/docs/dd/d3f/structshaka_1_1media_1_1mp4_1_1SyncSample.html b/docs/dd/d3f/structshaka_1_1media_1_1mp4_1_1SyncSample.html index 21f20a264a..07f3f2eb96 100644 --- a/docs/dd/d3f/structshaka_1_1media_1_1mp4_1_1SyncSample.html +++ b/docs/dd/d3f/structshaka_1_1media_1_1mp4_1_1SyncSample.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/dd/d42/encryptor_8h_source.html b/docs/dd/d42/encryptor_8h_source.html index 6b91e6c2e6..ab5281a703 100644 --- a/docs/dd/d42/encryptor_8h_source.html +++ b/docs/dd/d42/encryptor_8h_source.html @@ -98,70 +98,68 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    9 
    10 #include <memory>
    11 #include "packager/base/macros.h"
    -
    12 #include "packager/base/memory/ref_counted.h"
    -
    13 #include "packager/media/base/key_source.h"
    -
    14 #include "packager/media/base/status.h"
    -
    15 #include "packager/media/base/stream_info.h"
    -
    16 #include "packager/media/codecs/vpx_parser.h"
    -
    17 #include "packager/media/event/muxer_listener.h"
    -
    18 #include "packager/third_party/libwebm/src/mkvmuxer.hpp"
    -
    19 
    -
    20 namespace shaka {
    -
    21 namespace media {
    -
    22 
    -
    23 class AesCtrEncryptor;
    -
    24 class MediaSample;
    -
    25 
    -
    26 namespace webm {
    -
    27 
    -
    30 class Encryptor {
    -
    31  public:
    -
    32  Encryptor();
    -
    33  ~Encryptor();
    -
    34 
    -
    37  Status Initialize(MuxerListener* muxer_listener,
    -
    38  KeySource::TrackType track_type,
    -
    39  Codec codec,
    -
    40  KeySource* key_source,
    -
    41  bool webm_subsample_encryption);
    -
    42 
    -
    46  Status AddTrackInfo(mkvmuxer::Track* track);
    -
    47 
    -
    51  Status EncryptFrame(scoped_refptr<MediaSample> sample,
    -
    52  bool encrypt_frame);
    -
    53 
    -
    54  private:
    -
    55  // Create the encryptor for the internal encryption key.
    -
    56  Status CreateEncryptor(MuxerListener* muxer_listener,
    -
    57  KeySource::TrackType track_type,
    -
    58  Codec codec,
    -
    59  KeySource* key_source,
    -
    60  bool webm_subsample_encryption);
    -
    61 
    -
    62  private:
    -
    63  std::unique_ptr<EncryptionKey> key_;
    -
    64  std::unique_ptr<AesCtrEncryptor> encryptor_;
    -
    65  std::unique_ptr<VPxParser> vpx_parser_;
    -
    66 
    -
    67  DISALLOW_COPY_AND_ASSIGN(Encryptor);
    -
    68 };
    -
    69 
    -
    70 } // namespace webm
    -
    71 } // namespace media
    -
    72 } // namespace shaka
    -
    73 
    -
    74 #endif // MEDIA_FORMATS_WEBM_ENCRYPTOR_H_
    +
    12 #include "packager/media/base/key_source.h"
    +
    13 #include "packager/media/base/status.h"
    +
    14 #include "packager/media/base/stream_info.h"
    +
    15 #include "packager/media/codecs/vpx_parser.h"
    +
    16 #include "packager/media/event/muxer_listener.h"
    +
    17 #include "packager/third_party/libwebm/src/mkvmuxer.hpp"
    +
    18 
    +
    19 namespace shaka {
    +
    20 namespace media {
    +
    21 
    +
    22 class AesCtrEncryptor;
    +
    23 class MediaSample;
    +
    24 
    +
    25 namespace webm {
    +
    26 
    +
    29 class Encryptor {
    +
    30  public:
    +
    31  Encryptor();
    +
    32  ~Encryptor();
    +
    33 
    +
    36  Status Initialize(MuxerListener* muxer_listener,
    +
    37  KeySource::TrackType track_type,
    +
    38  Codec codec,
    +
    39  KeySource* key_source,
    +
    40  bool webm_subsample_encryption);
    +
    41 
    +
    45  Status AddTrackInfo(mkvmuxer::Track* track);
    +
    46 
    +
    50  Status EncryptFrame(std::shared_ptr<MediaSample> sample, bool encrypt_frame);
    +
    51 
    +
    52  private:
    +
    53  // Create the encryptor for the internal encryption key.
    +
    54  Status CreateEncryptor(MuxerListener* muxer_listener,
    +
    55  KeySource::TrackType track_type,
    +
    56  Codec codec,
    +
    57  KeySource* key_source,
    +
    58  bool webm_subsample_encryption);
    +
    59 
    +
    60  private:
    +
    61  std::unique_ptr<EncryptionKey> key_;
    +
    62  std::unique_ptr<AesCtrEncryptor> encryptor_;
    +
    63  std::unique_ptr<VPxParser> vpx_parser_;
    +
    64 
    +
    65  DISALLOW_COPY_AND_ASSIGN(Encryptor);
    +
    66 };
    +
    67 
    +
    68 } // namespace webm
    +
    69 } // namespace media
    +
    70 } // namespace shaka
    +
    71 
    +
    72 #endif // MEDIA_FORMATS_WEBM_ENCRYPTOR_H_
    Status AddTrackInfo(mkvmuxer::Track *track)
    Definition: encryptor.cc:71
    +
    Status EncryptFrame(std::shared_ptr< MediaSample > sample, bool encrypt_frame)
    Definition: encryptor.cc:76
    Status Initialize(MuxerListener *muxer_listener, KeySource::TrackType track_type, Codec codec, KeySource *key_source, bool webm_subsample_encryption)
    Definition: encryptor.cc:61
    - -
    Status EncryptFrame(scoped_refptr< MediaSample > sample, bool encrypt_frame)
    Definition: encryptor.cc:76
    +
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    diff --git a/docs/dd/d46/webm__parser_8h_source.html b/docs/dd/d46/webm__parser_8h_source.html index ab1d92157f..ed64ca34d7 100644 --- a/docs/dd/d46/webm__parser_8h_source.html +++ b/docs/dd/d46/webm__parser_8h_source.html @@ -227,7 +227,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d4d/structshaka_1_1media_1_1mp4_1_1MovieFragment-members.html b/docs/dd/d4d/structshaka_1_1media_1_1mp4_1_1MovieFragment-members.html index 7fa2939443..a58f1e1486 100644 --- a/docs/dd/d4d/structshaka_1_1media_1_1mp4_1_1MovieFragment-members.html +++ b/docs/dd/d4d/structshaka_1_1media_1_1mp4_1_1MovieFragment-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    shaka::media::mp4::EncryptingFragmenter::EncryptingFragmenter (scoped_refptr< StreamInfostd::shared_ptr< StreamInfo info,
    set_encryption_key

    Member Function Documentation

    - +
    @@ -279,7 +279,7 @@ void  - + @@ -299,7 +299,7 @@ void 
    set_encryption_key Status shaka::media::mp4::EncryptingFragmenter::AddSample (scoped_refptr< MediaSamplestd::shared_ptr< MediaSample sample)
    set_encryption_key
    Returns
    OK on success, an error status otherwise.
    -

    Reimplemented from shaka::media::mp4::Fragmenter.

    +

    Reimplemented from shaka::media::mp4::Fragmenter.

    Definition at line 106 of file encrypting_fragmenter.cc.

    @@ -405,7 +405,7 @@ void 
    set_encryption_key diff --git a/docs/dc/df4/classshaka_1_1media_1_1webm_1_1SingleSegmentSegmenter-members.html b/docs/dc/df4/classshaka_1_1media_1_1webm_1_1SingleSegmentSegmenter-members.html index 1a4ad07b41..98fdb8d27d 100644 --- a/docs/dc/df4/classshaka_1_1media_1_1webm_1_1SingleSegmentSegmenter-members.html +++ b/docs/dc/df4/classshaka_1_1media_1_1webm_1_1SingleSegmentSegmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::webm::SingleSegmentSegmenter, including all inherited members.

    - + @@ -129,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(scoped_refptr< MediaSample > sample)shaka::media::webm::Segmenter
    AddSample(std::shared_ptr< MediaSample > sample)shaka::media::webm::Segmenter
    cluster() (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    cluster_length_in_time_scale() const (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    cues() (defined in shaka::media::webm::Segmenter)shaka::media::webm::Segmenterinlineprotected
    diff --git a/docs/dc/df7/structshaka_1_1media_1_1mp4_1_1TrackFragmentRun-members.html b/docs/dc/df7/structshaka_1_1media_1_1mp4_1_1TrackFragmentRun-members.html index 490e6e9255..fcb4b9c933 100644 --- a/docs/dc/df7/structshaka_1_1media_1_1mp4_1_1TrackFragmentRun-members.html +++ b/docs/dc/df7/structshaka_1_1media_1_1mp4_1_1TrackFragmentRun-members.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/dc/df8/closure__thread_8h_source.html b/docs/dc/df8/closure__thread_8h_source.html index 4578cc1509..3e635df73f 100644 --- a/docs/dc/df8/closure__thread_8h_source.html +++ b/docs/dc/df8/closure__thread_8h_source.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/dd/d06/structshaka_1_1media_1_1mp4_1_1ChunkOffset.html b/docs/dd/d06/structshaka_1_1media_1_1mp4_1_1ChunkOffset.html index b3c906afb1..3f7cce8b2e 100644 --- a/docs/dd/d06/structshaka_1_1media_1_1mp4_1_1ChunkOffset.html +++ b/docs/dd/d06/structshaka_1_1media_1_1mp4_1_1ChunkOffset.html @@ -180,7 +180,7 @@ uint32_t 
    flags
    diff --git a/docs/dd/d53/structshaka_1_1media_1_1wvm_1_1DemuxStreamIdMediaSample-members.html b/docs/dd/d53/structshaka_1_1media_1_1wvm_1_1DemuxStreamIdMediaSample-members.html index a85af3acbf..df9c89d60c 100644 --- a/docs/dd/d53/structshaka_1_1media_1_1wvm_1_1DemuxStreamIdMediaSample-members.html +++ b/docs/dd/d53/structshaka_1_1media_1_1wvm_1_1DemuxStreamIdMediaSample-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/dd/d54/widevine__encryption__flags_8h_source.html b/docs/dd/d54/widevine__encryption__flags_8h_source.html index c211cf6620..d783b4618e 100644 --- a/docs/dd/d54/widevine__encryption__flags_8h_source.html +++ b/docs/dd/d54/widevine__encryption__flags_8h_source.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d59/classshaka_1_1media_1_1mp2t_1_1EsParserH265-members.html b/docs/dd/d59/classshaka_1_1media_1_1mp2t_1_1EsParserH265-members.html index ad3f664670..8425ea741f 100644 --- a/docs/dd/d59/classshaka_1_1media_1_1mp2t_1_1EsParserH265-members.html +++ b/docs/dd/d59/classshaka_1_1media_1_1mp2t_1_1EsParserH265-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d59/structshaka_1_1media_1_1mp4_1_1SchemeInfo-members.html b/docs/dd/d59/structshaka_1_1media_1_1mp4_1_1SchemeInfo-members.html index 8efd0ef96c..4779da0bcf 100644 --- a/docs/dd/d59/structshaka_1_1media_1_1mp4_1_1SchemeInfo-members.html +++ b/docs/dd/d59/structshaka_1_1media_1_1mp4_1_1SchemeInfo-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d64/structshaka_1_1media_1_1mp4_1_1SyncSample-members.html b/docs/dd/d64/structshaka_1_1media_1_1mp4_1_1SyncSample-members.html index dfb996cd7d..b58e19d99f 100644 --- a/docs/dd/d64/structshaka_1_1media_1_1mp4_1_1SyncSample-members.html +++ b/docs/dd/d64/structshaka_1_1media_1_1mp4_1_1SyncSample-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d65/vp8__parser_8h_source.html b/docs/dd/d65/vp8__parser_8h_source.html index 10aaf896af..e8c02358e4 100644 --- a/docs/dd/d65/vp8__parser_8h_source.html +++ b/docs/dd/d65/vp8__parser_8h_source.html @@ -136,7 +136,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d67/h264__byte__to__unit__stream__converter_8cc_source.html b/docs/dd/d67/h264__byte__to__unit__stream__converter_8cc_source.html index 7064f054db..5209e950b9 100644 --- a/docs/dd/d67/h264__byte__to__unit__stream__converter_8cc_source.html +++ b/docs/dd/d67/h264__byte__to__unit__stream__converter_8cc_source.html @@ -177,7 +177,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d6e/classshaka_1_1media_1_1H265VideoSliceHeaderParser-members.html b/docs/dd/d6e/classshaka_1_1media_1_1H265VideoSliceHeaderParser-members.html index 4e8bc90647..9e790e54af 100644 --- a/docs/dd/d6e/classshaka_1_1media_1_1H265VideoSliceHeaderParser-members.html +++ b/docs/dd/d6e/classshaka_1_1media_1_1H265VideoSliceHeaderParser-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d71/structshaka_1_1media_1_1mp4_1_1PixelAspectRatio.html b/docs/dd/d71/structshaka_1_1media_1_1mp4_1_1PixelAspectRatio.html index be6c053bee..72f4a1766e 100644 --- a/docs/dd/d71/structshaka_1_1media_1_1mp4_1_1PixelAspectRatio.html +++ b/docs/dd/d71/structshaka_1_1media_1_1mp4_1_1PixelAspectRatio.html @@ -176,7 +176,7 @@ Additional Inherited Members diff --git a/docs/dd/d7a/classshaka_1_1media_1_1MuxerListener.html b/docs/dd/d7a/classshaka_1_1media_1_1MuxerListener.html index 4f3210a888..64b2e214db 100644 --- a/docs/dd/d7a/classshaka_1_1media_1_1MuxerListener.html +++ b/docs/dd/d7a/classshaka_1_1media_1_1MuxerListener.html @@ -469,7 +469,7 @@ Public Member Functions diff --git a/docs/dd/d7c/classshaka_1_1media_1_1IoCache.html b/docs/dd/d7c/classshaka_1_1media_1_1IoCache.html index aa8405478e..148cfec525 100644 --- a/docs/dd/d7c/classshaka_1_1media_1_1IoCache.html +++ b/docs/dd/d7c/classshaka_1_1media_1_1IoCache.html @@ -297,7 +297,7 @@ void  diff --git a/docs/dd/d80/media__sample_8h_source.html b/docs/dd/d80/media__sample_8h_source.html index 017d7997df..92835ac60f 100644 --- a/docs/dd/d80/media__sample_8h_source.html +++ b/docs/dd/d80/media__sample_8h_source.html @@ -97,182 +97,180 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    8 #define MEDIA_BASE_MEDIA_SAMPLE_H_
    9 
    10 #include <deque>
    -
    11 #include <string>
    -
    12 #include <vector>
    -
    13 
    -
    14 #include "packager/base/logging.h"
    -
    15 #include "packager/base/memory/ref_counted.h"
    +
    11 #include <memory>
    +
    12 #include <string>
    +
    13 #include <vector>
    +
    14 
    +
    15 #include "packager/base/logging.h"
    16 #include "packager/media/base/decrypt_config.h"
    17 
    18 namespace shaka {
    19 namespace media {
    20 
    -
    22 class MediaSample : public base::RefCountedThreadSafe<MediaSample> {
    +
    22 class MediaSample {
    23  public:
    -
    29  static scoped_refptr<MediaSample> CopyFrom(const uint8_t* data,
    -
    30  size_t size,
    -
    31  bool is_key_frame);
    +
    29  static std::shared_ptr<MediaSample> CopyFrom(const uint8_t* data,
    +
    30  size_t size,
    +
    31  bool is_key_frame);
    32 
    -
    42  static scoped_refptr<MediaSample> CopyFrom(const uint8_t* data,
    -
    43  size_t size,
    -
    44  const uint8_t* side_data,
    -
    45  size_t side_data_size,
    -
    46  bool is_key_frame);
    +
    42  static std::shared_ptr<MediaSample> CopyFrom(const uint8_t* data,
    +
    43  size_t size,
    +
    44  const uint8_t* side_data,
    +
    45  size_t side_data_size,
    +
    46  bool is_key_frame);
    47 
    -
    54  static scoped_refptr<MediaSample> FromMetadata(const uint8_t* metadata,
    -
    55  size_t metadata_size);
    +
    54  static std::shared_ptr<MediaSample> FromMetadata(const uint8_t* metadata,
    +
    55  size_t metadata_size);
    56 
    -
    58  static scoped_refptr<MediaSample> CreateEmptyMediaSample();
    +
    58  static std::shared_ptr<MediaSample> CreateEmptyMediaSample();
    59 
    -
    63  static scoped_refptr<MediaSample> CreateEOSBuffer();
    +
    63  static std::shared_ptr<MediaSample> CreateEOSBuffer();
    64 
    -
    65  int64_t dts() const {
    -
    66  DCHECK(!end_of_stream());
    -
    67  return dts_;
    -
    68  }
    -
    69 
    -
    70  void set_dts(int64_t dts) { dts_ = dts; }
    -
    71 
    -
    72  int64_t pts() const {
    -
    73  DCHECK(!end_of_stream());
    -
    74  return pts_;
    -
    75  }
    -
    76 
    -
    77  void set_pts(int64_t pts) { pts_ = pts; }
    -
    78 
    -
    79  int64_t duration() const {
    -
    80  DCHECK(!end_of_stream());
    -
    81  return duration_;
    -
    82  }
    -
    83 
    -
    84  void set_duration(int64_t duration) {
    -
    85  DCHECK(!end_of_stream());
    -
    86  duration_ = duration;
    -
    87  }
    -
    88 
    -
    89  bool is_key_frame() const {
    -
    90  DCHECK(!end_of_stream());
    -
    91  return is_key_frame_;
    -
    92  }
    -
    93 
    -
    94  bool is_encrypted() const {
    -
    95  DCHECK(!end_of_stream());
    -
    96  return is_encrypted_;
    -
    97  }
    -
    98  const uint8_t* data() const {
    -
    99  DCHECK(!end_of_stream());
    -
    100  return &data_[0];
    -
    101  }
    -
    102 
    -
    103  uint8_t* writable_data() {
    -
    104  DCHECK(!end_of_stream());
    -
    105  return &data_[0];
    -
    106  }
    -
    107 
    -
    108  size_t data_size() const {
    -
    109  DCHECK(!end_of_stream());
    -
    110  return data_.size();
    -
    111  }
    -
    112 
    -
    113  const uint8_t* side_data() const {
    -
    114  return &side_data_[0];
    -
    115  }
    -
    116 
    -
    117  size_t side_data_size() const {
    -
    118  return side_data_.size();
    -
    119  }
    -
    120 
    -
    121  const DecryptConfig* decrypt_config() const {
    -
    122  return decrypt_config_.get();
    -
    123  }
    -
    124 
    -
    125  void set_data(const uint8_t* data, const size_t data_size) {
    -
    126  data_.assign(data, data + data_size);
    -
    127  }
    -
    128 
    -
    129  void resize_data(const size_t data_size) {
    -
    130  data_.resize(data_size);
    -
    131  }
    -
    132 
    -
    133  void set_is_key_frame(bool value) {
    -
    134  is_key_frame_ = value;
    -
    135  }
    -
    136 
    -
    137  void set_is_encrypted(bool value) {
    -
    138  is_encrypted_ = value;
    -
    139  }
    -
    140 
    -
    141  void set_decrypt_config(std::unique_ptr<DecryptConfig> decrypt_config) {
    -
    142  decrypt_config_ = std::move(decrypt_config);
    -
    143  }
    -
    144 
    -
    145  // If there's no data in this buffer, it represents end of stream.
    -
    146  bool end_of_stream() const { return data_.size() == 0; }
    +
    65  // Create a MediaSample. Buffer will be padded and aligned as necessary.
    +
    66  // |data|,|side_data| can be NULL, which indicates an empty sample.
    +
    67  // |size|,|side_data_size| should not be negative.
    +
    68  MediaSample(const uint8_t* data,
    +
    69  size_t size,
    +
    70  const uint8_t* side_data,
    +
    71  size_t side_data_size,
    +
    72  bool is_key_frame);
    +
    73  MediaSample();
    +
    74  virtual ~MediaSample();
    +
    75 
    +
    76  int64_t dts() const {
    +
    77  DCHECK(!end_of_stream());
    +
    78  return dts_;
    +
    79  }
    +
    80 
    +
    81  void set_dts(int64_t dts) { dts_ = dts; }
    +
    82 
    +
    83  int64_t pts() const {
    +
    84  DCHECK(!end_of_stream());
    +
    85  return pts_;
    +
    86  }
    +
    87 
    +
    88  void set_pts(int64_t pts) { pts_ = pts; }
    +
    89 
    +
    90  int64_t duration() const {
    +
    91  DCHECK(!end_of_stream());
    +
    92  return duration_;
    +
    93  }
    +
    94 
    +
    95  void set_duration(int64_t duration) {
    +
    96  DCHECK(!end_of_stream());
    +
    97  duration_ = duration;
    +
    98  }
    +
    99 
    +
    100  bool is_key_frame() const {
    +
    101  DCHECK(!end_of_stream());
    +
    102  return is_key_frame_;
    +
    103  }
    +
    104 
    +
    105  bool is_encrypted() const {
    +
    106  DCHECK(!end_of_stream());
    +
    107  return is_encrypted_;
    +
    108  }
    +
    109  const uint8_t* data() const {
    +
    110  DCHECK(!end_of_stream());
    +
    111  return &data_[0];
    +
    112  }
    +
    113 
    +
    114  uint8_t* writable_data() {
    +
    115  DCHECK(!end_of_stream());
    +
    116  return &data_[0];
    +
    117  }
    +
    118 
    +
    119  size_t data_size() const {
    +
    120  DCHECK(!end_of_stream());
    +
    121  return data_.size();
    +
    122  }
    +
    123 
    +
    124  const uint8_t* side_data() const {
    +
    125  return &side_data_[0];
    +
    126  }
    +
    127 
    +
    128  size_t side_data_size() const {
    +
    129  return side_data_.size();
    +
    130  }
    +
    131 
    +
    132  const DecryptConfig* decrypt_config() const {
    +
    133  return decrypt_config_.get();
    +
    134  }
    +
    135 
    +
    136  void set_data(const uint8_t* data, const size_t data_size) {
    +
    137  data_.assign(data, data + data_size);
    +
    138  }
    +
    139 
    +
    140  void resize_data(const size_t data_size) {
    +
    141  data_.resize(data_size);
    +
    142  }
    +
    143 
    +
    144  void set_is_key_frame(bool value) {
    +
    145  is_key_frame_ = value;
    +
    146  }
    147 
    -
    148  const std::string& config_id() const { return config_id_; }
    -
    149  void set_config_id(const std::string& config_id) {
    -
    150  config_id_ = config_id;
    -
    151  }
    -
    152 
    -
    154  std::string ToString() const;
    +
    148  void set_is_encrypted(bool value) {
    +
    149  is_encrypted_ = value;
    +
    150  }
    +
    151 
    +
    152  void set_decrypt_config(std::unique_ptr<DecryptConfig> decrypt_config) {
    +
    153  decrypt_config_ = std::move(decrypt_config);
    +
    154  }
    155 
    -
    156  private:
    -
    157  friend class base::RefCountedThreadSafe<MediaSample>;
    +
    156  // If there's no data in this buffer, it represents end of stream.
    +
    157  bool end_of_stream() const { return data_.size() == 0; }
    158 
    -
    159  // Create a MediaSample. Buffer will be padded and aligned as necessary.
    -
    160  // |data|,|side_data| can be NULL, which indicates an empty sample.
    -
    161  // |size|,|side_data_size| should not be negative.
    -
    162  MediaSample(const uint8_t* data,
    -
    163  size_t size,
    -
    164  const uint8_t* side_data,
    -
    165  size_t side_data_size,
    -
    166  bool is_key_frame);
    -
    167  MediaSample();
    -
    168  virtual ~MediaSample();
    -
    169 
    -
    170  // Decoding time stamp.
    -
    171  int64_t dts_;
    -
    172  // Presentation time stamp.
    -
    173  int64_t pts_;
    -
    174  int64_t duration_;
    -
    175  bool is_key_frame_;
    -
    176  // is sample encrypted ?
    -
    177  bool is_encrypted_;
    -
    178 
    -
    179  // Main buffer data.
    -
    180  std::vector<uint8_t> data_;
    -
    181  // Contain additional buffers to complete the main one. Needed by WebM
    -
    182  // http://www.matroska.org/technical/specs/index.html BlockAdditional[A5].
    -
    183  // Not used by mp4 and other containers.
    -
    184  std::vector<uint8_t> side_data_;
    -
    185 
    -
    186  // Text specific fields.
    -
    187  // For now this is the cue identifier for WebVTT.
    -
    188  std::string config_id_;
    -
    189 
    -
    190  // Decrypt configuration.
    -
    191  std::unique_ptr<DecryptConfig> decrypt_config_;
    -
    192 
    -
    193  DISALLOW_COPY_AND_ASSIGN(MediaSample);
    -
    194 };
    +
    159  const std::string& config_id() const { return config_id_; }
    +
    160  void set_config_id(const std::string& config_id) {
    +
    161  config_id_ = config_id;
    +
    162  }
    +
    163 
    +
    165  std::string ToString() const;
    +
    166 
    +
    167  private:
    +
    168  // Decoding time stamp.
    +
    169  int64_t dts_;
    +
    170  // Presentation time stamp.
    +
    171  int64_t pts_;
    +
    172  int64_t duration_;
    +
    173  bool is_key_frame_;
    +
    174  // is sample encrypted ?
    +
    175  bool is_encrypted_;
    +
    176 
    +
    177  // Main buffer data.
    +
    178  std::vector<uint8_t> data_;
    +
    179  // Contain additional buffers to complete the main one. Needed by WebM
    +
    180  // http://www.matroska.org/technical/specs/index.html BlockAdditional[A5].
    +
    181  // Not used by mp4 and other containers.
    +
    182  std::vector<uint8_t> side_data_;
    +
    183 
    +
    184  // Text specific fields.
    +
    185  // For now this is the cue identifier for WebVTT.
    +
    186  std::string config_id_;
    +
    187 
    +
    188  // Decrypt configuration.
    +
    189  std::unique_ptr<DecryptConfig> decrypt_config_;
    +
    190 
    +
    191  DISALLOW_COPY_AND_ASSIGN(MediaSample);
    +
    192 };
    +
    193 
    +
    194 typedef std::deque<std::shared_ptr<MediaSample>> BufferQueue;
    195 
    -
    196 typedef std::deque<scoped_refptr<MediaSample> > BufferQueue;
    -
    197 
    -
    198 } // namespace media
    -
    199 } // namespace shaka
    -
    200 
    -
    201 #endif // MEDIA_BASE_MEDIA_SAMPLE_H_
    -
    static scoped_refptr< MediaSample > FromMetadata(const uint8_t *metadata, size_t metadata_size)
    Definition: media_sample.cc:67
    +
    196 } // namespace media
    +
    197 } // namespace shaka
    +
    198 
    +
    199 #endif // MEDIA_BASE_MEDIA_SAMPLE_H_
    -
    static scoped_refptr< MediaSample > CreateEOSBuffer()
    Definition: media_sample.cc:80
    -
    std::string ToString() const
    Definition: media_sample.cc:84
    +
    static std::shared_ptr< MediaSample > CreateEOSBuffer()
    Definition: media_sample.cc:79
    +
    static std::shared_ptr< MediaSample > CreateEmptyMediaSample()
    Create a MediaSample object with default members.
    Definition: media_sample.cc:74
    +
    std::string ToString() const
    Definition: media_sample.cc:83
    +
    static std::shared_ptr< MediaSample > FromMetadata(const uint8_t *metadata, size_t metadata_size)
    Definition: media_sample.cc:67
    Class to hold a media sample.
    Definition: media_sample.h:22
    -
    static scoped_refptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
    Definition: media_sample.cc:45
    -
    static scoped_refptr< MediaSample > CreateEmptyMediaSample()
    Create a MediaSample object with default members.
    Definition: media_sample.cc:74
    +
    static std::shared_ptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
    Definition: media_sample.cc:45
    diff --git a/docs/dd/d87/memory__file_8cc_source.html b/docs/dd/d87/memory__file_8cc_source.html index 4fa5ae8d25..97319c439a 100644 --- a/docs/dd/d87/memory__file_8cc_source.html +++ b/docs/dd/d87/memory__file_8cc_source.html @@ -242,7 +242,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d88/pes__packet__generator_8h_source.html b/docs/dd/d88/pes__packet__generator_8h_source.html index bff42ae199..31d806cb97 100644 --- a/docs/dd/d88/pes__packet__generator_8h_source.html +++ b/docs/dd/d88/pes__packet__generator_8h_source.html @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    35 
    41  virtual bool Initialize(const StreamInfo& stream);
    42 
    -
    47  virtual bool PushSample(scoped_refptr<MediaSample> sample);
    +
    47  virtual bool PushSample(std::shared_ptr<MediaSample> sample);
    48 
    53  virtual bool SetEncryptionKey(std::unique_ptr<EncryptionKey> encryption_key);
    54 
    @@ -162,17 +162,17 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    95 
    96 #endif // PACKAGER_MEDIA_FORMATS_MP2T_PES_PACKET_GENERATOR_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    virtual std::unique_ptr< PesPacket > GetNextPesPacket()
    virtual bool Initialize(const StreamInfo &stream)
    +
    virtual bool PushSample(std::shared_ptr< MediaSample > sample)
    virtual bool SetEncryptionKey(std::unique_ptr< EncryptionKey > encryption_key)
    -
    virtual bool PushSample(scoped_refptr< MediaSample > sample)
    diff --git a/docs/dd/d8c/file__test__util_8h_source.html b/docs/dd/d8c/file__test__util_8h_source.html index 03b545d927..8bea7aaedd 100644 --- a/docs/dd/d8c/file__test__util_8h_source.html +++ b/docs/dd/d8c/file__test__util_8h_source.html @@ -130,7 +130,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d8d/structshaka_1_1media_1_1mp4_1_1SegmentIndex-members.html b/docs/dd/d8d/structshaka_1_1media_1_1mp4_1_1SegmentIndex-members.html index bf42144924..a0f6f998ec 100644 --- a/docs/dd/d8d/structshaka_1_1media_1_1mp4_1_1SegmentIndex-members.html +++ b/docs/dd/d8d/structshaka_1_1media_1_1mp4_1_1SegmentIndex-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d98/ts__packet__writer__util_8h_source.html b/docs/dd/d98/ts__packet__writer__util_8h_source.html index cdb5bddf28..7b62307b9c 100644 --- a/docs/dd/d98/ts__packet__writer__util_8h_source.html +++ b/docs/dd/d98/ts__packet__writer__util_8h_source.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d9a/audio__timestamp__helper_8h_source.html b/docs/dd/d9a/audio__timestamp__helper_8h_source.html index 25a457cc77..0e258664ff 100644 --- a/docs/dd/d9a/audio__timestamp__helper_8h_source.html +++ b/docs/dd/d9a/audio__timestamp__helper_8h_source.html @@ -167,7 +167,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d9b/structshaka_1_1media_1_1mp4_1_1SegmentReference.html b/docs/dd/d9b/structshaka_1_1media_1_1mp4_1_1SegmentReference.html index 7d7b403592..7d916b25ec 100644 --- a/docs/dd/d9b/structshaka_1_1media_1_1mp4_1_1SegmentReference.html +++ b/docs/dd/d9b/structshaka_1_1media_1_1mp4_1_1SegmentReference.html @@ -143,7 +143,7 @@ uint64_t earliest_presenta diff --git a/docs/dd/d9d/classshaka_1_1MpdNotifier-members.html b/docs/dd/d9d/classshaka_1_1MpdNotifier-members.html index 35d13f6962..3cf25f9c82 100644 --- a/docs/dd/d9d/classshaka_1_1MpdNotifier-members.html +++ b/docs/dd/d9d/classshaka_1_1MpdNotifier-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/da4/structshaka_1_1xml_1_1XmlDeleter.html b/docs/dd/da4/structshaka_1_1xml_1_1XmlDeleter.html index 59c8e09b90..b6a51e2ceb 100644 --- a/docs/dd/da4/structshaka_1_1xml_1_1XmlDeleter.html +++ b/docs/dd/da4/structshaka_1_1xml_1_1XmlDeleter.html @@ -127,7 +127,7 @@ void operator() (xmlCh diff --git a/docs/dd/da5/classshaka_1_1media_1_1webm_1_1TwoPassSingleSegmentSegmenter.html b/docs/dd/da5/classshaka_1_1media_1_1webm_1_1TwoPassSingleSegmentSegmenter.html index c7498c3f25..53c86e9e94 100644 --- a/docs/dd/da5/classshaka_1_1media_1_1webm_1_1TwoPassSingleSegmentSegmenter.html +++ b/docs/dd/da5/classshaka_1_1media_1_1webm_1_1TwoPassSingleSegmentSegmenter.html @@ -133,8 +133,8 @@ Public Member Functions   Status Finalize ()   -Status AddSample (scoped_refptr< MediaSample > sample) -  +Status AddSample (std::shared_ptr< MediaSample > sample) +  float GetDuration () const   @@ -220,7 +220,7 @@ uint64_t 
    cluster_length_in diff --git a/docs/dd/daa/vod__media__info__dump__muxer__listener_8h_source.html b/docs/dd/daa/vod__media__info__dump__muxer__listener_8h_source.html index 91a2ed4884..ea082c3b00 100644 --- a/docs/dd/daa/vod__media__info__dump__muxer__listener_8h_source.html +++ b/docs/dd/daa/vod__media__info__dump__muxer__listener_8h_source.html @@ -166,7 +166,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    84 } // namespace shaka
    85 
    86 #endif // MEDIA_EVENT_VOD_MEDIA_INFO_DUMP_MUXER_LISTENER_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    void OnSampleDurationReady(uint32_t sample_duration) override
    void OnNewSegment(const std::string &file_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size) override
    @@ -180,7 +180,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dab/webm__muxer_8h_source.html b/docs/dd/dab/webm__muxer_8h_source.html index 659bb4e680..5a6389df05 100644 --- a/docs/dd/dab/webm__muxer_8h_source.html +++ b/docs/dd/dab/webm__muxer_8h_source.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    27  Status Initialize() override;
    28  Status Finalize() override;
    29  Status DoAddSample(const MediaStream* stream,
    -
    30  scoped_refptr<MediaSample> sample) override;
    +
    30  std::shared_ptr<MediaSample> sample) override;
    31 
    32  void FireOnMediaStartEvent();
    33  void FireOnMediaEndEvent();
    @@ -131,14 +131,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    44 #endif // MEDIA_FORMATS_WEBM_WEBM_MUXER_H_
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    Implements WebM Muxer.
    Definition: webm_muxer.h:19
    - +
    WebMMuxer(const MuxerOptions &options)
    Create a WebMMuxer object from MuxerOptions.
    Definition: webm_muxer.cc:22
    - + diff --git a/docs/dd/dae/structshaka_1_1media_1_1mp4_1_1WebVTTSourceLabelBox-members.html b/docs/dd/dae/structshaka_1_1media_1_1mp4_1_1WebVTTSourceLabelBox-members.html index af31b3704a..a908c94f67 100644 --- a/docs/dd/dae/structshaka_1_1media_1_1mp4_1_1WebVTTSourceLabelBox-members.html +++ b/docs/dd/dae/structshaka_1_1media_1_1mp4_1_1WebVTTSourceLabelBox-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/dd/db0/classshaka_1_1media_1_1WebMAudioClient-members.html b/docs/dd/db0/classshaka_1_1media_1_1WebMAudioClient-members.html index 6937a6fa80..c8db38ada5 100644 --- a/docs/dd/db0/classshaka_1_1media_1_1WebMAudioClient-members.html +++ b/docs/dd/db0/classshaka_1_1media_1_1WebMAudioClient-members.html @@ -94,7 +94,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::WebMAudioClient, including all inherited members.

    - + @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    DISALLOW_COPY_AND_ASSIGN(WebMParserClient) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientprotected
    GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted)shaka::media::WebMAudioClient
    GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, int64_t seek_preroll, int64_t codec_delay, const std::string &language, bool is_encrypted)shaka::media::WebMAudioClient
    OnBinary(int id, const uint8_t *data, int size) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientvirtual
    OnListEnd(int id) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientvirtual
    OnListStart(int id) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientvirtual
    diff --git a/docs/dd/db3/structshaka_1_1media_1_1mp4_1_1SampleTable-members.html b/docs/dd/db3/structshaka_1_1media_1_1mp4_1_1SampleTable-members.html index 720588bdee..7736ce5780 100644 --- a/docs/dd/db3/structshaka_1_1media_1_1mp4_1_1SampleTable-members.html +++ b/docs/dd/db3/structshaka_1_1media_1_1mp4_1_1SampleTable-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/db9/classshaka_1_1xml_1_1RepresentationBaseXmlNode.html b/docs/dd/db9/classshaka_1_1xml_1_1RepresentationBaseXmlNode.html index 8b8e13b84f..8f46b63bd9 100644 --- a/docs/dd/db9/classshaka_1_1xml_1_1RepresentationBaseXmlNode.html +++ b/docs/dd/db9/classshaka_1_1xml_1_1RepresentationBaseXmlNode.html @@ -194,7 +194,7 @@ Protected Member Functions diff --git a/docs/dd/dbc/buffer__reader_8cc_source.html b/docs/dd/dbc/buffer__reader_8cc_source.html index 8195f61564..f0deee7f66 100644 --- a/docs/dd/dbc/buffer__reader_8cc_source.html +++ b/docs/dd/dbc/buffer__reader_8cc_source.html @@ -196,7 +196,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dbd/structshaka_1_1media_1_1EncryptionKey.html b/docs/dd/dbd/structshaka_1_1media_1_1EncryptionKey.html index d4598d20c2..89d0daea17 100644 --- a/docs/dd/dbd/structshaka_1_1media_1_1EncryptionKey.html +++ b/docs/dd/dbd/structshaka_1_1media_1_1EncryptionKey.html @@ -120,7 +120,7 @@ std::vector< uint8_t >  diff --git a/docs/dd/dbd/structshaka_1_1media_1_1mp4_1_1TrackEncryption-members.html b/docs/dd/dbd/structshaka_1_1media_1_1mp4_1_1TrackEncryption-members.html index 5da4494f27..623c118387 100644 --- a/docs/dd/dbd/structshaka_1_1media_1_1mp4_1_1TrackEncryption-members.html +++ b/docs/dd/dbd/structshaka_1_1media_1_1mp4_1_1TrackEncryption-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dbf/webm__webvtt__parser_8h_source.html b/docs/dd/dbf/webm__webvtt__parser_8h_source.html index fb5fe5efae..b7bf4f575d 100644 --- a/docs/dd/dbf/webm__webvtt__parser_8h_source.html +++ b/docs/dd/dbf/webm__webvtt__parser_8h_source.html @@ -144,7 +144,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dc1/structshaka_1_1media_1_1mp4_1_1FullBox.html b/docs/dd/dc1/structshaka_1_1media_1_1mp4_1_1FullBox.html index 69baf1afe3..246387cda0 100644 --- a/docs/dd/dc1/structshaka_1_1media_1_1mp4_1_1FullBox.html +++ b/docs/dd/dc1/structshaka_1_1media_1_1mp4_1_1FullBox.html @@ -245,7 +245,7 @@ Protected Member Functions diff --git a/docs/dd/dc4/classshaka_1_1media_1_1ProducerConsumerQueue-members.html b/docs/dd/dc4/classshaka_1_1media_1_1ProducerConsumerQueue-members.html index 17191e2a90..4af1169a3c 100644 --- a/docs/dd/dc4/classshaka_1_1media_1_1ProducerConsumerQueue-members.html +++ b/docs/dd/dc4/classshaka_1_1media_1_1ProducerConsumerQueue-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html b/docs/dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html index f23de3e620..8077d01332 100644 --- a/docs/dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html +++ b/docs/dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html @@ -115,8 +115,8 @@ Public Member Functions   Status Finalize ()   -Status AddSample (scoped_refptr< MediaSample > sample) -  +Status AddSample (std::shared_ptr< MediaSample > sample) +  virtual bool GetInitRangeStartAndEnd (uint64_t *start, uint64_t *end)=0   virtual bool GetIndexRangeStartAndEnd (uint64_t *start, uint64_t *end)=0 @@ -183,16 +183,16 @@ virtual Sta

    Detailed Description

    -

    Definition at line 34 of file segmenter.h.

    +

    Definition at line 33 of file segmenter.h.

    Member Function Documentation

    - +
    - + @@ -441,7 +441,7 @@ virtual Sta diff --git a/docs/dd/dca/structshaka_1_1media_1_1mp4_1_1OriginalFormat-members.html b/docs/dd/dca/structshaka_1_1media_1_1mp4_1_1OriginalFormat-members.html index 958f126108..ae1b16476d 100644 --- a/docs/dd/dca/structshaka_1_1media_1_1mp4_1_1OriginalFormat-members.html +++ b/docs/dd/dca/structshaka_1_1media_1_1mp4_1_1OriginalFormat-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    Status shaka::media::webm::Segmenter::AddSample (scoped_refptr< MediaSamplestd::shared_ptr< MediaSample sample)
    diff --git a/docs/dd/dce/structshaka_1_1media_1_1Cue.html b/docs/dd/dce/structshaka_1_1media_1_1Cue.html index 9ba35278c5..24a7345dc8 100644 --- a/docs/dd/dce/structshaka_1_1media_1_1Cue.html +++ b/docs/dd/dce/structshaka_1_1media_1_1Cue.html @@ -125,7 +125,7 @@ std::vector< std::string >  diff --git a/docs/dd/dd2/buffer__writer_8h_source.html b/docs/dd/dd2/buffer__writer_8h_source.html index a6ada60d42..985a5edcc5 100644 --- a/docs/dd/dd2/buffer__writer_8h_source.html +++ b/docs/dd/dd2/buffer__writer_8h_source.html @@ -159,7 +159,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/dd/dd3/buffer__writer_8cc_source.html b/docs/dd/dd3/buffer__writer_8cc_source.html index 962cedaa86..2d321a4521 100644 --- a/docs/dd/dd3/buffer__writer_8cc_source.html +++ b/docs/dd/dd3/buffer__writer_8cc_source.html @@ -187,7 +187,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dd6/classshaka_1_1media_1_1WebMVideoClient-members.html b/docs/dd/dd6/classshaka_1_1media_1_1WebMVideoClient-members.html index 99e119d943..534ddfe82c 100644 --- a/docs/dd/dd6/classshaka_1_1media_1_1WebMVideoClient-members.html +++ b/docs/dd/dd6/classshaka_1_1media_1_1WebMVideoClient-members.html @@ -94,7 +94,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::WebMVideoClient, including all inherited members.

    - + @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    DISALLOW_COPY_AND_ASSIGN(WebMParserClient) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientprotected
    GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)shaka::media::WebMVideoClient
    GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)shaka::media::WebMVideoClient
    OnListEnd(int id) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientvirtual
    OnListStart(int id) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientvirtual
    OnString(int id, const std::string &str) (defined in shaka::media::WebMParserClient)shaka::media::WebMParserClientvirtual
    diff --git a/docs/dd/dd8/mock__muxer__listener_8cc_source.html b/docs/dd/dd8/mock__muxer__listener_8cc_source.html index 4760b32d19..f1d12323c0 100644 --- a/docs/dd/dd8/mock__muxer__listener_8cc_source.html +++ b/docs/dd/dd8/mock__muxer__listener_8cc_source.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dd9/structshaka_1_1media_1_1mp4_1_1Box-members.html b/docs/dd/dd9/structshaka_1_1media_1_1mp4_1_1Box-members.html index cd97a8dad8..ba090c4380 100644 --- a/docs/dd/dd9/structshaka_1_1media_1_1mp4_1_1Box-members.html +++ b/docs/dd/dd9/structshaka_1_1media_1_1mp4_1_1Box-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/de4/classshaka_1_1media_1_1VideoSliceHeaderParser.html b/docs/dd/de4/classshaka_1_1media_1_1VideoSliceHeaderParser.html index daf22e8619..1599ef9f51 100644 --- a/docs/dd/de4/classshaka_1_1media_1_1VideoSliceHeaderParser.html +++ b/docs/dd/de4/classshaka_1_1media_1_1VideoSliceHeaderParser.html @@ -150,7 +150,7 @@ virtual int64_t  diff --git a/docs/dd/de7/structshaka_1_1media_1_1H265Pps-members.html b/docs/dd/de7/structshaka_1_1media_1_1H265Pps-members.html index ed405eb2d6..f5e3f0579c 100644 --- a/docs/dd/de7/structshaka_1_1media_1_1H265Pps-members.html +++ b/docs/dd/de7/structshaka_1_1media_1_1H265Pps-members.html @@ -137,7 +137,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/de7/xml__node_8h_source.html b/docs/dd/de7/xml__node_8h_source.html index 600c2f8468..cfc2578bb7 100644 --- a/docs/dd/de7/xml__node_8h_source.html +++ b/docs/dd/de7/xml__node_8h_source.html @@ -235,7 +235,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dee/box__definitions_8cc_source.html b/docs/dd/dee/box__definitions_8cc_source.html index 578d444f82..753a1299f6 100644 --- a/docs/dd/dee/box__definitions_8cc_source.html +++ b/docs/dd/dee/box__definitions_8cc_source.html @@ -2950,7 +2950,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/df2/webm_2multi__segment__segmenter_8h_source.html b/docs/dd/df2/webm_2multi__segment__segmenter_8h_source.html index 7ab2bfd939..ba144ec492 100644 --- a/docs/dd/df2/webm_2multi__segment__segmenter_8h_source.html +++ b/docs/dd/df2/webm_2multi__segment__segmenter_8h_source.html @@ -142,13 +142,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    bool GetIndexRangeStartAndEnd(uint64_t *start, uint64_t *end) override
    bool GetInitRangeStartAndEnd(uint64_t *start, uint64_t *end) override
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    - + diff --git a/docs/dd/df5/structshaka_1_1media_1_1mp4_1_1TrackFragmentRun.html b/docs/dd/df5/structshaka_1_1media_1_1mp4_1_1TrackFragmentRun.html index de1af9d12d..b644a8549d 100644 --- a/docs/dd/df5/structshaka_1_1media_1_1mp4_1_1TrackFragmentRun.html +++ b/docs/dd/df5/structshaka_1_1media_1_1mp4_1_1TrackFragmentRun.html @@ -212,7 +212,7 @@ Additional Inherited Members diff --git a/docs/dd/df6/structshaka_1_1media_1_1mp4_1_1Metadata.html b/docs/dd/df6/structshaka_1_1media_1_1mp4_1_1Metadata.html index 8522152a26..bf1d73cceb 100644 --- a/docs/dd/df6/structshaka_1_1media_1_1mp4_1_1Metadata.html +++ b/docs/dd/df6/structshaka_1_1media_1_1mp4_1_1Metadata.html @@ -185,7 +185,7 @@ Additional Inherited Members diff --git a/docs/de/d0f/local__file_8h_source.html b/docs/de/d0f/local__file_8h_source.html index b2cb75588e..064aa4af31 100644 --- a/docs/de/d0f/local__file_8h_source.html +++ b/docs/de/d0f/local__file_8h_source.html @@ -152,7 +152,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d12/container__names_8h_source.html b/docs/de/d12/container__names_8h_source.html index 8cf47de217..a308129440 100644 --- a/docs/de/d12/container__names_8h_source.html +++ b/docs/de/d12/container__names_8h_source.html @@ -159,7 +159,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d13/ts__writer_8cc_source.html b/docs/de/d13/ts__writer_8cc_source.html index 7bf246e901..bc6b0fdebf 100644 --- a/docs/de/d13/ts__writer_8cc_source.html +++ b/docs/de/d13/ts__writer_8cc_source.html @@ -344,7 +344,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    255 } // namespace media
    256 } // namespace shaka
    virtual bool Open()=0
    Internal open. Should not be used directly.
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    virtual bool NewSegment(const std::string &file_name)
    Definition: ts_writer.cc:198
    virtual bool AddPesPacket(std::unique_ptr< PesPacket > pes_packet)
    Definition: ts_writer.cc:237
    @@ -360,7 +360,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d15/media__stream_8cc_source.html b/docs/de/d15/media__stream_8cc_source.html index 07abceaf57..fe15b5a9b8 100644 --- a/docs/de/d15/media__stream_8cc_source.html +++ b/docs/de/d15/media__stream_8cc_source.html @@ -105,12 +105,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    16 namespace shaka {
    17 namespace media {
    18 
    -
    19 MediaStream::MediaStream(scoped_refptr<StreamInfo> info, Demuxer* demuxer)
    +
    19 MediaStream::MediaStream(std::shared_ptr<StreamInfo> info, Demuxer* demuxer)
    20  : info_(info), demuxer_(demuxer), muxer_(NULL), state_(kIdle) {}
    21 
    22 MediaStream::~MediaStream() {}
    23 
    -
    24 Status MediaStream::PullSample(scoped_refptr<MediaSample>* sample) {
    +
    24 Status MediaStream::PullSample(std::shared_ptr<MediaSample>* sample) {
    25  DCHECK(state_ == kPulling || state_ == kIdle);
    26 
    27  // Trigger a new parse in demuxer if no more samples.
    @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    36  return Status::OK;
    37 }
    38 
    -
    39 Status MediaStream::PushSample(const scoped_refptr<MediaSample>& sample) {
    +
    39 Status MediaStream::PushSample(const std::shared_ptr<MediaSample>& sample) {
    40  switch (state_) {
    41  case kIdle:
    42  case kPulling:
    @@ -187,30 +187,32 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    98  }
    99 }
    100 
    -
    101 const scoped_refptr<StreamInfo> MediaStream::info() const { return info_; }
    -
    102 
    -
    103 std::string MediaStream::ToString() const {
    -
    104  return base::StringPrintf("state: %d\n samples in the queue: %zu\n %s",
    -
    105  state_, samples_.size(), info_->ToString().c_str());
    -
    106 }
    -
    107 
    -
    108 } // namespace media
    -
    109 } // namespace shaka
    -
    Status PullSample(scoped_refptr< MediaSample > *sample)
    Pull sample from Demuxer (triggered by Muxer).
    Definition: media_stream.cc:24
    +
    101 const std::shared_ptr<StreamInfo> MediaStream::info() const {
    +
    102  return info_;
    +
    103 }
    +
    104 
    +
    105 std::string MediaStream::ToString() const {
    +
    106  return base::StringPrintf("state: %d\n samples in the queue: %zu\n %s",
    +
    107  state_, samples_.size(), info_->ToString().c_str());
    +
    108 }
    +
    109 
    +
    110 } // namespace media
    +
    111 } // namespace shaka
    +
    MediaStream(std::shared_ptr< StreamInfo > info, Demuxer *demuxer)
    Definition: media_stream.cc:19
    +
    Status PushSample(const std::shared_ptr< MediaSample > &sample)
    Push sample to Muxer (triggered by Demuxer).
    Definition: media_stream.cc:39
    Status Start(MediaStreamOperation operation)
    Start the stream for pushing or pulling.
    Definition: media_stream.cc:62
    -
    Status PushSample(const scoped_refptr< MediaSample > &sample)
    Push sample to Muxer (triggered by Demuxer).
    Definition: media_stream.cc:39
    -
    MediaStream(scoped_refptr< StreamInfo > info, Demuxer *demuxer)
    Definition: media_stream.cc:19
    -
    const std::vector< std::unique_ptr< MediaStream > > & streams()
    Definition: demuxer.h:68
    - +
    const std::vector< std::unique_ptr< MediaStream > > & streams()
    Definition: demuxer.h:67
    +
    void Connect(Muxer *muxer)
    Definition: media_stream.cc:55
    +
    Status PullSample(std::shared_ptr< MediaSample > *sample)
    Pull sample from Demuxer (triggered by Muxer).
    Definition: media_stream.cc:24
    Status Parse()
    Read from the source and send it to the parser.
    Definition: demuxer.cc:197
    - + -
    std::string ToString() const
    +
    std::string ToString() const
    diff --git a/docs/de/d16/classshaka_1_1media_1_1TextTrackConfig-members.html b/docs/de/d16/classshaka_1_1media_1_1TextTrackConfig-members.html index 8561b350dd..7dc97a3849 100644 --- a/docs/de/d16/classshaka_1_1media_1_1TextTrackConfig-members.html +++ b/docs/de/d16/classshaka_1_1media_1_1TextTrackConfig-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d17/cluster__builder_8cc_source.html b/docs/de/d17/cluster__builder_8cc_source.html index 66b525f79f..c83a363d62 100644 --- a/docs/de/d17/cluster__builder_8cc_source.html +++ b/docs/de/d17/cluster__builder_8cc_source.html @@ -346,7 +346,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d1a/classshaka_1_1media_1_1wvm_1_1WvmMediaParser-members.html b/docs/de/d1a/classshaka_1_1media_1_1wvm_1_1WvmMediaParser-members.html index 8af5fd9ac0..0f6510ffd8 100644 --- a/docs/de/d1a/classshaka_1_1media_1_1wvm_1_1WvmMediaParser-members.html +++ b/docs/de/d1a/classshaka_1_1media_1_1wvm_1_1WvmMediaParser-members.html @@ -95,9 +95,9 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + - + @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    Flush() override WARN_UNUSED_RESULTshaka::media::wvm::WvmMediaParservirtual
    Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) overrideshaka::media::wvm::WvmMediaParservirtual
    InitCB typedefshaka::media::MediaParser
    InitCB typedefshaka::media::MediaParser
    MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinline
    NewSampleCB typedefshaka::media::MediaParser
    NewSampleCB typedefshaka::media::MediaParser
    Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULTshaka::media::wvm::WvmMediaParservirtual
    WvmMediaParser() (defined in shaka::media::wvm::WvmMediaParser)shaka::media::wvm::WvmMediaParser
    ~MediaParser() (defined in shaka::media::MediaParser)shaka::media::MediaParserinlinevirtual
    diff --git a/docs/de/d1e/mp4_2single__segment__segmenter_8cc_source.html b/docs/de/d1e/mp4_2single__segment__segmenter_8cc_source.html index 61a90f3824..9c2f671a88 100644 --- a/docs/de/d1e/mp4_2single__segment__segmenter_8cc_source.html +++ b/docs/de/d1e/mp4_2single__segment__segmenter_8cc_source.html @@ -309,7 +309,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d22/aes__pattern__cryptor_8cc_source.html b/docs/de/d22/aes__pattern__cryptor_8cc_source.html index b1b1c45719..e37f193fa0 100644 --- a/docs/de/d22/aes__pattern__cryptor_8cc_source.html +++ b/docs/de/d22/aes__pattern__cryptor_8cc_source.html @@ -185,7 +185,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d27/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter.html b/docs/de/d27/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter.html index b69f9e731c..84fd239be4 100644 --- a/docs/de/d27/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter.html +++ b/docs/de/d27/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter.html @@ -140,7 +140,7 @@ static const uint8_t kElem diff --git a/docs/de/d29/structshaka_1_1media_1_1mp4_1_1TrackExtends.html b/docs/de/d29/structshaka_1_1media_1_1mp4_1_1TrackExtends.html index 69f1a916c1..ea221054eb 100644 --- a/docs/de/d29/structshaka_1_1media_1_1mp4_1_1TrackExtends.html +++ b/docs/de/d29/structshaka_1_1media_1_1mp4_1_1TrackExtends.html @@ -194,7 +194,7 @@ Additional Inherited Members diff --git a/docs/de/d33/classshaka_1_1media_1_1WebMTracksParser-members.html b/docs/de/d33/classshaka_1_1media_1_1WebMTracksParser-members.html index 14565a25ca..a4aec666f6 100644 --- a/docs/de/d33/classshaka_1_1media_1_1WebMTracksParser-members.html +++ b/docs/de/d33/classshaka_1_1media_1_1WebMTracksParser-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d33/structshaka_1_1media_1_1H265Pps.html b/docs/de/d33/structshaka_1_1media_1_1H265Pps.html index 35a5a692e2..d02498a3b6 100644 --- a/docs/de/d33/structshaka_1_1media_1_1H265Pps.html +++ b/docs/de/d33/structshaka_1_1media_1_1H265Pps.html @@ -224,7 +224,7 @@ bool chroma_qp_offset_list diff --git a/docs/de/d34/offset__byte__queue_8h_source.html b/docs/de/d34/offset__byte__queue_8h_source.html index f8cfc8a68f..b2ad8745a5 100644 --- a/docs/de/d34/offset__byte__queue_8h_source.html +++ b/docs/de/d34/offset__byte__queue_8h_source.html @@ -143,7 +143,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d3c/h26x__byte__to__unit__stream__converter_8cc_source.html b/docs/de/d3c/h26x__byte__to__unit__stream__converter_8cc_source.html index b8c73c3233..3b352caab4 100644 --- a/docs/de/d3c/h26x__byte__to__unit__stream__converter_8cc_source.html +++ b/docs/de/d3c/h26x__byte__to__unit__stream__converter_8cc_source.html @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d3c/macros_8h_source.html b/docs/de/d3c/macros_8h_source.html index 99e191df21..e12105242a 100644 --- a/docs/de/d3c/macros_8h_source.html +++ b/docs/de/d3c/macros_8h_source.html @@ -144,7 +144,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d3e/buffer__reader_8h_source.html b/docs/de/d3e/buffer__reader_8h_source.html index b3da18b686..7af64a13bc 100644 --- a/docs/de/d3e/buffer__reader_8h_source.html +++ b/docs/de/d3e/buffer__reader_8h_source.html @@ -163,7 +163,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d3e/classshaka_1_1media_1_1H264Parser-members.html b/docs/de/d3e/classshaka_1_1media_1_1H264Parser-members.html index 0445d6ce02..4ab7972d29 100644 --- a/docs/de/d3e/classshaka_1_1media_1_1H264Parser-members.html +++ b/docs/de/d3e/classshaka_1_1media_1_1H264Parser-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d43/classshaka_1_1media_1_1mp2t_1_1PesPacket-members.html b/docs/de/d43/classshaka_1_1media_1_1mp2t_1_1PesPacket-members.html index 19282e9ec0..fcbbeb6c7b 100644 --- a/docs/de/d43/classshaka_1_1media_1_1mp2t_1_1PesPacket-members.html +++ b/docs/de/d43/classshaka_1_1media_1_1mp2t_1_1PesPacket-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d49/classshaka_1_1media_1_1DecryptConfig.html b/docs/de/d49/classshaka_1_1media_1_1DecryptConfig.html index 3bcdf5df33..eed33dcede 100644 --- a/docs/de/d49/classshaka_1_1media_1_1DecryptConfig.html +++ b/docs/de/d49/classshaka_1_1media_1_1DecryptConfig.html @@ -249,7 +249,7 @@ static const size_t  diff --git a/docs/de/d4a/muxer__listener__internal_8h_source.html b/docs/de/d4a/muxer__listener__internal_8h_source.html index e72d603306..04083d8a32 100644 --- a/docs/de/d4a/muxer__listener__internal_8h_source.html +++ b/docs/de/d4a/muxer__listener__internal_8h_source.html @@ -145,7 +145,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d52/classshaka_1_1Representation.html b/docs/de/d52/classshaka_1_1Representation.html index 2ac61886eb..6a809b5e47 100644 --- a/docs/de/d52/classshaka_1_1Representation.html +++ b/docs/de/d52/classshaka_1_1Representation.html @@ -456,7 +456,7 @@ template<DashProfile profile> diff --git a/docs/de/d55/structshaka_1_1media_1_1mp4_1_1Language-members.html b/docs/de/d55/structshaka_1_1media_1_1mp4_1_1Language-members.html index 4fb4a03321..43dec563f8 100644 --- a/docs/de/d55/structshaka_1_1media_1_1mp4_1_1Language-members.html +++ b/docs/de/d55/structshaka_1_1media_1_1mp4_1_1Language-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d5b/adts__header_8cc_source.html b/docs/de/d5b/adts__header_8cc_source.html index 9db95e02bd..ba5d316848 100644 --- a/docs/de/d5b/adts__header_8cc_source.html +++ b/docs/de/d5b/adts__header_8cc_source.html @@ -207,7 +207,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d5c/mpd__flags_8h_source.html b/docs/de/d5c/mpd__flags_8h_source.html index f8a4efe8c1..af460e634d 100644 --- a/docs/de/d5c/mpd__flags_8h_source.html +++ b/docs/de/d5c/mpd__flags_8h_source.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d60/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter-members.html b/docs/de/d60/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter-members.html index 02eaf4fbb2..cd6a9bf0b2 100644 --- a/docs/de/d60/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter-members.html +++ b/docs/de/d60/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d64/classshaka_1_1media_1_1mp2t_1_1TsWriter.html b/docs/de/d64/classshaka_1_1media_1_1mp2t_1_1TsWriter.html index 2e27b5363a..cfb230d470 100644 --- a/docs/de/d64/classshaka_1_1media_1_1mp2t_1_1TsWriter.html +++ b/docs/de/d64/classshaka_1_1media_1_1mp2t_1_1TsWriter.html @@ -257,7 +257,7 @@ void  diff --git a/docs/de/d6c/structshaka_1_1media_1_1mp4_1_1SampleToGroupEntry-members.html b/docs/de/d6c/structshaka_1_1media_1_1mp4_1_1SampleToGroupEntry-members.html index d8aeb95762..2ea9869814 100644 --- a/docs/de/d6c/structshaka_1_1media_1_1mp4_1_1SampleToGroupEntry-members.html +++ b/docs/de/d6c/structshaka_1_1media_1_1mp4_1_1SampleToGroupEntry-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d6e/language__utils_8h_source.html b/docs/de/d6e/language__utils_8h_source.html index 0dac03b641..062c54d0ed 100644 --- a/docs/de/d6e/language__utils_8h_source.html +++ b/docs/de/d6e/language__utils_8h_source.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d70/http__key__fetcher_8cc_source.html b/docs/de/d70/http__key__fetcher_8cc_source.html index abfec63e07..e7bfcf1995 100644 --- a/docs/de/d70/http__key__fetcher_8cc_source.html +++ b/docs/de/d70/http__key__fetcher_8cc_source.html @@ -266,7 +266,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d77/webm__content__encodings__client_8cc_source.html b/docs/de/d77/webm__content__encodings__client_8cc_source.html index bc13b60485..c95d8e2e80 100644 --- a/docs/de/d77/webm__content__encodings__client_8cc_source.html +++ b/docs/de/d77/webm__content__encodings__client_8cc_source.html @@ -358,7 +358,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d7b/mp4__media__parser_8h_source.html b/docs/de/d7b/mp4__media__parser_8h_source.html index 9c80d3050f..f98183098b 100644 --- a/docs/de/d7b/mp4__media__parser_8h_source.html +++ b/docs/de/d7b/mp4__media__parser_8h_source.html @@ -103,108 +103,107 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    14 #include <vector>
    15 
    16 #include "packager/base/callback_forward.h"
    -
    17 #include "packager/base/memory/ref_counted.h"
    -
    18 #include "packager/media/base/decryptor_source.h"
    -
    19 #include "packager/media/base/media_parser.h"
    -
    20 #include "packager/media/base/offset_byte_queue.h"
    -
    21 
    -
    22 namespace shaka {
    -
    23 namespace media {
    -
    24 namespace mp4 {
    -
    25 
    -
    26 class BoxReader;
    -
    27 class TrackRunIterator;
    -
    28 struct Movie;
    -
    29 struct ProtectionSystemSpecificHeader;
    -
    30 
    -
    31 class MP4MediaParser : public MediaParser {
    -
    32  public:
    - -
    34  ~MP4MediaParser() override;
    -
    35 
    -
    38  void Init(const InitCB& init_cb,
    -
    39  const NewSampleCB& new_sample_cb,
    -
    40  KeySource* decryption_key_source) override;
    -
    41  bool Flush() override WARN_UNUSED_RESULT;
    -
    42  bool Parse(const uint8_t* buf, int size) override WARN_UNUSED_RESULT;
    -
    44 
    -
    51  bool LoadMoov(const std::string& file_path);
    -
    52 
    -
    53  private:
    -
    54  enum State {
    -
    55  kWaitingForInit,
    -
    56  kParsingBoxes,
    -
    57  kEmittingSamples,
    -
    58  kError
    -
    59  };
    -
    60 
    -
    61  bool ParseBox(bool* err);
    -
    62  bool ParseMoov(mp4::BoxReader* reader);
    -
    63  bool ParseMoof(mp4::BoxReader* reader);
    -
    64 
    -
    65  bool FetchKeysIfNecessary(
    -
    66  const std::vector<ProtectionSystemSpecificHeader>& headers);
    -
    67 
    -
    68  // To retain proper framing, each 'mdat' box must be read; to limit memory
    -
    69  // usage, the box's data needs to be discarded incrementally as frames are
    -
    70  // extracted from the stream. This function discards data from the stream up
    -
    71  // to |offset|, updating the |mdat_tail_| value so that framing can be
    -
    72  // retained after all 'mdat' information has been read.
    -
    73  // Returns 'true' on success, 'false' if there was an error.
    -
    74  bool ReadAndDiscardMDATsUntil(const int64_t offset);
    -
    75 
    -
    76  void ChangeState(State new_state);
    -
    77 
    -
    78  bool EmitConfigs();
    -
    79 
    -
    80  bool EnqueueSample(bool* err);
    -
    81 
    -
    82  void Reset();
    -
    83 
    -
    84  State state_;
    -
    85  InitCB init_cb_;
    -
    86  NewSampleCB new_sample_cb_;
    -
    87  KeySource* decryption_key_source_;
    -
    88  std::unique_ptr<DecryptorSource> decryptor_source_;
    -
    89 
    -
    90  OffsetByteQueue queue_;
    -
    91 
    -
    92  // These two parameters are only valid in the |kEmittingSegments| state.
    -
    93  //
    -
    94  // |moof_head_| is the offset of the start of the most recently parsed moof
    -
    95  // block. All byte offsets in sample information are relative to this offset,
    -
    96  // as mandated by the Media Source spec.
    -
    97  int64_t moof_head_;
    -
    98  // |mdat_tail_| is the stream offset of the end of the current 'mdat' box.
    -
    99  // Valid iff it is greater than the head of the queue.
    -
    100  int64_t mdat_tail_;
    -
    101 
    -
    102  std::unique_ptr<Movie> moov_;
    -
    103  std::unique_ptr<TrackRunIterator> runs_;
    -
    104 
    -
    105  DISALLOW_COPY_AND_ASSIGN(MP4MediaParser);
    -
    106 };
    -
    107 
    -
    108 } // namespace mp4
    -
    109 } // namespace media
    -
    110 } // namespace shaka
    -
    111 
    -
    112 #endif // MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_
    - -
    base::Callback< void(const std::vector< scoped_refptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    -
    bool Flush() override WARN_UNUSED_RESULT
    -
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    +
    17 #include "packager/media/base/decryptor_source.h"
    +
    18 #include "packager/media/base/media_parser.h"
    +
    19 #include "packager/media/base/offset_byte_queue.h"
    +
    20 
    +
    21 namespace shaka {
    +
    22 namespace media {
    +
    23 namespace mp4 {
    +
    24 
    +
    25 class BoxReader;
    +
    26 class TrackRunIterator;
    +
    27 struct Movie;
    +
    28 struct ProtectionSystemSpecificHeader;
    +
    29 
    +
    30 class MP4MediaParser : public MediaParser {
    +
    31  public:
    + +
    33  ~MP4MediaParser() override;
    +
    34 
    +
    37  void Init(const InitCB& init_cb,
    +
    38  const NewSampleCB& new_sample_cb,
    +
    39  KeySource* decryption_key_source) override;
    +
    40  bool Flush() override WARN_UNUSED_RESULT;
    +
    41  bool Parse(const uint8_t* buf, int size) override WARN_UNUSED_RESULT;
    +
    43 
    +
    50  bool LoadMoov(const std::string& file_path);
    +
    51 
    +
    52  private:
    +
    53  enum State {
    +
    54  kWaitingForInit,
    +
    55  kParsingBoxes,
    +
    56  kEmittingSamples,
    +
    57  kError
    +
    58  };
    +
    59 
    +
    60  bool ParseBox(bool* err);
    +
    61  bool ParseMoov(mp4::BoxReader* reader);
    +
    62  bool ParseMoof(mp4::BoxReader* reader);
    +
    63 
    +
    64  bool FetchKeysIfNecessary(
    +
    65  const std::vector<ProtectionSystemSpecificHeader>& headers);
    +
    66 
    +
    67  // To retain proper framing, each 'mdat' box must be read; to limit memory
    +
    68  // usage, the box's data needs to be discarded incrementally as frames are
    +
    69  // extracted from the stream. This function discards data from the stream up
    +
    70  // to |offset|, updating the |mdat_tail_| value so that framing can be
    +
    71  // retained after all 'mdat' information has been read.
    +
    72  // Returns 'true' on success, 'false' if there was an error.
    +
    73  bool ReadAndDiscardMDATsUntil(const int64_t offset);
    +
    74 
    +
    75  void ChangeState(State new_state);
    +
    76 
    +
    77  bool EmitConfigs();
    +
    78 
    +
    79  bool EnqueueSample(bool* err);
    +
    80 
    +
    81  void Reset();
    +
    82 
    +
    83  State state_;
    +
    84  InitCB init_cb_;
    +
    85  NewSampleCB new_sample_cb_;
    +
    86  KeySource* decryption_key_source_;
    +
    87  std::unique_ptr<DecryptorSource> decryptor_source_;
    +
    88 
    +
    89  OffsetByteQueue queue_;
    +
    90 
    +
    91  // These two parameters are only valid in the |kEmittingSegments| state.
    +
    92  //
    +
    93  // |moof_head_| is the offset of the start of the most recently parsed moof
    +
    94  // block. All byte offsets in sample information are relative to this offset,
    +
    95  // as mandated by the Media Source spec.
    +
    96  int64_t moof_head_;
    +
    97  // |mdat_tail_| is the stream offset of the end of the current 'mdat' box.
    +
    98  // Valid iff it is greater than the head of the queue.
    +
    99  int64_t mdat_tail_;
    +
    100 
    +
    101  std::unique_ptr<Movie> moov_;
    +
    102  std::unique_ptr<TrackRunIterator> runs_;
    +
    103 
    +
    104  DISALLOW_COPY_AND_ASSIGN(MP4MediaParser);
    +
    105 };
    +
    106 
    +
    107 } // namespace mp4
    +
    108 } // namespace media
    +
    109 } // namespace shaka
    +
    110 
    +
    111 #endif // MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_
    + +
    bool Flush() override WARN_UNUSED_RESULT
    +
    base::Callback< void(const std::vector< std::shared_ptr< StreamInfo > > &stream_info)> InitCB
    Definition: media_parser.h:34
    +
    bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
    +
    base::Callback< bool(uint32_t track_id, const std::shared_ptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    Class for reading MP4 boxes.
    Definition: box_reader.h:25
    -
    base::Callback< bool(uint32_t track_id, const scoped_refptr< MediaSample > &media_sample)> NewSampleCB
    Definition: media_parser.h:43
    -
    bool LoadMoov(const std::string &file_path)
    +
    bool LoadMoov(const std::string &file_path)
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    -
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    - +
    void Init(const InitCB &init_cb, const NewSampleCB &new_sample_cb, KeySource *decryption_key_source) override
    + diff --git a/docs/de/d7e/classshaka_1_1media_1_1mp2t_1_1TsSectionPsi.html b/docs/de/d7e/classshaka_1_1media_1_1mp2t_1_1TsSectionPsi.html index ca5eca3ade..7808daf6cb 100644 --- a/docs/de/d7e/classshaka_1_1media_1_1mp2t_1_1TsSectionPsi.html +++ b/docs/de/d7e/classshaka_1_1media_1_1mp2t_1_1TsSectionPsi.html @@ -147,7 +147,7 @@ Additional Inherited Members diff --git a/docs/de/d83/box__definitions__comparison_8h_source.html b/docs/de/d83/box__definitions__comparison_8h_source.html index 5a8d71049f..109bb317f4 100644 --- a/docs/de/d83/box__definitions__comparison_8h_source.html +++ b/docs/de/d83/box__definitions__comparison_8h_source.html @@ -592,7 +592,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d83/classshaka_1_1media_1_1LocalFile-members.html b/docs/de/d83/classshaka_1_1media_1_1LocalFile-members.html index 0b9eff81b1..447458d0a3 100644 --- a/docs/de/d83/classshaka_1_1media_1_1LocalFile-members.html +++ b/docs/de/d83/classshaka_1_1media_1_1LocalFile-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d87/structshaka_1_1media_1_1wvm_1_1PrevSampleData-members.html b/docs/de/d87/structshaka_1_1media_1_1wvm_1_1PrevSampleData-members.html index 360fb2bd08..835ea2c737 100644 --- a/docs/de/d87/structshaka_1_1media_1_1wvm_1_1PrevSampleData-members.html +++ b/docs/de/d87/structshaka_1_1media_1_1wvm_1_1PrevSampleData-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d8d/structshaka_1_1media_1_1mp4_1_1MovieFragmentHeader-members.html b/docs/de/d8d/structshaka_1_1media_1_1mp4_1_1MovieFragmentHeader-members.html index 93eb04baaf..ff2d4b50cd 100644 --- a/docs/de/d8d/structshaka_1_1media_1_1mp4_1_1MovieFragmentHeader-members.html +++ b/docs/de/d8d/structshaka_1_1media_1_1mp4_1_1MovieFragmentHeader-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/d93/classshaka_1_1media_1_1VP8Parser-members.html b/docs/de/d93/classshaka_1_1media_1_1VP8Parser-members.html index ccaf67be9c..2cc2aafdcc 100644 --- a/docs/de/d93/classshaka_1_1media_1_1VP8Parser-members.html +++ b/docs/de/d93/classshaka_1_1media_1_1VP8Parser-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/da9/structshaka_1_1Element.html b/docs/de/da9/structshaka_1_1Element.html index e1c3bd8322..1d767f50ce 100644 --- a/docs/de/da9/structshaka_1_1Element.html +++ b/docs/de/da9/structshaka_1_1Element.html @@ -120,7 +120,7 @@ std::vector< El diff --git a/docs/de/dab/es__parser__h26x_8cc_source.html b/docs/de/dab/es__parser__h26x_8cc_source.html index 34a0d1f6cf..20d47efd5c 100644 --- a/docs/de/dab/es__parser__h26x_8cc_source.html +++ b/docs/de/dab/es__parser__h26x_8cc_source.html @@ -183,7 +183,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    94  DCHECK(pending_sample_duration_);
    95  pending_sample_->set_duration(pending_sample_duration_);
    96  emit_sample_cb_.Run(pid(), pending_sample_);
    -
    97  pending_sample_ = scoped_refptr<MediaSample>();
    +
    97  pending_sample_ = std::shared_ptr<MediaSample>();
    98  }
    99 }
    100 
    @@ -196,7 +196,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    107  next_access_unit_position_ = 0;
    108  current_nalu_info_.reset();
    109  timing_desc_list_.clear();
    -
    110  pending_sample_ = scoped_refptr<MediaSample>();
    +
    110  pending_sample_ = std::shared_ptr<MediaSample>();
    111  pending_sample_duration_ = 0;
    112  waiting_for_key_frame_ = true;
    113 }
    @@ -388,7 +388,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    299 
    300  // Create the media sample, emitting always the previous sample after
    301  // calculating its duration.
    -
    302  scoped_refptr<MediaSample> media_sample = MediaSample::CopyFrom(
    +
    302  std::shared_ptr<MediaSample> media_sample = MediaSample::CopyFrom(
    303  converted_frame.data(), converted_frame.size(), is_key_frame);
    304  media_sample->set_dts(current_timing_desc.dts);
    305  media_sample->set_pts(current_timing_desc.pts);
    @@ -406,11 +406,11 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    317 } // namespace mp2t
    318 } // namespace media
    319 } // namespace shaka
    -
    static scoped_refptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
    Definition: media_sample.cc:45
    +
    static std::shared_ptr< MediaSample > CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)
    Definition: media_sample.cc:45
    diff --git a/docs/de/dad/validate__flag_8cc_source.html b/docs/de/dad/validate__flag_8cc_source.html index 7160ab6682..13995c36bd 100644 --- a/docs/de/dad/validate__flag_8cc_source.html +++ b/docs/de/dad/validate__flag_8cc_source.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/db3/classshaka_1_1media_1_1TextTrackConfig.html b/docs/de/db3/classshaka_1_1media_1_1TextTrackConfig.html index 41e31b1c4a..b9312923b2 100644 --- a/docs/de/db3/classshaka_1_1media_1_1TextTrackConfig.html +++ b/docs/de/db3/classshaka_1_1media_1_1TextTrackConfig.html @@ -125,7 +125,7 @@ const std::string & id diff --git a/docs/de/db4/classshaka_1_1media_1_1H26xBitReader.html b/docs/de/db4/classshaka_1_1media_1_1H26xBitReader.html index 129580c2a4..a4f8cb2221 100644 --- a/docs/de/db4/classshaka_1_1media_1_1H26xBitReader.html +++ b/docs/de/db4/classshaka_1_1media_1_1H26xBitReader.html @@ -134,7 +134,7 @@ size_t NumEmulationPrevent diff --git a/docs/de/dbf/udp__options_8h_source.html b/docs/de/dbf/udp__options_8h_source.html index 5fe9ad1063..181842ea4a 100644 --- a/docs/de/dbf/udp__options_8h_source.html +++ b/docs/de/dbf/udp__options_8h_source.html @@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dc1/demuxer_8h_source.html b/docs/de/dc1/demuxer_8h_source.html index c7048b2414..417a35d8a3 100644 --- a/docs/de/dc1/demuxer_8h_source.html +++ b/docs/de/dc1/demuxer_8h_source.html @@ -101,87 +101,88 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    12 #include <vector>
    13 
    14 #include "packager/base/compiler_specific.h"
    -
    15 #include "packager/base/memory/ref_counted.h"
    -
    16 #include "packager/media/base/container_names.h"
    -
    17 #include "packager/media/base/status.h"
    -
    18 
    -
    19 namespace shaka {
    -
    20 namespace media {
    -
    21 
    -
    22 class Decryptor;
    -
    23 class File;
    -
    24 class KeySource;
    -
    25 class MediaParser;
    -
    26 class MediaSample;
    -
    27 class MediaStream;
    -
    28 class StreamInfo;
    -
    29 
    -
    32 class Demuxer {
    -
    33  public:
    -
    37  explicit Demuxer(const std::string& file_name);
    -
    38  ~Demuxer();
    -
    39 
    -
    44  void SetKeySource(std::unique_ptr<KeySource> key_source);
    -
    45 
    - -
    52 
    -
    55  Status Run();
    -
    56 
    -
    58  Status Parse();
    -
    59 
    -
    62  void Cancel();
    -
    63 
    -
    68  const std::vector<std::unique_ptr<MediaStream>>& streams() {
    -
    69  return streams_;
    -
    70  }
    -
    71 
    -
    74  MediaContainerName container_name() { return container_name_; }
    -
    75 
    -
    76  private:
    -
    77  struct QueuedSample {
    -
    78  QueuedSample(uint32_t track_id, scoped_refptr<MediaSample> sample);
    -
    79  ~QueuedSample();
    -
    80 
    -
    81  uint32_t track_id;
    -
    82  scoped_refptr<MediaSample> sample;
    -
    83  };
    -
    84 
    -
    85  // Parser init event.
    -
    86  void ParserInitEvent(const std::vector<scoped_refptr<StreamInfo> >& streams);
    -
    87  // Parser new sample event handler. Queues the samples if init event has not
    -
    88  // been received, otherwise calls PushSample() to push the sample to
    -
    89  // corresponding stream.
    -
    90  bool NewSampleEvent(uint32_t track_id,
    -
    91  const scoped_refptr<MediaSample>& sample);
    -
    92  // Helper function to push the sample to corresponding stream.
    -
    93  bool PushSample(uint32_t track_id, const scoped_refptr<MediaSample>& sample);
    -
    94 
    -
    95  std::string file_name_;
    -
    96  File* media_file_;
    -
    97  bool init_event_received_;
    -
    98  Status init_parsing_status_;
    -
    99  // Queued samples received in NewSampleEvent() before ParserInitEvent().
    -
    100  std::deque<QueuedSample> queued_samples_;
    -
    101  std::unique_ptr<MediaParser> parser_;
    -
    102  std::vector<std::unique_ptr<MediaStream>> streams_;
    -
    103  MediaContainerName container_name_;
    -
    104  std::unique_ptr<uint8_t[]> buffer_;
    -
    105  std::unique_ptr<KeySource> key_source_;
    -
    106  bool cancelled_;
    -
    107 
    -
    108  DISALLOW_COPY_AND_ASSIGN(Demuxer);
    -
    109 };
    -
    110 
    -
    111 } // namespace media
    -
    112 } // namespace shaka
    -
    113 
    -
    114 #endif // MEDIA_BASE_DEMUXER_H_
    -
    MediaContainerName container_name()
    Definition: demuxer.h:74
    +
    15 #include "packager/media/base/container_names.h"
    +
    16 #include "packager/media/base/status.h"
    +
    17 
    +
    18 namespace shaka {
    +
    19 namespace media {
    +
    20 
    +
    21 class Decryptor;
    +
    22 class File;
    +
    23 class KeySource;
    +
    24 class MediaParser;
    +
    25 class MediaSample;
    +
    26 class MediaStream;
    +
    27 class StreamInfo;
    +
    28 
    +
    31 class Demuxer {
    +
    32  public:
    +
    36  explicit Demuxer(const std::string& file_name);
    +
    37  ~Demuxer();
    +
    38 
    +
    43  void SetKeySource(std::unique_ptr<KeySource> key_source);
    +
    44 
    + +
    51 
    +
    54  Status Run();
    +
    55 
    +
    57  Status Parse();
    +
    58 
    +
    61  void Cancel();
    +
    62 
    +
    67  const std::vector<std::unique_ptr<MediaStream>>& streams() {
    +
    68  return streams_;
    +
    69  }
    +
    70 
    +
    73  MediaContainerName container_name() { return container_name_; }
    +
    74 
    +
    75  private:
    +
    76  Demuxer(const Demuxer&) = delete;
    +
    77  Demuxer& operator=(const Demuxer&) = delete;
    +
    78 
    +
    79  struct QueuedSample {
    +
    80  QueuedSample(uint32_t track_id, std::shared_ptr<MediaSample> sample);
    +
    81  ~QueuedSample();
    +
    82 
    +
    83  uint32_t track_id;
    +
    84  std::shared_ptr<MediaSample> sample;
    +
    85  };
    +
    86 
    +
    87  // Parser init event.
    +
    88  void ParserInitEvent(const std::vector<std::shared_ptr<StreamInfo>>& streams);
    +
    89  // Parser new sample event handler. Queues the samples if init event has not
    +
    90  // been received, otherwise calls PushSample() to push the sample to
    +
    91  // corresponding stream.
    +
    92  bool NewSampleEvent(uint32_t track_id,
    +
    93  const std::shared_ptr<MediaSample>& sample);
    +
    94  // Helper function to push the sample to corresponding stream.
    +
    95  bool PushSample(uint32_t track_id,
    +
    96  const std::shared_ptr<MediaSample>& sample);
    +
    97 
    +
    98  std::string file_name_;
    +
    99  File* media_file_;
    +
    100  bool init_event_received_;
    +
    101  Status init_parsing_status_;
    +
    102  // Queued samples received in NewSampleEvent() before ParserInitEvent().
    +
    103  std::deque<QueuedSample> queued_samples_;
    +
    104  std::unique_ptr<MediaParser> parser_;
    +
    105  std::vector<std::unique_ptr<MediaStream>> streams_;
    +
    106  MediaContainerName container_name_;
    +
    107  std::unique_ptr<uint8_t[]> buffer_;
    +
    108  std::unique_ptr<KeySource> key_source_;
    +
    109  bool cancelled_;
    +
    110 };
    +
    111 
    +
    112 } // namespace media
    +
    113 } // namespace shaka
    +
    114 
    +
    115 #endif // MEDIA_BASE_DEMUXER_H_
    +
    MediaContainerName container_name()
    Definition: demuxer.h:73
    void SetKeySource(std::unique_ptr< KeySource > key_source)
    Definition: demuxer.cc:50
    -
    const std::vector< std::unique_ptr< MediaStream > > & streams()
    Definition: demuxer.h:68
    - +
    const std::vector< std::unique_ptr< MediaStream > > & streams()
    Definition: demuxer.h:67
    +
    Status Parse()
    Read from the source and send it to the parser.
    Definition: demuxer.cc:197
    Status Initialize()
    Definition: demuxer.cc:54
    Demuxer(const std::string &file_name)
    Definition: demuxer.cc:36
    @@ -189,7 +190,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dc2/classshaka_1_1media_1_1H265Parser.html b/docs/de/dc2/classshaka_1_1media_1_1H265Parser.html index ac2fe9dc64..b8786220c3 100644 --- a/docs/de/dc2/classshaka_1_1media_1_1H265Parser.html +++ b/docs/de/dc2/classshaka_1_1media_1_1H265Parser.html @@ -256,7 +256,7 @@ Public Member Functions diff --git a/docs/de/dc9/structshaka_1_1media_1_1mp4_1_1DecodingTimeToSample-members.html b/docs/de/dc9/structshaka_1_1media_1_1mp4_1_1DecodingTimeToSample-members.html index 8b3e89e39a..124b5cf395 100644 --- a/docs/de/dc9/structshaka_1_1media_1_1mp4_1_1DecodingTimeToSample-members.html +++ b/docs/de/dc9/structshaka_1_1media_1_1mp4_1_1DecodingTimeToSample-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dcb/ts__segmenter_8h_source.html b/docs/de/dcb/ts__segmenter_8h_source.html index 3dafaa379b..63382c26a9 100644 --- a/docs/de/dcb/ts__segmenter_8h_source.html +++ b/docs/de/dcb/ts__segmenter_8h_source.html @@ -130,7 +130,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    49 
    52  Status Finalize();
    53 
    -
    56  Status AddSample(scoped_refptr<MediaSample> sample);
    +
    56  Status AddSample(std::shared_ptr<MediaSample> sample);
    57 
    59  void InjectTsWriterForTesting(std::unique_ptr<TsWriter> writer);
    60 
    @@ -197,10 +197,10 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    123 } // namespace media
    124 } // namespace shaka
    125 #endif // PACKAGER_MEDIA_FORMATS_MP2T_TS_SEGMENTER_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    -
    Status AddSample(scoped_refptr< MediaSample > sample)
    Definition: ts_segmenter.cc:91
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    +
    Status AddSample(std::shared_ptr< MediaSample > sample)
    Definition: ts_segmenter.cc:91
    TsSegmenter(const MuxerOptions &options, MuxerListener *listener)
    Definition: ts_segmenter.cc:27
    void InjectPesPacketGeneratorForTesting(std::unique_ptr< PesPacketGenerator > generator)
    Only for testing.
    @@ -213,7 +213,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dcc/mock__mpd__notifier_8cc_source.html b/docs/de/dcc/mock__mpd__notifier_8cc_source.html index 1c3da2494e..b09196d087 100644 --- a/docs/de/dcc/mock__mpd__notifier_8cc_source.html +++ b/docs/de/dcc/mock__mpd__notifier_8cc_source.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dcf/file__closer_8h_source.html b/docs/de/dcf/file__closer_8h_source.html index 3a4dffc149..b11aaf6e6e 100644 --- a/docs/de/dcf/file__closer_8h_source.html +++ b/docs/de/dcf/file__closer_8h_source.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dd6/content__protection__element_8h_source.html b/docs/de/dd6/content__protection__element_8h_source.html index fce621777f..b54d387b2c 100644 --- a/docs/de/dd6/content__protection__element_8h_source.html +++ b/docs/de/dd6/content__protection__element_8h_source.html @@ -142,7 +142,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dd6/muxer__listener__test__helper_8cc_source.html b/docs/de/dd6/muxer__listener__test__helper_8cc_source.html index 6f34c9cf06..e62982f7d3 100644 --- a/docs/de/dd6/muxer__listener__test__helper_8cc_source.html +++ b/docs/de/dd6/muxer__listener__test__helper_8cc_source.html @@ -103,14 +103,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    14 VideoStreamInfoParameters::VideoStreamInfoParameters() {}
    15 VideoStreamInfoParameters::~VideoStreamInfoParameters() {}
    16 
    -
    17 scoped_refptr<StreamInfo> CreateVideoStreamInfo(
    +
    17 std::shared_ptr<StreamInfo> CreateVideoStreamInfo(
    18  const VideoStreamInfoParameters& param) {
    -
    19  return scoped_refptr<StreamInfo>(new VideoStreamInfo(
    +
    19  return std::make_shared<VideoStreamInfo>(
    20  param.track_id, param.time_scale, param.duration, param.codec,
    21  param.codec_string, param.codec_config.data(), param.codec_config.size(),
    22  param.width, param.height, param.pixel_width, param.pixel_height,
    23  0, // trick_play_rate
    -
    24  param.nalu_length_size, param.language, param.is_encrypted));
    +
    24  param.nalu_length_size, param.language, param.is_encrypted);
    25 }
    26 
    27 VideoStreamInfoParameters GetDefaultVideoStreamInfoParams() {
    @@ -208,7 +208,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/ddd/classshaka_1_1media_1_1Muxer-members.html b/docs/de/ddd/classshaka_1_1media_1_1Muxer-members.html index 215f54a5bd..5636b56437 100644 --- a/docs/de/ddd/classshaka_1_1media_1_1Muxer-members.html +++ b/docs/de/ddd/classshaka_1_1media_1_1Muxer-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html b/docs/de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html index fc50b8ebd0..49107b8358 100644 --- a/docs/de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html +++ b/docs/de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html @@ -102,8 +102,8 @@ Public Member Functions   Status Finalize ()   -Status AddSample (scoped_refptr< MediaSample > sample) -  +Status AddSample (std::shared_ptr< MediaSample > sample) +  void InjectTsWriterForTesting (std::unique_ptr< TsWriter > writer)  Only for testing.
    @@ -157,14 +157,14 @@ void Member Function Documentation - +
    - + @@ -268,7 +268,7 @@ void 
    Status shaka::media::mp2t::TsSegmenter::AddSample (scoped_refptr< MediaSamplestd::shared_ptr< MediaSample sample)
    diff --git a/docs/de/ddf/structshaka_1_1media_1_1mp4_1_1MediaData-members.html b/docs/de/ddf/structshaka_1_1media_1_1mp4_1_1MediaData-members.html index e102f6ca53..298c68bb86 100644 --- a/docs/de/ddf/structshaka_1_1media_1_1mp4_1_1MediaData-members.html +++ b/docs/de/ddf/structshaka_1_1media_1_1mp4_1_1MediaData-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/de/de0/classshaka_1_1media_1_1DecoderConfigurationRecord.html b/docs/de/de0/classshaka_1_1media_1_1DecoderConfigurationRecord.html index c5dcee5e16..80e24c0c0c 100644 --- a/docs/de/de0/classshaka_1_1media_1_1DecoderConfigurationRecord.html +++ b/docs/de/de0/classshaka_1_1media_1_1DecoderConfigurationRecord.html @@ -333,7 +333,7 @@ void  diff --git a/docs/de/de0/classshaka_1_1media_1_1mp4_1_1MP4Muxer-members.html b/docs/de/de0/classshaka_1_1media_1_1mp4_1_1MP4Muxer-members.html index 4b2d451f26..8191270aae 100644 --- a/docs/de/de0/classshaka_1_1media_1_1mp4_1_1MP4Muxer-members.html +++ b/docs/de/de0/classshaka_1_1media_1_1mp4_1_1MP4Muxer-members.html @@ -119,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/de/de4/structshaka_1_1media_1_1H264Pps.html b/docs/de/de4/structshaka_1_1media_1_1H264Pps.html index 2f252ad3ef..4f78902ddf 100644 --- a/docs/de/de4/structshaka_1_1media_1_1H264Pps.html +++ b/docs/de/de4/structshaka_1_1media_1_1H264Pps.html @@ -167,7 +167,7 @@ int second_chroma_qp_index diff --git a/docs/de/dea/classshaka_1_1media_1_1H26xByteToUnitStreamConverter.html b/docs/de/dea/classshaka_1_1media_1_1H26xByteToUnitStreamConverter.html index c1050ea9ae..3078c86527 100644 --- a/docs/de/dea/classshaka_1_1media_1_1H26xByteToUnitStreamConverter.html +++ b/docs/de/dea/classshaka_1_1media_1_1H26xByteToUnitStreamConverter.html @@ -122,9 +122,9 @@ Public Member Functions - - + +

    Static Public Attributes

    -static const size_t kUnitStreamNaluLengthSize = 4
     
    +static constexpr size_t kUnitStreamNaluLengthSize = 4
     

    Detailed Description

    A base class that is used to convert H.26x byte streams to NAL unit streams.

    @@ -216,7 +216,7 @@ static const size_t kUnitS
    diff --git a/docs/de/def/structshaka_1_1media_1_1mp4_1_1DecodingTimeToSample.html b/docs/de/def/structshaka_1_1media_1_1mp4_1_1DecodingTimeToSample.html index 17fd4af527..5df01c8ee5 100644 --- a/docs/de/def/structshaka_1_1media_1_1mp4_1_1DecodingTimeToSample.html +++ b/docs/de/def/structshaka_1_1media_1_1mp4_1_1DecodingTimeToSample.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/de/df6/classshaka_1_1media_1_1mp4_1_1TrackRunIterator.html b/docs/de/df6/classshaka_1_1media_1_1mp4_1_1TrackRunIterator.html index bc26267496..442b2adcbc 100644 --- a/docs/de/df6/classshaka_1_1media_1_1mp4_1_1TrackRunIterator.html +++ b/docs/de/df6/classshaka_1_1media_1_1mp4_1_1TrackRunIterator.html @@ -412,7 +412,7 @@ bool is_keyframe () co diff --git a/docs/de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html b/docs/de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html index 554fe4454e..27c934f0cc 100644 --- a/docs/de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html +++ b/docs/de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html @@ -102,13 +102,13 @@ Public Member Functions   Status AddTrackInfo (mkvmuxer::Track *track)   -Status EncryptFrame (scoped_refptr< MediaSample > sample, bool encrypt_frame) -  +Status EncryptFrame (std::shared_ptr< MediaSample > sample, bool encrypt_frame) + 

    Detailed Description

    A helper class used to encrypt WebM frames before being written to the Cluster. This can also handle unencrypted frames.

    -

    Definition at line 30 of file encryptor.h.

    +

    Definition at line 29 of file encryptor.h.

    Member Function Documentation

    @@ -130,14 +130,14 @@ Public Member Functions
    - +
    - + @@ -215,7 +215,7 @@ Public Member Functions diff --git a/docs/de/dfa/muxer__listener_8h_source.html b/docs/de/dfa/muxer__listener_8h_source.html index fa43eb9de7..b6081dd1c9 100644 --- a/docs/de/dfa/muxer__listener_8h_source.html +++ b/docs/de/dfa/muxer__listener_8h_source.html @@ -164,7 +164,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    virtual void OnNewSegment(const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size)=0
    virtual void OnEncryptionInfoReady(bool is_initial_encryption_info, FourCC protection_scheme, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv, const std::vector< ProtectionSystemSpecificInfo > &key_system_info)=0
    virtual void OnMediaEnd(bool has_init_range, uint64_t init_range_start, uint64_t init_range_end, bool has_index_range, uint64_t index_range_start, uint64_t index_range_end, float duration_seconds, uint64_t file_size)=0
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    virtual void OnSampleDurationReady(uint32_t sample_duration)=0
    virtual void OnEncryptionStart()=0
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    @@ -173,7 +173,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dfa/structshaka_1_1media_1_1mp4_1_1OpusSpecific.html b/docs/de/dfa/structshaka_1_1media_1_1mp4_1_1OpusSpecific.html index aa4dce2067..38cb684a2a 100644 --- a/docs/de/dfa/structshaka_1_1media_1_1mp4_1_1OpusSpecific.html +++ b/docs/de/dfa/structshaka_1_1media_1_1mp4_1_1OpusSpecific.html @@ -176,7 +176,7 @@ Additional Inherited Members diff --git a/docs/de/dfd/stream__info_8cc_source.html b/docs/de/dfd/stream__info_8cc_source.html index 4e55825f0e..3bf7dc87c3 100644 --- a/docs/de/dfd/stream__info_8cc_source.html +++ b/docs/de/dfd/stream__info_8cc_source.html @@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d00/playready__key__source_8h_source.html b/docs/df/d00/playready__key__source_8h_source.html index bb73b83c35..dde0a681d3 100644 --- a/docs/df/d00/playready__key__source_8h_source.html +++ b/docs/df/d00/playready__key__source_8h_source.html @@ -168,7 +168,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d05/vp__codec__configuration__record_8cc_source.html b/docs/df/d05/vp__codec__configuration__record_8cc_source.html index 17b8d2add2..2471b1cd49 100644 --- a/docs/df/d05/vp__codec__configuration__record_8cc_source.html +++ b/docs/df/d05/vp__codec__configuration__record_8cc_source.html @@ -360,7 +360,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d1a/offset__byte__queue_8cc_source.html b/docs/df/d1a/offset__byte__queue_8cc_source.html index 662a0b185d..a52a9589ae 100644 --- a/docs/df/d1a/offset__byte__queue_8cc_source.html +++ b/docs/df/d1a/offset__byte__queue_8cc_source.html @@ -164,7 +164,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d1c/classshaka_1_1media_1_1MediaSample-members.html b/docs/df/d1c/classshaka_1_1media_1_1MediaSample-members.html index 59edd193ef..8d498b6f23 100644 --- a/docs/df/d1c/classshaka_1_1media_1_1MediaSample-members.html +++ b/docs/df/d1c/classshaka_1_1media_1_1MediaSample-members.html @@ -93,39 +93,41 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::MediaSample, including all inherited members.

    Status shaka::media::webm::Encryptor::EncryptFrame (scoped_refptr< MediaSamplestd::shared_ptr< MediaSample sample,
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    base::RefCountedThreadSafe< MediaSample > (defined in shaka::media::MediaSample)shaka::media::MediaSamplefriend
    config_id() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)shaka::media::MediaSamplestatic
    CopyFrom(const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)shaka::media::MediaSamplestatic
    CreateEmptyMediaSample()shaka::media::MediaSamplestatic
    CreateEOSBuffer()shaka::media::MediaSamplestatic
    data() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    data_size() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    decrypt_config() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    dts() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    duration() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    end_of_stream() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    FromMetadata(const uint8_t *metadata, size_t metadata_size)shaka::media::MediaSamplestatic
    is_encrypted() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    is_key_frame() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    pts() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    resize_data(const size_t data_size) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_config_id(const std::string &config_id) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_data(const uint8_t *data, const size_t data_size) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_decrypt_config(std::unique_ptr< DecryptConfig > decrypt_config) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_dts(int64_t dts) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_duration(int64_t duration) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_is_encrypted(bool value) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_is_key_frame(bool value) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_pts(int64_t pts) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    side_data() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    side_data_size() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    ToString() const shaka::media::MediaSample
    writable_data() (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    config_id() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)shaka::media::MediaSamplestatic
    CopyFrom(const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)shaka::media::MediaSamplestatic
    CreateEmptyMediaSample()shaka::media::MediaSamplestatic
    CreateEOSBuffer()shaka::media::MediaSamplestatic
    data() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    data_size() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    decrypt_config() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    dts() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    duration() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    end_of_stream() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    FromMetadata(const uint8_t *metadata, size_t metadata_size)shaka::media::MediaSamplestatic
    is_encrypted() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    is_key_frame() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    MediaSample(const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame) (defined in shaka::media::MediaSample)shaka::media::MediaSample
    MediaSample() (defined in shaka::media::MediaSample)shaka::media::MediaSample
    pts() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    resize_data(const size_t data_size) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_config_id(const std::string &config_id) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_data(const uint8_t *data, const size_t data_size) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_decrypt_config(std::unique_ptr< DecryptConfig > decrypt_config) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_dts(int64_t dts) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_duration(int64_t duration) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_is_encrypted(bool value) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_is_key_frame(bool value) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    set_pts(int64_t pts) (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    side_data() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    side_data_size() const (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    ToString() const shaka::media::MediaSample
    writable_data() (defined in shaka::media::MediaSample)shaka::media::MediaSampleinline
    ~MediaSample() (defined in shaka::media::MediaSample)shaka::media::MediaSamplevirtual
    diff --git a/docs/df/d1c/composition__offset__iterator_8h_source.html b/docs/df/d1c/composition__offset__iterator_8h_source.html index 7da9e9e92c..522deee4a6 100644 --- a/docs/df/d1c/composition__offset__iterator_8h_source.html +++ b/docs/df/d1c/composition__offset__iterator_8h_source.html @@ -147,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    diff --git a/docs/df/d21/classshaka_1_1media_1_1SegmentTestBase_1_1ClusterParser-members.html b/docs/df/d21/classshaka_1_1media_1_1SegmentTestBase_1_1ClusterParser-members.html index 16d4e6656f..77c1f4c490 100644 --- a/docs/df/d21/classshaka_1_1media_1_1SegmentTestBase_1_1ClusterParser-members.html +++ b/docs/df/d21/classshaka_1_1media_1_1SegmentTestBase_1_1ClusterParser-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d22/validate__flag_8h_source.html b/docs/df/d22/validate__flag_8h_source.html index a6385faa79..f5d9a20015 100644 --- a/docs/df/d22/validate__flag_8h_source.html +++ b/docs/df/d22/validate__flag_8h_source.html @@ -120,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d2a/classshaka_1_1media_1_1mp4_1_1DecodingTimeIterator-members.html b/docs/df/d2a/classshaka_1_1media_1_1mp4_1_1DecodingTimeIterator-members.html index 093eaed104..da0763ff87 100644 --- a/docs/df/d2a/classshaka_1_1media_1_1mp4_1_1DecodingTimeIterator-members.html +++ b/docs/df/d2a/classshaka_1_1media_1_1mp4_1_1DecodingTimeIterator-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d2d/classshaka_1_1media_1_1AesCbcDecryptor.html b/docs/df/d2d/classshaka_1_1media_1_1AesCbcDecryptor.html index e625d88137..6dbfb9a086 100644 --- a/docs/df/d2d/classshaka_1_1media_1_1AesCbcDecryptor.html +++ b/docs/df/d2d/classshaka_1_1media_1_1AesCbcDecryptor.html @@ -279,7 +279,7 @@ AES_KEY * mutable_aes_key< diff --git a/docs/df/d31/muxer__util_8cc_source.html b/docs/df/d31/muxer__util_8cc_source.html index 7e3367b50c..0943c86a58 100644 --- a/docs/df/d31/muxer__util_8cc_source.html +++ b/docs/df/d31/muxer__util_8cc_source.html @@ -272,7 +272,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d32/audio__stream__info_8h_source.html b/docs/df/d32/audio__stream__info_8h_source.html index 2c2b517792..b3e32cb7d0 100644 --- a/docs/df/d32/audio__stream__info_8h_source.html +++ b/docs/df/d32/audio__stream__info_8h_source.html @@ -114,30 +114,30 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    27  uint32_t avg_bitrate, const std::string& language,
    28  bool is_encrypted);
    29 
    -
    32  bool IsValidConfig() const override;
    -
    33  std::string ToString() const override;
    -
    35 
    -
    36  uint8_t sample_bits() const { return sample_bits_; }
    -
    37  uint8_t sample_bytes() const { return sample_bits_ / 8; }
    -
    38  uint8_t num_channels() const { return num_channels_; }
    -
    39  uint32_t sampling_frequency() const { return sampling_frequency_; }
    -
    40  uint32_t bytes_per_frame() const {
    -
    41  return static_cast<uint32_t>(num_channels_) * sample_bits_ / 8;
    -
    42  }
    -
    43  uint64_t seek_preroll_ns() const { return seek_preroll_ns_; }
    -
    44  uint64_t codec_delay_ns() const { return codec_delay_ns_; }
    -
    45  uint32_t max_bitrate() const { return max_bitrate_; }
    -
    46  uint32_t avg_bitrate() const { return avg_bitrate_; }
    -
    47 
    -
    48  void set_sampling_frequency(const uint32_t sampling_frequency) {
    -
    49  sampling_frequency_ = sampling_frequency;
    -
    50  }
    -
    51 
    -
    54  static std::string GetCodecString(Codec codec, uint8_t audio_object_type);
    -
    55 
    -
    56  private:
    -
    57  ~AudioStreamInfo() override;
    -
    58 
    +
    30  ~AudioStreamInfo() override;
    +
    31 
    +
    34  bool IsValidConfig() const override;
    +
    35  std::string ToString() const override;
    +
    37 
    +
    38  uint8_t sample_bits() const { return sample_bits_; }
    +
    39  uint8_t sample_bytes() const { return sample_bits_ / 8; }
    +
    40  uint8_t num_channels() const { return num_channels_; }
    +
    41  uint32_t sampling_frequency() const { return sampling_frequency_; }
    +
    42  uint32_t bytes_per_frame() const {
    +
    43  return static_cast<uint32_t>(num_channels_) * sample_bits_ / 8;
    +
    44  }
    +
    45  uint64_t seek_preroll_ns() const { return seek_preroll_ns_; }
    +
    46  uint64_t codec_delay_ns() const { return codec_delay_ns_; }
    +
    47  uint32_t max_bitrate() const { return max_bitrate_; }
    +
    48  uint32_t avg_bitrate() const { return avg_bitrate_; }
    +
    49 
    +
    50  void set_sampling_frequency(const uint32_t sampling_frequency) {
    +
    51  sampling_frequency_ = sampling_frequency;
    +
    52  }
    +
    53 
    +
    56  static std::string GetCodecString(Codec codec, uint8_t audio_object_type);
    +
    57 
    +
    58  private:
    59  uint8_t sample_bits_;
    60  uint8_t num_channels_;
    61  uint32_t sampling_frequency_;
    @@ -155,7 +155,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    73 } // namespace shaka
    74 
    75 #endif // MEDIA_BASE_AUDIO_STREAM_INFO_H_
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    std::string ToString() const override
    bool IsValidConfig() const override
    static std::string GetCodecString(Codec codec, uint8_t audio_object_type)
    @@ -164,7 +164,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d33/classshaka_1_1AdaptationSet-members.html b/docs/df/d33/classshaka_1_1AdaptationSet-members.html index f503ea6332..417bf99b03 100644 --- a/docs/df/d33/classshaka_1_1AdaptationSet-members.html +++ b/docs/df/d33/classshaka_1_1AdaptationSet-members.html @@ -119,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d38/structshaka_1_1media_1_1mp4_1_1ChunkInfo.html b/docs/df/d38/structshaka_1_1media_1_1mp4_1_1ChunkInfo.html index 92fa625245..be5b96a35a 100644 --- a/docs/df/d38/structshaka_1_1media_1_1mp4_1_1ChunkInfo.html +++ b/docs/df/d38/structshaka_1_1media_1_1mp4_1_1ChunkInfo.html @@ -115,7 +115,7 @@ uint32_t sample_descriptio diff --git a/docs/df/d38/structshaka_1_1media_1_1mp4_1_1MovieExtendsHeader-members.html b/docs/df/d38/structshaka_1_1media_1_1mp4_1_1MovieExtendsHeader-members.html index 0c9469a2c9..148e97e38f 100644 --- a/docs/df/d38/structshaka_1_1media_1_1mp4_1_1MovieExtendsHeader-members.html +++ b/docs/df/d38/structshaka_1_1media_1_1mp4_1_1MovieExtendsHeader-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d3c/classshaka_1_1media_1_1RequestSigner.html b/docs/df/d3c/classshaka_1_1media_1_1RequestSigner.html index 29f7c66f59..4b9d6e64d7 100644 --- a/docs/df/d3c/classshaka_1_1media_1_1RequestSigner.html +++ b/docs/df/d3c/classshaka_1_1media_1_1RequestSigner.html @@ -180,7 +180,7 @@ Protected Member Functions diff --git a/docs/df/d46/classshaka_1_1media_1_1Muxer.html b/docs/df/d46/classshaka_1_1media_1_1Muxer.html index 7931fcfdc9..8887e64bf8 100644 --- a/docs/df/d46/classshaka_1_1media_1_1Muxer.html +++ b/docs/df/d46/classshaka_1_1media_1_1Muxer.html @@ -181,7 +181,7 @@ 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.

    +

    Definition at line 32 of file muxer.h.

    Member Function Documentation

    @@ -230,7 +230,7 @@ class MediaStream -

    Definition at line 95 of file muxer.h.

    +

    Definition at line 94 of file muxer.h.

    @@ -362,7 +362,7 @@ class MediaStream diff --git a/docs/df/d46/classshaka_1_1media_1_1ThreadedIoFile-members.html b/docs/df/d46/classshaka_1_1media_1_1ThreadedIoFile-members.html index e86e1855c4..fd02efb481 100644 --- a/docs/df/d46/classshaka_1_1media_1_1ThreadedIoFile-members.html +++ b/docs/df/d46/classshaka_1_1media_1_1ThreadedIoFile-members.html @@ -120,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d50/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter-members.html b/docs/df/d50/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter-members.html index d558430e16..b5ec54bdfe 100644 --- a/docs/df/d50/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter-members.html +++ b/docs/df/d50/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d51/classshaka_1_1media_1_1RsaPrivateKey-members.html b/docs/df/d51/classshaka_1_1media_1_1RsaPrivateKey-members.html index e659a6820e..4c8a7794d6 100644 --- a/docs/df/d51/classshaka_1_1media_1_1RsaPrivateKey-members.html +++ b/docs/df/d51/classshaka_1_1media_1_1RsaPrivateKey-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d51/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter-members.html b/docs/df/d51/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter-members.html index abfaa63c0f..8d1d607fdf 100644 --- a/docs/df/d51/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter-members.html +++ b/docs/df/d51/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter-members.html @@ -93,12 +93,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::mp4::EncryptingFragmenter, including all inherited members.

    - + - + @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - + @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(scoped_refptr< MediaSample > sample) overrideshaka::media::mp4::EncryptingFragmentervirtual
    AddSample(std::shared_ptr< MediaSample > sample) overrideshaka::media::mp4::EncryptingFragmentervirtual
    CreateEncryptor()shaka::media::mp4::EncryptingFragmenterprotected
    crypt_byte_block() const (defined in shaka::media::mp4::EncryptingFragmenter)shaka::media::mp4::EncryptingFragmenterinlineprotected
    data() (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    earliest_presentation_time() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    EncryptingFragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)shaka::media::mp4::EncryptingFragmenter
    EncryptingFragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf, std::unique_ptr< EncryptionKey > encryption_key, int64_t clear_time, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block, MuxerListener *listener)shaka::media::mp4::EncryptingFragmenter
    encryption_key() const (defined in shaka::media::mp4::EncryptingFragmenter)shaka::media::mp4::EncryptingFragmenterinlineprotected
    encryptor() (defined in shaka::media::mp4::EncryptingFragmenter)shaka::media::mp4::EncryptingFragmenterinlineprotected
    FinalizeFragment() overrideshaka::media::mp4::EncryptingFragmentervirtual
    fragment_duration() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    fragment_finalized() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    fragment_initialized() const (defined in shaka::media::mp4::Fragmenter)shaka::media::mp4::Fragmenterinline
    Fragmenter(scoped_refptr< StreamInfo > info, TrackFragment *traf)shaka::media::mp4::Fragmenter
    Fragmenter(std::shared_ptr< StreamInfo > info, TrackFragment *traf)shaka::media::mp4::Fragmenter
    GenerateSegmentReference(SegmentReference *reference)shaka::media::mp4::Fragmenter
    InitializeFragment(int64_t first_sample_dts) overrideshaka::media::mp4::EncryptingFragmentervirtual
    OptimizeSampleEntries(std::vector< T > *entries, T *default_value)shaka::media::mp4::Fragmenterprotected
    diff --git a/docs/df/d60/classshaka_1_1MockMpdBuilder.html b/docs/df/d60/classshaka_1_1MockMpdBuilder.html index ea6952c0c2..e22283fd79 100644 --- a/docs/df/d60/classshaka_1_1MockMpdBuilder.html +++ b/docs/df/d60/classshaka_1_1MockMpdBuilder.html @@ -143,7 +143,7 @@ Additional Inherited Members diff --git a/docs/df/d63/structshaka_1_1media_1_1mp4_1_1AudioRollRecoveryEntry-members.html b/docs/df/d63/structshaka_1_1media_1_1mp4_1_1AudioRollRecoveryEntry-members.html index b3267b204d..58ed9dcae0 100644 --- a/docs/df/d63/structshaka_1_1media_1_1mp4_1_1AudioRollRecoveryEntry-members.html +++ b/docs/df/d63/structshaka_1_1media_1_1mp4_1_1AudioRollRecoveryEntry-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d66/classshaka_1_1media_1_1KeyFetcher.html b/docs/df/d66/classshaka_1_1media_1_1KeyFetcher.html index 7672c7b3a2..5f1f992439 100644 --- a/docs/df/d66/classshaka_1_1media_1_1KeyFetcher.html +++ b/docs/df/d66/classshaka_1_1media_1_1KeyFetcher.html @@ -177,7 +177,7 @@ Public Member Functions diff --git a/docs/df/d6a/classshaka_1_1MockMpdBuilder-members.html b/docs/df/d6a/classshaka_1_1MockMpdBuilder-members.html index a30f4457e8..89e5b8986d 100644 --- a/docs/df/d6a/classshaka_1_1MockMpdBuilder-members.html +++ b/docs/df/d6a/classshaka_1_1MockMpdBuilder-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d6a/structshaka_1_1media_1_1mp4_1_1OpusSpecific-members.html b/docs/df/d6a/structshaka_1_1media_1_1mp4_1_1OpusSpecific-members.html index 3cd6942dce..cdaa86b59f 100644 --- a/docs/df/d6a/structshaka_1_1media_1_1mp4_1_1OpusSpecific-members.html +++ b/docs/df/d6a/structshaka_1_1media_1_1mp4_1_1OpusSpecific-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d7b/structshaka_1_1media_1_1mp4_1_1CompositionTimeToSample.html b/docs/df/d7b/structshaka_1_1media_1_1mp4_1_1CompositionTimeToSample.html index 0b47605c45..3a6c628719 100644 --- a/docs/df/d7b/structshaka_1_1media_1_1mp4_1_1CompositionTimeToSample.html +++ b/docs/df/d7b/structshaka_1_1media_1_1mp4_1_1CompositionTimeToSample.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/df/d7b/structshaka_1_1media_1_1mp4_1_1TrackFragment.html b/docs/df/d7b/structshaka_1_1media_1_1mp4_1_1TrackFragment.html index a373b142eb..d184df4d6d 100644 --- a/docs/df/d7b/structshaka_1_1media_1_1mp4_1_1TrackFragment.html +++ b/docs/df/d7b/structshaka_1_1media_1_1mp4_1_1TrackFragment.html @@ -198,7 +198,7 @@ Additional Inherited Members diff --git a/docs/df/d7d/webm__info__parser_8cc_source.html b/docs/df/d7d/webm__info__parser_8cc_source.html index 88c94b3f80..4580ae4a25 100644 --- a/docs/df/d7d/webm__info__parser_8cc_source.html +++ b/docs/df/d7d/webm__info__parser_8cc_source.html @@ -200,7 +200,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d82/classshaka_1_1media_1_1DecoderConfigurationRecord-members.html b/docs/df/d82/classshaka_1_1media_1_1DecoderConfigurationRecord-members.html index ff180e3bc4..dc09a0397b 100644 --- a/docs/df/d82/classshaka_1_1media_1_1DecoderConfigurationRecord-members.html +++ b/docs/df/d82/classshaka_1_1media_1_1DecoderConfigurationRecord-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d87/classshaka_1_1media_1_1AesCryptor.html b/docs/df/d87/classshaka_1_1media_1_1AesCryptor.html index 07377602b7..9d5ec78471 100644 --- a/docs/df/d87/classshaka_1_1media_1_1AesCryptor.html +++ b/docs/df/d87/classshaka_1_1media_1_1AesCryptor.html @@ -424,7 +424,7 @@ AES_KEY * mutable_aes_key< diff --git a/docs/df/d8a/structshaka_1_1media_1_1mp4_1_1DataEntryUrl.html b/docs/df/d8a/structshaka_1_1media_1_1mp4_1_1DataEntryUrl.html index da9a534cdb..5285193725 100644 --- a/docs/df/d8a/structshaka_1_1media_1_1mp4_1_1DataEntryUrl.html +++ b/docs/df/d8a/structshaka_1_1media_1_1mp4_1_1DataEntryUrl.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/df/d8a/vp9__parser_8h_source.html b/docs/df/d8a/vp9__parser_8h_source.html index 66d51d3e64..69a8d519e6 100644 --- a/docs/df/d8a/vp9__parser_8h_source.html +++ b/docs/df/d8a/vp9__parser_8h_source.html @@ -136,7 +136,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d8a/vpx__parser_8h_source.html b/docs/df/d8a/vpx__parser_8h_source.html index cb3103caa5..4485a72ca1 100644 --- a/docs/df/d8a/vpx__parser_8h_source.html +++ b/docs/df/d8a/vpx__parser_8h_source.html @@ -147,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d8c/classshaka_1_1media_1_1mp4_1_1MultiSegmentSegmenter-members.html b/docs/df/d8c/classshaka_1_1media_1_1mp4_1_1MultiSegmentSegmenter-members.html index bc7597028b..f27257348a 100644 --- a/docs/df/d8c/classshaka_1_1media_1_1mp4_1_1MultiSegmentSegmenter-members.html +++ b/docs/df/d8c/classshaka_1_1media_1_1mp4_1_1MultiSegmentSegmenter-members.html @@ -93,7 +93,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');

    This is the complete list of members for shaka::media::mp4::MultiSegmentSegmenter, including all inherited members.

    - + @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    AddSample(const MediaStream *stream, scoped_refptr< MediaSample > sample)shaka::media::mp4::Segmenter
    AddSample(const MediaStream *stream, std::shared_ptr< MediaSample > sample)shaka::media::mp4::Segmenter
    Finalize()shaka::media::mp4::Segmenter
    fragment_buffer() (defined in shaka::media::mp4::Segmenter)shaka::media::mp4::Segmenterinlineprotected
    ftyp() (defined in shaka::media::mp4::Segmenter)shaka::media::mp4::Segmenterinlineprotected
    diff --git a/docs/df/d8d/es__parser__h26x_8h_source.html b/docs/df/d8d/es__parser__h26x_8h_source.html index faf6138aa3..611f8be38d 100644 --- a/docs/df/d8d/es__parser__h26x_8h_source.html +++ b/docs/df/d8d/es__parser__h26x_8h_source.html @@ -215,7 +215,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    126  std::unique_ptr<H26xByteToUnitStreamConverter> stream_converter_;
    127 
    128  // Frame for which we do not yet have a duration.
    -
    129  scoped_refptr<MediaSample> pending_sample_;
    +
    129  std::shared_ptr<MediaSample> pending_sample_;
    130  uint64_t pending_sample_duration_ = 0;
    131 
    132  // Indicates whether waiting for first key frame.
    @@ -231,11 +231,11 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    A base class that is used to convert H.26x byte streams to NAL unit streams.
    - + diff --git a/docs/df/d94/classshaka_1_1RepresentationStateChangeListener.html b/docs/df/d94/classshaka_1_1RepresentationStateChangeListener.html index e42af24cd7..1996551461 100644 --- a/docs/df/d94/classshaka_1_1RepresentationStateChangeListener.html +++ b/docs/df/d94/classshaka_1_1RepresentationStateChangeListener.html @@ -195,7 +195,7 @@ Public Member Functions diff --git a/docs/df/d96/xml__node_8cc_source.html b/docs/df/d96/xml__node_8cc_source.html index 405f9ebaaf..bbc696672a 100644 --- a/docs/df/d96/xml__node_8cc_source.html +++ b/docs/df/d96/xml__node_8cc_source.html @@ -499,7 +499,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d9a/structshaka_1_1media_1_1mp4_1_1TrackFragmentDecodeTime.html b/docs/df/d9a/structshaka_1_1media_1_1mp4_1_1TrackFragmentDecodeTime.html index 8eb05f9b94..6f7afa98cc 100644 --- a/docs/df/d9a/structshaka_1_1media_1_1mp4_1_1TrackFragmentDecodeTime.html +++ b/docs/df/d9a/structshaka_1_1media_1_1mp4_1_1TrackFragmentDecodeTime.html @@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html b/docs/df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html index 146d5b97e0..4d3c50e538 100644 --- a/docs/df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html +++ b/docs/df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html @@ -313,7 +313,7 @@ Additional Inherited Members diff --git a/docs/df/da0/structshaka_1_1media_1_1mp4_1_1ChunkOffset-members.html b/docs/df/da0/structshaka_1_1media_1_1mp4_1_1ChunkOffset-members.html index e7d0c84b20..b637c3fec5 100644 --- a/docs/df/da0/structshaka_1_1media_1_1mp4_1_1ChunkOffset-members.html +++ b/docs/df/da0/structshaka_1_1media_1_1mp4_1_1ChunkOffset-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/da5/structshaka_1_1media_1_1mp4_1_1CueIDBox-members.html b/docs/df/da5/structshaka_1_1media_1_1mp4_1_1CueIDBox-members.html index 2172ebd317..0df0037634 100644 --- a/docs/df/da5/structshaka_1_1media_1_1mp4_1_1CueIDBox-members.html +++ b/docs/df/da5/structshaka_1_1media_1_1mp4_1_1CueIDBox-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/dad/decrypt__config_8h_source.html b/docs/df/dad/decrypt__config_8h_source.html index fea74496d1..4aa951c51d 100644 --- a/docs/df/dad/decrypt__config_8h_source.html +++ b/docs/df/dad/decrypt__config_8h_source.html @@ -168,7 +168,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/db8/structshaka_1_1media_1_1StreamDescriptor-members.html b/docs/df/db8/structshaka_1_1media_1_1StreamDescriptor-members.html index b908eb844b..8df8472bf7 100644 --- a/docs/df/db8/structshaka_1_1media_1_1StreamDescriptor-members.html +++ b/docs/df/db8/structshaka_1_1media_1_1StreamDescriptor-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/dc7/avc__decoder__configuration__record_8h_source.html b/docs/df/dc7/avc__decoder__configuration__record_8h_source.html index add24204b7..89c6f9a24f 100644 --- a/docs/df/dc7/avc__decoder__configuration__record_8h_source.html +++ b/docs/df/dc7/avc__decoder__configuration__record_8h_source.html @@ -153,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/dd2/mpd__utils_8h_source.html b/docs/df/dd2/mpd__utils_8h_source.html index 95d1be5ec2..ee272b86b2 100644 --- a/docs/df/dd2/mpd__utils_8h_source.html +++ b/docs/df/dd2/mpd__utils_8h_source.html @@ -177,7 +177,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/dd2/structshaka_1_1media_1_1H264Pps-members.html b/docs/df/dd2/structshaka_1_1media_1_1H264Pps-members.html index e48426adc8..b84d22c0f1 100644 --- a/docs/df/dd2/structshaka_1_1media_1_1H264Pps-members.html +++ b/docs/df/dd2/structshaka_1_1media_1_1H264Pps-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/ddc/webm_2segmenter_8h_source.html b/docs/df/ddc/webm_2segmenter_8h_source.html index b91c9b6daf..3298fe3478 100644 --- a/docs/df/ddc/webm_2segmenter_8h_source.html +++ b/docs/df/ddc/webm_2segmenter_8h_source.html @@ -97,153 +97,152 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
    8 #define MEDIA_FORMATS_WEBM_SEGMENTER_H_
    9 
    10 #include <memory>
    -
    11 #include "packager/base/memory/ref_counted.h"
    -
    12 #include "packager/media/base/status.h"
    -
    13 #include "packager/media/formats/webm/encryptor.h"
    -
    14 #include "packager/media/formats/webm/mkv_writer.h"
    -
    15 #include "packager/media/formats/webm/seek_head.h"
    -
    16 #include "packager/third_party/libwebm/src/mkvmuxer.hpp"
    -
    17 
    -
    18 namespace shaka {
    -
    19 namespace media {
    -
    20 
    -
    21 struct MuxerOptions;
    -
    22 
    -
    23 class AudioStreamInfo;
    -
    24 class KeySource;
    -
    25 class MediaSample;
    -
    26 class StreamInfo;
    -
    27 class MuxerListener;
    -
    28 class ProgressListener;
    -
    29 class StreamInfo;
    -
    30 class VideoStreamInfo;
    -
    31 
    -
    32 namespace webm {
    -
    33 
    -
    34 class Segmenter {
    -
    35  public:
    -
    36  explicit Segmenter(const MuxerOptions& options);
    -
    37  virtual ~Segmenter();
    -
    38 
    -
    61  Status Initialize(std::unique_ptr<MkvWriter> writer,
    -
    62  StreamInfo* info,
    -
    63  ProgressListener* progress_listener,
    -
    64  MuxerListener* muxer_listener,
    -
    65  KeySource* encryption_key_source,
    -
    66  uint32_t max_sd_pixels,
    -
    67  uint32_t max_hd_pixels,
    -
    68  uint32_t max_uhd1_pixels,
    -
    69  double clear_lead_in_seconds);
    -
    70 
    -
    73  Status Finalize();
    -
    74 
    -
    78  Status AddSample(scoped_refptr<MediaSample> sample);
    -
    79 
    -
    82  virtual bool GetInitRangeStartAndEnd(uint64_t* start, uint64_t* end) = 0;
    -
    83 
    -
    86  virtual bool GetIndexRangeStartAndEnd(uint64_t* start, uint64_t* end) = 0;
    -
    87 
    -
    89  float GetDuration() const;
    -
    90 
    -
    91  protected:
    -
    94  uint64_t FromBMFFTimescale(uint64_t time_timescale);
    -
    96  uint64_t FromWebMTimecode(uint64_t time_webm_timecode);
    -
    98  Status WriteSegmentHeader(uint64_t file_size, MkvWriter* writer);
    -
    100  Status SetCluster(uint64_t start_webm_timecode,
    -
    101  uint64_t position,
    -
    102  MkvWriter* writer);
    -
    103 
    -
    105  void UpdateProgress(uint64_t progress);
    -
    106  void set_progress_target(uint64_t target) { progress_target_ = target; }
    -
    107 
    -
    108  const MuxerOptions& options() const { return options_; }
    -
    109  mkvmuxer::Cluster* cluster() { return cluster_.get(); }
    -
    110  mkvmuxer::Cues* cues() { return &cues_; }
    -
    111  MuxerListener* muxer_listener() { return muxer_listener_; }
    -
    112  StreamInfo* info() { return info_; }
    -
    113  SeekHead* seek_head() { return &seek_head_; }
    -
    114 
    -
    115  int track_id() const { return track_id_; }
    -
    116  uint64_t segment_payload_pos() const { return segment_payload_pos_; }
    -
    117  uint64_t cluster_length_in_time_scale() const {
    -
    118  return cluster_length_in_time_scale_;
    -
    119  }
    -
    120 
    -
    121  virtual Status DoInitialize(std::unique_ptr<MkvWriter> writer) = 0;
    -
    122  virtual Status DoFinalize() = 0;
    -
    123 
    -
    124  private:
    -
    125  Status CreateVideoTrack(VideoStreamInfo* info);
    -
    126  Status CreateAudioTrack(AudioStreamInfo* info);
    -
    127  Status InitializeEncryptor(KeySource* key_source, uint32_t max_sd_pixels,
    -
    128  uint32_t max_hd_pixels, uint32_t max_uhd1_pixels);
    -
    129 
    -
    130  // Writes the previous frame to the file.
    -
    131  Status WriteFrame(bool write_duration);
    -
    132 
    -
    133  // This is called when there needs to be a new subsegment. This does nothing
    -
    134  // in single-segment mode. In multi-segment mode this creates a new Cluster
    -
    135  // element.
    -
    136  virtual Status NewSubsegment(uint64_t start_timescale) = 0;
    -
    137  // This is called when there needs to be a new segment. In single-segment
    -
    138  // mode, this creates a new Cluster element. In multi-segment mode this
    -
    139  // creates a new output file.
    -
    140  virtual Status NewSegment(uint64_t start_timescale) = 0;
    -
    141 
    -
    142  // Store the previous sample so we know which one is the last frame.
    -
    143  scoped_refptr<MediaSample> prev_sample_;
    -
    144  // The reference frame timestamp; used to populate the ReferenceBlock element
    -
    145  // when writing non-keyframe BlockGroups.
    -
    146  uint64_t reference_frame_timestamp_;
    -
    147 
    -
    148  const MuxerOptions& options_;
    -
    149  std::unique_ptr<Encryptor> encryptor_;
    -
    150  double clear_lead_;
    -
    151  bool enable_encryption_; // Encryption is enabled only after clear_lead_.
    -
    152 
    -
    153  std::unique_ptr<mkvmuxer::Cluster> cluster_;
    -
    154  mkvmuxer::Cues cues_;
    -
    155  SeekHead seek_head_;
    -
    156  mkvmuxer::SegmentInfo segment_info_;
    -
    157  mkvmuxer::Tracks tracks_;
    -
    158 
    -
    159  StreamInfo* info_;
    -
    160  MuxerListener* muxer_listener_;
    -
    161  ProgressListener* progress_listener_;
    -
    162  uint64_t progress_target_;
    -
    163  uint64_t accumulated_progress_;
    -
    164  uint64_t first_timestamp_;
    -
    165  int64_t sample_duration_;
    -
    166  // The position (in bytes) of the start of the Segment payload in the init
    -
    167  // file. This is also the size of the header before the SeekHead.
    -
    168  uint64_t segment_payload_pos_;
    -
    169 
    -
    170  // Durations in timescale.
    -
    171  uint64_t cluster_length_in_time_scale_;
    -
    172  uint64_t segment_length_in_time_scale_;
    -
    173 
    -
    174  int track_id_;
    -
    175 
    -
    176  DISALLOW_COPY_AND_ASSIGN(Segmenter);
    -
    177 };
    -
    178 
    -
    179 } // namespace webm
    -
    180 } // namespace media
    -
    181 } // namespace shaka
    -
    182 
    -
    183 #endif // MEDIA_FORMATS_WEBM_SEGMENTER_H_
    +
    11 #include "packager/media/base/status.h"
    +
    12 #include "packager/media/formats/webm/encryptor.h"
    +
    13 #include "packager/media/formats/webm/mkv_writer.h"
    +
    14 #include "packager/media/formats/webm/seek_head.h"
    +
    15 #include "packager/third_party/libwebm/src/mkvmuxer.hpp"
    +
    16 
    +
    17 namespace shaka {
    +
    18 namespace media {
    +
    19 
    +
    20 struct MuxerOptions;
    +
    21 
    +
    22 class AudioStreamInfo;
    +
    23 class KeySource;
    +
    24 class MediaSample;
    +
    25 class StreamInfo;
    +
    26 class MuxerListener;
    +
    27 class ProgressListener;
    +
    28 class StreamInfo;
    +
    29 class VideoStreamInfo;
    +
    30 
    +
    31 namespace webm {
    +
    32 
    +
    33 class Segmenter {
    +
    34  public:
    +
    35  explicit Segmenter(const MuxerOptions& options);
    +
    36  virtual ~Segmenter();
    +
    37 
    +
    60  Status Initialize(std::unique_ptr<MkvWriter> writer,
    +
    61  StreamInfo* info,
    +
    62  ProgressListener* progress_listener,
    +
    63  MuxerListener* muxer_listener,
    +
    64  KeySource* encryption_key_source,
    +
    65  uint32_t max_sd_pixels,
    +
    66  uint32_t max_hd_pixels,
    +
    67  uint32_t max_uhd1_pixels,
    +
    68  double clear_lead_in_seconds);
    +
    69 
    +
    72  Status Finalize();
    +
    73 
    +
    77  Status AddSample(std::shared_ptr<MediaSample> sample);
    +
    78 
    +
    81  virtual bool GetInitRangeStartAndEnd(uint64_t* start, uint64_t* end) = 0;
    +
    82 
    +
    85  virtual bool GetIndexRangeStartAndEnd(uint64_t* start, uint64_t* end) = 0;
    +
    86 
    +
    88  float GetDuration() const;
    +
    89 
    +
    90  protected:
    +
    93  uint64_t FromBMFFTimescale(uint64_t time_timescale);
    +
    95  uint64_t FromWebMTimecode(uint64_t time_webm_timecode);
    +
    97  Status WriteSegmentHeader(uint64_t file_size, MkvWriter* writer);
    +
    99  Status SetCluster(uint64_t start_webm_timecode,
    +
    100  uint64_t position,
    +
    101  MkvWriter* writer);
    +
    102 
    +
    104  void UpdateProgress(uint64_t progress);
    +
    105  void set_progress_target(uint64_t target) { progress_target_ = target; }
    +
    106 
    +
    107  const MuxerOptions& options() const { return options_; }
    +
    108  mkvmuxer::Cluster* cluster() { return cluster_.get(); }
    +
    109  mkvmuxer::Cues* cues() { return &cues_; }
    +
    110  MuxerListener* muxer_listener() { return muxer_listener_; }
    +
    111  StreamInfo* info() { return info_; }
    +
    112  SeekHead* seek_head() { return &seek_head_; }
    +
    113 
    +
    114  int track_id() const { return track_id_; }
    +
    115  uint64_t segment_payload_pos() const { return segment_payload_pos_; }
    +
    116  uint64_t cluster_length_in_time_scale() const {
    +
    117  return cluster_length_in_time_scale_;
    +
    118  }
    +
    119 
    +
    120  virtual Status DoInitialize(std::unique_ptr<MkvWriter> writer) = 0;
    +
    121  virtual Status DoFinalize() = 0;
    +
    122 
    +
    123  private:
    +
    124  Status CreateVideoTrack(VideoStreamInfo* info);
    +
    125  Status CreateAudioTrack(AudioStreamInfo* info);
    +
    126  Status InitializeEncryptor(KeySource* key_source, uint32_t max_sd_pixels,
    +
    127  uint32_t max_hd_pixels, uint32_t max_uhd1_pixels);
    +
    128 
    +
    129  // Writes the previous frame to the file.
    +
    130  Status WriteFrame(bool write_duration);
    +
    131 
    +
    132  // This is called when there needs to be a new subsegment. This does nothing
    +
    133  // in single-segment mode. In multi-segment mode this creates a new Cluster
    +
    134  // element.
    +
    135  virtual Status NewSubsegment(uint64_t start_timescale) = 0;
    +
    136  // This is called when there needs to be a new segment. In single-segment
    +
    137  // mode, this creates a new Cluster element. In multi-segment mode this
    +
    138  // creates a new output file.
    +
    139  virtual Status NewSegment(uint64_t start_timescale) = 0;
    +
    140 
    +
    141  // Store the previous sample so we know which one is the last frame.
    +
    142  std::shared_ptr<MediaSample> prev_sample_;
    +
    143  // The reference frame timestamp; used to populate the ReferenceBlock element
    +
    144  // when writing non-keyframe BlockGroups.
    +
    145  uint64_t reference_frame_timestamp_;
    +
    146 
    +
    147  const MuxerOptions& options_;
    +
    148  std::unique_ptr<Encryptor> encryptor_;
    +
    149  double clear_lead_;
    +
    150  bool enable_encryption_; // Encryption is enabled only after clear_lead_.
    +
    151 
    +
    152  std::unique_ptr<mkvmuxer::Cluster> cluster_;
    +
    153  mkvmuxer::Cues cues_;
    +
    154  SeekHead seek_head_;
    +
    155  mkvmuxer::SegmentInfo segment_info_;
    +
    156  mkvmuxer::Tracks tracks_;
    +
    157 
    +
    158  StreamInfo* info_;
    +
    159  MuxerListener* muxer_listener_;
    +
    160  ProgressListener* progress_listener_;
    +
    161  uint64_t progress_target_;
    +
    162  uint64_t accumulated_progress_;
    +
    163  uint64_t first_timestamp_;
    +
    164  int64_t sample_duration_;
    +
    165  // The position (in bytes) of the start of the Segment payload in the init
    +
    166  // file. This is also the size of the header before the SeekHead.
    +
    167  uint64_t segment_payload_pos_;
    +
    168 
    +
    169  // Durations in timescale.
    +
    170  uint64_t cluster_length_in_time_scale_;
    +
    171  uint64_t segment_length_in_time_scale_;
    +
    172 
    +
    173  int track_id_;
    +
    174 
    +
    175  DISALLOW_COPY_AND_ASSIGN(Segmenter);
    +
    176 };
    +
    177 
    +
    178 } // namespace webm
    +
    179 } // namespace media
    +
    180 } // namespace shaka
    +
    181 
    +
    182 #endif // MEDIA_FORMATS_WEBM_SEGMENTER_H_
    Status WriteSegmentHeader(uint64_t file_size, MkvWriter *writer)
    Writes the Segment header to writer.
    Definition: segmenter.cc:221
    -
    Abstract class holds stream information.
    Definition: stream_info.h:53
    +
    Abstract class holds stream information.
    Definition: stream_info.h:51
    -
    Status AddSample(scoped_refptr< MediaSample > sample)
    Definition: segmenter.cc:124
    Status Initialize(std::unique_ptr< MkvWriter > writer, StreamInfo *info, ProgressListener *progress_listener, MuxerListener *muxer_listener, KeySource *encryption_key_source, uint32_t max_sd_pixels, uint32_t max_hd_pixels, uint32_t max_uhd1_pixels, double clear_lead_in_seconds)
    Definition: segmenter.cc:51
    This structure contains the list of configuration options for Muxer.
    Definition: muxer_options.h:18
    Status SetCluster(uint64_t start_webm_timecode, uint64_t position, MkvWriter *writer)
    Creates a Cluster object with the given parameters.
    Definition: segmenter.cc:259
    This class listens to progress updates events.
    virtual bool GetIndexRangeStartAndEnd(uint64_t *start, uint64_t *end)=0
    +
    Status AddSample(std::shared_ptr< MediaSample > sample)
    Definition: segmenter.cc:124
    An implementation of IMkvWriter using our File type.
    Definition: mkv_writer.h:21
    - +
    KeySource is responsible for encryption key acquisition.
    Definition: key_source.h:30
    @@ -257,7 +256,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/dde/ts__section__psi_8cc_source.html b/docs/df/dde/ts__section__psi_8cc_source.html index afc0013809..c49b18b4a2 100644 --- a/docs/df/dde/ts__section__psi_8cc_source.html +++ b/docs/df/dde/ts__section__psi_8cc_source.html @@ -230,7 +230,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/de2/structshaka_1_1media_1_1H264SEIRecoveryPoint.html b/docs/df/de2/structshaka_1_1media_1_1H264SEIRecoveryPoint.html index 542e9ee832..f84327a9ff 100644 --- a/docs/df/de2/structshaka_1_1media_1_1H264SEIRecoveryPoint.html +++ b/docs/df/de2/structshaka_1_1media_1_1H264SEIRecoveryPoint.html @@ -118,7 +118,7 @@ int changing_slice_group_i diff --git a/docs/df/de3/text__track__config_8cc_source.html b/docs/df/de3/text__track__config_8cc_source.html index 3038643d3e..7c39fa75ea 100644 --- a/docs/df/de3/text__track__config_8cc_source.html +++ b/docs/df/de3/text__track__config_8cc_source.html @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/de9/segment__info_8h_source.html b/docs/df/de9/segment__info_8h_source.html index 8c77011b04..a94b040f3a 100644 --- a/docs/df/de9/segment__info_8h_source.html +++ b/docs/df/de9/segment__info_8h_source.html @@ -114,7 +114,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/df1/structshaka_1_1ContentProtectionElement-members.html b/docs/df/df1/structshaka_1_1ContentProtectionElement-members.html index 7547f1d13f..fe3e48ebb3 100644 --- a/docs/df/df1/structshaka_1_1ContentProtectionElement-members.html +++ b/docs/df/df1/structshaka_1_1ContentProtectionElement-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/dfb/classshaka_1_1media_1_1UdpOptions-members.html b/docs/df/dfb/classshaka_1_1media_1_1UdpOptions-members.html index c0df14a0aa..5a3be52b1e 100644 --- a/docs/df/dfb/classshaka_1_1media_1_1UdpOptions-members.html +++ b/docs/df/dfb/classshaka_1_1media_1_1UdpOptions-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/dfc/playready__key__encryption__flags_8cc_source.html b/docs/df/dfc/playready__key__encryption__flags_8cc_source.html index 63de18d2de..bcd0c235d0 100644 --- a/docs/df/dfc/playready__key__encryption__flags_8cc_source.html +++ b/docs/df/dfc/playready__key__encryption__flags_8cc_source.html @@ -166,7 +166,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dir_0494b8c96e3190a776d2b97ade9c8ddf.html b/docs/dir_0494b8c96e3190a776d2b97ade9c8ddf.html index 6e0f811943..6f77f3226f 100644 --- a/docs/dir_0494b8c96e3190a776d2b97ade9c8ddf.html +++ b/docs/dir_0494b8c96e3190a776d2b97ade9c8ddf.html @@ -165,7 +165,7 @@ Files diff --git a/docs/dir_2618cd273dea54f184e42d7a562af818.html b/docs/dir_2618cd273dea54f184e42d7a562af818.html index ce3478db00..0b10bf0367 100644 --- a/docs/dir_2618cd273dea54f184e42d7a562af818.html +++ b/docs/dir_2618cd273dea54f184e42d7a562af818.html @@ -140,7 +140,7 @@ Files diff --git a/docs/dir_279fd47bebb21302c25cfb685e84c359.html b/docs/dir_279fd47bebb21302c25cfb685e84c359.html index a5ca6bc370..33f3003584 100644 --- a/docs/dir_279fd47bebb21302c25cfb685e84c359.html +++ b/docs/dir_279fd47bebb21302c25cfb685e84c359.html @@ -125,7 +125,7 @@ Files diff --git a/docs/dir_2eceb70145328c029a5f43350007537a.html b/docs/dir_2eceb70145328c029a5f43350007537a.html index 30d7cf6d8e..7937294e73 100644 --- a/docs/dir_2eceb70145328c029a5f43350007537a.html +++ b/docs/dir_2eceb70145328c029a5f43350007537a.html @@ -93,7 +93,7 @@ Files diff --git a/docs/dir_39dc0668bd5a501998f94e8b4e546c71.html b/docs/dir_39dc0668bd5a501998f94e8b4e546c71.html index 5e95395e2c..738badf16e 100644 --- a/docs/dir_39dc0668bd5a501998f94e8b4e546c71.html +++ b/docs/dir_39dc0668bd5a501998f94e8b4e546c71.html @@ -99,7 +99,7 @@ Directories diff --git a/docs/dir_3e9291fd7a18fdecc763294cb2628910.html b/docs/dir_3e9291fd7a18fdecc763294cb2628910.html index d405afec71..1c866e6fb1 100644 --- a/docs/dir_3e9291fd7a18fdecc763294cb2628910.html +++ b/docs/dir_3e9291fd7a18fdecc763294cb2628910.html @@ -157,7 +157,7 @@ Files diff --git a/docs/dir_49627ef5ef0630f6cf11dd06344c4cf0.html b/docs/dir_49627ef5ef0630f6cf11dd06344c4cf0.html index 791d357df8..2bcf76331e 100644 --- a/docs/dir_49627ef5ef0630f6cf11dd06344c4cf0.html +++ b/docs/dir_49627ef5ef0630f6cf11dd06344c4cf0.html @@ -93,7 +93,7 @@ Files diff --git a/docs/dir_5039d854a18988ed1f1dbebc120ffbf7.html b/docs/dir_5039d854a18988ed1f1dbebc120ffbf7.html index 677482bcc3..4d19927cb2 100644 --- a/docs/dir_5039d854a18988ed1f1dbebc120ffbf7.html +++ b/docs/dir_5039d854a18988ed1f1dbebc120ffbf7.html @@ -181,7 +181,7 @@ Files diff --git a/docs/dir_65f7acfa8cf3a5f1edc11faa2428b914.html b/docs/dir_65f7acfa8cf3a5f1edc11faa2428b914.html index a33d941e9b..af603b416d 100644 --- a/docs/dir_65f7acfa8cf3a5f1edc11faa2428b914.html +++ b/docs/dir_65f7acfa8cf3a5f1edc11faa2428b914.html @@ -101,7 +101,7 @@ Directories diff --git a/docs/dir_679a6f4e9fa092b388fc986148018f2a.html b/docs/dir_679a6f4e9fa092b388fc986148018f2a.html index 3b6d11590f..e9a3215c1c 100644 --- a/docs/dir_679a6f4e9fa092b388fc986148018f2a.html +++ b/docs/dir_679a6f4e9fa092b388fc986148018f2a.html @@ -95,7 +95,7 @@ Files diff --git a/docs/dir_7f5e01ba7faf319a30cabd201b6ef121.html b/docs/dir_7f5e01ba7faf319a30cabd201b6ef121.html index c189846bd7..7e064fc42e 100644 --- a/docs/dir_7f5e01ba7faf319a30cabd201b6ef121.html +++ b/docs/dir_7f5e01ba7faf319a30cabd201b6ef121.html @@ -93,7 +93,7 @@ Files diff --git a/docs/dir_89dd766eb2df7d7257dbe806a34404af.html b/docs/dir_89dd766eb2df7d7257dbe806a34404af.html index 67961195b4..35a4366e13 100644 --- a/docs/dir_89dd766eb2df7d7257dbe806a34404af.html +++ b/docs/dir_89dd766eb2df7d7257dbe806a34404af.html @@ -93,7 +93,7 @@ Directories diff --git a/docs/dir_aa73376d632f252584a1c0dfbefab2c4.html b/docs/dir_aa73376d632f252584a1c0dfbefab2c4.html index 6d0a7a06a7..61078c35f7 100644 --- a/docs/dir_aa73376d632f252584a1c0dfbefab2c4.html +++ b/docs/dir_aa73376d632f252584a1c0dfbefab2c4.html @@ -117,7 +117,7 @@ Files diff --git a/docs/dir_c6ada2450b25ab5438a4dba6c9b890af.html b/docs/dir_c6ada2450b25ab5438a4dba6c9b890af.html index 63c795acae..a38c0bc9a2 100644 --- a/docs/dir_c6ada2450b25ab5438a4dba6c9b890af.html +++ b/docs/dir_c6ada2450b25ab5438a4dba6c9b890af.html @@ -249,7 +249,7 @@ Files diff --git a/docs/dir_d422163b96683743ed3963d4aac17747.html b/docs/dir_d422163b96683743ed3963d4aac17747.html index f80c52f914..9d3856d11b 100644 --- a/docs/dir_d422163b96683743ed3963d4aac17747.html +++ b/docs/dir_d422163b96683743ed3963d4aac17747.html @@ -143,7 +143,7 @@ Files diff --git a/docs/dir_eeaeb49ac3913fcfb450d3ce9cc0141b.html b/docs/dir_eeaeb49ac3913fcfb450d3ce9cc0141b.html index 12a319d5e0..aff1de4ff6 100644 --- a/docs/dir_eeaeb49ac3913fcfb450d3ce9cc0141b.html +++ b/docs/dir_eeaeb49ac3913fcfb450d3ce9cc0141b.html @@ -93,7 +93,7 @@ Files diff --git a/docs/dir_f7dcbe7025bbacfc4b9a7dff6ad41d72.html b/docs/dir_f7dcbe7025bbacfc4b9a7dff6ad41d72.html index fb0e4897dd..aca457bf3e 100644 --- a/docs/dir_f7dcbe7025bbacfc4b9a7dff6ad41d72.html +++ b/docs/dir_f7dcbe7025bbacfc4b9a7dff6ad41d72.html @@ -171,7 +171,7 @@ Files diff --git a/docs/files.html b/docs/files.html index 7be4ce71bf..25501d86aa 100644 --- a/docs/files.html +++ b/docs/files.html @@ -439,7 +439,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions.html b/docs/functions.html index c83e5cd06d..cab78c76d2 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -175,11 +175,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::xml::AdaptationSetXmlNode
  • AddSample() -: shaka::media::mp2t::TsSegmenter -, shaka::media::mp4::EncryptingFragmenter -, shaka::media::mp4::Fragmenter -, shaka::media::mp4::Segmenter -, shaka::media::webm::Segmenter +: shaka::media::mp2t::TsSegmenter +, shaka::media::mp4::EncryptingFragmenter +, shaka::media::mp4::Fragmenter +, shaka::media::mp4::Segmenter +, shaka::media::webm::Segmenter
  • AddStream() : shaka::media::Muxer @@ -249,7 +249,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_b.html b/docs/functions_b.html index ceb41f8f39..874c554574 100644 --- a/docs/functions_b.html +++ b/docs/functions_b.html @@ -240,7 +240,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_c.html b/docs/functions_c.html index a993a43cce..1e87983882 100644 --- a/docs/functions_c.html +++ b/docs/functions_c.html @@ -197,7 +197,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::File
  • CopyFrom() -: shaka::media::MediaSample +: shaka::media::MediaSample
  • Create() : shaka::media::RsaPrivateKey @@ -210,13 +210,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::ProtectionSystemSpecificInfo
  • CreateEmptyMediaSample() -: shaka::media::MediaSample +: shaka::media::MediaSample
  • CreateEncryptor() : shaka::media::mp4::EncryptingFragmenter
  • CreateEOSBuffer() -: shaka::media::MediaSample +: shaka::media::MediaSample
  • CreateFromHexStrings() : shaka::media::FixedKeySource @@ -228,7 +228,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::SegmentTestBase
  • CreateSample() -: shaka::media::SegmentTestBase +: shaka::media::SegmentTestBase
  • CreateSigner() : shaka::media::AesRequestSigner @@ -247,7 +247,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_d.html b/docs/functions_d.html index 35c08514f1..2de42a5790 100644 --- a/docs/functions_d.html +++ b/docs/functions_d.html @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_e.html b/docs/functions_e.html index 77a27a0b59..7e4e34160c 100644 --- a/docs/functions_e.html +++ b/docs/functions_e.html @@ -137,16 +137,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , shaka::media::mp2t::ProgramMapTableWriter
  • EncryptFrame() -: shaka::media::webm::Encryptor +: shaka::media::webm::Encryptor
  • EncryptingFragmenter() -: shaka::media::mp4::EncryptingFragmenter +: shaka::media::mp4::EncryptingFragmenter
diff --git a/docs/functions_enum.html b/docs/functions_enum.html index 1de52b3eff..e63a8814fc 100644 --- a/docs/functions_enum.html +++ b/docs/functions_enum.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_eval.html b/docs/functions_eval.html index f289ace7ac..ffb3b8d322 100644 --- a/docs/functions_eval.html +++ b/docs/functions_eval.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_f.html b/docs/functions_f.html index 5b507ed543..da55990b1b 100644 --- a/docs/functions_f.html +++ b/docs/functions_f.html @@ -176,7 +176,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::MuxerOptions
  • Fragmenter() -: shaka::media::mp4::Fragmenter +: shaka::media::mp4::Fragmenter
  • frequency() : shaka::media::AACAudioSpecificConfig @@ -185,7 +185,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::webm::Segmenter
  • FromMetadata() -: shaka::media::MediaSample +: shaka::media::MediaSample
  • FromWebMTimecode() : shaka::media::webm::Segmenter @@ -194,7 +194,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func.html b/docs/functions_func.html index a801b3ef92..7d44968512 100644 --- a/docs/functions_func.html +++ b/docs/functions_func.html @@ -175,11 +175,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::xml::AdaptationSetXmlNode
  • AddSample() -: shaka::media::mp2t::TsSegmenter -, shaka::media::mp4::EncryptingFragmenter -, shaka::media::mp4::Fragmenter -, shaka::media::mp4::Segmenter -, shaka::media::webm::Segmenter +: shaka::media::mp2t::TsSegmenter +, shaka::media::mp4::EncryptingFragmenter +, shaka::media::mp4::Fragmenter +, shaka::media::mp4::Segmenter +, shaka::media::webm::Segmenter
  • AddStream() : shaka::media::Muxer @@ -249,7 +249,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_b.html b/docs/functions_func_b.html index 781ce1494b..e0069dc0e1 100644 --- a/docs/functions_func_b.html +++ b/docs/functions_func_b.html @@ -237,7 +237,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_c.html b/docs/functions_func_c.html index 014b911083..2a2ab9ff23 100644 --- a/docs/functions_func_c.html +++ b/docs/functions_func_c.html @@ -197,7 +197,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::File
  • CopyFrom() -: shaka::media::MediaSample +: shaka::media::MediaSample
  • Create() : shaka::media::RsaPrivateKey @@ -210,13 +210,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::ProtectionSystemSpecificInfo
  • CreateEmptyMediaSample() -: shaka::media::MediaSample +: shaka::media::MediaSample
  • CreateEncryptor() : shaka::media::mp4::EncryptingFragmenter
  • CreateEOSBuffer() -: shaka::media::MediaSample +: shaka::media::MediaSample
  • CreateFromHexStrings() : shaka::media::FixedKeySource @@ -228,7 +228,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::SegmentTestBase
  • CreateSample() -: shaka::media::SegmentTestBase +: shaka::media::SegmentTestBase
  • CreateSigner() : shaka::media::AesRequestSigner @@ -247,7 +247,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_d.html b/docs/functions_func_d.html index 0fbb7bec73..086047a97d 100644 --- a/docs/functions_func_d.html +++ b/docs/functions_func_d.html @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_e.html b/docs/functions_func_e.html index d638f6f891..b7530f3f94 100644 --- a/docs/functions_func_e.html +++ b/docs/functions_func_e.html @@ -137,16 +137,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , shaka::media::mp2t::ProgramMapTableWriter
  • EncryptFrame() -: shaka::media::webm::Encryptor +: shaka::media::webm::Encryptor
  • EncryptingFragmenter() -: shaka::media::mp4::EncryptingFragmenter +: shaka::media::mp4::EncryptingFragmenter
  • diff --git a/docs/functions_func_f.html b/docs/functions_func_f.html index 3feb17b9ed..4a0bca1f58 100644 --- a/docs/functions_func_f.html +++ b/docs/functions_func_f.html @@ -170,7 +170,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::AdaptationSet
  • Fragmenter() -: shaka::media::mp4::Fragmenter +: shaka::media::mp4::Fragmenter
  • frequency() : shaka::media::AACAudioSpecificConfig @@ -179,7 +179,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::webm::Segmenter
  • FromMetadata() -: shaka::media::MediaSample +: shaka::media::MediaSample
  • FromWebMTimecode() : shaka::media::webm::Segmenter @@ -188,7 +188,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_g.html b/docs/functions_func_g.html index 9ba8744418..817bbcd4a0 100644 --- a/docs/functions_func_g.html +++ b/docs/functions_func_g.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::mp2t::AdtsHeader
  • GetAudioStreamInfo() -: shaka::media::WebMAudioClient +: shaka::media::WebMAudioClient
  • GetCodecString() : shaka::media::AudioStreamInfo @@ -248,7 +248,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::KeySource
  • GetVideoStreamInfo() -: shaka::media::WebMVideoClient +: shaka::media::WebMVideoClient
  • GetXml() : shaka::AdaptationSet @@ -258,7 +258,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_h.html b/docs/functions_func_h.html index 64b83f0bcb..90efe8a2cc 100644 --- a/docs/functions_func_h.html +++ b/docs/functions_func_h.html @@ -154,7 +154,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_i.html b/docs/functions_func_i.html index 64f0d702be..155884236b 100644 --- a/docs/functions_func_i.html +++ b/docs/functions_func_i.html @@ -210,7 +210,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_k.html b/docs/functions_func_k.html index 2494780ec1..36337fae45 100644 --- a/docs/functions_func_k.html +++ b/docs/functions_func_k.html @@ -123,13 +123,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    - k -

    diff --git a/docs/functions_func_l.html b/docs/functions_func_l.html index e223f1ea04..b35759a1fc 100644 --- a/docs/functions_func_l.html +++ b/docs/functions_func_l.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_m.html b/docs/functions_func_m.html index 5e3182b664..db1ee6f3b0 100644 --- a/docs/functions_func_m.html +++ b/docs/functions_func_m.html @@ -129,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::Status
  • MediaStream() -: shaka::media::MediaStream +: shaka::media::MediaStream
  • MP4Muxer() : shaka::media::mp4::MP4Muxer @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_n.html b/docs/functions_func_n.html index 34b9470d87..237d16bef6 100644 --- a/docs/functions_func_n.html +++ b/docs/functions_func_n.html @@ -172,7 +172,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_o.html b/docs/functions_func_o.html index 14a26b2343..b7032b80eb 100644 --- a/docs/functions_func_o.html +++ b/docs/functions_func_o.html @@ -193,7 +193,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_p.html b/docs/functions_func_p.html index e1a7f4f5f3..d9cc971bdb 100644 --- a/docs/functions_func_p.html +++ b/docs/functions_func_p.html @@ -220,21 +220,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::mp2t::PesPacket
  • PullSample() -: shaka::media::MediaStream +: shaka::media::MediaStream
  • Push() : shaka::media::ByteQueue , shaka::media::ProducerConsumerQueue< T >
  • PushSample() -: shaka::media::MediaStream -, shaka::media::mp2t::PesPacketGenerator +: shaka::media::MediaStream +, shaka::media::mp2t::PesPacketGenerator
  • diff --git a/docs/functions_func_r.html b/docs/functions_func_r.html index 00a94bd225..8fe13bcfbe 100644 --- a/docs/functions_func_r.html +++ b/docs/functions_func_r.html @@ -201,7 +201,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_s.html b/docs/functions_func_s.html index a236672fb4..e54a0654b0 100644 --- a/docs/functions_func_s.html +++ b/docs/functions_func_s.html @@ -289,7 +289,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_t.html b/docs/functions_func_t.html index 5c062b474f..f101be21f0 100644 --- a/docs/functions_func_t.html +++ b/docs/functions_func_t.html @@ -178,7 +178,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_u.html b/docs/functions_func_u.html index fad13787d1..2d90cd416d 100644 --- a/docs/functions_func_u.html +++ b/docs/functions_func_u.html @@ -146,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_v.html b/docs/functions_func_v.html index ecfaa36466..e5dceb3639 100644 --- a/docs/functions_func_v.html +++ b/docs/functions_func_v.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_w.html b/docs/functions_func_w.html index a00615af9b..33afc4b077 100644 --- a/docs/functions_func_w.html +++ b/docs/functions_func_w.html @@ -126,7 +126,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::IoCache
  • WebMClusterParser() -: shaka::media::WebMClusterParser +: shaka::media::WebMClusterParser
  • WebMListParser() : shaka::media::WebMListParser @@ -182,7 +182,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_x.html b/docs/functions_func_x.html index 4ad19fa717..3371081445 100644 --- a/docs/functions_func_x.html +++ b/docs/functions_func_x.html @@ -129,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_~.html b/docs/functions_func_~.html index ebbdffad0c..568a9f3edb 100644 --- a/docs/functions_func_~.html +++ b/docs/functions_func_~.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_g.html b/docs/functions_g.html index b8bb5239a6..b5c3cb10c5 100644 --- a/docs/functions_g.html +++ b/docs/functions_g.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::mp2t::AdtsHeader
  • GetAudioStreamInfo() -: shaka::media::WebMAudioClient +: shaka::media::WebMAudioClient
  • GetCodecString() : shaka::media::AudioStreamInfo @@ -248,7 +248,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::KeySource
  • GetVideoStreamInfo() -: shaka::media::WebMVideoClient +: shaka::media::WebMVideoClient
  • GetXml() : shaka::AdaptationSet @@ -258,7 +258,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_h.html b/docs/functions_h.html index e2cad4b6c0..809a320565 100644 --- a/docs/functions_h.html +++ b/docs/functions_h.html @@ -154,7 +154,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_i.html b/docs/functions_i.html index 8a45a4ad3a..1c5a21c644 100644 --- a/docs/functions_i.html +++ b/docs/functions_i.html @@ -142,7 +142,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , shaka::SimpleMpdNotifier
  • InitCB -: shaka::media::MediaParser +: shaka::media::MediaParser
  • Initialize() : shaka::media::Demuxer @@ -213,7 +213,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_k.html b/docs/functions_k.html index 0c855571fe..86a7b83693 100644 --- a/docs/functions_k.html +++ b/docs/functions_k.html @@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::AesPatternCryptor
  • KeyRotationFragmenter() -: shaka::media::mp4::KeyRotationFragmenter +: shaka::media::mp4::KeyRotationFragmenter
  • kOrderInvalid : shaka::media::ContentEncoding @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_l.html b/docs/functions_l.html index 5a2ca6afa5..55763e1fb9 100644 --- a/docs/functions_l.html +++ b/docs/functions_l.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_m.html b/docs/functions_m.html index 26891991fe..5a86db2e2c 100644 --- a/docs/functions_m.html +++ b/docs/functions_m.html @@ -129,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::Status
  • MediaStream() -: shaka::media::MediaStream +: shaka::media::MediaStream
  • mp4_use_decoding_timestamp_in_timeline : shaka::media::MuxerOptions @@ -153,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_n.html b/docs/functions_n.html index 41da75d40c..fc2a077c90 100644 --- a/docs/functions_n.html +++ b/docs/functions_n.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::NaluReader
  • NewSampleCB -: shaka::media::MediaParser +: shaka::media::MediaParser
  • NewSegment() : shaka::media::mp2t::TsWriter @@ -178,7 +178,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_o.html b/docs/functions_o.html index 18ee5c057e..325a0e0490 100644 --- a/docs/functions_o.html +++ b/docs/functions_o.html @@ -196,7 +196,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_p.html b/docs/functions_p.html index afd157bb72..af5c34d9e9 100644 --- a/docs/functions_p.html +++ b/docs/functions_p.html @@ -226,21 +226,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::mp2t::PesPacket
  • PullSample() -: shaka::media::MediaStream +: shaka::media::MediaStream
  • Push() : shaka::media::ByteQueue , shaka::media::ProducerConsumerQueue< T >
  • PushSample() -: shaka::media::MediaStream -, shaka::media::mp2t::PesPacketGenerator +: shaka::media::MediaStream +, shaka::media::mp2t::PesPacketGenerator
  • diff --git a/docs/functions_r.html b/docs/functions_r.html index 28ee4ae29c..c073a92568 100644 --- a/docs/functions_r.html +++ b/docs/functions_r.html @@ -201,7 +201,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_s.html b/docs/functions_s.html index aa18dc95d7..cc583682f8 100644 --- a/docs/functions_s.html +++ b/docs/functions_s.html @@ -301,7 +301,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_t.html b/docs/functions_t.html index 9b75c2487a..3eaca140e5 100644 --- a/docs/functions_t.html +++ b/docs/functions_t.html @@ -181,7 +181,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_type.html b/docs/functions_type.html index 54a17bc498..849eff2042 100644 --- a/docs/functions_type.html +++ b/docs/functions_type.html @@ -94,16 +94,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_u.html b/docs/functions_u.html index 4ca4fb2301..3335242509 100644 --- a/docs/functions_u.html +++ b/docs/functions_u.html @@ -146,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_v.html b/docs/functions_v.html index 67a0e4e68f..1d47baa780 100644 --- a/docs/functions_v.html +++ b/docs/functions_v.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_vars.html b/docs/functions_vars.html index 4825c6d1d2..e11bd0ed9b 100644 --- a/docs/functions_vars.html +++ b/docs/functions_vars.html @@ -142,7 +142,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_w.html b/docs/functions_w.html index a4b9adbb6c..a11c3ee385 100644 --- a/docs/functions_w.html +++ b/docs/functions_w.html @@ -126,7 +126,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::IoCache
  • WebMClusterParser() -: shaka::media::WebMClusterParser +: shaka::media::WebMClusterParser
  • WebMListParser() : shaka::media::WebMListParser @@ -182,7 +182,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_x.html b/docs/functions_x.html index b6f37b5d5b..a2561cac0f 100644 --- a/docs/functions_x.html +++ b/docs/functions_x.html @@ -129,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_~.html b/docs/functions_~.html index df441197dc..10ca09ddb1 100644 --- a/docs/functions_~.html +++ b/docs/functions_~.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/hierarchy.html b/docs/hierarchy.html index 2be23265fc..e7d00b5b38 100644 --- a/docs/hierarchy.html +++ b/docs/hierarchy.html @@ -258,47 +258,42 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); |oCshaka::media::WebMMediaParser |oCshaka::media::WebVttMediaParser |\Cshaka::media::wvm::WvmMediaParser -oCshaka::media::MediaStream -oCshaka::MpdBuilderThis class generates DASH MPDs (Media Presentation Descriptions) -|\Cshaka::MockMpdBuilder -oCshaka::MpdNotifier -|oCshaka::DashIopMpdNotifier -|oCshaka::MockMpdNotifier -|\Cshaka::SimpleMpdNotifier -oCshaka::MpdNotifierFactory -oCshaka::MpdOptionsDefines Mpd Options -oCshaka::MpdWriter -oCshaka::media::Muxer -|oCshaka::media::mp2t::TsMuxer -|oCshaka::media::mp4::MP4Muxer -|\Cshaka::media::webm::WebMMuxerImplements WebM Muxer -oCshaka::media::MuxerListener -|oCshaka::media::HlsNotifyMuxerListenerMuxerListener that uses HlsNotifier -|oCshaka::media::MockMuxerListener -|oCshaka::media::MpdNotifyMuxerListener -|\Cshaka::media::VodMediaInfoDumpMuxerListener -oCshaka::media::MuxerOptionsThis structure contains the list of configuration options for Muxer -oCshaka::media::Nalu -oCshaka::media::NalUnitToByteStreamConverter -oCshaka::media::NaluReader -oCshaka::media::OffsetByteQueue -oCshaka::media::OnMediaEndParameters -oCshaka::media::mp2t::PesPacketClass that carries PES packet information -oCshaka::media::mp2t::PesPacketGenerator -oCshaka::media::wvm::PrevSampleData -oCshaka::media::mp4::PrivFrameImplemented per http://id3.org/id3v2.4.0-frames -oCshaka::media::ProducerConsumerQueue< T > -oCshaka::media::mp2t::ProgramMapTableWriter -|oCshaka::media::mp2t::AacProgramMapTableWriter -|\Cshaka::media::mp2t::H264ProgramMapTableWriter -oCshaka::media::ProgressListenerThis class listens to progress updates events -oCshaka::media::ProtectionSystemSpecificInfo -oCRefCountedThreadSafe -|oCshaka::media::MediaSampleClass to hold a media sample -|\Cshaka::media::StreamInfoAbstract class holds stream information -| oCshaka::media::AudioStreamInfoHolds audio stream information -| oCshaka::media::TextStreamInfo -| \Cshaka::media::VideoStreamInfoHolds video stream information +oCshaka::media::MediaSampleClass to hold a media sample +oCshaka::media::MediaStream +oCshaka::MpdBuilderThis class generates DASH MPDs (Media Presentation Descriptions) +|\Cshaka::MockMpdBuilder +oCshaka::MpdNotifier +|oCshaka::DashIopMpdNotifier +|oCshaka::MockMpdNotifier +|\Cshaka::SimpleMpdNotifier +oCshaka::MpdNotifierFactory +oCshaka::MpdOptionsDefines Mpd Options +oCshaka::MpdWriter +oCshaka::media::Muxer +|oCshaka::media::mp2t::TsMuxer +|oCshaka::media::mp4::MP4Muxer +|\Cshaka::media::webm::WebMMuxerImplements WebM Muxer +oCshaka::media::MuxerListener +|oCshaka::media::HlsNotifyMuxerListenerMuxerListener that uses HlsNotifier +|oCshaka::media::MockMuxerListener +|oCshaka::media::MpdNotifyMuxerListener +|\Cshaka::media::VodMediaInfoDumpMuxerListener +oCshaka::media::MuxerOptionsThis structure contains the list of configuration options for Muxer +oCshaka::media::Nalu +oCshaka::media::NalUnitToByteStreamConverter +oCshaka::media::NaluReader +oCshaka::media::OffsetByteQueue +oCshaka::media::OnMediaEndParameters +oCshaka::media::mp2t::PesPacketClass that carries PES packet information +oCshaka::media::mp2t::PesPacketGenerator +oCshaka::media::wvm::PrevSampleData +oCshaka::media::mp4::PrivFrameImplemented per http://id3.org/id3v2.4.0-frames +oCshaka::media::ProducerConsumerQueue< T > +oCshaka::media::mp2t::ProgramMapTableWriter +|oCshaka::media::mp2t::AacProgramMapTableWriter +|\Cshaka::media::mp2t::H264ProgramMapTableWriter +oCshaka::media::ProgressListenerThis class listens to progress updates events +oCshaka::media::ProtectionSystemSpecificInfo oCshaka::Representation |\Cshaka::MockRepresentation oCshaka::RepresentationStateChangeListener @@ -324,54 +319,58 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); oCshaka::media::Status oCshaka::media::StreamDescriptor oCshaka::media::StreamDescriptorCompareFn -oCshaka::media::SubsampleEntry -oCshaka::media::mp4::SyncSampleIterator -oCTest -|\Cshaka::media::SegmentTestBase -oCshaka::media::TextTrack -oCshaka::media::TextTrackConfig -oCshaka::media::mp4::TrackRunIterator -oCshaka::media::TracksBuilder -oCshaka::media::mp2t::TsPacket -oCshaka::media::mp2t::TsSection -|oCshaka::media::mp2t::TsSectionPes -|\Cshaka::media::mp2t::TsSectionPsi -| oCshaka::media::mp2t::TsSectionPat -| \Cshaka::media::mp2t::TsSectionPmt -oCshaka::media::mp2t::TsSegmenter -oCshaka::media::mp2t::TsWriter -oCshaka::media::UdpOptionsOptions parsed from UDP url string of the form: udp://ip:port[?options] -oCshaka::media::VideoSliceHeaderParser -|oCshaka::media::H264VideoSliceHeaderParser -|\Cshaka::media::H265VideoSliceHeaderParser -oCshaka::media::mp2t::EsParserH26x::VideoSliceInfo -oCshaka::media::VideoStreamInfoParameters -oCshaka::media::VPCodecConfigurationRecordClass for parsing or writing VP codec configuration record -oCshaka::media::VPxFrameInfo -oCshaka::media::VPxParser -|oCshaka::media::VP8Parser -|\Cshaka::media::VP9ParserClass to parse a vp9 bit stream -oCshaka::media::WebMListParser -oCshaka::media::WebMParserClient -|oCshaka::media::SegmentTestBase::ClusterParser -|oCshaka::media::WebMAudioClientHelper class used to parse an Audio element inside a TrackEntry element -|oCshaka::media::WebMClusterParser -|oCshaka::media::WebMContentEncodingsClientParser for WebM ContentEncodings element -|oCshaka::media::WebMInfoParserParser for WebM Info element -|oCshaka::media::WebMTracksParserParser for WebM Tracks element -|\Cshaka::media::WebMVideoClientHelper class used to parse a Video element inside a TrackEntry element -oCshaka::media::WebMWebVTTParser -oCshaka::xml::XmlDeleter -\Cshaka::xml::XmlNode - \Cshaka::xml::RepresentationBaseXmlNode -  oCshaka::xml::AdaptationSetXmlNodeAdaptationSetType specified in MPD -  \Cshaka::xml::RepresentationXmlNodeRepresentationType in MPD +oCshaka::media::StreamInfoAbstract class holds stream information +|oCshaka::media::AudioStreamInfoHolds audio stream information +|oCshaka::media::TextStreamInfo +|\Cshaka::media::VideoStreamInfoHolds video stream information +oCshaka::media::SubsampleEntry +oCshaka::media::mp4::SyncSampleIterator +oCTest +|\Cshaka::media::SegmentTestBase +oCshaka::media::TextTrack +oCshaka::media::TextTrackConfig +oCshaka::media::mp4::TrackRunIterator +oCshaka::media::TracksBuilder +oCshaka::media::mp2t::TsPacket +oCshaka::media::mp2t::TsSection +|oCshaka::media::mp2t::TsSectionPes +|\Cshaka::media::mp2t::TsSectionPsi +| oCshaka::media::mp2t::TsSectionPat +| \Cshaka::media::mp2t::TsSectionPmt +oCshaka::media::mp2t::TsSegmenter +oCshaka::media::mp2t::TsWriter +oCshaka::media::UdpOptionsOptions parsed from UDP url string of the form: udp://ip:port[?options] +oCshaka::media::VideoSliceHeaderParser +|oCshaka::media::H264VideoSliceHeaderParser +|\Cshaka::media::H265VideoSliceHeaderParser +oCshaka::media::mp2t::EsParserH26x::VideoSliceInfo +oCshaka::media::VideoStreamInfoParameters +oCshaka::media::VPCodecConfigurationRecordClass for parsing or writing VP codec configuration record +oCshaka::media::VPxFrameInfo +oCshaka::media::VPxParser +|oCshaka::media::VP8Parser +|\Cshaka::media::VP9ParserClass to parse a vp9 bit stream +oCshaka::media::WebMListParser +oCshaka::media::WebMParserClient +|oCshaka::media::SegmentTestBase::ClusterParser +|oCshaka::media::WebMAudioClientHelper class used to parse an Audio element inside a TrackEntry element +|oCshaka::media::WebMClusterParser +|oCshaka::media::WebMContentEncodingsClientParser for WebM ContentEncodings element +|oCshaka::media::WebMInfoParserParser for WebM Info element +|oCshaka::media::WebMTracksParserParser for WebM Tracks element +|\Cshaka::media::WebMVideoClientHelper class used to parse a Video element inside a TrackEntry element +oCshaka::media::WebMWebVTTParser +oCshaka::xml::XmlDeleter +\Cshaka::xml::XmlNode + \Cshaka::xml::RepresentationBaseXmlNode +  oCshaka::xml::AdaptationSetXmlNodeAdaptationSetType specified in MPD +  \Cshaka::xml::RepresentationXmlNodeRepresentationType in MPD diff --git a/docs/index.html b/docs/index.html index df84daf52b..89790d4217 100644 --- a/docs/index.html +++ b/docs/index.html @@ -81,7 +81,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/namespacemembers.html b/docs/namespacemembers.html index 8008df77ad..1741e3ea87 100644 --- a/docs/namespacemembers.html +++ b/docs/namespacemembers.html @@ -133,7 +133,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/namespacemembers_func.html b/docs/namespacemembers_func.html index a49c505d64..c910fbc01a 100644 --- a/docs/namespacemembers_func.html +++ b/docs/namespacemembers_func.html @@ -133,7 +133,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/namespaces.html b/docs/namespaces.html index 6fe2638404..5a309b892c 100644 --- a/docs/namespaces.html +++ b/docs/namespaces.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/search/all_0.js b/docs/search/all_0.js index 93042c7e31..f4d3196595 100644 --- a/docs/search/all_0.js +++ b/docs/search/all_0.js @@ -22,7 +22,7 @@ var searchData= ['addrepresentation',['AddRepresentation',['../d8/d8e/classshaka_1_1AdaptationSet.html#a124e3c1ba5e3209f3214a556ecae28c3',1,'shaka::AdaptationSet']]], ['addrole',['AddRole',['../d8/d8e/classshaka_1_1AdaptationSet.html#ae96ad89ec7cc7d5ef1db467a9cf13730',1,'shaka::AdaptationSet']]], ['addroleelement',['AddRoleElement',['../d1/de7/classshaka_1_1xml_1_1AdaptationSetXmlNode.html#a2718eede55bb89447a74ff802b95fdb1',1,'shaka::xml::AdaptationSetXmlNode']]], - ['addsample',['AddSample',['../de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html#a5fc925f3324b5cfab955b1fac1f52094',1,'shaka::media::mp2t::TsSegmenter::AddSample()'],['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#afeb03755fa2e6a53376ae5ceb7440021',1,'shaka::media::mp4::EncryptingFragmenter::AddSample()'],['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#a684c1f318ac05e85f4dbf373ea65b7ad',1,'shaka::media::mp4::Fragmenter::AddSample()'],['../d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html#a4a1a9e50050e75584ff1087aa318096a',1,'shaka::media::mp4::Segmenter::AddSample()'],['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#aa15ccabe1a33c660201ef1d8386067e5',1,'shaka::media::webm::Segmenter::AddSample()']]], + ['addsample',['AddSample',['../de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html#a16a92ce0a4d60e502135f89c4b7ffc9b',1,'shaka::media::mp2t::TsSegmenter::AddSample()'],['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a47bfcdce7bfcf5884fa805130856c5b4',1,'shaka::media::mp4::EncryptingFragmenter::AddSample()'],['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#a9453ee5952fc923eae502467e50317e2',1,'shaka::media::mp4::Fragmenter::AddSample()'],['../d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html#a7706ce1829da84b1155a2244c22411bf',1,'shaka::media::mp4::Segmenter::AddSample()'],['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#aad137d0ae95d3e47a32725276970e324',1,'shaka::media::webm::Segmenter::AddSample()']]], ['addstream',['AddStream',['../df/d46/classshaka_1_1media_1_1Muxer.html#ad9479d299d1c494604a5f5a052fe8280',1,'shaka::media::Muxer']]], ['addsupplementalproperty',['AddSupplementalProperty',['../dd/db9/classshaka_1_1xml_1_1RepresentationBaseXmlNode.html#a58965505799f01c99768823caeb66a6b',1,'shaka::xml::RepresentationBaseXmlNode']]], ['addtrackinfo',['AddTrackInfo',['../de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html#a866bb619cd0fde0c28ee522cbd4a8c59',1,'shaka::media::webm::Encryptor']]], diff --git a/docs/search/all_14.js b/docs/search/all_14.js index 7989dc37e1..7b22da23e5 100644 --- a/docs/search/all_14.js +++ b/docs/search/all_14.js @@ -3,7 +3,7 @@ var searchData= ['waituntilemptyorclosed',['WaitUntilEmptyOrClosed',['../dd/d7c/classshaka_1_1media_1_1IoCache.html#a841a082bfd88280a4ea00ac1a9e64dac',1,'shaka::media::IoCache']]], ['webmaudioclient',['WebMAudioClient',['../d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html',1,'shaka::media']]], ['webmclusterparser',['WebMClusterParser',['../da/de4/classshaka_1_1media_1_1WebMClusterParser.html',1,'shaka::media']]], - ['webmclusterparser',['WebMClusterParser',['../da/de4/classshaka_1_1media_1_1WebMClusterParser.html#a8a7c7e7ac6a5da1cd45ab50f914f6826',1,'shaka::media::WebMClusterParser']]], + ['webmclusterparser',['WebMClusterParser',['../da/de4/classshaka_1_1media_1_1WebMClusterParser.html#a59da447ae099935eaa26f69cfecefc02',1,'shaka::media::WebMClusterParser']]], ['webmcontentencodingsclient',['WebMContentEncodingsClient',['../d9/d87/classshaka_1_1media_1_1WebMContentEncodingsClient.html',1,'shaka::media']]], ['webminfoparser',['WebMInfoParser',['../db/dae/classshaka_1_1media_1_1WebMInfoParser.html',1,'shaka::media']]], ['webmlistparser',['WebMListParser',['../dc/dca/classshaka_1_1media_1_1WebMListParser.html#ac228770d1828937f8aa6becec23210e1',1,'shaka::media::WebMListParser']]], diff --git a/docs/search/all_2.js b/docs/search/all_2.js index 769154a48c..fc991da137 100644 --- a/docs/search/all_2.js +++ b/docs/search/all_2.js @@ -38,17 +38,17 @@ var searchData= ['convertunittobytestreamwithsubsamples',['ConvertUnitToByteStreamWithSubsamples',['../d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html#a88c2997b4d912ba7caa8066bac417622',1,'shaka::media::NalUnitToByteStreamConverter']]], ['copy',['Copy',['../d3/d61/classshaka_1_1media_1_1File.html#afacdff207ba8359eaa029d8b1414c641',1,'shaka::media::File']]], ['copyfile',['CopyFile',['../d3/d61/classshaka_1_1media_1_1File.html#a1c218b7f815bae0f48800b385ddce67e',1,'shaka::media::File::CopyFile(File *source, File *destination)'],['../d3/d61/classshaka_1_1media_1_1File.html#a9f5ebcd3bdebb7fb02a7a7adf378b344',1,'shaka::media::File::CopyFile(File *source, File *destination, int64_t max_copy)']]], - ['copyfrom',['CopyFrom',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a3fac8e4cc8da3b34ef5f698411ec868b',1,'shaka::media::MediaSample::CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)'],['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a99f83b1803101853aa03bda8f1251e8c',1,'shaka::media::MediaSample::CopyFrom(const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)']]], + ['copyfrom',['CopyFrom',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#ad8975dbb21747ff32c8604f5489bf5c9',1,'shaka::media::MediaSample::CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)'],['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a910e68f46b9464e4ea36cf9cd5116b55',1,'shaka::media::MediaSample::CopyFrom(const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)']]], ['create',['Create',['../d0/dce/classshaka_1_1media_1_1RsaPrivateKey.html#aef45d0014d7971b936ce3d0109935ba8',1,'shaka::media::RsaPrivateKey::Create()'],['../d9/d0c/classshaka_1_1media_1_1RsaPublicKey.html#aabe4a2f1541ca1e741305f58329e3881',1,'shaka::media::RsaPublicKey::Create()']]], ['createandinitializesegmenter',['CreateAndInitializeSegmenter',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#a742824b930ae928f12214a5e350adc64',1,'shaka::media::SegmentTestBase']]], ['createbox',['CreateBox',['../d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html#af9b917cb91b6c10ee7a6f5b41fc7e0d9',1,'shaka::media::ProtectionSystemSpecificInfo']]], - ['createemptymediasample',['CreateEmptyMediaSample',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a59e7bbd2ee8cfa1697093d14d16a6c4d',1,'shaka::media::MediaSample']]], + ['createemptymediasample',['CreateEmptyMediaSample',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a4a7f8d79f9ec3cd3df9a395eef71f0c6',1,'shaka::media::MediaSample']]], ['createencryptor',['CreateEncryptor',['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a4220479b2dd98b462ff4dd4afcf56d0e',1,'shaka::media::mp4::EncryptingFragmenter']]], - ['createeosbuffer',['CreateEOSBuffer',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a925efca004ebbcf3cf71f690a3e43788',1,'shaka::media::MediaSample']]], + ['createeosbuffer',['CreateEOSBuffer',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a236e80a98d7f22ec585bbbf2e91397f5',1,'shaka::media::MediaSample']]], ['createfromhexstrings',['CreateFromHexStrings',['../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#a9a91ba439d785022a1e2ceeaa9ebe81a',1,'shaka::media::FixedKeySource']]], ['createfromkeyandkeyid',['CreateFromKeyAndKeyId',['../d4/da6/classshaka_1_1media_1_1PlayReadyKeySource.html#a4f539e8a54fef68aea5629489669508b',1,'shaka::media::PlayReadyKeySource']]], ['createmuxeroptions',['CreateMuxerOptions',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#a89d5ae5a78134e108a4fe4adb6f79e4e',1,'shaka::media::SegmentTestBase']]], - ['createsample',['CreateSample',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#aa6d43e2cc9d3abe023c037c87807f2ed',1,'shaka::media::SegmentTestBase']]], + ['createsample',['CreateSample',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#afd8845d029698f556ca09436da0c62ef',1,'shaka::media::SegmentTestBase']]], ['createsigner',['CreateSigner',['../d9/d8c/classshaka_1_1media_1_1AesRequestSigner.html#a43f4cc9fad9901fa905805be81f7d58c',1,'shaka::media::AesRequestSigner::CreateSigner()'],['../d7/ddd/classshaka_1_1media_1_1RsaRequestSigner.html#af6af635a7c0a01bb638befb71b88386c',1,'shaka::media::RsaRequestSigner::CreateSigner()']]], ['createvideostreaminfo',['CreateVideoStreamInfo',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#a7e34fd92e43914bd2f032835cdc9b8a7',1,'shaka::media::SegmentTestBase']]], ['crypt',['Crypt',['../df/d87/classshaka_1_1media_1_1AesCryptor.html#ac5fc6e563807e6fce36c2dd43c928b3e',1,'shaka::media::AesCryptor']]], diff --git a/docs/search/all_4.js b/docs/search/all_4.js index cb70b52f7e..f8629e6f64 100644 --- a/docs/search/all_4.js +++ b/docs/search/all_4.js @@ -10,8 +10,8 @@ var searchData= ['empty',['Empty',['../d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html#ad20705b713d6b5ded3312d800740b7ff',1,'shaka::media::ProducerConsumerQueue']]], ['encrypt',['Encrypt',['../d9/d0c/classshaka_1_1media_1_1RsaPublicKey.html#ab9dcf591f3235b8f4eaa02886f9845e3',1,'shaka::media::RsaPublicKey']]], ['encryptedsegmentpmt',['EncryptedSegmentPmt',['../dc/d03/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter.html#a7f40bf474758b80e57fede27c2610756',1,'shaka::media::mp2t::ProgramMapTableWriter::EncryptedSegmentPmt()'],['../de/d27/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter.html#a14d7933ee669e7c5daeb8d03f2f0b1d0',1,'shaka::media::mp2t::H264ProgramMapTableWriter::EncryptedSegmentPmt()'],['../d4/dc8/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter.html#a37616e314cb20775644b9c5e3417f8e5',1,'shaka::media::mp2t::AacProgramMapTableWriter::EncryptedSegmentPmt()']]], - ['encryptframe',['EncryptFrame',['../de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html#a3bfe9e0d99652811cb785832529f3d3c',1,'shaka::media::webm::Encryptor']]], - ['encryptingfragmenter',['EncryptingFragmenter',['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a3c1c1037b7d9e6edf1f476434705c3d5',1,'shaka::media::mp4::EncryptingFragmenter']]], + ['encryptframe',['EncryptFrame',['../de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html#a51a014fbe5ff6cfe4fad9e8f92c85561',1,'shaka::media::webm::Encryptor']]], + ['encryptingfragmenter',['EncryptingFragmenter',['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a0203dc3c39c1c9426ab7986ca31036ee',1,'shaka::media::mp4::EncryptingFragmenter']]], ['encryptingfragmenter',['EncryptingFragmenter',['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html',1,'shaka::media::mp4']]], ['encryptionkey',['EncryptionKey',['../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html',1,'shaka::media']]], ['encryptor',['Encryptor',['../de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html',1,'shaka::media::webm']]], diff --git a/docs/search/all_5.js b/docs/search/all_5.js index f4e5cb3473..3e422f2921 100644 --- a/docs/search/all_5.js +++ b/docs/search/all_5.js @@ -15,10 +15,10 @@ var searchData= ['fragment_5fduration',['fragment_duration',['../d0/d27/structshaka_1_1media_1_1MuxerOptions.html#a0dbe637b21f1f22f248437b59ad62a38',1,'shaka::media::MuxerOptions']]], ['fragment_5fsap_5faligned',['fragment_sap_aligned',['../d0/d27/structshaka_1_1media_1_1MuxerOptions.html#acb335182d4bd226c1f044cc83705f4fc',1,'shaka::media::MuxerOptions']]], ['fragmenter',['Fragmenter',['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html',1,'shaka::media::mp4']]], - ['fragmenter',['Fragmenter',['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#a675d1d98629a3d10f9ef191b9e950a69',1,'shaka::media::mp4::Fragmenter']]], + ['fragmenter',['Fragmenter',['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#a1be96f51fc8ea765aab7142df1bf6006',1,'shaka::media::mp4::Fragmenter']]], ['frequency',['frequency',['../d0/da2/classshaka_1_1media_1_1AACAudioSpecificConfig.html#a10f2acc7fcf3ec9de2fe3598c255786d',1,'shaka::media::AACAudioSpecificConfig']]], ['frombmfftimescale',['FromBMFFTimescale',['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a66c49dfab5316bea5b7b318871aef129',1,'shaka::media::webm::Segmenter']]], - ['frommetadata',['FromMetadata',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a1d23b68125525a019bde262e4c5a46f0',1,'shaka::media::MediaSample']]], + ['frommetadata',['FromMetadata',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a8c70ae863851c7a1066923cf387fb178',1,'shaka::media::MediaSample']]], ['fromwebmtimecode',['FromWebMTimecode',['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a8de27c5b6480f968cbef9eafec3731d7',1,'shaka::media::webm::Segmenter']]], ['fullbox',['FullBox',['../dd/dc1/structshaka_1_1media_1_1mp4_1_1FullBox.html',1,'shaka::media::mp4']]] ]; diff --git a/docs/search/all_6.js b/docs/search/all_6.js index 3f393f1106..c5a7ae2858 100644 --- a/docs/search/all_6.js +++ b/docs/search/all_6.js @@ -8,7 +8,7 @@ var searchData= ['getadtsheadersize',['GetAdtsHeaderSize',['../d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html#a107e1269d5f826583c1940fb50c8cf92',1,'shaka::media::mp2t::AdtsHeader']]], ['getaudiodefaultduration',['GetAudioDefaultDuration',['../d8/d86/classshaka_1_1media_1_1WebMTracksParser.html#a554135ee3a8ad995beeab868c67aba36',1,'shaka::media::WebMTracksParser']]], ['getaudiospecificconfig',['GetAudioSpecificConfig',['../d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html#a5ca14cc4eb4a28906fe832ab263ba5a2',1,'shaka::media::mp2t::AdtsHeader']]], - ['getaudiostreaminfo',['GetAudioStreamInfo',['../d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html#a8a23999bc3e6e88276d3ad62bd81e63f',1,'shaka::media::WebMAudioClient']]], + ['getaudiostreaminfo',['GetAudioStreamInfo',['../d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html#a0fcbddd20199044f860331b3bd9ef3b8',1,'shaka::media::WebMAudioClient']]], ['getcodecstring',['GetCodecString',['../da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html#aee79e7aa61b741bb96f451c6de1c9d42',1,'shaka::media::AudioStreamInfo::GetCodecString()'],['../d6/d57/classshaka_1_1media_1_1AVCDecoderConfigurationRecord.html#a52fbab2c863be9e771eafa20b34b89bc',1,'shaka::media::AVCDecoderConfigurationRecord::GetCodecString() const '],['../d6/d57/classshaka_1_1media_1_1AVCDecoderConfigurationRecord.html#a120f0913aea1e336da1335e80564b106',1,'shaka::media::AVCDecoderConfigurationRecord::GetCodecString(uint8_t profile_indication, uint8_t profile_compatibility, uint8_t avc_level)'],['../d4/d8a/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord.html#ad6b1f9ca644b001ff59c8e8188117f76',1,'shaka::media::HEVCDecoderConfigurationRecord::GetCodecString()'],['../d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html#a86b48fb506b476538a7440d9ccf9a533',1,'shaka::media::VPCodecConfigurationRecord::GetCodecString()']]], ['getcontenttype',['GetContentType',['../d8/daf/namespaceshaka.html#a5ea880937da26d677ff6a48c0219d090',1,'shaka']]], ['getcryptoperiodkey',['GetCryptoPeriodKey',['../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#afa9abf3a9104cbcb4711eac65c8a5bdf',1,'shaka::media::FixedKeySource::GetCryptoPeriodKey()'],['../d1/d1f/classshaka_1_1media_1_1KeySource.html#a18806b962c858e35ed07753687605b16',1,'shaka::media::KeySource::GetCryptoPeriodKey()'],['../d4/da6/classshaka_1_1media_1_1PlayReadyKeySource.html#a4005a0a96024a6918fb9f81a281ca131',1,'shaka::media::PlayReadyKeySource::GetCryptoPeriodKey()'],['../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#ab56a71e9f9f9e545f96e667279c05bb1',1,'shaka::media::WidevineKeySource::GetCryptoPeriodKey()']]], @@ -34,6 +34,6 @@ var searchData= ['getsps',['GetSps',['../de/dc2/classshaka_1_1media_1_1H265Parser.html#ab917855df00b9003c6be4612e2fe0211',1,'shaka::media::H265Parser']]], ['gettotalsizeofsubsamples',['GetTotalSizeOfSubsamples',['../d6/dcb/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry.html#a870ef304f376ec0822686e1d78765bf2',1,'shaka::media::mp4::SampleEncryptionEntry']]], ['gettracktypefromstring',['GetTrackTypeFromString',['../d1/d1f/classshaka_1_1media_1_1KeySource.html#a0963412e7ee33d0e34893ebdf38d96c1',1,'shaka::media::KeySource']]], - ['getvideostreaminfo',['GetVideoStreamInfo',['../d3/d67/classshaka_1_1media_1_1WebMVideoClient.html#a266f4308e70a1b7c1fb2a542284f9bea',1,'shaka::media::WebMVideoClient']]], + ['getvideostreaminfo',['GetVideoStreamInfo',['../d3/d67/classshaka_1_1media_1_1WebMVideoClient.html#ae71e739feadfb8e9207b8ceb9689ca66',1,'shaka::media::WebMVideoClient']]], ['getxml',['GetXml',['../d8/d8e/classshaka_1_1AdaptationSet.html#af988e3a6d8b0d3ede66e3f3aea992d5e',1,'shaka::AdaptationSet::GetXml()'],['../de/d52/classshaka_1_1Representation.html#a606afa5df6a90f49faad0ce427b7e960',1,'shaka::Representation::GetXml()']]] ]; diff --git a/docs/search/all_8.js b/docs/search/all_8.js index b1c2777a66..afb9561c41 100644 --- a/docs/search/all_8.js +++ b/docs/search/all_8.js @@ -4,7 +4,7 @@ var searchData= ['id3v2',['ID3v2',['../d3/dad/structshaka_1_1media_1_1mp4_1_1ID3v2.html',1,'shaka::media::mp4']]], ['ignorebytes',['IgnoreBytes',['../d1/da1/classshaka_1_1media_1_1mp4_1_1BoxBuffer.html#a1a0c70e3124677ae08164f7b89f6a1d4',1,'shaka::media::mp4::BoxBuffer']]], ['init',['Init',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#adc7c91bebe75879abba91a56dae52153',1,'shaka::media::MediaParser::Init()'],['../d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html#aa2aff12312827aacf2b7db6e2f792c52',1,'shaka::media::mp2t::Mp2tMediaParser::Init()'],['../d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html#acc87b9752a7f6e8c739109acbc02b69d',1,'shaka::media::mp4::MP4MediaParser::Init()'],['../de/df6/classshaka_1_1media_1_1mp4_1_1TrackRunIterator.html#ae9f02c32b4e2be8fc41a20f3f00f3494',1,'shaka::media::mp4::TrackRunIterator::Init()'],['../de/df6/classshaka_1_1media_1_1mp4_1_1TrackRunIterator.html#a4d39eaf8568da29b597411c56f50d86f',1,'shaka::media::mp4::TrackRunIterator::Init(const MovieFragment &moof)'],['../d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html#a5cd5c298938e2c58c45f962b21e43b2e',1,'shaka::media::WebMMediaParser::Init()'],['../dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html#af6c0fb7de806cccd0e1f9dd92b5310f3',1,'shaka::media::WebVttMediaParser::Init()'],['../dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html#a6f931f1702724a9b19c3078a7832bc77',1,'shaka::media::wvm::WvmMediaParser::Init()'],['../d4/d70/classshaka_1_1DashIopMpdNotifier.html#a9dd9d655a538ff2618634ca1f9809478',1,'shaka::DashIopMpdNotifier::Init()'],['../de/d52/classshaka_1_1Representation.html#ae998409ae94f3ba12909a96e8f3f4f7e',1,'shaka::Representation::Init()'],['../d3/dd0/classshaka_1_1MpdNotifier.html#ad6171481d6fb437767b1f5b9e0dac1a3',1,'shaka::MpdNotifier::Init()'],['../d8/de1/classshaka_1_1SimpleMpdNotifier.html#a59bcb401b5ca8d5b893ec7da9461569f',1,'shaka::SimpleMpdNotifier::Init()']]], - ['initcb',['InitCB',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a95d25a50ad371304f1abce9971ce3704',1,'shaka::media::MediaParser']]], + ['initcb',['InitCB',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#aef5795d2b3df2526c6e8afe1e4d072bf',1,'shaka::media::MediaParser']]], ['initialize',['Initialize',['../dd/d17/classshaka_1_1media_1_1Demuxer.html#a436ed9fd2a3ddd78056ec7cf656fd9ad',1,'shaka::media::Demuxer::Initialize()'],['../d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html#aa84e36b83b1caa2b1f726c4d3cff3d6d',1,'shaka::media::NalUnitToByteStreamConverter::Initialize()'],['../dd/de4/classshaka_1_1media_1_1VideoSliceHeaderParser.html#a862422cdf78f370069055037338fa53d',1,'shaka::media::VideoSliceHeaderParser::Initialize()'],['../da/df0/classshaka_1_1media_1_1H264VideoSliceHeaderParser.html#a551bd1e2a852d1a3b23b77df8505b7f7',1,'shaka::media::H264VideoSliceHeaderParser::Initialize()'],['../d1/d79/classshaka_1_1media_1_1H265VideoSliceHeaderParser.html#a83a25520f713f4818a765ea3324a1438',1,'shaka::media::H265VideoSliceHeaderParser::Initialize()'],['../d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html#aa0346189f99b2f0fc2c71da1543155fa',1,'shaka::media::mp2t::PesPacketGenerator::Initialize()'],['../de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html#acfb51e2e6163e7ae3c4fb62bda437466',1,'shaka::media::mp2t::TsSegmenter::Initialize()'],['../de/d64/classshaka_1_1media_1_1mp2t_1_1TsWriter.html#a6bee605be771538f78633e2ecfc979c6',1,'shaka::media::mp2t::TsWriter::Initialize()'],['../d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html#aaf326521fc1d46d31a7a3b94bcf17c24',1,'shaka::media::mp4::Segmenter::Initialize()'],['../de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html#afa6065049fad093b96643b9e3d70595f',1,'shaka::media::webm::Encryptor::Initialize()'],['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#abfde7f995368ea9e91ded9f4980903a6',1,'shaka::media::webm::Segmenter::Initialize()']]], ['initializefragment',['InitializeFragment',['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a126294f104809268975fe04391902ad3',1,'shaka::media::mp4::EncryptingFragmenter::InitializeFragment()'],['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#aa702c2af5ea5096d94f2943076a21e4a',1,'shaka::media::mp4::Fragmenter::InitializeFragment()']]], ['initializewithiv',['InitializeWithIv',['../df/d87/classshaka_1_1media_1_1AesCryptor.html#a41954df34b76b04d561892732dd0ec2f',1,'shaka::media::AesCryptor::InitializeWithIv()'],['../df/d2d/classshaka_1_1media_1_1AesCbcDecryptor.html#a71ff0b9654de96f9990b29c35fa9b7bf',1,'shaka::media::AesCbcDecryptor::InitializeWithIv()'],['../d3/d75/classshaka_1_1media_1_1AesEncryptor.html#a0695df5615cadf6977fdbac978daeffa',1,'shaka::media::AesEncryptor::InitializeWithIv()'],['../d3/dfe/classshaka_1_1media_1_1AesPatternCryptor.html#af878688f0f277f3f6757e85654439c34',1,'shaka::media::AesPatternCryptor::InitializeWithIv()']]], diff --git a/docs/search/all_9.js b/docs/search/all_9.js index ce3be141bf..034fe1e3ea 100644 --- a/docs/search/all_9.js +++ b/docs/search/all_9.js @@ -7,7 +7,7 @@ var searchData= ['kencryptifcryptbyteblockremaining',['kEncryptIfCryptByteBlockRemaining',['../d3/dfe/classshaka_1_1media_1_1AesPatternCryptor.html#a54fd35d7782d3b4948c7eb68387711f0a76b19d202e22b2b0f661f933b47b3b16',1,'shaka::media::AesPatternCryptor']]], ['keyfetcher',['KeyFetcher',['../df/d66/classshaka_1_1media_1_1KeyFetcher.html',1,'shaka::media']]], ['keyrotationfragmenter',['KeyRotationFragmenter',['../d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html',1,'shaka::media::mp4']]], - ['keyrotationfragmenter',['KeyRotationFragmenter',['../d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html#ad0d22ca7f2d0a3d9d9158242394f235c',1,'shaka::media::mp4::KeyRotationFragmenter']]], + ['keyrotationfragmenter',['KeyRotationFragmenter',['../d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html#ab2ad830e0c019f5cdd7f3389ce536a6d',1,'shaka::media::mp4::KeyRotationFragmenter']]], ['keysource',['KeySource',['../d1/d1f/classshaka_1_1media_1_1KeySource.html',1,'shaka::media']]], ['korderinvalid',['kOrderInvalid',['../dc/da6/classshaka_1_1media_1_1ContentEncoding.html#a3ba32d5ca8b0688b2dc6b2ec8a5be6d2',1,'shaka::media::ContentEncoding']]], ['kskipifcryptbyteblockremaining',['kSkipIfCryptByteBlockRemaining',['../d3/dfe/classshaka_1_1media_1_1AesPatternCryptor.html#a54fd35d7782d3b4948c7eb68387711f0a09674e418b61763fdc5cf22c248efd4f',1,'shaka::media::AesPatternCryptor']]] diff --git a/docs/search/all_b.js b/docs/search/all_b.js index 8136911dff..f5d2d5afd3 100644 --- a/docs/search/all_b.js +++ b/docs/search/all_b.js @@ -8,7 +8,7 @@ var searchData= ['mediainformation',['MediaInformation',['../d5/d86/structshaka_1_1media_1_1mp4_1_1MediaInformation.html',1,'shaka::media::mp4']]], ['mediaparser',['MediaParser',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html',1,'shaka::media']]], ['mediasample',['MediaSample',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html',1,'shaka::media']]], - ['mediastream',['MediaStream',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#a86598d6228ab8163d27fb855142c9f73',1,'shaka::media::MediaStream']]], + ['mediastream',['MediaStream',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#a12b0f703395d756a584d78b686b2b99b',1,'shaka::media::MediaStream']]], ['mediastream',['MediaStream',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html',1,'shaka::media']]], ['memoryfile',['MemoryFile',['../d9/dbd/classshaka_1_1media_1_1MemoryFile.html',1,'shaka::media']]], ['metadata',['Metadata',['../dd/df6/structshaka_1_1media_1_1mp4_1_1Metadata.html',1,'shaka::media::mp4']]], diff --git a/docs/search/all_c.js b/docs/search/all_c.js index 8432152eaf..36ae43c0ed 100644 --- a/docs/search/all_c.js +++ b/docs/search/all_c.js @@ -7,7 +7,7 @@ var searchData= ['nalunittobytestreamconverter',['NalUnitToByteStreamConverter',['../d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html',1,'shaka::media']]], ['nalureader',['NaluReader',['../db/d86/classshaka_1_1media_1_1NaluReader.html',1,'shaka::media']]], ['nalureader',['NaluReader',['../db/d86/classshaka_1_1media_1_1NaluReader.html#a2d1611fe3e60fc6570fe0c21e13911b0',1,'shaka::media::NaluReader']]], - ['newsamplecb',['NewSampleCB',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0ac13291317f7d3d9175c4e91e57b891',1,'shaka::media::MediaParser']]], + ['newsamplecb',['NewSampleCB',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a3a1f87fb3ed95a9cbd2b6873326a1a4c',1,'shaka::media::MediaParser']]], ['newsegment',['NewSegment',['../de/d64/classshaka_1_1media_1_1mp2t_1_1TsWriter.html#a9ba30b9cc1e4ae2992735709ae987c64',1,'shaka::media::mp2t::TsWriter']]], ['notifyencryptionupdate',['NotifyEncryptionUpdate',['../d4/d70/classshaka_1_1DashIopMpdNotifier.html#a093eac08e6fdc396e6bbcbc58d35a3c3',1,'shaka::DashIopMpdNotifier::NotifyEncryptionUpdate()'],['../d3/dd0/classshaka_1_1MpdNotifier.html#acf6a0bde4fc907053cc9f1ff9a38b59a',1,'shaka::MpdNotifier::NotifyEncryptionUpdate()'],['../d8/de1/classshaka_1_1SimpleMpdNotifier.html#ae1a1231fb13e0bc97cdea5fc239184bf',1,'shaka::SimpleMpdNotifier::NotifyEncryptionUpdate()']]], ['notifynewcontainer',['NotifyNewContainer',['../d4/d70/classshaka_1_1DashIopMpdNotifier.html#af86163b8fc680ea659e6ba2d2c5d6db7',1,'shaka::DashIopMpdNotifier::NotifyNewContainer()'],['../d3/dd0/classshaka_1_1MpdNotifier.html#ae10c06fe6022a1020fc889de389be430',1,'shaka::MpdNotifier::NotifyNewContainer()'],['../d8/de1/classshaka_1_1SimpleMpdNotifier.html#a3f4aabd86ec08e5ff427120ed39fda29',1,'shaka::SimpleMpdNotifier::NotifyNewContainer()']]], diff --git a/docs/search/all_e.js b/docs/search/all_e.js index f0f2ec475b..361c94cfc1 100644 --- a/docs/search/all_e.js +++ b/docs/search/all_e.js @@ -40,7 +40,7 @@ var searchData= ['protectionsystemspecificheader',['ProtectionSystemSpecificHeader',['../d0/d3c/structshaka_1_1media_1_1mp4_1_1ProtectionSystemSpecificHeader.html',1,'shaka::media::mp4']]], ['protectionsystemspecificinfo',['ProtectionSystemSpecificInfo',['../d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html',1,'shaka::media']]], ['pts',['pts',['../d2/d93/classshaka_1_1media_1_1mp2t_1_1PesPacket.html#a5c02473f77069810be154a13c7cdcc66',1,'shaka::media::mp2t::PesPacket']]], - ['pullsample',['PullSample',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#ae460a9941a4b85d511126d9a2d596f95',1,'shaka::media::MediaStream']]], + ['pullsample',['PullSample',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#aee15b821f0682812a9d631d531ed8101',1,'shaka::media::MediaStream']]], ['push',['Push',['../d7/dda/classshaka_1_1media_1_1ByteQueue.html#acea792e406efe5119cec2e3e522e02c2',1,'shaka::media::ByteQueue::Push()'],['../d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html#a6eaf80daa8c96b0157f5fcd9763dbec1',1,'shaka::media::ProducerConsumerQueue::Push()']]], - ['pushsample',['PushSample',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#ae91f45b0eacab47632f069543b709b58',1,'shaka::media::MediaStream::PushSample()'],['../d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html#a72fdec2c03caf45fe447f61ecd4fd683',1,'shaka::media::mp2t::PesPacketGenerator::PushSample()']]] + ['pushsample',['PushSample',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#ac65da3105afb21a9013f59a217a26b29',1,'shaka::media::MediaStream::PushSample()'],['../d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html#a1a0286c1be09cddc6e8189f4b6b1f544',1,'shaka::media::mp2t::PesPacketGenerator::PushSample()']]] ]; diff --git a/docs/search/functions_0.js b/docs/search/functions_0.js index 83fa2198b2..f6a7860cff 100644 --- a/docs/search/functions_0.js +++ b/docs/search/functions_0.js @@ -17,7 +17,7 @@ var searchData= ['addrepresentation',['AddRepresentation',['../d8/d8e/classshaka_1_1AdaptationSet.html#a124e3c1ba5e3209f3214a556ecae28c3',1,'shaka::AdaptationSet']]], ['addrole',['AddRole',['../d8/d8e/classshaka_1_1AdaptationSet.html#ae96ad89ec7cc7d5ef1db467a9cf13730',1,'shaka::AdaptationSet']]], ['addroleelement',['AddRoleElement',['../d1/de7/classshaka_1_1xml_1_1AdaptationSetXmlNode.html#a2718eede55bb89447a74ff802b95fdb1',1,'shaka::xml::AdaptationSetXmlNode']]], - ['addsample',['AddSample',['../de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html#a5fc925f3324b5cfab955b1fac1f52094',1,'shaka::media::mp2t::TsSegmenter::AddSample()'],['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#afeb03755fa2e6a53376ae5ceb7440021',1,'shaka::media::mp4::EncryptingFragmenter::AddSample()'],['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#a684c1f318ac05e85f4dbf373ea65b7ad',1,'shaka::media::mp4::Fragmenter::AddSample()'],['../d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html#a4a1a9e50050e75584ff1087aa318096a',1,'shaka::media::mp4::Segmenter::AddSample()'],['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#aa15ccabe1a33c660201ef1d8386067e5',1,'shaka::media::webm::Segmenter::AddSample()']]], + ['addsample',['AddSample',['../de/dde/classshaka_1_1media_1_1mp2t_1_1TsSegmenter.html#a16a92ce0a4d60e502135f89c4b7ffc9b',1,'shaka::media::mp2t::TsSegmenter::AddSample()'],['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a47bfcdce7bfcf5884fa805130856c5b4',1,'shaka::media::mp4::EncryptingFragmenter::AddSample()'],['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#a9453ee5952fc923eae502467e50317e2',1,'shaka::media::mp4::Fragmenter::AddSample()'],['../d9/d26/classshaka_1_1media_1_1mp4_1_1Segmenter.html#a7706ce1829da84b1155a2244c22411bf',1,'shaka::media::mp4::Segmenter::AddSample()'],['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#aad137d0ae95d3e47a32725276970e324',1,'shaka::media::webm::Segmenter::AddSample()']]], ['addstream',['AddStream',['../df/d46/classshaka_1_1media_1_1Muxer.html#ad9479d299d1c494604a5f5a052fe8280',1,'shaka::media::Muxer']]], ['addsupplementalproperty',['AddSupplementalProperty',['../dd/db9/classshaka_1_1xml_1_1RepresentationBaseXmlNode.html#a58965505799f01c99768823caeb66a6b',1,'shaka::xml::RepresentationBaseXmlNode']]], ['addtrackinfo',['AddTrackInfo',['../de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html#a866bb619cd0fde0c28ee522cbd4a8c59',1,'shaka::media::webm::Encryptor']]], diff --git a/docs/search/functions_14.js b/docs/search/functions_14.js index 1fa0a454b8..37e084c330 100644 --- a/docs/search/functions_14.js +++ b/docs/search/functions_14.js @@ -1,7 +1,7 @@ var searchData= [ ['waituntilemptyorclosed',['WaitUntilEmptyOrClosed',['../dd/d7c/classshaka_1_1media_1_1IoCache.html#a841a082bfd88280a4ea00ac1a9e64dac',1,'shaka::media::IoCache']]], - ['webmclusterparser',['WebMClusterParser',['../da/de4/classshaka_1_1media_1_1WebMClusterParser.html#a8a7c7e7ac6a5da1cd45ab50f914f6826',1,'shaka::media::WebMClusterParser']]], + ['webmclusterparser',['WebMClusterParser',['../da/de4/classshaka_1_1media_1_1WebMClusterParser.html#a59da447ae099935eaa26f69cfecefc02',1,'shaka::media::WebMClusterParser']]], ['webmlistparser',['WebMListParser',['../dc/dca/classshaka_1_1media_1_1WebMListParser.html#ac228770d1828937f8aa6becec23210e1',1,'shaka::media::WebMListParser']]], ['webmmuxer',['WebMMuxer',['../d3/d73/classshaka_1_1media_1_1webm_1_1WebMMuxer.html#a17b47db217334b2ec328bdbf1a9c7e29',1,'shaka::media::webm::WebMMuxer']]], ['widevinekeysource',['WidevineKeySource',['../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#a93480a98e423d0456482844ac629bd2e',1,'shaka::media::WidevineKeySource']]], diff --git a/docs/search/functions_2.js b/docs/search/functions_2.js index 318c1be430..7e3481059e 100644 --- a/docs/search/functions_2.js +++ b/docs/search/functions_2.js @@ -21,17 +21,17 @@ var searchData= ['convertunittobytestreamwithsubsamples',['ConvertUnitToByteStreamWithSubsamples',['../d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html#a88c2997b4d912ba7caa8066bac417622',1,'shaka::media::NalUnitToByteStreamConverter']]], ['copy',['Copy',['../d3/d61/classshaka_1_1media_1_1File.html#afacdff207ba8359eaa029d8b1414c641',1,'shaka::media::File']]], ['copyfile',['CopyFile',['../d3/d61/classshaka_1_1media_1_1File.html#a1c218b7f815bae0f48800b385ddce67e',1,'shaka::media::File::CopyFile(File *source, File *destination)'],['../d3/d61/classshaka_1_1media_1_1File.html#a9f5ebcd3bdebb7fb02a7a7adf378b344',1,'shaka::media::File::CopyFile(File *source, File *destination, int64_t max_copy)']]], - ['copyfrom',['CopyFrom',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a3fac8e4cc8da3b34ef5f698411ec868b',1,'shaka::media::MediaSample::CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)'],['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a99f83b1803101853aa03bda8f1251e8c',1,'shaka::media::MediaSample::CopyFrom(const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)']]], + ['copyfrom',['CopyFrom',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#ad8975dbb21747ff32c8604f5489bf5c9',1,'shaka::media::MediaSample::CopyFrom(const uint8_t *data, size_t size, bool is_key_frame)'],['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a910e68f46b9464e4ea36cf9cd5116b55',1,'shaka::media::MediaSample::CopyFrom(const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)']]], ['create',['Create',['../d0/dce/classshaka_1_1media_1_1RsaPrivateKey.html#aef45d0014d7971b936ce3d0109935ba8',1,'shaka::media::RsaPrivateKey::Create()'],['../d9/d0c/classshaka_1_1media_1_1RsaPublicKey.html#aabe4a2f1541ca1e741305f58329e3881',1,'shaka::media::RsaPublicKey::Create()']]], ['createandinitializesegmenter',['CreateAndInitializeSegmenter',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#a742824b930ae928f12214a5e350adc64',1,'shaka::media::SegmentTestBase']]], ['createbox',['CreateBox',['../d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html#af9b917cb91b6c10ee7a6f5b41fc7e0d9',1,'shaka::media::ProtectionSystemSpecificInfo']]], - ['createemptymediasample',['CreateEmptyMediaSample',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a59e7bbd2ee8cfa1697093d14d16a6c4d',1,'shaka::media::MediaSample']]], + ['createemptymediasample',['CreateEmptyMediaSample',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a4a7f8d79f9ec3cd3df9a395eef71f0c6',1,'shaka::media::MediaSample']]], ['createencryptor',['CreateEncryptor',['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a4220479b2dd98b462ff4dd4afcf56d0e',1,'shaka::media::mp4::EncryptingFragmenter']]], - ['createeosbuffer',['CreateEOSBuffer',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a925efca004ebbcf3cf71f690a3e43788',1,'shaka::media::MediaSample']]], + ['createeosbuffer',['CreateEOSBuffer',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a236e80a98d7f22ec585bbbf2e91397f5',1,'shaka::media::MediaSample']]], ['createfromhexstrings',['CreateFromHexStrings',['../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#a9a91ba439d785022a1e2ceeaa9ebe81a',1,'shaka::media::FixedKeySource']]], ['createfromkeyandkeyid',['CreateFromKeyAndKeyId',['../d4/da6/classshaka_1_1media_1_1PlayReadyKeySource.html#a4f539e8a54fef68aea5629489669508b',1,'shaka::media::PlayReadyKeySource']]], ['createmuxeroptions',['CreateMuxerOptions',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#a89d5ae5a78134e108a4fe4adb6f79e4e',1,'shaka::media::SegmentTestBase']]], - ['createsample',['CreateSample',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#aa6d43e2cc9d3abe023c037c87807f2ed',1,'shaka::media::SegmentTestBase']]], + ['createsample',['CreateSample',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#afd8845d029698f556ca09436da0c62ef',1,'shaka::media::SegmentTestBase']]], ['createsigner',['CreateSigner',['../d9/d8c/classshaka_1_1media_1_1AesRequestSigner.html#a43f4cc9fad9901fa905805be81f7d58c',1,'shaka::media::AesRequestSigner::CreateSigner()'],['../d7/ddd/classshaka_1_1media_1_1RsaRequestSigner.html#af6af635a7c0a01bb638befb71b88386c',1,'shaka::media::RsaRequestSigner::CreateSigner()']]], ['createvideostreaminfo',['CreateVideoStreamInfo',['../d2/dba/classshaka_1_1media_1_1SegmentTestBase.html#a7e34fd92e43914bd2f032835cdc9b8a7',1,'shaka::media::SegmentTestBase']]], ['crypt',['Crypt',['../df/d87/classshaka_1_1media_1_1AesCryptor.html#ac5fc6e563807e6fce36c2dd43c928b3e',1,'shaka::media::AesCryptor']]], diff --git a/docs/search/functions_4.js b/docs/search/functions_4.js index 06640a7bb4..405b241fe1 100644 --- a/docs/search/functions_4.js +++ b/docs/search/functions_4.js @@ -4,6 +4,6 @@ var searchData= ['empty',['Empty',['../d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html#ad20705b713d6b5ded3312d800740b7ff',1,'shaka::media::ProducerConsumerQueue']]], ['encrypt',['Encrypt',['../d9/d0c/classshaka_1_1media_1_1RsaPublicKey.html#ab9dcf591f3235b8f4eaa02886f9845e3',1,'shaka::media::RsaPublicKey']]], ['encryptedsegmentpmt',['EncryptedSegmentPmt',['../dc/d03/classshaka_1_1media_1_1mp2t_1_1ProgramMapTableWriter.html#a7f40bf474758b80e57fede27c2610756',1,'shaka::media::mp2t::ProgramMapTableWriter::EncryptedSegmentPmt()'],['../de/d27/classshaka_1_1media_1_1mp2t_1_1H264ProgramMapTableWriter.html#a14d7933ee669e7c5daeb8d03f2f0b1d0',1,'shaka::media::mp2t::H264ProgramMapTableWriter::EncryptedSegmentPmt()'],['../d4/dc8/classshaka_1_1media_1_1mp2t_1_1AacProgramMapTableWriter.html#a37616e314cb20775644b9c5e3417f8e5',1,'shaka::media::mp2t::AacProgramMapTableWriter::EncryptedSegmentPmt()']]], - ['encryptframe',['EncryptFrame',['../de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html#a3bfe9e0d99652811cb785832529f3d3c',1,'shaka::media::webm::Encryptor']]], - ['encryptingfragmenter',['EncryptingFragmenter',['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a3c1c1037b7d9e6edf1f476434705c3d5',1,'shaka::media::mp4::EncryptingFragmenter']]] + ['encryptframe',['EncryptFrame',['../de/dfa/classshaka_1_1media_1_1webm_1_1Encryptor.html#a51a014fbe5ff6cfe4fad9e8f92c85561',1,'shaka::media::webm::Encryptor']]], + ['encryptingfragmenter',['EncryptingFragmenter',['../dc/df3/classshaka_1_1media_1_1mp4_1_1EncryptingFragmenter.html#a0203dc3c39c1c9426ab7986ca31036ee',1,'shaka::media::mp4::EncryptingFragmenter']]] ]; diff --git a/docs/search/functions_5.js b/docs/search/functions_5.js index 3baaa5d2dd..3bb8b448f6 100644 --- a/docs/search/functions_5.js +++ b/docs/search/functions_5.js @@ -8,9 +8,9 @@ var searchData= ['finalizesegment',['FinalizeSegment',['../de/d64/classshaka_1_1media_1_1mp2t_1_1TsWriter.html#ae9979f940d7a07127709576aa1f766a1',1,'shaka::media::mp2t::TsWriter']]], ['flush',['Flush',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a26752164d7e8ae6a9a894512291ad9cd',1,'shaka::media::MediaParser::Flush()'],['../d3/d61/classshaka_1_1media_1_1File.html#aba73e887fbfe2de3a679c679ddf03f4b',1,'shaka::media::File::Flush()'],['../d9/de6/classshaka_1_1media_1_1LocalFile.html#ad09f01654ef3109b66e3fb5dd9730516',1,'shaka::media::LocalFile::Flush()'],['../d9/dbd/classshaka_1_1media_1_1MemoryFile.html#abc1d0dc10b8ad719b92959c72c394b64',1,'shaka::media::MemoryFile::Flush()'],['../d0/d66/classshaka_1_1media_1_1ThreadedIoFile.html#a4c8d46b1a16fba8bf4267c0a11fa856e',1,'shaka::media::ThreadedIoFile::Flush()'],['../d7/d7a/classshaka_1_1media_1_1UdpFile.html#a66276fd0b6a7effe314ccd63e223d149',1,'shaka::media::UdpFile::Flush()'],['../d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html#afdb1a88116e3347e67afeb7715847135',1,'shaka::media::mp2t::Mp2tMediaParser::Flush()'],['../d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html#a71ea0819224b94ba9df5c951424bc6b1',1,'shaka::media::mp2t::PesPacketGenerator::Flush()'],['../d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html#a6f26e0d76aeda601fa87190901de27ea',1,'shaka::media::mp4::MP4MediaParser::Flush()'],['../da/de4/classshaka_1_1media_1_1WebMClusterParser.html#ac3d4be1a12667ed722915be727747eee',1,'shaka::media::WebMClusterParser::Flush()'],['../d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html#a6c2d4b5b36304831e637f7ae1b9e54a2',1,'shaka::media::WebMMediaParser::Flush()'],['../dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html#aa666cb1b9ee2ff940d9fc7efda4b50d7',1,'shaka::media::WebVttMediaParser::Flush()'],['../dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html#ac5680e3bd6cdb07fd65af3f39fce999a',1,'shaka::media::wvm::WvmMediaParser::Flush()'],['../d4/d70/classshaka_1_1DashIopMpdNotifier.html#ab3411eb75eedce9a26f0767210280e71',1,'shaka::DashIopMpdNotifier::Flush()'],['../d3/dd0/classshaka_1_1MpdNotifier.html#af8149126f4793506bef385d067561dbf',1,'shaka::MpdNotifier::Flush()'],['../d8/de1/classshaka_1_1SimpleMpdNotifier.html#a8ea622a21a5807775bb2d998fa04658f',1,'shaka::SimpleMpdNotifier::Flush()']]], ['forcesetsegmentalignment',['ForceSetSegmentAlignment',['../d8/d8e/classshaka_1_1AdaptationSet.html#a40532ecbed5f71de85bde0cb7eb1ef9d',1,'shaka::AdaptationSet']]], - ['fragmenter',['Fragmenter',['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#a675d1d98629a3d10f9ef191b9e950a69',1,'shaka::media::mp4::Fragmenter']]], + ['fragmenter',['Fragmenter',['../db/d95/classshaka_1_1media_1_1mp4_1_1Fragmenter.html#a1be96f51fc8ea765aab7142df1bf6006',1,'shaka::media::mp4::Fragmenter']]], ['frequency',['frequency',['../d0/da2/classshaka_1_1media_1_1AACAudioSpecificConfig.html#a10f2acc7fcf3ec9de2fe3598c255786d',1,'shaka::media::AACAudioSpecificConfig']]], ['frombmfftimescale',['FromBMFFTimescale',['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a66c49dfab5316bea5b7b318871aef129',1,'shaka::media::webm::Segmenter']]], - ['frommetadata',['FromMetadata',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a1d23b68125525a019bde262e4c5a46f0',1,'shaka::media::MediaSample']]], + ['frommetadata',['FromMetadata',['../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a8c70ae863851c7a1066923cf387fb178',1,'shaka::media::MediaSample']]], ['fromwebmtimecode',['FromWebMTimecode',['../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a8de27c5b6480f968cbef9eafec3731d7',1,'shaka::media::webm::Segmenter']]] ]; diff --git a/docs/search/functions_6.js b/docs/search/functions_6.js index 3f393f1106..c5a7ae2858 100644 --- a/docs/search/functions_6.js +++ b/docs/search/functions_6.js @@ -8,7 +8,7 @@ var searchData= ['getadtsheadersize',['GetAdtsHeaderSize',['../d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html#a107e1269d5f826583c1940fb50c8cf92',1,'shaka::media::mp2t::AdtsHeader']]], ['getaudiodefaultduration',['GetAudioDefaultDuration',['../d8/d86/classshaka_1_1media_1_1WebMTracksParser.html#a554135ee3a8ad995beeab868c67aba36',1,'shaka::media::WebMTracksParser']]], ['getaudiospecificconfig',['GetAudioSpecificConfig',['../d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html#a5ca14cc4eb4a28906fe832ab263ba5a2',1,'shaka::media::mp2t::AdtsHeader']]], - ['getaudiostreaminfo',['GetAudioStreamInfo',['../d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html#a8a23999bc3e6e88276d3ad62bd81e63f',1,'shaka::media::WebMAudioClient']]], + ['getaudiostreaminfo',['GetAudioStreamInfo',['../d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html#a0fcbddd20199044f860331b3bd9ef3b8',1,'shaka::media::WebMAudioClient']]], ['getcodecstring',['GetCodecString',['../da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html#aee79e7aa61b741bb96f451c6de1c9d42',1,'shaka::media::AudioStreamInfo::GetCodecString()'],['../d6/d57/classshaka_1_1media_1_1AVCDecoderConfigurationRecord.html#a52fbab2c863be9e771eafa20b34b89bc',1,'shaka::media::AVCDecoderConfigurationRecord::GetCodecString() const '],['../d6/d57/classshaka_1_1media_1_1AVCDecoderConfigurationRecord.html#a120f0913aea1e336da1335e80564b106',1,'shaka::media::AVCDecoderConfigurationRecord::GetCodecString(uint8_t profile_indication, uint8_t profile_compatibility, uint8_t avc_level)'],['../d4/d8a/classshaka_1_1media_1_1HEVCDecoderConfigurationRecord.html#ad6b1f9ca644b001ff59c8e8188117f76',1,'shaka::media::HEVCDecoderConfigurationRecord::GetCodecString()'],['../d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html#a86b48fb506b476538a7440d9ccf9a533',1,'shaka::media::VPCodecConfigurationRecord::GetCodecString()']]], ['getcontenttype',['GetContentType',['../d8/daf/namespaceshaka.html#a5ea880937da26d677ff6a48c0219d090',1,'shaka']]], ['getcryptoperiodkey',['GetCryptoPeriodKey',['../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#afa9abf3a9104cbcb4711eac65c8a5bdf',1,'shaka::media::FixedKeySource::GetCryptoPeriodKey()'],['../d1/d1f/classshaka_1_1media_1_1KeySource.html#a18806b962c858e35ed07753687605b16',1,'shaka::media::KeySource::GetCryptoPeriodKey()'],['../d4/da6/classshaka_1_1media_1_1PlayReadyKeySource.html#a4005a0a96024a6918fb9f81a281ca131',1,'shaka::media::PlayReadyKeySource::GetCryptoPeriodKey()'],['../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#ab56a71e9f9f9e545f96e667279c05bb1',1,'shaka::media::WidevineKeySource::GetCryptoPeriodKey()']]], @@ -34,6 +34,6 @@ var searchData= ['getsps',['GetSps',['../de/dc2/classshaka_1_1media_1_1H265Parser.html#ab917855df00b9003c6be4612e2fe0211',1,'shaka::media::H265Parser']]], ['gettotalsizeofsubsamples',['GetTotalSizeOfSubsamples',['../d6/dcb/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry.html#a870ef304f376ec0822686e1d78765bf2',1,'shaka::media::mp4::SampleEncryptionEntry']]], ['gettracktypefromstring',['GetTrackTypeFromString',['../d1/d1f/classshaka_1_1media_1_1KeySource.html#a0963412e7ee33d0e34893ebdf38d96c1',1,'shaka::media::KeySource']]], - ['getvideostreaminfo',['GetVideoStreamInfo',['../d3/d67/classshaka_1_1media_1_1WebMVideoClient.html#a266f4308e70a1b7c1fb2a542284f9bea',1,'shaka::media::WebMVideoClient']]], + ['getvideostreaminfo',['GetVideoStreamInfo',['../d3/d67/classshaka_1_1media_1_1WebMVideoClient.html#ae71e739feadfb8e9207b8ceb9689ca66',1,'shaka::media::WebMVideoClient']]], ['getxml',['GetXml',['../d8/d8e/classshaka_1_1AdaptationSet.html#af988e3a6d8b0d3ede66e3f3aea992d5e',1,'shaka::AdaptationSet::GetXml()'],['../de/d52/classshaka_1_1Representation.html#a606afa5df6a90f49faad0ce427b7e960',1,'shaka::Representation::GetXml()']]] ]; diff --git a/docs/search/functions_9.js b/docs/search/functions_9.js index 231fff8e0b..605dcc2078 100644 --- a/docs/search/functions_9.js +++ b/docs/search/functions_9.js @@ -1,4 +1,4 @@ var searchData= [ - ['keyrotationfragmenter',['KeyRotationFragmenter',['../d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html#ad0d22ca7f2d0a3d9d9158242394f235c',1,'shaka::media::mp4::KeyRotationFragmenter']]] + ['keyrotationfragmenter',['KeyRotationFragmenter',['../d2/d29/classshaka_1_1media_1_1mp4_1_1KeyRotationFragmenter.html#ab2ad830e0c019f5cdd7f3389ce536a6d',1,'shaka::media::mp4::KeyRotationFragmenter']]] ]; diff --git a/docs/search/functions_b.js b/docs/search/functions_b.js index 85b4f8f224..2e40e4452a 100644 --- a/docs/search/functions_b.js +++ b/docs/search/functions_b.js @@ -2,7 +2,7 @@ var searchData= [ ['makepathsrelativetompd',['MakePathsRelativeToMpd',['../dc/da1/classshaka_1_1MpdBuilder.html#a247a9c807274d4e707530f24e2d207f9',1,'shaka::MpdBuilder']]], ['matches',['Matches',['../d0/d93/classshaka_1_1media_1_1Status.html#a2a94b3ef32cf301bbb258c44ca180eba',1,'shaka::media::Status']]], - ['mediastream',['MediaStream',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#a86598d6228ab8163d27fb855142c9f73',1,'shaka::media::MediaStream']]], + ['mediastream',['MediaStream',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#a12b0f703395d756a584d78b686b2b99b',1,'shaka::media::MediaStream']]], ['mp4muxer',['MP4Muxer',['../db/d30/classshaka_1_1media_1_1mp4_1_1MP4Muxer.html#a5b6a878865250e3e17268c011a361497',1,'shaka::media::mp4::MP4Muxer']]], ['mpd_5ftype',['mpd_type',['../d3/dd0/classshaka_1_1MpdNotifier.html#adfb5bc1586cdb7860dd349b3caf25faa',1,'shaka::MpdNotifier']]], ['mpdbuilder',['MpdBuilder',['../dc/da1/classshaka_1_1MpdBuilder.html#ab364102e01afedd8a4dcc9be4fdcc0ab',1,'shaka::MpdBuilder']]], diff --git a/docs/search/functions_e.js b/docs/search/functions_e.js index 0dcb713917..276c8702fe 100644 --- a/docs/search/functions_e.js +++ b/docs/search/functions_e.js @@ -26,7 +26,7 @@ var searchData= ['printerror',['PrintError',['../d8/daf/namespaceshaka.html#a54fadd9c7ef14b39cd0355a5c269c772',1,'shaka']]], ['producerconsumerqueue',['ProducerConsumerQueue',['../d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html#ad7ccb149baa88e5f8356be18344d2baf',1,'shaka::media::ProducerConsumerQueue::ProducerConsumerQueue(size_t capacity)'],['../d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html#a80ff75afdbbf7f567dcb57a755542ffc',1,'shaka::media::ProducerConsumerQueue::ProducerConsumerQueue(size_t capacity, size_t starting_pos)']]], ['pts',['pts',['../d2/d93/classshaka_1_1media_1_1mp2t_1_1PesPacket.html#a5c02473f77069810be154a13c7cdcc66',1,'shaka::media::mp2t::PesPacket']]], - ['pullsample',['PullSample',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#ae460a9941a4b85d511126d9a2d596f95',1,'shaka::media::MediaStream']]], + ['pullsample',['PullSample',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#aee15b821f0682812a9d631d531ed8101',1,'shaka::media::MediaStream']]], ['push',['Push',['../d7/dda/classshaka_1_1media_1_1ByteQueue.html#acea792e406efe5119cec2e3e522e02c2',1,'shaka::media::ByteQueue::Push()'],['../d5/d33/classshaka_1_1media_1_1ProducerConsumerQueue.html#a6eaf80daa8c96b0157f5fcd9763dbec1',1,'shaka::media::ProducerConsumerQueue::Push()']]], - ['pushsample',['PushSample',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#ae91f45b0eacab47632f069543b709b58',1,'shaka::media::MediaStream::PushSample()'],['../d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html#a72fdec2c03caf45fe447f61ecd4fd683',1,'shaka::media::mp2t::PesPacketGenerator::PushSample()']]] + ['pushsample',['PushSample',['../d8/d5c/classshaka_1_1media_1_1MediaStream.html#ac65da3105afb21a9013f59a217a26b29',1,'shaka::media::MediaStream::PushSample()'],['../d5/de0/classshaka_1_1media_1_1mp2t_1_1PesPacketGenerator.html#a1a0286c1be09cddc6e8189f4b6b1f544',1,'shaka::media::mp2t::PesPacketGenerator::PushSample()']]] ]; diff --git a/docs/search/typedefs_0.js b/docs/search/typedefs_0.js index 9055153e22..3cd56767b0 100644 --- a/docs/search/typedefs_0.js +++ b/docs/search/typedefs_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['initcb',['InitCB',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a95d25a50ad371304f1abce9971ce3704',1,'shaka::media::MediaParser']]] + ['initcb',['InitCB',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#aef5795d2b3df2526c6e8afe1e4d072bf',1,'shaka::media::MediaParser']]] ]; diff --git a/docs/search/typedefs_1.js b/docs/search/typedefs_1.js index 68cffc1ccd..7b836cc88a 100644 --- a/docs/search/typedefs_1.js +++ b/docs/search/typedefs_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['newsamplecb',['NewSampleCB',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0ac13291317f7d3d9175c4e91e57b891',1,'shaka::media::MediaParser']]] + ['newsamplecb',['NewSampleCB',['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a3a1f87fb3ed95a9cbd2b6873326a1a4c',1,'shaka::media::MediaParser']]] ];