From d495ebbc1b91e7767a978e7e47380ede73af8f88 Mon Sep 17 00:00:00 2001 From: Widevine Buildbot Date: Thu, 18 Aug 2016 20:58:33 +0000 Subject: [PATCH] Generate SDK documents for commit 336ea5cb34b607d2c292e1b2a826faafd6f514bc --- docs/annotated.html | 2 +- docs/classes.html | 2 +- ...ia_1_1mp4_1_1HandlerReference-members.html | 2 +- ..._1_1media_1_1RsaRequestSigner-members.html | 2 +- docs/d0/d06/mpd__flags_8cc_source.html | 2 +- ...ka_1_1media_1_1HttpKeyFetcher-members.html | 2 +- ...oder__configuration__record_8h_source.html | 2 +- docs/d0/d0e/muxer__options_8h_source.html | 2 +- ...media_1_1mp2t_1_1TsSectionPmt-members.html | 2 +- .../structshaka_1_1media_1_1VPxFrameInfo.html | 2 +- ...H265ByteToUnitStreamConverter-members.html | 2 +- ..._1_1media_1_1mp4_1_1VTTCueBox-members.html | 2 +- ...haka_1_1media_1_1mp2t_1_1TsSectionPat.html | 2 +- .../structshaka_1_1media_1_1MuxerOptions.html | 2 +- .../d0/d30/mock__mpd__notifier_8h_source.html | 2 +- docs/d0/d32/mp2t__common_8h_source.html | 2 +- .../d33/classshaka_1_1MockRepresentation.html | 2 +- docs/d0/d35/es__descriptor_8cc_source.html | 105 +- ...s__notify__muxer__listener_8cc_source.html | 2 +- docs/d0/d3a/webm__constants_8h_source.html | 2 +- ...mp4_1_1ProtectionSystemSpecificHeader.html | 2 +- docs/d0/d42/aes__cryptor_8h_source.html | 2 +- ...idevine__encryption__flags_8cc_source.html | 2 +- docs/d0/d46/fourccs_8h_source.html | 2 +- ...nfo__dump__muxer__listener_8cc_source.html | 2 +- ...ia_1_1mp4_1_1MediaInformation-members.html | 2 +- ...haka_1_1media_1_1AudioTimestampHelper.html | 2 +- .../d4e/libcrypto__threading_8cc_source.html | 2 +- ...a_1_1media_1_1mp2t_1_1TsMuxer-members.html | 2 +- ...dia_1_1MpdNotifyMuxerListener-members.html | 2 +- ...classshaka_1_1media_1_1ThreadedIoFile.html | 2 +- ..._1_1StreamDescriptorCompareFn-members.html | 2 +- ...a_1_1media_1_1mp4_1_1VideoSampleEntry.html | 4 +- ...haka_1_1media_1_1mp4_1_1SampleToGroup.html | 4 +- docs/d0/d7d/decryptor__source_8h_source.html | 2 +- ...a_1_1media_1_1AesCbcEncryptor-members.html | 2 +- ...classshaka_1_1media_1_1Status-members.html | 2 +- .../d0/d93/classshaka_1_1media_1_1Status.html | 2 +- .../structshaka_1_1media_1_1mp4_1_1Movie.html | 4 +- ...ka_1_1media_1_1AACAudioSpecificConfig.html | 2 +- ...aka_1_1media_1_1RequestSigner-members.html | 2 +- ...uctshaka_1_1xml_1_1XmlDeleter-members.html | 2 +- .../d0/da6/stream__descriptor_8cc_source.html | 2 +- ...edia_1_1mp4_1_1SingleSegmentSegmenter.html | 2 +- ...classshaka_1_1media_1_1FixedKeySource.html | 2 +- ...webm_1_1MultiSegmentSegmenter-members.html | 2 +- ...edia_1_1mp4_1_1VTTEmptyCueBox-members.html | 2 +- ..._1xml_1_1AdaptationSetXmlNode-members.html | 2 +- .../classshaka_1_1media_1_1RsaPrivateKey.html | 2 +- ...aka_1_1media_1_1mp4_1_1CueSettingsBox.html | 4 +- ...media_1_1ProtectionSystemSpecificInfo.html | 2 +- .../dd6/webm__crypto__helpers_8cc_source.html | 2 +- ...lassshaka_1_1media_1_1AesCtrEncryptor.html | 2 +- .../dee/segmenter__test__base_8h_source.html | 2 +- docs/d0/df3/packager__util_8cc_source.html | 4 +- ...ia_1_1mp4_1_1AudioSampleEntry-members.html | 2 +- .../d0a/classshaka_1_1media_1_1MkvWriter.html | 10 +- .../d0a/structshaka_1_1media_1_1H264Sps.html | 2 +- ...der__configuration__record_8cc_source.html | 2 +- ...media_1_1mp2t_1_1EsParserH264-members.html | 2 +- docs/d1/d13/status_8h_source.html | 2 +- ...single__segment__segmenter_8cc_source.html | 289 +- docs/d1/d1d/muxer__flags_8cc_source.html | 2 +- .../d1f/classshaka_1_1media_1_1KeySource.html | 2 +- ...1media_1_1mp4_1_1DecodingTimeIterator.html | 2 +- docs/d1/d27/key__fetcher_8h_source.html | 2 +- ..._1media_1_1mp2t_1_1AdtsHeader-members.html | 2 +- docs/d1/d2a/decryptor__source_8cc_source.html | 2 +- ...media_1_1mp4_1_1DataReference-members.html | 2 +- .../structshaka_1_1media_1_1mp4_1_1Box.html | 2 +- .../d2f/webvtt__media__parser_8cc_source.html | 2 +- ...haka_1_1media_1_1mp2t_1_1TsSectionPes.html | 2 +- docs/d1/d31/classshaka_1_1xml_1_1XmlNode.html | 2 +- ...tructshaka_1_1media_1_1SubsampleEntry.html | 2 +- docs/d1/d37/es__parser__h264_8h_source.html | 2 +- .../d3b/mpd__generator__flags_8h_source.html | 2 +- ...shaka_1_1media_1_1mp4_1_1MovieExtends.html | 4 +- .../d40/classshaka_1_1MpdWriter-members.html | 2 +- .../decoding__time__iterator_8cc_source.html | 2 +- .../d1/d48/text__track__config_8h_source.html | 2 +- ...a_1_1media_1_1OffsetByteQueue-members.html | 2 +- ...aka_1_1media_1_1EncryptionKey-members.html | 2 +- ..._1media_1_1mp4_1_1TrackFragmentHeader.html | 4 +- docs/d1/d70/vp8__parser_8cc_source.html | 6 +- docs/d1/d72/language__utils_8cc_source.html | 2 +- .../d74/mp2t__media__parser_8cc_source.html | 2 +- ..._1media_1_1H265VideoSliceHeaderParser.html | 2 +- .../d7d/webm__video__client_8cc_source.html | 2 +- ...ia_1_1H265ReferencePictureSet-members.html | 2 +- docs/d1/d82/adts__constants_8h_source.html | 2 +- ..._1_1media_1_1WebMParserClient-members.html | 2 +- ...1mp4_1_1KeyRotationFragmenter-members.html | 2 +- .../d8e/webm__audio__client_8cc_source.html | 2 +- ...aka_1_1media_1_1H26xBitReader-members.html | 2 +- ...ssshaka_1_1media_1_1ByteQueue-members.html | 2 +- docs/d1/d9d/tracks__builder_8h_source.html | 2 +- ..._1_1mp4_1_1CodecConfiguration-members.html | 2 +- ...assshaka_1_1media_1_1mp4_1_1BoxBuffer.html | 2 +- ...ia_1_1wvm_1_1DemuxStreamIdMediaSample.html | 2 +- ...1NalUnitToByteStreamConverter-members.html | 2 +- ..._1media_1_1VPCodecConfigurationRecord.html | 6 +- ...lassshaka_1_1media_1_1Demuxer-members.html | 2 +- ...a_1_1media_1_1mp4_1_1VideoMediaHeader.html | 4 +- ...oder__configuration__record_8h_source.html | 2 +- docs/d1/dc2/h26x__bit__reader_8h_source.html | 2 +- .../dcb/encrypting__fragmenter_8h_source.html | 4 +- .../dd5/classshaka_1_1media_1_1Cluster.html | 2 +- ...dia_1_1mp4_1_1DataInformation-members.html | 2 +- ...a_1_1media_1_1VideoStreamInfo-members.html | 2 +- ...position__offset__iterator_8cc_source.html | 2 +- ...sshaka_1_1media_1_1KeyFetcher-members.html | 2 +- ...sshaka_1_1xml_1_1AdaptationSetXmlNode.html | 2 +- ...rencePictureListModifications-members.html | 2 +- ..._1_1media_1_1ProgressListener-members.html | 2 +- ...assshaka_1_1media_1_1mp4_1_1BoxReader.html | 2 +- ...tshaka_1_1media_1_1mp4_1_1SampleTable.html | 4 +- docs/d1/df0/aes__encryptor_8h_source.html | 2 +- docs/d1/df3/structshaka_1_1MpdOptions.html | 2 +- docs/d1/df5/nalu__reader_8cc_source.html | 2 +- ...ia_1_1mp4_1_1VideoMediaHeader-members.html | 2 +- docs/d2/d02/timestamp_8h_source.html | 2 +- ...assshaka_1_1media_1_1SeekHead-members.html | 2 +- .../d0f/classshaka_1_1MpdBuilder-members.html | 2 +- ...aka_1_1media_1_1wvm_1_1PrevSampleData.html | 2 +- ...aka_1_1media_1_1MuxerListener-members.html | 2 +- docs/d2/d17/ts__section__pat_8cc_source.html | 2 +- .../d2/d23/threaded__io__file_8cc_source.html | 2 +- docs/d2/d24/packager__util_8h_source.html | 2 +- ...media_1_1mp4_1_1KeyRotationFragmenter.html | 2 +- docs/d2/d30/tracks__builder_8cc_source.html | 2 +- ...ideo__slice__header__parser_8h_source.html | 2 +- ...1_1media_1_1WidevineKeySource-members.html | 2 +- ...1_1mp4_1_1TrackFragmentHeader-members.html | 2 +- ...rogram__map__table__writer_8cc_source.html | 4 +- ...o__byte__stream__converter_8cc_source.html | 2 +- docs/d2/d4d/file_8h_source.html | 14 +- .../d4f/structshaka_1_1Element-members.html | 2 +- ...classshaka_1_1MockMpdNotifier-members.html | 2 +- ...ructshaka_1_1media_1_1H264SliceHeader.html | 2 +- ...ssshaka_1_1media_1_1KeySource-members.html | 2 +- ...assshaka_1_1SimpleMpdNotifier-members.html | 2 +- ...a_1_1H264ModificationOfPicNum-members.html | 2 +- .../d62/simple__mpd__notifier_8h_source.html | 2 +- ...haka_1_1media_1_1mp4_1_1Movie-members.html | 2 +- ...sshaka_1_1media_1_1AesCryptor-members.html | 2 +- docs/d2/d6f/classBandwidthEstimator.html | 2 +- ...ctshaka_1_1media_1_1mp4_1_1SchemeInfo.html | 4 +- ...ssshaka_1_1DashIopMpdNotifier-members.html | 2 +- .../d7b/simple__mpd__notifier_8cc_source.html | 4 +- ...ac__audio__specific__config_8h_source.html | 2 +- ...haka_1_1media_1_1mp4_1_1CuePayloadBox.html | 4 +- ...ls__notify__muxer__listener_8h_source.html | 2 +- ...media_1_1mp4_1_1CuePayloadBox-members.html | 2 +- docs/d2/d92/box__reader_8h_source.html | 2 +- ...ssshaka_1_1media_1_1mp2t_1_1PesPacket.html | 2 +- ...uctshaka_1_1media_1_1StreamDescriptor.html | 2 +- docs/d2/da6/threaded__io__file_8h_source.html | 2 +- docs/d2/da8/mp4_2segmenter_8cc_source.html | 767 +-- ...haka_1_1media_1_1BufferWriter-members.html | 2 +- ...assshaka_1_1MockAdaptationSet-members.html | 2 +- docs/d2/dae/webm__muxer_8cc_source.html | 4 +- ...media_1_1mp4_1_1SampleToGroup-members.html | 2 +- ...a_1_1media_1_1mp4_1_1FileType-members.html | 2 +- ...edia_1_1mp4_1_1CueSourceIDBox-members.html | 2 +- ...lassshaka_1_1media_1_1SegmentTestBase.html | 2 +- ...haka_1_1media_1_1mp4_1_1Track-members.html | 2 +- .../structshaka_1_1MpdOptions-members.html | 2 +- ...program__map__table__writer_8h_source.html | 2 +- ...a_1_1media_1_1mp4_1_1EditList-members.html | 2 +- ...edia_1_1webm_1_1MultiSegmentSegmenter.html | 2 +- docs/d2/dd6/mkv__writer_8h_source.html | 4 +- ...lassshaka_1_1media_1_1WebMMediaParser.html | 2 +- ...haka_1_1media_1_1mp2t_1_1TsSectionPmt.html | 2 +- docs/d2/de6/packager__main_8cc_source.html | 1092 ++-- ...ka_1_1media_1_1TextStreamInfo-members.html | 2 +- ...shaka_1_1media_1_1mp4_1_1Edit-members.html | 2 +- .../de9/mock__muxer__listener_8h_source.html | 2 +- docs/d2/deb/es__parser_8h_source.html | 2 +- ...media_1_1mp2t_1_1TsSectionPes-members.html | 2 +- .../pes__packet__generator_8cc_source.html | 2 +- ...a_1_1SegmentTestBase_1_1ClusterParser.html | 2 +- ...ssshaka_1_1media_1_1MkvWriter-members.html | 4 +- docs/d2/dfd/adts__header_8h_source.html | 2 +- ..._1_1media_1_1mp4_1_1BoxReader-members.html | 2 +- ..._1_1mp4_1_1SyncSampleIterator-members.html | 2 +- .../classshaka_1_1media_1_1MediaParser.html | 2 +- ...sshaka_1_1media_1_1mp2t_1_1AdtsHeader.html | 2 +- ..._1media_1_1LibcryptoThreading-members.html | 2 +- docs/d3/d15/udp__file__win_8cc_source.html | 2 +- ...media_1_1mp2t_1_1TsSectionPat-members.html | 2 +- docs/d3/d19/io__cache_8h_source.html | 2 +- ...deo__slice__header__parser_8cc_source.html | 2 +- ...uctshaka_1_1media_1_1mp4_1_1PrivFrame.html | 2 +- ...sshaka_1_1media_1_1LibcryptoThreading.html | 2 +- docs/d3/d56/decrypt__config_8cc_source.html | 2 +- docs/d3/d61/classshaka_1_1media_1_1File.html | 18 +- .../d3/d62/continuity__counter_8h_source.html | 2 +- docs/d3/d62/rcheck_8h_source.html | 2 +- ...1media_1_1mp4_1_1DataEntryUrl-members.html | 2 +- ...lassshaka_1_1media_1_1WebMVideoClient.html | 2 +- .../d3/d6b/fixed__key__source_8cc_source.html | 2 +- ...lassshaka_1_1media_1_1mp2t_1_1TsMuxer.html | 2 +- docs/d3/d72/fixed__key__source_8h_source.html | 2 +- ...ssshaka_1_1media_1_1webm_1_1WebMMuxer.html | 2 +- .../classshaka_1_1media_1_1AesEncryptor.html | 2 +- ...a_1_1mp4_1_1ChunkInfoIterator-members.html | 2 +- docs/d3/d76/muxer__flags_8h_source.html | 2 +- ...dia_1_1mp4_1_1TextSampleEntry-members.html | 2 +- ...haka_1_1media_1_1RsaPublicKey-members.html | 2 +- ...lassshaka_1_1media_1_1WebMAudioClient.html | 2 +- docs/d3/d80/muxer__util_8h_source.html | 2 +- ...haka_1_1media_1_1mp4_1_1SampleToChunk.html | 4 +- .../structshaka_1_1media_1_1FileCloser.html | 2 +- .../d3/d8d/webm__audio__client_8h_source.html | 2 +- docs/d3/d90/ec3__audio__util_8cc_source.html | 2 +- .../classshaka_1_1media_1_1H264Parser.html | 2 +- docs/d3/da0/ec3__audio__util_8h_source.html | 2 +- ...dia_1_1webm_1_1SingleSegmentSegmenter.html | 2 +- ...ctshaka_1_1media_1_1mp4_1_1SchemeType.html | 2 +- .../structshaka_1_1media_1_1mp4_1_1ID3v2.html | 4 +- ..._1_1media_1_1WebMWebVTTParser-members.html | 2 +- .../structshaka_1_1media_1_1mp4_1_1Track.html | 4 +- docs/d3/db6/webm__parser_8cc_source.html | 2 +- docs/d3/dbc/seek__head_8cc_source.html | 2 +- docs/d3/dbe/demuxer_8cc_source.html | 2 +- ...ructshaka_1_1media_1_1mp4_1_1EditList.html | 4 +- ...a_1_1media_1_1mp2t_1_1Mp2tMediaParser.html | 2 +- docs/d3/dd0/classshaka_1_1MpdNotifier.html | 2 +- ...tshaka_1_1media_1_1mp4_1_1SegmentType.html | 2 +- docs/d3/de4/seek__head_8h_source.html | 2 +- ..._1_1media_1_1mp4_1_1BoxBuffer-members.html | 2 +- ...mp4_1_1SampleGroupDescription-members.html | 2 +- docs/d3/df1/box__reader_8cc_source.html | 2 +- ...ssshaka_1_1media_1_1AesPatternCryptor.html | 2 +- ...2multi__segment__segmenter_8cc_source.html | 6 +- ...edia_1_1mp4_1_1MP4MediaParser-members.html | 2 +- .../d0b/classshaka_1_1media_1_1TextTrack.html | 2 +- ...1_1media_1_1WebVttMediaParser-members.html | 2 +- ...haka_1_1media_1_1mp4_1_1EditListEntry.html | 2 +- ...lassshaka_1_1media_1_1AesCbcEncryptor.html | 2 +- ...ia_1_1mp4_1_1ChunkLargeOffset-members.html | 2 +- ...haka_1_1media_1_1mp4_1_1ID3v2-members.html | 2 +- ...1media_1_1mp4_1_1WebVTTSourceLabelBox.html | 4 +- docs/d4/d37/io__cache_8cc_source.html | 2 +- ...ructshaka_1_1media_1_1H264Sps-members.html | 2 +- ...pleAuxiliaryInformationOffset-members.html | 2 +- ...haka_1_1media_1_1H264WeightingFactors.html | 2 +- .../classshaka_1_1media_1_1Nalu-members.html | 2 +- ...assshaka_1_1media_1_1WebMWebVTTParser.html | 2 +- ...aka_1_1media_1_1DecryptConfig-members.html | 2 +- ...lassshaka_1_1media_1_1UdpFile-members.html | 2 +- .../d70/classshaka_1_1DashIopMpdNotifier.html | 2 +- .../structshaka_1_1SegmentInfo-members.html | 2 +- docs/d4/d87/nalu__reader_8h_source.html | 2 +- ...dia_1_1HEVCDecoderConfigurationRecord.html | 2 +- ...tshaka_1_1media_1_1mp4_1_1EC3Specific.html | 4 +- .../da7/segmenter__test__base_8cc_source.html | 4 +- ...a_1_1media_1_1mp4_1_1SampleEncryption.html | 16 +- ...a_1_1mp4_1_1CompactSampleSize-members.html | 2 +- docs/d4/db2/cluster__builder_8h_source.html | 2 +- .../db4/classshaka_1_1MpdNotifierFactory.html | 2 +- ...tshaka_1_1media_1_1mp4_1_1MediaHeader.html | 4 +- ...a_1_1mp2t_1_1AacProgramMapTableWriter.html | 2 +- docs/d4/dd3/bit__reader_8h_source.html | 117 +- ...ka_1_1media_1_1mp4_1_1FullBox-members.html | 2 +- ...sshaka_1_1media_1_1MemoryFile-members.html | 2 +- docs/d4/dde/webvtt__util_8h_source.html | 2 +- ...haka_1_1media_1_1mp4_1_1DataReference.html | 4 +- ...assshaka_1_1media_1_1ProgressListener.html | 2 +- ...VodMediaInfoDumpMuxerListener-members.html | 2 +- docs/d4/dec/hls__flags_8h_source.html | 2 +- docs/d4/df5/request__signer_8cc_source.html | 2 +- ...shaka_1_1media_1_1mp4_1_1SegmentIndex.html | 4 +- ...tshaka_1_1media_1_1mp4_1_1AC3Specific.html | 4 +- .../dfd/structshaka_1_1media_1_1H265Sps.html | 2 +- .../dff/webm__media__parser_8cc_source.html | 2 +- ...ructshaka_1_1media_1_1mp4_1_1FileType.html | 2 +- ...aka_1_1media_1_1mp4_1_1OriginalFormat.html | 2 +- ...ructshaka_1_1media_1_1mp4_1_1CueIDBox.html | 4 +- ...ka_1_1media_1_1WebMInfoParser-members.html | 2 +- ..._1_1mp4_1_1ElementaryStreamDescriptor.html | 4 +- .../classshaka_1_1media_1_1ESDescriptor.html | 2 +- .../producer__consumer__queue_8h_source.html | 2 +- docs/d5/d1a/ts__section_8h_source.html | 2 +- ...ia_1_1mp4_1_1TrackRunIterator-members.html | 2 +- docs/d5/d27/key__fetcher_8cc_source.html | 2 +- ...aka_1_1media_1_1ProducerConsumerQueue.html | 2 +- ...haka_1_1media_1_1mp4_1_1Media-members.html | 2 +- ...2single__segment__segmenter_8h_source.html | 2 +- ...media_1_1mp2t_1_1TsSectionPsi-members.html | 2 +- docs/d5/d4d/box_8cc_source.html | 2 +- docs/d5/d52/ts__section__pes_8h_source.html | 2 +- ...ampleAuxiliaryInformationSize-members.html | 2 +- ...esentationStateChangeListener-members.html | 2 +- ...ssshaka_1_1MockRepresentation-members.html | 2 +- .../d5c/continuity__counter_8cc_source.html | 2 +- ...haka_1_1media_1_1mp2t_1_1EsParserH265.html | 2 +- docs/d5/d63/network__util_8cc_source.html | 2 +- ...media_1_1NalUnitToByteStreamConverter.html | 2 +- docs/d5/d6f/vlog__flags_8cc_source.html | 2 +- ...der__configuration__record_8cc_source.html | 2 +- docs/d5/d7b/box__definitions_8h_source.html | 10 +- ...a_1_1media_1_1mp4_1_1MediaInformation.html | 4 +- .../d89/widevine__key__source_8cc_source.html | 2 +- ..._1_1media_1_1mp4_1_1CompositionOffset.html | 2 +- .../d8f/webm__cluster__parser_8cc_source.html | 2 +- docs/d5/d91/es__parser__adts_8cc_source.html | 2 +- ...media_1_1mp4_1_1EditListEntry-members.html | 2 +- docs/d5/d98/encryptor_8cc_source.html | 2 +- ...odec__configuration__record_8h_source.html | 6 +- ...H265ReferencePictureListModifications.html | 2 +- docs/d5/da4/aes__encryptor_8cc_source.html | 2 +- ...a_1_1media_1_1H265ReferencePictureSet.html | 2 +- .../classshaka_1_1media_1_1StreamInfo.html | 2 +- ...haka_1_1media_1_1mp2t_1_1EsParserH264.html | 2 +- docs/d5/dba/ts__packet_8cc_source.html | 2 +- .../dc1/webm__webvtt__parser_8cc_source.html | 2 +- ...media_1_1mp4_1_1TrackFragment-members.html | 2 +- ...4_1_1SampleAuxiliaryInformationOffset.html | 2 +- docs/d5/dcf/rsa__key_8h_source.html | 2 +- docs/d5/dda/ts__section__psi_8h_source.html | 2 +- docs/d5/de0/bit__reader_8cc_source.html | 2 +- ..._1media_1_1mp2t_1_1PesPacketGenerator.html | 2 +- ...assshaka_1_1media_1_1WebMParserClient.html | 2 +- ...der__configuration__record_8cc_source.html | 2 +- ...mp4_1_1WebVTTConfigurationBox-members.html | 2 +- docs/d5/def/ts__section__pmt_8h_source.html | 2 +- ...ka_1_1media_1_1HlsNotifyMuxerListener.html | 2 +- ...shaka_1_1media_1_1MediaParser-members.html | 2 +- docs/d5/dfc/file_8cc_source.html | 491 +- ...a_1_1media_1_1AesCbcDecryptor-members.html | 2 +- .../d09/aes__pattern__cryptor_8h_source.html | 2 +- .../d6/d16/text__stream__info_8cc_source.html | 2 +- docs/d6/d17/es__parser__h264_8cc_source.html | 2 +- ...tshaka_1_1media_1_1mp4_1_1MovieHeader.html | 4 +- .../ts__packet__writer__util_8cc_source.html | 2 +- ...1_1media_1_1VideoStreamInfoParameters.html | 2 +- .../d2e/mpd__notifier__util_8cc_source.html | 4 +- ...ssshaka_1_1media_1_1TextTrack-members.html | 2 +- .../webm__content__encodings_8cc_source.html | 2 +- .../d3b/chunk__info__iterator_8cc_source.html | 2 +- .../encrypting__fragmenter_8cc_source.html | 422 +- ...2multi__segment__segmenter_8cc_source.html | 4 +- docs/d6/d55/aes__cryptor_8cc_source.html | 2 +- ...edia_1_1AVCDecoderConfigurationRecord.html | 2 +- ...ion__system__specific__info_8h_source.html | 2 +- ...1_1VPCodecConfigurationRecord-members.html | 2 +- docs/d6/d6c/h26x__bit__reader_8cc_source.html | 2 +- docs/d6/d6e/ts__section__pes_8cc_source.html | 2 +- docs/d6/d71/scoped__xml__ptr_8h_source.html | 2 +- .../dash__iop__mpd__notifier_8h_source.html | 2 +- ...1media_1_1mp4_1_1VTTAdditionalTextBox.html | 4 +- .../d7b/webm__tracks__parser_8h_source.html | 2 +- ..._1media_1_1mp4_1_1AC3Specific-members.html | 2 +- .../d86/bandwidth__estimator_8cc_source.html | 2 +- docs/d6/d8a/vp9__parser_8cc_source.html | 6 +- ..._1_1RepresentationBaseXmlNode-members.html | 2 +- docs/d6/d9b/h264__parser_8h_source.html | 2 +- docs/d6/d9f/hls__flags_8cc_source.html | 2 +- docs/d6/da0/ts__section__pat_8h_source.html | 2 +- docs/d6/da3/mpd__builder_8h_source.html | 52 +- ...AVCDecoderConfigurationRecord-members.html | 2 +- ...iceHeader_1_1LongTermPicsInfo-members.html | 2 +- .../da9/classshaka_1_1media_1_1BitReader.html | 11 +- ...uctshaka_1_1media_1_1mp4_1_1VTTCueBox.html | 4 +- ...shaka_1_1media_1_1MediaStream-members.html | 2 +- ...lassshaka_1_1media_1_1VideoStreamInfo.html | 2 +- ..._1_1VideoStreamInfoParameters-members.html | 2 +- ...media_1_1mp2t_1_1EsParserH26x-members.html | 2 +- docs/d6/dc8/mkv__writer_8cc_source.html | 6 +- ...media_1_1mp4_1_1SampleEncryptionEntry.html | 2 +- ...ssshaka_1_1media_1_1VP9Parser-members.html | 2 +- ...ia_1_1mp4_1_1SegmentReference-members.html | 2 +- ...haka_1_1media_1_1mp2t_1_1EsParserAdts.html | 2 +- ...tructshaka_1_1media_1_1H264SEIMessage.html | 2 +- ...1_1media_1_1H265VuiParameters-members.html | 2 +- ...1_1media_1_1mp4_1_1CueTimeBox-members.html | 2 +- ...haka_1_1media_1_1VPxFrameInfo-members.html | 2 +- docs/d6/de8/local__file_8cc_source.html | 196 +- docs/d6/de8/network__util_8h_source.html | 2 +- docs/d6/de9/ts__segmenter_8cc_source.html | 4 +- docs/d6/ded/ts__packet_8h_source.html | 2 +- .../sync__sample__iterator_8cc_source.html | 2 +- docs/d6/dff/classshaka_1_1media_1_1Nalu.html | 2 +- ...edia_1_1mp4_1_1SampleGroupDescription.html | 4 +- ...a_1_1media_1_1mp4_1_1SoundMediaHeader.html | 4 +- ...xer__listener__test__helper_8h_source.html | 2 +- docs/d7/d12/media__parser_8h_source.html | 2 +- docs/d7/d15/mpd__notifier_8h_source.html | 2 +- ...ia_1_1mp4_1_1VideoSampleEntry-members.html | 2 +- .../d22/libcrypto__threading_8h_source.html | 2 +- ...1_1media_1_1mp4_1_1SyncSampleIterator.html | 2 +- ...ructshaka_1_1media_1_1H265Sps-members.html | 2 +- ...p4_1_1CompositionTimeToSample-members.html | 2 +- ...a_1_1media_1_1ContentEncoding-members.html | 2 +- ...on__system__specific__info_8cc_source.html | 2 +- ...ctshaka_1_1media_1_1mp4_1_1SampleSize.html | 4 +- ...ia_1_1mp4_1_1SampleEncryption-members.html | 4 +- ...ka_1_1media_1_1WebMListParser-members.html | 2 +- ...H26xByteToUnitStreamConverter-members.html | 2 +- ...lassshaka_1_1media_1_1DecryptorSource.html | 2 +- .../classshaka_1_1media_1_1MediaSample.html | 2 +- ..._1media_1_1mp4_1_1MediaHeader-members.html | 2 +- ...ka_1_1media_1_1H264SEIMessage-members.html | 2 +- .../d7a/classshaka_1_1media_1_1UdpFile.html | 2 +- docs/d7/d7c/vlog__flags_8h_source.html | 2 +- .../d7/d87/video__stream__info_8h_source.html | 2 +- ..._1H265SliceHeader_1_1LongTermPicsInfo.html | 2 +- docs/d7/d9d/progress__listener_8h_source.html | 2 +- .../da4/track__run__iterator_8h_source.html | 2 +- ...uctshaka_1_1media_1_1mp4_1_1MediaData.html | 4 +- docs/d7/db0/mpd__writer_8h_source.html | 2 +- ...media_1_1mp4_1_1SampleToChunk-members.html | 2 +- ...ka_1_1media_1_1mp4_1_1TextSampleEntry.html | 4 +- docs/d7/dc6/byte__queue_8h_source.html | 2 +- .../d7/dd0/mpd__notifier__util_8h_source.html | 2 +- docs/d7/dd4/request__signer_8h_source.html | 2 +- ...aka_1_1media_1_1mp4_1_1MP4MediaParser.html | 2 +- docs/d7/dd6/key__source_8cc_source.html | 2 +- .../dda/classshaka_1_1media_1_1ByteQueue.html | 2 +- ...assshaka_1_1media_1_1RsaRequestSigner.html | 2 +- ...classshaka_1_1media_1_1HttpKeyFetcher.html | 2 +- ...1_1media_1_1mp4_1_1SampleToGroupEntry.html | 2 +- ...to__unit__stream__converter_8h_source.html | 2 +- docs/d7/dee/mpd__generator_8cc_source.html | 203 +- .../d7/def/mp4__media__parser_8cc_source.html | 4 +- docs/d7/df9/byte__queue_8cc_source.html | 2 +- ...edia_1_1H264ByteToUnitStreamConverter.html | 2 +- ...1_1media_1_1WebMClusterParser-members.html | 2 +- ..._1_1media_1_1mp2t_1_1TsWriter-members.html | 2 +- ..._1media_1_1mp4_1_1MovieHeader-members.html | 2 +- docs/d8/d0d/media__sample_8cc_source.html | 2 +- ...shaka_1_1media_1_1mp4_1_1DecodingTime.html | 2 +- ..._1_1media_1_1mp4_1_1PrivFrame-members.html | 2 +- ...ssshaka_1_1media_1_1BitReader-members.html | 11 +- .../d14/classshaka_1_1media_1_1VP8Parser.html | 2 +- ...haka_1_1media_1_1MuxerOptions-members.html | 2 +- .../d19/bandwidth__estimator_8h_source.html | 2 +- ...edia_1_1mp4_1_1WebVTTConfigurationBox.html | 4 +- ...ka_1_1media_1_1SubsampleEntry-members.html | 2 +- docs/d8/d28/es__parser__h265_8h_source.html | 2 +- ..._content__encodings__client_8h_source.html | 2 +- ...1_1media_1_1StreamDescriptorCompareFn.html | 2 +- docs/d8/d4d/aes__decryptor_8h_source.html | 2 +- ...a_1_1media_1_1mp4_1_1AudioSampleEntry.html | 4 +- .../classshaka_1_1media_1_1MediaStream.html | 2 +- ...ka_1_1media_1_1ClusterBuilder-members.html | 2 +- ...ka_1_1media_1_1mp4_1_1DataInformation.html | 4 +- ...a_1_1media_1_1mp4_1_1Metadata-members.html | 2 +- .../classshaka_1_1media_1_1TracksBuilder.html | 2 +- ...assshaka_1_1media_1_1WebMTracksParser.html | 2 +- ...1media_1_1mp4_1_1MovieExtends-members.html | 2 +- docs/d8/d8e/classshaka_1_1AdaptationSet.html | 24 +- ...a_1_1media_1_1AesCtrEncryptor-members.html | 2 +- ..._1_1media_1_1AesRequestSigner-members.html | 2 +- ...media_1_1H264DecRefPicMarking-members.html | 2 +- ...1_1mp4_1_1SubtitleMediaHeader-members.html | 2 +- docs/d8/d94/adts__constants_8cc_source.html | 2 +- docs/d8/d94/pes__packet_8h_source.html | 2 +- ..._1mp4_1_1VTTAdditionalTextBox-members.html | 2 +- docs/d8/d9a/fragmenter_8cc_source.html | 2 +- .../d9c/webm__tracks__parser_8cc_source.html | 2 +- docs/d8/d9f/udp__file_8h_source.html | 2 +- ...a_1_1media_1_1DecryptorSource-members.html | 2 +- ...1_1media_1_1mp4_1_1SampleSize-members.html | 2 +- ...sshaka_1_1media_1_1NaluReader-members.html | 2 +- docs/d8/daa/stream__info_8h_source.html | 2 +- docs/d8/daf/namespaceshaka.html | 2 +- ...media_1_1mp4_1_1MultiSegmentSegmenter.html | 2 +- ...1_1WebMContentEncodingsClient-members.html | 2 +- ...ctshaka_1_1media_1_1mp4_1_1CueTimeBox.html | 4 +- docs/d8/dca/ts__writer_8h_source.html | 2 +- ...1media_1_1mp4_1_1DecodingTime-members.html | 2 +- ...1media_1_1mp4_1_1TrackExtends-members.html | 2 +- ...1_1media_1_1mp2t_1_1ContinuityCounter.html | 2 +- ...1mp4_1_1CencSampleEncryptionInfoEntry.html | 2 +- .../de1/classshaka_1_1SimpleMpdNotifier.html | 2 +- .../de6/webm__crypto__helpers_8h_source.html | 2 +- ..._1_1media_1_1mp2t_1_1EsParser-members.html | 2 +- ...media_1_1AudioTimestampHelper-members.html | 2 +- ...ssshaka_1_1media_1_1VPxParser-members.html | 2 +- ...single__segment__segmenter_8cc_source.html | 4 +- ...a_1_1media_1_1SegmentTestBase-members.html | 2 +- ...to__byte__stream__converter_8h_source.html | 2 +- ...media_1_1OnMediaEndParameters-members.html | 2 +- ...2single__segment__segmenter_8h_source.html | 2 +- docs/d9/d08/mock__mpd__builder_8h_source.html | 28 +- ...dia_1_1HlsNotifyMuxerListener-members.html | 2 +- .../classshaka_1_1media_1_1RsaPublicKey.html | 2 +- .../classshaka_1_1media_1_1BufferReader.html | 2 +- .../key__rotation__fragmenter_8cc_source.html | 31 +- ...haka_1_1media_1_1mp4_1_1MovieFragment.html | 4 +- ...haka_1_1media_1_1AesEncryptor-members.html | 2 +- ...assshaka_1_1media_1_1mp4_1_1Segmenter.html | 10 +- ...aka_1_1media_1_1TracksBuilder-members.html | 2 +- .../classshaka_1_1media_1_1File-members.html | 2 +- .../webm__content__encodings_8h_source.html | 2 +- ...aka_1_1media_1_1mp4_1_1VTTEmptyCueBox.html | 4 +- ...aka_1_1media_1_1mp4_1_1CueSourceIDBox.html | 4 +- ..._1_1media_1_1mp4_1_1ChunkInfoIterator.html | 2 +- ...media_1_1mp2t_1_1EsParserAdts-members.html | 2 +- ...ctshaka_1_1media_1_1H265VuiParameters.html | 2 +- ...a_1_1media_1_1H264SliceHeader-members.html | 2 +- docs/d9/d76/ts__muxer_8cc_source.html | 2 +- ...aka_1_1media_1_1ClosureThread-members.html | 2 +- docs/d9/d86/limits_8h_source.html | 2 +- ..._1media_1_1WebMContentEncodingsClient.html | 2 +- ...assshaka_1_1media_1_1AesRequestSigner.html | 2 +- ...1ProtectionSystemSpecificInfo-members.html | 2 +- docs/d9/d90/text__track_8h_source.html | 2 +- docs/d9/d93/media__stream_8h_source.html | 2 +- docs/d9/da4/stream__descriptor_8h_source.html | 2 +- ...ka_1_1media_1_1MpdNotifyMuxerListener.html | 2 +- .../structshaka_1_1media_1_1Cue-members.html | 2 +- ..._1_1media_1_1mp4_1_1Segmenter-members.html | 2 +- ..._1_1CompositionOffsetIterator-members.html | 2 +- ...ntent__protection__element_8cc_source.html | 2 +- docs/d9/db9/muxer_8cc_source.html | 2 +- .../classshaka_1_1media_1_1MemoryFile.html | 2 +- ...haka_1_1media_1_1BufferReader-members.html | 2 +- ...1mp4_1_1SampleEncryptionEntry-members.html | 2 +- docs/d9/dc8/webm__constants_8cc_source.html | 2 +- .../d9/dcc/webm__video__client_8h_source.html | 2 +- .../muxer__listener__internal_8cc_source.html | 2 +- .../de6/classshaka_1_1media_1_1LocalFile.html | 20 +- ...ka_1_1media_1_1FixedKeySource-members.html | 2 +- ...c__audio__specific__config_8cc_source.html | 8 +- ...p4_1_1TrackFragmentDecodeTime-members.html | 2 +- ...lassshaka_1_1media_1_1OffsetByteQueue.html | 2 +- ..._1_1media_1_1H264ModificationOfPicNum.html | 2 +- .../d04/audio__stream__info_8cc_source.html | 2 +- ...assshaka_1_1media_1_1mp2t_1_1EsParser.html | 2 +- ...ructshaka_1_1media_1_1mp4_1_1Language.html | 2 +- ...ssshaka_1_1media_1_1mp2t_1_1TsSection.html | 2 +- .../key__rotation__fragmenter_8h_source.html | 4 +- ...haka_1_1media_1_1mp2t_1_1EsParserH26x.html | 2 +- docs/da/d23/ts__muxer_8h_source.html | 2 +- docs/da/d24/h265__parser_8h_source.html | 2 +- docs/da/d2a/text__stream__info_8h_source.html | 2 +- ...1_1media_1_1webm_1_1WebMMuxer-members.html | 2 +- ...ia_1_1mp4_1_1PixelAspectRatio-members.html | 2 +- ..._2multi__segment__segmenter_8h_source.html | 2 +- ...ructshaka_1_1ContentProtectionElement.html | 2 +- ...lassshaka_1_1media_1_1AudioStreamInfo.html | 2 +- ...1_1media_1_1mp4_1_1MovieExtendsHeader.html | 4 +- docs/da/d53/es__parser__h265_8cc_source.html | 2 +- ..._1_1media_1_1mp4_1_1CompactSampleSize.html | 4 +- .../d5c/widevine__key__source_8h_source.html | 2 +- ...1_1H264VideoSliceHeaderParser-members.html | 2 +- ...mp4_1_1SingleSegmentSegmenter-members.html | 2 +- ..._1_1H264ProgramMapTableWriter-members.html | 2 +- ...edia_1_1mp4_1_1AudioRollRecoveryEntry.html | 2 +- ...xed__key__encryption__flags_8h_source.html | 2 +- ...1media_1_1mp2t_1_1TsSegmenter-members.html | 2 +- docs/da/d88/mp4__muxer_8cc_source.html | 8 +- ...a_1_1media_1_1WebMMediaParser-members.html | 2 +- docs/da/d8e/container__names_8cc_source.html | 2 +- ...a_1_1mp4_1_1CompositionOffset-members.html | 2 +- ..._1media_1_1mp4_1_1EC3Specific-members.html | 2 +- ...ssshaka_1_1MpdNotifierFactory-members.html | 2 +- ...1_1media_1_1MockMuxerListener-members.html | 2 +- ...assshaka_1_1media_1_1mp2t_1_1TsPacket.html | 2 +- .../classshaka_1_1Representation-members.html | 2 +- ...a_1_1media_1_1mp4_1_1HandlerReference.html | 4 +- docs/da/dc3/status_8cc_source.html | 2 +- ...tshaka_1_1media_1_1mp4_1_1TrackHeader.html | 4 +- docs/da/dcb/es__descriptor_8h_source.html | 2 +- .../structshaka_1_1media_1_1mp4_1_1Edit.html | 4 +- docs/da/dd0/webm__info__parser_8h_source.html | 2 +- docs/da/dd1/fragmenter_8h_source.html | 2 +- ..._1_1media_1_1mp2t_1_1TsPacket-members.html | 2 +- ...H264ByteToUnitStreamConverter-members.html | 2 +- ...ia_1_1mp2t_1_1Mp2tMediaParser-members.html | 2 +- ...media_1_1H264SEIRecoveryPoint-members.html | 2 +- ...ssshaka_1_1media_1_1WidevineKeySource.html | 2 +- ...a_1_1mp4_1_1SampleDescription-members.html | 2 +- .../da/de2/mock__mpd__builder_8cc_source.html | 2 +- ...ssshaka_1_1media_1_1WebMClusterParser.html | 2 +- ...1_1media_1_1mp4_1_1SchemeType-members.html | 2 +- ...a_1_1media_1_1AudioStreamInfo-members.html | 2 +- ...1media_1_1mp4_1_1ProtectionSchemeInfo.html | 4 +- ..._1media_1_1H264VideoSliceHeaderParser.html | 2 +- docs/da/df4/aes__decryptor_8cc_source.html | 2 +- ..._1_1media_1_1mp4_1_1SampleDescription.html | 4 +- ...1_1media_1_1AesPatternCryptor-members.html | 2 +- ...ructshaka_1_1media_1_1H265SliceHeader.html | 2 +- ...1_1media_1_1mp4_1_1CodecConfiguration.html | 4 +- ...sshaka_1_1media_1_1H265Parser-members.html | 2 +- ...media_1_1H264WeightingFactors-members.html | 2 +- ..._1media_1_1mp4_1_1SubtitleMediaHeader.html | 4 +- ...lassshaka_1_1media_1_1mp4_1_1MP4Muxer.html | 2 +- ...to__unit__stream__converter_8h_source.html | 2 +- .../d31/track__run__iterator_8cc_source.html | 6 +- ...1_1mp2t_1_1PesPacketGenerator-members.html | 2 +- ...dia_1_1VideoSliceHeaderParser-members.html | 2 +- ...pd__notify__muxer__listener_8h_source.html | 2 +- .../d4b/classshaka_1_1MockAdaptationSet.html | 2 +- ...a_1_1mp4_1_1CompositionOffsetIterator.html | 2 +- .../db/d51/mp2t__media__parser_8h_source.html | 2 +- ..._single__segment__segmenter_8h_source.html | 2 +- .../d5a/classshaka_1_1media_1_1VP9Parser.html | 2 +- docs/db/d60/mpd__options_8h_source.html | 2 +- .../d64/webvtt__media__parser_8h_source.html | 2 +- ..._1media_1_1mp4_1_1SegmentType-members.html | 2 +- docs/db/d71/http__key__fetcher_8h_source.html | 2 +- ...EVCDecoderConfigurationRecord-members.html | 2 +- ...TwoPassSingleSegmentSegmenter-members.html | 2 +- ..._1_1mp2t_1_1ContinuityCounter-members.html | 2 +- docs/db/d7e/muxer__options_8cc_source.html | 2 +- ...dia_1_1AACAudioSpecificConfig-members.html | 2 +- .../classshaka_1_1media_1_1NaluReader.html | 2 +- docs/db/d8f/mp4__muxer_8h_source.html | 2 +- ...classshaka_1_1media_1_1ClusterBuilder.html | 2 +- ...ssshaka_1_1media_1_1mp4_1_1Fragmenter.html | 2 +- ...a_1_1media_1_1mp4_1_1ChunkLargeOffset.html | 4 +- docs/db/d96/wvm__media__parser_8h_source.html | 2 +- .../da4/classBandwidthEstimator-members.html | 2 +- docs/db/da6/memory__file_8h_source.html | 2 +- ...classshaka_1_1media_1_1TextStreamInfo.html | 2 +- ...classshaka_1_1media_1_1WebMInfoParser.html | 2 +- ...ia_1_1mp4_1_1SoundMediaHeader-members.html | 2 +- ...CencSampleEncryptionInfoEntry-members.html | 2 +- ...haka_1_1media_1_1OnMediaEndParameters.html | 2 +- ...ka_1_1media_1_1mp4_1_1TrackEncryption.html | 2 +- .../dcb/classshaka_1_1media_1_1VPxParser.html | 2 +- ...1_1media_1_1webm_1_1Encryptor-members.html | 2 +- docs/db/dcd/classshaka_1_1MpdWriter.html | 2 +- ..._1media_1_1mp4_1_1DTSSpecific-members.html | 2 +- ...edia_1_1VodMediaInfoDumpMuxerListener.html | 2 +- .../dd2/chunk__info__iterator_8h_source.html | 2 +- .../dd9/sync__sample__iterator_8h_source.html | 2 +- docs/db/dde/h265__parser_8cc_source.html | 2 +- .../audio__timestamp__helper_8cc_source.html | 2 +- docs/db/dee/pes__packet_8cc_source.html | 2 +- ...a_1_1media_1_1H265SliceHeader-members.html | 2 +- ...lassshaka_1_1media_1_1Cluster-members.html | 2 +- docs/db/df6/muxer_8h_source.html | 2 +- ...edia_1_1H265ByteToUnitStreamConverter.html | 2 +- docs/db/dfb/mpd__utils_8cc_source.html | 2 +- ...d__notify__muxer__listener_8cc_source.html | 2 +- ..._1_1media_1_1mp4_1_1ChunkInfo-members.html | 2 +- ...lassshaka_1_1media_1_1IoCache-members.html | 2 +- ...edia_1_1mp2t_1_1ProgramMapTableWriter.html | 2 +- ...sshaka_1_1media_1_1StreamInfo-members.html | 2 +- ...haka_1_1media_1_1ESDescriptor-members.html | 2 +- .../d16/classshaka_1_1media_1_1SeekHead.html | 2 +- ...aka_1_1media_1_1wvm_1_1WvmMediaParser.html | 2 +- ..._1mp4_1_1ProtectionSchemeInfo-members.html | 2 +- docs/dc/d19/box_8h_source.html | 2 +- .../dash__iop__mpd__notifier_8cc_source.html | 10 +- ...ed__key__encryption__flags_8cc_source.html | 2 +- .../d3c/webm__cluster__parser_8h_source.html | 2 +- docs/dc/d3f/key__source_8h_source.html | 2 +- .../classshaka_1_1xml_1_1XmlNode-members.html | 2 +- .../classshaka_1_1media_1_1BufferWriter.html | 2 +- ...rotectionSystemSpecificHeader-members.html | 2 +- ..._1media_1_1mp4_1_1TrackHeader-members.html | 2 +- ...o__unit__stream__converter_8cc_source.html | 2 +- .../decoding__time__iterator_8h_source.html | 2 +- docs/dc/d53/webm_2segmenter_8cc_source.html | 14 +- ...haka_1_1media_1_1H264DecRefPicMarking.html | 2 +- .../dc/d58/webm__media__parser_8h_source.html | 2 +- .../dc/d5c/classshaka_1_1MockMpdNotifier.html | 2 +- ...edia_1_1mp4_1_1CueSettingsBox-members.html | 2 +- ...1_1media_1_1webm_1_1Segmenter-members.html | 2 +- ...1_1media_1_1mp2t_1_1TsSection-members.html | 2 +- ...ssshaka_1_1media_1_1MockMuxerListener.html | 2 +- docs/dc/d7b/closure__thread_8cc_source.html | 2 +- docs/dc/d7b/h264__parser_8cc_source.html | 2 +- ...1_1ElementaryStreamDescriptor-members.html | 2 +- ..._1media_1_1mp4_1_1MovieFragmentHeader.html | 4 +- ...tshaka_1_1media_1_1mp4_1_1DTSSpecific.html | 4 +- docs/dc/da1/classshaka_1_1MpdBuilder.html | 14 +- ...lassshaka_1_1media_1_1ContentEncoding.html | 2 +- ...tshaka_1_1media_1_1FileCloser-members.html | 2 +- docs/dc/dbf/box__buffer_8h_source.html | 2 +- ...1xml_1_1RepresentationXmlNode-members.html | 2 +- ...classshaka_1_1media_1_1WebMListParser.html | 2 +- docs/dc/dd9/rsa__key_8cc_source.html | 2 +- .../structshaka_1_1media_1_1mp4_1_1Media.html | 4 +- docs/dc/ddf/udp__file__posix_8cc_source.html | 2 +- docs/dc/de1/structshaka_1_1SegmentInfo.html | 2 +- ...1_1media_1_1mp4_1_1Fragmenter-members.html | 2 +- ...to__unit__stream__converter_8h_source.html | 2 +- docs/dc/dec/ts__section__pmt_8cc_source.html | 2 +- .../classshaka_1_1media_1_1ClosureThread.html | 2 +- ...ssshaka_1_1media_1_1WebVttMediaParser.html | 2 +- ...1media_1_1mp4_1_1EncryptingFragmenter.html | 4 +- ...ebm_1_1SingleSegmentSegmenter-members.html | 2 +- ...ia_1_1mp4_1_1TrackFragmentRun-members.html | 2 +- docs/dc/df8/closure__thread_8h_source.html | 2 +- ...tshaka_1_1media_1_1mp4_1_1ChunkOffset.html | 4 +- docs/dd/d11/mpd__builder_8cc_source.html | 2155 ++++---- docs/dd/d12/mpd__writer_8cc_source.html | 6 +- ...mp4_1_1SampleAuxiliaryInformationSize.html | 2 +- .../d17/classshaka_1_1media_1_1Demuxer.html | 2 +- docs/dd/d18/es__parser__adts_8h_source.html | 2 +- .../d19/video__stream__info_8cc_source.html | 2 +- .../dd/d30/wvm__media__parser_8cc_source.html | 2 +- docs/dd/d3b/mp4_2segmenter_8h_source.html | 14 +- ...ctshaka_1_1media_1_1mp4_1_1SyncSample.html | 4 +- docs/dd/d42/encryptor_8h_source.html | 2 +- docs/dd/d46/webm__parser_8h_source.html | 2 +- ...media_1_1mp4_1_1MovieFragment-members.html | 2 +- ...m_1_1DemuxStreamIdMediaSample-members.html | 2 +- ...widevine__encryption__flags_8h_source.html | 2 +- ...media_1_1mp2t_1_1EsParserH265-members.html | 2 +- ...1_1media_1_1mp4_1_1SchemeInfo-members.html | 2 +- ...1_1media_1_1mp4_1_1SyncSample-members.html | 2 +- docs/dd/d65/vp8__parser_8h_source.html | 2 +- ...o__unit__stream__converter_8cc_source.html | 2 +- ...1_1H265VideoSliceHeaderParser-members.html | 2 +- ...a_1_1media_1_1mp4_1_1PixelAspectRatio.html | 4 +- .../classshaka_1_1media_1_1MuxerListener.html | 2 +- .../d7c/classshaka_1_1media_1_1IoCache.html | 2 +- docs/dd/d80/media__sample_8h_source.html | 2 +- docs/dd/d87/memory__file_8cc_source.html | 2 +- .../d88/pes__packet__generator_8h_source.html | 2 +- docs/dd/d8c/file__test__util_8h_source.html | 2 +- ...1media_1_1mp4_1_1SegmentIndex-members.html | 2 +- .../ts__packet__writer__util_8h_source.html | 2 +- .../audio__timestamp__helper_8h_source.html | 2 +- ...a_1_1media_1_1mp4_1_1SegmentReference.html | 2 +- .../classshaka_1_1MpdNotifier-members.html | 2 +- .../da4/structshaka_1_1xml_1_1XmlDeleter.html | 2 +- ...webm_1_1TwoPassSingleSegmentSegmenter.html | 2 +- ...info__dump__muxer__listener_8h_source.html | 2 +- docs/dd/dab/webm__muxer_8h_source.html | 2 +- ..._1mp4_1_1WebVTTSourceLabelBox-members.html | 2 +- ...a_1_1media_1_1WebMAudioClient-members.html | 2 +- ..._1media_1_1mp4_1_1SampleTable-members.html | 2 +- ...a_1_1xml_1_1RepresentationBaseXmlNode.html | 2 +- docs/dd/dbc/buffer__reader_8cc_source.html | 2 +- ...structshaka_1_1media_1_1EncryptionKey.html | 2 +- ...dia_1_1mp4_1_1TrackEncryption-members.html | 2 +- .../dbf/webm__webvtt__parser_8h_source.html | 2 +- ...tructshaka_1_1media_1_1mp4_1_1FullBox.html | 2 +- ...edia_1_1ProducerConsumerQueue-members.html | 2 +- ...ssshaka_1_1media_1_1webm_1_1Segmenter.html | 2 +- ...edia_1_1mp4_1_1OriginalFormat-members.html | 2 +- docs/dd/dce/structshaka_1_1media_1_1Cue.html | 2 +- docs/dd/dd2/buffer__writer_8h_source.html | 2 +- docs/dd/dd3/buffer__writer_8cc_source.html | 2 +- ...a_1_1media_1_1WebMVideoClient-members.html | 2 +- .../dd8/mock__muxer__listener_8cc_source.html | 2 +- ...tshaka_1_1media_1_1mp4_1_1Box-members.html | 2 +- ...ka_1_1media_1_1VideoSliceHeaderParser.html | 2 +- ...ructshaka_1_1media_1_1H265Pps-members.html | 2 +- docs/dd/de7/xml__node_8h_source.html | 2 +- docs/dd/dee/box__definitions_8cc_source.html | 4751 +++++++++-------- ..._2multi__segment__segmenter_8h_source.html | 2 +- ...a_1_1media_1_1mp4_1_1TrackFragmentRun.html | 4 +- ...ructshaka_1_1media_1_1mp4_1_1Metadata.html | 4 +- docs/de/d0f/local__file_8h_source.html | 22 +- docs/de/d12/container__names_8h_source.html | 2 +- docs/de/d13/ts__writer_8cc_source.html | 2 +- docs/de/d15/media__stream_8cc_source.html | 2 +- ...a_1_1media_1_1TextTrackConfig-members.html | 2 +- docs/de/d17/cluster__builder_8cc_source.html | 2 +- ...edia_1_1wvm_1_1WvmMediaParser-members.html | 2 +- ...single__segment__segmenter_8cc_source.html | 307 +- .../d22/aes__pattern__cryptor_8cc_source.html | 2 +- ..._1_1mp2t_1_1H264ProgramMapTableWriter.html | 2 +- ...shaka_1_1media_1_1mp4_1_1TrackExtends.html | 4 +- ..._1_1media_1_1WebMTracksParser-members.html | 2 +- .../d33/structshaka_1_1media_1_1H265Pps.html | 2 +- .../de/d34/offset__byte__queue_8h_source.html | 2 +- ...o__unit__stream__converter_8cc_source.html | 2 +- docs/de/d3c/macros_8h_source.html | 2 +- docs/de/d3e/buffer__reader_8h_source.html | 2 +- ...sshaka_1_1media_1_1H264Parser-members.html | 2 +- ...1_1media_1_1mp2t_1_1PesPacket-members.html | 2 +- .../classshaka_1_1media_1_1DecryptConfig.html | 2 +- .../muxer__listener__internal_8h_source.html | 2 +- docs/de/d52/classshaka_1_1Representation.html | 18 +- ...a_1_1media_1_1mp4_1_1Language-members.html | 2 +- docs/de/d5b/adts__header_8cc_source.html | 2 +- docs/de/d5c/mpd__flags_8h_source.html | 2 +- ...mp2t_1_1ProgramMapTableWriter-members.html | 2 +- ...assshaka_1_1media_1_1mp2t_1_1TsWriter.html | 2 +- ..._1_1mp4_1_1SampleToGroupEntry-members.html | 2 +- docs/de/d6e/language__utils_8h_source.html | 2 +- .../de/d70/http__key__fetcher_8cc_source.html | 2 +- ...content__encodings__client_8cc_source.html | 2 +- docs/de/d7b/mp4__media__parser_8h_source.html | 2 +- ...haka_1_1media_1_1mp2t_1_1TsSectionPsi.html | 2 +- ...ox__definitions__comparison_8h_source.html | 2 +- ...ssshaka_1_1media_1_1LocalFile-members.html | 2 +- ...edia_1_1wvm_1_1PrevSampleData-members.html | 2 +- ...1_1mp4_1_1MovieFragmentHeader-members.html | 2 +- ...ssshaka_1_1media_1_1VP8Parser-members.html | 2 +- docs/de/da9/structshaka_1_1Element.html | 2 +- docs/de/dab/es__parser__h26x_8cc_source.html | 2 +- docs/de/dad/validate__flag_8cc_source.html | 2 +- ...lassshaka_1_1media_1_1TextTrackConfig.html | 2 +- .../classshaka_1_1media_1_1H26xBitReader.html | 2 +- docs/de/dc1/demuxer_8h_source.html | 2 +- .../classshaka_1_1media_1_1H265Parser.html | 2 +- ..._1mp4_1_1DecodingTimeToSample-members.html | 2 +- docs/de/dcb/ts__segmenter_8h_source.html | 2 +- .../dcc/mock__mpd__notifier_8cc_source.html | 2 +- docs/de/dcf/file__closer_8h_source.html | 2 +- ...ontent__protection__element_8h_source.html | 2 +- ...er__listener__test__helper_8cc_source.html | 2 +- .../classshaka_1_1media_1_1Muxer-members.html | 2 +- ...shaka_1_1media_1_1mp2t_1_1TsSegmenter.html | 2 +- ..._1_1media_1_1mp4_1_1MediaData-members.html | 2 +- ..._1media_1_1DecoderConfigurationRecord.html | 2 +- ...a_1_1media_1_1mp4_1_1MP4Muxer-members.html | 2 +- .../de4/structshaka_1_1media_1_1H264Pps.html | 2 +- ...edia_1_1H26xByteToUnitStreamConverter.html | 2 +- ...1media_1_1mp4_1_1DecodingTimeToSample.html | 4 +- ...a_1_1media_1_1mp4_1_1TrackRunIterator.html | 2 +- ...ssshaka_1_1media_1_1webm_1_1Encryptor.html | 2 +- docs/de/dfa/muxer__listener_8h_source.html | 2 +- ...shaka_1_1media_1_1mp4_1_1OpusSpecific.html | 4 +- docs/de/dfd/stream__info_8cc_source.html | 2 +- ...dec__configuration__record_8cc_source.html | 199 +- .../d1a/offset__byte__queue_8cc_source.html | 2 +- ...shaka_1_1media_1_1MediaSample-members.html | 2 +- ...mposition__offset__iterator_8h_source.html | 2 +- ...mentTestBase_1_1ClusterParser-members.html | 2 +- docs/df/d22/validate__flag_8h_source.html | 2 +- ..._1mp4_1_1DecodingTimeIterator-members.html | 2 +- ...lassshaka_1_1media_1_1AesCbcDecryptor.html | 2 +- docs/df/d31/muxer__util_8cc_source.html | 2 +- .../df/d32/audio__stream__info_8h_source.html | 2 +- .../classshaka_1_1AdaptationSet-members.html | 2 +- ...uctshaka_1_1media_1_1mp4_1_1ChunkInfo.html | 2 +- ..._1_1mp4_1_1MovieExtendsHeader-members.html | 2 +- .../classshaka_1_1media_1_1RequestSigner.html | 2 +- docs/df/d46/classshaka_1_1media_1_1Muxer.html | 2 +- ...ka_1_1media_1_1ThreadedIoFile-members.html | 2 +- ...t_1_1AacProgramMapTableWriter-members.html | 2 +- ...aka_1_1media_1_1RsaPrivateKey-members.html | 2 +- ..._1mp4_1_1EncryptingFragmenter-members.html | 2 +- docs/df/d60/classshaka_1_1MockMpdBuilder.html | 2 +- ...mp4_1_1AudioRollRecoveryEntry-members.html | 2 +- .../classshaka_1_1media_1_1KeyFetcher.html | 2 +- .../classshaka_1_1MockMpdBuilder-members.html | 2 +- ...1media_1_1mp4_1_1OpusSpecific-members.html | 2 +- ...dia_1_1mp4_1_1CompositionTimeToSample.html | 4 +- ...haka_1_1media_1_1mp4_1_1TrackFragment.html | 4 +- .../df/d7d/webm__info__parser_8cc_source.html | 2 +- ...1_1DecoderConfigurationRecord-members.html | 2 +- .../classshaka_1_1media_1_1AesCryptor.html | 2 +- ...shaka_1_1media_1_1mp4_1_1DataEntryUrl.html | 4 +- docs/df/d8a/vp9__parser_8h_source.html | 2 +- docs/df/d8a/vpx__parser_8h_source.html | 2 +- ...1mp4_1_1MultiSegmentSegmenter-members.html | 2 +- docs/df/d8d/es__parser__h26x_8h_source.html | 2 +- ..._1_1RepresentationStateChangeListener.html | 2 +- docs/df/d96/xml__node_8cc_source.html | 2 +- ...dia_1_1mp4_1_1TrackFragmentDecodeTime.html | 4 +- ...shaka_1_1xml_1_1RepresentationXmlNode.html | 2 +- ..._1media_1_1mp4_1_1ChunkOffset-members.html | 2 +- ...a_1_1media_1_1mp4_1_1CueIDBox-members.html | 2 +- docs/df/dad/decrypt__config_8h_source.html | 2 +- ..._1_1media_1_1StreamDescriptor-members.html | 2 +- ...oder__configuration__record_8h_source.html | 2 +- docs/df/dd2/mpd__utils_8h_source.html | 2 +- ...ructshaka_1_1media_1_1H264Pps-members.html | 2 +- docs/df/ddc/webm_2segmenter_8h_source.html | 2 +- docs/df/dde/ts__section__psi_8cc_source.html | 2 +- ...haka_1_1media_1_1H264SEIRecoveryPoint.html | 2 +- .../de3/text__track__config_8cc_source.html | 2 +- docs/df/de9/segment__info_8h_source.html | 2 +- ...a_1_1ContentProtectionElement-members.html | 2 +- .../dir_0494b8c96e3190a776d2b97ade9c8ddf.html | 2 +- .../dir_2618cd273dea54f184e42d7a562af818.html | 2 +- .../dir_279fd47bebb21302c25cfb685e84c359.html | 2 +- .../dir_2eceb70145328c029a5f43350007537a.html | 2 +- .../dir_39dc0668bd5a501998f94e8b4e546c71.html | 2 +- .../dir_3e9291fd7a18fdecc763294cb2628910.html | 2 +- .../dir_49627ef5ef0630f6cf11dd06344c4cf0.html | 2 +- .../dir_5039d854a18988ed1f1dbebc120ffbf7.html | 2 +- .../dir_65f7acfa8cf3a5f1edc11faa2428b914.html | 2 +- .../dir_679a6f4e9fa092b388fc986148018f2a.html | 2 +- .../dir_7f5e01ba7faf319a30cabd201b6ef121.html | 2 +- .../dir_89dd766eb2df7d7257dbe806a34404af.html | 2 +- .../dir_aa73376d632f252584a1c0dfbefab2c4.html | 2 +- .../dir_c6ada2450b25ab5438a4dba6c9b890af.html | 2 +- .../dir_d422163b96683743ed3963d4aac17747.html | 2 +- .../dir_eeaeb49ac3913fcfb450d3ce9cc0141b.html | 2 +- .../dir_f7dcbe7025bbacfc4b9a7dff6ad41d72.html | 2 +- docs/files.html | 2 +- docs/functions.html | 2 +- docs/functions_b.html | 2 +- docs/functions_c.html | 2 +- docs/functions_d.html | 2 +- docs/functions_e.html | 2 +- docs/functions_enum.html | 2 +- docs/functions_eval.html | 2 +- docs/functions_f.html | 2 +- docs/functions_func.html | 2 +- docs/functions_func_b.html | 2 +- docs/functions_func_c.html | 2 +- docs/functions_func_d.html | 2 +- docs/functions_func_e.html | 2 +- docs/functions_func_f.html | 2 +- docs/functions_func_g.html | 2 +- docs/functions_func_h.html | 2 +- docs/functions_func_i.html | 2 +- docs/functions_func_k.html | 2 +- docs/functions_func_l.html | 2 +- docs/functions_func_m.html | 2 +- docs/functions_func_n.html | 2 +- docs/functions_func_o.html | 2 +- docs/functions_func_p.html | 4 +- docs/functions_func_r.html | 2 +- docs/functions_func_s.html | 2 +- docs/functions_func_t.html | 2 +- docs/functions_func_u.html | 2 +- docs/functions_func_v.html | 2 +- docs/functions_func_w.html | 4 +- docs/functions_func_x.html | 2 +- docs/functions_func_~.html | 2 +- docs/functions_g.html | 2 +- docs/functions_h.html | 2 +- docs/functions_i.html | 2 +- docs/functions_k.html | 2 +- docs/functions_l.html | 2 +- docs/functions_m.html | 2 +- docs/functions_n.html | 2 +- docs/functions_o.html | 2 +- docs/functions_p.html | 4 +- docs/functions_r.html | 2 +- docs/functions_s.html | 2 +- docs/functions_t.html | 2 +- docs/functions_type.html | 2 +- docs/functions_u.html | 2 +- docs/functions_v.html | 2 +- docs/functions_vars.html | 2 +- docs/functions_w.html | 4 +- docs/functions_x.html | 2 +- docs/functions_~.html | 2 +- docs/hierarchy.html | 2 +- docs/index.html | 2 +- docs/namespacemembers.html | 2 +- docs/namespacemembers_func.html | 2 +- docs/namespaces.html | 2 +- docs/search/all_14.js | 2 +- docs/search/all_e.js | 2 +- docs/search/functions_14.js | 2 +- docs/search/functions_e.js | 2 +- 945 files changed, 6797 insertions(+), 6680 deletions(-) diff --git a/docs/annotated.html b/docs/annotated.html index 5c245fcc24..b559d22b31 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -371,7 +371,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/classes.html b/docs/classes.html index 5c21826e5d..1af2d5f1e1 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 5d667a18e1..fe7069de7f 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 6c795a1cd1..7cd3a1a5c3 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 b5ecbd733d..d21bcb1e21 100644 --- a/docs/d0/d06/mpd__flags_8cc_source.html +++ b/docs/d0/d06/mpd__flags_8cc_source.html @@ -140,7 +140,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 fded876aed..2ef6175b9d 100644 --- a/docs/d0/d0e/classshaka_1_1media_1_1HttpKeyFetcher-members.html +++ b/docs/d0/d0e/classshaka_1_1media_1_1HttpKeyFetcher-members.html @@ -104,7 +104,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 b1d93b6678..73dca37b0d 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 d02960a5f8..c7fa2e0dbf 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 ba5bcb5b96..3e664853e6 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 0a21bc32a3..085d861d6e 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 1925439297..11bd63e46f 100644 --- a/docs/d0/d1e/classshaka_1_1media_1_1H265ByteToUnitStreamConverter-members.html +++ b/docs/d0/d1e/classshaka_1_1media_1_1H265ByteToUnitStreamConverter-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 14f4b21a66..e6530e2494 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 a891f0cc15..10cd9cb0a5 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 2bf3cb5208..162e5c2960 100644 --- a/docs/d0/d27/structshaka_1_1media_1_1MuxerOptions.html +++ b/docs/d0/d27/structshaka_1_1media_1_1MuxerOptions.html @@ -288,7 +288,7 @@ std::string  diff --git a/docs/d0/d30/mock__mpd__notifier_8h_source.html b/docs/d0/d30/mock__mpd__notifier_8h_source.html index 5bdfed3471..6fec8fae4c 100644 --- a/docs/d0/d30/mock__mpd__notifier_8h_source.html +++ b/docs/d0/d30/mock__mpd__notifier_8h_source.html @@ -148,7 +148,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 0ad4c40653..af4f7dc336 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 624ff0a79d..2d86d0f9f3 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 d7d205ceff..9b65b2486e 100644 --- a/docs/d0/d35/es__descriptor_8cc_source.html +++ b/docs/d0/d35/es__descriptor_8cc_source.html @@ -229,60 +229,63 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
140  const std::vector<uint8_t> kEmptyDecodingBufferSize(3, 0);
141  const uint8_t kNoEsFlags = 0;
142 
-
143  const uint8_t decoder_specific_info_size = decoder_specific_info_.size();
-
144 
-
145  // 6 bit stream type. The last bit is reserved with 1.
-
146  const uint8_t stream_type = (kAudioStreamType << 2) | 1;
-
147  const uint8_t decoder_config_size = decoder_specific_info_size + kHeaderSize +
-
148  sizeof(uint8_t) + // object_type_.
-
149  sizeof(stream_type) +
-
150  kEmptyDecodingBufferSize.size() +
-
151  sizeof(kUnknownBitrate) * 2;
-
152 
-
153  const uint8_t sl_config_size = sizeof(uint8_t); // predefined.
-
154  const uint8_t es_size = decoder_config_size + kHeaderSize + sl_config_size +
-
155  kHeaderSize + sizeof(esid_) + sizeof(kNoEsFlags);
-
156 
-
157  writer->AppendInt(static_cast<uint8_t>(kESDescrTag));
-
158  writer->AppendInt(es_size);
-
159  writer->AppendInt(esid_);
-
160  writer->AppendInt(kNoEsFlags);
-
161 
-
162  writer->AppendInt(static_cast<uint8_t>(kDecoderConfigDescrTag));
-
163  writer->AppendInt(decoder_config_size);
-
164  writer->AppendInt(static_cast<uint8_t>(object_type_));
-
165  writer->AppendInt(stream_type);
-
166  writer->AppendVector(kEmptyDecodingBufferSize);
-
167  writer->AppendInt(max_bitrate_);
-
168  writer->AppendInt(avg_bitrate_);
-
169 
-
170  writer->AppendInt(static_cast<uint8_t>(kDecoderSpecificInfoTag));
-
171  writer->AppendInt(decoder_specific_info_size);
-
172  writer->AppendVector(decoder_specific_info_);
-
173 
-
174  writer->AppendInt(static_cast<uint8_t>(kSLConfigTag));
-
175  writer->AppendInt(sl_config_size);
-
176  writer->AppendInt(static_cast<uint8_t>(kSLPredefinedMP4));
-
177 }
-
178 
-
179 size_t ESDescriptor::ComputeSize() const {
-
180  // A bit magical. Refer to ESDescriptor::Write for details.
-
181  const uint8_t decoder_specific_info_size = decoder_specific_info_.size();
-
182  const uint8_t decoder_config_size = decoder_specific_info_size + kHeaderSize +
-
183  sizeof(uint8_t) * 5 +
-
184  sizeof(uint32_t) * 2;
-
185  const uint8_t sl_config_size = sizeof(uint8_t);
-
186  const uint8_t es_size = decoder_config_size + kHeaderSize + sl_config_size +
-
187  kHeaderSize + sizeof(esid_) + sizeof(uint8_t);
-
188  return es_size + kHeaderSize;
-
189 }
-
190 
-
191 } // namespace media
-
192 } // namespace shaka
+
143  const uint8_t decoder_specific_info_size =
+
144  static_cast<uint8_t>(decoder_specific_info_.size());
+
145 
+
146  // 6 bit stream type. The last bit is reserved with 1.
+
147  const uint8_t stream_type = (kAudioStreamType << 2) | 1;
+
148  const uint8_t decoder_config_size =
+
149  static_cast<uint8_t>(decoder_specific_info_size + kHeaderSize +
+
150  sizeof(uint8_t) + // object_type_.
+
151  sizeof(stream_type) +
+
152  kEmptyDecodingBufferSize.size() +
+
153  sizeof(kUnknownBitrate) * 2);
+
154 
+
155  const uint8_t sl_config_size = sizeof(uint8_t); // predefined.
+
156  const uint8_t es_size = decoder_config_size + kHeaderSize + sl_config_size +
+
157  kHeaderSize + sizeof(esid_) + sizeof(kNoEsFlags);
+
158 
+
159  writer->AppendInt(static_cast<uint8_t>(kESDescrTag));
+
160  writer->AppendInt(es_size);
+
161  writer->AppendInt(esid_);
+
162  writer->AppendInt(kNoEsFlags);
+
163 
+
164  writer->AppendInt(static_cast<uint8_t>(kDecoderConfigDescrTag));
+
165  writer->AppendInt(decoder_config_size);
+
166  writer->AppendInt(static_cast<uint8_t>(object_type_));
+
167  writer->AppendInt(stream_type);
+
168  writer->AppendVector(kEmptyDecodingBufferSize);
+
169  writer->AppendInt(max_bitrate_);
+
170  writer->AppendInt(avg_bitrate_);
+
171 
+
172  writer->AppendInt(static_cast<uint8_t>(kDecoderSpecificInfoTag));
+
173  writer->AppendInt(decoder_specific_info_size);
+
174  writer->AppendVector(decoder_specific_info_);
+
175 
+
176  writer->AppendInt(static_cast<uint8_t>(kSLConfigTag));
+
177  writer->AppendInt(sl_config_size);
+
178  writer->AppendInt(static_cast<uint8_t>(kSLPredefinedMP4));
+
179 }
+
180 
+
181 size_t ESDescriptor::ComputeSize() const {
+
182  // A bit magical. Refer to ESDescriptor::Write for details.
+
183  const uint8_t decoder_specific_info_size =
+
184  static_cast<uint8_t>(decoder_specific_info_.size());
+
185  const uint8_t decoder_config_size = decoder_specific_info_size + kHeaderSize +
+
186  sizeof(uint8_t) * 5 +
+
187  sizeof(uint32_t) * 2;
+
188  const uint8_t sl_config_size = sizeof(uint8_t);
+
189  const uint8_t es_size = decoder_config_size + kHeaderSize + sl_config_size +
+
190  kHeaderSize + sizeof(esid_) + sizeof(uint8_t);
+
191  return es_size + kHeaderSize;
+
192 }
+
193 
+
194 } // namespace media
+
195 } // namespace shaka
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 44cc2ce0d7..0fbeb602fd 100644 --- a/docs/d0/d3a/hls__notify__muxer__listener_8cc_source.html +++ b/docs/d0/d3a/hls__notify__muxer__listener_8cc_source.html @@ -220,7 +220,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 1ac0c5b5e9..f384d02387 100644 --- a/docs/d0/d3a/webm__constants_8h_source.html +++ b/docs/d0/d3a/webm__constants_8h_source.html @@ -313,7 +313,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 ad8c715791..9fc5313258 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 ed99a1fa63..36b08ac7f7 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 3e45a5417b..b515477c98 100644 --- a/docs/d0/d42/widevine__encryption__flags_8cc_source.html +++ b/docs/d0/d42/widevine__encryption__flags_8cc_source.html @@ -258,7 +258,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 1ced5fa728..de72349073 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 98ce0ba0f1..788c0a7ce5 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 @@ -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 bfef25a6e9..2ee82586d4 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 2f467634be..457c323ec7 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 f44342fada..9cd4bbda29 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 502b0e0f2c..d357c048a4 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 @@ -117,7 +117,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 6978b877ef..85e2cf7ed2 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 e6476375cd..3601c206da 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 9dd89c830e..265bb97b98 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 fbe70540ce..e655911388 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 @@ -186,7 +186,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1486 of file box_definitions.cc.

+

Definition at line 1487 of file box_definitions.cc.

@@ -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 9bcf15df61..91edcd6052 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 @@ -177,7 +177,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1078 of file box_definitions.cc.

+

Definition at line 1079 of file box_definitions.cc.

@@ -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 be0acfc14a..4b5fef9094 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 7cc68a9130..b14161a008 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 1baaea8fdf..5dc54de915 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 09c70a7181..0a4a9e71c6 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 b583674966..e08e5636e9 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 @@ -175,7 +175,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2207 of file box_definitions.cc.

+

Definition at line 2208 of file box_definitions.cc.

@@ -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 dd0a7ca0bd..55c243acaf 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 466320109e..e82ffe251b 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 f0cca34a61..3fc22d8ccb 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 e23dd171b3..36bbe76496 100644 --- a/docs/d0/da6/stream__descriptor_8cc_source.html +++ b/docs/d0/da6/stream__descriptor_8cc_source.html @@ -295,7 +295,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 a7ff7fd9d1..b5061e6d4f 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 @@ -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 889ce93291..b85dd5d2e1 100644 --- a/docs/d0/dac/classshaka_1_1media_1_1FixedKeySource.html +++ b/docs/d0/dac/classshaka_1_1media_1_1FixedKeySource.html @@ -479,7 +479,7 @@ Additional Inherited Members 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 996d961388..6db7438d09 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 @@ -123,7 +123,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 950c562d9e..0f0f666708 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 0e9f28e00a..58f51062d8 100644 --- a/docs/d0/dc8/classshaka_1_1xml_1_1AdaptationSetXmlNode-members.html +++ b/docs/d0/dc8/classshaka_1_1xml_1_1AdaptationSetXmlNode-members.html @@ -114,7 +114,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 bc28420ce0..372bb2b1a2 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 d0a093d34b..64304e810e 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2653 of file box_definitions.cc.

+

Definition at line 2654 of file box_definitions.cc.

@@ -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 52d9f666a4..fb6ab3f71d 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 d5b6f89222..0d6b94e0f8 100644 --- a/docs/d0/dd6/webm__crypto__helpers_8cc_source.html +++ b/docs/d0/dd6/webm__crypto__helpers_8cc_source.html @@ -156,7 +156,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 a03708aef4..e14e3750d0 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 f41c6a877f..4492988f61 100644 --- a/docs/d0/dee/segmenter__test__base_8h_source.html +++ b/docs/d0/dee/segmenter__test__base_8h_source.html @@ -215,7 +215,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 098374e5eb..8476190e6f 100644 --- a/docs/d0/df3/packager__util_8cc_source.html +++ b/docs/d0/df3/packager__util_8cc_source.html @@ -330,11 +330,11 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
static RsaRequestSigner * CreateSigner(const std::string &signer_name, const std::string &pkcs1_rsa_key)
static scoped_ptr< FixedKeySource > CreateFromHexStrings(const std::string &key_id_hex, const std::string &key_hex, const std::string &pssh_boxes_hex, const std::string &iv_hex)
static AesRequestSigner * CreateSigner(const std::string &signer_name, const std::string &aes_key_hex, const std::string &iv_hex)
-
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:184
+
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:189
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 0cd27da0d1..bdb4013ea6 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 127b1478c4..9d4d7385dc 100644 --- a/docs/d1/d0a/classshaka_1_1media_1_1MkvWriter.html +++ b/docs/d1/d0a/classshaka_1_1media_1_1MkvWriter.html @@ -127,8 +127,8 @@ Public Member Functions   int64_t WriteFromFile (File *source)   -int64_t WriteFromFile (File *source, uint64_t max_copy) -  +int64_t WriteFromFile (File *source, int64_t max_copy) +  Filefile ()   @@ -339,7 +339,7 @@ Public Member Functions - +
@@ -352,7 +352,7 @@ Public Member Functions - + @@ -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 840299d0ff..d3e0fec383 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 
uint64_t int64_t  max_copy 
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 b11876bd48..03df4f25c3 100644 --- a/docs/d1/d0b/hevc__decoder__configuration__record_8cc_source.html +++ b/docs/d1/d0b/hevc__decoder__configuration__record_8cc_source.html @@ -257,7 +257,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 0483d388ba..b12dd6812b 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 2917e23b4e..48cb048c63 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 2f701d9530..10d947ddf0 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 @@ -128,154 +128,155 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
40  }
41  std::string file_prefix =
42  base::StringPrintf("packager-tempfile-%x-%" PRIx64 ".tmp", tid, rand);
-
43  return base::FilePath(options.temp_dir).Append(file_prefix).value();
-
44 }
-
45 
-
46 // Skips a given number of bytes in a file by reading. This allows
-
47 // forward-seeking in non-seekable files.
-
48 bool ReadSkip(File* file, int64_t byte_count) {
-
49  const int64_t kBufferSize = 0x40000; // 256KB.
-
50  scoped_ptr<char[]> buffer(new char[kBufferSize]);
-
51  int64_t bytes_read = 0;
-
52  while (bytes_read < byte_count) {
-
53  int64_t size = std::min(kBufferSize, byte_count - bytes_read);
-
54  int64_t result = file->Read(buffer.get(), size);
-
55  // Only give success if there are no errors, not at EOF, and read exactly
-
56  // byte_count bytes.
-
57  if (result <= 0)
-
58  return false;
-
59 
-
60  bytes_read += result;
-
61  }
-
62 
-
63  DCHECK_EQ(bytes_read, byte_count);
-
64  return true;
-
65 }
-
66 } // namespace
-
67 
-
68 TwoPassSingleSegmentSegmenter::TwoPassSingleSegmentSegmenter(
-
69  const MuxerOptions& options)
-
70  : SingleSegmentSegmenter(options) {}
-
71 
-
72 TwoPassSingleSegmentSegmenter::~TwoPassSingleSegmentSegmenter() {}
-
73 
-
74 Status
-
75 TwoPassSingleSegmentSegmenter::DoInitialize(scoped_ptr<MkvWriter> writer) {
-
76  // Assume the amount of time to copy the temp file as the same amount
-
77  // of time as to make it.
-
78  set_progress_target(info()->duration() * 2);
-
79 
-
80  real_writer_ = writer.Pass();
-
81 
-
82  temp_file_name_ = TempFileName(options());
-
83  scoped_ptr<MkvWriter> temp(new MkvWriter);
-
84  Status status = temp->Open(temp_file_name_);
-
85  if (!status.ok())
-
86  return status;
-
87 
-
88  return SingleSegmentSegmenter::DoInitialize(temp.Pass());
-
89 }
-
90 
-
91 Status TwoPassSingleSegmentSegmenter::DoFinalize() {
-
92  if (!cluster()->Finalize())
-
93  return Status(error::FILE_FAILURE, "Error finalizing cluster.");
-
94 
-
95  // Write the Cues to the end of the temp file.
-
96  uint64_t cues_pos = writer()->Position();
-
97  set_index_start(cues_pos);
-
98  seek_head()->set_cues_pos(cues_pos - segment_payload_pos());
-
99  if (!cues()->Write(writer()))
-
100  return Status(error::FILE_FAILURE, "Error writing Cues data.");
-
101 
-
102  // Write the header to the real output file.
-
103  Status temp = WriteSegmentHeader(writer()->Position(), real_writer_.get());
-
104  if (!temp.ok())
-
105  return temp;
-
106 
-
107  // Close the temp file and open it for reading.
-
108  set_writer(scoped_ptr<MkvWriter>());
-
109  scoped_ptr<File, FileCloser> temp_reader(
-
110  File::Open(temp_file_name_.c_str(), "r"));
-
111  if (!temp_reader)
-
112  return Status(error::FILE_FAILURE, "Error opening temp file.");
-
113 
-
114  // Skip the header that has already been written.
-
115  uint64_t header_size = real_writer_->Position();
-
116  if (!ReadSkip(temp_reader.get(), header_size))
-
117  return Status(error::FILE_FAILURE, "Error reading temp file.");
-
118 
-
119  // Copy the rest of the data over.
-
120  if (!CopyFileWithClusterRewrite(temp_reader.get(), real_writer_.get(),
-
121  cluster()->Size()))
-
122  return Status(error::FILE_FAILURE, "Error copying temp file.");
-
123 
-
124  // Close and delete the temp file.
-
125  temp_reader.reset();
-
126  if (!File::Delete(temp_file_name_.c_str())) {
-
127  LOG(WARNING) << "Unable to delete temporary file " << temp_file_name_;
-
128  }
-
129 
-
130  // The WebM index is at the end of the file.
-
131  set_index_end(real_writer_->file()->Size() - 1);
-
132  return real_writer_->Close();
-
133 }
-
134 
-
135 bool TwoPassSingleSegmentSegmenter::CopyFileWithClusterRewrite(
-
136  File* source,
-
137  MkvWriter* dest,
-
138  uint64_t last_size) {
-
139  const int cluster_id_size = mkvmuxer::GetUIntSize(mkvmuxer::kMkvCluster);
-
140  const int cluster_size_size = 8; // The size of the Cluster size integer.
-
141  const int cluster_header_size = cluster_id_size + cluster_size_size;
-
142 
-
143  // We are at the start of a cluster, so copy the ID.
-
144  if (dest->WriteFromFile(source, cluster_id_size) != cluster_id_size)
-
145  return false;
-
146 
-
147  for (int i = 0; i < cues()->cue_entries_size() - 1; ++i) {
-
148  // Write the size of the cluster.
-
149  const mkvmuxer::CuePoint* cue = cues()->GetCueByIndex(i);
-
150  const mkvmuxer::CuePoint* next_cue = cues()->GetCueByIndex(i + 1);
-
151  const int64_t cluster_payload_size =
-
152  next_cue->cluster_pos() - cue->cluster_pos() - cluster_header_size;
-
153  if (mkvmuxer::WriteUIntSize(dest, cluster_payload_size, cluster_size_size))
-
154  return false;
-
155  if (!ReadSkip(source, cluster_size_size))
-
156  return false;
-
157 
-
158  // Copy the cluster and the next cluster's ID.
-
159  int64_t to_copy = cluster_payload_size + cluster_id_size;
-
160  if (dest->WriteFromFile(source, to_copy) != to_copy)
-
161  return false;
-
162 
-
163  // Update the progress; need to convert from WebM timecode to ISO BMFF.
-
164  const uint64_t webm_delta_time = next_cue->time() - cue->time();
-
165  const uint64_t delta_time = FromWebMTimecode(webm_delta_time);
-
166  UpdateProgress(delta_time);
-
167  }
-
168 
-
169  // The last cluster takes up until the cues.
-
170  const uint64_t last_cluster_payload_size = last_size - cluster_header_size;
-
171  if (mkvmuxer::WriteUIntSize(dest, last_cluster_payload_size,
-
172  cluster_size_size))
-
173  return false;
-
174  if (!ReadSkip(source, cluster_size_size))
-
175  return false;
-
176 
-
177  // Copy the remaining data (i.e. Cues data).
-
178  return dest->WriteFromFile(source) ==
-
179  static_cast<int64_t>(last_cluster_payload_size + cues()->Size());
-
180 }
-
181 
-
182 } // namespace webm
-
183 } // namespace media
-
184 } // namespace shaka
+
43  return base::FilePath::FromUTF8Unsafe(options.temp_dir).Append(
+
44  base::FilePath::FromUTF8Unsafe(file_prefix)).AsUTF8Unsafe();
+
45 }
+
46 
+
47 // Skips a given number of bytes in a file by reading. This allows
+
48 // forward-seeking in non-seekable files.
+
49 bool ReadSkip(File* file, int64_t byte_count) {
+
50  const int64_t kBufferSize = 0x40000; // 256KB.
+
51  scoped_ptr<char[]> buffer(new char[kBufferSize]);
+
52  int64_t bytes_read = 0;
+
53  while (bytes_read < byte_count) {
+
54  int64_t size = std::min(kBufferSize, byte_count - bytes_read);
+
55  int64_t result = file->Read(buffer.get(), size);
+
56  // Only give success if there are no errors, not at EOF, and read exactly
+
57  // byte_count bytes.
+
58  if (result <= 0)
+
59  return false;
+
60 
+
61  bytes_read += result;
+
62  }
+
63 
+
64  DCHECK_EQ(bytes_read, byte_count);
+
65  return true;
+
66 }
+
67 } // namespace
+
68 
+
69 TwoPassSingleSegmentSegmenter::TwoPassSingleSegmentSegmenter(
+
70  const MuxerOptions& options)
+
71  : SingleSegmentSegmenter(options) {}
+
72 
+
73 TwoPassSingleSegmentSegmenter::~TwoPassSingleSegmentSegmenter() {}
+
74 
+
75 Status
+
76 TwoPassSingleSegmentSegmenter::DoInitialize(scoped_ptr<MkvWriter> writer) {
+
77  // Assume the amount of time to copy the temp file as the same amount
+
78  // of time as to make it.
+
79  set_progress_target(info()->duration() * 2);
+
80 
+
81  real_writer_ = writer.Pass();
+
82 
+
83  temp_file_name_ = TempFileName(options());
+
84  scoped_ptr<MkvWriter> temp(new MkvWriter);
+
85  Status status = temp->Open(temp_file_name_);
+
86  if (!status.ok())
+
87  return status;
+
88 
+
89  return SingleSegmentSegmenter::DoInitialize(temp.Pass());
+
90 }
+
91 
+
92 Status TwoPassSingleSegmentSegmenter::DoFinalize() {
+
93  if (!cluster()->Finalize())
+
94  return Status(error::FILE_FAILURE, "Error finalizing cluster.");
+
95 
+
96  // Write the Cues to the end of the temp file.
+
97  uint64_t cues_pos = writer()->Position();
+
98  set_index_start(cues_pos);
+
99  seek_head()->set_cues_pos(cues_pos - segment_payload_pos());
+
100  if (!cues()->Write(writer()))
+
101  return Status(error::FILE_FAILURE, "Error writing Cues data.");
+
102 
+
103  // Write the header to the real output file.
+
104  Status temp = WriteSegmentHeader(writer()->Position(), real_writer_.get());
+
105  if (!temp.ok())
+
106  return temp;
+
107 
+
108  // Close the temp file and open it for reading.
+
109  set_writer(scoped_ptr<MkvWriter>());
+
110  scoped_ptr<File, FileCloser> temp_reader(
+
111  File::Open(temp_file_name_.c_str(), "r"));
+
112  if (!temp_reader)
+
113  return Status(error::FILE_FAILURE, "Error opening temp file.");
+
114 
+
115  // Skip the header that has already been written.
+
116  uint64_t header_size = real_writer_->Position();
+
117  if (!ReadSkip(temp_reader.get(), header_size))
+
118  return Status(error::FILE_FAILURE, "Error reading temp file.");
+
119 
+
120  // Copy the rest of the data over.
+
121  if (!CopyFileWithClusterRewrite(temp_reader.get(), real_writer_.get(),
+
122  cluster()->Size()))
+
123  return Status(error::FILE_FAILURE, "Error copying temp file.");
+
124 
+
125  // Close and delete the temp file.
+
126  temp_reader.reset();
+
127  if (!File::Delete(temp_file_name_.c_str())) {
+
128  LOG(WARNING) << "Unable to delete temporary file " << temp_file_name_;
+
129  }
+
130 
+
131  // The WebM index is at the end of the file.
+
132  set_index_end(real_writer_->file()->Size() - 1);
+
133  return real_writer_->Close();
+
134 }
+
135 
+
136 bool TwoPassSingleSegmentSegmenter::CopyFileWithClusterRewrite(
+
137  File* source,
+
138  MkvWriter* dest,
+
139  uint64_t last_size) {
+
140  const int cluster_id_size = mkvmuxer::GetUIntSize(mkvmuxer::kMkvCluster);
+
141  const int cluster_size_size = 8; // The size of the Cluster size integer.
+
142  const int cluster_header_size = cluster_id_size + cluster_size_size;
+
143 
+
144  // We are at the start of a cluster, so copy the ID.
+
145  if (dest->WriteFromFile(source, cluster_id_size) != cluster_id_size)
+
146  return false;
+
147 
+
148  for (int i = 0; i < cues()->cue_entries_size() - 1; ++i) {
+
149  // Write the size of the cluster.
+
150  const mkvmuxer::CuePoint* cue = cues()->GetCueByIndex(i);
+
151  const mkvmuxer::CuePoint* next_cue = cues()->GetCueByIndex(i + 1);
+
152  const int64_t cluster_payload_size =
+
153  next_cue->cluster_pos() - cue->cluster_pos() - cluster_header_size;
+
154  if (mkvmuxer::WriteUIntSize(dest, cluster_payload_size, cluster_size_size))
+
155  return false;
+
156  if (!ReadSkip(source, cluster_size_size))
+
157  return false;
+
158 
+
159  // Copy the cluster and the next cluster's ID.
+
160  int64_t to_copy = cluster_payload_size + cluster_id_size;
+
161  if (dest->WriteFromFile(source, to_copy) != to_copy)
+
162  return false;
+
163 
+
164  // Update the progress; need to convert from WebM timecode to ISO BMFF.
+
165  const uint64_t webm_delta_time = next_cue->time() - cue->time();
+
166  const uint64_t delta_time = FromWebMTimecode(webm_delta_time);
+
167  UpdateProgress(delta_time);
+
168  }
+
169 
+
170  // The last cluster takes up until the cues.
+
171  const uint64_t last_cluster_payload_size = last_size - cluster_header_size;
+
172  if (mkvmuxer::WriteUIntSize(dest, last_cluster_payload_size,
+
173  cluster_size_size))
+
174  return false;
+
175  if (!ReadSkip(source, cluster_size_size))
+
176  return false;
+
177 
+
178  // Copy the remaining data (i.e. Cues data).
+
179  return dest->WriteFromFile(source) ==
+
180  static_cast<int64_t>(last_cluster_payload_size + cues()->Size());
+
181 }
+
182 
+
183 } // namespace webm
+
184 } // namespace media
+
185 } // namespace shaka
virtual bool Open()=0
Internal open. Should not be used directly.
-
static bool Delete(const char *file_name)
Definition: file.cc:162
+
static bool Delete(const char *file_name)
Definition: file.cc:167
diff --git a/docs/d1/d1d/muxer__flags_8cc_source.html b/docs/d1/d1d/muxer__flags_8cc_source.html index 8b7784b894..0c80e16aef 100644 --- a/docs/d1/d1d/muxer__flags_8cc_source.html +++ b/docs/d1/d1d/muxer__flags_8cc_source.html @@ -143,7 +143,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 1492b30430..53abfb8689 100644 --- a/docs/d1/d1f/classshaka_1_1media_1_1KeySource.html +++ b/docs/d1/d1f/classshaka_1_1media_1_1KeySource.html @@ -407,7 +407,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 d94735256c..91d734df90 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 28dd38ed3a..18e553aaec 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 bdab91bbbe..597bbfeca6 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 692760694d..c2f9702a3a 100644 --- a/docs/d1/d2a/decryptor__source_8cc_source.html +++ b/docs/d1/d2a/decryptor__source_8cc_source.html @@ -209,7 +209,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 b30724ed4c..f2b6156525 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 d48f5a8ea5..503fb604c9 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 696a57426e..3157e3691d 100644 --- a/docs/d1/d2f/webvtt__media__parser_8cc_source.html +++ b/docs/d1/d2f/webvtt__media__parser_8cc_source.html @@ -491,7 +491,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 b60b87c25d..dd0e3e1a45 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 d9397d2a4d..1d1637c96e 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 02b8dde6f8..b68ed1c605 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 b603495a86..1f23f5fd64 100644 --- a/docs/d1/d37/es__parser__h264_8h_source.html +++ b/docs/d1/d37/es__parser__h264_8h_source.html @@ -153,7 +153,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 b9f3386af2..2262f959e4 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 d2282e2fa8..8f916b7f4d 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 @@ -165,7 +165,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2179 of file box_definitions.cc.

+

Definition at line 2180 of file box_definitions.cc.

@@ -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 0b08e9bda7..61606f28b4 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 9d4161ef43..856dfb5515 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 a4c8ac8bb4..ca5391b568 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 96647a47ce..6ea5546af8 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 2b03a22bbe..6b4cf2323a 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 7ddff3b60e..5b2fb5625b 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 @@ -211,7 +211,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2276 of file box_definitions.cc.

+

Definition at line 2277 of file box_definitions.cc.

@@ -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 7e408f5f89..a5081daff0 100644 --- a/docs/d1/d70/vp8__parser_8cc_source.html +++ b/docs/d1/d70/vp8__parser_8cc_source.html @@ -286,14 +286,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames) override
Definition: vp8_parser.cc:100
bool SkipBytes(int num_bytes)
Definition: bit_reader.cc:56
-
int bits_available() const
Definition: bit_reader.h:76
+
int bits_available() const
Definition: bit_reader.h:85
bool SkipBits(int num_bits)
Definition: bit_reader.cc:24
static bool IsKeyframe(const uint8_t *data, size_t data_size)
Definition: vp8_parser.cc:183
-
int bit_position() const
Definition: bit_reader.h:81
+
int bit_position() const
Definition: bit_reader.h:90
diff --git a/docs/d1/d72/language__utils_8cc_source.html b/docs/d1/d72/language__utils_8cc_source.html index 3d73e79579..acc31e5a6b 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 62a685ebcb..23f07a4cbe 100644 --- a/docs/d1/d74/mp2t__media__parser_8cc_source.html +++ b/docs/d1/d74/mp2t__media__parser_8cc_source.html @@ -539,7 +539,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d79/classshaka_1_1media_1_1H265VideoSliceHeaderParser.html b/docs/d1/d79/classshaka_1_1media_1_1H265VideoSliceHeaderParser.html index 6d021aecea..2e6982a5c1 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 83a1d2f9b0..a11b623289 100644 --- a/docs/d1/d7d/webm__video__client_8cc_source.html +++ b/docs/d1/d7d/webm__video__client_8cc_source.html @@ -270,7 +270,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 86078185d5..574384572e 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 12c119a193..f8481badca 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 6a87f036df..455df65e86 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 cf5fc599d5..4392a17e43 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 @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/d8e/webm__audio__client_8cc_source.html b/docs/d1/d8e/webm__audio__client_8cc_source.html index 809ae4b9c8..acbab1cf7b 100644 --- a/docs/d1/d8e/webm__audio__client_8cc_source.html +++ b/docs/d1/d8e/webm__audio__client_8cc_source.html @@ -214,7 +214,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 e28764443e..8f5946e421 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 cc4be9c44a..e76bf6e88d 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 bfa1a8f870..35d523fd38 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 806e702e07..719bb053b6 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 2ed5763d49..1e37190951 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 a0dd8f7ddb..2907b08e31 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 @@ -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 8ee8bbd9db..e64b899738 100644 --- a/docs/d1/da2/classshaka_1_1media_1_1NalUnitToByteStreamConverter-members.html +++ b/docs/d1/da2/classshaka_1_1media_1_1NalUnitToByteStreamConverter-members.html @@ -101,7 +101,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 53cf7e221f..aea1d67be1 100644 --- a/docs/d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html +++ b/docs/d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html @@ -207,7 +207,7 @@ bool video_full_range_flag
Returns
The codec string.
-

Definition at line 207 of file vp_codec_configuration_record.cc.

+

Definition at line 208 of file vp_codec_configuration_record.cc.

@@ -295,7 +295,7 @@ bool video_full_range_flag -

Definition at line 170 of file vp_codec_configuration_record.cc.

+

Definition at line 171 of file vp_codec_configuration_record.cc.

@@ -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 84bc5d3e9d..56b2d2d702 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 23a6e96c70..f36936297e 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 @@ -180,7 +180,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1932 of file box_definitions.cc.

+

Definition at line 1933 of file box_definitions.cc.

@@ -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 22847aea33..913378796b 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/dc2/h26x__bit__reader_8h_source.html b/docs/d1/dc2/h26x__bit__reader_8h_source.html index 70b3947279..649d93656a 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 cc93d7728c..aa4fc9a67e 100644 --- a/docs/d1/dcb/encrypting__fragmenter_8h_source.html +++ b/docs/d1/dcb/encrypting__fragmenter_8h_source.html @@ -189,13 +189,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
EncryptingFragmenter generates MP4 fragments with sample encrypted.
- +
virtual Status PrepareFragmentForEncryption(bool enable_encryption)
diff --git a/docs/d1/dd5/classshaka_1_1media_1_1Cluster.html b/docs/d1/dd5/classshaka_1_1media_1_1Cluster.html index 59610c2747..ced4664dfa 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 3fa56be05f..72f209374b 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 9c7f0c2f6c..2002183749 100644 --- a/docs/d1/de2/classshaka_1_1media_1_1VideoStreamInfo-members.html +++ b/docs/d1/de2/classshaka_1_1media_1_1VideoStreamInfo-members.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d1/de2/composition__offset__iterator_8cc_source.html b/docs/d1/de2/composition__offset__iterator_8cc_source.html index adfcc928b8..283d994831 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 1d05bd3687..1e6d4467d8 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 3628ce3b5f..67dc16b2a1 100644 --- a/docs/d1/de7/classshaka_1_1xml_1_1AdaptationSetXmlNode.html +++ b/docs/d1/de7/classshaka_1_1xml_1_1AdaptationSetXmlNode.html @@ -197,7 +197,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 cd4edd83e2..ec9f96886c 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 4710b6d1a5..6a56fbb49a 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 55617d15b6..e62f16d046 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 22a54db4f7..842f6f3839 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 @@ -187,7 +187,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1114 of file box_definitions.cc.

+

Definition at line 1115 of file box_definitions.cc.

@@ -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 69aa3da564..f128438583 100644 --- a/docs/d1/df0/aes__encryptor_8h_source.html +++ b/docs/d1/df0/aes__encryptor_8h_source.html @@ -195,7 +195,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 bf42106869..7aec038693 100644 --- a/docs/d1/df3/structshaka_1_1MpdOptions.html +++ b/docs/d1/df3/structshaka_1_1MpdOptions.html @@ -127,7 +127,7 @@ double suggested_presentat diff --git a/docs/d1/df5/nalu__reader_8cc_source.html b/docs/d1/df5/nalu__reader_8cc_source.html index 726e1dca44..58c1ded760 100644 --- a/docs/d1/df5/nalu__reader_8cc_source.html +++ b/docs/d1/df5/nalu__reader_8cc_source.html @@ -434,7 +434,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 d8f7d9c8ea..8340effeae 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 5a1ab0fb53..3fc8e03957 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 c9d59ffdcd..67e23227d9 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 c8a0214ce8..18e49ad14f 100644 --- a/docs/d2/d0f/classshaka_1_1MpdBuilder-members.html +++ b/docs/d2/d0f/classshaka_1_1MpdBuilder-members.html @@ -109,7 +109,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 e468ebb3f1..65c96b597b 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 @@ -132,7 +132,7 @@ int64_t 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 527765477a..188d645e37 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 07b18a92d5..f9c87013c7 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 d204acb2a9..e285dc7933 100644 --- a/docs/d2/d23/threaded__io__file_8cc_source.html +++ b/docs/d2/d23/threaded__io__file_8cc_source.html @@ -315,7 +315,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 1249a6c3b2..667e1035fc 100644 --- a/docs/d2/d24/packager__util_8h_source.html +++ b/docs/d2/d24/packager__util_8h_source.html @@ -141,7 +141,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 85f96b6d5e..ea6a0cf488 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 @@ -328,7 +328,7 @@ void set_encryption_key diff --git a/docs/d2/d30/tracks__builder_8cc_source.html b/docs/d2/d30/tracks__builder_8cc_source.html index cd39480870..ad417faafa 100644 --- a/docs/d2/d30/tracks__builder_8cc_source.html +++ b/docs/d2/d30/tracks__builder_8cc_source.html @@ -487,7 +487,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 9c8acf0863..59512637f8 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 a930071389..262ed9c177 100644 --- a/docs/d2/d35/classshaka_1_1media_1_1WidevineKeySource-members.html +++ b/docs/d2/d35/classshaka_1_1media_1_1WidevineKeySource-members.html @@ -119,7 +119,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 025921b819..c5c7d84e2e 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 d5c6c100e2..2a867e269a 100644 --- a/docs/d2/d45/program__map__table__writer_8cc_source.html +++ b/docs/d2/d45/program__map__table__writer_8cc_source.html @@ -467,7 +467,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
378  // -12 because there are 12 bytes between 'descriptor_length' in
379  // registration_descriptor and 'setup_data_length' in audio_setup_information.
380  if (aac_audio_specific_config_.size() >
-
381  std::numeric_limits<uint8_t>::max() - 12) {
+
381  std::numeric_limits<uint8_t>::max() - 12U) {
382  LOG(ERROR) << "AACAudioSpecificConfig of size: "
383  << aac_audio_specific_config_.size()
384  << " will not fit in the descriptor.";
@@ -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 aece94de3f..7d7b86c6f5 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 @@ -291,7 +291,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 2c691ad0d7..174d4a38da 100644 --- a/docs/d2/d4d/file_8h_source.html +++ b/docs/d2/d4d/file_8h_source.html @@ -171,27 +171,27 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
152 
153 #endif // PACKAGER_FILE_FILE_H_
virtual bool Open()=0
Internal open. Should not be used directly.
-
static File * OpenWithNoBuffering(const char *file_name, const char *mode)
Definition: file.cc:151
-
static bool Copy(const char *from_file_name, const char *to_file_name)
Definition: file.cc:202
+
static File * OpenWithNoBuffering(const char *file_name, const char *mode)
Definition: file.cc:156
+
static bool Copy(const char *from_file_name, const char *to_file_name)
Definition: file.cc:207
virtual int64_t Size()=0
virtual ~File()
Definition: file.h:132
virtual bool Close()=0
virtual int64_t Write(const void *buffer, uint64_t length)=0
Define an abstract file interface.
Definition: file.h:24
virtual int64_t Read(void *buffer, uint64_t length)=0
-
static int64_t CopyFile(File *source, File *destination)
Definition: file.cc:231
+
static int64_t CopyFile(File *source, File *destination)
Definition: file.cc:236
virtual bool Tell(uint64_t *position)=0
const std::string & file_name() const
Definition: file.h:91
-
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:175
-
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:184
+
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:180
+
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:189
virtual bool Flush()=0
virtual bool Seek(uint64_t position)=0
Declaration of class which implements a thread-safe circular buffer.
-
static bool Delete(const char *file_name)
Definition: file.cc:162
+
static bool Delete(const char *file_name)
Definition: file.cc:167
diff --git a/docs/d2/d4f/structshaka_1_1Element-members.html b/docs/d2/d4f/structshaka_1_1Element-members.html index 2e60938f4e..caeff49fbe 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 97892026eb..5fd14feac6 100644 --- a/docs/d2/d51/classshaka_1_1MockMpdNotifier-members.html +++ b/docs/d2/d51/classshaka_1_1MockMpdNotifier-members.html @@ -115,7 +115,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 4d39f32c84..81a6bc9a4f 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 8d327bc952..f6734ad318 100644 --- a/docs/d2/d5b/classshaka_1_1media_1_1KeySource-members.html +++ b/docs/d2/d5b/classshaka_1_1media_1_1KeySource-members.html @@ -113,7 +113,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 c5c812f43a..769635d70c 100644 --- a/docs/d2/d5c/classshaka_1_1SimpleMpdNotifier-members.html +++ b/docs/d2/d5c/classshaka_1_1SimpleMpdNotifier-members.html @@ -109,7 +109,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 46ec6afbfd..cfebbadcd2 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 95f8eb5e4e..e0fabde8b6 100644 --- a/docs/d2/d62/simple__mpd__notifier_8h_source.html +++ b/docs/d2/d62/simple__mpd__notifier_8h_source.html @@ -186,7 +186,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 b781d10b73..55c7d77c95 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 0c65d2ade3..6b98d402c4 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 4ea2654dd1..55dfa2f3d7 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 541388376a..b1dbcaa58c 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 470 of file box_definitions.cc.

+

Definition at line 471 of file box_definitions.cc.

@@ -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 add33e5b9a..1dbe98a63d 100644 --- a/docs/d2/d7b/classshaka_1_1DashIopMpdNotifier-members.html +++ b/docs/d2/d7b/classshaka_1_1DashIopMpdNotifier-members.html @@ -109,7 +109,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 eac108e223..8caf87db53 100644 --- a/docs/d2/d7b/simple__mpd__notifier_8cc_source.html +++ b/docs/d2/d7b/simple__mpd__notifier_8cc_source.html @@ -231,7 +231,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
std::string Uint8VectorToBase64(const std::vector< uint8_t > &input)
Converts uint8 vector into base64 encoded string.
bool NotifySampleDuration(uint32_t container_id, uint32_t sample_duration) override
bool NotifyEncryptionUpdate(uint32_t container_id, const std::string &drm_uuid, const std::vector< uint8_t > &new_key_id, const std::vector< uint8_t > &new_pssh) override
-
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:647
+
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:646
ContentType GetContentType(const MediaInfo &media_info)
bool WriteMpdToFile(const std::string &output_path, MpdBuilder *mpd_builder)
@@ -239,7 +239,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 f0ef77b5e3..96eef595a2 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 e4628922a6..b471cb7eda 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2672 of file box_definitions.cc.

+

Definition at line 2673 of file box_definitions.cc.

@@ -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 77d7542fdd..1fb0d75bfe 100644 --- a/docs/d2/d8a/hls__notify__muxer__listener_8h_source.html +++ b/docs/d2/d8a/hls__notify__muxer__listener_8h_source.html @@ -175,7 +175,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 ee65e70325..db069f7fdc 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 21bd431935..7771740265 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 576a0c33e1..74b81378fb 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 c2577e93a1..c429ecb8aa 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 05c54ac869..55801069f6 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 2ed4e9f3ec..b59764e715 100644 --- a/docs/d2/da8/mp4_2segmenter_8cc_source.html +++ b/docs/d2/da8/mp4_2segmenter_8cc_source.html @@ -191,388 +191,389 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
102  track_encryption.default_per_sample_iv_size = 0;
103  track_encryption.default_constant_iv = encryption_key.iv;
104  } else {
-
105  track_encryption.default_per_sample_iv_size = encryption_key.iv.size();
-
106  }
-
107  track_encryption.default_crypt_byte_block = pattern.crypt_byte_block;
-
108  track_encryption.default_skip_byte_block = pattern.skip_byte_block;
-
109  track_encryption.default_kid = encryption_key.key_id;
-
110 }
-
111 
-
112 void GenerateEncryptedSampleEntry(const EncryptionKey& encryption_key,
-
113  double clear_lead_in_seconds,
-
114  FourCC protection_scheme,
-
115  ProtectionPattern pattern,
-
116  SampleDescription* description) {
-
117  DCHECK(description);
-
118  if (description->type == kVideo) {
-
119  DCHECK_EQ(1u, description->video_entries.size());
-
120 
-
121  // Add a second entry for clear content if needed.
-
122  if (clear_lead_in_seconds > 0)
-
123  description->video_entries.push_back(description->video_entries[0]);
-
124 
-
125  // Convert the first entry to an encrypted entry.
-
126  VideoSampleEntry& entry = description->video_entries[0];
-
127  GenerateSinf(encryption_key, entry.format, protection_scheme, pattern,
-
128  &entry.sinf);
-
129  entry.format = FOURCC_encv;
-
130  } else {
-
131  DCHECK_EQ(kAudio, description->type);
-
132  DCHECK_EQ(1u, description->audio_entries.size());
-
133 
-
134  // Add a second entry for clear content if needed.
-
135  if (clear_lead_in_seconds > 0)
-
136  description->audio_entries.push_back(description->audio_entries[0]);
-
137 
-
138  // Convert the first entry to an encrypted entry.
-
139  AudioSampleEntry& entry = description->audio_entries[0];
-
140  GenerateSinf(encryption_key, entry.format, protection_scheme, pattern,
-
141  &entry.sinf);
-
142  entry.format = FOURCC_enca;
-
143  }
-
144 }
-
145 
-
146 } // namespace
-
147 
-
148 Segmenter::Segmenter(const MuxerOptions& options,
-
149  scoped_ptr<FileType> ftyp,
-
150  scoped_ptr<Movie> moov)
-
151  : options_(options),
-
152  ftyp_(ftyp.Pass()),
-
153  moov_(moov.Pass()),
-
154  moof_(new MovieFragment()),
-
155  fragment_buffer_(new BufferWriter()),
-
156  sidx_(new SegmentIndex()),
-
157  muxer_listener_(NULL),
-
158  progress_listener_(NULL),
-
159  progress_target_(0),
-
160  accumulated_progress_(0),
-
161  sample_duration_(0u) {}
-
162 
-
163 Segmenter::~Segmenter() { STLDeleteElements(&fragmenters_); }
-
164 
-
165 Status Segmenter::Initialize(const std::vector<MediaStream*>& streams,
-
166  MuxerListener* muxer_listener,
-
167  ProgressListener* progress_listener,
-
168  KeySource* encryption_key_source,
-
169  uint32_t max_sd_pixels,
-
170  double clear_lead_in_seconds,
-
171  double crypto_period_duration_in_seconds,
-
172  FourCC protection_scheme) {
-
173  DCHECK_LT(0u, streams.size());
-
174  muxer_listener_ = muxer_listener;
-
175  progress_listener_ = progress_listener;
-
176  moof_->header.sequence_number = 0;
-
177 
-
178  moof_->tracks.resize(streams.size());
-
179  segment_durations_.resize(streams.size());
-
180  fragmenters_.resize(streams.size());
-
181  const bool key_rotation_enabled = crypto_period_duration_in_seconds != 0;
-
182  const bool kInitialEncryptionInfo = true;
-
183 
-
184  for (uint32_t i = 0; i < streams.size(); ++i) {
-
185  stream_map_[streams[i]] = i;
-
186  moof_->tracks[i].header.track_id = i + 1;
-
187  if (streams[i]->info()->stream_type() == kStreamVideo) {
-
188  // Use the first video stream as the reference stream (which is 1-based).
-
189  if (sidx_->reference_id == 0)
-
190  sidx_->reference_id = i + 1;
-
191  }
-
192  if (!encryption_key_source) {
-
193  fragmenters_[i] = new Fragmenter(streams[i]->info(), &moof_->tracks[i]);
-
194  continue;
-
195  }
-
196 
-
197  KeySource::TrackType track_type =
-
198  GetTrackTypeForEncryption(*streams[i]->info(), max_sd_pixels);
-
199  SampleDescription& description =
-
200  moov_->tracks[i].media.information.sample_table.description;
-
201  ProtectionPattern pattern =
-
202  GetProtectionPattern(protection_scheme, description.type);
-
203 
-
204  if (key_rotation_enabled) {
-
205  // Fill encrypted sample entry with default key.
-
206  EncryptionKey encryption_key;
-
207  encryption_key.key_id.assign(
-
208  kKeyRotationDefaultKeyId,
-
209  kKeyRotationDefaultKeyId + arraysize(kKeyRotationDefaultKeyId));
-
210  if (!AesCryptor::GenerateRandomIv(protection_scheme,
-
211  &encryption_key.iv)) {
-
212  return Status(error::INTERNAL_ERROR, "Failed to generate random iv.");
-
213  }
-
214  GenerateEncryptedSampleEntry(encryption_key, clear_lead_in_seconds,
-
215  protection_scheme, pattern, &description);
-
216  if (muxer_listener_) {
-
217  muxer_listener_->OnEncryptionInfoReady(
-
218  kInitialEncryptionInfo, protection_scheme, encryption_key.key_id,
-
219  encryption_key.iv, encryption_key.key_system_info);
-
220  }
-
221 
-
222  fragmenters_[i] = new KeyRotationFragmenter(
-
223  moof_.get(), streams[i]->info(), &moof_->tracks[i],
-
224  encryption_key_source, track_type,
-
225  crypto_period_duration_in_seconds * streams[i]->info()->time_scale(),
-
226  clear_lead_in_seconds * streams[i]->info()->time_scale(),
-
227  protection_scheme, pattern.crypt_byte_block, pattern.skip_byte_block,
-
228  muxer_listener_);
-
229  continue;
-
230  }
-
231 
-
232  scoped_ptr<EncryptionKey> encryption_key(new EncryptionKey());
-
233  Status status =
-
234  encryption_key_source->GetKey(track_type, encryption_key.get());
-
235  if (!status.ok())
-
236  return status;
-
237  if (encryption_key->iv.empty()) {
-
238  if (!AesCryptor::GenerateRandomIv(protection_scheme,
-
239  &encryption_key->iv)) {
-
240  return Status(error::INTERNAL_ERROR, "Failed to generate random iv.");
-
241  }
-
242  }
-
243 
-
244  GenerateEncryptedSampleEntry(*encryption_key, clear_lead_in_seconds,
-
245  protection_scheme, pattern, &description);
-
246 
-
247  if (moov_->pssh.empty()) {
-
248  moov_->pssh.resize(encryption_key->key_system_info.size());
-
249  for (size_t i = 0; i < encryption_key->key_system_info.size(); i++) {
-
250  moov_->pssh[i].raw_box = encryption_key->key_system_info[i].CreateBox();
-
251  }
-
252 
-
253  if (muxer_listener_) {
-
254  muxer_listener_->OnEncryptionInfoReady(
-
255  kInitialEncryptionInfo, protection_scheme, encryption_key->key_id,
-
256  encryption_key->iv, encryption_key->key_system_info);
-
257  }
-
258  }
-
259 
-
260  fragmenters_[i] = new EncryptingFragmenter(
-
261  streams[i]->info(), &moof_->tracks[i], encryption_key.Pass(),
-
262  clear_lead_in_seconds * streams[i]->info()->time_scale(),
-
263  protection_scheme, pattern.crypt_byte_block, pattern.skip_byte_block,
-
264  muxer_listener_);
-
265  }
-
266 
- -
268  for (uint32_t i = 0; i < streams.size(); ++i)
-
269  fragmenters_[i]->set_use_decoding_timestamp_in_timeline(true);
-
270  }
-
271 
-
272  // Choose the first stream if there is no VIDEO.
-
273  if (sidx_->reference_id == 0)
-
274  sidx_->reference_id = 1;
-
275  sidx_->timescale = streams[GetReferenceStreamId()]->info()->time_scale();
-
276 
-
277  // Use media duration as progress target.
-
278  progress_target_ = streams[GetReferenceStreamId()]->info()->duration();
-
279 
-
280  // Use the reference stream's time scale as movie time scale.
-
281  moov_->header.timescale = sidx_->timescale;
-
282  moof_->header.sequence_number = 1;
-
283 
-
284  // Fill in version information.
-
285  const std::string version = GetPackagerVersion();
-
286  if (!version.empty()) {
-
287  moov_->metadata.handler.handler_type = FOURCC_ID32;
-
288  moov_->metadata.id3v2.language.code = "eng";
-
289  moov_->metadata.id3v2.private_frame.owner = GetPackagerProjectUrl();
-
290  moov_->metadata.id3v2.private_frame.value = version;
-
291  }
-
292  return DoInitialize();
-
293 }
-
294 
- -
296  for (std::vector<Fragmenter*>::iterator it = fragmenters_.begin();
-
297  it != fragmenters_.end();
-
298  ++it) {
-
299  Status status = FinalizeFragment(true, *it);
-
300  if (!status.ok())
-
301  return status;
-
302  }
-
303 
-
304  // Set tracks and moov durations.
-
305  // Note that the updated moov box will be written to output file for VOD case
-
306  // only.
-
307  for (std::vector<Track>::iterator track = moov_->tracks.begin();
-
308  track != moov_->tracks.end();
-
309  ++track) {
-
310  track->header.duration = Rescale(track->media.header.duration,
-
311  track->media.header.timescale,
-
312  moov_->header.timescale);
-
313  if (track->header.duration > moov_->header.duration)
-
314  moov_->header.duration = track->header.duration;
-
315  }
-
316  moov_->extends.header.fragment_duration = moov_->header.duration;
-
317 
-
318  return DoFinalize();
-
319 }
-
320 
- -
322  scoped_refptr<MediaSample> sample) {
-
323  // Find the fragmenter for this stream.
-
324  DCHECK(stream);
-
325  DCHECK(stream_map_.find(stream) != stream_map_.end());
-
326  uint32_t stream_id = stream_map_[stream];
-
327  Fragmenter* fragmenter = fragmenters_[stream_id];
-
328 
-
329  // Set default sample duration if it has not been set yet.
-
330  if (moov_->extends.tracks[stream_id].default_sample_duration == 0) {
-
331  moov_->extends.tracks[stream_id].default_sample_duration =
-
332  sample->duration();
-
333  }
-
334 
-
335  if (fragmenter->fragment_finalized()) {
-
336  return Status(error::FRAGMENT_FINALIZED,
-
337  "Current fragment is finalized already.");
-
338  }
-
339 
-
340  bool finalize_fragment = false;
-
341  if (fragmenter->fragment_duration() >=
-
342  options_.fragment_duration * stream->info()->time_scale()) {
-
343  if (sample->is_key_frame() || !options_.fragment_sap_aligned) {
-
344  finalize_fragment = true;
-
345  }
-
346  }
-
347  bool finalize_segment = false;
-
348  if (segment_durations_[stream_id] >=
-
349  options_.segment_duration * stream->info()->time_scale()) {
-
350  if (sample->is_key_frame() || !options_.segment_sap_aligned) {
-
351  finalize_segment = true;
-
352  finalize_fragment = true;
-
353  }
-
354  }
-
355 
-
356  Status status;
-
357  if (finalize_fragment) {
-
358  status = FinalizeFragment(finalize_segment, fragmenter);
-
359  if (!status.ok())
-
360  return status;
-
361  }
-
362 
-
363  status = fragmenter->AddSample(sample);
-
364  if (!status.ok())
-
365  return status;
-
366 
-
367  if (sample_duration_ == 0)
-
368  sample_duration_ = sample->duration();
-
369  moov_->tracks[stream_id].media.header.duration += sample->duration();
-
370  segment_durations_[stream_id] += sample->duration();
-
371  DCHECK_GE(segment_durations_[stream_id], fragmenter->fragment_duration());
-
372  return Status::OK;
-
373 }
-
374 
-
375 uint32_t Segmenter::GetReferenceTimeScale() const {
-
376  return moov_->header.timescale;
-
377 }
-
378 
-
379 double Segmenter::GetDuration() const {
-
380  if (moov_->header.timescale == 0) {
-
381  // Handling the case where this is not properly initialized.
-
382  return 0.0;
-
383  }
-
384 
-
385  return static_cast<double>(moov_->header.duration) / moov_->header.timescale;
-
386 }
-
387 
-
388 void Segmenter::UpdateProgress(uint64_t progress) {
-
389  accumulated_progress_ += progress;
-
390 
-
391  if (!progress_listener_) return;
-
392  if (progress_target_ == 0) return;
-
393  // It might happen that accumulated progress exceeds progress_target due to
-
394  // computation errors, e.g. rounding error. Cap it so it never reports > 100%
-
395  // progress.
-
396  if (accumulated_progress_ >= progress_target_) {
-
397  progress_listener_->OnProgress(1.0);
-
398  } else {
-
399  progress_listener_->OnProgress(static_cast<double>(accumulated_progress_) /
-
400  progress_target_);
-
401  }
-
402 }
-
403 
-
404 void Segmenter::SetComplete() {
-
405  if (!progress_listener_) return;
-
406  progress_listener_->OnProgress(1.0);
-
407 }
-
408 
-
409 Status Segmenter::FinalizeSegment() {
-
410  Status status = DoFinalizeSegment();
-
411 
-
412  // Reset segment information to initial state.
-
413  sidx_->references.clear();
-
414  std::vector<uint64_t>::iterator it = segment_durations_.begin();
-
415  for (; it != segment_durations_.end(); ++it)
-
416  *it = 0;
-
417 
-
418  return status;
-
419 }
-
420 
-
421 uint32_t Segmenter::GetReferenceStreamId() {
-
422  DCHECK(sidx_);
-
423  return sidx_->reference_id - 1;
-
424 }
-
425 
-
426 Status Segmenter::FinalizeFragment(bool finalize_segment,
-
427  Fragmenter* fragmenter) {
-
428  fragmenter->FinalizeFragment();
-
429 
-
430  // Check if all tracks are ready for fragmentation.
-
431  for (std::vector<Fragmenter*>::iterator it = fragmenters_.begin();
-
432  it != fragmenters_.end();
-
433  ++it) {
-
434  if (!(*it)->fragment_finalized())
-
435  return Status::OK;
-
436  }
-
437 
-
438  MediaData mdat;
-
439  // Data offset relative to 'moof': moof size + mdat header size.
-
440  // The code will also update box sizes for moof_ and its child boxes.
-
441  uint64_t data_offset = moof_->ComputeSize() + mdat.HeaderSize();
-
442  // 'traf' should follow 'mfhd' moof header box.
-
443  uint64_t next_traf_position = moof_->HeaderSize() + moof_->header.box_size();
-
444  for (size_t i = 0; i < moof_->tracks.size(); ++i) {
-
445  TrackFragment& traf = moof_->tracks[i];
-
446  if (traf.auxiliary_offset.offsets.size() > 0) {
-
447  DCHECK_EQ(traf.auxiliary_offset.offsets.size(), 1u);
-
448  DCHECK(!traf.sample_encryption.sample_encryption_entries.empty());
-
449 
-
450  next_traf_position += traf.box_size();
-
451  // SampleEncryption 'senc' box should be the last box in 'traf'.
-
452  // |auxiliary_offset| should point to the data of SampleEncryption.
-
453  traf.auxiliary_offset.offsets[0] =
-
454  next_traf_position - traf.sample_encryption.box_size() +
-
455  traf.sample_encryption.HeaderSize() +
-
456  sizeof(uint32_t); // for sample count field in 'senc'
-
457  }
-
458  traf.runs[0].data_offset = data_offset + mdat.data_size;
-
459  mdat.data_size += fragmenters_[i]->data()->Size();
-
460  }
-
461 
-
462  // Generate segment reference.
-
463  sidx_->references.resize(sidx_->references.size() + 1);
-
464  fragmenters_[GetReferenceStreamId()]->GenerateSegmentReference(
-
465  &sidx_->references[sidx_->references.size() - 1]);
-
466  sidx_->references[sidx_->references.size() - 1].referenced_size =
-
467  data_offset + mdat.data_size;
-
468 
-
469  // Write the fragment to buffer.
-
470  moof_->Write(fragment_buffer_.get());
-
471  mdat.WriteHeader(fragment_buffer_.get());
-
472  for (Fragmenter* fragmenter : fragmenters_)
-
473  fragment_buffer_->AppendBuffer(*fragmenter->data());
-
474 
-
475  // Increase sequence_number for next fragment.
-
476  ++moof_->header.sequence_number;
-
477 
-
478  if (finalize_segment)
-
479  return FinalizeSegment();
-
480 
-
481  return Status::OK;
-
482 }
-
483 
-
484 } // namespace mp4
-
485 } // namespace media
-
486 } // namespace shaka
+
105  track_encryption.default_per_sample_iv_size =
+
106  static_cast<uint8_t>(encryption_key.iv.size());
+
107  }
+
108  track_encryption.default_crypt_byte_block = pattern.crypt_byte_block;
+
109  track_encryption.default_skip_byte_block = pattern.skip_byte_block;
+
110  track_encryption.default_kid = encryption_key.key_id;
+
111 }
+
112 
+
113 void GenerateEncryptedSampleEntry(const EncryptionKey& encryption_key,
+
114  double clear_lead_in_seconds,
+
115  FourCC protection_scheme,
+
116  ProtectionPattern pattern,
+
117  SampleDescription* description) {
+
118  DCHECK(description);
+
119  if (description->type == kVideo) {
+
120  DCHECK_EQ(1u, description->video_entries.size());
+
121 
+
122  // Add a second entry for clear content if needed.
+
123  if (clear_lead_in_seconds > 0)
+
124  description->video_entries.push_back(description->video_entries[0]);
+
125 
+
126  // Convert the first entry to an encrypted entry.
+
127  VideoSampleEntry& entry = description->video_entries[0];
+
128  GenerateSinf(encryption_key, entry.format, protection_scheme, pattern,
+
129  &entry.sinf);
+
130  entry.format = FOURCC_encv;
+
131  } else {
+
132  DCHECK_EQ(kAudio, description->type);
+
133  DCHECK_EQ(1u, description->audio_entries.size());
+
134 
+
135  // Add a second entry for clear content if needed.
+
136  if (clear_lead_in_seconds > 0)
+
137  description->audio_entries.push_back(description->audio_entries[0]);
+
138 
+
139  // Convert the first entry to an encrypted entry.
+
140  AudioSampleEntry& entry = description->audio_entries[0];
+
141  GenerateSinf(encryption_key, entry.format, protection_scheme, pattern,
+
142  &entry.sinf);
+
143  entry.format = FOURCC_enca;
+
144  }
+
145 }
+
146 
+
147 } // namespace
+
148 
+
149 Segmenter::Segmenter(const MuxerOptions& options,
+
150  scoped_ptr<FileType> ftyp,
+
151  scoped_ptr<Movie> moov)
+
152  : options_(options),
+
153  ftyp_(ftyp.Pass()),
+
154  moov_(moov.Pass()),
+
155  moof_(new MovieFragment()),
+
156  fragment_buffer_(new BufferWriter()),
+
157  sidx_(new SegmentIndex()),
+
158  muxer_listener_(NULL),
+
159  progress_listener_(NULL),
+
160  progress_target_(0),
+
161  accumulated_progress_(0),
+
162  sample_duration_(0u) {}
+
163 
+
164 Segmenter::~Segmenter() { STLDeleteElements(&fragmenters_); }
+
165 
+
166 Status Segmenter::Initialize(const std::vector<MediaStream*>& streams,
+
167  MuxerListener* muxer_listener,
+
168  ProgressListener* progress_listener,
+
169  KeySource* encryption_key_source,
+
170  uint32_t max_sd_pixels,
+
171  double clear_lead_in_seconds,
+
172  double crypto_period_duration_in_seconds,
+
173  FourCC protection_scheme) {
+
174  DCHECK_LT(0u, streams.size());
+
175  muxer_listener_ = muxer_listener;
+
176  progress_listener_ = progress_listener;
+
177  moof_->header.sequence_number = 0;
+
178 
+
179  moof_->tracks.resize(streams.size());
+
180  segment_durations_.resize(streams.size());
+
181  fragmenters_.resize(streams.size());
+
182  const bool key_rotation_enabled = crypto_period_duration_in_seconds != 0;
+
183  const bool kInitialEncryptionInfo = true;
+
184 
+
185  for (uint32_t i = 0; i < streams.size(); ++i) {
+
186  stream_map_[streams[i]] = i;
+
187  moof_->tracks[i].header.track_id = i + 1;
+
188  if (streams[i]->info()->stream_type() == kStreamVideo) {
+
189  // Use the first video stream as the reference stream (which is 1-based).
+
190  if (sidx_->reference_id == 0)
+
191  sidx_->reference_id = i + 1;
+
192  }
+
193  if (!encryption_key_source) {
+
194  fragmenters_[i] = new Fragmenter(streams[i]->info(), &moof_->tracks[i]);
+
195  continue;
+
196  }
+
197 
+
198  KeySource::TrackType track_type =
+
199  GetTrackTypeForEncryption(*streams[i]->info(), max_sd_pixels);
+
200  SampleDescription& description =
+
201  moov_->tracks[i].media.information.sample_table.description;
+
202  ProtectionPattern pattern =
+
203  GetProtectionPattern(protection_scheme, description.type);
+
204 
+
205  if (key_rotation_enabled) {
+
206  // Fill encrypted sample entry with default key.
+
207  EncryptionKey encryption_key;
+
208  encryption_key.key_id.assign(
+
209  kKeyRotationDefaultKeyId,
+
210  kKeyRotationDefaultKeyId + arraysize(kKeyRotationDefaultKeyId));
+
211  if (!AesCryptor::GenerateRandomIv(protection_scheme,
+
212  &encryption_key.iv)) {
+
213  return Status(error::INTERNAL_ERROR, "Failed to generate random iv.");
+
214  }
+
215  GenerateEncryptedSampleEntry(encryption_key, clear_lead_in_seconds,
+
216  protection_scheme, pattern, &description);
+
217  if (muxer_listener_) {
+
218  muxer_listener_->OnEncryptionInfoReady(
+
219  kInitialEncryptionInfo, protection_scheme, encryption_key.key_id,
+
220  encryption_key.iv, encryption_key.key_system_info);
+
221  }
+
222 
+
223  fragmenters_[i] = new KeyRotationFragmenter(
+
224  moof_.get(), streams[i]->info(), &moof_->tracks[i],
+
225  encryption_key_source, track_type,
+
226  crypto_period_duration_in_seconds * streams[i]->info()->time_scale(),
+
227  clear_lead_in_seconds * streams[i]->info()->time_scale(),
+
228  protection_scheme, pattern.crypt_byte_block, pattern.skip_byte_block,
+
229  muxer_listener_);
+
230  continue;
+
231  }
+
232 
+
233  scoped_ptr<EncryptionKey> encryption_key(new EncryptionKey());
+
234  Status status =
+
235  encryption_key_source->GetKey(track_type, encryption_key.get());
+
236  if (!status.ok())
+
237  return status;
+
238  if (encryption_key->iv.empty()) {
+
239  if (!AesCryptor::GenerateRandomIv(protection_scheme,
+
240  &encryption_key->iv)) {
+
241  return Status(error::INTERNAL_ERROR, "Failed to generate random iv.");
+
242  }
+
243  }
+
244 
+
245  GenerateEncryptedSampleEntry(*encryption_key, clear_lead_in_seconds,
+
246  protection_scheme, pattern, &description);
+
247 
+
248  if (moov_->pssh.empty()) {
+
249  moov_->pssh.resize(encryption_key->key_system_info.size());
+
250  for (size_t i = 0; i < encryption_key->key_system_info.size(); i++) {
+
251  moov_->pssh[i].raw_box = encryption_key->key_system_info[i].CreateBox();
+
252  }
+
253 
+
254  if (muxer_listener_) {
+
255  muxer_listener_->OnEncryptionInfoReady(
+
256  kInitialEncryptionInfo, protection_scheme, encryption_key->key_id,
+
257  encryption_key->iv, encryption_key->key_system_info);
+
258  }
+
259  }
+
260 
+
261  fragmenters_[i] = new EncryptingFragmenter(
+
262  streams[i]->info(), &moof_->tracks[i], encryption_key.Pass(),
+
263  clear_lead_in_seconds * streams[i]->info()->time_scale(),
+
264  protection_scheme, pattern.crypt_byte_block, pattern.skip_byte_block,
+
265  muxer_listener_);
+
266  }
+
267 
+ +
269  for (uint32_t i = 0; i < streams.size(); ++i)
+
270  fragmenters_[i]->set_use_decoding_timestamp_in_timeline(true);
+
271  }
+
272 
+
273  // Choose the first stream if there is no VIDEO.
+
274  if (sidx_->reference_id == 0)
+
275  sidx_->reference_id = 1;
+
276  sidx_->timescale = streams[GetReferenceStreamId()]->info()->time_scale();
+
277 
+
278  // Use media duration as progress target.
+
279  progress_target_ = streams[GetReferenceStreamId()]->info()->duration();
+
280 
+
281  // Use the reference stream's time scale as movie time scale.
+
282  moov_->header.timescale = sidx_->timescale;
+
283  moof_->header.sequence_number = 1;
+
284 
+
285  // Fill in version information.
+
286  const std::string version = GetPackagerVersion();
+
287  if (!version.empty()) {
+
288  moov_->metadata.handler.handler_type = FOURCC_ID32;
+
289  moov_->metadata.id3v2.language.code = "eng";
+
290  moov_->metadata.id3v2.private_frame.owner = GetPackagerProjectUrl();
+
291  moov_->metadata.id3v2.private_frame.value = version;
+
292  }
+
293  return DoInitialize();
+
294 }
+
295 
+ +
297  for (std::vector<Fragmenter*>::iterator it = fragmenters_.begin();
+
298  it != fragmenters_.end();
+
299  ++it) {
+
300  Status status = FinalizeFragment(true, *it);
+
301  if (!status.ok())
+
302  return status;
+
303  }
+
304 
+
305  // Set tracks and moov durations.
+
306  // Note that the updated moov box will be written to output file for VOD case
+
307  // only.
+
308  for (std::vector<Track>::iterator track = moov_->tracks.begin();
+
309  track != moov_->tracks.end();
+
310  ++track) {
+
311  track->header.duration = Rescale(track->media.header.duration,
+
312  track->media.header.timescale,
+
313  moov_->header.timescale);
+
314  if (track->header.duration > moov_->header.duration)
+
315  moov_->header.duration = track->header.duration;
+
316  }
+
317  moov_->extends.header.fragment_duration = moov_->header.duration;
+
318 
+
319  return DoFinalize();
+
320 }
+
321 
+ +
323  scoped_refptr<MediaSample> sample) {
+
324  // Find the fragmenter for this stream.
+
325  DCHECK(stream);
+
326  DCHECK(stream_map_.find(stream) != stream_map_.end());
+
327  uint32_t stream_id = stream_map_[stream];
+
328  Fragmenter* fragmenter = fragmenters_[stream_id];
+
329 
+
330  // Set default sample duration if it has not been set yet.
+
331  if (moov_->extends.tracks[stream_id].default_sample_duration == 0) {
+
332  moov_->extends.tracks[stream_id].default_sample_duration =
+
333  sample->duration();
+
334  }
+
335 
+
336  if (fragmenter->fragment_finalized()) {
+
337  return Status(error::FRAGMENT_FINALIZED,
+
338  "Current fragment is finalized already.");
+
339  }
+
340 
+
341  bool finalize_fragment = false;
+
342  if (fragmenter->fragment_duration() >=
+
343  options_.fragment_duration * stream->info()->time_scale()) {
+
344  if (sample->is_key_frame() || !options_.fragment_sap_aligned) {
+
345  finalize_fragment = true;
+
346  }
+
347  }
+
348  bool finalize_segment = false;
+
349  if (segment_durations_[stream_id] >=
+
350  options_.segment_duration * stream->info()->time_scale()) {
+
351  if (sample->is_key_frame() || !options_.segment_sap_aligned) {
+
352  finalize_segment = true;
+
353  finalize_fragment = true;
+
354  }
+
355  }
+
356 
+
357  Status status;
+
358  if (finalize_fragment) {
+
359  status = FinalizeFragment(finalize_segment, fragmenter);
+
360  if (!status.ok())
+
361  return status;
+
362  }
+
363 
+
364  status = fragmenter->AddSample(sample);
+
365  if (!status.ok())
+
366  return status;
+
367 
+
368  if (sample_duration_ == 0)
+
369  sample_duration_ = sample->duration();
+
370  moov_->tracks[stream_id].media.header.duration += sample->duration();
+
371  segment_durations_[stream_id] += sample->duration();
+
372  DCHECK_GE(segment_durations_[stream_id], fragmenter->fragment_duration());
+
373  return Status::OK;
+
374 }
+
375 
+
376 uint32_t Segmenter::GetReferenceTimeScale() const {
+
377  return moov_->header.timescale;
+
378 }
+
379 
+
380 double Segmenter::GetDuration() const {
+
381  if (moov_->header.timescale == 0) {
+
382  // Handling the case where this is not properly initialized.
+
383  return 0.0;
+
384  }
+
385 
+
386  return static_cast<double>(moov_->header.duration) / moov_->header.timescale;
+
387 }
+
388 
+
389 void Segmenter::UpdateProgress(uint64_t progress) {
+
390  accumulated_progress_ += progress;
+
391 
+
392  if (!progress_listener_) return;
+
393  if (progress_target_ == 0) return;
+
394  // It might happen that accumulated progress exceeds progress_target due to
+
395  // computation errors, e.g. rounding error. Cap it so it never reports > 100%
+
396  // progress.
+
397  if (accumulated_progress_ >= progress_target_) {
+
398  progress_listener_->OnProgress(1.0);
+
399  } else {
+
400  progress_listener_->OnProgress(static_cast<double>(accumulated_progress_) /
+
401  progress_target_);
+
402  }
+
403 }
+
404 
+
405 void Segmenter::SetComplete() {
+
406  if (!progress_listener_) return;
+
407  progress_listener_->OnProgress(1.0);
+
408 }
+
409 
+
410 Status Segmenter::FinalizeSegment() {
+
411  Status status = DoFinalizeSegment();
+
412 
+
413  // Reset segment information to initial state.
+
414  sidx_->references.clear();
+
415  std::vector<uint64_t>::iterator it = segment_durations_.begin();
+
416  for (; it != segment_durations_.end(); ++it)
+
417  *it = 0;
+
418 
+
419  return status;
+
420 }
+
421 
+
422 uint32_t Segmenter::GetReferenceStreamId() {
+
423  DCHECK(sidx_);
+
424  return sidx_->reference_id - 1;
+
425 }
+
426 
+
427 Status Segmenter::FinalizeFragment(bool finalize_segment,
+
428  Fragmenter* fragmenter) {
+
429  fragmenter->FinalizeFragment();
+
430 
+
431  // Check if all tracks are ready for fragmentation.
+
432  for (std::vector<Fragmenter*>::iterator it = fragmenters_.begin();
+
433  it != fragmenters_.end();
+
434  ++it) {
+
435  if (!(*it)->fragment_finalized())
+
436  return Status::OK;
+
437  }
+
438 
+
439  MediaData mdat;
+
440  // Data offset relative to 'moof': moof size + mdat header size.
+
441  // The code will also update box sizes for moof_ and its child boxes.
+
442  uint64_t data_offset = moof_->ComputeSize() + mdat.HeaderSize();
+
443  // 'traf' should follow 'mfhd' moof header box.
+
444  uint64_t next_traf_position = moof_->HeaderSize() + moof_->header.box_size();
+
445  for (size_t i = 0; i < moof_->tracks.size(); ++i) {
+
446  TrackFragment& traf = moof_->tracks[i];
+
447  if (traf.auxiliary_offset.offsets.size() > 0) {
+
448  DCHECK_EQ(traf.auxiliary_offset.offsets.size(), 1u);
+
449  DCHECK(!traf.sample_encryption.sample_encryption_entries.empty());
+
450 
+
451  next_traf_position += traf.box_size();
+
452  // SampleEncryption 'senc' box should be the last box in 'traf'.
+
453  // |auxiliary_offset| should point to the data of SampleEncryption.
+
454  traf.auxiliary_offset.offsets[0] =
+
455  next_traf_position - traf.sample_encryption.box_size() +
+
456  traf.sample_encryption.HeaderSize() +
+
457  sizeof(uint32_t); // for sample count field in 'senc'
+
458  }
+
459  traf.runs[0].data_offset = data_offset + mdat.data_size;
+
460  mdat.data_size += fragmenters_[i]->data()->Size();
+
461  }
+
462 
+
463  // Generate segment reference.
+
464  sidx_->references.resize(sidx_->references.size() + 1);
+
465  fragmenters_[GetReferenceStreamId()]->GenerateSegmentReference(
+
466  &sidx_->references[sidx_->references.size() - 1]);
+
467  sidx_->references[sidx_->references.size() - 1].referenced_size =
+
468  data_offset + mdat.data_size;
+
469 
+
470  // Write the fragment to buffer.
+
471  moof_->Write(fragment_buffer_.get());
+
472  mdat.WriteHeader(fragment_buffer_.get());
+
473  for (Fragmenter* fragmenter : fragmenters_)
+
474  fragment_buffer_->AppendBuffer(*fragmenter->data());
+
475 
+
476  // Increase sequence_number for next fragment.
+
477  ++moof_->header.sequence_number;
+
478 
+
479  if (finalize_segment)
+
480  return FinalizeSegment();
+
481 
+
482  return Status::OK;
+
483 }
+
484 
+
485 } // namespace mp4
+
486 } // namespace media
+
487 } // namespace shaka
Status AddSample(scoped_refptr< MediaSample > sample)
Definition: segmenter.cc:117
@@ -600,7 +601,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 c82aa3f6ad..74edfc355c 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 fa2934cdb9..49c4703b50 100644 --- a/docs/d2/dae/classshaka_1_1MockAdaptationSet-members.html +++ b/docs/d2/dae/classshaka_1_1MockAdaptationSet-members.html @@ -126,7 +126,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 62162f95b3..4a970628b0 100644 --- a/docs/d2/dae/webm__muxer_8cc_source.html +++ b/docs/d2/dae/webm__muxer_8cc_source.html @@ -216,7 +216,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
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
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:175
+
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:180
virtual void OnMediaStart(const MuxerOptions &muxer_options, const StreamInfo &stream_info, uint32_t time_scale, ContainerType container_type)=0
@@ -225,7 +225,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 082023afed..b360338aa3 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 a22579356e..45677b9053 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 cb37c604c9..ad3e364168 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 9b89b9530b..891e59e002 100644 --- a/docs/d2/dba/classshaka_1_1media_1_1SegmentTestBase.html +++ b/docs/d2/dba/classshaka_1_1media_1_1SegmentTestBase.html @@ -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 7f29119e22..dfa0002b27 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 8d50b77a79..2e6dcdb948 100644 --- a/docs/d2/dc7/structshaka_1_1MpdOptions-members.html +++ b/docs/d2/dc7/structshaka_1_1MpdOptions-members.html @@ -103,7 +103,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 4124f201d4..33862a4b1c 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 a9d1591aae..1815b1709f 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 697e6be3a5..c76ed6b97a 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 @@ -277,7 +277,7 @@ double cluster_length_sec< diff --git a/docs/d2/dd6/mkv__writer_8h_source.html b/docs/d2/dd6/mkv__writer_8h_source.html index 5a87edca3b..4e78cc2ddd 100644 --- a/docs/d2/dd6/mkv__writer_8h_source.html +++ b/docs/d2/dd6/mkv__writer_8h_source.html @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
51  mkvmuxer::int64 position) override;
52 
55  int64_t WriteFromFile(File* source);
-
59  int64_t WriteFromFile(File* source, uint64_t max_copy);
+
59  int64_t WriteFromFile(File* source, int64_t max_copy);
60 
61  File* file() { return file_.get(); }
62 
@@ -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 fa36997046..ce9e89dfd5 100644 --- a/docs/d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html +++ b/docs/d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html @@ -256,7 +256,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 0b971739b1..92a9d6dad5 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 30c725b676..135e09ada0 100644 --- a/docs/d2/de6/packager__main_8cc_source.html +++ b/docs/d2/de6/packager__main_8cc_source.html @@ -109,550 +109,590 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
20 #include "packager/base/command_line.h"
21 #include "packager/base/files/file_path.h"
22 #include "packager/base/logging.h"
-
23 #include "packager/base/stl_util.h"
-
24 #include "packager/base/strings/string_split.h"
-
25 #include "packager/base/strings/stringprintf.h"
-
26 #include "packager/base/threading/simple_thread.h"
-
27 #include "packager/base/time/clock.h"
-
28 #include "packager/hls/base/hls_notifier.h"
-
29 #include "packager/hls/base/simple_hls_notifier.h"
-
30 #include "packager/media/base/container_names.h"
-
31 #include "packager/media/base/demuxer.h"
-
32 #include "packager/media/base/fourccs.h"
-
33 #include "packager/media/base/key_source.h"
-
34 #include "packager/media/base/muxer_options.h"
-
35 #include "packager/media/base/muxer_util.h"
-
36 #include "packager/media/event/hls_notify_muxer_listener.h"
-
37 #include "packager/media/event/mpd_notify_muxer_listener.h"
-
38 #include "packager/media/event/vod_media_info_dump_muxer_listener.h"
-
39 #include "packager/media/file/file.h"
-
40 #include "packager/media/formats/mp2t/ts_muxer.h"
-
41 #include "packager/media/formats/mp4/mp4_muxer.h"
-
42 #include "packager/media/formats/webm/webm_muxer.h"
-
43 #include "packager/mpd/base/dash_iop_mpd_notifier.h"
-
44 #include "packager/mpd/base/media_info.pb.h"
-
45 #include "packager/mpd/base/mpd_builder.h"
-
46 #include "packager/mpd/base/simple_mpd_notifier.h"
-
47 #include "packager/version/version.h"
-
48 
-
49 DEFINE_bool(use_fake_clock_for_muxer,
-
50  false,
-
51  "Set to true to use a fake clock for muxer. With this flag set, "
-
52  "creation time and modification time in outputs are set to 0. "
-
53  "Should only be used for testing.");
-
54 DEFINE_bool(override_version,
-
55  false,
-
56  "Override packager version in the generated outputs with "
-
57  "--test_version if it is set to true. Should be used for "
-
58  "testing only.");
-
59 DEFINE_string(test_version,
-
60  "",
-
61  "Packager version for testing. Ignored if --override_version is "
-
62  "false. Should be used for testing only.");
-
63 
-
64 namespace shaka {
-
65 namespace media {
-
66 namespace {
-
67 
-
68 const char kUsage[] =
-
69  "Packager driver program. Usage:\n\n"
-
70  "%s [flags] <stream_descriptor> ...\n"
-
71  "stream_descriptor consists of comma separated field_name/value pairs:\n"
-
72  "field_name=value,[field_name=value,]...\n"
-
73  "Supported field names are as follows:\n"
-
74  " - input (in): Required input/source media file path or network stream\n"
-
75  " URL.\n"
-
76  " - stream_selector (stream): Required field with value 'audio',\n"
-
77  " 'video', or stream number (zero based).\n"
-
78  " - output (out): Required output file (single file) or initialization\n"
-
79  " file path (multiple file).\n"
-
80  " - segment_template (segment): Optional value which specifies the\n"
-
81  " naming pattern for the segment files, and that the stream should be\n"
-
82  " split into multiple files. Its presence should be consistent across\n"
-
83  " streams.\n"
-
84  " - bandwidth (bw): Optional value which contains a user-specified\n"
-
85  " content bit rate for the stream, in bits/sec. If specified, this\n"
-
86  " value is propagated to the $Bandwidth$ template parameter for\n"
-
87  " segment names. If not specified, its value may be estimated.\n"
-
88  " - language (lang): Optional value which contains a user-specified\n"
-
89  " language tag. If specified, this value overrides any language\n"
-
90  " metadata in the input track.\n"
-
91  " - output_format (format): Optional value which specifies the format\n"
-
92  " of the output files (MP4 or WebM). If not specified, it will be\n"
-
93  " derived from the file extension of the output file.\n"
-
94  " - hls_name: Required for audio when outputting HLS.\n"
-
95  " name of the output stream. This is not (necessarily) the same as\n"
-
96  " output. This is used as the NAME attribute for EXT-X-MEDIA\n"
-
97  " - hls_group_id: Required for audio when outputting HLS.\n"
-
98  " The group ID for the output stream. For HLS this is used as the\n"
-
99  " GROUP-ID attribute for EXT-X-MEDIA.\n"
-
100  " - playlist_name: Required for HLS output.\n"
-
101  " Name of the playlist for the stream. Usually ends with '.m3u8'.\n";
-
102 
-
103 const char kMediaInfoSuffix[] = ".media_info";
-
104 
-
105 enum ExitStatus {
-
106  kSuccess = 0,
-
107  kArgumentValidationFailed,
-
108  kPackagingFailed,
-
109  kInternalError,
-
110 };
+
23 #include "packager/base/path_service.h"
+
24 #include "packager/base/stl_util.h"
+
25 #include "packager/base/strings/string_split.h"
+
26 #include "packager/base/strings/stringprintf.h"
+
27 #include "packager/base/threading/simple_thread.h"
+
28 #include "packager/base/time/clock.h"
+
29 #include "packager/hls/base/hls_notifier.h"
+
30 #include "packager/hls/base/simple_hls_notifier.h"
+
31 #include "packager/media/base/container_names.h"
+
32 #include "packager/media/base/demuxer.h"
+
33 #include "packager/media/base/fourccs.h"
+
34 #include "packager/media/base/key_source.h"
+
35 #include "packager/media/base/muxer_options.h"
+
36 #include "packager/media/base/muxer_util.h"
+
37 #include "packager/media/event/hls_notify_muxer_listener.h"
+
38 #include "packager/media/event/mpd_notify_muxer_listener.h"
+
39 #include "packager/media/event/vod_media_info_dump_muxer_listener.h"
+
40 #include "packager/media/file/file.h"
+
41 #include "packager/media/formats/mp2t/ts_muxer.h"
+
42 #include "packager/media/formats/mp4/mp4_muxer.h"
+
43 #include "packager/media/formats/webm/webm_muxer.h"
+
44 #include "packager/mpd/base/dash_iop_mpd_notifier.h"
+
45 #include "packager/mpd/base/media_info.pb.h"
+
46 #include "packager/mpd/base/mpd_builder.h"
+
47 #include "packager/mpd/base/simple_mpd_notifier.h"
+
48 #include "packager/version/version.h"
+
49 
+
50 #if defined(OS_WIN)
+
51 #include <codecvt>
+
52 #include <functional>
+
53 #include <locale>
+
54 #endif // defined(OS_WIN)
+
55 
+
56 DEFINE_bool(use_fake_clock_for_muxer,
+
57  false,
+
58  "Set to true to use a fake clock for muxer. With this flag set, "
+
59  "creation time and modification time in outputs are set to 0. "
+
60  "Should only be used for testing.");
+
61 DEFINE_bool(override_version,
+
62  false,
+
63  "Override packager version in the generated outputs with "
+
64  "--test_version if it is set to true. Should be used for "
+
65  "testing only.");
+
66 DEFINE_string(test_version,
+
67  "",
+
68  "Packager version for testing. Ignored if --override_version is "
+
69  "false. Should be used for testing only.");
+
70 
+
71 namespace shaka {
+
72 namespace media {
+
73 namespace {
+
74 
+
75 const char kUsage[] =
+
76  "Packager driver program. Usage:\n\n"
+
77  "%s [flags] <stream_descriptor> ...\n"
+
78  "stream_descriptor consists of comma separated field_name/value pairs:\n"
+
79  "field_name=value,[field_name=value,]...\n"
+
80  "Supported field names are as follows:\n"
+
81  " - input (in): Required input/source media file path or network stream\n"
+
82  " URL.\n"
+
83  " - stream_selector (stream): Required field with value 'audio',\n"
+
84  " 'video', or stream number (zero based).\n"
+
85  " - output (out): Required output file (single file) or initialization\n"
+
86  " file path (multiple file).\n"
+
87  " - segment_template (segment): Optional value which specifies the\n"
+
88  " naming pattern for the segment files, and that the stream should be\n"
+
89  " split into multiple files. Its presence should be consistent across\n"
+
90  " streams.\n"
+
91  " - bandwidth (bw): Optional value which contains a user-specified\n"
+
92  " content bit rate for the stream, in bits/sec. If specified, this\n"
+
93  " value is propagated to the $Bandwidth$ template parameter for\n"
+
94  " segment names. If not specified, its value may be estimated.\n"
+
95  " - language (lang): Optional value which contains a user-specified\n"
+
96  " language tag. If specified, this value overrides any language\n"
+
97  " metadata in the input track.\n"
+
98  " - output_format (format): Optional value which specifies the format\n"
+
99  " of the output files (MP4 or WebM). If not specified, it will be\n"
+
100  " derived from the file extension of the output file.\n"
+
101  " - hls_name: Required for audio when outputting HLS.\n"
+
102  " name of the output stream. This is not (necessarily) the same as\n"
+
103  " output. This is used as the NAME attribute for EXT-X-MEDIA\n"
+
104  " - hls_group_id: Required for audio when outputting HLS.\n"
+
105  " The group ID for the output stream. For HLS this is used as the\n"
+
106  " GROUP-ID attribute for EXT-X-MEDIA.\n"
+
107  " - playlist_name: Required for HLS output.\n"
+
108  " Name of the playlist for the stream. Usually ends with '.m3u8'.\n";
+
109 
+
110 const char kMediaInfoSuffix[] = ".media_info";
111 
-
112 // TODO(rkuroiwa): Write TTML and WebVTT parser (demuxing) for a better check
-
113 // and for supporting live/segmenting (muxing). With a demuxer and a muxer,
-
114 // CreateRemuxJobs() shouldn't treat text as a special case.
-
115 std::string DetermineTextFileFormat(const std::string& file) {
-
116  std::string content;
-
117  if (!File::ReadFileToString(file.c_str(), &content)) {
-
118  LOG(ERROR) << "Failed to open file " << file
-
119  << " to determine file format.";
-
120  return "";
-
121  }
-
122  MediaContainerName container_name = DetermineContainer(
-
123  reinterpret_cast<const uint8_t*>(content.data()), content.size());
-
124  if (container_name == CONTAINER_WEBVTT) {
-
125  return "vtt";
-
126  } else if (container_name == CONTAINER_TTML) {
-
127  return "ttml";
+
112 enum ExitStatus {
+
113  kSuccess = 0,
+
114  kArgumentValidationFailed,
+
115  kPackagingFailed,
+
116  kInternalError,
+
117 };
+
118 
+
119 // TODO(rkuroiwa): Write TTML and WebVTT parser (demuxing) for a better check
+
120 // and for supporting live/segmenting (muxing). With a demuxer and a muxer,
+
121 // CreateRemuxJobs() shouldn't treat text as a special case.
+
122 std::string DetermineTextFileFormat(const std::string& file) {
+
123  std::string content;
+
124  if (!File::ReadFileToString(file.c_str(), &content)) {
+
125  LOG(ERROR) << "Failed to open file " << file
+
126  << " to determine file format.";
+
127  return "";
128  }
-
129 
-
130  return "";
-
131 }
-
132 
-
133 FourCC GetProtectionScheme(const std::string& protection_scheme) {
-
134  if (protection_scheme == "cenc") {
-
135  return FOURCC_cenc;
-
136  } else if (protection_scheme == "cens") {
-
137  return FOURCC_cens;
-
138  } else if (protection_scheme == "cbc1") {
-
139  return FOURCC_cbc1;
-
140  } else if (protection_scheme == "cbcs") {
-
141  return FOURCC_cbcs;
-
142  } else {
-
143  LOG(ERROR) << "Unknown protection scheme: " << protection_scheme;
-
144  return FOURCC_NULL;
-
145  }
-
146 }
-
147 
-
148 } // namespace
-
149 
-
150 // A fake clock that always return time 0 (epoch). Should only be used for
-
151 // testing.
-
152 class FakeClock : public base::Clock {
-
153  public:
-
154  base::Time Now() override { return base::Time(); }
-
155 };
+
129  MediaContainerName container_name = DetermineContainer(
+
130  reinterpret_cast<const uint8_t*>(content.data()), content.size());
+
131  if (container_name == CONTAINER_WEBVTT) {
+
132  return "vtt";
+
133  } else if (container_name == CONTAINER_TTML) {
+
134  return "ttml";
+
135  }
+
136 
+
137  return "";
+
138 }
+
139 
+
140 FourCC GetProtectionScheme(const std::string& protection_scheme) {
+
141  if (protection_scheme == "cenc") {
+
142  return FOURCC_cenc;
+
143  } else if (protection_scheme == "cens") {
+
144  return FOURCC_cens;
+
145  } else if (protection_scheme == "cbc1") {
+
146  return FOURCC_cbc1;
+
147  } else if (protection_scheme == "cbcs") {
+
148  return FOURCC_cbcs;
+
149  } else {
+
150  LOG(ERROR) << "Unknown protection scheme: " << protection_scheme;
+
151  return FOURCC_NULL;
+
152  }
+
153 }
+
154 
+
155 } // namespace
156 
-
157 // Demux, Mux(es) and worker thread used to remux a source file/stream.
-
158 class RemuxJob : public base::SimpleThread {
-
159  public:
-
160  RemuxJob(scoped_ptr<Demuxer> demuxer)
-
161  : SimpleThread("RemuxJob"),
-
162  demuxer_(demuxer.Pass()) {}
+
157 // A fake clock that always return time 0 (epoch). Should only be used for
+
158 // testing.
+
159 class FakeClock : public base::Clock {
+
160  public:
+
161  base::Time Now() override { return base::Time(); }
+
162 };
163 
-
164  ~RemuxJob() override {
-
165  STLDeleteElements(&muxers_);
-
166  }
-
167 
-
168  void AddMuxer(scoped_ptr<Muxer> mux) {
-
169  muxers_.push_back(mux.release());
-
170  }
-
171 
-
172  Demuxer* demuxer() { return demuxer_.get(); }
-
173  Status status() { return status_; }
+
164 // Demux, Mux(es) and worker thread used to remux a source file/stream.
+
165 class RemuxJob : public base::SimpleThread {
+
166  public:
+
167  RemuxJob(scoped_ptr<Demuxer> demuxer)
+
168  : SimpleThread("RemuxJob"),
+
169  demuxer_(demuxer.Pass()) {}
+
170 
+
171  ~RemuxJob() override {
+
172  STLDeleteElements(&muxers_);
+
173  }
174 
-
175  private:
-
176  void Run() override {
-
177  DCHECK(demuxer_);
-
178  status_ = demuxer_->Run();
-
179  }
-
180 
-
181  scoped_ptr<Demuxer> demuxer_;
-
182  std::vector<Muxer*> muxers_;
-
183  Status status_;
-
184 
-
185  DISALLOW_COPY_AND_ASSIGN(RemuxJob);
-
186 };
+
175  void AddMuxer(scoped_ptr<Muxer> mux) {
+
176  muxers_.push_back(mux.release());
+
177  }
+
178 
+
179  Demuxer* demuxer() { return demuxer_.get(); }
+
180  Status status() { return status_; }
+
181 
+
182  private:
+
183  void Run() override {
+
184  DCHECK(demuxer_);
+
185  status_ = demuxer_->Run();
+
186  }
187 
-
188 bool StreamInfoToTextMediaInfo(const StreamDescriptor& stream_descriptor,
-
189  const MuxerOptions& stream_muxer_options,
-
190  MediaInfo* text_media_info) {
-
191  const std::string& language = stream_descriptor.language;
-
192  std::string format = DetermineTextFileFormat(stream_descriptor.input);
-
193  if (format.empty()) {
-
194  LOG(ERROR) << "Failed to determine the text file format for "
-
195  << stream_descriptor.input;
-
196  return false;
-
197  }
-
198 
-
199  if (!File::Copy(stream_descriptor.input.c_str(),
-
200  stream_muxer_options.output_file_name.c_str())) {
-
201  LOG(ERROR) << "Failed to copy the input file (" << stream_descriptor.input
-
202  << ") to output file (" << stream_muxer_options.output_file_name
-
203  << ").";
-
204  return false;
-
205  }
-
206 
-
207  text_media_info->set_media_file_name(stream_muxer_options.output_file_name);
-
208  text_media_info->set_container_type(MediaInfo::CONTAINER_TEXT);
-
209 
-
210  if (stream_muxer_options.bandwidth != 0) {
-
211  text_media_info->set_bandwidth(stream_muxer_options.bandwidth);
-
212  } else {
-
213  // Text files are usually small and since the input is one file; there's no
-
214  // way for the player to do ranged requests. So set this value to something
-
215  // reasonable.
-
216  text_media_info->set_bandwidth(256);
-
217  }
-
218 
-
219  MediaInfo::TextInfo* text_info = text_media_info->mutable_text_info();
-
220  text_info->set_format(format);
-
221  if (!language.empty())
-
222  text_info->set_language(language);
-
223 
-
224  return true;
-
225 }
-
226 
-
227 scoped_ptr<Muxer> CreateOutputMuxer(const MuxerOptions& options,
-
228  MediaContainerName container) {
-
229  if (container == CONTAINER_WEBM) {
-
230  return scoped_ptr<Muxer>(new webm::WebMMuxer(options));
-
231  } else if (container == CONTAINER_MPEG2TS) {
-
232  return scoped_ptr<Muxer>(new mp2t::TsMuxer(options));
-
233  } else {
-
234  DCHECK_EQ(container, CONTAINER_MOV);
-
235  return scoped_ptr<Muxer>(new mp4::MP4Muxer(options));
-
236  }
-
237 }
-
238 
-
239 bool CreateRemuxJobs(const StreamDescriptorList& stream_descriptors,
-
240  const MuxerOptions& muxer_options,
-
241  FakeClock* fake_clock,
-
242  KeySource* key_source,
-
243  MpdNotifier* mpd_notifier,
-
244  hls::HlsNotifier* hls_notifier,
-
245  std::vector<RemuxJob*>* remux_jobs) {
-
246  // No notifiers OR (mpd_notifier XOR hls_notifier); which is NAND.
-
247  DCHECK(!(mpd_notifier && hls_notifier));
-
248  DCHECK(remux_jobs);
-
249 
-
250  std::string previous_input;
-
251  int stream_number = 0;
-
252  for (StreamDescriptorList::const_iterator
-
253  stream_iter = stream_descriptors.begin();
-
254  stream_iter != stream_descriptors.end();
-
255  ++stream_iter, ++stream_number) {
-
256  // Process stream descriptor.
-
257  MuxerOptions stream_muxer_options(muxer_options);
-
258  stream_muxer_options.output_file_name = stream_iter->output;
-
259  if (!stream_iter->segment_template.empty()) {
-
260  if (!ValidateSegmentTemplate(stream_iter->segment_template)) {
-
261  LOG(ERROR) << "ERROR: segment template with '"
-
262  << stream_iter->segment_template << "' is invalid.";
-
263  return false;
-
264  }
-
265  stream_muxer_options.segment_template = stream_iter->segment_template;
-
266  if (stream_muxer_options.single_segment) {
-
267  LOG(WARNING) << "Segment template and single segment are incompatible, "
-
268  "setting single segment to false.";
-
269  stream_muxer_options.single_segment = false;
-
270  }
-
271  }
-
272  stream_muxer_options.bandwidth = stream_iter->bandwidth;
-
273 
-
274  // Handle text input.
-
275  if (stream_iter->stream_selector == "text") {
-
276  MediaInfo text_media_info;
-
277  if (!StreamInfoToTextMediaInfo(*stream_iter, stream_muxer_options,
-
278  &text_media_info)) {
-
279  return false;
-
280  }
-
281 
-
282  if (mpd_notifier) {
-
283  uint32 unused;
-
284  if (!mpd_notifier->NotifyNewContainer(text_media_info, &unused)) {
-
285  LOG(ERROR) << "Failed to process text file " << stream_iter->input;
-
286  } else {
-
287  mpd_notifier->Flush();
-
288  }
-
289  } else if (FLAGS_output_media_info) {
- -
291  text_media_info,
-
292  stream_muxer_options.output_file_name + kMediaInfoSuffix);
-
293  } else {
-
294  NOTIMPLEMENTED()
-
295  << "--mpd_output or --output_media_info flags are "
-
296  "required for text output. Skipping manifest related output for "
-
297  << stream_iter->input;
-
298  }
-
299  continue;
-
300  }
-
301 
-
302  if (stream_iter->input != previous_input) {
-
303  // New remux job needed. Create demux and job thread.
-
304  scoped_ptr<Demuxer> demuxer(new Demuxer(stream_iter->input));
-
305  if (FLAGS_enable_widevine_decryption ||
-
306  FLAGS_enable_fixed_key_decryption) {
-
307  scoped_ptr<KeySource> key_source(CreateDecryptionKeySource());
-
308  if (!key_source)
-
309  return false;
-
310  demuxer->SetKeySource(key_source.Pass());
-
311  }
-
312  Status status = demuxer->Initialize();
-
313  if (!status.ok()) {
-
314  LOG(ERROR) << "Demuxer failed to initialize: " << status.ToString();
-
315  return false;
-
316  }
-
317  if (FLAGS_dump_stream_info) {
-
318  printf("\nFile \"%s\":\n", stream_iter->input.c_str());
-
319  DumpStreamInfo(demuxer->streams());
-
320  if (stream_iter->output.empty())
-
321  continue; // just need stream info.
-
322  }
-
323  remux_jobs->push_back(new RemuxJob(demuxer.Pass()));
-
324  previous_input = stream_iter->input;
-
325  }
-
326  DCHECK(!remux_jobs->empty());
-
327 
-
328  scoped_ptr<Muxer> muxer(
-
329  CreateOutputMuxer(stream_muxer_options, stream_iter->output_format));
-
330  if (FLAGS_use_fake_clock_for_muxer) muxer->set_clock(fake_clock);
-
331 
-
332  if (key_source) {
-
333  muxer->SetKeySource(key_source,
-
334  FLAGS_max_sd_pixels,
-
335  FLAGS_clear_lead,
-
336  FLAGS_crypto_period_duration,
-
337  GetProtectionScheme(FLAGS_protection_scheme));
-
338  }
-
339 
-
340  scoped_ptr<MuxerListener> muxer_listener;
-
341  DCHECK(!(FLAGS_output_media_info && mpd_notifier));
-
342  if (FLAGS_output_media_info) {
-
343  const std::string output_media_info_file_name =
-
344  stream_muxer_options.output_file_name + kMediaInfoSuffix;
-
345  scoped_ptr<VodMediaInfoDumpMuxerListener>
-
346  vod_media_info_dump_muxer_listener(
-
347  new VodMediaInfoDumpMuxerListener(output_media_info_file_name));
-
348  muxer_listener = vod_media_info_dump_muxer_listener.Pass();
-
349  }
-
350  if (mpd_notifier) {
-
351  scoped_ptr<MpdNotifyMuxerListener> mpd_notify_muxer_listener(
-
352  new MpdNotifyMuxerListener(mpd_notifier));
-
353  muxer_listener = mpd_notify_muxer_listener.Pass();
-
354  }
-
355 
-
356  if (hls_notifier) {
-
357  // TODO(rkuroiwa): Do some smart stuff to group the audios, e.g. detect
-
358  // languages.
-
359  std::string group_id = stream_iter->hls_group_id;
-
360  std::string name = stream_iter->hls_name;
-
361  std::string hls_playlist_name = stream_iter->hls_playlist_name;
-
362  if (group_id.empty())
-
363  group_id = "audio";
-
364  if (name.empty())
-
365  name = base::StringPrintf("stream_%d", stream_number);
-
366  if (hls_playlist_name.empty())
-
367  hls_playlist_name = base::StringPrintf("stream_%d.m3u8", stream_number);
-
368 
-
369  muxer_listener.reset(new HlsNotifyMuxerListener(hls_playlist_name, name,
-
370  group_id, hls_notifier));
-
371  }
-
372 
-
373  if (muxer_listener)
-
374  muxer->SetMuxerListener(muxer_listener.Pass());
+
188  scoped_ptr<Demuxer> demuxer_;
+
189  std::vector<Muxer*> muxers_;
+
190  Status status_;
+
191 
+
192  DISALLOW_COPY_AND_ASSIGN(RemuxJob);
+
193 };
+
194 
+
195 bool StreamInfoToTextMediaInfo(const StreamDescriptor& stream_descriptor,
+
196  const MuxerOptions& stream_muxer_options,
+
197  MediaInfo* text_media_info) {
+
198  const std::string& language = stream_descriptor.language;
+
199  std::string format = DetermineTextFileFormat(stream_descriptor.input);
+
200  if (format.empty()) {
+
201  LOG(ERROR) << "Failed to determine the text file format for "
+
202  << stream_descriptor.input;
+
203  return false;
+
204  }
+
205 
+
206  if (!File::Copy(stream_descriptor.input.c_str(),
+
207  stream_muxer_options.output_file_name.c_str())) {
+
208  LOG(ERROR) << "Failed to copy the input file (" << stream_descriptor.input
+
209  << ") to output file (" << stream_muxer_options.output_file_name
+
210  << ").";
+
211  return false;
+
212  }
+
213 
+
214  text_media_info->set_media_file_name(stream_muxer_options.output_file_name);
+
215  text_media_info->set_container_type(MediaInfo::CONTAINER_TEXT);
+
216 
+
217  if (stream_muxer_options.bandwidth != 0) {
+
218  text_media_info->set_bandwidth(stream_muxer_options.bandwidth);
+
219  } else {
+
220  // Text files are usually small and since the input is one file; there's no
+
221  // way for the player to do ranged requests. So set this value to something
+
222  // reasonable.
+
223  text_media_info->set_bandwidth(256);
+
224  }
+
225 
+
226  MediaInfo::TextInfo* text_info = text_media_info->mutable_text_info();
+
227  text_info->set_format(format);
+
228  if (!language.empty())
+
229  text_info->set_language(language);
+
230 
+
231  return true;
+
232 }
+
233 
+
234 scoped_ptr<Muxer> CreateOutputMuxer(const MuxerOptions& options,
+
235  MediaContainerName container) {
+
236  if (container == CONTAINER_WEBM) {
+
237  return scoped_ptr<Muxer>(new webm::WebMMuxer(options));
+
238  } else if (container == CONTAINER_MPEG2TS) {
+
239  return scoped_ptr<Muxer>(new mp2t::TsMuxer(options));
+
240  } else {
+
241  DCHECK_EQ(container, CONTAINER_MOV);
+
242  return scoped_ptr<Muxer>(new mp4::MP4Muxer(options));
+
243  }
+
244 }
+
245 
+
246 bool CreateRemuxJobs(const StreamDescriptorList& stream_descriptors,
+
247  const MuxerOptions& muxer_options,
+
248  FakeClock* fake_clock,
+
249  KeySource* key_source,
+
250  MpdNotifier* mpd_notifier,
+
251  hls::HlsNotifier* hls_notifier,
+
252  std::vector<RemuxJob*>* remux_jobs) {
+
253  // No notifiers OR (mpd_notifier XOR hls_notifier); which is NAND.
+
254  DCHECK(!(mpd_notifier && hls_notifier));
+
255  DCHECK(remux_jobs);
+
256 
+
257  std::string previous_input;
+
258  int stream_number = 0;
+
259  for (StreamDescriptorList::const_iterator
+
260  stream_iter = stream_descriptors.begin();
+
261  stream_iter != stream_descriptors.end();
+
262  ++stream_iter, ++stream_number) {
+
263  // Process stream descriptor.
+
264  MuxerOptions stream_muxer_options(muxer_options);
+
265  stream_muxer_options.output_file_name = stream_iter->output;
+
266  if (!stream_iter->segment_template.empty()) {
+
267  if (!ValidateSegmentTemplate(stream_iter->segment_template)) {
+
268  LOG(ERROR) << "ERROR: segment template with '"
+
269  << stream_iter->segment_template << "' is invalid.";
+
270  return false;
+
271  }
+
272  stream_muxer_options.segment_template = stream_iter->segment_template;
+
273  if (stream_muxer_options.single_segment) {
+
274  LOG(WARNING) << "Segment template and single segment are incompatible, "
+
275  "setting single segment to false.";
+
276  stream_muxer_options.single_segment = false;
+
277  }
+
278  }
+
279  stream_muxer_options.bandwidth = stream_iter->bandwidth;
+
280 
+
281  // Handle text input.
+
282  if (stream_iter->stream_selector == "text") {
+
283  MediaInfo text_media_info;
+
284  if (!StreamInfoToTextMediaInfo(*stream_iter, stream_muxer_options,
+
285  &text_media_info)) {
+
286  return false;
+
287  }
+
288 
+
289  if (mpd_notifier) {
+
290  uint32 unused;
+
291  if (!mpd_notifier->NotifyNewContainer(text_media_info, &unused)) {
+
292  LOG(ERROR) << "Failed to process text file " << stream_iter->input;
+
293  } else {
+
294  mpd_notifier->Flush();
+
295  }
+
296  } else if (FLAGS_output_media_info) {
+ +
298  text_media_info,
+
299  stream_muxer_options.output_file_name + kMediaInfoSuffix);
+
300  } else {
+
301  NOTIMPLEMENTED()
+
302  << "--mpd_output or --output_media_info flags are "
+
303  "required for text output. Skipping manifest related output for "
+
304  << stream_iter->input;
+
305  }
+
306  continue;
+
307  }
+
308 
+
309  if (stream_iter->input != previous_input) {
+
310  // New remux job needed. Create demux and job thread.
+
311  scoped_ptr<Demuxer> demuxer(new Demuxer(stream_iter->input));
+
312  if (FLAGS_enable_widevine_decryption ||
+
313  FLAGS_enable_fixed_key_decryption) {
+
314  scoped_ptr<KeySource> key_source(CreateDecryptionKeySource());
+
315  if (!key_source)
+
316  return false;
+
317  demuxer->SetKeySource(key_source.Pass());
+
318  }
+
319  Status status = demuxer->Initialize();
+
320  if (!status.ok()) {
+
321  LOG(ERROR) << "Demuxer failed to initialize: " << status.ToString();
+
322  return false;
+
323  }
+
324  if (FLAGS_dump_stream_info) {
+
325  printf("\nFile \"%s\":\n", stream_iter->input.c_str());
+
326  DumpStreamInfo(demuxer->streams());
+
327  if (stream_iter->output.empty())
+
328  continue; // just need stream info.
+
329  }
+
330  remux_jobs->push_back(new RemuxJob(demuxer.Pass()));
+
331  previous_input = stream_iter->input;
+
332  }
+
333  DCHECK(!remux_jobs->empty());
+
334 
+
335  scoped_ptr<Muxer> muxer(
+
336  CreateOutputMuxer(stream_muxer_options, stream_iter->output_format));
+
337  if (FLAGS_use_fake_clock_for_muxer) muxer->set_clock(fake_clock);
+
338 
+
339  if (key_source) {
+
340  muxer->SetKeySource(key_source,
+
341  FLAGS_max_sd_pixels,
+
342  FLAGS_clear_lead,
+
343  FLAGS_crypto_period_duration,
+
344  GetProtectionScheme(FLAGS_protection_scheme));
+
345  }
+
346 
+
347  scoped_ptr<MuxerListener> muxer_listener;
+
348  DCHECK(!(FLAGS_output_media_info && mpd_notifier));
+
349  if (FLAGS_output_media_info) {
+
350  const std::string output_media_info_file_name =
+
351  stream_muxer_options.output_file_name + kMediaInfoSuffix;
+
352  scoped_ptr<VodMediaInfoDumpMuxerListener>
+
353  vod_media_info_dump_muxer_listener(
+
354  new VodMediaInfoDumpMuxerListener(output_media_info_file_name));
+
355  muxer_listener = vod_media_info_dump_muxer_listener.Pass();
+
356  }
+
357  if (mpd_notifier) {
+
358  scoped_ptr<MpdNotifyMuxerListener> mpd_notify_muxer_listener(
+
359  new MpdNotifyMuxerListener(mpd_notifier));
+
360  muxer_listener = mpd_notify_muxer_listener.Pass();
+
361  }
+
362 
+
363  if (hls_notifier) {
+
364  // TODO(rkuroiwa): Do some smart stuff to group the audios, e.g. detect
+
365  // languages.
+
366  std::string group_id = stream_iter->hls_group_id;
+
367  std::string name = stream_iter->hls_name;
+
368  std::string hls_playlist_name = stream_iter->hls_playlist_name;
+
369  if (group_id.empty())
+
370  group_id = "audio";
+
371  if (name.empty())
+
372  name = base::StringPrintf("stream_%d", stream_number);
+
373  if (hls_playlist_name.empty())
+
374  hls_playlist_name = base::StringPrintf("stream_%d.m3u8", stream_number);
375 
-
376  if (!AddStreamToMuxer(remux_jobs->back()->demuxer()->streams(),
-
377  stream_iter->stream_selector,
-
378  stream_iter->language,
-
379  muxer.get())) {
-
380  return false;
-
381  }
-
382  remux_jobs->back()->AddMuxer(muxer.Pass());
-
383  }
-
384 
-
385  return true;
-
386 }
-
387 
-
388 Status RunRemuxJobs(const std::vector<RemuxJob*>& remux_jobs) {
-
389  // Start the job threads.
-
390  for (std::vector<RemuxJob*>::const_iterator job_iter = remux_jobs.begin();
-
391  job_iter != remux_jobs.end();
-
392  ++job_iter) {
-
393  (*job_iter)->Start();
-
394  }
-
395 
-
396  // Wait for all jobs to complete or an error occurs.
-
397  Status status;
-
398  bool all_joined;
-
399  do {
-
400  all_joined = true;
-
401  for (std::vector<RemuxJob*>::const_iterator job_iter = remux_jobs.begin();
-
402  job_iter != remux_jobs.end();
-
403  ++job_iter) {
-
404  if ((*job_iter)->HasBeenJoined()) {
-
405  status = (*job_iter)->status();
-
406  if (!status.ok())
-
407  break;
-
408  } else {
-
409  all_joined = false;
-
410  (*job_iter)->Join();
-
411  }
-
412  }
-
413  } while (!all_joined && status.ok());
-
414 
-
415  return status;
-
416 }
-
417 
-
418 bool RunPackager(const StreamDescriptorList& stream_descriptors) {
-
419  const FourCC protection_scheme = GetProtectionScheme(FLAGS_protection_scheme);
-
420  if (protection_scheme == FOURCC_NULL)
-
421  return false;
-
422 
-
423  if (!AssignFlagsFromProfile())
-
424  return false;
-
425 
-
426  if (FLAGS_output_media_info && !FLAGS_mpd_output.empty()) {
-
427  NOTIMPLEMENTED() << "ERROR: --output_media_info and --mpd_output do not "
-
428  "work together.";
-
429  return false;
-
430  }
-
431  if (FLAGS_output_media_info && !FLAGS_single_segment) {
-
432  // TODO(rkuroiwa, kqyang): Support partial media info dump for live.
-
433  NOTIMPLEMENTED() << "ERROR: --output_media_info is only supported if "
-
434  "--single_segment is true.";
-
435  return false;
-
436  }
-
437 
-
438  // Since there isn't a muxer listener that can output both MPD and HLS,
-
439  // disallow specifying both MPD and HLS flags.
-
440  if (!FLAGS_mpd_output.empty() && !FLAGS_hls_master_playlist_output.empty()) {
-
441  LOG(ERROR) << "Cannot output both MPD and HLS.";
+
376  muxer_listener.reset(new HlsNotifyMuxerListener(hls_playlist_name, name,
+
377  group_id, hls_notifier));
+
378  }
+
379 
+
380  if (muxer_listener)
+
381  muxer->SetMuxerListener(muxer_listener.Pass());
+
382 
+
383  if (!AddStreamToMuxer(remux_jobs->back()->demuxer()->streams(),
+
384  stream_iter->stream_selector,
+
385  stream_iter->language,
+
386  muxer.get())) {
+
387  return false;
+
388  }
+
389  remux_jobs->back()->AddMuxer(muxer.Pass());
+
390  }
+
391 
+
392  return true;
+
393 }
+
394 
+
395 Status RunRemuxJobs(const std::vector<RemuxJob*>& remux_jobs) {
+
396  // Start the job threads.
+
397  for (std::vector<RemuxJob*>::const_iterator job_iter = remux_jobs.begin();
+
398  job_iter != remux_jobs.end();
+
399  ++job_iter) {
+
400  (*job_iter)->Start();
+
401  }
+
402 
+
403  // Wait for all jobs to complete or an error occurs.
+
404  Status status;
+
405  bool all_joined;
+
406  do {
+
407  all_joined = true;
+
408  for (std::vector<RemuxJob*>::const_iterator job_iter = remux_jobs.begin();
+
409  job_iter != remux_jobs.end();
+
410  ++job_iter) {
+
411  if ((*job_iter)->HasBeenJoined()) {
+
412  status = (*job_iter)->status();
+
413  if (!status.ok())
+
414  break;
+
415  } else {
+
416  all_joined = false;
+
417  (*job_iter)->Join();
+
418  }
+
419  }
+
420  } while (!all_joined && status.ok());
+
421 
+
422  return status;
+
423 }
+
424 
+
425 bool RunPackager(const StreamDescriptorList& stream_descriptors) {
+
426  const FourCC protection_scheme = GetProtectionScheme(FLAGS_protection_scheme);
+
427  if (protection_scheme == FOURCC_NULL)
+
428  return false;
+
429 
+
430  if (!AssignFlagsFromProfile())
+
431  return false;
+
432 
+
433  if (FLAGS_output_media_info && !FLAGS_mpd_output.empty()) {
+
434  NOTIMPLEMENTED() << "ERROR: --output_media_info and --mpd_output do not "
+
435  "work together.";
+
436  return false;
+
437  }
+
438  if (FLAGS_output_media_info && !FLAGS_single_segment) {
+
439  // TODO(rkuroiwa, kqyang): Support partial media info dump for live.
+
440  NOTIMPLEMENTED() << "ERROR: --output_media_info is only supported if "
+
441  "--single_segment is true.";
442  return false;
443  }
444 
-
445  // Get basic muxer options.
-
446  MuxerOptions muxer_options;
-
447  if (!GetMuxerOptions(&muxer_options))
-
448  return false;
-
449 
-
450  MpdOptions mpd_options;
-
451  if (!GetMpdOptions(&mpd_options))
-
452  return false;
-
453 
-
454  // Create encryption key source if needed.
-
455  scoped_ptr<KeySource> encryption_key_source;
-
456  if (FLAGS_enable_widevine_encryption || FLAGS_enable_fixed_key_encryption) {
-
457  encryption_key_source = CreateEncryptionKeySource();
-
458  if (!encryption_key_source)
-
459  return false;
-
460  }
-
461 
-
462  scoped_ptr<MpdNotifier> mpd_notifier;
-
463  if (!FLAGS_mpd_output.empty()) {
-
464  DashProfile profile =
-
465  FLAGS_single_segment ? kOnDemandProfile : kLiveProfile;
-
466  std::vector<std::string> base_urls;
-
467  base::SplitString(FLAGS_base_urls, ',', &base_urls);
-
468  if (FLAGS_generate_dash_if_iop_compliant_mpd) {
-
469  mpd_notifier.reset(new DashIopMpdNotifier(profile, mpd_options, base_urls,
-
470  FLAGS_mpd_output));
-
471  } else {
-
472  mpd_notifier.reset(new SimpleMpdNotifier(profile, mpd_options, base_urls,
-
473  FLAGS_mpd_output));
-
474  }
-
475  if (!mpd_notifier->Init()) {
-
476  LOG(ERROR) << "MpdNotifier failed to initialize.";
-
477  return false;
-
478  }
-
479  }
-
480 
-
481  scoped_ptr<hls::HlsNotifier> hls_notifier;
-
482  if (!FLAGS_hls_master_playlist_output.empty()) {
-
483  base::FilePath master_playlist_path(FLAGS_hls_master_playlist_output);
-
484  base::FilePath master_playlist_name = master_playlist_path.BaseName();
-
485 
-
486  hls_notifier.reset(new hls::SimpleHlsNotifier(
-
487  hls::HlsNotifier::HlsProfile::kOnDemandProfile, FLAGS_hls_base_url,
-
488  master_playlist_path.DirName().AsEndingWithSeparator().value(),
-
489  master_playlist_name.value()));
-
490  }
-
491 
-
492  std::vector<RemuxJob*> remux_jobs;
-
493  STLElementDeleter<std::vector<RemuxJob*> > scoped_jobs_deleter(&remux_jobs);
-
494  FakeClock fake_clock;
-
495  if (!CreateRemuxJobs(stream_descriptors, muxer_options, &fake_clock,
-
496  encryption_key_source.get(), mpd_notifier.get(),
-
497  hls_notifier.get(), &remux_jobs)) {
-
498  return false;
-
499  }
-
500 
-
501  Status status = RunRemuxJobs(remux_jobs);
-
502  if (!status.ok()) {
-
503  LOG(ERROR) << "Packaging Error: " << status.ToString();
-
504  return false;
-
505  }
-
506 
-
507  if (hls_notifier) {
-
508  if (!hls_notifier->Flush())
-
509  return false;
-
510  }
-
511  if (mpd_notifier) {
-
512  if (!mpd_notifier->Flush())
-
513  return false;
-
514  }
-
515 
-
516  printf("Packaging completed successfully.\n");
-
517  return true;
-
518 }
-
519 
-
520 int PackagerMain(int argc, char** argv) {
-
521  base::AtExitManager exit;
-
522  // Needed to enable VLOG/DVLOG through --vmodule or --v.
-
523  base::CommandLine::Init(argc, argv);
-
524  CHECK(logging::InitLogging(logging::LoggingSettings()));
-
525 
-
526  google::SetUsageMessage(base::StringPrintf(kUsage, argv[0]));
-
527  google::ParseCommandLineFlags(&argc, &argv, true);
-
528  if (argc < 2) {
-
529  const std::string version_string = base::StringPrintf(
-
530  "shaka-packager version %s", GetPackagerVersion().c_str());
-
531  google::ShowUsageWithFlags(version_string.c_str());
-
532  return kSuccess;
-
533  }
-
534 
- -
536  return kArgumentValidationFailed;
-
537 
-
538  if (FLAGS_override_version)
-
539  SetPackagerVersionForTesting(FLAGS_test_version);
-
540 
-
541  LibcryptoThreading libcrypto_threading;
-
542  // TODO(tinskip): Make InsertStreamDescriptor a member of
-
543  // StreamDescriptorList.
-
544  StreamDescriptorList stream_descriptors;
-
545  for (int i = 1; i < argc; ++i) {
-
546  if (!InsertStreamDescriptor(argv[i], &stream_descriptors))
-
547  return kArgumentValidationFailed;
-
548  }
-
549  return RunPackager(stream_descriptors) ? kSuccess : kPackagingFailed;
-
550 }
+
445  // Since there isn't a muxer listener that can output both MPD and HLS,
+
446  // disallow specifying both MPD and HLS flags.
+
447  if (!FLAGS_mpd_output.empty() && !FLAGS_hls_master_playlist_output.empty()) {
+
448  LOG(ERROR) << "Cannot output both MPD and HLS.";
+
449  return false;
+
450  }
+
451 
+
452  // Get basic muxer options.
+
453  MuxerOptions muxer_options;
+
454  if (!GetMuxerOptions(&muxer_options))
+
455  return false;
+
456 
+
457  MpdOptions mpd_options;
+
458  if (!GetMpdOptions(&mpd_options))
+
459  return false;
+
460 
+
461  // Create encryption key source if needed.
+
462  scoped_ptr<KeySource> encryption_key_source;
+
463  if (FLAGS_enable_widevine_encryption || FLAGS_enable_fixed_key_encryption) {
+
464  encryption_key_source = CreateEncryptionKeySource();
+
465  if (!encryption_key_source)
+
466  return false;
+
467  }
+
468 
+
469  scoped_ptr<MpdNotifier> mpd_notifier;
+
470  if (!FLAGS_mpd_output.empty()) {
+
471  DashProfile profile =
+
472  FLAGS_single_segment ? kOnDemandProfile : kLiveProfile;
+
473  std::vector<std::string> base_urls;
+
474  base::SplitString(FLAGS_base_urls, ',', &base_urls);
+
475  if (FLAGS_generate_dash_if_iop_compliant_mpd) {
+
476  mpd_notifier.reset(new DashIopMpdNotifier(profile, mpd_options, base_urls,
+
477  FLAGS_mpd_output));
+
478  } else {
+
479  mpd_notifier.reset(new SimpleMpdNotifier(profile, mpd_options, base_urls,
+
480  FLAGS_mpd_output));
+
481  }
+
482  if (!mpd_notifier->Init()) {
+
483  LOG(ERROR) << "MpdNotifier failed to initialize.";
+
484  return false;
+
485  }
+
486  }
+
487 
+
488  scoped_ptr<hls::HlsNotifier> hls_notifier;
+
489  if (!FLAGS_hls_master_playlist_output.empty()) {
+
490  base::FilePath master_playlist_path(
+
491  base::FilePath::FromUTF8Unsafe(FLAGS_hls_master_playlist_output));
+
492  base::FilePath master_playlist_name = master_playlist_path.BaseName();
+
493 
+
494  hls_notifier.reset(new hls::SimpleHlsNotifier(
+
495  hls::HlsNotifier::HlsProfile::kOnDemandProfile, FLAGS_hls_base_url,
+
496  master_playlist_path.DirName().AsEndingWithSeparator().AsUTF8Unsafe(),
+
497  master_playlist_name.AsUTF8Unsafe()));
+
498  }
+
499 
+
500  std::vector<RemuxJob*> remux_jobs;
+
501  STLElementDeleter<std::vector<RemuxJob*> > scoped_jobs_deleter(&remux_jobs);
+
502  FakeClock fake_clock;
+
503  if (!CreateRemuxJobs(stream_descriptors, muxer_options, &fake_clock,
+
504  encryption_key_source.get(), mpd_notifier.get(),
+
505  hls_notifier.get(), &remux_jobs)) {
+
506  return false;
+
507  }
+
508 
+
509  Status status = RunRemuxJobs(remux_jobs);
+
510  if (!status.ok()) {
+
511  LOG(ERROR) << "Packaging Error: " << status.ToString();
+
512  return false;
+
513  }
+
514 
+
515  if (hls_notifier) {
+
516  if (!hls_notifier->Flush())
+
517  return false;
+
518  }
+
519  if (mpd_notifier) {
+
520  if (!mpd_notifier->Flush())
+
521  return false;
+
522  }
+
523 
+
524  printf("Packaging completed successfully.\n");
+
525  return true;
+
526 }
+
527 
+
528 int PackagerMain(int argc, char** argv) {
+
529  base::AtExitManager exit;
+
530  // Needed to enable VLOG/DVLOG through --vmodule or --v.
+
531  base::CommandLine::Init(argc, argv);
+
532 
+
533  // Set up logging.
+
534  logging::LoggingSettings log_settings;
+
535  base::FilePath log_filename;
+
536  PathService::Get(base::DIR_EXE, &log_filename);
+
537  log_filename = log_filename.AppendASCII("packager.log");
+
538  log_settings.logging_dest = logging::LOG_TO_ALL;
+
539  log_settings.log_file = log_filename.value().c_str();
+
540  log_settings.delete_old = logging::DELETE_OLD_LOG_FILE;
+
541  CHECK(logging::InitLogging(log_settings));
+
542 
+
543  google::SetUsageMessage(base::StringPrintf(kUsage, argv[0]));
+
544  google::ParseCommandLineFlags(&argc, &argv, true);
+
545  if (argc < 2) {
+
546  const std::string version_string = base::StringPrintf(
+
547  "shaka-packager version %s", GetPackagerVersion().c_str());
+
548  google::ShowUsageWithFlags(version_string.c_str());
+
549  return kSuccess;
+
550  }
551 
-
552 } // namespace media
-
553 } // namespace shaka
+ +
553  return kArgumentValidationFailed;
554 
-
555 int main(int argc, char** argv) {
-
556  return shaka::media::PackagerMain(argc, argv);
-
557 }
-
static bool Copy(const char *from_file_name, const char *to_file_name)
Definition: file.cc:202
+
555  if (FLAGS_override_version)
+
556  SetPackagerVersionForTesting(FLAGS_test_version);
+
557 
+
558  LibcryptoThreading libcrypto_threading;
+
559  // TODO(tinskip): Make InsertStreamDescriptor a member of
+
560  // StreamDescriptorList.
+
561  StreamDescriptorList stream_descriptors;
+
562  for (int i = 1; i < argc; ++i) {
+
563  if (!InsertStreamDescriptor(argv[i], &stream_descriptors))
+
564  return kArgumentValidationFailed;
+
565  }
+
566  return RunPackager(stream_descriptors) ? kSuccess : kPackagingFailed;
+
567 }
+
568 
+
569 } // namespace media
+
570 } // namespace shaka
+
571 
+
572 #if defined(OS_WIN)
+
573 // Windows wmain, which converts wide character arguments to UTF-8.
+
574 int wmain(int argc, wchar_t* argv[], wchar_t* envp[]) {
+
575  std::unique_ptr<char* [], std::function<void(char**)>> utf8_argv(
+
576  new char*[argc], [argc](char** utf8_args) {
+
577  // TODO(tinskip): This leaks, but if this code is enabled, it crashes.
+
578  // Figure out why. I suspect gflags does something funny with the
+
579  // argument array.
+
580  // for (int idx = 0; idx < argc; ++idx)
+
581  // delete[] utf8_args[idx];
+
582  delete[] utf8_args;
+
583  });
+
584  std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
+
585  for (int idx = 0; idx < argc; ++idx) {
+
586  std::string utf8_arg(converter.to_bytes(argv[idx]));
+
587  utf8_arg += '\0';
+
588  utf8_argv[idx] = new char[utf8_arg.size()];
+
589  memcpy(utf8_argv[idx], &utf8_arg[0], utf8_arg.size());
+
590  }
+
591  return shaka::media::PackagerMain(argc, utf8_argv.get());
+
592 }
+
593 #else
+
594 int main(int argc, char** argv) {
+
595  return shaka::media::PackagerMain(argc, argv);
+
596 }
+
597 #endif // defined(OS_WIN)
+
static bool Copy(const char *from_file_name, const char *to_file_name)
Definition: file.cc:207
bool ValidateWidevineCryptoFlags()
static bool WriteMediaInfoToFile(const MediaInfo &media_info, const std::string &output_file_path)
-
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:184
+
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:189
bool ValidateFixedCryptoFlags()
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 6287f3c8db..e9015ddf9c 100644 --- a/docs/d2/de7/classshaka_1_1media_1_1TextStreamInfo-members.html +++ b/docs/d2/de7/classshaka_1_1media_1_1TextStreamInfo-members.html @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 58dc57192e..f0ffd3f823 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 e4e5d7b553..ec04a527b9 100644 --- a/docs/d2/de9/mock__muxer__listener_8h_source.html +++ b/docs/d2/de9/mock__muxer__listener_8h_source.html @@ -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 664cf6a4c6..b288072648 100644 --- a/docs/d2/deb/es__parser_8h_source.html +++ b/docs/d2/deb/es__parser_8h_source.html @@ -145,7 +145,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 406ac32e0f..3dd57bc417 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 0e232e7197..a82763f86a 100644 --- a/docs/d2/dee/pes__packet__generator_8cc_source.html +++ b/docs/d2/dee/pes__packet__generator_8cc_source.html @@ -328,7 +328,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 41814ef598..8b5d525cf3 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 @@ int cluster_count () c 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 c04637cb67..b4bf3c9eed 100644 --- a/docs/d2/dfc/classshaka_1_1media_1_1MkvWriter-members.html +++ b/docs/d2/dfc/classshaka_1_1media_1_1MkvWriter-members.html @@ -103,12 +103,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); Seekable() const overrideshaka::media::MkvWriter Write(const void *buf, mkvmuxer::uint32 len) overrideshaka::media::MkvWriter WriteFromFile(File *source)shaka::media::MkvWriter - WriteFromFile(File *source, uint64_t max_copy)shaka::media::MkvWriter + WriteFromFile(File *source, int64_t max_copy)shaka::media::MkvWriter ~MkvWriter() override (defined in shaka::media::MkvWriter)shaka::media::MkvWriter diff --git a/docs/d2/dfd/adts__header_8h_source.html b/docs/d2/dfd/adts__header_8h_source.html index c4cde37753..10f5096362 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 c033beca7e..47fe0f487a 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 263e910f8e..110358d0cf 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 f1b98db84f..68056c8ecb 100644 --- a/docs/d3/d0a/classshaka_1_1media_1_1MediaParser.html +++ b/docs/d3/d0a/classshaka_1_1media_1_1MediaParser.html @@ -298,7 +298,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 0c618ba208..3335e2209d 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 64a1161e04..2031bdf89b 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/d15/udp__file__win_8cc_source.html b/docs/d3/d15/udp__file__win_8cc_source.html index a8f407f474..729f36457e 100644 --- a/docs/d3/d15/udp__file__win_8cc_source.html +++ b/docs/d3/d15/udp__file__win_8cc_source.html @@ -160,7 +160,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 cda1b99be0..7fd5efb9fb 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 ed767404ec..3a3fd9c02a 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 1352bd7b37..17562f6f46 100644 --- a/docs/d3/d35/video__slice__header__parser_8cc_source.html +++ b/docs/d3/d35/video__slice__header__parser_8cc_source.html @@ -200,7 +200,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 d360019485..2e05930f25 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 13e80ec6d1..b85732ed87 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 65c09ae3a6..1f09d738d5 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 daf64e59c3..5177afb955 100644 --- a/docs/d3/d61/classshaka_1_1media_1_1File.html +++ b/docs/d3/d61/classshaka_1_1media_1_1File.html @@ -270,7 +270,7 @@ class ThreadedIoFile
Returns
true on success, false otherwise.
-

Definition at line 202 of file file.cc.

+

Definition at line 207 of file file.cc.

@@ -315,7 +315,7 @@ class ThreadedIoFile
Returns
Number of bytes written, or a value < 0 on error.
-

Definition at line 231 of file file.cc.

+

Definition at line 236 of file file.cc.

@@ -367,7 +367,7 @@ class ThreadedIoFile
Returns
Number of bytes written, or a value < 0 on error.
-

Definition at line 235 of file file.cc.

+

Definition at line 240 of file file.cc.

@@ -401,7 +401,7 @@ class ThreadedIoFile
Returns
true if successful, false otherwise.
-

Definition at line 162 of file file.cc.

+

Definition at line 167 of file file.cc.

@@ -481,7 +481,7 @@ class ThreadedIoFile
Returns
The size of a file in bytes on success, a value < 0 otherwise. The file will be opened and closed in the process.
-

Definition at line 175 of file file.cc.

+

Definition at line 180 of file file.cc.

@@ -526,7 +526,7 @@ class ThreadedIoFile
Returns
A File pointer on success, false otherwise.
-

Definition at line 140 of file file.cc.

+

Definition at line 145 of file file.cc.

@@ -571,7 +571,7 @@ class ThreadedIoFile
Returns
A File pointer on success, false otherwise.
-

Definition at line 151 of file file.cc.

+

Definition at line 156 of file file.cc.

@@ -661,7 +661,7 @@ class ThreadedIoFile
Returns
true on success, false otherwise.
-

Definition at line 184 of file file.cc.

+

Definition at line 189 of file file.cc.

@@ -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 46eddeaf9a..115f04adf4 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 227f0bedab..86f0ddf49f 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 8338b5c6d3..4d18ec407a 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 00c1aeeafd..37e3d28823 100644 --- a/docs/d3/d67/classshaka_1_1media_1_1WebMVideoClient.html +++ b/docs/d3/d67/classshaka_1_1media_1_1WebMVideoClient.html @@ -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 231d3bf7e2..e7a4557272 100644 --- a/docs/d3/d6b/fixed__key__source_8cc_source.html +++ b/docs/d3/d6b/fixed__key__source_8cc_source.html @@ -245,7 +245,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 83f1977b0e..d7378e1caa 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 @@ -178,7 +178,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 b004d19b46..a352e37805 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 c51d10cbae..8e4c0291f1 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 @@ -182,7 +182,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 a376120164..d1c15e4627 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 dd8b7aa0a3..7fd957fe5c 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 a2c6edfd73..9c6e8c7e0a 100644 --- a/docs/d3/d76/muxer__flags_8h_source.html +++ b/docs/d3/d76/muxer__flags_8h_source.html @@ -114,7 +114,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 9d77b4ac4b..3a2171b2e4 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 905e269d63..30ac0b37c7 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 6f71e9a3b7..d13fff7c6d 100644 --- a/docs/d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html +++ b/docs/d3/d7c/classshaka_1_1media_1_1WebMAudioClient.html @@ -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 6218d874af..c42b440b3b 100644 --- a/docs/d3/d80/muxer__util_8h_source.html +++ b/docs/d3/d80/muxer__util_8h_source.html @@ -127,7 +127,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 aaa7bfdb93..e6be9e411f 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 750 of file box_definitions.cc.

+

Definition at line 751 of file box_definitions.cc.

@@ -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 32909f6543..2e6c594592 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 685cb44d26..f9201c4443 100644 --- a/docs/d3/d8d/webm__audio__client_8h_source.html +++ b/docs/d3/d8d/webm__audio__client_8h_source.html @@ -144,7 +144,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d3/d90/ec3__audio__util_8cc_source.html b/docs/d3/d90/ec3__audio__util_8cc_source.html index 7c18a9044c..cd6413a7e6 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 9b2c13783e..52f288c4c1 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 35a06e9603..44125c4da5 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 df5947d9b5..9accd988d9 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 @@ -293,7 +293,7 @@ double cluster_length_sec< 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 f1add200e0..bd1be83d06 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/dad/structshaka_1_1media_1_1mp4_1_1ID3v2.html b/docs/d3/dad/structshaka_1_1media_1_1mp4_1_1ID3v2.html index 3ed9ede470..31f7918aeb 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 @@ -178,7 +178,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1371 of file box_definitions.cc.

+

Definition at line 1372 of file box_definitions.cc.

@@ -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 6e7fbdd5cd..34a33dc086 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'); 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 0b160db214..f66a364985 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2115 of file box_definitions.cc.

+

Definition at line 2116 of file box_definitions.cc.

@@ -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 d01941dc63..3afa330510 100644 --- a/docs/d3/db6/webm__parser_8cc_source.html +++ b/docs/d3/db6/webm__parser_8cc_source.html @@ -1068,7 +1068,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 9e6522d511..d1ee938014 100644 --- a/docs/d3/dbc/seek__head_8cc_source.html +++ b/docs/d3/dbc/seek__head_8cc_source.html @@ -216,7 +216,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 b2002bb86d..53a6726ef2 100644 --- a/docs/d3/dbe/demuxer_8cc_source.html +++ b/docs/d3/dbe/demuxer_8cc_source.html @@ -345,7 +345,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 d74b31fa27..b44728e349 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1180 of file box_definitions.cc.

+

Definition at line 1181 of file box_definitions.cc.

@@ -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 960feef6ee..92c5913797 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 @@ -256,7 +256,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 ec894f93ae..9a897c9d31 100644 --- a/docs/d3/dd0/classshaka_1_1MpdNotifier.html +++ b/docs/d3/dd0/classshaka_1_1MpdNotifier.html @@ -472,7 +472,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 d7ceba05e6..5ae744116f 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 5b93fd2bf7..28ab163b06 100644 --- a/docs/d3/de4/seek__head_8h_source.html +++ b/docs/d3/de4/seek__head_8h_source.html @@ -140,7 +140,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 772510b8a6..a8b4493e6b 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 423b1769a6..e51e1eebb1 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 df024abf49..4ef379c8e9 100644 --- a/docs/d3/df1/box__reader_8cc_source.html +++ b/docs/d3/df1/box__reader_8cc_source.html @@ -260,7 +260,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 7cb08bb221..d675ab7005 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 03ca9235a1..47c52db63a 100644 --- a/docs/d4/d00/mp4_2multi__segment__segmenter_8cc_source.html +++ b/docs/d4/d00/mp4_2multi__segment__segmenter_8cc_source.html @@ -287,8 +287,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
198 } // namespace shaka
virtual void OnNewSegment(const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size)=0
virtual bool Open()=0
Internal open. Should not be used directly.
-
void UpdateProgress(uint64_t progress)
Update segmentation progress using ProgressListener.
Definition: segmenter.cc:388
-
void SetComplete()
Set progress to 100%.
Definition: segmenter.cc:404
+
void UpdateProgress(uint64_t progress)
Update segmentation progress using ProgressListener.
Definition: segmenter.cc:389
+
void SetComplete()
Set progress to 100%.
Definition: segmenter.cc:405
virtual void OnSampleDurationReady(uint32_t sample_duration)=0
virtual bool Close()=0
@@ -304,7 +304,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 a4793b115e..7f2b2bb275 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 @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d4/d0b/classshaka_1_1media_1_1TextTrack.html b/docs/d4/d0b/classshaka_1_1media_1_1TextTrack.html index 84709535a7..d1c4059605 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 4cb2b4f82a..1318a5d1b7 100644 --- a/docs/d4/d14/classshaka_1_1media_1_1WebVttMediaParser-members.html +++ b/docs/d4/d14/classshaka_1_1media_1_1WebVttMediaParser-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 a6908cc5dc..a42b48f68f 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 91fc194442..c27921bf04 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 20ff65cf46..51035c0f24 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 f86a601270..bee13b7e8c 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 cd3986097e..67ac9c234b 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1848 of file box_definitions.cc.

+

Definition at line 1849 of file box_definitions.cc.

@@ -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 ee8c55495c..f2dc5ca04c 100644 --- a/docs/d4/d37/io__cache_8cc_source.html +++ b/docs/d4/d37/io__cache_8cc_source.html @@ -252,7 +252,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 9115d78ac3..a1d56c2f61 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 11276e21ff..f95396ab11 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 a55ede6125..4d780c6650 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 e83cd32211..e0c8ff3cf6 100644 --- a/docs/d4/d58/classshaka_1_1media_1_1Nalu-members.html +++ b/docs/d4/d58/classshaka_1_1media_1_1Nalu-members.html @@ -157,7 +157,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 0612fbed95..5d481d07f6 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 e8798988a2..2221a267ef 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 0d320c376b..ddcb4047c7 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 90c4db50db..42c2ee6bc9 100644 --- a/docs/d4/d70/classshaka_1_1DashIopMpdNotifier.html +++ b/docs/d4/d70/classshaka_1_1DashIopMpdNotifier.html @@ -473,7 +473,7 @@ class DashIopMpdNotifierTe diff --git a/docs/d4/d70/structshaka_1_1SegmentInfo-members.html b/docs/d4/d70/structshaka_1_1SegmentInfo-members.html index 6eea64049b..db2428d820 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 ca73053027..c572988f74 100644 --- a/docs/d4/d87/nalu__reader_8h_source.html +++ b/docs/d4/d87/nalu__reader_8h_source.html @@ -297,7 +297,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 240f9294ae..02b3144335 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 a78ce4a26a..f879317f42 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1691 of file box_definitions.cc.

+

Definition at line 1692 of file box_definitions.cc.

@@ -173,7 +173,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 9f1c8857c5..1888011a4a 100644 --- a/docs/d4/da7/segmenter__test__base_8cc_source.html +++ b/docs/d4/da7/segmenter__test__base_8cc_source.html @@ -299,7 +299,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
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.
-
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:184
+
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:189
std::string temp_dir
Specify temporary directory for intermediate files.
Definition: muxer_options.h:71
MuxerOptions CreateMuxerOptions() const
Creates a Muxer options object for testing.
@@ -311,7 +311,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 1509ec8f08..15d1853000 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 @@ -116,8 +116,8 @@ Public Types Public Member Functions FourCC BoxType () const override   -bool ParseFromSampleEncryptionData (size_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const -  +bool ParseFromSampleEncryptionData (uint8_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const +  - Public Member Functions inherited from shaka::media::mp4::FullBox uint32_t HeaderSize () const final   @@ -137,9 +137,9 @@ Public Member Functions Public Attributes std::vector< uint8_t > sample_encryption_data   - -size_t iv_size -  + +uint8_t iv_size std::vector
< SampleEncryptionEntrysample_encryption_entries @@ -190,14 +190,14 @@ Additional Inherited Members - +
- + @@ -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 5e33fb9bf3..c65ab60422 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');
bool shaka::media::mp4::SampleEncryption::ParseFromSampleEncryptionData (size_t uint8_t  iv_size,
diff --git a/docs/d4/db2/cluster__builder_8h_source.html b/docs/d4/db2/cluster__builder_8h_source.html index 32cfc39d60..cbfe492acf 100644 --- a/docs/d4/db2/cluster__builder_8h_source.html +++ b/docs/d4/db2/cluster__builder_8h_source.html @@ -176,7 +176,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 76aef2166b..40ff70b897 100644 --- a/docs/d4/db4/classshaka_1_1MpdNotifierFactory.html +++ b/docs/d4/db4/classshaka_1_1MpdNotifierFactory.html @@ -112,7 +112,7 @@ virtual scoped_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 61bac39cc6..4243bf5fbf 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 @@ -183,7 +183,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1904 of file box_definitions.cc.

+

Definition at line 1905 of file box_definitions.cc.

@@ -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 f91f199278..ab35be23c6 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 4cfbd9e014..a817d89e0a 100644 --- a/docs/d4/dd3/bit__reader_8h_source.html +++ b/docs/d4/dd3/bit__reader_8h_source.html @@ -116,69 +116,78 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
40  return ret;
41  }
42 
-
49  bool SkipBits(int num_bits);
-
50 
-
60  bool SkipBitsConditional(bool condition, int num_bits) {
-
61  bool condition_read = true;
-
62  if (!ReadBits(1, &condition_read))
-
63  return false;
-
64  return condition_read == condition ? SkipBits(num_bits) : true;
-
65  }
-
66 
-
73  bool SkipBytes(int num_bytes);
-
74 
-
76  int bits_available() const {
-
77  return 8 * bytes_left_ + num_remaining_bits_in_curr_byte_;
-
78  }
-
79 
-
81  int bit_position() const { return 8 * initial_size_ - bits_available(); }
-
82 
-
83  private:
-
84  // Help function used by ReadBits to avoid inlining the bit reading logic.
-
85  bool ReadBitsInternal(int num_bits, uint64_t* out);
-
86 
-
87  // Advance to the next byte, loading it into curr_byte_.
-
88  // If the num_remaining_bits_in_curr_byte_ is 0 after this function returns,
-
89  // the stream has reached the end.
-
90  void UpdateCurrByte();
+
43  // Explicit T=bool overload to make MSVC happy.
+
44  bool ReadBits(int num_bits, bool* out) {
+
45  DCHECK_EQ(num_bits, 1);
+
46  uint64_t temp;
+
47  bool ret = ReadBitsInternal(num_bits, &temp);
+
48  *out = temp != 0;
+
49  return ret;
+
50  }
+
51 
+
58  bool SkipBits(int num_bits);
+
59 
+
69  bool SkipBitsConditional(bool condition, int num_bits) {
+
70  bool condition_read = true;
+
71  if (!ReadBits(1, &condition_read))
+
72  return false;
+
73  return condition_read == condition ? SkipBits(num_bits) : true;
+
74  }
+
75 
+
82  bool SkipBytes(int num_bytes);
+
83 
+
85  int bits_available() const {
+
86  return 8 * bytes_left_ + num_remaining_bits_in_curr_byte_;
+
87  }
+
88 
+
90  int bit_position() const { return 8 * initial_size_ - bits_available(); }
91 
-
92  // Pointer to the next unread (not in curr_byte_) byte in the stream.
-
93  const uint8_t* data_;
-
94 
-
95  // Initial size of the input data.
-
96  // TODO(kqyang): Use size_t instead of off_t instead.
-
97  off_t initial_size_;
-
98 
-
99  // Bytes left in the stream (without the curr_byte_).
-
100  off_t bytes_left_;
-
101 
-
102  // Contents of the current byte; first unread bit starting at position
-
103  // 8 - num_remaining_bits_in_curr_byte_ from MSB.
-
104  uint8_t curr_byte_;
-
105 
-
106  // Number of bits remaining in curr_byte_
-
107  int num_remaining_bits_in_curr_byte_;
-
108 
-
109  private:
-
110  DISALLOW_COPY_AND_ASSIGN(BitReader);
-
111 };
-
112 
-
113 } // namespace media
-
114 } // namespace shaka
-
115 
-
116 #endif // MEDIA_BASE_BIT_READER_H_
+
92  private:
+
93  // Help function used by ReadBits to avoid inlining the bit reading logic.
+
94  bool ReadBitsInternal(int num_bits, uint64_t* out);
+
95 
+
96  // Advance to the next byte, loading it into curr_byte_.
+
97  // If the num_remaining_bits_in_curr_byte_ is 0 after this function returns,
+
98  // the stream has reached the end.
+
99  void UpdateCurrByte();
+
100 
+
101  // Pointer to the next unread (not in curr_byte_) byte in the stream.
+
102  const uint8_t* data_;
+
103 
+
104  // Initial size of the input data.
+
105  // TODO(kqyang): Use size_t instead of off_t instead.
+
106  off_t initial_size_;
+
107 
+
108  // Bytes left in the stream (without the curr_byte_).
+
109  off_t bytes_left_;
+
110 
+
111  // Contents of the current byte; first unread bit starting at position
+
112  // 8 - num_remaining_bits_in_curr_byte_ from MSB.
+
113  uint8_t curr_byte_;
+
114 
+
115  // Number of bits remaining in curr_byte_
+
116  int num_remaining_bits_in_curr_byte_;
+
117 
+
118  private:
+
119  DISALLOW_COPY_AND_ASSIGN(BitReader);
+
120 };
+
121 
+
122 } // namespace media
+
123 } // namespace shaka
+
124 
+
125 #endif // MEDIA_BASE_BIT_READER_H_
A class to read bit streams.
Definition: bit_reader.h:17
BitReader(const uint8_t *data, off_t size)
Definition: bit_reader.cc:12
bool ReadBits(int num_bits, T *out)
Definition: bit_reader.h:35
bool SkipBytes(int num_bytes)
Definition: bit_reader.cc:56
-
int bits_available() const
Definition: bit_reader.h:76
-
bool SkipBitsConditional(bool condition, int num_bits)
Definition: bit_reader.h:60
+
int bits_available() const
Definition: bit_reader.h:85
+
bool SkipBitsConditional(bool condition, int num_bits)
Definition: bit_reader.h:69
bool SkipBits(int num_bits)
Definition: bit_reader.cc:24
-
int bit_position() const
Definition: bit_reader.h:81
+
int bit_position() const
Definition: bit_reader.h:90
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 66adde72b5..f205bbbfed 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 6af0f90317..469d515055 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 73b0ab5836..a1fe607a5b 100644 --- a/docs/d4/dde/webvtt__util_8h_source.html +++ b/docs/d4/dde/webvtt__util_8h_source.html @@ -122,7 +122,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 7c40b2bcd4..e720ea7a8b 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1999 of file box_definitions.cc.

+

Definition at line 2000 of file box_definitions.cc.

@@ -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 fc85a13815..5a1573589a 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 072e2231ef..d3a6505220 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 0eeaff9897..c4cfd98db3 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 d8c64eafee..7bbc77772c 100644 --- a/docs/d4/df5/request__signer_8cc_source.html +++ b/docs/d4/df5/request__signer_8cc_source.html @@ -178,7 +178,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 b5d35f6b1e..3da988f177 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 @@ -183,7 +183,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2532 of file box_definitions.cc.

+

Definition at line 2533 of file box_definitions.cc.

@@ -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 113241b16c..c81eca0bb5 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1672 of file box_definitions.cc.

+

Definition at line 1673 of file box_definitions.cc.

@@ -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 91e9be1c2b..868de63f72 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 5728af8938..f5daaa26fc 100644 --- a/docs/d4/dff/webm__media__parser_8cc_source.html +++ b/docs/d4/dff/webm__media__parser_8cc_source.html @@ -364,7 +364,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 2031d3e5cb..629ba6778d 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 4e88b8917e..26d7d2c029 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 203c7a4278..ce7e20ae77 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2634 of file box_definitions.cc.

+

Definition at line 2635 of file box_definitions.cc.

@@ -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 75a63ba5ef..9415105216 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 7c5226b849..4af3c72c9a 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 @@ -174,7 +174,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1607 of file box_definitions.cc.

+

Definition at line 1608 of file box_definitions.cc.

@@ -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 41ff1a5e99..ace6c1f2be 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 14ecae9822..3e418215d1 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 50f591e5c2..0b5aefc1a3 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 9966af3633..f141a85ec3 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 e9fc23d2d1..c3e1a096b6 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 60477a0c77..3d622f1828 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 0c369e60fb..e9b3d022ce 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 1e4d2bfc7e..4edf446bcf 100644 --- a/docs/d5/d40/webm_2single__segment__segmenter_8h_source.html +++ b/docs/d5/d40/webm_2single__segment__segmenter_8h_source.html @@ -156,7 +156,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 ed7b1bb5f0..54d29ae922 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 43fb54cca8..dce52d1ef6 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 4c05af88ba..e7d027548c 100644 --- a/docs/d5/d52/ts__section__pes_8h_source.html +++ b/docs/d5/d52/ts__section__pes_8h_source.html @@ -161,7 +161,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 e8749b9824..62e93bea13 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 43c634c9eb..4e74aaed15 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 7d1561ab81..deeeb5e5fd 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 03dbc36b08..11825620f4 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 ddb3df3081..52bcfd64b4 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 @@ -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 9119f7fdbb..cca972202f 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 9a7bcf0ed0..f81f5afb5a 100644 --- a/docs/d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html +++ b/docs/d5/d66/classshaka_1_1media_1_1NalUnitToByteStreamConverter.html @@ -229,7 +229,7 @@ class NalUnitToByteStreamC diff --git a/docs/d5/d6f/vlog__flags_8cc_source.html b/docs/d5/d6f/vlog__flags_8cc_source.html index bcd0495cdf..01df42884d 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 677cd096fc..13bc3502ec 100644 --- a/docs/d5/d72/avc__decoder__configuration__record_8cc_source.html +++ b/docs/d5/d72/avc__decoder__configuration__record_8cc_source.html @@ -203,7 +203,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 2e8925074e..ec090b56a8 100644 --- a/docs/d5/d7b/box__definitions_8h_source.html +++ b/docs/d5/d7b/box__definitions_8h_source.html @@ -185,13 +185,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
111  };
112 
113  DECLARE_BOX_METHODS(SampleEncryption);
- -
120  size_t iv_size,
+ +
120  uint8_t iv_size,
121  std::vector<SampleEncryptionEntry>* sample_encryption_entries) const;
122 
125  std::vector<uint8_t> sample_encryption_data;
126 
-
127  size_t iv_size;
+
127  uint8_t iv_size;
128  std::vector<SampleEncryptionEntry> sample_encryption_entries;
129 };
130 
@@ -940,7 +940,6 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); -
bool ParseFromSampleEncryptionData(size_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const
bool ReadWrite(uint8_t iv_size, bool has_subsamples, BoxBuffer *buffer)
@@ -953,6 +952,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
std::vector< uint8_t > sample_encryption_data
+
bool ParseFromSampleEncryptionData(uint8_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const
@@ -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 cb84507cd9..6d147853c7 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 @@ -174,7 +174,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2035 of file box_definitions.cc.

+

Definition at line 2036 of file box_definitions.cc.

@@ -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 30b67b7795..1e666d2ade 100644 --- a/docs/d5/d89/widevine__key__source_8cc_source.html +++ b/docs/d5/d89/widevine__key__source_8cc_source.html @@ -720,7 +720,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 f9cedc1177..2fe6eebf10 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 12139237a8..2703921795 100644 --- a/docs/d5/d8f/webm__cluster__parser_8cc_source.html +++ b/docs/d5/d8f/webm__cluster__parser_8cc_source.html @@ -744,7 +744,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/d91/es__parser__adts_8cc_source.html b/docs/d5/d91/es__parser__adts_8cc_source.html index d4491a5143..212c426ae1 100644 --- a/docs/d5/d91/es__parser__adts_8cc_source.html +++ b/docs/d5/d91/es__parser__adts_8cc_source.html @@ -378,7 +378,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 56f6910fd1..68f77c6909 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 5d0940b9e1..e50637960f 100644 --- a/docs/d5/d98/encryptor_8cc_source.html +++ b/docs/d5/d98/encryptor_8cc_source.html @@ -234,7 +234,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 9696dbd6b1..f905e69900 100644 --- a/docs/d5/d9b/vp__codec__configuration__record_8h_source.html +++ b/docs/d5/d9b/vp__codec__configuration__record_8h_source.html @@ -217,14 +217,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
138 #endif // MEDIA_CODECS_VP_CODEC_CONFIGURATION_RECORD_H_
Class for parsing or writing VP codec configuration record.
void WriteMP4(std::vector< uint8_t > *data) const
-
void WriteWebM(std::vector< uint8_t > *data) const
+
void WriteWebM(std::vector< uint8_t > *data) const
bool ParseMP4(const std::vector< uint8_t > &data)
-
std::string GetCodecString(VideoCodec codec) const
+
std::string GetCodecString(VideoCodec codec) const
bool ParseWebM(const std::vector< uint8_t > &data)
diff --git a/docs/d5/d9d/structshaka_1_1media_1_1H265ReferencePictureListModifications.html b/docs/d5/d9d/structshaka_1_1media_1_1H265ReferencePictureListModifications.html index fa145f5492..2b14a44c2b 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 22442056ce..268b679720 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 14f22c6678..cab0990ced 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 f30d5e6ed0..c06150233e 100644 --- a/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.html +++ b/docs/d5/db1/classshaka_1_1media_1_1StreamInfo.html @@ -229,7 +229,7 @@ class base::RefCountedThre 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 db14da4e14..ed866e2245 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 @@ -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 dbef206d95..04534f0adb 100644 --- a/docs/d5/dba/ts__packet_8cc_source.html +++ b/docs/d5/dba/ts__packet_8cc_source.html @@ -304,7 +304,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 402424dba8..d98b828b04 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 b809dca0d9..9fc1bfad3e 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 d1836ce76c..c1f8036848 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 75e9442227..093f88b7ca 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 8466fb091e..c04787b863 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 180cf29bde..4240a96db8 100644 --- a/docs/d5/de0/bit__reader_8cc_source.html +++ b/docs/d5/de0/bit__reader_8cc_source.html @@ -199,7 +199,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 63397d5b15..f25b6fbfcd 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 @@ -306,7 +306,7 @@ class PesPacketGeneratorTe diff --git a/docs/d5/dec/classshaka_1_1media_1_1WebMParserClient.html b/docs/d5/dec/classshaka_1_1media_1_1WebMParserClient.html index d08b06fe1b..41da6c3a24 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/dec/decoder__configuration__record_8cc_source.html b/docs/d5/dec/decoder__configuration__record_8cc_source.html index 31aa6c5bbf..b27e5f1bbc 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 19688e6c49..0ef5d08392 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'); diff --git a/docs/d5/def/ts__section__pmt_8h_source.html b/docs/d5/def/ts__section__pmt_8h_source.html index a9dd2afd7d..7666515964 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 e909680cc6..40f73860b1 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 6aae2620f0..8768eaf2bb 100644 --- a/docs/d5/dfa/classshaka_1_1media_1_1MediaParser-members.html +++ b/docs/d5/dfa/classshaka_1_1media_1_1MediaParser-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d5/dfc/file_8cc_source.html b/docs/d5/dfc/file_8cc_source.html index 89cf5a9b3e..060a754fac 100644 --- a/docs/d5/dfc/file_8cc_source.html +++ b/docs/d5/dfc/file_8cc_source.html @@ -114,268 +114,273 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
25  2ULL << 20,
26  "Size of the block size used for threaded I/O, in bytes.");
27 
-
28 namespace shaka {
-
29 namespace media {
-
30 
-
31 const char* kLocalFilePrefix = "file://";
-
32 const char* kUdpFilePrefix = "udp://";
-
33 const char* kMemoryFilePrefix = "memory://";
-
34 
-
35 namespace {
-
36 
-
37 typedef File* (*FileFactoryFunction)(const char* file_name, const char* mode);
-
38 typedef bool (*FileDeleteFunction)(const char* file_name);
+
28 // Needed for Windows weirdness which somewhere defines CopyFile as CopyFileW.
+
29 #ifdef CopyFile
+
30 #undef CopyFile
+
31 #endif // CopyFile
+
32 
+
33 namespace shaka {
+
34 namespace media {
+
35 
+
36 const char* kLocalFilePrefix = "file://";
+
37 const char* kUdpFilePrefix = "udp://";
+
38 const char* kMemoryFilePrefix = "memory://";
39 
-
40 struct SupportedTypeInfo {
-
41  const char* type;
-
42  size_t type_length;
-
43  const FileFactoryFunction factory_function;
-
44  const FileDeleteFunction delete_function;
-
45 };
-
46 
-
47 File* CreateLocalFile(const char* file_name, const char* mode) {
-
48  return new LocalFile(file_name, mode);
-
49 }
-
50 
-
51 bool DeleteLocalFile(const char* file_name) {
-
52  return LocalFile::Delete(file_name);
-
53 }
-
54 
-
55 File* CreateUdpFile(const char* file_name, const char* mode) {
-
56  if (base::strcasecmp(mode, "r")) {
-
57  NOTIMPLEMENTED() << "UdpFile only supports read (receive) mode.";
-
58  return NULL;
-
59  }
-
60  return new UdpFile(file_name);
-
61 }
-
62 
-
63 File* CreateMemoryFile(const char* file_name, const char* mode) {
-
64  return new MemoryFile(file_name, mode);
-
65 }
-
66 
-
67 bool DeleteMemoryFile(const char* file_name) {
-
68  MemoryFile::Delete(file_name);
-
69  return true;
+
40 namespace {
+
41 
+
42 typedef File* (*FileFactoryFunction)(const char* file_name, const char* mode);
+
43 typedef bool (*FileDeleteFunction)(const char* file_name);
+
44 
+
45 struct SupportedTypeInfo {
+
46  const char* type;
+
47  size_t type_length;
+
48  const FileFactoryFunction factory_function;
+
49  const FileDeleteFunction delete_function;
+
50 };
+
51 
+
52 File* CreateLocalFile(const char* file_name, const char* mode) {
+
53  return new LocalFile(file_name, mode);
+
54 }
+
55 
+
56 bool DeleteLocalFile(const char* file_name) {
+
57  return LocalFile::Delete(file_name);
+
58 }
+
59 
+
60 File* CreateUdpFile(const char* file_name, const char* mode) {
+
61  if (base::strcasecmp(mode, "r")) {
+
62  NOTIMPLEMENTED() << "UdpFile only supports read (receive) mode.";
+
63  return NULL;
+
64  }
+
65  return new UdpFile(file_name);
+
66 }
+
67 
+
68 File* CreateMemoryFile(const char* file_name, const char* mode) {
+
69  return new MemoryFile(file_name, mode);
70 }
71 
-
72 static const SupportedTypeInfo kSupportedTypeInfo[] = {
-
73  {
-
74  kLocalFilePrefix,
-
75  strlen(kLocalFilePrefix),
-
76  &CreateLocalFile,
-
77  &DeleteLocalFile
-
78  },
-
79  {
-
80  kUdpFilePrefix,
-
81  strlen(kUdpFilePrefix),
-
82  &CreateUdpFile,
-
83  NULL
-
84  },
-
85  {
-
86  kMemoryFilePrefix,
-
87  strlen(kMemoryFilePrefix),
-
88  &CreateMemoryFile,
-
89  &DeleteMemoryFile
-
90  },
-
91 };
-
92 
-
93 } // namespace
-
94 
-
95 File* File::Create(const char* file_name, const char* mode) {
-
96  scoped_ptr<File, FileCloser> internal_file(
-
97  CreateInternalFile(file_name, mode));
-
98 
-
99  if (!strncmp(file_name, kMemoryFilePrefix, strlen(kMemoryFilePrefix))) {
-
100  // Disable caching for memory files.
-
101  return internal_file.release();
-
102  }
+
72 bool DeleteMemoryFile(const char* file_name) {
+
73  MemoryFile::Delete(file_name);
+
74  return true;
+
75 }
+
76 
+
77 static const SupportedTypeInfo kSupportedTypeInfo[] = {
+
78  {
+
79  kLocalFilePrefix,
+
80  strlen(kLocalFilePrefix),
+
81  &CreateLocalFile,
+
82  &DeleteLocalFile
+
83  },
+
84  {
+
85  kUdpFilePrefix,
+
86  strlen(kUdpFilePrefix),
+
87  &CreateUdpFile,
+
88  NULL
+
89  },
+
90  {
+
91  kMemoryFilePrefix,
+
92  strlen(kMemoryFilePrefix),
+
93  &CreateMemoryFile,
+
94  &DeleteMemoryFile
+
95  },
+
96 };
+
97 
+
98 } // namespace
+
99 
+
100 File* File::Create(const char* file_name, const char* mode) {
+
101  scoped_ptr<File, FileCloser> internal_file(
+
102  CreateInternalFile(file_name, mode));
103 
-
104  if (FLAGS_io_cache_size) {
-
105  // Enable threaded I/O for "r", "w", and "a" modes only.
-
106  if (!strcmp(mode, "r")) {
-
107  return new ThreadedIoFile(internal_file.Pass(),
-
108  ThreadedIoFile::kInputMode,
-
109  FLAGS_io_cache_size,
-
110  FLAGS_io_block_size);
-
111  } else if (!strcmp(mode, "w") || !strcmp(mode, "a")) {
+
104  if (!strncmp(file_name, kMemoryFilePrefix, strlen(kMemoryFilePrefix))) {
+
105  // Disable caching for memory files.
+
106  return internal_file.release();
+
107  }
+
108 
+
109  if (FLAGS_io_cache_size) {
+
110  // Enable threaded I/O for "r", "w", and "a" modes only.
+
111  if (!strcmp(mode, "r")) {
112  return new ThreadedIoFile(internal_file.Pass(),
-
113  ThreadedIoFile::kOutputMode,
+
113  ThreadedIoFile::kInputMode,
114  FLAGS_io_cache_size,
115  FLAGS_io_block_size);
-
116  }
-
117  }
-
118 
-
119  // Threaded I/O is disabled.
-
120  DLOG(WARNING) << "Threaded I/O is disabled. Performance may be decreased.";
-
121  return internal_file.release();
-
122 }
+
116  } else if (!strcmp(mode, "w") || !strcmp(mode, "a")) {
+
117  return new ThreadedIoFile(internal_file.Pass(),
+
118  ThreadedIoFile::kOutputMode,
+
119  FLAGS_io_cache_size,
+
120  FLAGS_io_block_size);
+
121  }
+
122  }
123 
-
124 File* File::CreateInternalFile(const char* file_name, const char* mode) {
-
125  scoped_ptr<File, FileCloser> internal_file;
-
126  for (size_t i = 0; i < arraysize(kSupportedTypeInfo); ++i) {
-
127  const SupportedTypeInfo& type_info = kSupportedTypeInfo[i];
-
128  if (strncmp(type_info.type, file_name, type_info.type_length) == 0) {
-
129  internal_file.reset(type_info.factory_function(
-
130  file_name + type_info.type_length, mode));
-
131  }
-
132  }
-
133  // Otherwise we assume it is a local file
-
134  if (!internal_file)
-
135  internal_file.reset(CreateLocalFile(file_name, mode));
-
136 
-
137  return internal_file.release();
-
138 }
-
139 
-
140 File* File::Open(const char* file_name, const char* mode) {
-
141  File* file = File::Create(file_name, mode);
-
142  if (!file)
-
143  return NULL;
-
144  if (!file->Open()) {
-
145  delete file;
-
146  return NULL;
-
147  }
-
148  return file;
-
149 }
-
150 
-
151 File* File::OpenWithNoBuffering(const char* file_name, const char* mode) {
-
152  File* file = File::CreateInternalFile(file_name, mode);
-
153  if (!file)
-
154  return NULL;
-
155  if (!file->Open()) {
-
156  delete file;
-
157  return NULL;
-
158  }
-
159  return file;
-
160 }
-
161 
-
162 bool File::Delete(const char* file_name) {
-
163  for (size_t i = 0; i < arraysize(kSupportedTypeInfo); ++i) {
-
164  const SupportedTypeInfo& type_info = kSupportedTypeInfo[i];
-
165  if (strncmp(type_info.type, file_name, type_info.type_length) == 0) {
-
166  return type_info.delete_function ?
-
167  type_info.delete_function(file_name + type_info.type_length) :
-
168  false;
-
169  }
-
170  }
-
171  // Otherwise we assume it is a local file
-
172  return DeleteLocalFile(file_name);
-
173 }
-
174 
-
175 int64_t File::GetFileSize(const char* file_name) {
-
176  File* file = File::Open(file_name, "r");
-
177  if (!file)
-
178  return -1;
-
179  int64_t res = file->Size();
-
180  file->Close();
-
181  return res;
-
182 }
-
183 
-
184 bool File::ReadFileToString(const char* file_name, std::string* contents) {
-
185  DCHECK(contents);
-
186 
-
187  File* file = File::Open(file_name, "r");
-
188  if (!file)
-
189  return false;
-
190 
-
191  const size_t kBufferSize = 0x40000; // 256KB.
-
192  scoped_ptr<char[]> buf(new char[kBufferSize]);
-
193 
-
194  int64_t len;
-
195  while ((len = file->Read(buf.get(), kBufferSize)) > 0)
-
196  contents->append(buf.get(), len);
-
197 
-
198  file->Close();
-
199  return len == 0;
-
200 }
-
201 
-
202 bool File::Copy(const char* from_file_name, const char* to_file_name) {
-
203  std::string content;
-
204  if (!ReadFileToString(from_file_name, &content)) {
-
205  LOG(ERROR) << "Failed to open file " << from_file_name;
-
206  return false;
-
207  }
-
208 
-
209  scoped_ptr<File, FileCloser> output_file(File::Open(to_file_name, "w"));
-
210  if (!output_file) {
-
211  LOG(ERROR) << "Failed to write to " << to_file_name;
-
212  return false;
-
213  }
-
214 
-
215  uint64_t bytes_left = content.size();
-
216  uint64_t total_bytes_written = 0;
-
217  const char* content_cstr = content.c_str();
-
218  while (bytes_left > total_bytes_written) {
-
219  const int64_t bytes_written =
-
220  output_file->Write(content_cstr + total_bytes_written, bytes_left);
-
221  if (bytes_written < 0) {
-
222  LOG(ERROR) << "Failure while writing to " << to_file_name;
-
223  return false;
-
224  }
-
225 
-
226  total_bytes_written += bytes_written;
-
227  }
-
228  return true;
-
229 }
+
124  // Threaded I/O is disabled.
+
125  DLOG(WARNING) << "Threaded I/O is disabled. Performance may be decreased.";
+
126  return internal_file.release();
+
127 }
+
128 
+
129 File* File::CreateInternalFile(const char* file_name, const char* mode) {
+
130  scoped_ptr<File, FileCloser> internal_file;
+
131  for (size_t i = 0; i < arraysize(kSupportedTypeInfo); ++i) {
+
132  const SupportedTypeInfo& type_info = kSupportedTypeInfo[i];
+
133  if (strncmp(type_info.type, file_name, type_info.type_length) == 0) {
+
134  internal_file.reset(type_info.factory_function(
+
135  file_name + type_info.type_length, mode));
+
136  }
+
137  }
+
138  // Otherwise we assume it is a local file
+
139  if (!internal_file)
+
140  internal_file.reset(CreateLocalFile(file_name, mode));
+
141 
+
142  return internal_file.release();
+
143 }
+
144 
+
145 File* File::Open(const char* file_name, const char* mode) {
+
146  File* file = File::Create(file_name, mode);
+
147  if (!file)
+
148  return NULL;
+
149  if (!file->Open()) {
+
150  delete file;
+
151  return NULL;
+
152  }
+
153  return file;
+
154 }
+
155 
+
156 File* File::OpenWithNoBuffering(const char* file_name, const char* mode) {
+
157  File* file = File::CreateInternalFile(file_name, mode);
+
158  if (!file)
+
159  return NULL;
+
160  if (!file->Open()) {
+
161  delete file;
+
162  return NULL;
+
163  }
+
164  return file;
+
165 }
+
166 
+
167 bool File::Delete(const char* file_name) {
+
168  for (size_t i = 0; i < arraysize(kSupportedTypeInfo); ++i) {
+
169  const SupportedTypeInfo& type_info = kSupportedTypeInfo[i];
+
170  if (strncmp(type_info.type, file_name, type_info.type_length) == 0) {
+
171  return type_info.delete_function ?
+
172  type_info.delete_function(file_name + type_info.type_length) :
+
173  false;
+
174  }
+
175  }
+
176  // Otherwise we assume it is a local file
+
177  return DeleteLocalFile(file_name);
+
178 }
+
179 
+
180 int64_t File::GetFileSize(const char* file_name) {
+
181  File* file = File::Open(file_name, "r");
+
182  if (!file)
+
183  return -1;
+
184  int64_t res = file->Size();
+
185  file->Close();
+
186  return res;
+
187 }
+
188 
+
189 bool File::ReadFileToString(const char* file_name, std::string* contents) {
+
190  DCHECK(contents);
+
191 
+
192  File* file = File::Open(file_name, "r");
+
193  if (!file)
+
194  return false;
+
195 
+
196  const size_t kBufferSize = 0x40000; // 256KB.
+
197  scoped_ptr<char[]> buf(new char[kBufferSize]);
+
198 
+
199  int64_t len;
+
200  while ((len = file->Read(buf.get(), kBufferSize)) > 0)
+
201  contents->append(buf.get(), len);
+
202 
+
203  file->Close();
+
204  return len == 0;
+
205 }
+
206 
+
207 bool File::Copy(const char* from_file_name, const char* to_file_name) {
+
208  std::string content;
+
209  if (!ReadFileToString(from_file_name, &content)) {
+
210  LOG(ERROR) << "Failed to open file " << from_file_name;
+
211  return false;
+
212  }
+
213 
+
214  scoped_ptr<File, FileCloser> output_file(File::Open(to_file_name, "w"));
+
215  if (!output_file) {
+
216  LOG(ERROR) << "Failed to write to " << to_file_name;
+
217  return false;
+
218  }
+
219 
+
220  uint64_t bytes_left = content.size();
+
221  uint64_t total_bytes_written = 0;
+
222  const char* content_cstr = content.c_str();
+
223  while (bytes_left > total_bytes_written) {
+
224  const int64_t bytes_written =
+
225  output_file->Write(content_cstr + total_bytes_written, bytes_left);
+
226  if (bytes_written < 0) {
+
227  LOG(ERROR) << "Failure while writing to " << to_file_name;
+
228  return false;
+
229  }
230 
-
231 int64_t File::CopyFile(File* source, File* destination) {
-
232  return CopyFile(source, destination, kWholeFile);
-
233 }
-
234 
-
235 int64_t File::CopyFile(File* source, File* destination, int64_t max_copy) {
-
236  DCHECK(source);
-
237  DCHECK(destination);
-
238  if (max_copy < 0)
-
239  max_copy = std::numeric_limits<int64_t>::max();
-
240 
-
241  const int64_t kBufferSize = 0x40000; // 256KB.
-
242  scoped_ptr<uint8_t[]> buffer(new uint8_t[kBufferSize]);
-
243  int64_t bytes_copied = 0;
-
244  while (bytes_copied < max_copy) {
-
245  const int64_t size = std::min(kBufferSize, max_copy - bytes_copied);
-
246  const int64_t bytes_read = source->Read(buffer.get(), size);
-
247  if (bytes_read < 0)
-
248  return bytes_read;
-
249  if (bytes_read == 0)
-
250  break;
-
251 
-
252  int64_t total_bytes_written = 0;
-
253  while (total_bytes_written < bytes_read) {
-
254  const int64_t bytes_written = destination->Write(
-
255  buffer.get() + total_bytes_written, bytes_read - total_bytes_written);
-
256  if (bytes_written < 0)
-
257  return bytes_written;
-
258 
-
259  total_bytes_written += bytes_written;
-
260  }
-
261 
-
262  DCHECK_EQ(total_bytes_written, bytes_read);
-
263  bytes_copied += bytes_read;
-
264  }
-
265 
-
266  return bytes_copied;
-
267 }
-
268 
-
269 } // namespace media
-
270 } // namespace shaka
+
231  total_bytes_written += bytes_written;
+
232  }
+
233  return true;
+
234 }
+
235 
+
236 int64_t File::CopyFile(File* source, File* destination) {
+
237  return CopyFile(source, destination, kWholeFile);
+
238 }
+
239 
+
240 int64_t File::CopyFile(File* source, File* destination, int64_t max_copy) {
+
241  DCHECK(source);
+
242  DCHECK(destination);
+
243  if (max_copy < 0)
+
244  max_copy = std::numeric_limits<int64_t>::max();
+
245 
+
246  const int64_t kBufferSize = 0x40000; // 256KB.
+
247  scoped_ptr<uint8_t[]> buffer(new uint8_t[kBufferSize]);
+
248  int64_t bytes_copied = 0;
+
249  while (bytes_copied < max_copy) {
+
250  const int64_t size = std::min(kBufferSize, max_copy - bytes_copied);
+
251  const int64_t bytes_read = source->Read(buffer.get(), size);
+
252  if (bytes_read < 0)
+
253  return bytes_read;
+
254  if (bytes_read == 0)
+
255  break;
+
256 
+
257  int64_t total_bytes_written = 0;
+
258  while (total_bytes_written < bytes_read) {
+
259  const int64_t bytes_written = destination->Write(
+
260  buffer.get() + total_bytes_written, bytes_read - total_bytes_written);
+
261  if (bytes_written < 0)
+
262  return bytes_written;
+
263 
+
264  total_bytes_written += bytes_written;
+
265  }
+
266 
+
267  DCHECK_EQ(total_bytes_written, bytes_read);
+
268  bytes_copied += bytes_read;
+
269  }
+
270 
+
271  return bytes_copied;
+
272 }
+
273 
+
274 } // namespace media
+
275 } // namespace shaka
virtual bool Open()=0
Internal open. Should not be used directly.
-
static File * OpenWithNoBuffering(const char *file_name, const char *mode)
Definition: file.cc:151
-
static bool Copy(const char *from_file_name, const char *to_file_name)
Definition: file.cc:202
+
static File * OpenWithNoBuffering(const char *file_name, const char *mode)
Definition: file.cc:156
+
static bool Copy(const char *from_file_name, const char *to_file_name)
Definition: file.cc:207
virtual int64_t Size()=0
virtual bool Close()=0
virtual int64_t Write(const void *buffer, uint64_t length)=0
Define an abstract file interface.
Definition: file.h:24
-
static File * Open(const char *file_name, const char *mode)
Definition: file.cc:140
+
static File * Open(const char *file_name, const char *mode)
Definition: file.cc:145
static void Delete(const std::string &file_name)
Definition: memory_file.cc:134
virtual int64_t Read(void *buffer, uint64_t length)=0
-
static int64_t CopyFile(File *source, File *destination)
Definition: file.cc:231
-
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:175
-
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:184
-
static bool Delete(const char *file_name)
Definition: local_file.cc:84
-
static bool Delete(const char *file_name)
Definition: file.cc:162
+
static int64_t CopyFile(File *source, File *destination)
Definition: file.cc:236
+
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:180
+
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:189
+
static bool Delete(const char *file_name)
Definition: local_file.cc:104
+
static bool Delete(const char *file_name)
Definition: file.cc:167
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 700d4f9fda..9d753fb152 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 b0106abc08..578a5fb5be 100644 --- a/docs/d6/d09/aes__pattern__cryptor_8h_source.html +++ b/docs/d6/d09/aes__pattern__cryptor_8h_source.html @@ -148,7 +148,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 4174a92995..4401bde8a1 100644 --- a/docs/d6/d16/text__stream__info_8cc_source.html +++ b/docs/d6/d16/text__stream__info_8cc_source.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/d17/es__parser__h264_8cc_source.html b/docs/d6/d17/es__parser__h264_8cc_source.html index 9303fdb0f8..612da6bf4a 100644 --- a/docs/d6/d17/es__parser__h264_8cc_source.html +++ b/docs/d6/d17/es__parser__h264_8cc_source.html @@ -257,7 +257,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 f6b8ac5246..27439b46f9 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 @@ -189,7 +189,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 521 of file box_definitions.cc.

+

Definition at line 522 of file box_definitions.cc.

@@ -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 d89e4a151b..3280a70b05 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 e8e750936b..4c1e4d6f13 100644 --- a/docs/d6/d26/structshaka_1_1media_1_1VideoStreamInfoParameters.html +++ b/docs/d6/d26/structshaka_1_1media_1_1VideoStreamInfoParameters.html @@ -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 0f36e2c202..e05886de1e 100644 --- a/docs/d6/d2e/mpd__notifier__util_8cc_source.html +++ b/docs/d6/d2e/mpd__notifier__util_8cc_source.html @@ -164,13 +164,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
75 } // namespace shaka
This class generates DASH MPDs (Media Presentation Descriptions).
Definition: mpd_builder.h:58
std::string Uint8VectorToBase64(const std::vector< uint8_t > &input)
Converts uint8 vector into base64 encoded string.
-
virtual bool ToString(std::string *output)
Definition: mpd_builder.cc:429
+
virtual bool ToString(std::string *output)
Definition: mpd_builder.cc:428
ContentType GetContentType(const MediaInfo &media_info)
bool WriteMpdToFile(const std::string &output_path, MpdBuilder *mpd_builder)
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 2ee588a6be..96f4f6e490 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 f49e15caef..031367b393 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 6c222a5167..926f43583e 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 e535d3fc92..4660f55d4e 100644 --- a/docs/d6/d41/encrypting__fragmenter_8cc_source.html +++ b/docs/d6/d41/encrypting__fragmenter_8cc_source.html @@ -262,214 +262,216 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
173  traf()->auxiliary_offset.offsets.push_back(0);
174 
175  // For 'cbcs' scheme, Constant IVs SHALL be used.
-
176  const size_t per_sample_iv_size =
-
177  (protection_scheme_ == FOURCC_cbcs) ? 0 : encryptor_->iv().size();
-
178  traf()->sample_encryption.iv_size = per_sample_iv_size;
-
179 
-
180  // Optimize saiz box.
-
181  SampleAuxiliaryInformationSize& saiz = traf()->auxiliary_size;
-
182  saiz.sample_count = traf()->runs[0].sample_sizes.size();
-
183  if (!saiz.sample_info_sizes.empty()) {
-
184  if (!OptimizeSampleEntries(&saiz.sample_info_sizes,
-
185  &saiz.default_sample_info_size)) {
-
186  saiz.default_sample_info_size = 0;
-
187  }
-
188  } else {
-
189  // |sample_info_sizes| table is filled in only for subsample encryption,
-
190  // otherwise |sample_info_size| is just the IV size.
-
191  DCHECK(!IsSubsampleEncryptionRequired());
-
192  saiz.default_sample_info_size = per_sample_iv_size;
-
193  }
-
194 
-
195  // It should only happen with full sample encryption + constant iv, i.e.
-
196  // 'cbcs' applying to audio.
-
197  if (saiz.default_sample_info_size == 0 && saiz.sample_info_sizes.empty()) {
-
198  DCHECK_EQ(protection_scheme_, FOURCC_cbcs);
-
199  DCHECK(!IsSubsampleEncryptionRequired());
-
200  // ISO/IEC 23001-7:2016(E) The sample auxiliary information would then be
-
201  // empty and should be emitted. Clear saiz and saio boxes so they are not
-
202  // written.
-
203  saiz.sample_count = 0;
-
204  traf()->auxiliary_offset.offsets.clear();
-
205  }
-
206 }
-
207 
- -
209  DCHECK(encryption_key_);
-
210  scoped_ptr<AesCryptor> encryptor;
-
211  switch (protection_scheme_) {
-
212  case FOURCC_cenc:
-
213  encryptor.reset(new AesCtrEncryptor);
-
214  break;
-
215  case FOURCC_cbc1:
-
216  encryptor.reset(new AesCbcEncryptor(kNoPadding));
-
217  break;
-
218  case FOURCC_cens:
-
219  encryptor.reset(new AesPatternCryptor(
-
220  crypt_byte_block(), skip_byte_block(),
- -
222  AesCryptor::kDontUseConstantIv,
-
223  scoped_ptr<AesCryptor>(new AesCtrEncryptor())));
-
224  break;
-
225  case FOURCC_cbcs:
-
226  encryptor.reset(new AesPatternCryptor(
-
227  crypt_byte_block(), skip_byte_block(),
- -
229  AesCryptor::kUseConstantIv,
-
230  scoped_ptr<AesCryptor>(new AesCbcEncryptor(kNoPadding))));
-
231  break;
-
232  default:
-
233  return Status(error::MUXER_FAILURE, "Unsupported protection scheme.");
-
234  }
-
235 
-
236  DCHECK(!encryption_key_->iv.empty());
-
237  const bool initialized =
-
238  encryptor->InitializeWithIv(encryption_key_->key, encryption_key_->iv);
-
239  if (!initialized)
-
240  return Status(error::MUXER_FAILURE, "Failed to create the encryptor.");
-
241  encryptor_ = encryptor.Pass();
-
242  return Status::OK;
-
243 }
-
244 
-
245 void EncryptingFragmenter::EncryptBytes(uint8_t* data, uint32_t size) {
-
246  DCHECK(encryptor_);
-
247  CHECK(encryptor_->Crypt(data, size, data));
-
248 }
-
249 
-
250 Status EncryptingFragmenter::EncryptSample(scoped_refptr<MediaSample> sample) {
-
251  DCHECK(encryptor_);
-
252 
-
253  SampleEncryptionEntry sample_encryption_entry;
-
254  // For 'cbcs' scheme, Constant IVs SHALL be used.
-
255  if (protection_scheme_ != FOURCC_cbcs)
-
256  sample_encryption_entry.initialization_vector = encryptor_->iv();
-
257  uint8_t* data = sample->writable_data();
-
258  if (IsSubsampleEncryptionRequired()) {
-
259  if (vpx_parser_) {
-
260  std::vector<VPxFrameInfo> vpx_frames;
-
261  if (!vpx_parser_->Parse(sample->data(), sample->data_size(),
-
262  &vpx_frames)) {
-
263  return Status(error::MUXER_FAILURE, "Failed to parse vpx frame.");
-
264  }
-
265 
-
266  const bool is_superframe = vpx_frames.size() > 1;
-
267  for (const VPxFrameInfo& frame : vpx_frames) {
-
268  SubsampleEntry subsample;
-
269  subsample.clear_bytes = frame.uncompressed_header_size;
-
270  subsample.cipher_bytes =
-
271  frame.frame_size - frame.uncompressed_header_size;
-
272 
-
273  // "VP Codec ISO Media File Format Binding" document requires that the
-
274  // encrypted bytes of each frame within the superframe must be block
-
275  // aligned so that the counter state can be computed for each frame
-
276  // within the superframe.
-
277  // ISO/IEC 23001-7:2016 10.2 'cbc1' 10.3 'cens'
-
278  // The BytesOfProtectedData size SHALL be a multiple of 16 bytes to
-
279  // avoid partial blocks in Subsamples.
-
280  if (is_superframe || protection_scheme_ == FOURCC_cbc1 ||
-
281  protection_scheme_ == FOURCC_cens) {
-
282  const uint16_t misalign_bytes =
-
283  subsample.cipher_bytes % kCencBlockSize;
-
284  subsample.clear_bytes += misalign_bytes;
-
285  subsample.cipher_bytes -= misalign_bytes;
-
286  }
-
287 
-
288  sample_encryption_entry.subsamples.push_back(subsample);
-
289  if (subsample.cipher_bytes > 0)
-
290  EncryptBytes(data + subsample.clear_bytes, subsample.cipher_bytes);
-
291  data += frame.frame_size;
-
292  }
-
293  // Add subsample for the superframe index if exists.
-
294  if (is_superframe) {
-
295  size_t index_size = sample->data() + sample->data_size() - data;
-
296  DCHECK_LE(index_size, 2 + vpx_frames.size() * 4);
-
297  DCHECK_GE(index_size, 2 + vpx_frames.size() * 1);
-
298  SubsampleEntry subsample;
-
299  subsample.clear_bytes = index_size;
-
300  subsample.cipher_bytes = 0;
-
301  sample_encryption_entry.subsamples.push_back(subsample);
-
302  }
-
303  } else {
-
304  const Nalu::CodecType nalu_type =
-
305  (video_codec_ == kCodecHVC1 || video_codec_ == kCodecHEV1)
-
306  ? Nalu::kH265
-
307  : Nalu::kH264;
-
308  NaluReader reader(nalu_type, nalu_length_size_, data,
-
309  sample->data_size());
-
310 
-
311  // Store the current length of clear data. This is used to squash
-
312  // multiple unencrypted NAL units into fewer subsample entries.
-
313  uint64_t accumulated_clear_bytes = 0;
-
314 
-
315  Nalu nalu;
-
316  NaluReader::Result result;
-
317  while ((result = reader.Advance(&nalu)) == NaluReader::kOk) {
-
318  if (nalu.is_video_slice()) {
-
319  // For video-slice NAL units, encrypt the video slice. This skips
-
320  // the frame header. If this is an unrecognized codec (e.g. H.265),
-
321  // the whole NAL unit will be encrypted.
-
322  const int64_t video_slice_header_size =
-
323  header_parser_ ? header_parser_->GetHeaderSize(nalu) : 0;
-
324  if (video_slice_header_size < 0)
-
325  return Status(error::MUXER_FAILURE, "Failed to read slice header.");
-
326 
-
327  uint64_t current_clear_bytes =
-
328  nalu.header_size() + video_slice_header_size;
-
329  uint64_t cipher_bytes = nalu.payload_size() - video_slice_header_size;
-
330 
-
331  // ISO/IEC 23001-7:2016 10.2 'cbc1' 10.3 'cens'
-
332  // The BytesOfProtectedData size SHALL be a multiple of 16 bytes to
-
333  // avoid partial blocks in Subsamples.
-
334  if (protection_scheme_ == FOURCC_cbc1 ||
-
335  protection_scheme_ == FOURCC_cens) {
-
336  const uint16_t misalign_bytes = cipher_bytes % kCencBlockSize;
-
337  current_clear_bytes += misalign_bytes;
-
338  cipher_bytes -= misalign_bytes;
-
339  }
-
340 
-
341  const uint8_t* nalu_data = nalu.data() + current_clear_bytes;
-
342  EncryptBytes(const_cast<uint8_t*>(nalu_data), cipher_bytes);
-
343 
-
344  AddSubsamples(
-
345  accumulated_clear_bytes + nalu_length_size_ + current_clear_bytes,
-
346  cipher_bytes, &sample_encryption_entry.subsamples);
-
347  accumulated_clear_bytes = 0;
-
348  } else {
-
349  // For non-video-slice NAL units, don't encrypt.
-
350  accumulated_clear_bytes +=
-
351  nalu_length_size_ + nalu.header_size() + nalu.payload_size();
-
352  }
-
353  }
-
354  if (result != NaluReader::kEOStream)
-
355  return Status(error::MUXER_FAILURE, "Failed to parse NAL units.");
-
356  AddSubsamples(accumulated_clear_bytes, 0,
-
357  &sample_encryption_entry.subsamples);
-
358  }
-
359  DCHECK_EQ(sample_encryption_entry.GetTotalSizeOfSubsamples(),
-
360  sample->data_size());
-
361 
-
362  // The length of per-sample auxiliary datum, defined in CENC ch. 7.
-
363  traf()->auxiliary_size.sample_info_sizes.push_back(
-
364  sample_encryption_entry.ComputeSize());
-
365  } else {
-
366  DCHECK_LE(crypt_byte_block(), 1u);
-
367  DCHECK_EQ(skip_byte_block(), 0u);
-
368  EncryptBytes(data, sample->data_size());
-
369  }
-
370 
-
371  traf()->sample_encryption.sample_encryption_entries.push_back(
-
372  sample_encryption_entry);
-
373  encryptor_->UpdateIv();
-
374  return Status::OK;
-
375 }
-
376 
-
377 bool EncryptingFragmenter::IsSubsampleEncryptionRequired() {
-
378  return vpx_parser_ || nalu_length_size_ != 0;
-
379 }
-
380 
-
381 } // namespace mp4
-
382 } // namespace media
-
383 } // namespace shaka
+
176  const uint8_t per_sample_iv_size =
+
177  (protection_scheme_ == FOURCC_cbcs) ? 0 :
+
178  static_cast<uint8_t>(encryptor_->iv().size());
+
179  traf()->sample_encryption.iv_size = per_sample_iv_size;
+
180 
+
181  // Optimize saiz box.
+
182  SampleAuxiliaryInformationSize& saiz = traf()->auxiliary_size;
+
183  saiz.sample_count = traf()->runs[0].sample_sizes.size();
+
184  if (!saiz.sample_info_sizes.empty()) {
+
185  if (!OptimizeSampleEntries(&saiz.sample_info_sizes,
+
186  &saiz.default_sample_info_size)) {
+
187  saiz.default_sample_info_size = 0;
+
188  }
+
189  } else {
+
190  // |sample_info_sizes| table is filled in only for subsample encryption,
+
191  // otherwise |sample_info_size| is just the IV size.
+
192  DCHECK(!IsSubsampleEncryptionRequired());
+
193  saiz.default_sample_info_size = static_cast<uint8_t>(per_sample_iv_size);
+
194  }
+
195 
+
196  // It should only happen with full sample encryption + constant iv, i.e.
+
197  // 'cbcs' applying to audio.
+
198  if (saiz.default_sample_info_size == 0 && saiz.sample_info_sizes.empty()) {
+
199  DCHECK_EQ(protection_scheme_, FOURCC_cbcs);
+
200  DCHECK(!IsSubsampleEncryptionRequired());
+
201  // ISO/IEC 23001-7:2016(E) The sample auxiliary information would then be
+
202  // empty and should be emitted. Clear saiz and saio boxes so they are not
+
203  // written.
+
204  saiz.sample_count = 0;
+
205  traf()->auxiliary_offset.offsets.clear();
+
206  }
+
207 }
+
208 
+ +
210  DCHECK(encryption_key_);
+
211  scoped_ptr<AesCryptor> encryptor;
+
212  switch (protection_scheme_) {
+
213  case FOURCC_cenc:
+
214  encryptor.reset(new AesCtrEncryptor);
+
215  break;
+
216  case FOURCC_cbc1:
+
217  encryptor.reset(new AesCbcEncryptor(kNoPadding));
+
218  break;
+
219  case FOURCC_cens:
+
220  encryptor.reset(new AesPatternCryptor(
+
221  crypt_byte_block(), skip_byte_block(),
+ +
223  AesCryptor::kDontUseConstantIv,
+
224  scoped_ptr<AesCryptor>(new AesCtrEncryptor())));
+
225  break;
+
226  case FOURCC_cbcs:
+
227  encryptor.reset(new AesPatternCryptor(
+
228  crypt_byte_block(), skip_byte_block(),
+ +
230  AesCryptor::kUseConstantIv,
+
231  scoped_ptr<AesCryptor>(new AesCbcEncryptor(kNoPadding))));
+
232  break;
+
233  default:
+
234  return Status(error::MUXER_FAILURE, "Unsupported protection scheme.");
+
235  }
+
236 
+
237  DCHECK(!encryption_key_->iv.empty());
+
238  const bool initialized =
+
239  encryptor->InitializeWithIv(encryption_key_->key, encryption_key_->iv);
+
240  if (!initialized)
+
241  return Status(error::MUXER_FAILURE, "Failed to create the encryptor.");
+
242  encryptor_ = encryptor.Pass();
+
243  return Status::OK;
+
244 }
+
245 
+
246 void EncryptingFragmenter::EncryptBytes(uint8_t* data, uint32_t size) {
+
247  DCHECK(encryptor_);
+
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 =
+
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
Status AddSample(scoped_refptr< MediaSample > sample) override
Status InitializeFragment(int64_t first_sample_dts) override
@@ -491,14 +493,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); - +
virtual Status PrepareFragmentForEncryption(bool enable_encryption)
bool OptimizeSampleEntries(std::vector< T > *entries, T *default_value)
Definition: fragmenter.h:102
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 566591210a..14fb7f3062 100644 --- a/docs/d6/d4e/webm_2multi__segment__segmenter_8cc_source.html +++ b/docs/d6/d4e/webm_2multi__segment__segmenter_8cc_source.html @@ -183,12 +183,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
94 } // namespace shaka
virtual void OnNewSegment(const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size)=0
void Update(const Status &new_status)
Definition: status.h:117
- + diff --git a/docs/d6/d55/aes__cryptor_8cc_source.html b/docs/d6/d55/aes__cryptor_8cc_source.html index 334c719529..8bd2bdea85 100644 --- a/docs/d6/d55/aes__cryptor_8cc_source.html +++ b/docs/d6/d55/aes__cryptor_8cc_source.html @@ -231,7 +231,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 297ff715e8..1f889c7580 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 9eb65e6c57..51d2ce1914 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 e46fccb196..419ae1dc49 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 fb374291e4..a6119b428d 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 eb16a1fafa..3804606ef3 100644 --- a/docs/d6/d6e/ts__section__pes_8cc_source.html +++ b/docs/d6/d6e/ts__section__pes_8cc_source.html @@ -405,7 +405,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 3c0fafef20..7ca68063c6 100644 --- a/docs/d6/d71/scoped__xml__ptr_8h_source.html +++ b/docs/d6/d71/scoped__xml__ptr_8h_source.html @@ -131,7 +131,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 485132ddc3..895a5d6525 100644 --- a/docs/d6/d77/dash__iop__mpd__notifier_8h_source.html +++ b/docs/d6/d77/dash__iop__mpd__notifier_8h_source.html @@ -210,7 +210,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 30cb808a42..50776d36d3 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2704 of file box_definitions.cc.

+

Definition at line 2705 of file box_definitions.cc.

@@ -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 264b097a00..6999d8c6dc 100644 --- a/docs/d6/d7b/webm__tracks__parser_8h_source.html +++ b/docs/d6/d7b/webm__tracks__parser_8h_source.html @@ -202,7 +202,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 8f83042600..19d65e9a65 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 cf9b26c2c8..79fb579583 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 2844225018..8139ca3277 100644 --- a/docs/d6/d8a/vp9__parser_8cc_source.html +++ b/docs/d6/d8a/vp9__parser_8cc_source.html @@ -654,13 +654,13 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames) override
Definition: vp9_parser.cc:418
const VPCodecConfigurationRecord & codec_config() const
Definition: vpx_parser.h:44
bool ReadBits(int num_bits, T *out)
Definition: bit_reader.h:35
-
int bits_available() const
Definition: bit_reader.h:76
+
int bits_available() const
Definition: bit_reader.h:85
bool SkipBits(int num_bits)
Definition: bit_reader.cc:24
-
int bit_position() const
Definition: bit_reader.h:81
+
int bit_position() const
Definition: bit_reader.h:90
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 11071e1773..c0895228fa 100644 --- a/docs/d6/d8f/classshaka_1_1xml_1_1RepresentationBaseXmlNode-members.html +++ b/docs/d6/d8f/classshaka_1_1xml_1_1RepresentationBaseXmlNode-members.html @@ -111,7 +111,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 7366717e1d..e23f4c6bc5 100644 --- a/docs/d6/d9b/h264__parser_8h_source.html +++ b/docs/d6/d9b/h264__parser_8h_source.html @@ -439,7 +439,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 e0b4758223..66115de2b2 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 9f42138d94..62c795be3c 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 3e1d06fcc8..ec9c28b24a 100644 --- a/docs/d6/da3/mpd__builder_8h_source.html +++ b/docs/d6/da3/mpd__builder_8h_source.html @@ -491,50 +491,50 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
578 } // namespace shaka
579 
580 #endif // MPD_BASE_MPD_BUILDER_H_
-
void OnSetFrameRateForRepresentation(uint32_t representation_id, uint32_t frame_duration, uint32_t timescale)
Definition: mpd_builder.cc:869
+
void OnSetFrameRateForRepresentation(uint32_t representation_id, uint32_t frame_duration, uint32_t timescale)
Definition: mpd_builder.cc:868
RepresentationType in MPD.
Definition: xml_node.h:128
-
virtual void AddNewSegment(uint64_t start_time, uint64_t duration, uint64_t size)
+
virtual void AddNewSegment(uint64_t start_time, uint64_t duration, uint64_t size)
virtual void OnSetFrameRateForRepresentation(uint32_t frame_duration, uint32_t timescale)=0
- -
bool WriteMpdToFile(media::File *output_file)
Definition: mpd_builder.cc:424
-
AdaptationSet(uint32_t adaptation_set_id, const std::string &lang, const MpdOptions &mpd_options, MpdBuilder::MpdType mpd_type, base::AtomicSequenceNumber *representation_counter)
Definition: mpd_builder.cc:675
+ +
bool WriteMpdToFile(media::File *output_file)
Definition: mpd_builder.cc:423
+
AdaptationSet(uint32_t adaptation_set_id, const std::string &lang, const MpdOptions &mpd_options, MpdBuilder::MpdType mpd_type, base::AtomicSequenceNumber *representation_counter)
Definition: mpd_builder.cc:674
-
virtual void SetSampleDuration(uint32_t sample_duration)
-
virtual Representation * AddRepresentation(const MediaInfo &media_info)
Definition: mpd_builder.cc:694
+
virtual void SetSampleDuration(uint32_t sample_duration)
+
virtual Representation * AddRepresentation(const MediaInfo &media_info)
Definition: mpd_builder.cc:693
This class generates DASH MPDs (Media Presentation Descriptions).
Definition: mpd_builder.h:58
uint32_t id() const
Definition: mpd_builder.h:503
Define an abstract file interface.
Definition: file.h:24
-
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
Definition: mpd_builder.cc:738
-
Representation(const MediaInfo &media_info, const MpdOptions &mpd_options, uint32_t representation_id, scoped_ptr< RepresentationStateChangeListener > state_change_listener)
+
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
Definition: mpd_builder.cc:737
+
Representation(const MediaInfo &media_info, const MpdOptions &mpd_options, uint32_t representation_id, scoped_ptr< RepresentationStateChangeListener > state_change_listener)
void InjectClockForTesting(scoped_ptr< base::Clock > clock)
This is for testing.
Definition: mpd_builder.h:105
-
virtual void AddRole(Role role)
Definition: mpd_builder.cc:750
-
void AddBaseUrl(const std::string &base_url)
Definition: mpd_builder.cc:410
-
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
Definition: mpd_builder.cc:744
+
virtual void AddRole(Role role)
Definition: mpd_builder.cc:749
+
void AddBaseUrl(const std::string &base_url)
Definition: mpd_builder.cc:409
+
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
Definition: mpd_builder.cc:743
MpdType type() const
Definition: mpd_builder.h:93
-
virtual void SetGroup(int group_number)
Definition: mpd_builder.cc:843
-
xml::scoped_xml_ptr< xmlNode > GetXml()
+
virtual void SetGroup(int group_number)
Definition: mpd_builder.cc:842
+
xml::scoped_xml_ptr< xmlNode > GetXml()
-
virtual bool ToString(std::string *output)
Definition: mpd_builder.cc:429
-
virtual void ForceSetSegmentAlignment(bool segment_alignment)
Definition: mpd_builder.cc:837
-
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:647
-
MpdBuilder(MpdType type, const MpdOptions &mpd_options)
Definition: mpd_builder.cc:402
-
xml::scoped_xml_ptr< xmlNode > GetXml()
Definition: mpd_builder.cc:760
-
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
+
virtual bool ToString(std::string *output)
Definition: mpd_builder.cc:428
+
virtual void ForceSetSegmentAlignment(bool segment_alignment)
Definition: mpd_builder.cc:836
+
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:646
+
MpdBuilder(MpdType type, const MpdOptions &mpd_options)
Definition: mpd_builder.cc:401
+
xml::scoped_xml_ptr< xmlNode > GetXml()
Definition: mpd_builder.cc:759
+
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
-
virtual AdaptationSet * AddAdaptationSet(const std::string &lang)
Definition: mpd_builder.cc:414
-
virtual int Group() const
Definition: mpd_builder.cc:847
+
virtual AdaptationSet * AddAdaptationSet(const std::string &lang)
Definition: mpd_builder.cc:413
+
virtual int Group() const
Definition: mpd_builder.cc:846
Defines Mpd Options.
Definition: mpd_options.h:15
-
void OnNewSegmentForRepresentation(uint32_t representation_id, uint64_t start_time, uint64_t duration)
Definition: mpd_builder.cc:858
-
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
+
void OnNewSegmentForRepresentation(uint32_t representation_id, uint64_t start_time, uint64_t duration)
Definition: mpd_builder.cc:857
+
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
virtual void OnNewSegmentForRepresentation(uint64_t start_time, uint64_t duration)=0
-
void SuppressOnce(SuppressFlag flag)
+
void SuppressOnce(SuppressFlag flag)
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 4ae8de6215..0e2ad3b505 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 3a898dcf27..e8a739de6c 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 bd3d52514d..e689b09da6 100644 --- a/docs/d6/da9/classshaka_1_1media_1_1BitReader.html +++ b/docs/d6/da9/classshaka_1_1media_1_1BitReader.html @@ -106,6 +106,9 @@ Public Member Functions template<typename T > bool ReadBits (int num_bits, T *out)   + +bool ReadBits (int num_bits, bool *out) +  bool SkipBits (int num_bits)   bool SkipBitsConditional (bool condition, int num_bits) @@ -181,7 +184,7 @@ Public Member Functions
Returns
The current bit position.
-

Definition at line 81 of file bit_reader.h.

+

Definition at line 90 of file bit_reader.h.

@@ -207,7 +210,7 @@ Public Member Functions
Returns
The number of bits available for reading.
-

Definition at line 76 of file bit_reader.h.

+

Definition at line 85 of file bit_reader.h.

@@ -325,7 +328,7 @@ template<typename T >
Returns
false if the one bit cannot be read (not enough bits in the stream) or if the bit is set but the given number of bits cannot be skipped (not enough bits in the stream), true otherwise. When false is returned, the stream will enter a state where further ReadXXX/SkipXXX operations will always return false.
-

Definition at line 60 of file bit_reader.h.

+

Definition at line 69 of file bit_reader.h.

@@ -362,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 572083dd29..2ec5509a00 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 @@ -174,7 +174,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2722 of file box_definitions.cc.

+

Definition at line 2723 of file box_definitions.cc.

@@ -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 52682e11cb..e4aaa397b5 100644 --- a/docs/d6/db1/classshaka_1_1media_1_1MediaStream-members.html +++ b/docs/d6/db1/classshaka_1_1media_1_1MediaStream-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html b/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html index af9c351361..2ec260971d 100644 --- a/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html +++ b/docs/d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html @@ -429,7 +429,7 @@ void set_language (con 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 e124c71d42..7ac68e2552 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/dc7/classshaka_1_1media_1_1mp2t_1_1EsParserH26x-members.html b/docs/d6/dc7/classshaka_1_1media_1_1mp2t_1_1EsParserH26x-members.html index 4fb48d539f..17c342aa99 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 244d1d3627..060f0383b0 100644 --- a/docs/d6/dc8/mkv__writer_8cc_source.html +++ b/docs/d6/dc8/mkv__writer_8cc_source.html @@ -146,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
57  return WriteFromFile(source, kWholeFile);
58 }
59 
-
60 int64_t MkvWriter::WriteFromFile(File* source, uint64_t max_copy) {
+
60 int64_t MkvWriter::WriteFromFile(File* source, int64_t max_copy) {
61  DCHECK(file_);
62 
63  const int64_t size = File::CopyFile(source, file_.get(), max_copy);
@@ -186,7 +186,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
int64_t WriteFromFile(File *source)
Definition: mkv_writer.cc:56
void ElementStartNotify(mkvmuxer::uint64 element_id, mkvmuxer::int64 position) override
Definition: mkv_writer.cc:90
mkvmuxer::int64 Position() const override
Definition: mkv_writer.cc:71
-
static int64_t CopyFile(File *source, File *destination)
Definition: file.cc:231
+
static int64_t CopyFile(File *source, File *destination)
Definition: file.cc:236
bool Seekable() const override
Definition: mkv_writer.cc:86
Status Open(const std::string &name)
Definition: mkv_writer.cc:16
@@ -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 ff4cd74ad0..4e23779dfd 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 f53274f537..5a705b54c3 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 2a2be5e979..319e16b51c 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 a838bc9600..572572176d 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 @@ -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 9449e573ce..38f1cf8b49 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 67d636bb62..9c593e9f2a 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 3e6965c747..53cbdfc7f4 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 c328b0859e..54e274fc97 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 1e13fb5da5..2f6b8713f9 100644 --- a/docs/d6/de8/local__file_8cc_source.html +++ b/docs/d6/de8/local__file_8cc_source.html @@ -96,102 +96,122 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
7 #include "packager/media/file/local_file.h"
8 
9 #include <stdio.h>
-
10 
-
11 #include "packager/base/files/file_util.h"
-
12 #include "packager/base/logging.h"
-
13 
-
14 namespace shaka {
-
15 namespace media {
-
16 
-
17 LocalFile::LocalFile(const char* file_name, const char* mode)
-
18  : File(file_name), file_mode_(mode), internal_file_(NULL) {}
-
19 
- -
21  bool result = true;
-
22  if (internal_file_) {
-
23  result = base::CloseFile(internal_file_);
-
24  internal_file_ = NULL;
-
25  }
-
26  delete this;
-
27  return result;
+
10 #if defined(OS_WIN)
+
11 #include <windows.h>
+
12 #endif // defined(OS_WIN)
+
13 #include "packager/base/files/file_util.h"
+
14 #include "packager/base/logging.h"
+
15 
+
16 namespace shaka {
+
17 namespace media {
+
18 
+
19 // Always open files in binary mode.
+
20 const char kAdditionalFileMode[] = "b";
+
21 
+
22 LocalFile::LocalFile(const char* file_name, const char* mode)
+
23  : File(file_name),
+
24  file_mode_(mode),
+
25  internal_file_(NULL) {
+
26  if (file_mode_.find(kAdditionalFileMode) == std::string::npos)
+
27  file_mode_ += kAdditionalFileMode;
28 }
29 
-
30 int64_t LocalFile::Read(void* buffer, uint64_t length) {
-
31  DCHECK(buffer != NULL);
-
32  DCHECK(internal_file_ != NULL);
-
33  return fread(buffer, sizeof(char), length, internal_file_);
-
34 }
-
35 
-
36 int64_t LocalFile::Write(const void* buffer, uint64_t length) {
-
37  DCHECK(buffer != NULL);
-
38  DCHECK(internal_file_ != NULL);
-
39  return fwrite(buffer, sizeof(char), length, internal_file_);
-
40 }
-
41 
-
42 int64_t LocalFile::Size() {
-
43  DCHECK(internal_file_ != NULL);
-
44 
-
45  // Flush any buffered data, so we get the true file size.
-
46  if (!Flush()) {
-
47  LOG(ERROR) << "Cannot flush file.";
-
48  return -1;
-
49  }
-
50 
-
51  int64_t file_size;
-
52  if (!base::GetFileSize(base::FilePath(file_name()), &file_size)) {
-
53  LOG(ERROR) << "Cannot get file size.";
-
54  return -1;
-
55  }
-
56  return file_size;
-
57 }
-
58 
- -
60  DCHECK(internal_file_ != NULL);
-
61  return ((fflush(internal_file_) == 0) && !ferror(internal_file_));
-
62 }
-
63 
-
64 bool LocalFile::Seek(uint64_t position) {
-
65  return fseeko(internal_file_, position, SEEK_SET) >= 0;
-
66 }
-
67 
-
68 bool LocalFile::Tell(uint64_t* position) {
-
69  off_t offset = ftello(internal_file_);
-
70  if (offset < 0)
-
71  return false;
-
72  *position = offset;
-
73  return true;
-
74 }
-
75 
-
76 LocalFile::~LocalFile() {}
-
77 
- -
79  internal_file_ =
-
80  base::OpenFile(base::FilePath(file_name()), file_mode_.c_str());
-
81  return (internal_file_ != NULL);
-
82 }
+ +
31  bool result = true;
+
32  if (internal_file_) {
+
33  result = base::CloseFile(internal_file_);
+
34  internal_file_ = NULL;
+
35  }
+
36  delete this;
+
37  return result;
+
38 }
+
39 
+
40 int64_t LocalFile::Read(void* buffer, uint64_t length) {
+
41  DCHECK(buffer != NULL);
+
42  DCHECK(internal_file_ != NULL);
+
43  return fread(buffer, sizeof(char), length, internal_file_);
+
44 }
+
45 
+
46 int64_t LocalFile::Write(const void* buffer, uint64_t length) {
+
47  DCHECK(buffer != NULL);
+
48  DCHECK(internal_file_ != NULL);
+
49  return fwrite(buffer, sizeof(char), length, internal_file_);
+
50 }
+
51 
+
52 int64_t LocalFile::Size() {
+
53  DCHECK(internal_file_ != NULL);
+
54 
+
55  // Flush any buffered data, so we get the true file size.
+
56  if (!Flush()) {
+
57  LOG(ERROR) << "Cannot flush file.";
+
58  return -1;
+
59  }
+
60 
+
61  int64_t file_size;
+
62  if (!base::GetFileSize(base::FilePath::FromUTF8Unsafe(file_name()),
+
63  &file_size)) {
+
64  LOG(ERROR) << "Cannot get file size.";
+
65  return -1;
+
66  }
+
67  return file_size;
+
68 }
+
69 
+ +
71  DCHECK(internal_file_ != NULL);
+
72  return ((fflush(internal_file_) == 0) && !ferror(internal_file_));
+
73 }
+
74 
+
75 bool LocalFile::Seek(uint64_t position) {
+
76 #if defined(OS_WIN)
+
77  return _fseeki64(internal_file_, static_cast<__int64>(position),
+
78  SEEK_SET) == 0;
+
79 #else
+
80  return fseeko(internal_file_, position, SEEK_SET) >= 0;
+
81 #endif // !defined(OS_WIN)
+
82 }
83 
-
84 bool LocalFile::Delete(const char* file_name) {
-
85  return base::DeleteFile(base::FilePath(file_name), false);
-
86 }
-
87 
-
88 } // namespace media
-
89 } // namespace shaka
-
int64_t Read(void *buffer, uint64_t length) override
Definition: local_file.cc:30
-
bool Close() override
Definition: local_file.cc:20
-
bool Seek(uint64_t position) override
Definition: local_file.cc:64
+
84 bool LocalFile::Tell(uint64_t* position) {
+
85 #if defined(OS_WIN)
+
86  __int64 offset = _ftelli64(internal_file_);
+
87 #else
+
88  off_t offset = ftello(internal_file_);
+
89 #endif // !defined(OS_WIN)
+
90  if (offset < 0)
+
91  return false;
+
92  *position = static_cast<uint64_t>(offset);
+
93  return true;
+
94 }
+
95 
+
96 LocalFile::~LocalFile() {}
+
97 
+ +
99  internal_file_ =
+
100  base::OpenFile(base::FilePath::FromUTF8Unsafe(file_name()), file_mode_.c_str());
+
101  return (internal_file_ != NULL);
+
102 }
+
103 
+
104 bool LocalFile::Delete(const char* file_name) {
+
105  return base::DeleteFile(base::FilePath::FromUTF8Unsafe(file_name), false);
+
106 }
+
107 
+
108 } // namespace media
+
109 } // namespace shaka
+
int64_t Read(void *buffer, uint64_t length) override
Definition: local_file.cc:40
+
bool Close() override
Definition: local_file.cc:30
+
bool Seek(uint64_t position) override
Definition: local_file.cc:75
Define an abstract file interface.
Definition: file.h:24
-
LocalFile(const char *file_name, const char *mode)
Definition: local_file.cc:17
-
bool Tell(uint64_t *position) override
Definition: local_file.cc:68
-
int64_t Write(const void *buffer, uint64_t length) override
Definition: local_file.cc:36
+
LocalFile(const char *file_name, const char *mode)
Definition: local_file.cc:22
+
bool Tell(uint64_t *position) override
Definition: local_file.cc:84
+
int64_t Write(const void *buffer, uint64_t length) override
Definition: local_file.cc:46
const std::string & file_name() const
Definition: file.h:91
-
bool Open() override
Internal open. Should not be used directly.
Definition: local_file.cc:78
-
bool Flush() override
Definition: local_file.cc:59
-
int64_t Size() override
Definition: local_file.cc:42
-
static bool Delete(const char *file_name)
Definition: local_file.cc:84
+
bool Open() override
Internal open. Should not be used directly.
Definition: local_file.cc:98
+
bool Flush() override
Definition: local_file.cc:70
+
int64_t Size() override
Definition: local_file.cc:52
+
static bool Delete(const char *file_name)
Definition: local_file.cc:104
diff --git a/docs/d6/de8/network__util_8h_source.html b/docs/d6/de8/network__util_8h_source.html index 6f310dafb7..4e689e1921 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 c774b134c5..1f5cce71b1 100644 --- a/docs/d6/de9/ts__segmenter_8cc_source.html +++ b/docs/d6/de9/ts__segmenter_8cc_source.html @@ -302,7 +302,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
void SetTsWriterFileOpenedForTesting(bool value)
Only for testing.
void InjectPesPacketGeneratorForTesting(scoped_ptr< PesPacketGenerator > generator)
Only for testing.
-
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:175
+
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:180
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:31
@@ -313,7 +313,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 4c03558fe0..6592bb8326 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 b0ad012bb5..5722e5e94b 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 743addac14..ab851b7a43 100644 --- a/docs/d6/dff/classshaka_1_1media_1_1Nalu.html +++ b/docs/d6/dff/classshaka_1_1media_1_1Nalu.html @@ -240,7 +240,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 48e40044c3..948b24e215 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 @@ -183,7 +183,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 999 of file box_definitions.cc.

+

Definition at line 1000 of file box_definitions.cc.

@@ -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 3f7b10eb26..f6690ef662 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1949 of file box_definitions.cc.

+

Definition at line 1950 of file box_definitions.cc.

@@ -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 ee2d44100d..c3d2887891 100644 --- a/docs/d7/d0b/muxer__listener__test__helper_8h_source.html +++ b/docs/d7/d0b/muxer__listener__test__helper_8h_source.html @@ -206,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d12/media__parser_8h_source.html b/docs/d7/d12/media__parser_8h_source.html index 4a155f3d58..da2a9595ec 100644 --- a/docs/d7/d12/media__parser_8h_source.html +++ b/docs/d7/d12/media__parser_8h_source.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d15/mpd__notifier_8h_source.html b/docs/d7/d15/mpd__notifier_8h_source.html index c264a67045..9378388aed 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 2184db3cf3..2a82fb0d2b 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 4038996b37..e30261f8ce 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 50faea1f6f..43c4ce6677 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 8ca7b2e0c4..20489847de 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 47f045d5f1..1f918d7b06 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 3e20d9ef5a..319b3574c0 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 bfe801e888..c6ceb44e02 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 d4fd831243..e84f14fd7f 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 @@ -177,7 +177,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 776 of file box_definitions.cc.

+

Definition at line 777 of file box_definitions.cc.

@@ -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 8710f16677..8b9b870288 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 @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); iv_size (defined in shaka::media::mp4::SampleEncryption)shaka::media::mp4::SampleEncryption kUseSubsampleEncryption enum value (defined in shaka::media::mp4::SampleEncryption)shaka::media::mp4::SampleEncryption Parse(BoxReader *reader)shaka::media::mp4::Box - ParseFromSampleEncryptionData(size_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const shaka::media::mp4::SampleEncryption + ParseFromSampleEncryptionData(uint8_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const shaka::media::mp4::SampleEncryption ReadWriteHeaderInternal(BoxBuffer *buffer) finalshaka::media::mp4::FullBoxprotectedvirtual sample_encryption_datashaka::media::mp4::SampleEncryption sample_encryption_entries (defined in shaka::media::mp4::SampleEncryption)shaka::media::mp4::SampleEncryption @@ -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 5353e2e728..08ce42e8d6 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 4b2ef50162..975772db99 100644 --- a/docs/d7/d54/classshaka_1_1media_1_1H26xByteToUnitStreamConverter-members.html +++ b/docs/d7/d54/classshaka_1_1media_1_1H26xByteToUnitStreamConverter-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/d59/classshaka_1_1media_1_1DecryptorSource.html b/docs/d7/d59/classshaka_1_1media_1_1DecryptorSource.html index 76806402e5..5e9c2c773f 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 3ecdd435b0..f28df12785 100644 --- a/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.html +++ b/docs/d7/d6d/classshaka_1_1media_1_1MediaSample.html @@ -411,7 +411,7 @@ class base::RefCountedThre 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 b3e43ebf6b..50262b8b4b 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 9ec028a25f..6027ec2033 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 0ee678ce00..29fdb50add 100644 --- a/docs/d7/d7a/classshaka_1_1media_1_1UdpFile.html +++ b/docs/d7/d7a/classshaka_1_1media_1_1UdpFile.html @@ -463,7 +463,7 @@ Additional Inherited Members diff --git a/docs/d7/d7c/vlog__flags_8h_source.html b/docs/d7/d7c/vlog__flags_8h_source.html index 0f2b49a74d..0126ccf00a 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 fb3fc13117..062a00fee9 100644 --- a/docs/d7/d87/video__stream__info_8h_source.html +++ b/docs/d7/d87/video__stream__info_8h_source.html @@ -188,7 +188,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 0e295b08c8..3c26a24f37 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 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 b95a89a967..be9c5797a5 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 9eefdb3be6..732a4068a4 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 a6fdec8f92..7222af4fcc 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2584 of file box_definitions.cc.

+

Definition at line 2585 of file box_definitions.cc.

@@ -173,7 +173,7 @@ Additional Inherited Members diff --git a/docs/d7/db0/mpd__writer_8h_source.html b/docs/d7/db0/mpd__writer_8h_source.html index 54b1bb0b91..c2c8aa22b5 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 302228632d..111f7f6a07 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'); 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 25fde56130..f109f2fc8b 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1868 of file box_definitions.cc.

+

Definition at line 1869 of file box_definitions.cc.

@@ -182,7 +182,7 @@ Additional Inherited Members diff --git a/docs/d7/dc6/byte__queue_8h_source.html b/docs/d7/dc6/byte__queue_8h_source.html index 5b86e517db..b642f14fa6 100644 --- a/docs/d7/dc6/byte__queue_8h_source.html +++ b/docs/d7/dc6/byte__queue_8h_source.html @@ -144,7 +144,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 bc7f90c951..03a6da8f28 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 0bdaa0583e..d40ea4c4b5 100644 --- a/docs/d7/dd4/request__signer_8h_source.html +++ b/docs/d7/dd4/request__signer_8h_source.html @@ -178,7 +178,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 c7e0c43dbb..1c30a9d7c9 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 @@ -285,7 +285,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 ee7b7bebd8..998a8721fb 100644 --- a/docs/d7/dd6/key__source_8cc_source.html +++ b/docs/d7/dd6/key__source_8cc_source.html @@ -142,7 +142,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 811952daef..7218633cb3 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/ddd/classshaka_1_1media_1_1RsaRequestSigner.html b/docs/d7/ddd/classshaka_1_1media_1_1RsaRequestSigner.html index 734333e02a..71fa1172ba 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 diff --git a/docs/d7/de0/classshaka_1_1media_1_1HttpKeyFetcher.html b/docs/d7/de0/classshaka_1_1media_1_1HttpKeyFetcher.html index cb0a458f05..5cee0e282e 100644 --- a/docs/d7/de0/classshaka_1_1media_1_1HttpKeyFetcher.html +++ b/docs/d7/de0/classshaka_1_1media_1_1HttpKeyFetcher.html @@ -311,7 +311,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 2bc905c446..4e12c8eb1d 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 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 41b66f4d3b..be3dcd054a 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 176c44486d..f10ed718f9 100644 --- a/docs/d7/dee/mpd__generator_8cc_source.html +++ b/docs/d7/dee/mpd__generator_8cc_source.html @@ -103,102 +103,131 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
14 #include "packager/mpd/util/mpd_writer.h"
15 #include "packager/version/version.h"
16 
-
17 namespace shaka {
-
18 namespace {
-
19 const char kUsage[] =
-
20  "MPD generation driver program.\n"
-
21  "This program accepts MediaInfo files in human readable text "
-
22  "format and outputs an MPD.\n"
-
23  "The main use case for this is to output MPD for VOD.\n"
-
24  "Limitations:\n"
-
25  " Each MediaInfo can only have one of VideoInfo, AudioInfo, or TextInfo.\n"
-
26  " There will be at most 3 AdaptationSets in the MPD, i.e. 1 video, 1 "
-
27  "audio, and 1 text.\n"
-
28  "Sample Usage:\n"
-
29  "%s --input=\"video1.media_info,video2.media_info,audio1.media_info\" "
-
30  "--output=\"video_audio.mpd\"";
-
31 
-
32 enum ExitStatus {
-
33  kSuccess = 0,
-
34  kEmptyInputError,
-
35  kEmptyOutputError,
-
36  kFailedToWriteMpdToFileError
-
37 };
-
38 
-
39 ExitStatus CheckRequiredFlags() {
-
40  if (FLAGS_input.empty()) {
-
41  LOG(ERROR) << "--input is required.";
-
42  return kEmptyInputError;
-
43  }
+
17 #if defined(OS_WIN)
+
18 #include <codecvt>
+
19 #include <functional>
+
20 #include <locale>
+
21 #endif // defined(OS_WIN)
+
22 
+
23 namespace shaka {
+
24 namespace {
+
25 const char kUsage[] =
+
26  "MPD generation driver program.\n"
+
27  "This program accepts MediaInfo files in human readable text "
+
28  "format and outputs an MPD.\n"
+
29  "The main use case for this is to output MPD for VOD.\n"
+
30  "Limitations:\n"
+
31  " Each MediaInfo can only have one of VideoInfo, AudioInfo, or TextInfo.\n"
+
32  " There will be at most 3 AdaptationSets in the MPD, i.e. 1 video, 1 "
+
33  "audio, and 1 text.\n"
+
34  "Sample Usage:\n"
+
35  "%s --input=\"video1.media_info,video2.media_info,audio1.media_info\" "
+
36  "--output=\"video_audio.mpd\"";
+
37 
+
38 enum ExitStatus {
+
39  kSuccess = 0,
+
40  kEmptyInputError,
+
41  kEmptyOutputError,
+
42  kFailedToWriteMpdToFileError
+
43 };
44 
-
45  if (FLAGS_output.empty()) {
-
46  LOG(ERROR) << "--output is required.";
-
47  return kEmptyOutputError;
-
48  }
-
49 
-
50  return kSuccess;
-
51 }
-
52 
-
53 ExitStatus RunMpdGenerator() {
-
54  DCHECK_EQ(CheckRequiredFlags(), kSuccess);
-
55  std::vector<std::string> base_urls;
-
56  std::vector<std::string> input_files;
-
57  typedef std::vector<std::string>::const_iterator Iterator;
+
45 ExitStatus CheckRequiredFlags() {
+
46  if (FLAGS_input.empty()) {
+
47  LOG(ERROR) << "--input is required.";
+
48  return kEmptyInputError;
+
49  }
+
50 
+
51  if (FLAGS_output.empty()) {
+
52  LOG(ERROR) << "--output is required.";
+
53  return kEmptyOutputError;
+
54  }
+
55 
+
56  return kSuccess;
+
57 }
58 
-
59  base::SplitString(FLAGS_input, ',', &input_files);
-
60 
-
61  if (!FLAGS_base_urls.empty()) {
-
62  base::SplitString(FLAGS_base_urls, ',', &base_urls);
-
63  }
+
59 ExitStatus RunMpdGenerator() {
+
60  DCHECK_EQ(CheckRequiredFlags(), kSuccess);
+
61  std::vector<std::string> base_urls;
+
62  std::vector<std::string> input_files;
+
63  typedef std::vector<std::string>::const_iterator Iterator;
64 
-
65  MpdWriter mpd_writer;
-
66  for (Iterator it = base_urls.begin(); it != base_urls.end(); ++it)
-
67  mpd_writer.AddBaseUrl(*it);
-
68 
-
69  for (Iterator it = input_files.begin(); it != input_files.end(); ++it) {
-
70  if (!mpd_writer.AddFile(it->c_str(), FLAGS_output)) {
-
71  LOG(WARNING) << "MpdWriter failed to read " << *it << ", skipping.";
-
72  }
-
73  }
+
65  base::SplitString(FLAGS_input, ',', &input_files);
+
66 
+
67  if (!FLAGS_base_urls.empty()) {
+
68  base::SplitString(FLAGS_base_urls, ',', &base_urls);
+
69  }
+
70 
+
71  MpdWriter mpd_writer;
+
72  for (Iterator it = base_urls.begin(); it != base_urls.end(); ++it)
+
73  mpd_writer.AddBaseUrl(*it);
74 
-
75  if (!mpd_writer.WriteMpdToFile(FLAGS_output.c_str())) {
-
76  LOG(ERROR) << "Failed to write MPD to " << FLAGS_output;
-
77  return kFailedToWriteMpdToFileError;
-
78  }
-
79 
-
80  return kSuccess;
-
81 }
-
82 
-
83 int MpdMain(int argc, char** argv) {
-
84  base::AtExitManager exit;
-
85  // Needed to enable VLOG/DVLOG through --vmodule or --v.
-
86  base::CommandLine::Init(argc, argv);
-
87  CHECK(logging::InitLogging(logging::LoggingSettings()));
+
75  for (Iterator it = input_files.begin(); it != input_files.end(); ++it) {
+
76  if (!mpd_writer.AddFile(it->c_str(), FLAGS_output)) {
+
77  LOG(WARNING) << "MpdWriter failed to read " << *it << ", skipping.";
+
78  }
+
79  }
+
80 
+
81  if (!mpd_writer.WriteMpdToFile(FLAGS_output.c_str())) {
+
82  LOG(ERROR) << "Failed to write MPD to " << FLAGS_output;
+
83  return kFailedToWriteMpdToFileError;
+
84  }
+
85 
+
86  return kSuccess;
+
87 }
88 
-
89  google::SetUsageMessage(base::StringPrintf(kUsage, argv[0]));
-
90  google::ParseCommandLineFlags(&argc, &argv, true);
-
91 
-
92  ExitStatus status = CheckRequiredFlags();
-
93  if (status != kSuccess) {
-
94  const std::string version_string = base::StringPrintf(
-
95  "mpd_generator version %s", GetPackagerVersion().c_str());
-
96  google::ShowUsageWithFlags(version_string.c_str());
-
97  return status;
-
98  }
-
99 
-
100  return RunMpdGenerator();
-
101 }
-
102 
-
103 } // namespace
-
104 } // namespace shaka
+
89 int MpdMain(int argc, char** argv) {
+
90  base::AtExitManager exit;
+
91  // Needed to enable VLOG/DVLOG through --vmodule or --v.
+
92  base::CommandLine::Init(argc, argv);
+
93  CHECK(logging::InitLogging(logging::LoggingSettings()));
+
94 
+
95  google::SetUsageMessage(base::StringPrintf(kUsage, argv[0]));
+
96  google::ParseCommandLineFlags(&argc, &argv, true);
+
97 
+
98  ExitStatus status = CheckRequiredFlags();
+
99  if (status != kSuccess) {
+
100  const std::string version_string = base::StringPrintf(
+
101  "mpd_generator version %s", GetPackagerVersion().c_str());
+
102  google::ShowUsageWithFlags(version_string.c_str());
+
103  return status;
+
104  }
105 
-
106 int main(int argc, char** argv) {
-
107  return shaka::MpdMain(argc, argv);
-
108 }
+
106  return RunMpdGenerator();
+
107 }
+
108 
+
109 } // namespace
+
110 } // namespace shaka
+
111 
+
112 #if defined(OS_WIN)
+
113 // Windows wmain, which converts wide character arguments to UTF-8.
+
114 int wmain(int argc, wchar_t* argv[], wchar_t* envp[]) {
+
115  std::unique_ptr<char* [], std::function<void(char**)>> utf8_argv(
+
116  new char*[argc], [argc](char** utf8_args) {
+
117  // TODO(tinskip): This leaks, but if this code is enabled, it crashes.
+
118  // Figure out why. I suspect gflags does something funny with the
+
119  // argument array.
+
120  // for (int idx = 0; idx < argc; ++idx)
+
121  // delete[] utf8_args[idx];
+
122  delete[] utf8_args;
+
123  });
+
124  std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
+
125  for (int idx = 0; idx < argc; ++idx) {
+
126  std::string utf8_arg(converter.to_bytes(argv[idx]));
+
127  utf8_arg += '\0';
+
128  utf8_argv[idx] = new char[utf8_arg.size()];
+
129  memcpy(utf8_argv[idx], &utf8_arg[0], utf8_arg.size());
+
130  }
+
131  return shaka::MpdMain(argc, utf8_argv.get());
+
132 }
+
133 #else
+
134 int main(int argc, char** argv) {
+
135  return shaka::MpdMain(argc, argv);
+
136 }
+
137 #endif // !defined(OS_WIN)
diff --git a/docs/d7/def/mp4__media__parser_8cc_source.html b/docs/d7/def/mp4__media__parser_8cc_source.html index 0336eeabd3..8cf7043454 100644 --- a/docs/d7/def/mp4__media__parser_8cc_source.html +++ b/docs/d7/def/mp4__media__parser_8cc_source.html @@ -857,7 +857,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
static std::string GetCodecString(AudioCodec codec, uint8_t audio_object_type)
void PeekAt(int64_t offset, const uint8_t **buf, int *size)
-
static File * OpenWithNoBuffering(const char *file_name, const char *mode)
Definition: file.cc:151
+
static File * OpenWithNoBuffering(const char *file_name, const char *mode)
Definition: file.cc:156
bool Flush() override WARN_UNUSED_RESULT
bool Trim(int64_t max_offset)
bool Parse(const uint8_t *buf, int size) override WARN_UNUSED_RESULT
@@ -872,7 +872,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d7/df9/byte__queue_8cc_source.html b/docs/d7/df9/byte__queue_8cc_source.html index ddcdd63ab6..8e5048ae2a 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 88aa6e0cac..17462c5234 100644 --- a/docs/d8/d08/classshaka_1_1media_1_1H264ByteToUnitStreamConverter.html +++ b/docs/d8/d08/classshaka_1_1media_1_1H264ByteToUnitStreamConverter.html @@ -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 fc29f8ae22..11f1334c34 100644 --- a/docs/d8/d08/classshaka_1_1media_1_1WebMClusterParser-members.html +++ b/docs/d8/d08/classshaka_1_1media_1_1WebMClusterParser-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 93f2e5280a..5ab168a5e9 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 551b2977b2..334de5edd1 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 6a6ed4219e..0d783713f8 100644 --- a/docs/d8/d0d/media__sample_8cc_source.html +++ b/docs/d8/d0d/media__sample_8cc_source.html @@ -195,7 +195,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 4158f812f0..9830d3666a 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 d21bbd542e..b0582a0b47 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 90f2a33a0c..ac92678a28 100644 --- a/docs/d8/d13/classshaka_1_1media_1_1BitReader-members.html +++ b/docs/d8/d13/classshaka_1_1media_1_1BitReader-members.html @@ -97,14 +97,15 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); BitReader(const uint8_t *data, off_t size)shaka::media::BitReader bits_available() const shaka::media::BitReaderinline ReadBits(int num_bits, T *out)shaka::media::BitReaderinline - SkipBits(int num_bits)shaka::media::BitReader - SkipBitsConditional(bool condition, int num_bits)shaka::media::BitReaderinline - SkipBytes(int num_bytes)shaka::media::BitReader - ~BitReader() (defined in shaka::media::BitReader)shaka::media::BitReader + ReadBits(int num_bits, bool *out) (defined in shaka::media::BitReader)shaka::media::BitReaderinline + SkipBits(int num_bits)shaka::media::BitReader + SkipBitsConditional(bool condition, int num_bits)shaka::media::BitReaderinline + SkipBytes(int num_bytes)shaka::media::BitReader + ~BitReader() (defined in shaka::media::BitReader)shaka::media::BitReader diff --git a/docs/d8/d14/classshaka_1_1media_1_1VP8Parser.html b/docs/d8/d14/classshaka_1_1media_1_1VP8Parser.html index 73d76b5fe1..045cf0a0e3 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 1dd596fd9a..0cabfd7970 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 e38e42ca37..6166541854 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 61b424dc3b..922eb620a9 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1830 of file box_definitions.cc.

+

Definition at line 1831 of file box_definitions.cc.

@@ -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 2c6e9c983e..1480faf0a5 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 79e538f6f8..46708d0e02 100644 --- a/docs/d8/d28/es__parser__h265_8h_source.html +++ b/docs/d8/d28/es__parser__h265_8h_source.html @@ -155,7 +155,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 33c5733fc8..cdebdbef88 100644 --- a/docs/d8/d33/webm__content__encodings__client_8h_source.html +++ b/docs/d8/d33/webm__content__encodings__client_8h_source.html @@ -140,7 +140,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 2d8cef12f3..3088808df0 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 ca8c1eafa2..16d8408856 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 6395a7711b..6293f30582 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 @@ -195,7 +195,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1767 of file box_definitions.cc.

+

Definition at line 1768 of file box_definitions.cc.

@@ -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 46cadaba92..e8f8404455 100644 --- a/docs/d8/d5c/classshaka_1_1media_1_1MediaStream.html +++ b/docs/d8/d5c/classshaka_1_1media_1_1MediaStream.html @@ -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 08a62e79b8..2b36e66cfc 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'); 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 e519f34ba4..6f28bdf808 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2021 of file box_definitions.cc.

+

Definition at line 2022 of file box_definitions.cc.

@@ -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 24be7a65bb..e489d8b057 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 386e0364df..2fd2382436 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 96c4ead04c..9d44cf2d8a 100644 --- a/docs/d8/d86/classshaka_1_1media_1_1WebMTracksParser.html +++ b/docs/d8/d86/classshaka_1_1media_1_1WebMTracksParser.html @@ -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 9c6af4c36e..20bb9837a0 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 65e887df6b..81822cf40b 100644 --- a/docs/d8/d8e/classshaka_1_1AdaptationSet.html +++ b/docs/d8/d8e/classshaka_1_1AdaptationSet.html @@ -229,7 +229,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 675 of file mpd_builder.cc.

+

Definition at line 674 of file mpd_builder.cc.

@@ -263,7 +263,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 738 of file mpd_builder.cc.

+

Definition at line 737 of file mpd_builder.cc.

@@ -297,7 +297,7 @@ template<MpdBuilder::MpdType type>
Returns
On success, returns a pointer to Representation. Otherwise returns NULL. The returned pointer is owned by the AdaptationSet instance.
-

Definition at line 694 of file mpd_builder.cc.

+

Definition at line 693 of file mpd_builder.cc.

@@ -330,7 +330,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 750 of file mpd_builder.cc.

+

Definition at line 749 of file mpd_builder.cc.

@@ -363,7 +363,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 837 of file mpd_builder.cc.

+

Definition at line 836 of file mpd_builder.cc.

@@ -382,7 +382,7 @@ template<MpdBuilder::MpdType type>

Makes a copy of AdaptationSet xml element with its child Representation and ContentProtection elements.

Returns
On success returns a non-NULL scoped_xml_ptr. Otherwise returns a NULL scoped_xml_ptr.
-

Definition at line 760 of file mpd_builder.cc.

+

Definition at line 759 of file mpd_builder.cc.

@@ -408,7 +408,7 @@ template<MpdBuilder::MpdType type>
Returns
Returns the value for group. If not set, returns a negative value.
-

Definition at line 847 of file mpd_builder.cc.

+

Definition at line 846 of file mpd_builder.cc.

@@ -451,7 +451,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 858 of file mpd_builder.cc.

+

Definition at line 857 of file mpd_builder.cc.

@@ -493,7 +493,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 869 of file mpd_builder.cc.

+

Definition at line 868 of file mpd_builder.cc.

@@ -526,7 +526,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 843 of file mpd_builder.cc.

+

Definition at line 842 of file mpd_builder.cc.

@@ -571,7 +571,7 @@ template<MpdBuilder::MpdType type>
Attention
This might get removed once DASH IF IOP specification makes a a clear guideline on how to handle key rotation. Also to get this working with shaka-player, this method DOES NOT update the PSSH element. Instead, it removes the element regardless of the content of pssh.
-

Definition at line 744 of file mpd_builder.cc.

+

Definition at line 743 of file mpd_builder.cc.

@@ -582,7 +582,7 @@ template<MpdBuilder::MpdType type> 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 ba3ad3990c..66f83b554d 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 39865b3515..f72baa0e84 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 59420aa6e6..75e02d9a63 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 306d723ebe..40a55ad471 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 020c6a428e..bc674e44ff 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 5e7cb2b004..557ffbfdda 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 3a17531ca1..26f726f4e0 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 94de944ab3..bb32657659 100644 --- a/docs/d8/d9a/fragmenter_8cc_source.html +++ b/docs/d8/d9a/fragmenter_8cc_source.html @@ -301,7 +301,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d9c/webm__tracks__parser_8cc_source.html b/docs/d8/d9c/webm__tracks__parser_8cc_source.html index 27573fc65b..f3fbc768eb 100644 --- a/docs/d8/d9c/webm__tracks__parser_8cc_source.html +++ b/docs/d8/d9c/webm__tracks__parser_8cc_source.html @@ -440,7 +440,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/d9f/udp__file_8h_source.html b/docs/d8/d9f/udp__file_8h_source.html index 348713e408..349b6337d8 100644 --- a/docs/d8/d9f/udp__file_8h_source.html +++ b/docs/d8/d9f/udp__file_8h_source.html @@ -147,7 +147,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 c83051dc53..bc056243ea 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 3399b94bc5..913408a171 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 bc405a5ec4..b5e3684130 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 14e688fd81..097aafd508 100644 --- a/docs/d8/daa/stream__info_8h_source.html +++ b/docs/d8/daa/stream__info_8h_source.html @@ -185,7 +185,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d8/daf/namespaceshaka.html b/docs/d8/daf/namespaceshaka.html index 1df777c2ea..846eafd09b 100644 --- a/docs/d8/daf/namespaceshaka.html +++ b/docs/d8/daf/namespaceshaka.html @@ -566,7 +566,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 298ad407d3..7cd3ef038e 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 @@ -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 6e30e7fa4a..df1111e34b 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/dc3/structshaka_1_1media_1_1mp4_1_1CueTimeBox.html b/docs/d8/dc3/structshaka_1_1media_1_1mp4_1_1CueTimeBox.html index 35816ed536..9b2400f808 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2614 of file box_definitions.cc.

+

Definition at line 2615 of file box_definitions.cc.

@@ -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 1c4cd94306..fdca16082e 100644 --- a/docs/d8/dca/ts__writer_8h_source.html +++ b/docs/d8/dca/ts__writer_8h_source.html @@ -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 0b04ed086f..16f8a7f2b6 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 4ec75fd21a..3d62743cf0 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 d901ba9d9f..7dd40a6d3e 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 5c3b3824d8..481ae06fa2 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 90dc6cebce..61adb2226a 100644 --- a/docs/d8/de1/classshaka_1_1SimpleMpdNotifier.html +++ b/docs/d8/de1/classshaka_1_1SimpleMpdNotifier.html @@ -471,7 +471,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 a5e67e66ac..ce1d60d93d 100644 --- a/docs/d8/de6/webm__crypto__helpers_8h_source.html +++ b/docs/d8/de6/webm__crypto__helpers_8h_source.html @@ -116,7 +116,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 26c407b3b4..156f93ff5b 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/dee/classshaka_1_1media_1_1AudioTimestampHelper-members.html b/docs/d8/dee/classshaka_1_1media_1_1AudioTimestampHelper-members.html index 32517243fa..4a571fad09 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 9af30f0c27..80603182c4 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 d05b926a80..84da4de0ff 100644 --- a/docs/d8/df0/webm_2single__segment__segmenter_8cc_source.html +++ b/docs/d8/df0/webm_2single__segment__segmenter_8cc_source.html @@ -177,11 +177,11 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
88 } // namespace webm
89 } // namespace media
90 } // namespace shaka
- + 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 2a1458b132..2bcdd0ca17 100644 --- a/docs/d8/df7/classshaka_1_1media_1_1SegmentTestBase-members.html +++ b/docs/d8/df7/classshaka_1_1media_1_1SegmentTestBase-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 7e47fb4750..58b9926f25 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 @@ -147,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 6a655e5824..9712b88b41 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 3ebdcacd18..31e3936dd2 100644 --- a/docs/d9/d01/mp4_2single__segment__segmenter_8h_source.html +++ b/docs/d9/d01/mp4_2single__segment__segmenter_8h_source.html @@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/d08/mock__mpd__builder_8h_source.html b/docs/d9/d08/mock__mpd__builder_8h_source.html index cdf929213d..0c2dae8526 100644 --- a/docs/d9/d08/mock__mpd__builder_8h_source.html +++ b/docs/d9/d08/mock__mpd__builder_8h_source.html @@ -156,31 +156,31 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
67 } // namespace shaka
68 
69 #endif // MPD_BASE_MOCK_MPD_BUILDER_H_
-
virtual void AddNewSegment(uint64_t start_time, uint64_t duration, uint64_t size)
+
virtual void AddNewSegment(uint64_t start_time, uint64_t duration, uint64_t size)
-
virtual void SetSampleDuration(uint32_t sample_duration)
-
virtual Representation * AddRepresentation(const MediaInfo &media_info)
Definition: mpd_builder.cc:694
+
virtual void SetSampleDuration(uint32_t sample_duration)
+
virtual Representation * AddRepresentation(const MediaInfo &media_info)
Definition: mpd_builder.cc:693
This class generates DASH MPDs (Media Presentation Descriptions).
Definition: mpd_builder.h:58
-
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
Definition: mpd_builder.cc:738
+
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
Definition: mpd_builder.cc:737
-
virtual void AddRole(Role role)
Definition: mpd_builder.cc:750
-
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
Definition: mpd_builder.cc:744
+
virtual void AddRole(Role role)
Definition: mpd_builder.cc:749
+
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
Definition: mpd_builder.cc:743
MpdType type() const
Definition: mpd_builder.h:93
-
virtual void SetGroup(int group_number)
Definition: mpd_builder.cc:843
-
virtual bool ToString(std::string *output)
Definition: mpd_builder.cc:429
-
virtual void ForceSetSegmentAlignment(bool segment_alignment)
Definition: mpd_builder.cc:837
-
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
+
virtual void SetGroup(int group_number)
Definition: mpd_builder.cc:842
+
virtual bool ToString(std::string *output)
Definition: mpd_builder.cc:428
+
virtual void ForceSetSegmentAlignment(bool segment_alignment)
Definition: mpd_builder.cc:836
+
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
-
virtual AdaptationSet * AddAdaptationSet(const std::string &lang)
Definition: mpd_builder.cc:414
-
virtual int Group() const
Definition: mpd_builder.cc:847
+
virtual AdaptationSet * AddAdaptationSet(const std::string &lang)
Definition: mpd_builder.cc:413
+
virtual int Group() const
Definition: mpd_builder.cc:846
-
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
+
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
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 43327fa956..39cb5768b6 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 d83c2a8153..a77ece8c99 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 5b59af283d..3e2a03597e 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 603ccaef09..de0572b1a6 100644 --- a/docs/d9/d15/key__rotation__fragmenter_8cc_source.html +++ b/docs/d9/d15/key__rotation__fragmenter_8cc_source.html @@ -141,7 +141,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
52  bool enable_encryption) {
53  bool need_to_refresh_encryptor = !encryptor();
54 
-
55  size_t current_crypto_period_index =
+
55  int64_t current_crypto_period_index =
56  traf()->decode_time.decode_time / crypto_period_duration_;
57  if (current_crypto_period_index != prev_crypto_period_index_) {
58  scoped_ptr<EncryptionKey> encryption_key(new EncryptionKey());
@@ -212,18 +212,19 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
123  sample_group_entry.per_sample_iv_size = 0;
124  sample_group_entry.constant_iv = encryptor()->iv();
125  } else {
-
126  sample_group_entry.per_sample_iv_size = encryptor()->iv().size();
-
127  }
-
128  sample_group_entry.crypt_byte_block = crypt_byte_block();
-
129  sample_group_entry.skip_byte_block = skip_byte_block();
-
130  sample_group_entry.key_id = encryption_key()->key_id;
-
131 
-
132  return Status::OK;
-
133 }
-
134 
-
135 } // namespace mp4
-
136 } // namespace media
-
137 } // namespace shaka
+
126  sample_group_entry.per_sample_iv_size =
+
127  static_cast<uint8_t>(encryptor()->iv().size());
+
128  }
+
129  sample_group_entry.crypt_byte_block = crypt_byte_block();
+
130  sample_group_entry.skip_byte_block = skip_byte_block();
+
131  sample_group_entry.key_id = encryption_key()->key_id;
+
132 
+
133  return Status::OK;
+
134 }
+
135 
+
136 } // namespace mp4
+
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)
@@ -235,7 +236,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
EncryptingFragmenter generates MP4 fragments with sample encrypted.
- +
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:31
Status PrepareFragmentForEncryption(bool enable_encryption) override
@@ -243,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 c01b651022..6b0922830f 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 @@ -169,7 +169,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2497 of file box_definitions.cc.

+

Definition at line 2498 of file box_definitions.cc.

@@ -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 b15ea67bfe..e91d8acdec 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 4c40e64477..fe64f5b643 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 @@ -203,7 +203,7 @@ void set_progress_target
Returns
OK on success, an error status otherwise.
-

Definition at line 321 of file segmenter.cc.

+

Definition at line 322 of file segmenter.cc.

@@ -222,7 +222,7 @@ void set_progress_targetFinalize the segmenter.

Returns
OK on success, an error status otherwise.
-

Definition at line 295 of file segmenter.cc.

+

Definition at line 296 of file segmenter.cc.

@@ -240,7 +240,7 @@ void set_progress_target
Returns
The total length, in seconds, of segmented media files.
-

Definition at line 379 of file segmenter.cc.

+

Definition at line 380 of file segmenter.cc.

@@ -393,7 +393,7 @@ void set_progress_target
Returns
OK on success, an error status otherwise.
-

Definition at line 165 of file segmenter.cc.

+

Definition at line 166 of file segmenter.cc.

@@ -430,7 +430,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 947438b0a4..3fce5c6227 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 cebb92e524..85c1c692c3 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 ec699f22c3..24e20457fa 100644 --- a/docs/d9/d3b/webm__content__encodings_8h_source.html +++ b/docs/d9/d3b/webm__content__encodings_8h_source.html @@ -179,7 +179,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 6af6a406ff..2065a5b834 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 @@ -155,7 +155,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2689 of file box_definitions.cc.

+

Definition at line 2690 of file box_definitions.cc.

@@ -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 b60d4136da..8e27e869ca 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2598 of file box_definitions.cc.

+

Definition at line 2599 of file box_definitions.cc.

@@ -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 276a61da44..ed6aec90e1 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 3142f185bd..7fe80d38de 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 8741d6bd52..aff2269d8b 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 0e44a37c95..ea4d0396ae 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 f0685e8566..fed5bb134a 100644 --- a/docs/d9/d76/ts__muxer_8cc_source.html +++ b/docs/d9/d76/ts__muxer_8cc_source.html @@ -155,7 +155,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 2248b12270..773ec49691 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 972e9862cd..9896f9f83d 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 4f7c7ddc62..bb468a5c1a 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 aa40cdc7bd..5b3e593723 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 0e6207b555..69545c1292 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 9b6a8047bc..ba53145c24 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 1095b92d94..b860dc1b03 100644 --- a/docs/d9/d93/media__stream_8h_source.html +++ b/docs/d9/d93/media__stream_8h_source.html @@ -170,7 +170,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/da4/stream__descriptor_8h_source.html b/docs/d9/da4/stream__descriptor_8h_source.html index 0aab73c27c..420830d523 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 46ab3e7554..96b4d23fd7 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 b3dc7fe57e..f2f415a5df 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 5cfb69126d..9ae7044996 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 @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 dbbd04d79d..c3c831f35e 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 59a8f1e46c..8718ffb07a 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 ea34ab1421..947e242f27 100644 --- a/docs/d9/db9/muxer_8cc_source.html +++ b/docs/d9/db9/muxer_8cc_source.html @@ -218,7 +218,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/dbd/classshaka_1_1media_1_1MemoryFile.html b/docs/d9/dbd/classshaka_1_1media_1_1MemoryFile.html index 39c1075318..388b4253c0 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 871d91afff..654f011c68 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 0923a81910..938e3c96a6 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 e7af3b5688..79ba02d57f 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 2c0c0df4c6..a190c88ba8 100644 --- a/docs/d9/dcc/webm__video__client_8h_source.html +++ b/docs/d9/dcc/webm__video__client_8h_source.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/d9/de3/muxer__listener__internal_8cc_source.html b/docs/d9/de3/muxer__listener__internal_8cc_source.html index 48a138da5f..33b7b33db2 100644 --- a/docs/d9/de3/muxer__listener__internal_8cc_source.html +++ b/docs/d9/de3/muxer__listener__internal_8cc_source.html @@ -348,7 +348,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 73ab5b631e..cdb9166e68 100644 --- a/docs/d9/de6/classshaka_1_1media_1_1LocalFile.html +++ b/docs/d9/de6/classshaka_1_1media_1_1LocalFile.html @@ -204,7 +204,7 @@ bool 17 of file local_file.cc.

+

Definition at line 22 of file local_file.cc.

@@ -234,7 +234,7 @@ bool shaka::media::File.

-

Definition at line 20 of file local_file.cc.

+

Definition at line 30 of file local_file.cc.

@@ -268,7 +268,7 @@ bool 
Returns
true if successful, or false otherwise.
-

Definition at line 84 of file local_file.cc.

+

Definition at line 104 of file local_file.cc.

@@ -297,7 +297,7 @@ bool shaka::media::File.

-

Definition at line 59 of file local_file.cc.

+

Definition at line 70 of file local_file.cc.

@@ -344,7 +344,7 @@ bool shaka::media::File.

-

Definition at line 30 of file local_file.cc.

+

Definition at line 40 of file local_file.cc.

@@ -380,7 +380,7 @@ bool shaka::media::File.

-

Definition at line 64 of file local_file.cc.

+

Definition at line 75 of file local_file.cc.

@@ -408,7 +408,7 @@ bool shaka::media::File.

-

Definition at line 42 of file local_file.cc.

+

Definition at line 52 of file local_file.cc.

@@ -444,7 +444,7 @@ bool shaka::media::File.

-

Definition at line 68 of file local_file.cc.

+

Definition at line 84 of file local_file.cc.

@@ -491,7 +491,7 @@ bool shaka::media::File.

-

Definition at line 36 of file local_file.cc.

+

Definition at line 46 of file local_file.cc.

@@ -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 8400357adb..43110cf1cb 100644 --- a/docs/d9/dea/classshaka_1_1media_1_1FixedKeySource-members.html +++ b/docs/d9/dea/classshaka_1_1media_1_1FixedKeySource-members.html @@ -116,7 +116,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 e2f502d7af..fd2af0256c 100644 --- a/docs/d9/ded/aac__audio__specific__config_8cc_source.html +++ b/docs/d9/ded/aac__audio__specific__config_8cc_source.html @@ -231,9 +231,9 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
142  adts[1] = 0xf1;
143  adts[2] = ((audio_object_type_ - 1) << 6) + (frequency_index_ << 2) +
144  (channel_config_ >> 2);
-
145  adts[3] = ((channel_config_ & 0x3) << 6) + (size >> 11);
-
146  adts[4] = (size & 0x7ff) >> 3;
-
147  adts[5] = ((size & 7) << 5) + 0x1f;
+
145  adts[3] = ((channel_config_ & 0x3) << 6) + static_cast<uint8_t>(size >> 11);
+
146  adts[4] = static_cast<uint8_t>((size & 0x7ff) >> 3);
+
147  adts[5] = static_cast<uint8_t>(((size & 7) << 5) + 0x1f);
148  adts[6] = 0xfc;
149 
150  return true;
@@ -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 b190ccace5..b1e741a488 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 75d1fad18f..4b5f78d93b 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 0097327b5b..8306ce3ebb 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 63eae1f621..f070c9523a 100644 --- a/docs/da/d04/audio__stream__info_8cc_source.html +++ b/docs/da/d04/audio__stream__info_8cc_source.html @@ -240,7 +240,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 e3d514fdc9..15b80e0d24 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 @@ -146,7 +146,7 @@ uint32_t pid () 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 49219ac520..5a58429450 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 code< 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 1dbc499563..6b3322af02 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 Reset ()= diff --git a/docs/da/d22/key__rotation__fragmenter_8h_source.html b/docs/da/d22/key__rotation__fragmenter_8h_source.html index 9a68e24e98..a50c0be8d2 100644 --- a/docs/da/d22/key__rotation__fragmenter_8h_source.html +++ b/docs/da/d22/key__rotation__fragmenter_8h_source.html @@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
66  KeySource* encryption_key_source_;
67  KeySource::TrackType track_type_;
68  const int64_t crypto_period_duration_;
-
69  size_t prev_crypto_period_index_;
+
69  int64_t prev_crypto_period_index_;
70 
71  // For notifying new pssh boxes to the event handler.
72  MuxerListener* const muxer_listener_;
@@ -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 3e686b0a0f..abad9d883c 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 @@ -159,7 +159,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 7c61ebf75e..d3ace34c17 100644 --- a/docs/da/d23/ts__muxer_8h_source.html +++ b/docs/da/d23/ts__muxer_8h_source.html @@ -137,7 +137,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d24/h265__parser_8h_source.html b/docs/da/d24/h265__parser_8h_source.html index 7ce91ade32..e8283f663f 100644 --- a/docs/da/d24/h265__parser_8h_source.html +++ b/docs/da/d24/h265__parser_8h_source.html @@ -450,7 +450,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 f171f3cab8..4dd810c5bb 100644 --- a/docs/da/d2a/text__stream__info_8h_source.html +++ b/docs/da/d2a/text__stream__info_8h_source.html @@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 5b6fa4f8f7..eba8eec768 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 @@ -117,7 +117,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 aa1e056455..ad7830420f 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 a247a7a990..91e374f175 100644 --- a/docs/da/d41/mp4_2multi__segment__segmenter_8h_source.html +++ b/docs/da/d41/mp4_2multi__segment__segmenter_8h_source.html @@ -143,7 +143,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d43/structshaka_1_1ContentProtectionElement.html b/docs/da/d43/structshaka_1_1ContentProtectionElement.html index be4803394a..3eb0fd3e12 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 6989197af8..01a3622894 100644 --- a/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html +++ b/docs/da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html @@ -313,7 +313,7 @@ Static Public Member Functions 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 49463a5b5b..117d8b37b2 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2134 of file box_definitions.cc.

+

Definition at line 2135 of file box_definitions.cc.

@@ -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 8d5adfcea5..ee72b09cbc 100644 --- a/docs/da/d53/es__parser__h265_8cc_source.html +++ b/docs/da/d53/es__parser__h265_8cc_source.html @@ -267,7 +267,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 2ff0feaf11..5df72659f8 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 @@ -174,7 +174,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 801 of file box_definitions.cc.

+

Definition at line 802 of file box_definitions.cc.

@@ -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 0c18359a98..1cf924fcbd 100644 --- a/docs/da/d5c/widevine__key__source_8h_source.html +++ b/docs/da/d5c/widevine__key__source_8h_source.html @@ -223,7 +223,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 b515c2ff04..78f1bbf444 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 5435d24c56..f1ea3da6ea 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 @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 bc15cda171..7790f818be 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 6140f2c272..18f5f6637b 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 d7674ef2f9..d29a1f63e5 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 1d64bf0bba..678183035f 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 @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d88/mp4__muxer_8cc_source.html b/docs/da/d88/mp4__muxer_8cc_source.html index 5b8e6ff818..fa9584b16c 100644 --- a/docs/da/d88/mp4__muxer_8cc_source.html +++ b/docs/da/d88/mp4__muxer_8cc_source.html @@ -393,8 +393,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
304  // values.
305  const uint64_t kNanosecondsPerSecond = 1000000000ull;
306  sample_group_description.audio_roll_recovery_entries[0].roll_distance =
-
307  -(audio_info->seek_preroll_ns() * audio.samplerate +
-
308  kNanosecondsPerSecond / 2) /
+
307  (0 - (audio_info->seek_preroll_ns() * audio.samplerate +
+
308  kNanosecondsPerSecond / 2)) /
309  kNanosecondsPerSecond;
310 
311  sample_table.sample_to_groups.resize(1);
@@ -503,14 +503,14 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
MP4Muxer(const MuxerOptions &options)
Create a MP4Muxer object from MuxerOptions.
Definition: mp4_muxer.cc:89
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:175
+
static int64_t GetFileSize(const char *file_name)
Definition: file.cc:180
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 825f56d940..311f990cb3 100644 --- a/docs/da/d8b/classshaka_1_1media_1_1WebMMediaParser-members.html +++ b/docs/da/d8b/classshaka_1_1media_1_1WebMMediaParser-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/da/d8e/container__names_8cc_source.html b/docs/da/d8e/container__names_8cc_source.html index 0acdf8ad60..c18fa1da9f 100644 --- a/docs/da/d8e/container__names_8cc_source.html +++ b/docs/da/d8e/container__names_8cc_source.html @@ -1863,7 +1863,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 e30f0c27fc..2c23111d38 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 cfe66373f2..8aca78c12f 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 3292755e97..acadea551f 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 0257e47922..05c774cc3b 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 c405b5fc01..f435d47dd5 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 d3b8d55dc9..e4b33b6882 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 ce54d46b8b..a43d218250 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1234 of file box_definitions.cc.

+

Definition at line 1235 of file box_definitions.cc.

@@ -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 ba37e366fd..a5b755d7bd 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 a5a0fe8d45..336c96d702 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 @@ -204,7 +204,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 564 of file box_definitions.cc.

+

Definition at line 565 of file box_definitions.cc.

@@ -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 2ec44bf8c0..fd747436d1 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/structshaka_1_1media_1_1mp4_1_1Edit.html b/docs/da/dd0/structshaka_1_1media_1_1mp4_1_1Edit.html index c328ec480a..c3d86a65dd 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 @@ -162,7 +162,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1217 of file box_definitions.cc.

+

Definition at line 1218 of file box_definitions.cc.

@@ -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 d9913893c4..9ccaefa63a 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 cf4fe75e07..5976647656 100644 --- a/docs/da/dd1/fragmenter_8h_source.html +++ b/docs/da/dd1/fragmenter_8h_source.html @@ -206,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 f0c4f41c85..bd1cf32442 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 592eb99175..5d98426a83 100644 --- a/docs/da/dd6/classshaka_1_1media_1_1H264ByteToUnitStreamConverter-members.html +++ b/docs/da/dd6/classshaka_1_1media_1_1H264ByteToUnitStreamConverter-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 74582a26f0..e0d98b87f6 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 @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 4a66287117..7b4cfe8810 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 38989dbf17..614d635385 100644 --- a/docs/da/ddd/classshaka_1_1media_1_1WidevineKeySource.html +++ b/docs/da/ddd/classshaka_1_1media_1_1WidevineKeySource.html @@ -550,7 +550,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 d5bf8ba9e6..742428b67a 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 047d7e2e60..7c775ec733 100644 --- a/docs/da/de2/mock__mpd__builder_8cc_source.html +++ b/docs/da/de2/mock__mpd__builder_8cc_source.html @@ -123,7 +123,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 57481eb7ce..beb12377ef 100644 --- a/docs/da/de4/classshaka_1_1media_1_1WebMClusterParser.html +++ b/docs/da/de4/classshaka_1_1media_1_1WebMClusterParser.html @@ -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 5ffc168c70..8a2e04f0c3 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'); 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 9d73f54dea..50d6e1c815 100644 --- a/docs/da/de8/classshaka_1_1media_1_1AudioStreamInfo-members.html +++ b/docs/da/de8/classshaka_1_1media_1_1AudioStreamInfo-members.html @@ -126,7 +126,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 59a06bd2e9..00583cdef4 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 @@ -168,7 +168,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 484 of file box_definitions.cc.

+

Definition at line 485 of file box_definitions.cc.

@@ -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 be30aeb4ca..2743b270a3 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 5be9684d86..8f514fa12d 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 929c026f12..355e00a9c7 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 @@ -180,7 +180,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 604 of file box_definitions.cc.

+

Definition at line 605 of file box_definitions.cc.

@@ -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 db6634c680..80eccf3bcc 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 43e17f18aa..d10c089e85 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 54a67f3b33..98bd7cd921 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 @@ -165,7 +165,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1429 of file box_definitions.cc.

+

Definition at line 1430 of file box_definitions.cc.

@@ -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 fc9a5bbf4f..72c157fc54 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 3e4052ea37..12dc8f7693 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 0780fc41b4..dc8d8b37e5 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 @@ -164,7 +164,7 @@ uint32_t flagsImplements shaka::media::mp4::Box.

-

Definition at line 1964 of file box_definitions.cc.

+

Definition at line 1965 of file box_definitions.cc.

@@ -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 a9c2303eb3..c33eee362d 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 @@ -179,7 +179,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 774201e5db..2431fe50a6 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 @@ -143,7 +143,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 c4480c4f14..f59791c0c0 100644 --- a/docs/db/d31/track__run__iterator_8cc_source.html +++ b/docs/db/d31/track__run__iterator_8cc_source.html @@ -430,7 +430,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
341  .default_per_sample_iv_size
342  : video_sample_entry->sinf.info.track_encryption
343  .default_per_sample_iv_size;
-
344  RCHECK(traf.sample_encryption.ParseFromSampleEncryptionData(
+
344  RCHECK(traf.sample_encryption.ParseFromSampleEncryptionData(
345  default_per_sample_iv_size, &sample_encryption_entries));
346  }
347 
@@ -741,11 +741,11 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); -
bool ParseFromSampleEncryptionData(size_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const
std::vector< uint8_t > sample_encryption_data
+
bool ParseFromSampleEncryptionData(uint8_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const
@@ -767,7 +767,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 c347fce06e..9db5ec5374 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 @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 6b1695a75f..0d3ab2bf5a 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 6f12274942..b7e3403ba5 100644 --- a/docs/db/d45/mpd__notify__muxer__listener_8h_source.html +++ b/docs/db/d45/mpd__notify__muxer__listener_8h_source.html @@ -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 c3bb7a6012..2efbadc928 100644 --- a/docs/db/d4b/classshaka_1_1MockAdaptationSet.html +++ b/docs/db/d4b/classshaka_1_1MockAdaptationSet.html @@ -183,7 +183,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 728188ae2a..1c3fbe86c0 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 e02090b027..fb23418e26 100644 --- a/docs/db/d51/mp2t__media__parser_8h_source.html +++ b/docs/db/d51/mp2t__media__parser_8h_source.html @@ -193,7 +193,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 25822d031a..80df89d7d8 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 @@ -145,7 +145,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 9d4d880bcd..b06d350db9 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 74c205bbdc..a1fac06d04 100644 --- a/docs/db/d60/mpd__options_8h_source.html +++ b/docs/db/d60/mpd__options_8h_source.html @@ -126,7 +126,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 47699cad22..e84970e69a 100644 --- a/docs/db/d64/webvtt__media__parser_8h_source.html +++ b/docs/db/d64/webvtt__media__parser_8h_source.html @@ -181,7 +181,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 950e9874e7..a96a53ffc2 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/d71/http__key__fetcher_8h_source.html b/docs/db/d71/http__key__fetcher_8h_source.html index d7de5cd0b3..a73211f93c 100644 --- a/docs/db/d71/http__key__fetcher_8h_source.html +++ b/docs/db/d71/http__key__fetcher_8h_source.html @@ -150,7 +150,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 ac4567bd95..44857eb873 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 2d538debc2..f84aa77797 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 @@ -130,7 +130,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 1c37ab06a0..2dd2792687 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 4b83d375d6..698306b2a4 100644 --- a/docs/db/d7e/muxer__options_8cc_source.html +++ b/docs/db/d7e/muxer__options_8cc_source.html @@ -114,7 +114,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 9db3b984fc..d860df3baf 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 c1d1434fa2..a9c15185f4 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 07a9f101dc..cdcce37865 100644 --- a/docs/db/d8f/mp4__muxer_8h_source.html +++ b/docs/db/d8f/mp4__muxer_8h_source.html @@ -173,7 +173,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/d94/classshaka_1_1media_1_1ClusterBuilder.html b/docs/db/d94/classshaka_1_1media_1_1ClusterBuilder.html index 228a78cfb6..b6f2132e97 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 @@ scoped_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 76e21881ab..5675c93412 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 @@ -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 d3e873c111..83aafcf06f 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 @@ -174,7 +174,7 @@ Additional Inherited Members

Reimplemented in shaka::media::mp4::ChunkOffset.

-

Definition at line 875 of file box_definitions.cc.

+

Definition at line 876 of file box_definitions.cc.

@@ -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 9af5faf1f4..8af7c28221 100644 --- a/docs/db/d96/wvm__media__parser_8h_source.html +++ b/docs/db/d96/wvm__media__parser_8h_source.html @@ -363,7 +363,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/da4/classBandwidthEstimator-members.html b/docs/db/da4/classBandwidthEstimator-members.html index f3973cbbb6..8aba30bd68 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'); diff --git a/docs/db/da6/memory__file_8h_source.html b/docs/db/da6/memory__file_8h_source.html index bf335d565c..16215cc303 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 196eb72e48..cc6801d018 100644 --- a/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.html +++ b/docs/db/dab/classshaka_1_1media_1_1TextStreamInfo.html @@ -276,7 +276,7 @@ void set_language (con diff --git a/docs/db/dae/classshaka_1_1media_1_1WebMInfoParser.html b/docs/db/dae/classshaka_1_1media_1_1WebMInfoParser.html index 9d491ac610..f9513ccac8 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 9e58e45b6f..969c03156d 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 ad31b0112d..fb61b75fac 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 8708281960..c60473d89e 100644 --- a/docs/db/db8/structshaka_1_1media_1_1OnMediaEndParameters.html +++ b/docs/db/db8/structshaka_1_1media_1_1OnMediaEndParameters.html @@ -130,7 +130,7 @@ uint64_t file_size 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 2cdf5f12db..77bd1f3130 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 8a27d5a9c5..14292da861 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 fba78b6b83..5873bd250a 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 @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/dcd/classshaka_1_1MpdWriter.html b/docs/db/dcd/classshaka_1_1MpdWriter.html index 26c6320145..91e0e6fca1 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 1c830c5fb0..d28d064036 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 aaec39ca5b..f858fdb4f2 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 de5628a4b1..ce326685af 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 4c8e00555b..364298ee5a 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 2cfe2a5a59..0756acfd9a 100644 --- a/docs/db/dde/h265__parser_8cc_source.html +++ b/docs/db/dde/h265__parser_8cc_source.html @@ -1221,7 +1221,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 a78ad6c95d..a84a7360f2 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 a5c08d419e..b96359744e 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 0c30f2f57d..3e257ba37f 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 aa4387d035..1b963f3728 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 f1861bca96..5757b8bb89 100644 --- a/docs/db/df6/muxer_8h_source.html +++ b/docs/db/df6/muxer_8h_source.html @@ -212,7 +212,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/db/df8/classshaka_1_1media_1_1H265ByteToUnitStreamConverter.html b/docs/db/df8/classshaka_1_1media_1_1H265ByteToUnitStreamConverter.html index 6ebd1fc8e3..71c1b516ec 100644 --- a/docs/db/df8/classshaka_1_1media_1_1H265ByteToUnitStreamConverter.html +++ b/docs/db/df8/classshaka_1_1media_1_1H265ByteToUnitStreamConverter.html @@ -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 e8a1c09145..ebb02dfd69 100644 --- a/docs/db/dfb/mpd__utils_8cc_source.html +++ b/docs/db/dfb/mpd__utils_8cc_source.html @@ -444,7 +444,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 c3915eb4c6..2f7960ba3b 100644 --- a/docs/db/dfc/mpd__notify__muxer__listener_8cc_source.html +++ b/docs/db/dfc/mpd__notify__muxer__listener_8cc_source.html @@ -274,7 +274,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 c702f853d6..feeb3f3465 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 bf76ad2234..ffd10e3b18 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 0242c81b19..e6f229f5e3 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 dd30a34020..35628fbf6f 100644 --- a/docs/dc/d06/classshaka_1_1media_1_1StreamInfo-members.html +++ b/docs/dc/d06/classshaka_1_1media_1_1StreamInfo-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 7dce98a1d6..a6a68bfe50 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 e81dfd06b9..e09329da12 100644 --- a/docs/dc/d16/classshaka_1_1media_1_1SeekHead.html +++ b/docs/dc/d16/classshaka_1_1media_1_1SeekHead.html @@ -148,7 +148,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 f9b3b9d042..dd59b44159 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 @@ -256,7 +256,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 1a5670b2c5..d98d6cba48 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 a20035a1dd..b0d2fbf8ff 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 3206065317..cc00142d3c 100644 --- a/docs/dc/d22/dash__iop__mpd__notifier_8cc_source.html +++ b/docs/dc/d22/dash__iop__mpd__notifier_8cc_source.html @@ -376,16 +376,16 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
bool NotifyNewSegment(uint32_t id, uint64_t start_time, uint64_t duration, uint64_t size) override
bool NotifyEncryptionUpdate(uint32_t container_id, const std::string &drm_uuid, const std::vector< uint8_t > &new_key_id, const std::vector< uint8_t > &new_pssh) override
-
virtual Representation * AddRepresentation(const MediaInfo &media_info)
Definition: mpd_builder.cc:694
+
virtual Representation * AddRepresentation(const MediaInfo &media_info)
Definition: mpd_builder.cc:693
uint32_t id() const
Definition: mpd_builder.h:503
bool NotifySampleDuration(uint32_t container_id, uint32_t sample_duration) override
void AddContentProtectionElements(const MediaInfo &media_info, Representation *parent)
Definition: mpd_utils.cc:339
-
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
Definition: mpd_builder.cc:744
+
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
Definition: mpd_builder.cc:743
std::string Uint8VectorToBase64(const std::vector< uint8_t > &input)
Converts uint8 vector into base64 encoded string.
-
virtual void ForceSetSegmentAlignment(bool segment_alignment)
Definition: mpd_builder.cc:837
+
virtual void ForceSetSegmentAlignment(bool segment_alignment)
Definition: mpd_builder.cc:836
bool AddContentProtectionElement(uint32_t id, const ContentProtectionElement &content_protection_element) override
-
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:647
+
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:646
ContentType GetContentType(const MediaInfo &media_info)
@@ -394,7 +394,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 6a59a10046..3034fbfb7a 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 eeaea028d8..03b662ee96 100644 --- a/docs/dc/d3c/webm__cluster__parser_8h_source.html +++ b/docs/dc/d3c/webm__cluster__parser_8h_source.html @@ -298,7 +298,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d3f/key__source_8h_source.html b/docs/dc/d3f/key__source_8h_source.html index 7e478041b7..0229eba9a9 100644 --- a/docs/dc/d3f/key__source_8h_source.html +++ b/docs/dc/d3f/key__source_8h_source.html @@ -169,7 +169,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 e01cbe4cd6..3c101a74ac 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 34038fe35b..6ea0ef31ee 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 c9d0b85fe5..ee0c6ffcba 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 f90299c631..04e15cb868 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 ec7c8bcec5..4c026fb109 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 daad671bde..1873960237 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 78cfa72cc2..beb04ebb27 100644 --- a/docs/dc/d53/webm_2segmenter_8cc_source.html +++ b/docs/dc/d53/webm_2segmenter_8cc_source.html @@ -525,33 +525,33 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
436 } // namespace shaka
Abstract class holds stream information.
Definition: stream_info.h:26
-
Status Initialize(const std::vector< MediaStream * > &streams, MuxerListener *muxer_listener, ProgressListener *progress_listener, KeySource *encryption_key_source, uint32_t max_sd_pixels, double clear_lead_in_seconds, double crypto_period_duration_in_seconds, FourCC protection_scheme)
Definition: segmenter.cc:165
-
void UpdateProgress(uint64_t progress)
Update segmentation progress using ProgressListener.
Definition: segmenter.cc:388
+
Status Initialize(const std::vector< MediaStream * > &streams, MuxerListener *muxer_listener, ProgressListener *progress_listener, KeySource *encryption_key_source, uint32_t max_sd_pixels, double clear_lead_in_seconds, double crypto_period_duration_in_seconds, FourCC protection_scheme)
Definition: segmenter.cc:166
+
void UpdateProgress(uint64_t progress)
Update segmentation progress using ProgressListener.
Definition: segmenter.cc:389
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:321
+
Status AddSample(const MediaStream *stream, scoped_refptr< MediaSample > sample)
Definition: segmenter.cc:322
This class listens to progress updates events.
mkvmuxer::int64 Position() const override
Definition: mkv_writer.cc:71
-
void WriteWebM(std::vector< uint8_t > *data) const
+
void WriteWebM(std::vector< uint8_t > *data) const
An implementation of IMkvWriter using our File type.
Definition: mkv_writer.h:21
bool ParseMP4(const std::vector< uint8_t > &data)
- +
virtual void OnProgress(double progress)=0
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:31
-
double GetDuration() const
Definition: segmenter.cc:379
+
double GetDuration() const
Definition: segmenter.cc:380
Holds video stream information.
diff --git a/docs/dc/d54/structshaka_1_1media_1_1H264DecRefPicMarking.html b/docs/dc/d54/structshaka_1_1media_1_1H264DecRefPicMarking.html index fbc3b9dc23..636b60e451 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 e28d116422..fcb3a25c7d 100644 --- a/docs/dc/d58/webm__media__parser_8h_source.html +++ b/docs/dc/d58/webm__media__parser_8h_source.html @@ -179,7 +179,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/d5c/classshaka_1_1MockMpdNotifier.html b/docs/dc/d5c/classshaka_1_1MockMpdNotifier.html index 470eeffdac..8bd4a284b6 100644 --- a/docs/dc/d5c/classshaka_1_1MockMpdNotifier.html +++ b/docs/dc/d5c/classshaka_1_1MockMpdNotifier.html @@ -160,7 +160,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 7816d56813..56d24b1b3b 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 96ab7d5d88..76455fa158 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 @@ -121,7 +121,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 af409553c8..d4131c72ae 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 d596cf0991..0cfbadc9ee 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 282ddb2b2e..ce76d27d2c 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 965033f898..b7371d5a42 100644 --- a/docs/dc/d7b/h264__parser_8cc_source.html +++ b/docs/dc/d7b/h264__parser_8cc_source.html @@ -1264,7 +1264,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 df46e4a326..6f85c99438 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 8e986e67a3..41cacc9f5f 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2257 of file box_definitions.cc.

+

Definition at line 2258 of file box_definitions.cc.

@@ -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 35c71ad11d..130c948dd8 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 @@ -174,7 +174,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1639 of file box_definitions.cc.

+

Definition at line 1640 of file box_definitions.cc.

@@ -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 d843a6fd21..f391726225 100644 --- a/docs/dc/da1/classshaka_1_1MpdBuilder.html +++ b/docs/dc/da1/classshaka_1_1MpdBuilder.html @@ -184,7 +184,7 @@ class DynamicMpdBuilderTes -

Definition at line 402 of file mpd_builder.cc.

+

Definition at line 401 of file mpd_builder.cc.

@@ -219,7 +219,7 @@ class DynamicMpdBuilderTes
Returns
The new adaptation set, which is owned by this instance.
-

Definition at line 414 of file mpd_builder.cc.

+

Definition at line 413 of file mpd_builder.cc.

@@ -244,7 +244,7 @@ class DynamicMpdBuilderTes -

Definition at line 410 of file mpd_builder.cc.

+

Definition at line 409 of file mpd_builder.cc.

@@ -288,7 +288,7 @@ class DynamicMpdBuilderTes -

Definition at line 647 of file mpd_builder.cc.

+

Definition at line 646 of file mpd_builder.cc.

@@ -322,7 +322,7 @@ class DynamicMpdBuilderTes
Returns
true on success, false otherwise.
-

Definition at line 429 of file mpd_builder.cc.

+

Definition at line 428 of file mpd_builder.cc.

@@ -374,7 +374,7 @@ class DynamicMpdBuilderTes
Returns
true on success, false otherwise.
-

Definition at line 424 of file mpd_builder.cc.

+

Definition at line 423 of file mpd_builder.cc.

@@ -385,7 +385,7 @@ class DynamicMpdBuilderTes diff --git a/docs/dc/da6/classshaka_1_1media_1_1ContentEncoding.html b/docs/dc/da6/classshaka_1_1media_1_1ContentEncoding.html index e051c72673..01a3900b51 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 c97585dd64..7ab5cd6e1f 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 5fe77f6cfc..dbe9797d2c 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 952eaeb0d0..aeec3b41bd 100644 --- a/docs/dc/dc1/classshaka_1_1xml_1_1RepresentationXmlNode-members.html +++ b/docs/dc/dc1/classshaka_1_1xml_1_1RepresentationXmlNode-members.html @@ -117,7 +117,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 ff9eb0fb22..1ae972da67 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 edd33cd6e8..8adb9b04ae 100644 --- a/docs/dc/dd9/rsa__key_8cc_source.html +++ b/docs/dc/dd9/rsa__key_8cc_source.html @@ -350,7 +350,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 62081dcb8c..e341a30f20 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 @@ -168,7 +168,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2080 of file box_definitions.cc.

+

Definition at line 2081 of file box_definitions.cc.

@@ -179,7 +179,7 @@ Additional Inherited Members diff --git a/docs/dc/ddf/udp__file__posix_8cc_source.html b/docs/dc/ddf/udp__file__posix_8cc_source.html index 127bd2e744..093c578984 100644 --- a/docs/dc/ddf/udp__file__posix_8cc_source.html +++ b/docs/dc/ddf/udp__file__posix_8cc_source.html @@ -322,7 +322,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dc/de1/structshaka_1_1SegmentInfo.html b/docs/dc/de1/structshaka_1_1SegmentInfo.html index d6e3309c52..7469f7a819 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 704e647a04..d6bf23b5e1 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 @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 93ea485f25..07a9f9cdb3 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 cb737f4d01..9780ead7ae 100644 --- a/docs/dc/dec/ts__section__pmt_8cc_source.html +++ b/docs/dc/dec/ts__section__pmt_8cc_source.html @@ -207,7 +207,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 d3b7c690aa..7d6b47ff82 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 78bb66d8bd..88eb567d60 100644 --- a/docs/dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html +++ b/docs/dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html @@ -256,7 +256,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 7b137d5fcd..20013884e8 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 @@ -328,7 +328,7 @@ void set_encryption_keyCreate the encryptor for the internal encryption key. The existing encryptor will be reset if it is not NULL.

Returns
OK on success, an error status otherwise.
-

Definition at line 208 of file encrypting_fragmenter.cc.

+

Definition at line 209 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 3f36dc0a55..7a1cab4a6d 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 @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 9784bd3431..21c4cb7bff 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 1b9242d970..c07fd8a0db 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 4862a08538..a980ac8f16 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 @@ -169,7 +169,7 @@ uint32_t flagsReimplemented from shaka::media::mp4::ChunkLargeOffset.

-

Definition at line 856 of file box_definitions.cc.

+

Definition at line 857 of file box_definitions.cc.

@@ -180,7 +180,7 @@ uint32_t flags diff --git a/docs/dd/d11/mpd__builder_8cc_source.html b/docs/dd/d11/mpd__builder_8cc_source.html index 10430be191..10472d5748 100644 --- a/docs/dd/d11/mpd__builder_8cc_source.html +++ b/docs/dd/d11/mpd__builder_8cc_source.html @@ -421,1095 +421,1094 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
332  case AdaptationSet::kRoleDub:
333  return "dub";
334  default:
-
335  NOTREACHED();
-
336  return "";
-
337  }
-
338 
-
339  NOTREACHED();
-
340  return "";
-
341 }
-
342 
-
343 // Spooky static initialization/cleanup of libxml.
-
344 class LibXmlInitializer {
-
345  public:
-
346  LibXmlInitializer() : initialized_(false) {
-
347  base::AutoLock lock(lock_);
-
348  if (!initialized_) {
-
349  xmlInitParser();
-
350  initialized_ = true;
-
351  }
-
352  }
-
353 
-
354  ~LibXmlInitializer() {
-
355  base::AutoLock lock(lock_);
-
356  if (initialized_) {
-
357  xmlCleanupParser();
-
358  initialized_ = false;
-
359  }
-
360  }
-
361 
-
362  private:
-
363  base::Lock lock_;
-
364  bool initialized_;
-
365 
-
366  DISALLOW_COPY_AND_ASSIGN(LibXmlInitializer);
-
367 };
-
368 
-
369 class RepresentationStateChangeListenerImpl
-
370  : public RepresentationStateChangeListener {
-
371  public:
-
372  // |adaptation_set| is not owned by this class.
-
373  RepresentationStateChangeListenerImpl(uint32_t representation_id,
-
374  AdaptationSet* adaptation_set)
-
375  : representation_id_(representation_id), adaptation_set_(adaptation_set) {
-
376  DCHECK(adaptation_set_);
-
377  }
-
378  ~RepresentationStateChangeListenerImpl() override {}
-
379 
-
380  // RepresentationStateChangeListener implementation.
-
381  void OnNewSegmentForRepresentation(uint64_t start_time,
-
382  uint64_t duration) override {
-
383  adaptation_set_->OnNewSegmentForRepresentation(representation_id_,
-
384  start_time, duration);
-
385  }
-
386 
-
387  void OnSetFrameRateForRepresentation(uint32_t frame_duration,
-
388  uint32_t timescale) override {
-
389  adaptation_set_->OnSetFrameRateForRepresentation(representation_id_,
-
390  frame_duration, timescale);
-
391  }
-
392 
-
393  private:
-
394  const uint32_t representation_id_;
-
395  AdaptationSet* const adaptation_set_;
-
396 
-
397  DISALLOW_COPY_AND_ASSIGN(RepresentationStateChangeListenerImpl);
-
398 };
-
399 
-
400 } // namespace
-
401 
-
402 MpdBuilder::MpdBuilder(MpdType type, const MpdOptions& mpd_options)
-
403  : type_(type),
-
404  mpd_options_(mpd_options),
-
405  adaptation_sets_deleter_(&adaptation_sets_),
-
406  clock_(new base::DefaultClock()) {}
-
407 
-
408 MpdBuilder::~MpdBuilder() {}
-
409 
-
410 void MpdBuilder::AddBaseUrl(const std::string& base_url) {
-
411  base_urls_.push_back(base_url);
-
412 }
-
413 
-
414 AdaptationSet* MpdBuilder::AddAdaptationSet(const std::string& lang) {
-
415  scoped_ptr<AdaptationSet> adaptation_set(
-
416  new AdaptationSet(adaptation_set_counter_.GetNext(), lang, mpd_options_,
-
417  type_, &representation_counter_));
-
418 
-
419  DCHECK(adaptation_set);
-
420  adaptation_sets_.push_back(adaptation_set.get());
-
421  return adaptation_set.release();
-
422 }
-
423 
- -
425  DCHECK(output_file);
-
426  return WriteMpdToOutput(output_file);
-
427 }
-
428 
-
429 bool MpdBuilder::ToString(std::string* output) {
-
430  DCHECK(output);
-
431  return WriteMpdToOutput(output);
-
432 }
-
433 template <typename OutputType>
-
434 bool MpdBuilder::WriteMpdToOutput(OutputType* output) {
-
435  static LibXmlInitializer lib_xml_initializer;
-
436 
-
437  xml::scoped_xml_ptr<xmlDoc> doc(GenerateMpd());
-
438  if (!doc.get())
-
439  return false;
-
440 
-
441  static const int kNiceFormat = 1;
-
442  int doc_str_size = 0;
-
443  xmlChar* doc_str = NULL;
-
444  xmlDocDumpFormatMemoryEnc(doc.get(), &doc_str, &doc_str_size, "UTF-8",
-
445  kNiceFormat);
-
446 
-
447  bool result = WriteXmlCharArrayToOutput(doc_str, doc_str_size, output);
-
448  xmlFree(doc_str);
-
449 
-
450  // Cleanup, free the doc.
-
451  doc.reset();
-
452  return result;
-
453 }
-
454 
-
455 xmlDocPtr MpdBuilder::GenerateMpd() {
-
456  // Setup nodes.
-
457  static const char kXmlVersion[] = "1.0";
-
458  xml::scoped_xml_ptr<xmlDoc> doc(xmlNewDoc(BAD_CAST kXmlVersion));
-
459  XmlNode mpd("MPD");
-
460 
-
461  // Iterate thru AdaptationSets and add them to one big Period element.
-
462  XmlNode period("Period");
-
463 
-
464  // Always set id=0 for now. Since this class can only generate one Period
-
465  // at the moment, just use a constant.
-
466  // Required for 'dynamic' MPDs.
-
467  period.SetId(0);
-
468  std::list<AdaptationSet*>::iterator adaptation_sets_it =
-
469  adaptation_sets_.begin();
-
470  for (; adaptation_sets_it != adaptation_sets_.end(); ++adaptation_sets_it) {
-
471  xml::scoped_xml_ptr<xmlNode> child((*adaptation_sets_it)->GetXml());
-
472  if (!child.get() || !period.AddChild(child.Pass()))
-
473  return NULL;
-
474  }
-
475 
-
476  // Add baseurls to MPD.
-
477  std::list<std::string>::const_iterator base_urls_it = base_urls_.begin();
-
478  for (; base_urls_it != base_urls_.end(); ++base_urls_it) {
-
479  XmlNode base_url("BaseURL");
-
480  base_url.SetContent(*base_urls_it);
-
481 
-
482  if (!mpd.AddChild(base_url.PassScopedPtr()))
-
483  return NULL;
-
484  }
-
485 
-
486  if (type_ == kDynamic) {
-
487  // This is the only Period and it is a regular period.
-
488  period.SetStringAttribute("start", "PT0S");
-
489  }
-
490 
-
491  if (!mpd.AddChild(period.PassScopedPtr()))
-
492  return NULL;
-
493 
-
494  AddMpdNameSpaceInfo(&mpd);
-
495  AddCommonMpdInfo(&mpd);
-
496  switch (type_) {
-
497  case kStatic:
-
498  AddStaticMpdInfo(&mpd);
-
499  break;
-
500  case kDynamic:
-
501  AddDynamicMpdInfo(&mpd);
-
502  break;
-
503  default:
-
504  NOTREACHED() << "Unknown MPD type: " << type_;
-
505  break;
-
506  }
-
507 
-
508  DCHECK(doc);
-
509  const std::string version = GetPackagerVersion();
-
510  if (!version.empty()) {
-
511  std::string version_string =
-
512  base::StringPrintf("Generated with %s version %s",
-
513  GetPackagerProjectUrl().c_str(), version.c_str());
-
514  xml::scoped_xml_ptr<xmlNode> comment(
-
515  xmlNewDocComment(doc.get(), BAD_CAST version_string.c_str()));
-
516  xmlDocSetRootElement(doc.get(), comment.get());
-
517  xmlAddSibling(comment.release(), mpd.Release());
-
518  } else {
-
519  xmlDocSetRootElement(doc.get(), mpd.Release());
-
520  }
-
521  return doc.release();
-
522 }
-
523 
-
524 void MpdBuilder::AddCommonMpdInfo(XmlNode* mpd_node) {
-
525  if (Positive(mpd_options_.min_buffer_time)) {
-
526  mpd_node->SetStringAttribute(
-
527  "minBufferTime", SecondsToXmlDuration(mpd_options_.min_buffer_time));
-
528  } else {
-
529  LOG(ERROR) << "minBufferTime value not specified.";
-
530  // TODO(tinskip): Propagate error.
-
531  }
-
532 }
-
533 
-
534 void MpdBuilder::AddStaticMpdInfo(XmlNode* mpd_node) {
-
535  DCHECK(mpd_node);
-
536  DCHECK_EQ(MpdBuilder::kStatic, type_);
-
537 
-
538  static const char kStaticMpdType[] = "static";
-
539  static const char kStaticMpdProfile[] =
-
540  "urn:mpeg:dash:profile:isoff-on-demand:2011";
-
541  mpd_node->SetStringAttribute("type", kStaticMpdType);
-
542  mpd_node->SetStringAttribute("profiles", kStaticMpdProfile);
-
543  mpd_node->SetStringAttribute(
-
544  "mediaPresentationDuration",
-
545  SecondsToXmlDuration(GetStaticMpdDuration(mpd_node)));
-
546 }
-
547 
-
548 void MpdBuilder::AddDynamicMpdInfo(XmlNode* mpd_node) {
-
549  DCHECK(mpd_node);
-
550  DCHECK_EQ(MpdBuilder::kDynamic, type_);
-
551 
-
552  static const char kDynamicMpdType[] = "dynamic";
-
553  static const char kDynamicMpdProfile[] =
-
554  "urn:mpeg:dash:profile:isoff-live:2011";
-
555  mpd_node->SetStringAttribute("type", kDynamicMpdType);
-
556  mpd_node->SetStringAttribute("profiles", kDynamicMpdProfile);
-
557 
-
558  // No offset from NOW.
-
559  mpd_node->SetStringAttribute("publishTime",
-
560  XmlDateTimeNowWithOffset(0, clock_.get()));
-
561 
-
562  // 'availabilityStartTime' is required for dynamic profile. Calculate if
-
563  // not already calculated.
-
564  if (availability_start_time_.empty()) {
-
565  double earliest_presentation_time;
-
566  if (GetEarliestTimestamp(&earliest_presentation_time)) {
-
567  availability_start_time_ =
-
568  XmlDateTimeNowWithOffset(mpd_options_.availability_time_offset -
-
569  std::ceil(earliest_presentation_time),
-
570  clock_.get());
-
571  } else {
-
572  LOG(ERROR) << "Could not determine the earliest segment presentation "
-
573  "time for availabilityStartTime calculation.";
-
574  // TODO(tinskip). Propagate an error.
-
575  }
-
576  }
-
577  if (!availability_start_time_.empty())
-
578  mpd_node->SetStringAttribute("availabilityStartTime",
-
579  availability_start_time_);
-
580 
-
581  if (Positive(mpd_options_.minimum_update_period)) {
-
582  mpd_node->SetStringAttribute(
-
583  "minimumUpdatePeriod",
-
584  SecondsToXmlDuration(mpd_options_.minimum_update_period));
-
585  } else {
-
586  LOG(WARNING) << "The profile is dynamic but no minimumUpdatePeriod "
-
587  "specified.";
-
588  }
-
589 
-
590  SetIfPositive("timeShiftBufferDepth", mpd_options_.time_shift_buffer_depth,
-
591  mpd_node);
-
592  SetIfPositive("suggestedPresentationDelay",
-
593  mpd_options_.suggested_presentation_delay, mpd_node);
-
594 }
-
595 
-
596 float MpdBuilder::GetStaticMpdDuration(XmlNode* mpd_node) {
-
597  DCHECK(mpd_node);
-
598  DCHECK_EQ(MpdBuilder::kStatic, type_);
-
599 
-
600  xmlNodePtr period_node = FindPeriodNode(mpd_node);
-
601  DCHECK(period_node) << "Period element must be a child of mpd_node.";
-
602  DCHECK(IsPeriodNode(period_node));
-
603 
-
604  // Attribute mediaPresentationDuration must be present for 'static' MPD. So
-
605  // setting "PT0S" is required even if none of the representaions have duration
-
606  // attribute.
-
607  float max_duration = 0.0f;
-
608  for (xmlNodePtr adaptation_set = xmlFirstElementChild(period_node);
-
609  adaptation_set; adaptation_set = xmlNextElementSibling(adaptation_set)) {
-
610  for (xmlNodePtr representation = xmlFirstElementChild(adaptation_set);
-
611  representation;
-
612  representation = xmlNextElementSibling(representation)) {
-
613  float duration = 0.0f;
-
614  if (GetDurationAttribute(representation, &duration)) {
-
615  max_duration = max_duration > duration ? max_duration : duration;
-
616 
-
617  // 'duration' attribute is there only to help generate MPD, not
-
618  // necessary for MPD, remove the attribute.
-
619  xmlUnsetProp(representation, BAD_CAST "duration");
-
620  }
-
621  }
-
622  }
-
623 
-
624  return max_duration;
-
625 }
-
626 
-
627 bool MpdBuilder::GetEarliestTimestamp(double* timestamp_seconds) {
-
628  DCHECK(timestamp_seconds);
-
629 
-
630  double earliest_timestamp(-1);
-
631  for (std::list<AdaptationSet*>::const_iterator iter =
-
632  adaptation_sets_.begin();
-
633  iter != adaptation_sets_.end(); ++iter) {
-
634  double timestamp;
-
635  if ((*iter)->GetEarliestTimestamp(&timestamp) &&
-
636  ((earliest_timestamp < 0) || (timestamp < earliest_timestamp))) {
-
637  earliest_timestamp = timestamp;
-
638  }
-
639  }
-
640  if (earliest_timestamp < 0)
-
641  return false;
-
642 
-
643  *timestamp_seconds = earliest_timestamp;
-
644  return true;
-
645 }
-
646 
-
647 void MpdBuilder::MakePathsRelativeToMpd(const std::string& mpd_path,
-
648  MediaInfo* media_info) {
-
649  DCHECK(media_info);
-
650  const std::string kFileProtocol("file://");
-
651  std::string mpd_file_path = (mpd_path.find(kFileProtocol) == 0)
-
652  ? mpd_path.substr(kFileProtocol.size())
-
653  : mpd_path;
-
654 
-
655  if (!mpd_file_path.empty()) {
-
656  std::string mpd_dir(
-
657  FilePath(mpd_file_path).DirName().AsEndingWithSeparator().value());
-
658  if (!mpd_dir.empty()) {
-
659  if (media_info->has_media_file_name()) {
-
660  media_info->set_media_file_name(
-
661  MakePathRelative(media_info->media_file_name(), mpd_dir));
-
662  }
-
663  if (media_info->has_init_segment_name()) {
-
664  media_info->set_init_segment_name(
-
665  MakePathRelative(media_info->init_segment_name(), mpd_dir));
-
666  }
-
667  if (media_info->has_segment_template()) {
-
668  media_info->set_segment_template(
-
669  MakePathRelative(media_info->segment_template(), mpd_dir));
-
670  }
-
671  }
-
672  }
-
673 }
-
674 
-
675 AdaptationSet::AdaptationSet(uint32_t adaptation_set_id,
-
676  const std::string& lang,
-
677  const MpdOptions& mpd_options,
-
678  MpdBuilder::MpdType mpd_type,
-
679  base::AtomicSequenceNumber* counter)
-
680  : representations_deleter_(&representations_),
-
681  representation_counter_(counter),
-
682  id_(adaptation_set_id),
-
683  lang_(lang),
-
684  mpd_options_(mpd_options),
-
685  mpd_type_(mpd_type),
-
686  group_(kAdaptationSetGroupNotSet),
-
687  segments_aligned_(kSegmentAlignmentUnknown),
-
688  force_set_segment_alignment_(false) {
-
689  DCHECK(counter);
-
690 }
-
691 
-
692 AdaptationSet::~AdaptationSet() {}
-
693 
-
694 Representation* AdaptationSet::AddRepresentation(const MediaInfo& media_info) {
-
695  const uint32_t representation_id = representation_counter_->GetNext();
-
696  // Note that AdaptationSet outlive Representation, so this object
-
697  // will die before AdaptationSet.
-
698  scoped_ptr<RepresentationStateChangeListener> listener(
-
699  new RepresentationStateChangeListenerImpl(representation_id, this));
-
700  scoped_ptr<Representation> representation(new Representation(
-
701  media_info, mpd_options_, representation_id, listener.Pass()));
-
702 
-
703  if (!representation->Init())
-
704  return NULL;
-
705 
-
706  // For videos, record the width, height, and the frame rate to calculate the
-
707  // max {width,height,framerate} required for DASH IOP.
-
708  if (media_info.has_video_info()) {
-
709  const MediaInfo::VideoInfo& video_info = media_info.video_info();
-
710  DCHECK(video_info.has_width());
-
711  DCHECK(video_info.has_height());
-
712  video_widths_.insert(video_info.width());
-
713  video_heights_.insert(video_info.height());
-
714 
-
715  if (video_info.has_time_scale() && video_info.has_frame_duration())
-
716  RecordFrameRate(video_info.frame_duration(), video_info.time_scale());
-
717 
-
718  AddPictureAspectRatio(video_info, &picture_aspect_ratio_);
-
719  }
-
720 
-
721  if (media_info.has_video_info()) {
-
722  content_type_ = "video";
-
723  } else if (media_info.has_audio_info()) {
-
724  content_type_ = "audio";
-
725  } else if (media_info.has_text_info()) {
-
726  content_type_ = "text";
-
727 
-
728  if (media_info.text_info().has_type() &&
-
729  (media_info.text_info().type() != MediaInfo::TextInfo::UNKNOWN)) {
-
730  roles_.insert(MediaInfoTextTypeToRole(media_info.text_info().type()));
-
731  }
-
732  }
-
733 
-
734  representations_.push_back(representation.get());
-
735  return representation.release();
-
736 }
-
737 
- -
739  const ContentProtectionElement& content_protection_element) {
-
740  content_protection_elements_.push_back(content_protection_element);
-
741  RemoveDuplicateAttributes(&content_protection_elements_.back());
-
742 }
-
743 
-
744 void AdaptationSet::UpdateContentProtectionPssh(const std::string& drm_uuid,
-
745  const std::string& pssh) {
-
746  UpdateContentProtectionPsshHelper(drm_uuid, pssh,
-
747  &content_protection_elements_);
-
748 }
-
749 
-
750 void AdaptationSet::AddRole(Role role) {
-
751  roles_.insert(role);
-
752 }
-
753 
-
754 // Creates a copy of <AdaptationSet> xml element, iterate thru all the
-
755 // <Representation> (child) elements and add them to the copy.
-
756 // Set all the attributes first and then add the children elements so that flags
-
757 // can be passed to Representation to avoid setting redundant attributes. For
-
758 // example, if AdaptationSet@width is set, then Representation@width is
-
759 // redundant and should not be set.
-
760 xml::scoped_xml_ptr<xmlNode> AdaptationSet::GetXml() {
-
761  AdaptationSetXmlNode adaptation_set;
-
762 
-
763  bool suppress_representation_width = false;
-
764  bool suppress_representation_height = false;
-
765  bool suppress_representation_frame_rate = false;
-
766 
-
767  adaptation_set.SetId(id_);
-
768  adaptation_set.SetStringAttribute("contentType", content_type_);
-
769  if (!lang_.empty() && lang_ != "und") {
-
770  adaptation_set.SetStringAttribute("lang", LanguageToShortestForm(lang_));
-
771  }
-
772 
-
773  // Note that std::{set,map} are ordered, so the last element is the max value.
-
774  if (video_widths_.size() == 1) {
-
775  suppress_representation_width = true;
-
776  adaptation_set.SetIntegerAttribute("width", *video_widths_.begin());
-
777  } else if (video_widths_.size() > 1) {
-
778  adaptation_set.SetIntegerAttribute("maxWidth", *video_widths_.rbegin());
-
779  }
-
780  if (video_heights_.size() == 1) {
-
781  suppress_representation_height = true;
-
782  adaptation_set.SetIntegerAttribute("height", *video_heights_.begin());
-
783  } else if (video_heights_.size() > 1) {
-
784  adaptation_set.SetIntegerAttribute("maxHeight", *video_heights_.rbegin());
-
785  }
-
786 
-
787  if (video_frame_rates_.size() == 1) {
-
788  suppress_representation_frame_rate = true;
-
789  adaptation_set.SetStringAttribute("frameRate",
-
790  video_frame_rates_.begin()->second);
-
791  } else if (video_frame_rates_.size() > 1) {
-
792  adaptation_set.SetStringAttribute("maxFrameRate",
-
793  video_frame_rates_.rbegin()->second);
-
794  }
-
795 
-
796  // Note: must be checked before checking segments_aligned_ (below). So that
-
797  // segments_aligned_ is set before checking below.
-
798  if (mpd_type_ == MpdBuilder::kStatic) {
-
799  CheckVodSegmentAlignment();
-
800  }
-
801 
-
802  if (segments_aligned_ == kSegmentAlignmentTrue) {
-
803  adaptation_set.SetStringAttribute(mpd_type_ == MpdBuilder::kStatic
-
804  ? "subsegmentAlignment"
-
805  : "segmentAlignment",
-
806  "true");
-
807  }
-
808 
-
809  if (picture_aspect_ratio_.size() == 1)
-
810  adaptation_set.SetStringAttribute("par", *picture_aspect_ratio_.begin());
-
811 
-
812  if (group_ >= 0)
-
813  adaptation_set.SetIntegerAttribute("group", group_);
-
814 
-
815  if (!adaptation_set.AddContentProtectionElements(
-
816  content_protection_elements_)) {
-
817  return xml::scoped_xml_ptr<xmlNode>();
-
818  }
-
819  for (AdaptationSet::Role role : roles_)
-
820  adaptation_set.AddRoleElement("urn:mpeg:dash:role:2011", RoleToText(role));
-
821 
-
822  for (Representation* representation : representations_) {
-
823  if (suppress_representation_width)
-
824  representation->SuppressOnce(Representation::kSuppressWidth);
-
825  if (suppress_representation_height)
-
826  representation->SuppressOnce(Representation::kSuppressHeight);
-
827  if (suppress_representation_frame_rate)
-
828  representation->SuppressOnce(Representation::kSuppressFrameRate);
-
829  xml::scoped_xml_ptr<xmlNode> child(representation->GetXml());
-
830  if (!child || !adaptation_set.AddChild(child.Pass()))
-
831  return xml::scoped_xml_ptr<xmlNode>();
-
832  }
-
833 
-
834  return adaptation_set.PassScopedPtr();
-
835 }
-
836 
-
837 void AdaptationSet::ForceSetSegmentAlignment(bool segment_alignment) {
-
838  segments_aligned_ =
-
839  segment_alignment ? kSegmentAlignmentTrue : kSegmentAlignmentFalse;
-
840  force_set_segment_alignment_ = true;
-
841 }
-
842 
-
843 void AdaptationSet::SetGroup(int group_number) {
-
844  group_ = group_number;
-
845 }
-
846 
-
847 int AdaptationSet::Group() const {
-
848  return group_;
-
849 }
-
850 
-
851 // Check segmentAlignment for Live here. Storing all start_time and duration
-
852 // will out-of-memory because there's no way of knowing when it will end.
-
853 // VOD subsegmentAlignment check is *not* done here because it is possible
-
854 // that some Representations might not have been added yet (e.g. a thread is
-
855 // assigned per muxer so one might run faster than others).
-
856 // To be clear, for Live, all Representations should be added before a
-
857 // segment is added.
-
858 void AdaptationSet::OnNewSegmentForRepresentation(uint32_t representation_id,
-
859  uint64_t start_time,
-
860  uint64_t duration) {
-
861  if (mpd_type_ == MpdBuilder::kDynamic) {
-
862  CheckLiveSegmentAlignment(representation_id, start_time, duration);
-
863  } else {
-
864  representation_segment_start_times_[representation_id].push_back(
-
865  start_time);
-
866  }
-
867 }
-
868 
- -
870  uint32_t representation_id,
-
871  uint32_t frame_duration,
-
872  uint32_t timescale) {
-
873  RecordFrameRate(frame_duration, timescale);
-
874 }
-
875 
-
876 bool AdaptationSet::GetEarliestTimestamp(double* timestamp_seconds) {
-
877  DCHECK(timestamp_seconds);
-
878 
-
879  double earliest_timestamp(-1);
-
880  for (std::list<Representation*>::const_iterator iter =
-
881  representations_.begin();
-
882  iter != representations_.end(); ++iter) {
-
883  double timestamp;
-
884  if ((*iter)->GetEarliestTimestamp(&timestamp) &&
-
885  ((earliest_timestamp < 0) || (timestamp < earliest_timestamp))) {
-
886  earliest_timestamp = timestamp;
-
887  }
-
888  }
-
889  if (earliest_timestamp < 0)
-
890  return false;
-
891 
-
892  *timestamp_seconds = earliest_timestamp;
-
893  return true;
-
894 }
-
895 
-
896 // This implementation assumes that each representations' segments' are
-
897 // contiguous.
-
898 // Also assumes that all Representations are added before this is called.
-
899 // This checks whether the first elements of the lists in
-
900 // representation_segment_start_times_ are aligned.
-
901 // For example, suppose this method was just called with args rep_id=2
-
902 // start_time=1.
-
903 // 1 -> [1, 100, 200]
-
904 // 2 -> [1]
-
905 // The timestamps of the first elements match, so this flags
-
906 // segments_aligned_=true.
-
907 // Also since the first segment start times match, the first element of all the
-
908 // lists are removed, so the map of lists becomes:
-
909 // 1 -> [100, 200]
-
910 // 2 -> []
-
911 // Note that there could be false positives.
-
912 // e.g. just got rep_id=3 start_time=1 duration=300, and the duration of the
-
913 // whole AdaptationSet is 300.
-
914 // 1 -> [1, 100, 200]
-
915 // 2 -> [1, 90, 100]
-
916 // 3 -> [1]
-
917 // They are not aligned but this will be marked as aligned.
-
918 // But since this is unlikely to happen in the packager (and to save
-
919 // computation), this isn't handled at the moment.
-
920 void AdaptationSet::CheckLiveSegmentAlignment(uint32_t representation_id,
-
921  uint64_t start_time,
-
922  uint64_t /* duration */) {
-
923  if (segments_aligned_ == kSegmentAlignmentFalse ||
-
924  force_set_segment_alignment_) {
-
925  return;
-
926  }
-
927 
-
928  std::list<uint64_t>& representation_start_times =
-
929  representation_segment_start_times_[representation_id];
-
930  representation_start_times.push_back(start_time);
-
931  // There's no way to detemine whether the segments are aligned if some
-
932  // representations do not have any segments.
-
933  if (representation_segment_start_times_.size() != representations_.size())
-
934  return;
-
935 
-
936  DCHECK(!representation_start_times.empty());
-
937  const uint64_t expected_start_time = representation_start_times.front();
-
938  for (RepresentationTimeline::const_iterator it =
-
939  representation_segment_start_times_.begin();
-
940  it != representation_segment_start_times_.end(); ++it) {
-
941  // If there are no entries in a list, then there is no way for the
-
942  // segment alignment status to change.
-
943  // Note that it can be empty because entries get deleted below.
-
944  if (it->second.empty())
-
945  return;
-
946 
-
947  if (expected_start_time != it->second.front()) {
-
948  // Flag as false and clear the start times data, no need to keep it
-
949  // around.
-
950  segments_aligned_ = kSegmentAlignmentFalse;
-
951  representation_segment_start_times_.clear();
-
952  return;
-
953  }
-
954  }
-
955  segments_aligned_ = kSegmentAlignmentTrue;
-
956 
-
957  for (RepresentationTimeline::iterator it =
-
958  representation_segment_start_times_.begin();
-
959  it != representation_segment_start_times_.end(); ++it) {
-
960  it->second.pop_front();
-
961  }
-
962 }
-
963 
-
964 // Make sure all segements start times match for all Representations.
-
965 // This assumes that the segments are contiguous.
-
966 void AdaptationSet::CheckVodSegmentAlignment() {
-
967  if (segments_aligned_ == kSegmentAlignmentFalse ||
-
968  force_set_segment_alignment_) {
-
969  return;
-
970  }
-
971  if (representation_segment_start_times_.empty())
-
972  return;
-
973  if (representation_segment_start_times_.size() == 1) {
-
974  segments_aligned_ = kSegmentAlignmentTrue;
-
975  return;
-
976  }
-
977 
-
978  // This is not the most efficient implementation to compare the values
-
979  // because expected_time_line is compared against all other time lines, but
-
980  // probably the most readable.
-
981  const std::list<uint64_t>& expected_time_line =
-
982  representation_segment_start_times_.begin()->second;
-
983 
-
984  bool all_segment_time_line_same_length = true;
-
985  // Note that the first entry is skipped because it is expected_time_line.
-
986  RepresentationTimeline::const_iterator it =
-
987  representation_segment_start_times_.begin();
-
988  for (++it; it != representation_segment_start_times_.end(); ++it) {
-
989  const std::list<uint64_t>& other_time_line = it->second;
-
990  if (expected_time_line.size() != other_time_line.size()) {
-
991  all_segment_time_line_same_length = false;
-
992  }
-
993 
-
994  const std::list<uint64_t>* longer_list = &other_time_line;
-
995  const std::list<uint64_t>* shorter_list = &expected_time_line;
-
996  if (expected_time_line.size() > other_time_line.size()) {
-
997  shorter_list = &other_time_line;
-
998  longer_list = &expected_time_line;
-
999  }
-
1000 
-
1001  if (!std::equal(shorter_list->begin(), shorter_list->end(),
-
1002  longer_list->begin())) {
-
1003  // Some segments are definitely unaligned.
-
1004  segments_aligned_ = kSegmentAlignmentFalse;
-
1005  representation_segment_start_times_.clear();
-
1006  return;
-
1007  }
-
1008  }
-
1009 
-
1010  // TODO(rkuroiwa): The right way to do this is to also check the durations.
-
1011  // For example:
-
1012  // (a) 3 4 5
-
1013  // (b) 3 4 5 6
-
1014  // could be true or false depending on the length of the third segment of (a).
-
1015  // i.e. if length of the third segment is 2, then this is not aligned.
-
1016  if (!all_segment_time_line_same_length) {
-
1017  segments_aligned_ = kSegmentAlignmentUnknown;
-
1018  return;
-
1019  }
-
1020 
-
1021  segments_aligned_ = kSegmentAlignmentTrue;
-
1022 }
-
1023 
-
1024 // Since all AdaptationSet cares about is the maxFrameRate, representation_id
-
1025 // is not passed to this method.
-
1026 void AdaptationSet::RecordFrameRate(uint32_t frame_duration,
-
1027  uint32_t timescale) {
-
1028  if (frame_duration == 0) {
-
1029  LOG(ERROR) << "Frame duration is 0 and cannot be set.";
-
1030  return;
-
1031  }
-
1032  video_frame_rates_[static_cast<double>(timescale) / frame_duration] =
-
1033  base::IntToString(timescale) + "/" + base::IntToString(frame_duration);
-
1034 }
-
1035 
- -
1037  const MediaInfo& media_info,
-
1038  const MpdOptions& mpd_options,
-
1039  uint32_t id,
-
1040  scoped_ptr<RepresentationStateChangeListener> state_change_listener)
-
1041  : media_info_(media_info),
-
1042  id_(id),
-
1043  bandwidth_estimator_(BandwidthEstimator::kUseAllBlocks),
-
1044  mpd_options_(mpd_options),
-
1045  start_number_(1),
-
1046  state_change_listener_(state_change_listener.Pass()),
-
1047  output_suppression_flags_(0) {}
-
1048 
-
1049 Representation::~Representation() {}
-
1050 
- -
1052  if (!AtLeastOneTrue(media_info_.has_video_info(),
-
1053  media_info_.has_audio_info(),
-
1054  media_info_.has_text_info())) {
-
1055  // This is an error. Segment information can be in AdaptationSet, Period, or
-
1056  // MPD but the interface does not provide a way to set them.
-
1057  // See 5.3.9.1 ISO 23009-1:2012 for segment info.
-
1058  LOG(ERROR) << "Representation needs one of video, audio, or text.";
-
1059  return false;
-
1060  }
-
1061 
-
1062  if (MoreThanOneTrue(media_info_.has_video_info(),
-
1063  media_info_.has_audio_info(),
-
1064  media_info_.has_text_info())) {
-
1065  LOG(ERROR) << "Only one of VideoInfo, AudioInfo, or TextInfo can be set.";
-
1066  return false;
-
1067  }
-
1068 
-
1069  if (media_info_.container_type() == MediaInfo::CONTAINER_UNKNOWN) {
-
1070  LOG(ERROR) << "'container_type' in MediaInfo cannot be CONTAINER_UNKNOWN.";
-
1071  return false;
-
1072  }
-
1073 
-
1074  if (media_info_.has_video_info()) {
-
1075  mime_type_ = GetVideoMimeType();
-
1076  if (!HasRequiredVideoFields(media_info_.video_info())) {
-
1077  LOG(ERROR) << "Missing required fields to create a video Representation.";
-
1078  return false;
-
1079  }
-
1080  } else if (media_info_.has_audio_info()) {
-
1081  mime_type_ = GetAudioMimeType();
-
1082  } else if (media_info_.has_text_info()) {
-
1083  mime_type_ = GetTextMimeType();
-
1084  }
-
1085 
-
1086  if (mime_type_.empty())
-
1087  return false;
-
1088 
-
1089  codecs_ = GetCodecs(media_info_);
-
1090  return true;
-
1091 }
-
1092 
- -
1094  const ContentProtectionElement& content_protection_element) {
-
1095  content_protection_elements_.push_back(content_protection_element);
-
1096  RemoveDuplicateAttributes(&content_protection_elements_.back());
-
1097 }
-
1098 
-
1099 void Representation::UpdateContentProtectionPssh(const std::string& drm_uuid,
-
1100  const std::string& pssh) {
-
1101  UpdateContentProtectionPsshHelper(drm_uuid, pssh,
-
1102  &content_protection_elements_);
-
1103 }
-
1104 
-
1105 void Representation::AddNewSegment(uint64_t start_time,
-
1106  uint64_t duration,
-
1107  uint64_t size) {
-
1108  if (start_time == 0 && duration == 0) {
-
1109  LOG(WARNING) << "Got segment with start_time and duration == 0. Ignoring.";
-
1110  return;
-
1111  }
-
1112 
-
1113  if (state_change_listener_)
-
1114  state_change_listener_->OnNewSegmentForRepresentation(start_time, duration);
-
1115  if (IsContiguous(start_time, duration, size)) {
-
1116  ++segment_infos_.back().repeat;
-
1117  } else {
-
1118  SegmentInfo s = {start_time, duration, /* Not repeat. */ 0};
-
1119  segment_infos_.push_back(s);
-
1120  }
-
1121 
-
1122  bandwidth_estimator_.AddBlock(
-
1123  size, static_cast<double>(duration) / media_info_.reference_time_scale());
-
1124 
-
1125  SlideWindow();
-
1126  DCHECK_GE(segment_infos_.size(), 1u);
-
1127 }
-
1128 
-
1129 void Representation::SetSampleDuration(uint32_t sample_duration) {
-
1130  if (media_info_.has_video_info()) {
-
1131  media_info_.mutable_video_info()->set_frame_duration(sample_duration);
-
1132  if (state_change_listener_) {
-
1133  state_change_listener_->OnSetFrameRateForRepresentation(
-
1134  sample_duration, media_info_.video_info().time_scale());
-
1135  }
-
1136  }
-
1137 }
-
1138 
-
1139 // Uses info in |media_info_| and |content_protection_elements_| to create a
-
1140 // "Representation" node.
-
1141 // MPD schema has strict ordering. The following must be done in order.
-
1142 // AddVideoInfo() (possibly adds FramePacking elements), AddAudioInfo() (Adds
-
1143 // AudioChannelConfig elements), AddContentProtectionElements*(), and
-
1144 // AddVODOnlyInfo() (Adds segment info).
-
1145 xml::scoped_xml_ptr<xmlNode> Representation::GetXml() {
-
1146  if (!HasRequiredMediaInfoFields()) {
-
1147  LOG(ERROR) << "MediaInfo missing required fields.";
-
1148  return xml::scoped_xml_ptr<xmlNode>();
-
1149  }
-
1150 
-
1151  const uint64_t bandwidth = media_info_.has_bandwidth()
-
1152  ? media_info_.bandwidth()
-
1153  : bandwidth_estimator_.Estimate();
-
1154 
-
1155  DCHECK(!(HasVODOnlyFields(media_info_) && HasLiveOnlyFields(media_info_)));
-
1156 
-
1157  RepresentationXmlNode representation;
-
1158  // Mandatory fields for Representation.
-
1159  representation.SetId(id_);
-
1160  representation.SetIntegerAttribute("bandwidth", bandwidth);
-
1161  if (!codecs_.empty())
-
1162  representation.SetStringAttribute("codecs", codecs_);
-
1163  representation.SetStringAttribute("mimeType", mime_type_);
-
1164 
-
1165  const bool has_video_info = media_info_.has_video_info();
-
1166  const bool has_audio_info = media_info_.has_audio_info();
-
1167 
-
1168  if (has_video_info &&
-
1169  !representation.AddVideoInfo(
-
1170  media_info_.video_info(),
-
1171  !(output_suppression_flags_ & kSuppressWidth),
-
1172  !(output_suppression_flags_ & kSuppressHeight),
-
1173  !(output_suppression_flags_ & kSuppressFrameRate))) {
-
1174  LOG(ERROR) << "Failed to add video info to Representation XML.";
-
1175  return xml::scoped_xml_ptr<xmlNode>();
-
1176  }
-
1177 
-
1178  if (has_audio_info &&
-
1179  !representation.AddAudioInfo(media_info_.audio_info())) {
-
1180  LOG(ERROR) << "Failed to add audio info to Representation XML.";
-
1181  return xml::scoped_xml_ptr<xmlNode>();
-
1182  }
-
1183 
-
1184  if (!representation.AddContentProtectionElements(
-
1185  content_protection_elements_)) {
-
1186  return xml::scoped_xml_ptr<xmlNode>();
-
1187  }
-
1188 
-
1189  if (HasVODOnlyFields(media_info_) &&
-
1190  !representation.AddVODOnlyInfo(media_info_)) {
-
1191  LOG(ERROR) << "Failed to add VOD segment info.";
-
1192  return xml::scoped_xml_ptr<xmlNode>();
-
1193  }
-
1194 
-
1195  if (HasLiveOnlyFields(media_info_) &&
-
1196  !representation.AddLiveOnlyInfo(media_info_, segment_infos_,
-
1197  start_number_)) {
-
1198  LOG(ERROR) << "Failed to add Live info.";
-
1199  return xml::scoped_xml_ptr<xmlNode>();
-
1200  }
-
1201  // TODO(rkuroiwa): It is likely that all representations have the exact same
-
1202  // SegmentTemplate. Optimize and propagate the tag up to AdaptationSet level.
-
1203 
-
1204  output_suppression_flags_ = 0;
-
1205  return representation.PassScopedPtr();
-
1206 }
-
1207 
-
1208 void Representation::SuppressOnce(SuppressFlag flag) {
-
1209  output_suppression_flags_ |= flag;
-
1210 }
-
1211 
-
1212 bool Representation::HasRequiredMediaInfoFields() {
-
1213  if (HasVODOnlyFields(media_info_) && HasLiveOnlyFields(media_info_)) {
-
1214  LOG(ERROR) << "MediaInfo cannot have both VOD and Live fields.";
-
1215  return false;
-
1216  }
-
1217 
-
1218  if (!media_info_.has_container_type()) {
-
1219  LOG(ERROR) << "MediaInfo missing required field: container_type.";
-
1220  return false;
-
1221  }
-
1222 
-
1223  if (HasVODOnlyFields(media_info_) && !media_info_.has_bandwidth()) {
-
1224  LOG(ERROR) << "Missing 'bandwidth' field. MediaInfo requires bandwidth for "
-
1225  "static profile for generating a valid MPD.";
-
1226  return false;
-
1227  }
-
1228 
-
1229  VLOG_IF(3, HasLiveOnlyFields(media_info_) && !media_info_.has_bandwidth())
-
1230  << "MediaInfo missing field 'bandwidth'. Using estimated from "
-
1231  "segment size.";
-
1232 
-
1233  return true;
-
1234 }
-
1235 
-
1236 bool Representation::IsContiguous(uint64_t start_time,
-
1237  uint64_t duration,
-
1238  uint64_t size) const {
-
1239  if (segment_infos_.empty())
-
1240  return false;
-
1241 
-
1242  // Contiguous segment.
-
1243  const SegmentInfo& previous = segment_infos_.back();
-
1244  const uint64_t previous_segment_end_time =
-
1245  previous.start_time + previous.duration * (previous.repeat + 1);
-
1246  if (previous_segment_end_time == start_time &&
-
1247  segment_infos_.back().duration == duration) {
-
1248  return true;
-
1249  }
-
1250 
-
1251  // No out of order segments.
-
1252  const uint64_t previous_segment_start_time =
-
1253  previous.start_time + previous.duration * previous.repeat;
-
1254  if (previous_segment_start_time >= start_time) {
-
1255  LOG(ERROR) << "Segments should not be out of order segment. Adding segment "
-
1256  "with start_time == "
-
1257  << start_time << " but the previous segment starts at "
-
1258  << previous.start_time << ".";
-
1259  return false;
-
1260  }
-
1261 
-
1262  // A gap since previous.
-
1263  const uint64_t kRoundingErrorGrace = 5;
-
1264  if (previous_segment_end_time + kRoundingErrorGrace < start_time) {
-
1265  LOG(WARNING) << "Found a gap of size "
-
1266  << (start_time - previous_segment_end_time)
-
1267  << " > kRoundingErrorGrace (" << kRoundingErrorGrace
-
1268  << "). The new segment starts at " << start_time
-
1269  << " but the previous segment ends at "
-
1270  << previous_segment_end_time << ".";
-
1271  return false;
-
1272  }
-
1273 
-
1274  // No overlapping segments.
-
1275  if (start_time < previous_segment_end_time - kRoundingErrorGrace) {
-
1276  LOG(WARNING)
-
1277  << "Segments should not be overlapping. The new segment starts at "
-
1278  << start_time << " but the previous segment ends at "
-
1279  << previous_segment_end_time << ".";
-
1280  return false;
-
1281  }
-
1282 
-
1283  // Within rounding error grace but technically not contiguous in terms of MPD.
-
1284  return false;
-
1285 }
-
1286 
-
1287 void Representation::SlideWindow() {
-
1288  DCHECK(!segment_infos_.empty());
-
1289  if (mpd_options_.time_shift_buffer_depth <= 0.0)
-
1290  return;
-
1291 
-
1292  const uint32_t time_scale = GetTimeScale(media_info_);
-
1293  DCHECK_GT(time_scale, 0u);
-
1294 
-
1295  uint64_t time_shift_buffer_depth =
-
1296  static_cast<uint64_t>(mpd_options_.time_shift_buffer_depth * time_scale);
-
1297 
-
1298  // The start time of the latest segment is considered the current_play_time,
-
1299  // and this should guarantee that the latest segment will stay in the list.
-
1300  const uint64_t current_play_time = LatestSegmentStartTime(segment_infos_);
-
1301  if (current_play_time <= time_shift_buffer_depth)
-
1302  return;
-
1303 
-
1304  const uint64_t timeshift_limit = current_play_time - time_shift_buffer_depth;
-
1305 
-
1306  // First remove all the SegmentInfos that are completely out of range, by
-
1307  // looking at the very last segment's end time.
-
1308  std::list<SegmentInfo>::iterator first = segment_infos_.begin();
-
1309  std::list<SegmentInfo>::iterator last = first;
-
1310  size_t num_segments_removed = 0;
-
1311  for (; last != segment_infos_.end(); ++last) {
-
1312  const uint64_t last_segment_end_time = LastSegmentEndTime(*last);
-
1313  if (timeshift_limit < last_segment_end_time)
-
1314  break;
-
1315  num_segments_removed += last->repeat + 1;
-
1316  }
-
1317  segment_infos_.erase(first, last);
-
1318  start_number_ += num_segments_removed;
-
1319 
-
1320  // Now some segment in the first SegmentInfo should be left in the list.
-
1321  SegmentInfo* first_segment_info = &segment_infos_.front();
-
1322  DCHECK_LE(timeshift_limit, LastSegmentEndTime(*first_segment_info));
-
1323 
-
1324  // Identify which segments should still be in the SegmentInfo.
-
1325  const int repeat_index =
-
1326  SearchTimedOutRepeatIndex(timeshift_limit, *first_segment_info);
-
1327  CHECK_GE(repeat_index, 0);
-
1328  if (repeat_index == 0)
-
1329  return;
-
1330 
-
1331  first_segment_info->start_time = first_segment_info->start_time +
-
1332  first_segment_info->duration * repeat_index;
-
1333 
-
1334  first_segment_info->repeat = first_segment_info->repeat - repeat_index;
-
1335  start_number_ += repeat_index;
-
1336 }
-
1337 
-
1338 std::string Representation::GetVideoMimeType() const {
-
1339  return GetMimeType("video", media_info_.container_type());
-
1340 }
-
1341 
-
1342 std::string Representation::GetAudioMimeType() const {
-
1343  return GetMimeType("audio", media_info_.container_type());
-
1344 }
-
1345 
-
1346 std::string Representation::GetTextMimeType() const {
-
1347  CHECK(media_info_.has_text_info());
-
1348  if (media_info_.text_info().format() == "ttml") {
-
1349  switch (media_info_.container_type()) {
-
1350  case MediaInfo::CONTAINER_TEXT:
-
1351  return "application/ttml+xml";
-
1352  case MediaInfo::CONTAINER_MP4:
-
1353  return "application/mp4";
-
1354  default:
-
1355  LOG(ERROR) << "Failed to determine MIME type for TTML container: "
-
1356  << media_info_.container_type();
-
1357  return "";
-
1358  }
-
1359  }
-
1360  if (media_info_.text_info().format() == "vtt") {
-
1361  if (media_info_.container_type() == MediaInfo::CONTAINER_TEXT) {
-
1362  return "text/vtt";
-
1363  }
-
1364  LOG(ERROR) << "Failed to determine MIME type for VTT container: "
-
1365  << media_info_.container_type();
-
1366  return "";
-
1367  }
-
1368 
-
1369  LOG(ERROR) << "Cannot determine MIME type for format: "
-
1370  << media_info_.text_info().format()
-
1371  << " container: " << media_info_.container_type();
-
1372  return "";
-
1373 }
-
1374 
-
1375 bool Representation::GetEarliestTimestamp(double* timestamp_seconds) {
-
1376  DCHECK(timestamp_seconds);
-
1377 
-
1378  if (segment_infos_.empty())
-
1379  return false;
-
1380 
-
1381  *timestamp_seconds = static_cast<double>(segment_infos_.begin()->start_time) /
-
1382  GetTimeScale(media_info_);
-
1383  return true;
-
1384 }
-
1385 
-
1386 } // namespace shaka
-
void OnSetFrameRateForRepresentation(uint32_t representation_id, uint32_t frame_duration, uint32_t timescale)
Definition: mpd_builder.cc:869
-
virtual void AddNewSegment(uint64_t start_time, uint64_t duration, uint64_t size)
- -
bool WriteMpdToFile(media::File *output_file)
Definition: mpd_builder.cc:424
-
AdaptationSet(uint32_t adaptation_set_id, const std::string &lang, const MpdOptions &mpd_options, MpdBuilder::MpdType mpd_type, base::AtomicSequenceNumber *representation_counter)
Definition: mpd_builder.cc:675
+
335  break;
+
336  }
+
337 
+
338  NOTREACHED();
+
339  return "";
+
340 }
+
341 
+
342 // Spooky static initialization/cleanup of libxml.
+
343 class LibXmlInitializer {
+
344  public:
+
345  LibXmlInitializer() : initialized_(false) {
+
346  base::AutoLock lock(lock_);
+
347  if (!initialized_) {
+
348  xmlInitParser();
+
349  initialized_ = true;
+
350  }
+
351  }
+
352 
+
353  ~LibXmlInitializer() {
+
354  base::AutoLock lock(lock_);
+
355  if (initialized_) {
+
356  xmlCleanupParser();
+
357  initialized_ = false;
+
358  }
+
359  }
+
360 
+
361  private:
+
362  base::Lock lock_;
+
363  bool initialized_;
+
364 
+
365  DISALLOW_COPY_AND_ASSIGN(LibXmlInitializer);
+
366 };
+
367 
+
368 class RepresentationStateChangeListenerImpl
+
369  : public RepresentationStateChangeListener {
+
370  public:
+
371  // |adaptation_set| is not owned by this class.
+
372  RepresentationStateChangeListenerImpl(uint32_t representation_id,
+
373  AdaptationSet* adaptation_set)
+
374  : representation_id_(representation_id), adaptation_set_(adaptation_set) {
+
375  DCHECK(adaptation_set_);
+
376  }
+
377  ~RepresentationStateChangeListenerImpl() override {}
+
378 
+
379  // RepresentationStateChangeListener implementation.
+
380  void OnNewSegmentForRepresentation(uint64_t start_time,
+
381  uint64_t duration) override {
+
382  adaptation_set_->OnNewSegmentForRepresentation(representation_id_,
+
383  start_time, duration);
+
384  }
+
385 
+
386  void OnSetFrameRateForRepresentation(uint32_t frame_duration,
+
387  uint32_t timescale) override {
+
388  adaptation_set_->OnSetFrameRateForRepresentation(representation_id_,
+
389  frame_duration, timescale);
+
390  }
+
391 
+
392  private:
+
393  const uint32_t representation_id_;
+
394  AdaptationSet* const adaptation_set_;
+
395 
+
396  DISALLOW_COPY_AND_ASSIGN(RepresentationStateChangeListenerImpl);
+
397 };
+
398 
+
399 } // namespace
+
400 
+
401 MpdBuilder::MpdBuilder(MpdType type, const MpdOptions& mpd_options)
+
402  : type_(type),
+
403  mpd_options_(mpd_options),
+
404  adaptation_sets_deleter_(&adaptation_sets_),
+
405  clock_(new base::DefaultClock()) {}
+
406 
+
407 MpdBuilder::~MpdBuilder() {}
+
408 
+
409 void MpdBuilder::AddBaseUrl(const std::string& base_url) {
+
410  base_urls_.push_back(base_url);
+
411 }
+
412 
+
413 AdaptationSet* MpdBuilder::AddAdaptationSet(const std::string& lang) {
+
414  scoped_ptr<AdaptationSet> adaptation_set(
+
415  new AdaptationSet(adaptation_set_counter_.GetNext(), lang, mpd_options_,
+
416  type_, &representation_counter_));
+
417 
+
418  DCHECK(adaptation_set);
+
419  adaptation_sets_.push_back(adaptation_set.get());
+
420  return adaptation_set.release();
+
421 }
+
422 
+ +
424  DCHECK(output_file);
+
425  return WriteMpdToOutput(output_file);
+
426 }
+
427 
+
428 bool MpdBuilder::ToString(std::string* output) {
+
429  DCHECK(output);
+
430  return WriteMpdToOutput(output);
+
431 }
+
432 template <typename OutputType>
+
433 bool MpdBuilder::WriteMpdToOutput(OutputType* output) {
+
434  static LibXmlInitializer lib_xml_initializer;
+
435 
+
436  xml::scoped_xml_ptr<xmlDoc> doc(GenerateMpd());
+
437  if (!doc.get())
+
438  return false;
+
439 
+
440  static const int kNiceFormat = 1;
+
441  int doc_str_size = 0;
+
442  xmlChar* doc_str = NULL;
+
443  xmlDocDumpFormatMemoryEnc(doc.get(), &doc_str, &doc_str_size, "UTF-8",
+
444  kNiceFormat);
+
445 
+
446  bool result = WriteXmlCharArrayToOutput(doc_str, doc_str_size, output);
+
447  xmlFree(doc_str);
+
448 
+
449  // Cleanup, free the doc.
+
450  doc.reset();
+
451  return result;
+
452 }
+
453 
+
454 xmlDocPtr MpdBuilder::GenerateMpd() {
+
455  // Setup nodes.
+
456  static const char kXmlVersion[] = "1.0";
+
457  xml::scoped_xml_ptr<xmlDoc> doc(xmlNewDoc(BAD_CAST kXmlVersion));
+
458  XmlNode mpd("MPD");
+
459 
+
460  // Iterate thru AdaptationSets and add them to one big Period element.
+
461  XmlNode period("Period");
+
462 
+
463  // Always set id=0 for now. Since this class can only generate one Period
+
464  // at the moment, just use a constant.
+
465  // Required for 'dynamic' MPDs.
+
466  period.SetId(0);
+
467  std::list<AdaptationSet*>::iterator adaptation_sets_it =
+
468  adaptation_sets_.begin();
+
469  for (; adaptation_sets_it != adaptation_sets_.end(); ++adaptation_sets_it) {
+
470  xml::scoped_xml_ptr<xmlNode> child((*adaptation_sets_it)->GetXml());
+
471  if (!child.get() || !period.AddChild(child.Pass()))
+
472  return NULL;
+
473  }
+
474 
+
475  // Add baseurls to MPD.
+
476  std::list<std::string>::const_iterator base_urls_it = base_urls_.begin();
+
477  for (; base_urls_it != base_urls_.end(); ++base_urls_it) {
+
478  XmlNode base_url("BaseURL");
+
479  base_url.SetContent(*base_urls_it);
+
480 
+
481  if (!mpd.AddChild(base_url.PassScopedPtr()))
+
482  return NULL;
+
483  }
+
484 
+
485  if (type_ == kDynamic) {
+
486  // This is the only Period and it is a regular period.
+
487  period.SetStringAttribute("start", "PT0S");
+
488  }
+
489 
+
490  if (!mpd.AddChild(period.PassScopedPtr()))
+
491  return NULL;
+
492 
+
493  AddMpdNameSpaceInfo(&mpd);
+
494  AddCommonMpdInfo(&mpd);
+
495  switch (type_) {
+
496  case kStatic:
+
497  AddStaticMpdInfo(&mpd);
+
498  break;
+
499  case kDynamic:
+
500  AddDynamicMpdInfo(&mpd);
+
501  break;
+
502  default:
+
503  NOTREACHED() << "Unknown MPD type: " << type_;
+
504  break;
+
505  }
+
506 
+
507  DCHECK(doc);
+
508  const std::string version = GetPackagerVersion();
+
509  if (!version.empty()) {
+
510  std::string version_string =
+
511  base::StringPrintf("Generated with %s version %s",
+
512  GetPackagerProjectUrl().c_str(), version.c_str());
+
513  xml::scoped_xml_ptr<xmlNode> comment(
+
514  xmlNewDocComment(doc.get(), BAD_CAST version_string.c_str()));
+
515  xmlDocSetRootElement(doc.get(), comment.get());
+
516  xmlAddSibling(comment.release(), mpd.Release());
+
517  } else {
+
518  xmlDocSetRootElement(doc.get(), mpd.Release());
+
519  }
+
520  return doc.release();
+
521 }
+
522 
+
523 void MpdBuilder::AddCommonMpdInfo(XmlNode* mpd_node) {
+
524  if (Positive(mpd_options_.min_buffer_time)) {
+
525  mpd_node->SetStringAttribute(
+
526  "minBufferTime", SecondsToXmlDuration(mpd_options_.min_buffer_time));
+
527  } else {
+
528  LOG(ERROR) << "minBufferTime value not specified.";
+
529  // TODO(tinskip): Propagate error.
+
530  }
+
531 }
+
532 
+
533 void MpdBuilder::AddStaticMpdInfo(XmlNode* mpd_node) {
+
534  DCHECK(mpd_node);
+
535  DCHECK_EQ(MpdBuilder::kStatic, type_);
+
536 
+
537  static const char kStaticMpdType[] = "static";
+
538  static const char kStaticMpdProfile[] =
+
539  "urn:mpeg:dash:profile:isoff-on-demand:2011";
+
540  mpd_node->SetStringAttribute("type", kStaticMpdType);
+
541  mpd_node->SetStringAttribute("profiles", kStaticMpdProfile);
+
542  mpd_node->SetStringAttribute(
+
543  "mediaPresentationDuration",
+
544  SecondsToXmlDuration(GetStaticMpdDuration(mpd_node)));
+
545 }
+
546 
+
547 void MpdBuilder::AddDynamicMpdInfo(XmlNode* mpd_node) {
+
548  DCHECK(mpd_node);
+
549  DCHECK_EQ(MpdBuilder::kDynamic, type_);
+
550 
+
551  static const char kDynamicMpdType[] = "dynamic";
+
552  static const char kDynamicMpdProfile[] =
+
553  "urn:mpeg:dash:profile:isoff-live:2011";
+
554  mpd_node->SetStringAttribute("type", kDynamicMpdType);
+
555  mpd_node->SetStringAttribute("profiles", kDynamicMpdProfile);
+
556 
+
557  // No offset from NOW.
+
558  mpd_node->SetStringAttribute("publishTime",
+
559  XmlDateTimeNowWithOffset(0, clock_.get()));
+
560 
+
561  // 'availabilityStartTime' is required for dynamic profile. Calculate if
+
562  // not already calculated.
+
563  if (availability_start_time_.empty()) {
+
564  double earliest_presentation_time;
+
565  if (GetEarliestTimestamp(&earliest_presentation_time)) {
+
566  availability_start_time_ =
+
567  XmlDateTimeNowWithOffset(mpd_options_.availability_time_offset -
+
568  std::ceil(earliest_presentation_time),
+
569  clock_.get());
+
570  } else {
+
571  LOG(ERROR) << "Could not determine the earliest segment presentation "
+
572  "time for availabilityStartTime calculation.";
+
573  // TODO(tinskip). Propagate an error.
+
574  }
+
575  }
+
576  if (!availability_start_time_.empty())
+
577  mpd_node->SetStringAttribute("availabilityStartTime",
+
578  availability_start_time_);
+
579 
+
580  if (Positive(mpd_options_.minimum_update_period)) {
+
581  mpd_node->SetStringAttribute(
+
582  "minimumUpdatePeriod",
+
583  SecondsToXmlDuration(mpd_options_.minimum_update_period));
+
584  } else {
+
585  LOG(WARNING) << "The profile is dynamic but no minimumUpdatePeriod "
+
586  "specified.";
+
587  }
+
588 
+
589  SetIfPositive("timeShiftBufferDepth", mpd_options_.time_shift_buffer_depth,
+
590  mpd_node);
+
591  SetIfPositive("suggestedPresentationDelay",
+
592  mpd_options_.suggested_presentation_delay, mpd_node);
+
593 }
+
594 
+
595 float MpdBuilder::GetStaticMpdDuration(XmlNode* mpd_node) {
+
596  DCHECK(mpd_node);
+
597  DCHECK_EQ(MpdBuilder::kStatic, type_);
+
598 
+
599  xmlNodePtr period_node = FindPeriodNode(mpd_node);
+
600  DCHECK(period_node) << "Period element must be a child of mpd_node.";
+
601  DCHECK(IsPeriodNode(period_node));
+
602 
+
603  // Attribute mediaPresentationDuration must be present for 'static' MPD. So
+
604  // setting "PT0S" is required even if none of the representaions have duration
+
605  // attribute.
+
606  float max_duration = 0.0f;
+
607  for (xmlNodePtr adaptation_set = xmlFirstElementChild(period_node);
+
608  adaptation_set; adaptation_set = xmlNextElementSibling(adaptation_set)) {
+
609  for (xmlNodePtr representation = xmlFirstElementChild(adaptation_set);
+
610  representation;
+
611  representation = xmlNextElementSibling(representation)) {
+
612  float duration = 0.0f;
+
613  if (GetDurationAttribute(representation, &duration)) {
+
614  max_duration = max_duration > duration ? max_duration : duration;
+
615 
+
616  // 'duration' attribute is there only to help generate MPD, not
+
617  // necessary for MPD, remove the attribute.
+
618  xmlUnsetProp(representation, BAD_CAST "duration");
+
619  }
+
620  }
+
621  }
+
622 
+
623  return max_duration;
+
624 }
+
625 
+
626 bool MpdBuilder::GetEarliestTimestamp(double* timestamp_seconds) {
+
627  DCHECK(timestamp_seconds);
+
628 
+
629  double earliest_timestamp(-1);
+
630  for (std::list<AdaptationSet*>::const_iterator iter =
+
631  adaptation_sets_.begin();
+
632  iter != adaptation_sets_.end(); ++iter) {
+
633  double timestamp;
+
634  if ((*iter)->GetEarliestTimestamp(&timestamp) &&
+
635  ((earliest_timestamp < 0) || (timestamp < earliest_timestamp))) {
+
636  earliest_timestamp = timestamp;
+
637  }
+
638  }
+
639  if (earliest_timestamp < 0)
+
640  return false;
+
641 
+
642  *timestamp_seconds = earliest_timestamp;
+
643  return true;
+
644 }
+
645 
+
646 void MpdBuilder::MakePathsRelativeToMpd(const std::string& mpd_path,
+
647  MediaInfo* media_info) {
+
648  DCHECK(media_info);
+
649  const std::string kFileProtocol("file://");
+
650  std::string mpd_file_path = (mpd_path.find(kFileProtocol) == 0)
+
651  ? mpd_path.substr(kFileProtocol.size())
+
652  : mpd_path;
+
653 
+
654  if (!mpd_file_path.empty()) {
+
655  std::string mpd_dir(FilePath::FromUTF8Unsafe(mpd_file_path)
+
656  .DirName().AsEndingWithSeparator().AsUTF8Unsafe());
+
657  if (!mpd_dir.empty()) {
+
658  if (media_info->has_media_file_name()) {
+
659  media_info->set_media_file_name(
+
660  MakePathRelative(media_info->media_file_name(), mpd_dir));
+
661  }
+
662  if (media_info->has_init_segment_name()) {
+
663  media_info->set_init_segment_name(
+
664  MakePathRelative(media_info->init_segment_name(), mpd_dir));
+
665  }
+
666  if (media_info->has_segment_template()) {
+
667  media_info->set_segment_template(
+
668  MakePathRelative(media_info->segment_template(), mpd_dir));
+
669  }
+
670  }
+
671  }
+
672 }
+
673 
+
674 AdaptationSet::AdaptationSet(uint32_t adaptation_set_id,
+
675  const std::string& lang,
+
676  const MpdOptions& mpd_options,
+
677  MpdBuilder::MpdType mpd_type,
+
678  base::AtomicSequenceNumber* counter)
+
679  : representations_deleter_(&representations_),
+
680  representation_counter_(counter),
+
681  id_(adaptation_set_id),
+
682  lang_(lang),
+
683  mpd_options_(mpd_options),
+
684  mpd_type_(mpd_type),
+
685  group_(kAdaptationSetGroupNotSet),
+
686  segments_aligned_(kSegmentAlignmentUnknown),
+
687  force_set_segment_alignment_(false) {
+
688  DCHECK(counter);
+
689 }
+
690 
+
691 AdaptationSet::~AdaptationSet() {}
+
692 
+
693 Representation* AdaptationSet::AddRepresentation(const MediaInfo& media_info) {
+
694  const uint32_t representation_id = representation_counter_->GetNext();
+
695  // Note that AdaptationSet outlive Representation, so this object
+
696  // will die before AdaptationSet.
+
697  scoped_ptr<RepresentationStateChangeListener> listener(
+
698  new RepresentationStateChangeListenerImpl(representation_id, this));
+
699  scoped_ptr<Representation> representation(new Representation(
+
700  media_info, mpd_options_, representation_id, listener.Pass()));
+
701 
+
702  if (!representation->Init())
+
703  return NULL;
+
704 
+
705  // For videos, record the width, height, and the frame rate to calculate the
+
706  // max {width,height,framerate} required for DASH IOP.
+
707  if (media_info.has_video_info()) {
+
708  const MediaInfo::VideoInfo& video_info = media_info.video_info();
+
709  DCHECK(video_info.has_width());
+
710  DCHECK(video_info.has_height());
+
711  video_widths_.insert(video_info.width());
+
712  video_heights_.insert(video_info.height());
+
713 
+
714  if (video_info.has_time_scale() && video_info.has_frame_duration())
+
715  RecordFrameRate(video_info.frame_duration(), video_info.time_scale());
+
716 
+
717  AddPictureAspectRatio(video_info, &picture_aspect_ratio_);
+
718  }
+
719 
+
720  if (media_info.has_video_info()) {
+
721  content_type_ = "video";
+
722  } else if (media_info.has_audio_info()) {
+
723  content_type_ = "audio";
+
724  } else if (media_info.has_text_info()) {
+
725  content_type_ = "text";
+
726 
+
727  if (media_info.text_info().has_type() &&
+
728  (media_info.text_info().type() != MediaInfo::TextInfo::UNKNOWN)) {
+
729  roles_.insert(MediaInfoTextTypeToRole(media_info.text_info().type()));
+
730  }
+
731  }
+
732 
+
733  representations_.push_back(representation.get());
+
734  return representation.release();
+
735 }
+
736 
+ +
738  const ContentProtectionElement& content_protection_element) {
+
739  content_protection_elements_.push_back(content_protection_element);
+
740  RemoveDuplicateAttributes(&content_protection_elements_.back());
+
741 }
+
742 
+
743 void AdaptationSet::UpdateContentProtectionPssh(const std::string& drm_uuid,
+
744  const std::string& pssh) {
+
745  UpdateContentProtectionPsshHelper(drm_uuid, pssh,
+
746  &content_protection_elements_);
+
747 }
+
748 
+
749 void AdaptationSet::AddRole(Role role) {
+
750  roles_.insert(role);
+
751 }
+
752 
+
753 // Creates a copy of <AdaptationSet> xml element, iterate thru all the
+
754 // <Representation> (child) elements and add them to the copy.
+
755 // Set all the attributes first and then add the children elements so that flags
+
756 // can be passed to Representation to avoid setting redundant attributes. For
+
757 // example, if AdaptationSet@width is set, then Representation@width is
+
758 // redundant and should not be set.
+
759 xml::scoped_xml_ptr<xmlNode> AdaptationSet::GetXml() {
+
760  AdaptationSetXmlNode adaptation_set;
+
761 
+
762  bool suppress_representation_width = false;
+
763  bool suppress_representation_height = false;
+
764  bool suppress_representation_frame_rate = false;
+
765 
+
766  adaptation_set.SetId(id_);
+
767  adaptation_set.SetStringAttribute("contentType", content_type_);
+
768  if (!lang_.empty() && lang_ != "und") {
+
769  adaptation_set.SetStringAttribute("lang", LanguageToShortestForm(lang_));
+
770  }
+
771 
+
772  // Note that std::{set,map} are ordered, so the last element is the max value.
+
773  if (video_widths_.size() == 1) {
+
774  suppress_representation_width = true;
+
775  adaptation_set.SetIntegerAttribute("width", *video_widths_.begin());
+
776  } else if (video_widths_.size() > 1) {
+
777  adaptation_set.SetIntegerAttribute("maxWidth", *video_widths_.rbegin());
+
778  }
+
779  if (video_heights_.size() == 1) {
+
780  suppress_representation_height = true;
+
781  adaptation_set.SetIntegerAttribute("height", *video_heights_.begin());
+
782  } else if (video_heights_.size() > 1) {
+
783  adaptation_set.SetIntegerAttribute("maxHeight", *video_heights_.rbegin());
+
784  }
+
785 
+
786  if (video_frame_rates_.size() == 1) {
+
787  suppress_representation_frame_rate = true;
+
788  adaptation_set.SetStringAttribute("frameRate",
+
789  video_frame_rates_.begin()->second);
+
790  } else if (video_frame_rates_.size() > 1) {
+
791  adaptation_set.SetStringAttribute("maxFrameRate",
+
792  video_frame_rates_.rbegin()->second);
+
793  }
+
794 
+
795  // Note: must be checked before checking segments_aligned_ (below). So that
+
796  // segments_aligned_ is set before checking below.
+
797  if (mpd_type_ == MpdBuilder::kStatic) {
+
798  CheckVodSegmentAlignment();
+
799  }
+
800 
+
801  if (segments_aligned_ == kSegmentAlignmentTrue) {
+
802  adaptation_set.SetStringAttribute(mpd_type_ == MpdBuilder::kStatic
+
803  ? "subsegmentAlignment"
+
804  : "segmentAlignment",
+
805  "true");
+
806  }
+
807 
+
808  if (picture_aspect_ratio_.size() == 1)
+
809  adaptation_set.SetStringAttribute("par", *picture_aspect_ratio_.begin());
+
810 
+
811  if (group_ >= 0)
+
812  adaptation_set.SetIntegerAttribute("group", group_);
+
813 
+
814  if (!adaptation_set.AddContentProtectionElements(
+
815  content_protection_elements_)) {
+
816  return xml::scoped_xml_ptr<xmlNode>();
+
817  }
+
818  for (AdaptationSet::Role role : roles_)
+
819  adaptation_set.AddRoleElement("urn:mpeg:dash:role:2011", RoleToText(role));
+
820 
+
821  for (Representation* representation : representations_) {
+
822  if (suppress_representation_width)
+
823  representation->SuppressOnce(Representation::kSuppressWidth);
+
824  if (suppress_representation_height)
+
825  representation->SuppressOnce(Representation::kSuppressHeight);
+
826  if (suppress_representation_frame_rate)
+
827  representation->SuppressOnce(Representation::kSuppressFrameRate);
+
828  xml::scoped_xml_ptr<xmlNode> child(representation->GetXml());
+
829  if (!child || !adaptation_set.AddChild(child.Pass()))
+
830  return xml::scoped_xml_ptr<xmlNode>();
+
831  }
+
832 
+
833  return adaptation_set.PassScopedPtr();
+
834 }
+
835 
+
836 void AdaptationSet::ForceSetSegmentAlignment(bool segment_alignment) {
+
837  segments_aligned_ =
+
838  segment_alignment ? kSegmentAlignmentTrue : kSegmentAlignmentFalse;
+
839  force_set_segment_alignment_ = true;
+
840 }
+
841 
+
842 void AdaptationSet::SetGroup(int group_number) {
+
843  group_ = group_number;
+
844 }
+
845 
+
846 int AdaptationSet::Group() const {
+
847  return group_;
+
848 }
+
849 
+
850 // Check segmentAlignment for Live here. Storing all start_time and duration
+
851 // will out-of-memory because there's no way of knowing when it will end.
+
852 // VOD subsegmentAlignment check is *not* done here because it is possible
+
853 // that some Representations might not have been added yet (e.g. a thread is
+
854 // assigned per muxer so one might run faster than others).
+
855 // To be clear, for Live, all Representations should be added before a
+
856 // segment is added.
+
857 void AdaptationSet::OnNewSegmentForRepresentation(uint32_t representation_id,
+
858  uint64_t start_time,
+
859  uint64_t duration) {
+
860  if (mpd_type_ == MpdBuilder::kDynamic) {
+
861  CheckLiveSegmentAlignment(representation_id, start_time, duration);
+
862  } else {
+
863  representation_segment_start_times_[representation_id].push_back(
+
864  start_time);
+
865  }
+
866 }
+
867 
+ +
869  uint32_t representation_id,
+
870  uint32_t frame_duration,
+
871  uint32_t timescale) {
+
872  RecordFrameRate(frame_duration, timescale);
+
873 }
+
874 
+
875 bool AdaptationSet::GetEarliestTimestamp(double* timestamp_seconds) {
+
876  DCHECK(timestamp_seconds);
+
877 
+
878  double earliest_timestamp(-1);
+
879  for (std::list<Representation*>::const_iterator iter =
+
880  representations_.begin();
+
881  iter != representations_.end(); ++iter) {
+
882  double timestamp;
+
883  if ((*iter)->GetEarliestTimestamp(&timestamp) &&
+
884  ((earliest_timestamp < 0) || (timestamp < earliest_timestamp))) {
+
885  earliest_timestamp = timestamp;
+
886  }
+
887  }
+
888  if (earliest_timestamp < 0)
+
889  return false;
+
890 
+
891  *timestamp_seconds = earliest_timestamp;
+
892  return true;
+
893 }
+
894 
+
895 // This implementation assumes that each representations' segments' are
+
896 // contiguous.
+
897 // Also assumes that all Representations are added before this is called.
+
898 // This checks whether the first elements of the lists in
+
899 // representation_segment_start_times_ are aligned.
+
900 // For example, suppose this method was just called with args rep_id=2
+
901 // start_time=1.
+
902 // 1 -> [1, 100, 200]
+
903 // 2 -> [1]
+
904 // The timestamps of the first elements match, so this flags
+
905 // segments_aligned_=true.
+
906 // Also since the first segment start times match, the first element of all the
+
907 // lists are removed, so the map of lists becomes:
+
908 // 1 -> [100, 200]
+
909 // 2 -> []
+
910 // Note that there could be false positives.
+
911 // e.g. just got rep_id=3 start_time=1 duration=300, and the duration of the
+
912 // whole AdaptationSet is 300.
+
913 // 1 -> [1, 100, 200]
+
914 // 2 -> [1, 90, 100]
+
915 // 3 -> [1]
+
916 // They are not aligned but this will be marked as aligned.
+
917 // But since this is unlikely to happen in the packager (and to save
+
918 // computation), this isn't handled at the moment.
+
919 void AdaptationSet::CheckLiveSegmentAlignment(uint32_t representation_id,
+
920  uint64_t start_time,
+
921  uint64_t /* duration */) {
+
922  if (segments_aligned_ == kSegmentAlignmentFalse ||
+
923  force_set_segment_alignment_) {
+
924  return;
+
925  }
+
926 
+
927  std::list<uint64_t>& representation_start_times =
+
928  representation_segment_start_times_[representation_id];
+
929  representation_start_times.push_back(start_time);
+
930  // There's no way to detemine whether the segments are aligned if some
+
931  // representations do not have any segments.
+
932  if (representation_segment_start_times_.size() != representations_.size())
+
933  return;
+
934 
+
935  DCHECK(!representation_start_times.empty());
+
936  const uint64_t expected_start_time = representation_start_times.front();
+
937  for (RepresentationTimeline::const_iterator it =
+
938  representation_segment_start_times_.begin();
+
939  it != representation_segment_start_times_.end(); ++it) {
+
940  // If there are no entries in a list, then there is no way for the
+
941  // segment alignment status to change.
+
942  // Note that it can be empty because entries get deleted below.
+
943  if (it->second.empty())
+
944  return;
+
945 
+
946  if (expected_start_time != it->second.front()) {
+
947  // Flag as false and clear the start times data, no need to keep it
+
948  // around.
+
949  segments_aligned_ = kSegmentAlignmentFalse;
+
950  representation_segment_start_times_.clear();
+
951  return;
+
952  }
+
953  }
+
954  segments_aligned_ = kSegmentAlignmentTrue;
+
955 
+
956  for (RepresentationTimeline::iterator it =
+
957  representation_segment_start_times_.begin();
+
958  it != representation_segment_start_times_.end(); ++it) {
+
959  it->second.pop_front();
+
960  }
+
961 }
+
962 
+
963 // Make sure all segements start times match for all Representations.
+
964 // This assumes that the segments are contiguous.
+
965 void AdaptationSet::CheckVodSegmentAlignment() {
+
966  if (segments_aligned_ == kSegmentAlignmentFalse ||
+
967  force_set_segment_alignment_) {
+
968  return;
+
969  }
+
970  if (representation_segment_start_times_.empty())
+
971  return;
+
972  if (representation_segment_start_times_.size() == 1) {
+
973  segments_aligned_ = kSegmentAlignmentTrue;
+
974  return;
+
975  }
+
976 
+
977  // This is not the most efficient implementation to compare the values
+
978  // because expected_time_line is compared against all other time lines, but
+
979  // probably the most readable.
+
980  const std::list<uint64_t>& expected_time_line =
+
981  representation_segment_start_times_.begin()->second;
+
982 
+
983  bool all_segment_time_line_same_length = true;
+
984  // Note that the first entry is skipped because it is expected_time_line.
+
985  RepresentationTimeline::const_iterator it =
+
986  representation_segment_start_times_.begin();
+
987  for (++it; it != representation_segment_start_times_.end(); ++it) {
+
988  const std::list<uint64_t>& other_time_line = it->second;
+
989  if (expected_time_line.size() != other_time_line.size()) {
+
990  all_segment_time_line_same_length = false;
+
991  }
+
992 
+
993  const std::list<uint64_t>* longer_list = &other_time_line;
+
994  const std::list<uint64_t>* shorter_list = &expected_time_line;
+
995  if (expected_time_line.size() > other_time_line.size()) {
+
996  shorter_list = &other_time_line;
+
997  longer_list = &expected_time_line;
+
998  }
+
999 
+
1000  if (!std::equal(shorter_list->begin(), shorter_list->end(),
+
1001  longer_list->begin())) {
+
1002  // Some segments are definitely unaligned.
+
1003  segments_aligned_ = kSegmentAlignmentFalse;
+
1004  representation_segment_start_times_.clear();
+
1005  return;
+
1006  }
+
1007  }
+
1008 
+
1009  // TODO(rkuroiwa): The right way to do this is to also check the durations.
+
1010  // For example:
+
1011  // (a) 3 4 5
+
1012  // (b) 3 4 5 6
+
1013  // could be true or false depending on the length of the third segment of (a).
+
1014  // i.e. if length of the third segment is 2, then this is not aligned.
+
1015  if (!all_segment_time_line_same_length) {
+
1016  segments_aligned_ = kSegmentAlignmentUnknown;
+
1017  return;
+
1018  }
+
1019 
+
1020  segments_aligned_ = kSegmentAlignmentTrue;
+
1021 }
+
1022 
+
1023 // Since all AdaptationSet cares about is the maxFrameRate, representation_id
+
1024 // is not passed to this method.
+
1025 void AdaptationSet::RecordFrameRate(uint32_t frame_duration,
+
1026  uint32_t timescale) {
+
1027  if (frame_duration == 0) {
+
1028  LOG(ERROR) << "Frame duration is 0 and cannot be set.";
+
1029  return;
+
1030  }
+
1031  video_frame_rates_[static_cast<double>(timescale) / frame_duration] =
+
1032  base::IntToString(timescale) + "/" + base::IntToString(frame_duration);
+
1033 }
+
1034 
+ +
1036  const MediaInfo& media_info,
+
1037  const MpdOptions& mpd_options,
+
1038  uint32_t id,
+
1039  scoped_ptr<RepresentationStateChangeListener> state_change_listener)
+
1040  : media_info_(media_info),
+
1041  id_(id),
+
1042  bandwidth_estimator_(BandwidthEstimator::kUseAllBlocks),
+
1043  mpd_options_(mpd_options),
+
1044  start_number_(1),
+
1045  state_change_listener_(state_change_listener.Pass()),
+
1046  output_suppression_flags_(0) {}
+
1047 
+
1048 Representation::~Representation() {}
+
1049 
+ +
1051  if (!AtLeastOneTrue(media_info_.has_video_info(),
+
1052  media_info_.has_audio_info(),
+
1053  media_info_.has_text_info())) {
+
1054  // This is an error. Segment information can be in AdaptationSet, Period, or
+
1055  // MPD but the interface does not provide a way to set them.
+
1056  // See 5.3.9.1 ISO 23009-1:2012 for segment info.
+
1057  LOG(ERROR) << "Representation needs one of video, audio, or text.";
+
1058  return false;
+
1059  }
+
1060 
+
1061  if (MoreThanOneTrue(media_info_.has_video_info(),
+
1062  media_info_.has_audio_info(),
+
1063  media_info_.has_text_info())) {
+
1064  LOG(ERROR) << "Only one of VideoInfo, AudioInfo, or TextInfo can be set.";
+
1065  return false;
+
1066  }
+
1067 
+
1068  if (media_info_.container_type() == MediaInfo::CONTAINER_UNKNOWN) {
+
1069  LOG(ERROR) << "'container_type' in MediaInfo cannot be CONTAINER_UNKNOWN.";
+
1070  return false;
+
1071  }
+
1072 
+
1073  if (media_info_.has_video_info()) {
+
1074  mime_type_ = GetVideoMimeType();
+
1075  if (!HasRequiredVideoFields(media_info_.video_info())) {
+
1076  LOG(ERROR) << "Missing required fields to create a video Representation.";
+
1077  return false;
+
1078  }
+
1079  } else if (media_info_.has_audio_info()) {
+
1080  mime_type_ = GetAudioMimeType();
+
1081  } else if (media_info_.has_text_info()) {
+
1082  mime_type_ = GetTextMimeType();
+
1083  }
+
1084 
+
1085  if (mime_type_.empty())
+
1086  return false;
+
1087 
+
1088  codecs_ = GetCodecs(media_info_);
+
1089  return true;
+
1090 }
+
1091 
+ +
1093  const ContentProtectionElement& content_protection_element) {
+
1094  content_protection_elements_.push_back(content_protection_element);
+
1095  RemoveDuplicateAttributes(&content_protection_elements_.back());
+
1096 }
+
1097 
+
1098 void Representation::UpdateContentProtectionPssh(const std::string& drm_uuid,
+
1099  const std::string& pssh) {
+
1100  UpdateContentProtectionPsshHelper(drm_uuid, pssh,
+
1101  &content_protection_elements_);
+
1102 }
+
1103 
+
1104 void Representation::AddNewSegment(uint64_t start_time,
+
1105  uint64_t duration,
+
1106  uint64_t size) {
+
1107  if (start_time == 0 && duration == 0) {
+
1108  LOG(WARNING) << "Got segment with start_time and duration == 0. Ignoring.";
+
1109  return;
+
1110  }
+
1111 
+
1112  if (state_change_listener_)
+
1113  state_change_listener_->OnNewSegmentForRepresentation(start_time, duration);
+
1114  if (IsContiguous(start_time, duration, size)) {
+
1115  ++segment_infos_.back().repeat;
+
1116  } else {
+
1117  SegmentInfo s = {start_time, duration, /* Not repeat. */ 0};
+
1118  segment_infos_.push_back(s);
+
1119  }
+
1120 
+
1121  bandwidth_estimator_.AddBlock(
+
1122  size, static_cast<double>(duration) / media_info_.reference_time_scale());
+
1123 
+
1124  SlideWindow();
+
1125  DCHECK_GE(segment_infos_.size(), 1u);
+
1126 }
+
1127 
+
1128 void Representation::SetSampleDuration(uint32_t sample_duration) {
+
1129  if (media_info_.has_video_info()) {
+
1130  media_info_.mutable_video_info()->set_frame_duration(sample_duration);
+
1131  if (state_change_listener_) {
+
1132  state_change_listener_->OnSetFrameRateForRepresentation(
+
1133  sample_duration, media_info_.video_info().time_scale());
+
1134  }
+
1135  }
+
1136 }
+
1137 
+
1138 // Uses info in |media_info_| and |content_protection_elements_| to create a
+
1139 // "Representation" node.
+
1140 // MPD schema has strict ordering. The following must be done in order.
+
1141 // AddVideoInfo() (possibly adds FramePacking elements), AddAudioInfo() (Adds
+
1142 // AudioChannelConfig elements), AddContentProtectionElements*(), and
+
1143 // AddVODOnlyInfo() (Adds segment info).
+
1144 xml::scoped_xml_ptr<xmlNode> Representation::GetXml() {
+
1145  if (!HasRequiredMediaInfoFields()) {
+
1146  LOG(ERROR) << "MediaInfo missing required fields.";
+
1147  return xml::scoped_xml_ptr<xmlNode>();
+
1148  }
+
1149 
+
1150  const uint64_t bandwidth = media_info_.has_bandwidth()
+
1151  ? media_info_.bandwidth()
+
1152  : bandwidth_estimator_.Estimate();
+
1153 
+
1154  DCHECK(!(HasVODOnlyFields(media_info_) && HasLiveOnlyFields(media_info_)));
+
1155 
+
1156  RepresentationXmlNode representation;
+
1157  // Mandatory fields for Representation.
+
1158  representation.SetId(id_);
+
1159  representation.SetIntegerAttribute("bandwidth", bandwidth);
+
1160  if (!codecs_.empty())
+
1161  representation.SetStringAttribute("codecs", codecs_);
+
1162  representation.SetStringAttribute("mimeType", mime_type_);
+
1163 
+
1164  const bool has_video_info = media_info_.has_video_info();
+
1165  const bool has_audio_info = media_info_.has_audio_info();
+
1166 
+
1167  if (has_video_info &&
+
1168  !representation.AddVideoInfo(
+
1169  media_info_.video_info(),
+
1170  !(output_suppression_flags_ & kSuppressWidth),
+
1171  !(output_suppression_flags_ & kSuppressHeight),
+
1172  !(output_suppression_flags_ & kSuppressFrameRate))) {
+
1173  LOG(ERROR) << "Failed to add video info to Representation XML.";
+
1174  return xml::scoped_xml_ptr<xmlNode>();
+
1175  }
+
1176 
+
1177  if (has_audio_info &&
+
1178  !representation.AddAudioInfo(media_info_.audio_info())) {
+
1179  LOG(ERROR) << "Failed to add audio info to Representation XML.";
+
1180  return xml::scoped_xml_ptr<xmlNode>();
+
1181  }
+
1182 
+
1183  if (!representation.AddContentProtectionElements(
+
1184  content_protection_elements_)) {
+
1185  return xml::scoped_xml_ptr<xmlNode>();
+
1186  }
+
1187 
+
1188  if (HasVODOnlyFields(media_info_) &&
+
1189  !representation.AddVODOnlyInfo(media_info_)) {
+
1190  LOG(ERROR) << "Failed to add VOD segment info.";
+
1191  return xml::scoped_xml_ptr<xmlNode>();
+
1192  }
+
1193 
+
1194  if (HasLiveOnlyFields(media_info_) &&
+
1195  !representation.AddLiveOnlyInfo(media_info_, segment_infos_,
+
1196  start_number_)) {
+
1197  LOG(ERROR) << "Failed to add Live info.";
+
1198  return xml::scoped_xml_ptr<xmlNode>();
+
1199  }
+
1200  // TODO(rkuroiwa): It is likely that all representations have the exact same
+
1201  // SegmentTemplate. Optimize and propagate the tag up to AdaptationSet level.
+
1202 
+
1203  output_suppression_flags_ = 0;
+
1204  return representation.PassScopedPtr();
+
1205 }
+
1206 
+
1207 void Representation::SuppressOnce(SuppressFlag flag) {
+
1208  output_suppression_flags_ |= flag;
+
1209 }
+
1210 
+
1211 bool Representation::HasRequiredMediaInfoFields() {
+
1212  if (HasVODOnlyFields(media_info_) && HasLiveOnlyFields(media_info_)) {
+
1213  LOG(ERROR) << "MediaInfo cannot have both VOD and Live fields.";
+
1214  return false;
+
1215  }
+
1216 
+
1217  if (!media_info_.has_container_type()) {
+
1218  LOG(ERROR) << "MediaInfo missing required field: container_type.";
+
1219  return false;
+
1220  }
+
1221 
+
1222  if (HasVODOnlyFields(media_info_) && !media_info_.has_bandwidth()) {
+
1223  LOG(ERROR) << "Missing 'bandwidth' field. MediaInfo requires bandwidth for "
+
1224  "static profile for generating a valid MPD.";
+
1225  return false;
+
1226  }
+
1227 
+
1228  VLOG_IF(3, HasLiveOnlyFields(media_info_) && !media_info_.has_bandwidth())
+
1229  << "MediaInfo missing field 'bandwidth'. Using estimated from "
+
1230  "segment size.";
+
1231 
+
1232  return true;
+
1233 }
+
1234 
+
1235 bool Representation::IsContiguous(uint64_t start_time,
+
1236  uint64_t duration,
+
1237  uint64_t size) const {
+
1238  if (segment_infos_.empty())
+
1239  return false;
+
1240 
+
1241  // Contiguous segment.
+
1242  const SegmentInfo& previous = segment_infos_.back();
+
1243  const uint64_t previous_segment_end_time =
+
1244  previous.start_time + previous.duration * (previous.repeat + 1);
+
1245  if (previous_segment_end_time == start_time &&
+
1246  segment_infos_.back().duration == duration) {
+
1247  return true;
+
1248  }
+
1249 
+
1250  // No out of order segments.
+
1251  const uint64_t previous_segment_start_time =
+
1252  previous.start_time + previous.duration * previous.repeat;
+
1253  if (previous_segment_start_time >= start_time) {
+
1254  LOG(ERROR) << "Segments should not be out of order segment. Adding segment "
+
1255  "with start_time == "
+
1256  << start_time << " but the previous segment starts at "
+
1257  << previous.start_time << ".";
+
1258  return false;
+
1259  }
+
1260 
+
1261  // A gap since previous.
+
1262  const uint64_t kRoundingErrorGrace = 5;
+
1263  if (previous_segment_end_time + kRoundingErrorGrace < start_time) {
+
1264  LOG(WARNING) << "Found a gap of size "
+
1265  << (start_time - previous_segment_end_time)
+
1266  << " > kRoundingErrorGrace (" << kRoundingErrorGrace
+
1267  << "). The new segment starts at " << start_time
+
1268  << " but the previous segment ends at "
+
1269  << previous_segment_end_time << ".";
+
1270  return false;
+
1271  }
+
1272 
+
1273  // No overlapping segments.
+
1274  if (start_time < previous_segment_end_time - kRoundingErrorGrace) {
+
1275  LOG(WARNING)
+
1276  << "Segments should not be overlapping. The new segment starts at "
+
1277  << start_time << " but the previous segment ends at "
+
1278  << previous_segment_end_time << ".";
+
1279  return false;
+
1280  }
+
1281 
+
1282  // Within rounding error grace but technically not contiguous in terms of MPD.
+
1283  return false;
+
1284 }
+
1285 
+
1286 void Representation::SlideWindow() {
+
1287  DCHECK(!segment_infos_.empty());
+
1288  if (mpd_options_.time_shift_buffer_depth <= 0.0)
+
1289  return;
+
1290 
+
1291  const uint32_t time_scale = GetTimeScale(media_info_);
+
1292  DCHECK_GT(time_scale, 0u);
+
1293 
+
1294  uint64_t time_shift_buffer_depth =
+
1295  static_cast<uint64_t>(mpd_options_.time_shift_buffer_depth * time_scale);
+
1296 
+
1297  // The start time of the latest segment is considered the current_play_time,
+
1298  // and this should guarantee that the latest segment will stay in the list.
+
1299  const uint64_t current_play_time = LatestSegmentStartTime(segment_infos_);
+
1300  if (current_play_time <= time_shift_buffer_depth)
+
1301  return;
+
1302 
+
1303  const uint64_t timeshift_limit = current_play_time - time_shift_buffer_depth;
+
1304 
+
1305  // First remove all the SegmentInfos that are completely out of range, by
+
1306  // looking at the very last segment's end time.
+
1307  std::list<SegmentInfo>::iterator first = segment_infos_.begin();
+
1308  std::list<SegmentInfo>::iterator last = first;
+
1309  size_t num_segments_removed = 0;
+
1310  for (; last != segment_infos_.end(); ++last) {
+
1311  const uint64_t last_segment_end_time = LastSegmentEndTime(*last);
+
1312  if (timeshift_limit < last_segment_end_time)
+
1313  break;
+
1314  num_segments_removed += last->repeat + 1;
+
1315  }
+
1316  segment_infos_.erase(first, last);
+
1317  start_number_ += num_segments_removed;
+
1318 
+
1319  // Now some segment in the first SegmentInfo should be left in the list.
+
1320  SegmentInfo* first_segment_info = &segment_infos_.front();
+
1321  DCHECK_LE(timeshift_limit, LastSegmentEndTime(*first_segment_info));
+
1322 
+
1323  // Identify which segments should still be in the SegmentInfo.
+
1324  const int repeat_index =
+
1325  SearchTimedOutRepeatIndex(timeshift_limit, *first_segment_info);
+
1326  CHECK_GE(repeat_index, 0);
+
1327  if (repeat_index == 0)
+
1328  return;
+
1329 
+
1330  first_segment_info->start_time = first_segment_info->start_time +
+
1331  first_segment_info->duration * repeat_index;
+
1332 
+
1333  first_segment_info->repeat = first_segment_info->repeat - repeat_index;
+
1334  start_number_ += repeat_index;
+
1335 }
+
1336 
+
1337 std::string Representation::GetVideoMimeType() const {
+
1338  return GetMimeType("video", media_info_.container_type());
+
1339 }
+
1340 
+
1341 std::string Representation::GetAudioMimeType() const {
+
1342  return GetMimeType("audio", media_info_.container_type());
+
1343 }
+
1344 
+
1345 std::string Representation::GetTextMimeType() const {
+
1346  CHECK(media_info_.has_text_info());
+
1347  if (media_info_.text_info().format() == "ttml") {
+
1348  switch (media_info_.container_type()) {
+
1349  case MediaInfo::CONTAINER_TEXT:
+
1350  return "application/ttml+xml";
+
1351  case MediaInfo::CONTAINER_MP4:
+
1352  return "application/mp4";
+
1353  default:
+
1354  LOG(ERROR) << "Failed to determine MIME type for TTML container: "
+
1355  << media_info_.container_type();
+
1356  return "";
+
1357  }
+
1358  }
+
1359  if (media_info_.text_info().format() == "vtt") {
+
1360  if (media_info_.container_type() == MediaInfo::CONTAINER_TEXT) {
+
1361  return "text/vtt";
+
1362  }
+
1363  LOG(ERROR) << "Failed to determine MIME type for VTT container: "
+
1364  << media_info_.container_type();
+
1365  return "";
+
1366  }
+
1367 
+
1368  LOG(ERROR) << "Cannot determine MIME type for format: "
+
1369  << media_info_.text_info().format()
+
1370  << " container: " << media_info_.container_type();
+
1371  return "";
+
1372 }
+
1373 
+
1374 bool Representation::GetEarliestTimestamp(double* timestamp_seconds) {
+
1375  DCHECK(timestamp_seconds);
+
1376 
+
1377  if (segment_infos_.empty())
+
1378  return false;
+
1379 
+
1380  *timestamp_seconds = static_cast<double>(segment_infos_.begin()->start_time) /
+
1381  GetTimeScale(media_info_);
+
1382  return true;
+
1383 }
+
1384 
+
1385 } // namespace shaka
+
void OnSetFrameRateForRepresentation(uint32_t representation_id, uint32_t frame_duration, uint32_t timescale)
Definition: mpd_builder.cc:868
+
virtual void AddNewSegment(uint64_t start_time, uint64_t duration, uint64_t size)
+ +
bool WriteMpdToFile(media::File *output_file)
Definition: mpd_builder.cc:423
+
AdaptationSet(uint32_t adaptation_set_id, const std::string &lang, const MpdOptions &mpd_options, MpdBuilder::MpdType mpd_type, base::AtomicSequenceNumber *representation_counter)
Definition: mpd_builder.cc:674
-
virtual void SetSampleDuration(uint32_t sample_duration)
-
virtual Representation * AddRepresentation(const MediaInfo &media_info)
Definition: mpd_builder.cc:694
+
virtual void SetSampleDuration(uint32_t sample_duration)
+
virtual Representation * AddRepresentation(const MediaInfo &media_info)
Definition: mpd_builder.cc:693
std::string LanguageToShortestForm(const std::string &language)
Define an abstract file interface.
Definition: file.h:24
-
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
Definition: mpd_builder.cc:738
-
Representation(const MediaInfo &media_info, const MpdOptions &mpd_options, uint32_t representation_id, scoped_ptr< RepresentationStateChangeListener > state_change_listener)
+
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
Definition: mpd_builder.cc:737
+
Representation(const MediaInfo &media_info, const MpdOptions &mpd_options, uint32_t representation_id, scoped_ptr< RepresentationStateChangeListener > state_change_listener)
-
virtual void AddRole(Role role)
Definition: mpd_builder.cc:750
-
void AddBaseUrl(const std::string &base_url)
Definition: mpd_builder.cc:410
-
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
Definition: mpd_builder.cc:744
-
virtual void SetGroup(int group_number)
Definition: mpd_builder.cc:843
-
xml::scoped_xml_ptr< xmlNode > GetXml()
-
virtual bool ToString(std::string *output)
Definition: mpd_builder.cc:429
-
virtual void ForceSetSegmentAlignment(bool segment_alignment)
Definition: mpd_builder.cc:837
-
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:647
-
MpdBuilder(MpdType type, const MpdOptions &mpd_options)
Definition: mpd_builder.cc:402
-
xml::scoped_xml_ptr< xmlNode > GetXml()
Definition: mpd_builder.cc:760
-
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
+
virtual void AddRole(Role role)
Definition: mpd_builder.cc:749
+
void AddBaseUrl(const std::string &base_url)
Definition: mpd_builder.cc:409
+
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
Definition: mpd_builder.cc:743
+
virtual void SetGroup(int group_number)
Definition: mpd_builder.cc:842
+
xml::scoped_xml_ptr< xmlNode > GetXml()
+
virtual bool ToString(std::string *output)
Definition: mpd_builder.cc:428
+
virtual void ForceSetSegmentAlignment(bool segment_alignment)
Definition: mpd_builder.cc:836
+
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:646
+
MpdBuilder(MpdType type, const MpdOptions &mpd_options)
Definition: mpd_builder.cc:401
+
xml::scoped_xml_ptr< xmlNode > GetXml()
Definition: mpd_builder.cc:759
+
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
-
virtual AdaptationSet * AddAdaptationSet(const std::string &lang)
Definition: mpd_builder.cc:414
-
virtual int Group() const
Definition: mpd_builder.cc:847
+
virtual AdaptationSet * AddAdaptationSet(const std::string &lang)
Definition: mpd_builder.cc:413
+
virtual int Group() const
Definition: mpd_builder.cc:846
Defines Mpd Options.
Definition: mpd_options.h:15
-
void OnNewSegmentForRepresentation(uint32_t representation_id, uint64_t start_time, uint64_t duration)
Definition: mpd_builder.cc:858
-
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
+
void OnNewSegmentForRepresentation(uint32_t representation_id, uint64_t start_time, uint64_t duration)
Definition: mpd_builder.cc:857
+
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
-
void SuppressOnce(SuppressFlag flag)
+
void SuppressOnce(SuppressFlag flag)
diff --git a/docs/dd/d12/mpd__writer_8cc_source.html b/docs/dd/d12/mpd__writer_8cc_source.html index 46c1469891..d63c8ffab3 100644 --- a/docs/dd/d12/mpd__writer_8cc_source.html +++ b/docs/dd/d12/mpd__writer_8cc_source.html @@ -216,12 +216,12 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
127 }
128 
129 } // namespace shaka
-
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:647
-
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:184
+
static void MakePathsRelativeToMpd(const std::string &mpd_path, MediaInfo *media_info)
Definition: mpd_builder.cc:646
+
static bool ReadFileToString(const char *file_name, std::string *contents)
Definition: file.cc:189
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 83a748764e..20406fd881 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 d3423dc463..3937c88004 100644 --- a/docs/dd/d17/classshaka_1_1media_1_1Demuxer.html +++ b/docs/dd/d17/classshaka_1_1media_1_1Demuxer.html @@ -295,7 +295,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 3c671ed005..912c046806 100644 --- a/docs/dd/d18/es__parser__adts_8h_source.html +++ b/docs/dd/d18/es__parser__adts_8h_source.html @@ -172,7 +172,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d19/video__stream__info_8cc_source.html b/docs/dd/d19/video__stream__info_8cc_source.html index 876f03d252..45555790dc 100644 --- a/docs/dd/d19/video__stream__info_8cc_source.html +++ b/docs/dd/d19/video__stream__info_8cc_source.html @@ -197,7 +197,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 2539ac1d19..5e01d4222b 100644 --- a/docs/dd/d30/wvm__media__parser_8cc_source.html +++ b/docs/dd/d30/wvm__media__parser_8cc_source.html @@ -1264,7 +1264,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d3b/mp4_2segmenter_8h_source.html b/docs/dd/d3b/mp4_2segmenter_8h_source.html index 1c6a3e457c..f37f26a2d6 100644 --- a/docs/dd/d3b/mp4_2segmenter_8h_source.html +++ b/docs/dd/d3b/mp4_2segmenter_8h_source.html @@ -202,26 +202,26 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
152 } // namespace shaka
153 
154 #endif // MEDIA_FORMATS_MP4_SEGMENTER_H_
-
Status Initialize(const std::vector< MediaStream * > &streams, MuxerListener *muxer_listener, ProgressListener *progress_listener, KeySource *encryption_key_source, uint32_t max_sd_pixels, double clear_lead_in_seconds, double crypto_period_duration_in_seconds, FourCC protection_scheme)
Definition: segmenter.cc:165
-
void UpdateProgress(uint64_t progress)
Update segmentation progress using ProgressListener.
Definition: segmenter.cc:388
-
void SetComplete()
Set progress to 100%.
Definition: segmenter.cc:404
+
Status Initialize(const std::vector< MediaStream * > &streams, MuxerListener *muxer_listener, ProgressListener *progress_listener, KeySource *encryption_key_source, uint32_t max_sd_pixels, double clear_lead_in_seconds, double crypto_period_duration_in_seconds, FourCC protection_scheme)
Definition: segmenter.cc:166
+
void UpdateProgress(uint64_t progress)
Update segmentation progress using ProgressListener.
Definition: segmenter.cc:389
+
void SetComplete()
Set progress to 100%.
Definition: segmenter.cc:405
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:101
-
Status AddSample(const MediaStream *stream, scoped_refptr< MediaSample > sample)
Definition: segmenter.cc:321
+
Status AddSample(const MediaStream *stream, scoped_refptr< MediaSample > sample)
Definition: segmenter.cc:322
This class listens to progress updates events.
- +
KeySource is responsible for encryption key acquisition.
Definition: key_source.h:31
-
double GetDuration() const
Definition: segmenter.cc:379
+
double GetDuration() const
Definition: segmenter.cc:380
virtual bool GetIndexRange(size_t *offset, size_t *size)=0
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 64cd67137e..df9dd864e0 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 911 of file box_definitions.cc.

+

Definition at line 912 of file box_definitions.cc.

@@ -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 6d15b477e8..c0b2a0e51c 100644 --- a/docs/dd/d42/encryptor_8h_source.html +++ b/docs/dd/d42/encryptor_8h_source.html @@ -151,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d46/webm__parser_8h_source.html b/docs/dd/d46/webm__parser_8h_source.html index ed43505c59..2517146c99 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 56c95a2eec..7eab2c9ca8 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'); 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 884126edbc..f4c634a83d 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 416cad1c2a..e4a3fe2b67 100644 --- a/docs/dd/d54/widevine__encryption__flags_8h_source.html +++ b/docs/dd/d54/widevine__encryption__flags_8h_source.html @@ -125,7 +125,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 297152c65d..b2ffa6ca6b 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 31b3442998..c3734eeca2 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 72f8676103..fbbb93c3a9 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 7c47010e36..e4c216522f 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 80798ce905..206df63bad 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 39ad22e4e7..a453488f03 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 347db86811..886880eca7 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 @@ -165,7 +165,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1464 of file box_definitions.cc.

+

Definition at line 1465 of file box_definitions.cc.

@@ -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 0fe55f16c7..5cb5c4539f 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 2270945ae0..783e69d191 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 47c9a80242..9f39c39e0c 100644 --- a/docs/dd/d80/media__sample_8h_source.html +++ b/docs/dd/d80/media__sample_8h_source.html @@ -260,7 +260,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d87/memory__file_8cc_source.html b/docs/dd/d87/memory__file_8cc_source.html index 631f81f71e..03640c2749 100644 --- a/docs/dd/d87/memory__file_8cc_source.html +++ b/docs/dd/d87/memory__file_8cc_source.html @@ -241,7 +241,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 640c755f87..b9edcf8cd8 100644 --- a/docs/dd/d88/pes__packet__generator_8h_source.html +++ b/docs/dd/d88/pes__packet__generator_8h_source.html @@ -174,7 +174,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/d8c/file__test__util_8h_source.html b/docs/dd/d8c/file__test__util_8h_source.html index b9745dff31..e9f2972ed6 100644 --- a/docs/dd/d8c/file__test__util_8h_source.html +++ b/docs/dd/d8c/file__test__util_8h_source.html @@ -119,7 +119,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 f4103a5d91..42eb06a92f 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 d4cfc6df74..57a973cca6 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 af4e56a91a..eabc86176b 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 64bd1425af..0c829d3e83 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 b6b762df58..cfccb13967 100644 --- a/docs/dd/d9d/classshaka_1_1MpdNotifier-members.html +++ b/docs/dd/d9d/classshaka_1_1MpdNotifier-members.html @@ -106,7 +106,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 06fdfaa2b3..f32ab6be78 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 50e1062b8b..7cef4c7351 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 @@ -217,7 +217,7 @@ double cluster_length_sec< 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 2fd32c60c8..796e13f245 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 @@ -181,7 +181,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 b577721ab2..8e069d632d 100644 --- a/docs/dd/dab/webm__muxer_8h_source.html +++ b/docs/dd/dab/webm__muxer_8h_source.html @@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 30a28cc056..1a8c6354ca 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 fea8aec910..c47ac9e129 100644 --- a/docs/dd/db0/classshaka_1_1media_1_1WebMAudioClient-members.html +++ b/docs/dd/db0/classshaka_1_1media_1_1WebMAudioClient-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 e3df162b7b..5bb1dfc230 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 99f7cb4718..d4b430a88c 100644 --- a/docs/dd/db9/classshaka_1_1xml_1_1RepresentationBaseXmlNode.html +++ b/docs/dd/db9/classshaka_1_1xml_1_1RepresentationBaseXmlNode.html @@ -156,7 +156,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 f19e458df1..58073e7dc8 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 4a61cd4a34..25521d1fcc 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 842a040817..0a5a5d83ac 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 e6f40cbf85..d85fe5df06 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 cdfec04689..8726ec4e95 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 26829755a0..91e4ed7fdd 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 729c4fcd09..d35bd0a030 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 @@ -427,7 +427,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 607c36be45..3273e44b3b 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'); diff --git a/docs/dd/dce/structshaka_1_1media_1_1Cue.html b/docs/dd/dce/structshaka_1_1media_1_1Cue.html index 95f25ebfcb..4a6618e52a 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 46ff6024e0..4aa82eebb5 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 72f4efe3a2..0c04f21896 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 a7127a6f4b..9321e6f885 100644 --- a/docs/dd/dd6/classshaka_1_1media_1_1WebMVideoClient-members.html +++ b/docs/dd/dd6/classshaka_1_1media_1_1WebMVideoClient-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/dd/dd8/mock__muxer__listener_8cc_source.html b/docs/dd/dd8/mock__muxer__listener_8cc_source.html index c40e624456..04031579de 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 05f952c027..855e7a6952 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 bf458e02ba..cb38f3e8b8 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 c10506727b..fea0cdb4c1 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 ddc209ee86..8611dd7fca 100644 --- a/docs/dd/de7/xml__node_8h_source.html +++ b/docs/dd/de7/xml__node_8h_source.html @@ -230,7 +230,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 eb0fea3c85..09a1c8cbff 100644 --- a/docs/dd/dee/box__definitions_8cc_source.html +++ b/docs/dd/dee/box__definitions_8cc_source.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
46 // According to ISO/IEC FDIS 23001-7: CENC spec, IV should be either
47 // 64-bit (8-byte) or 128-bit (16-byte).
48 // |per_sample_iv_size| of 0 means constant_iv is used.
-
49 bool IsIvSizeValid(size_t per_sample_iv_size) {
+
49 bool IsIvSizeValid(uint8_t per_sample_iv_size) {
50  return per_sample_iv_size == 0 || per_sample_iv_size == 8 ||
51  per_sample_iv_size == 16;
52 }
@@ -340,7 +340,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
251  return true;
252  }
253 
-
254  uint16_t subsample_count = subsamples.size();
+
254  uint16_t subsample_count = static_cast<uint16_t>(subsamples.size());
255  RCHECK(buffer->ReadWriteUInt16(&subsample_count));
256  RCHECK(subsample_count > 0);
257  subsamples.resize(subsample_count);
@@ -378,7 +378,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
289 
291  const uint32_t subsample_entry_size = sizeof(uint16_t) + sizeof(uint32_t);
-
292  const uint16_t subsample_count = subsamples.size();
+
292  const uint16_t subsample_count = static_cast<uint16_t>(subsamples.size());
293  return initialization_vector.size() +
294  (subsample_count > 0 ? (sizeof(subsample_count) +
295  subsample_entry_size * subsample_count)
@@ -420,7 +420,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
331  sample_encryption_entries.resize(sample_count);
332  for (auto& sample_encryption_entry : sample_encryption_entries) {
333  RCHECK(sample_encryption_entry.ReadWrite(
-
334  iv_size, flags & kUseSubsampleEncryption, buffer));
+
334  iv_size, (flags & kUseSubsampleEncryption) != 0, buffer) != 0);
335  }
336  return true;
337 }
@@ -445,8 +445,8 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
356  return box_size;
357 }
358 
- -
360  size_t iv_size,
+ +
360  uint8_t iv_size,
361  std::vector<SampleEncryptionEntry>* sample_encryption_entries) const {
362  DCHECK(IsIvSizeValid(iv_size));
363 
@@ -458,7 +458,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
369  sample_encryption_entries->resize(sample_count);
370  for (auto& sample_encryption_entry : *sample_encryption_entries) {
371  RCHECK(sample_encryption_entry.ParseFromBuffer(
-
372  iv_size, flags & kUseSubsampleEncryption, &reader));
+
372  iv_size, (flags & kUseSubsampleEncryption) != 0, &reader) != 0);
373  }
374  return true;
375 }
@@ -528,2422 +528,2423 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
439 
440  if (default_is_protected == 1) {
441  if (default_per_sample_iv_size == 0) { // For constant iv.
-
442  uint8_t default_constant_iv_size = default_constant_iv.size();
-
443  RCHECK(buffer->ReadWriteUInt8(&default_constant_iv_size));
-
444  RCHECK(default_constant_iv_size == 8 || default_constant_iv_size == 16);
-
445  RCHECK(buffer->ReadWriteVector(&default_constant_iv,
-
446  default_constant_iv_size));
-
447  } else {
-
448  RCHECK(default_per_sample_iv_size == 8 ||
-
449  default_per_sample_iv_size == 16);
-
450  RCHECK(default_constant_iv.empty());
-
451  }
-
452  } else {
-
453  // Expect |default_is_protected| to be 0, i.e. not protected. Other values
-
454  // of |default_is_protected| is not supported.
-
455  RCHECK(default_is_protected == 0);
-
456  RCHECK(default_per_sample_iv_size == 0);
-
457  RCHECK(default_constant_iv.empty());
-
458  }
-
459  return true;
-
460 }
-
461 
-
462 uint32_t TrackEncryption::ComputeSizeInternal() {
-
463  return HeaderSize() + sizeof(uint32_t) + kCencKeyIdSize +
-
464  (default_constant_iv.empty() ? 0 : (sizeof(uint8_t) +
-
465  default_constant_iv.size()));
-
466 }
-
467 
-
468 SchemeInfo::SchemeInfo() {}
-
469 SchemeInfo::~SchemeInfo() {}
-
470 FourCC SchemeInfo::BoxType() const { return FOURCC_schi; }
-
471 
-
472 bool SchemeInfo::ReadWriteInternal(BoxBuffer* buffer) {
-
473  RCHECK(ReadWriteHeaderInternal(buffer) && buffer->PrepareChildren() &&
-
474  buffer->ReadWriteChild(&track_encryption));
-
475  return true;
-
476 }
-
477 
-
478 uint32_t SchemeInfo::ComputeSizeInternal() {
-
479  return HeaderSize() + track_encryption.ComputeSize();
-
480 }
-
481 
-
482 ProtectionSchemeInfo::ProtectionSchemeInfo() {}
-
483 ProtectionSchemeInfo::~ProtectionSchemeInfo() {}
-
484 FourCC ProtectionSchemeInfo::BoxType() const { return FOURCC_sinf; }
-
485 
-
486 bool ProtectionSchemeInfo::ReadWriteInternal(BoxBuffer* buffer) {
-
487  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
488  buffer->PrepareChildren() &&
-
489  buffer->ReadWriteChild(&format) &&
-
490  buffer->ReadWriteChild(&type));
-
491  if (IsProtectionSchemeSupported(type.type)) {
-
492  RCHECK(buffer->ReadWriteChild(&info));
-
493  } else {
-
494  DLOG(WARNING) << "Ignore unsupported protection scheme: "
-
495  << FourCCToString(type.type);
-
496  }
-
497  // Other protection schemes are silently ignored. Since the protection scheme
-
498  // type can't be determined until this box is opened, we return 'true' for
-
499  // non-CENC protection scheme types. It is the parent box's responsibility to
-
500  // ensure that this scheme type is a supported one.
-
501  return true;
-
502 }
-
503 
-
504 uint32_t ProtectionSchemeInfo::ComputeSizeInternal() {
-
505  // Skip sinf box if it is not initialized.
-
506  if (format.format == FOURCC_NULL)
-
507  return 0;
-
508  return HeaderSize() + format.ComputeSize() + type.ComputeSize() +
-
509  info.ComputeSize();
-
510 }
-
511 
-
512 MovieHeader::MovieHeader()
-
513  : creation_time(0),
-
514  modification_time(0),
-
515  timescale(0),
-
516  duration(0),
-
517  rate(1 << 16),
-
518  volume(1 << 8),
-
519  next_track_id(0) {}
-
520 MovieHeader::~MovieHeader() {}
-
521 FourCC MovieHeader::BoxType() const { return FOURCC_mvhd; }
-
522 
-
523 bool MovieHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
524  RCHECK(ReadWriteHeaderInternal(buffer));
-
525 
-
526  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
-
527  RCHECK(buffer->ReadWriteUInt64NBytes(&creation_time, num_bytes) &&
-
528  buffer->ReadWriteUInt64NBytes(&modification_time, num_bytes) &&
-
529  buffer->ReadWriteUInt32(&timescale) &&
-
530  buffer->ReadWriteUInt64NBytes(&duration, num_bytes));
-
531 
-
532  std::vector<uint8_t> matrix(kUnityMatrix,
-
533  kUnityMatrix + arraysize(kUnityMatrix));
-
534  RCHECK(buffer->ReadWriteInt32(&rate) &&
-
535  buffer->ReadWriteInt16(&volume) &&
-
536  buffer->IgnoreBytes(10) && // reserved
-
537  buffer->ReadWriteVector(&matrix, matrix.size()) &&
-
538  buffer->IgnoreBytes(24) && // predefined zero
-
539  buffer->ReadWriteUInt32(&next_track_id));
-
540  return true;
-
541 }
-
542 
-
543 uint32_t MovieHeader::ComputeSizeInternal() {
-
544  version = IsFitIn32Bits(creation_time, modification_time, duration) ? 0 : 1;
-
545  return HeaderSize() + sizeof(uint32_t) * (1 + version) * 3 +
-
546  sizeof(timescale) + sizeof(rate) + sizeof(volume) +
-
547  sizeof(next_track_id) + sizeof(kUnityMatrix) + 10 +
-
548  24; // 10 bytes reserved, 24 bytes predefined.
-
549 }
-
550 
-
551 TrackHeader::TrackHeader()
-
552  : creation_time(0),
-
553  modification_time(0),
-
554  track_id(0),
-
555  duration(0),
-
556  layer(0),
-
557  alternate_group(0),
-
558  volume(-1),
-
559  width(0),
-
560  height(0) {
-
561  flags = kTrackEnabled | kTrackInMovie;
-
562 }
-
563 TrackHeader::~TrackHeader() {}
-
564 FourCC TrackHeader::BoxType() const { return FOURCC_tkhd; }
-
565 
-
566 bool TrackHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
567  RCHECK(ReadWriteHeaderInternal(buffer));
-
568 
-
569  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
-
570  RCHECK(buffer->ReadWriteUInt64NBytes(&creation_time, num_bytes) &&
-
571  buffer->ReadWriteUInt64NBytes(&modification_time, num_bytes) &&
-
572  buffer->ReadWriteUInt32(&track_id) &&
-
573  buffer->IgnoreBytes(4) && // reserved
-
574  buffer->ReadWriteUInt64NBytes(&duration, num_bytes));
-
575 
-
576  if (!buffer->Reading()) {
-
577  // Set default value for volume, if track is audio, 0x100 else 0.
-
578  if (volume == -1)
-
579  volume = (width != 0 && height != 0) ? 0 : 0x100;
-
580  }
-
581  std::vector<uint8_t> matrix(kUnityMatrix,
-
582  kUnityMatrix + arraysize(kUnityMatrix));
-
583  RCHECK(buffer->IgnoreBytes(8) && // reserved
-
584  buffer->ReadWriteInt16(&layer) &&
-
585  buffer->ReadWriteInt16(&alternate_group) &&
-
586  buffer->ReadWriteInt16(&volume) &&
-
587  buffer->IgnoreBytes(2) && // reserved
-
588  buffer->ReadWriteVector(&matrix, matrix.size()) &&
-
589  buffer->ReadWriteUInt32(&width) &&
-
590  buffer->ReadWriteUInt32(&height));
-
591  return true;
-
592 }
-
593 
-
594 uint32_t TrackHeader::ComputeSizeInternal() {
-
595  version = IsFitIn32Bits(creation_time, modification_time, duration) ? 0 : 1;
-
596  return HeaderSize() + sizeof(track_id) +
-
597  sizeof(uint32_t) * (1 + version) * 3 + sizeof(layer) +
-
598  sizeof(alternate_group) + sizeof(volume) + sizeof(width) +
-
599  sizeof(height) + sizeof(kUnityMatrix) + 14; // 14 bytes reserved.
-
600 }
-
601 
-
602 SampleDescription::SampleDescription() : type(kInvalid) {}
-
603 SampleDescription::~SampleDescription() {}
-
604 FourCC SampleDescription::BoxType() const { return FOURCC_stsd; }
-
605 
-
606 bool SampleDescription::ReadWriteInternal(BoxBuffer* buffer) {
-
607  uint32_t count = 0;
-
608  switch (type) {
-
609  case kVideo:
-
610  count = video_entries.size();
-
611  break;
-
612  case kAudio:
-
613  count = audio_entries.size();
-
614  break;
-
615  case kText:
-
616  count = text_entries.size();
-
617  break;
-
618  default:
-
619  NOTIMPLEMENTED() << "SampleDecryption type " << type
-
620  << " is not handled. Skipping.";
-
621  }
-
622  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
623  buffer->ReadWriteUInt32(&count));
-
624 
-
625  if (buffer->Reading()) {
-
626  BoxReader* reader = buffer->reader();
-
627  DCHECK(reader);
-
628  video_entries.clear();
-
629  audio_entries.clear();
-
630  // Note: this value is preset before scanning begins. See comments in the
-
631  // Parse(Media*) function.
-
632  if (type == kVideo) {
-
633  RCHECK(reader->ReadAllChildren(&video_entries));
-
634  RCHECK(video_entries.size() == count);
-
635  } else if (type == kAudio) {
-
636  RCHECK(reader->ReadAllChildren(&audio_entries));
-
637  RCHECK(audio_entries.size() == count);
-
638  } else if (type == kText) {
-
639  RCHECK(reader->ReadAllChildren(&text_entries));
-
640  RCHECK(text_entries.size() == count);
-
641  }
-
642  } else {
-
643  DCHECK_LT(0u, count);
-
644  if (type == kVideo) {
-
645  for (uint32_t i = 0; i < count; ++i)
-
646  RCHECK(buffer->ReadWriteChild(&video_entries[i]));
-
647  } else if (type == kAudio) {
-
648  for (uint32_t i = 0; i < count; ++i)
-
649  RCHECK(buffer->ReadWriteChild(&audio_entries[i]));
-
650  } else if (type == kText) {
-
651  for (uint32_t i = 0; i < count; ++i)
-
652  RCHECK(buffer->ReadWriteChild(&text_entries[i]));
-
653  } else {
-
654  NOTIMPLEMENTED();
-
655  }
-
656  }
-
657  return true;
-
658 }
-
659 
-
660 uint32_t SampleDescription::ComputeSizeInternal() {
-
661  uint32_t box_size = HeaderSize() + sizeof(uint32_t);
-
662  if (type == kVideo) {
-
663  for (uint32_t i = 0; i < video_entries.size(); ++i)
-
664  box_size += video_entries[i].ComputeSize();
-
665  } else if (type == kAudio) {
-
666  for (uint32_t i = 0; i < audio_entries.size(); ++i)
-
667  box_size += audio_entries[i].ComputeSize();
-
668  } else if (type == kText) {
-
669  for (uint32_t i = 0; i < text_entries.size(); ++i)
-
670  box_size += text_entries[i].ComputeSize();
-
671  }
-
672  return box_size;
-
673 }
-
674 
-
675 DecodingTimeToSample::DecodingTimeToSample() {}
-
676 DecodingTimeToSample::~DecodingTimeToSample() {}
-
677 FourCC DecodingTimeToSample::BoxType() const { return FOURCC_stts; }
-
678 
-
679 bool DecodingTimeToSample::ReadWriteInternal(BoxBuffer* buffer) {
-
680  uint32_t count = decoding_time.size();
-
681  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
682  buffer->ReadWriteUInt32(&count));
-
683 
-
684  decoding_time.resize(count);
-
685  for (uint32_t i = 0; i < count; ++i) {
-
686  RCHECK(buffer->ReadWriteUInt32(&decoding_time[i].sample_count) &&
-
687  buffer->ReadWriteUInt32(&decoding_time[i].sample_delta));
-
688  }
-
689  return true;
-
690 }
-
691 
-
692 uint32_t DecodingTimeToSample::ComputeSizeInternal() {
-
693  return HeaderSize() + sizeof(uint32_t) +
-
694  sizeof(DecodingTime) * decoding_time.size();
-
695 }
-
696 
-
697 CompositionTimeToSample::CompositionTimeToSample() {}
-
698 CompositionTimeToSample::~CompositionTimeToSample() {}
-
699 FourCC CompositionTimeToSample::BoxType() const { return FOURCC_ctts; }
-
700 
-
701 bool CompositionTimeToSample::ReadWriteInternal(BoxBuffer* buffer) {
-
702  uint32_t count = composition_offset.size();
-
703  if (!buffer->Reading()) {
-
704  // Determine whether version 0 or version 1 should be used.
-
705  // Use version 0 if possible, use version 1 if there is a negative
-
706  // sample_offset value.
-
707  version = 0;
-
708  for (uint32_t i = 0; i < count; ++i) {
-
709  if (composition_offset[i].sample_offset < 0) {
-
710  version = 1;
-
711  break;
-
712  }
-
713  }
-
714  }
-
715 
-
716  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
717  buffer->ReadWriteUInt32(&count));
-
718 
-
719  composition_offset.resize(count);
-
720  for (uint32_t i = 0; i < count; ++i) {
-
721  RCHECK(buffer->ReadWriteUInt32(&composition_offset[i].sample_count));
-
722 
-
723  if (version == 0) {
-
724  uint32_t sample_offset = composition_offset[i].sample_offset;
-
725  RCHECK(buffer->ReadWriteUInt32(&sample_offset));
-
726  composition_offset[i].sample_offset = sample_offset;
-
727  } else {
-
728  int32_t sample_offset = composition_offset[i].sample_offset;
-
729  RCHECK(buffer->ReadWriteInt32(&sample_offset));
-
730  composition_offset[i].sample_offset = sample_offset;
-
731  }
-
732  }
-
733  return true;
-
734 }
-
735 
-
736 uint32_t CompositionTimeToSample::ComputeSizeInternal() {
-
737  // This box is optional. Skip it if it is empty.
-
738  if (composition_offset.empty())
-
739  return 0;
-
740  // Structure CompositionOffset contains |sample_offset| (uint32_t) and
-
741  // |sample_offset| (int64_t). The actual size of |sample_offset| is
-
742  // 4 bytes (uint32_t for version 0 and int32_t for version 1).
-
743  const uint32_t kCompositionOffsetSize = sizeof(uint32_t) * 2;
-
744  return HeaderSize() + sizeof(uint32_t) +
-
745  kCompositionOffsetSize * composition_offset.size();
-
746 }
-
747 
-
748 SampleToChunk::SampleToChunk() {}
-
749 SampleToChunk::~SampleToChunk() {}
-
750 FourCC SampleToChunk::BoxType() const { return FOURCC_stsc; }
-
751 
-
752 bool SampleToChunk::ReadWriteInternal(BoxBuffer* buffer) {
-
753  uint32_t count = chunk_info.size();
-
754  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
755  buffer->ReadWriteUInt32(&count));
-
756 
-
757  chunk_info.resize(count);
-
758  for (uint32_t i = 0; i < count; ++i) {
-
759  RCHECK(buffer->ReadWriteUInt32(&chunk_info[i].first_chunk) &&
-
760  buffer->ReadWriteUInt32(&chunk_info[i].samples_per_chunk) &&
-
761  buffer->ReadWriteUInt32(&chunk_info[i].sample_description_index));
-
762  // first_chunk values are always increasing.
-
763  RCHECK(i == 0 ? chunk_info[i].first_chunk == 1
-
764  : chunk_info[i].first_chunk > chunk_info[i - 1].first_chunk);
-
765  }
-
766  return true;
-
767 }
-
768 
-
769 uint32_t SampleToChunk::ComputeSizeInternal() {
-
770  return HeaderSize() + sizeof(uint32_t) +
-
771  sizeof(ChunkInfo) * chunk_info.size();
-
772 }
-
773 
-
774 SampleSize::SampleSize() : sample_size(0), sample_count(0) {}
-
775 SampleSize::~SampleSize() {}
-
776 FourCC SampleSize::BoxType() const { return FOURCC_stsz; }
-
777 
-
778 bool SampleSize::ReadWriteInternal(BoxBuffer* buffer) {
-
779  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
780  buffer->ReadWriteUInt32(&sample_size) &&
-
781  buffer->ReadWriteUInt32(&sample_count));
-
782 
-
783  if (sample_size == 0) {
-
784  if (buffer->Reading())
-
785  sizes.resize(sample_count);
-
786  else
-
787  DCHECK(sample_count == sizes.size());
-
788  for (uint32_t i = 0; i < sample_count; ++i)
-
789  RCHECK(buffer->ReadWriteUInt32(&sizes[i]));
-
790  }
-
791  return true;
-
792 }
-
793 
-
794 uint32_t SampleSize::ComputeSizeInternal() {
-
795  return HeaderSize() + sizeof(sample_size) + sizeof(sample_count) +
-
796  (sample_size == 0 ? sizeof(uint32_t) * sizes.size() : 0);
-
797 }
-
798 
-
799 CompactSampleSize::CompactSampleSize() : field_size(0) {}
-
800 CompactSampleSize::~CompactSampleSize() {}
-
801 FourCC CompactSampleSize::BoxType() const { return FOURCC_stz2; }
-
802 
-
803 bool CompactSampleSize::ReadWriteInternal(BoxBuffer* buffer) {
-
804  uint32_t sample_count = sizes.size();
-
805  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
806  buffer->IgnoreBytes(3) &&
-
807  buffer->ReadWriteUInt8(&field_size) &&
-
808  buffer->ReadWriteUInt32(&sample_count));
-
809 
-
810  // Reserve one more entry if field size is 4 bits.
-
811  sizes.resize(sample_count + (field_size == 4 ? 1 : 0), 0);
-
812  switch (field_size) {
-
813  case 4:
-
814  for (uint32_t i = 0; i < sample_count; i += 2) {
-
815  if (buffer->Reading()) {
-
816  uint8_t size = 0;
-
817  RCHECK(buffer->ReadWriteUInt8(&size));
-
818  sizes[i] = size >> 4;
-
819  sizes[i + 1] = size & 0x0F;
-
820  } else {
-
821  DCHECK_LT(sizes[i], 16u);
-
822  DCHECK_LT(sizes[i + 1], 16u);
-
823  uint8_t size = (sizes[i] << 4) | sizes[i + 1];
-
824  RCHECK(buffer->ReadWriteUInt8(&size));
-
825  }
-
826  }
-
827  break;
-
828  case 8:
-
829  for (uint32_t i = 0; i < sample_count; ++i) {
-
830  uint8_t size = sizes[i];
-
831  RCHECK(buffer->ReadWriteUInt8(&size));
-
832  sizes[i] = size;
-
833  }
-
834  break;
-
835  case 16:
-
836  for (uint32_t i = 0; i < sample_count; ++i) {
-
837  uint16_t size = sizes[i];
-
838  RCHECK(buffer->ReadWriteUInt16(&size));
-
839  sizes[i] = size;
-
840  }
-
841  break;
-
842  default:
-
843  RCHECK(false);
-
844  }
-
845  sizes.resize(sample_count);
-
846  return true;
-
847 }
-
848 
-
849 uint32_t CompactSampleSize::ComputeSizeInternal() {
-
850  return HeaderSize() + sizeof(uint32_t) + sizeof(uint32_t) +
-
851  (field_size * sizes.size() + 7) / 8;
-
852 }
-
853 
-
854 ChunkOffset::ChunkOffset() {}
-
855 ChunkOffset::~ChunkOffset() {}
-
856 FourCC ChunkOffset::BoxType() const { return FOURCC_stco; }
-
857 
-
858 bool ChunkOffset::ReadWriteInternal(BoxBuffer* buffer) {
-
859  uint32_t count = offsets.size();
-
860  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
861  buffer->ReadWriteUInt32(&count));
-
862 
-
863  offsets.resize(count);
-
864  for (uint32_t i = 0; i < count; ++i)
-
865  RCHECK(buffer->ReadWriteUInt64NBytes(&offsets[i], sizeof(uint32_t)));
-
866  return true;
-
867 }
-
868 
-
869 uint32_t ChunkOffset::ComputeSizeInternal() {
-
870  return HeaderSize() + sizeof(uint32_t) + sizeof(uint32_t) * offsets.size();
-
871 }
-
872 
-
873 ChunkLargeOffset::ChunkLargeOffset() {}
-
874 ChunkLargeOffset::~ChunkLargeOffset() {}
-
875 FourCC ChunkLargeOffset::BoxType() const { return FOURCC_co64; }
-
876 
-
877 bool ChunkLargeOffset::ReadWriteInternal(BoxBuffer* buffer) {
-
878  uint32_t count = offsets.size();
-
879 
-
880  if (!buffer->Reading()) {
-
881  // Switch to ChunkOffset box if it is able to fit in 32 bits offset.
-
882  if (count == 0 || IsFitIn32Bits(offsets[count - 1])) {
-
883  ChunkOffset stco;
-
884  stco.offsets.swap(offsets);
-
885  DCHECK(buffer->writer());
-
886  stco.Write(buffer->writer());
-
887  stco.offsets.swap(offsets);
-
888  return true;
-
889  }
-
890  }
-
891 
-
892  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
893  buffer->ReadWriteUInt32(&count));
-
894 
-
895  offsets.resize(count);
-
896  for (uint32_t i = 0; i < count; ++i)
-
897  RCHECK(buffer->ReadWriteUInt64(&offsets[i]));
-
898  return true;
-
899 }
-
900 
-
901 uint32_t ChunkLargeOffset::ComputeSizeInternal() {
-
902  uint32_t count = offsets.size();
-
903  int use_large_offset =
-
904  (count > 0 && !IsFitIn32Bits(offsets[count - 1])) ? 1 : 0;
-
905  return HeaderSize() + sizeof(count) +
-
906  sizeof(uint32_t) * (1 + use_large_offset) * offsets.size();
-
907 }
-
908 
-
909 SyncSample::SyncSample() {}
-
910 SyncSample::~SyncSample() {}
-
911 FourCC SyncSample::BoxType() const { return FOURCC_stss; }
-
912 
-
913 bool SyncSample::ReadWriteInternal(BoxBuffer* buffer) {
-
914  uint32_t count = sample_number.size();
-
915  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
916  buffer->ReadWriteUInt32(&count));
-
917 
-
918  sample_number.resize(count);
-
919  for (uint32_t i = 0; i < count; ++i)
-
920  RCHECK(buffer->ReadWriteUInt32(&sample_number[i]));
-
921  return true;
-
922 }
-
923 
-
924 uint32_t SyncSample::ComputeSizeInternal() {
-
925  // Sync sample box is optional. Skip it if it is empty.
-
926  if (sample_number.empty())
-
927  return 0;
-
928  return HeaderSize() + sizeof(uint32_t) +
-
929  sizeof(uint32_t) * sample_number.size();
-
930 }
-
931 
-
932 CencSampleEncryptionInfoEntry::CencSampleEncryptionInfoEntry()
-
933  : is_protected(0),
-
934  per_sample_iv_size(0),
-
935  crypt_byte_block(0),
-
936  skip_byte_block(0) {}
-
937 CencSampleEncryptionInfoEntry::~CencSampleEncryptionInfoEntry() {};
-
938 
-
939 bool CencSampleEncryptionInfoEntry::ReadWrite(BoxBuffer* buffer) {
-
940  if (!buffer->Reading()) {
-
941  if (key_id.size() != kCencKeyIdSize) {
-
942  LOG(WARNING) << "CENC defines key id length of " << kCencKeyIdSize
-
943  << " bytes; got " << key_id.size()
-
944  << ". Resized accordingly.";
-
945  key_id.resize(kCencKeyIdSize);
-
946  }
-
947  RCHECK(crypt_byte_block < 16 && skip_byte_block < 16);
-
948  }
-
949 
-
950  RCHECK(buffer->IgnoreBytes(1)); // reserved.
-
951 
-
952  uint8_t pattern = crypt_byte_block << 4 | skip_byte_block;
-
953  RCHECK(buffer->ReadWriteUInt8(&pattern));
-
954  crypt_byte_block = pattern >> 4;
-
955  skip_byte_block = pattern & 0x0F;
-
956 
-
957  RCHECK(buffer->ReadWriteUInt8(&is_protected) &&
-
958  buffer->ReadWriteUInt8(&per_sample_iv_size) &&
-
959  buffer->ReadWriteVector(&key_id, kCencKeyIdSize));
-
960 
-
961  if (is_protected == 1) {
-
962  if (per_sample_iv_size == 0) { // For constant iv.
-
963  uint8_t constant_iv_size = constant_iv.size();
-
964  RCHECK(buffer->ReadWriteUInt8(&constant_iv_size));
-
965  RCHECK(constant_iv_size == 8 || constant_iv_size == 16);
-
966  RCHECK(buffer->ReadWriteVector(&constant_iv, constant_iv_size));
-
967  } else {
-
968  RCHECK(per_sample_iv_size == 8 || per_sample_iv_size == 16);
-
969  DCHECK(constant_iv.empty());
-
970  }
-
971  } else {
-
972  // Expect |is_protected| to be 0, i.e. not protected. Other values of
-
973  // |is_protected| is not supported.
-
974  RCHECK(is_protected == 0);
-
975  RCHECK(per_sample_iv_size == 0);
-
976  }
-
977  return true;
-
978 }
-
979 
-
980 uint32_t CencSampleEncryptionInfoEntry::ComputeSize() const {
-
981  return sizeof(uint32_t) + kCencKeyIdSize +
-
982  (constant_iv.empty() ? 0 : (sizeof(uint8_t) + constant_iv.size()));
-
983 }
-
984 
-
985 AudioRollRecoveryEntry::AudioRollRecoveryEntry(): roll_distance(0) {}
-
986 AudioRollRecoveryEntry::~AudioRollRecoveryEntry() {}
-
987 
-
988 bool AudioRollRecoveryEntry::ReadWrite(BoxBuffer* buffer) {
-
989  RCHECK(buffer->ReadWriteInt16(&roll_distance));
-
990  return true;
-
991 }
-
992 
-
993 uint32_t AudioRollRecoveryEntry::ComputeSize() const {
-
994  return sizeof(roll_distance);
-
995 }
-
996 
-
997 SampleGroupDescription::SampleGroupDescription() : grouping_type(0) {}
-
998 SampleGroupDescription::~SampleGroupDescription() {}
-
999 FourCC SampleGroupDescription::BoxType() const { return FOURCC_sgpd; }
-
1000 
-
1001 bool SampleGroupDescription::ReadWriteInternal(BoxBuffer* buffer) {
-
1002  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1003  buffer->ReadWriteUInt32(&grouping_type));
-
1004 
-
1005  switch (grouping_type) {
-
1006  case FOURCC_seig:
-
1007  return ReadWriteEntries(buffer, &cenc_sample_encryption_info_entries);
-
1008  case FOURCC_roll:
-
1009  return ReadWriteEntries(buffer, &audio_roll_recovery_entries);
-
1010  default:
-
1011  DCHECK(buffer->Reading());
-
1012  DLOG(WARNING) << "Ignore unsupported sample group: "
-
1013  << FourCCToString(static_cast<FourCC>(grouping_type));
-
1014  return true;
-
1015  }
-
1016 }
-
1017 
-
1018 template <typename T>
-
1019 bool SampleGroupDescription::ReadWriteEntries(BoxBuffer* buffer,
-
1020  std::vector<T>* entries) {
-
1021  uint32_t default_length = 0;
-
1022  if (!buffer->Reading()) {
-
1023  DCHECK(!entries->empty());
-
1024  default_length = (*entries)[0].ComputeSize();
-
1025  DCHECK_NE(default_length, 0u);
-
1026  }
-
1027  if (version == 1)
-
1028  RCHECK(buffer->ReadWriteUInt32(&default_length));
-
1029  if (version >= 2) {
-
1030  NOTIMPLEMENTED() << "Unsupported SampleGroupDescriptionBox 'sgpd' version "
-
1031  << static_cast<int>(version);
-
1032  return false;
-
1033  }
-
1034 
-
1035  uint32_t count = entries->size();
-
1036  RCHECK(buffer->ReadWriteUInt32(&count));
-
1037  RCHECK(count != 0);
-
1038  entries->resize(count);
-
1039 
-
1040  for (T& entry : *entries) {
-
1041  if (version == 1) {
-
1042  uint32_t description_length = default_length;
-
1043  if (buffer->Reading() && default_length == 0)
-
1044  RCHECK(buffer->ReadWriteUInt32(&description_length));
-
1045  RCHECK(entry.ReadWrite(buffer));
-
1046  RCHECK(entry.ComputeSize() == description_length);
-
1047  } else {
-
1048  RCHECK(entry.ReadWrite(buffer));
-
1049  }
-
1050  }
-
1051  return true;
-
1052 }
-
1053 
-
1054 uint32_t SampleGroupDescription::ComputeSizeInternal() {
-
1055  // Version 0 is obsoleted, so always generate version 1 box.
-
1056  version = 1;
-
1057  size_t entries_size = 0;
-
1058  switch (grouping_type) {
-
1059  case FOURCC_seig:
-
1060  for (const auto& entry : cenc_sample_encryption_info_entries)
-
1061  entries_size += entry.ComputeSize();
-
1062  break;
-
1063  case FOURCC_roll:
-
1064  for (const auto& entry : audio_roll_recovery_entries)
-
1065  entries_size += entry.ComputeSize();
-
1066  break;
-
1067  }
-
1068  // This box is optional. Skip it if it is not used.
-
1069  if (entries_size == 0)
-
1070  return 0;
-
1071  return HeaderSize() + sizeof(grouping_type) +
-
1072  (version == 1 ? sizeof(uint32_t) : 0) + sizeof(uint32_t) +
-
1073  entries_size;
-
1074 }
-
1075 
-
1076 SampleToGroup::SampleToGroup() : grouping_type(0), grouping_type_parameter(0) {}
-
1077 SampleToGroup::~SampleToGroup() {}
-
1078 FourCC SampleToGroup::BoxType() const { return FOURCC_sbgp; }
-
1079 
-
1080 bool SampleToGroup::ReadWriteInternal(BoxBuffer* buffer) {
-
1081  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1082  buffer->ReadWriteUInt32(&grouping_type));
-
1083  if (version == 1)
-
1084  RCHECK(buffer->ReadWriteUInt32(&grouping_type_parameter));
-
1085 
-
1086  if (grouping_type != FOURCC_seig && grouping_type != FOURCC_roll) {
-
1087  DCHECK(buffer->Reading());
-
1088  DLOG(WARNING) << "Ignore unsupported sample group: "
-
1089  << FourCCToString(static_cast<FourCC>(grouping_type));
-
1090  return true;
-
1091  }
-
1092 
-
1093  uint32_t count = entries.size();
-
1094  RCHECK(buffer->ReadWriteUInt32(&count));
-
1095  entries.resize(count);
-
1096  for (uint32_t i = 0; i < count; ++i) {
-
1097  RCHECK(buffer->ReadWriteUInt32(&entries[i].sample_count) &&
-
1098  buffer->ReadWriteUInt32(&entries[i].group_description_index));
-
1099  }
-
1100  return true;
-
1101 }
-
1102 
-
1103 uint32_t SampleToGroup::ComputeSizeInternal() {
-
1104  // This box is optional. Skip it if it is not used.
-
1105  if (entries.empty())
-
1106  return 0;
-
1107  return HeaderSize() + sizeof(grouping_type) +
-
1108  (version == 1 ? sizeof(grouping_type_parameter) : 0) +
-
1109  sizeof(uint32_t) + entries.size() * sizeof(entries[0]);
-
1110 }
-
1111 
-
1112 SampleTable::SampleTable() {}
-
1113 SampleTable::~SampleTable() {}
-
1114 FourCC SampleTable::BoxType() const { return FOURCC_stbl; }
-
1115 
-
1116 bool SampleTable::ReadWriteInternal(BoxBuffer* buffer) {
-
1117  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1118  buffer->PrepareChildren() &&
-
1119  buffer->ReadWriteChild(&description) &&
-
1120  buffer->ReadWriteChild(&decoding_time_to_sample) &&
-
1121  buffer->TryReadWriteChild(&composition_time_to_sample) &&
-
1122  buffer->ReadWriteChild(&sample_to_chunk));
-
1123 
-
1124  if (buffer->Reading()) {
-
1125  BoxReader* reader = buffer->reader();
-
1126  DCHECK(reader);
-
1127 
-
1128  // Either SampleSize or CompactSampleSize must present.
-
1129  if (reader->ChildExist(&sample_size)) {
-
1130  RCHECK(reader->ReadChild(&sample_size));
-
1131  } else {
-
1132  CompactSampleSize compact_sample_size;
-
1133  RCHECK(reader->ReadChild(&compact_sample_size));
-
1134  sample_size.sample_size = 0;
-
1135  sample_size.sample_count = compact_sample_size.sizes.size();
-
1136  sample_size.sizes.swap(compact_sample_size.sizes);
-
1137  }
-
1138 
-
1139  // Either ChunkOffset or ChunkLargeOffset must present.
-
1140  if (reader->ChildExist(&chunk_large_offset)) {
-
1141  RCHECK(reader->ReadChild(&chunk_large_offset));
-
1142  } else {
-
1143  ChunkOffset chunk_offset;
-
1144  RCHECK(reader->ReadChild(&chunk_offset));
-
1145  chunk_large_offset.offsets.swap(chunk_offset.offsets);
-
1146  }
-
1147  } else {
-
1148  RCHECK(buffer->ReadWriteChild(&sample_size) &&
-
1149  buffer->ReadWriteChild(&chunk_large_offset));
-
1150  }
-
1151  RCHECK(buffer->TryReadWriteChild(&sync_sample));
-
1152  if (buffer->Reading()) {
-
1153  RCHECK(buffer->reader()->TryReadChildren(&sample_group_descriptions) &&
-
1154  buffer->reader()->TryReadChildren(&sample_to_groups));
-
1155  } else {
-
1156  for (auto& sample_group_description : sample_group_descriptions)
-
1157  RCHECK(buffer->ReadWriteChild(&sample_group_description));
-
1158  for (auto& sample_to_group : sample_to_groups)
-
1159  RCHECK(buffer->ReadWriteChild(&sample_to_group));
-
1160  }
-
1161  return true;
-
1162 }
-
1163 
-
1164 uint32_t SampleTable::ComputeSizeInternal() {
-
1165  uint32_t box_size =
-
1166  HeaderSize() + description.ComputeSize() +
-
1167  decoding_time_to_sample.ComputeSize() +
-
1168  composition_time_to_sample.ComputeSize() + sample_to_chunk.ComputeSize() +
-
1169  sample_size.ComputeSize() + chunk_large_offset.ComputeSize() +
-
1170  sync_sample.ComputeSize();
-
1171  for (auto& sample_group_description : sample_group_descriptions)
-
1172  box_size += sample_group_description.ComputeSize();
-
1173  for (auto& sample_to_group : sample_to_groups)
-
1174  box_size += sample_to_group.ComputeSize();
-
1175  return box_size;
-
1176 }
-
1177 
-
1178 EditList::EditList() {}
-
1179 EditList::~EditList() {}
-
1180 FourCC EditList::BoxType() const { return FOURCC_elst; }
-
1181 
-
1182 bool EditList::ReadWriteInternal(BoxBuffer* buffer) {
-
1183  uint32_t count = edits.size();
-
1184  RCHECK(ReadWriteHeaderInternal(buffer) && buffer->ReadWriteUInt32(&count));
-
1185  edits.resize(count);
-
1186 
-
1187  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
-
1188  for (uint32_t i = 0; i < count; ++i) {
-
1189  RCHECK(
-
1190  buffer->ReadWriteUInt64NBytes(&edits[i].segment_duration, num_bytes) &&
-
1191  buffer->ReadWriteInt64NBytes(&edits[i].media_time, num_bytes) &&
-
1192  buffer->ReadWriteInt16(&edits[i].media_rate_integer) &&
-
1193  buffer->ReadWriteInt16(&edits[i].media_rate_fraction));
-
1194  }
-
1195  return true;
-
1196 }
-
1197 
-
1198 uint32_t EditList::ComputeSizeInternal() {
-
1199  // EditList box is optional. Skip it if it is empty.
-
1200  if (edits.empty())
-
1201  return 0;
-
1202 
-
1203  version = 0;
-
1204  for (uint32_t i = 0; i < edits.size(); ++i) {
-
1205  if (!IsFitIn32Bits(edits[i].segment_duration, edits[i].media_time)) {
-
1206  version = 1;
-
1207  break;
-
1208  }
-
1209  }
-
1210  return HeaderSize() + sizeof(uint32_t) +
-
1211  (sizeof(uint32_t) * (1 + version) * 2 + sizeof(int16_t) * 2) *
-
1212  edits.size();
-
1213 }
-
1214 
-
1215 Edit::Edit() {}
-
1216 Edit::~Edit() {}
-
1217 FourCC Edit::BoxType() const { return FOURCC_edts; }
-
1218 
-
1219 bool Edit::ReadWriteInternal(BoxBuffer* buffer) {
-
1220  return ReadWriteHeaderInternal(buffer) &&
-
1221  buffer->PrepareChildren() &&
-
1222  buffer->ReadWriteChild(&list);
-
1223 }
-
1224 
-
1225 uint32_t Edit::ComputeSizeInternal() {
-
1226  // Edit box is optional. Skip it if it is empty.
-
1227  if (list.edits.empty())
-
1228  return 0;
-
1229  return HeaderSize() + list.ComputeSize();
-
1230 }
-
1231 
-
1232 HandlerReference::HandlerReference() : handler_type(FOURCC_NULL) {}
-
1233 HandlerReference::~HandlerReference() {}
-
1234 FourCC HandlerReference::BoxType() const { return FOURCC_hdlr; }
-
1235 
-
1236 bool HandlerReference::ReadWriteInternal(BoxBuffer* buffer) {
-
1237  std::vector<uint8_t> handler_name;
-
1238  if (!buffer->Reading()) {
-
1239  switch (handler_type) {
-
1240  case FOURCC_vide:
-
1241  handler_name.assign(kVideoHandlerName,
-
1242  kVideoHandlerName + arraysize(kVideoHandlerName));
-
1243  break;
-
1244  case FOURCC_soun:
-
1245  handler_name.assign(kAudioHandlerName,
-
1246  kAudioHandlerName + arraysize(kAudioHandlerName));
-
1247  break;
-
1248  case FOURCC_text:
-
1249  handler_name.assign(kTextHandlerName,
-
1250  kTextHandlerName + arraysize(kTextHandlerName));
-
1251  break;
-
1252  case FOURCC_ID32:
-
1253  break;
-
1254  default:
-
1255  NOTIMPLEMENTED();
-
1256  return false;
-
1257  }
-
1258  }
-
1259  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1260  buffer->IgnoreBytes(4) && // predefined.
-
1261  buffer->ReadWriteFourCC(&handler_type));
-
1262  if (!buffer->Reading()) {
-
1263  RCHECK(buffer->IgnoreBytes(12) && // reserved.
-
1264  buffer->ReadWriteVector(&handler_name, handler_name.size()));
-
1265  }
-
1266  return true;
-
1267 }
-
1268 
-
1269 uint32_t HandlerReference::ComputeSizeInternal() {
-
1270  uint32_t box_size = HeaderSize() + kFourCCSize + 16; // 16 bytes Reserved
-
1271  switch (handler_type) {
-
1272  case FOURCC_vide:
-
1273  box_size += sizeof(kVideoHandlerName);
-
1274  break;
-
1275  case FOURCC_soun:
-
1276  box_size += sizeof(kAudioHandlerName);
-
1277  break;
-
1278  case FOURCC_text:
-
1279  box_size += sizeof(kTextHandlerName);
-
1280  break;
-
1281  case FOURCC_ID32:
-
1282  break;
-
1283  default:
-
1284  NOTIMPLEMENTED();
-
1285  }
-
1286  return box_size;
-
1287 }
-
1288 
-
1289 bool Language::ReadWrite(BoxBuffer* buffer) {
-
1290  if (buffer->Reading()) {
-
1291  // Read language codes into temp first then use BitReader to read the
-
1292  // values. ISO-639-2/T language code: unsigned int(5)[3] language (2 bytes).
-
1293  std::vector<uint8_t> temp;
-
1294  RCHECK(buffer->ReadWriteVector(&temp, 2));
-
1295 
-
1296  BitReader bit_reader(&temp[0], 2);
-
1297  bit_reader.SkipBits(1);
-
1298  char language[3];
-
1299  for (int i = 0; i < 3; ++i) {
-
1300  CHECK(bit_reader.ReadBits(5, &language[i]));
-
1301  language[i] += 0x60;
-
1302  }
-
1303  code.assign(language, 3);
-
1304  } else {
-
1305  // Set up default language if it is not set.
-
1306  const char kUndefinedLanguage[] = "und";
-
1307  if (code.empty())
-
1308  code = kUndefinedLanguage;
-
1309  DCHECK_EQ(code.size(), 3u);
-
1310 
-
1311  // Lang format: bit(1) pad, unsigned int(5)[3] language.
-
1312  uint16_t lang = 0;
-
1313  for (int i = 0; i < 3; ++i)
-
1314  lang |= (code[i] - 0x60) << ((2 - i) * 5);
-
1315  RCHECK(buffer->ReadWriteUInt16(&lang));
-
1316  }
-
1317  return true;
-
1318 }
-
1319 
-
1320 uint32_t Language::ComputeSize() const {
-
1321  // ISO-639-2/T language code: unsigned int(5)[3] language (2 bytes).
-
1322  return 2;
-
1323 }
-
1324 
-
1325 bool PrivFrame::ReadWrite(BoxBuffer* buffer) {
-
1326  FourCC fourcc = FOURCC_PRIV;
-
1327  RCHECK(buffer->ReadWriteFourCC(&fourcc));
-
1328  if (fourcc != FOURCC_PRIV) {
-
1329  VLOG(1) << "Skip unrecognized id3 frame during read: "
-
1330  << FourCCToString(fourcc);
-
1331  return true;
-
1332  }
-
1333 
-
1334  uint32_t frame_size = owner.size() + 1 + value.size();
-
1335  // size should be encoded as synchsafe integer, which is not support here.
-
1336  // We don't expect frame_size to be larger than 0x7F. Synchsafe integers less
-
1337  // than 0x7F is encoded in the same way as normal integer.
-
1338  DCHECK_LT(frame_size, 0x7Fu);
-
1339  uint16_t flags = 0;
-
1340  RCHECK(buffer->ReadWriteUInt32(&frame_size) &&
-
1341  buffer->ReadWriteUInt16(&flags));
-
1342 
-
1343  if (buffer->Reading()) {
-
1344  std::string str;
-
1345  RCHECK(buffer->ReadWriteString(&str, frame_size));
-
1346  // |owner| is null terminated.
-
1347  size_t pos = str.find('\0');
-
1348  RCHECK(pos < str.size());
-
1349  owner = str.substr(0, pos);
-
1350  value = str.substr(pos + 1);
-
1351  } else {
-
1352  uint8_t byte = 0; // Null terminating byte between owner and value.
-
1353  RCHECK(buffer->ReadWriteString(&owner, owner.size()) &&
-
1354  buffer->ReadWriteUInt8(&byte) &&
-
1355  buffer->ReadWriteString(&value, value.size()));
-
1356  }
-
1357  return true;
-
1358 }
-
1359 
-
1360 uint32_t PrivFrame::ComputeSize() const {
-
1361  if (owner.empty() && value.empty())
-
1362  return 0;
-
1363  const uint32_t kFourCCSize = 4;
-
1364  return kFourCCSize + sizeof(uint32_t) + sizeof(uint16_t) + owner.size() + 1 +
-
1365  value.size();
-
1366 }
-
1367 
-
1368 ID3v2::ID3v2() {}
-
1369 ID3v2::~ID3v2() {}
-
1370 
-
1371 FourCC ID3v2::BoxType() const { return FOURCC_ID32; }
-
1372 
-
1373 bool ID3v2::ReadWriteInternal(BoxBuffer* buffer) {
-
1374  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1375  language.ReadWrite(buffer));
-
1376 
-
1377  // Read/Write ID3v2 header
-
1378  std::string id3v2_identifier = kID3v2Identifier;
-
1379  uint16_t version = kID3v2Version;
-
1380  // We only support PrivateFrame in ID3.
-
1381  uint32_t data_size = private_frame.ComputeSize();
-
1382  // size should be encoded as synchsafe integer, which is not support here.
-
1383  // We don't expect data_size to be larger than 0x7F. Synchsafe integers less
-
1384  // than 0x7F is encoded in the same way as normal integer.
-
1385  DCHECK_LT(data_size, 0x7Fu);
-
1386  uint8_t flags = 0;
-
1387  RCHECK(buffer->ReadWriteString(&id3v2_identifier, id3v2_identifier.size()) &&
-
1388  buffer->ReadWriteUInt16(&version) &&
-
1389  buffer->ReadWriteUInt8(&flags) &&
-
1390  buffer->ReadWriteUInt32(&data_size));
-
1391 
-
1392  RCHECK(private_frame.ReadWrite(buffer));
-
1393  return true;
-
1394 }
-
1395 
-
1396 uint32_t ID3v2::ComputeSizeInternal() {
-
1397  uint32_t private_frame_size = private_frame.ComputeSize();
-
1398  // Skip ID3v2 box generation if there is no private frame.
-
1399  return private_frame_size == 0 ? 0 : HeaderSize() + language.ComputeSize() +
-
1400  kID3v2HeaderSize +
-
1401  private_frame_size;
-
1402 }
-
1403 
-
1404 Metadata::Metadata() {}
-
1405 Metadata::~Metadata() {}
-
1406 
-
1407 FourCC Metadata::BoxType() const {
-
1408  return FOURCC_meta;
-
1409 }
-
1410 
-
1411 bool Metadata::ReadWriteInternal(BoxBuffer* buffer) {
-
1412  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1413  buffer->PrepareChildren() &&
-
1414  buffer->ReadWriteChild(&handler) &&
-
1415  buffer->TryReadWriteChild(&id3v2));
-
1416  return true;
-
1417 }
-
1418 
-
1419 uint32_t Metadata::ComputeSizeInternal() {
-
1420  uint32_t id3v2_size = id3v2.ComputeSize();
-
1421  // Skip metadata box generation if there is no metadata box.
-
1422  return id3v2_size == 0 ? 0
-
1423  : HeaderSize() + handler.ComputeSize() + id3v2_size;
-
1424 }
-
1425 
-
1426 CodecConfiguration::CodecConfiguration() : box_type(FOURCC_NULL) {}
-
1427 CodecConfiguration::~CodecConfiguration() {}
-
1428 
- -
1430  // CodecConfiguration box should be parsed according to format recovered in
-
1431  // VideoSampleEntry. |box_type| is determined dynamically there.
-
1432  return box_type;
-
1433 }
-
1434 
-
1435 bool CodecConfiguration::ReadWriteInternal(BoxBuffer* buffer) {
-
1436  DCHECK_NE(box_type, FOURCC_NULL);
-
1437  RCHECK(ReadWriteHeaderInternal(buffer));
-
1438 
-
1439  // VPCodecConfiguration box inherits from FullBox instead of Box. The extra 4
-
1440  // bytes are handled here.
-
1441  if (box_type == FOURCC_vpcC) {
-
1442  uint32_t version_flags = 0;
-
1443  RCHECK(buffer->ReadWriteUInt32(&version_flags));
-
1444  RCHECK(version_flags == 0);
-
1445  }
-
1446 
-
1447  if (buffer->Reading()) {
-
1448  RCHECK(buffer->ReadWriteVector(&data, buffer->BytesLeft()));
-
1449  } else {
-
1450  RCHECK(buffer->ReadWriteVector(&data, data.size()));
-
1451  }
-
1452  return true;
-
1453 }
-
1454 
-
1455 uint32_t CodecConfiguration::ComputeSizeInternal() {
-
1456  if (data.empty())
-
1457  return 0;
-
1458  DCHECK_NE(box_type, FOURCC_NULL);
-
1459  return HeaderSize() + (box_type == FOURCC_vpcC ? 4 : 0) + data.size();
-
1460 }
-
1461 
-
1462 PixelAspectRatio::PixelAspectRatio() : h_spacing(0), v_spacing(0) {}
-
1463 PixelAspectRatio::~PixelAspectRatio() {}
-
1464 FourCC PixelAspectRatio::BoxType() const { return FOURCC_pasp; }
-
1465 
-
1466 bool PixelAspectRatio::ReadWriteInternal(BoxBuffer* buffer) {
-
1467  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1468  buffer->ReadWriteUInt32(&h_spacing) &&
-
1469  buffer->ReadWriteUInt32(&v_spacing));
-
1470  return true;
-
1471 }
-
1472 
-
1473 uint32_t PixelAspectRatio::ComputeSizeInternal() {
-
1474  // This box is optional. Skip it if it is not initialized.
-
1475  if (h_spacing == 0 && v_spacing == 0)
-
1476  return 0;
-
1477  // Both values must be positive.
-
1478  DCHECK(h_spacing != 0 && v_spacing != 0);
-
1479  return HeaderSize() + sizeof(h_spacing) + sizeof(v_spacing);
-
1480 }
-
1481 
-
1482 VideoSampleEntry::VideoSampleEntry()
-
1483  : format(FOURCC_NULL), data_reference_index(1), width(0), height(0) {}
-
1484 
-
1485 VideoSampleEntry::~VideoSampleEntry() {}
- -
1487  if (format == FOURCC_NULL) {
-
1488  LOG(ERROR) << "VideoSampleEntry should be parsed according to the "
-
1489  << "handler type recovered in its Media ancestor.";
-
1490  }
-
1491  return format;
-
1492 }
-
1493 
-
1494 bool VideoSampleEntry::ReadWriteInternal(BoxBuffer* buffer) {
-
1495  std::vector<uint8_t> compressor_name;
-
1496  if (buffer->Reading()) {
-
1497  DCHECK(buffer->reader());
-
1498  format = buffer->reader()->type();
-
1499  } else {
-
1500  RCHECK(ReadWriteHeaderInternal(buffer));
-
1501 
-
1502  const FourCC actual_format = GetActualFormat();
-
1503  switch (actual_format) {
-
1504  case FOURCC_avc1:
-
1505  compressor_name.assign(
-
1506  kAvcCompressorName,
-
1507  kAvcCompressorName + arraysize(kAvcCompressorName));
-
1508  break;
-
1509  case FOURCC_hev1:
-
1510  case FOURCC_hvc1:
-
1511  compressor_name.assign(
-
1512  kHevcCompressorName,
-
1513  kHevcCompressorName + arraysize(kHevcCompressorName));
-
1514  break;
-
1515  case FOURCC_vp08:
-
1516  case FOURCC_vp09:
-
1517  case FOURCC_vp10:
-
1518  compressor_name.assign(
-
1519  kVpcCompressorName,
-
1520  kVpcCompressorName + arraysize(kVpcCompressorName));
-
1521  break;
-
1522  default:
-
1523  LOG(ERROR) << FourCCToString(actual_format) << " is not supported.";
-
1524  return false;
-
1525  }
-
1526  compressor_name.resize(kCompressorNameSize);
-
1527  }
-
1528 
-
1529  uint32_t video_resolution = kVideoResolution;
-
1530  uint16_t video_frame_count = kVideoFrameCount;
-
1531  uint16_t video_depth = kVideoDepth;
-
1532  int16_t predefined = -1;
-
1533  RCHECK(buffer->IgnoreBytes(6) && // reserved.
-
1534  buffer->ReadWriteUInt16(&data_reference_index) &&
-
1535  buffer->IgnoreBytes(16) && // predefined 0.
-
1536  buffer->ReadWriteUInt16(&width) &&
-
1537  buffer->ReadWriteUInt16(&height) &&
-
1538  buffer->ReadWriteUInt32(&video_resolution) &&
+
442  uint8_t default_constant_iv_size =
+
443  static_cast<uint8_t>(default_constant_iv.size());
+
444  RCHECK(buffer->ReadWriteUInt8(&default_constant_iv_size));
+
445  RCHECK(default_constant_iv_size == 8 || default_constant_iv_size == 16);
+
446  RCHECK(buffer->ReadWriteVector(&default_constant_iv,
+
447  default_constant_iv_size));
+
448  } else {
+
449  RCHECK(default_per_sample_iv_size == 8 ||
+
450  default_per_sample_iv_size == 16);
+
451  RCHECK(default_constant_iv.empty());
+
452  }
+
453  } else {
+
454  // Expect |default_is_protected| to be 0, i.e. not protected. Other values
+
455  // of |default_is_protected| is not supported.
+
456  RCHECK(default_is_protected == 0);
+
457  RCHECK(default_per_sample_iv_size == 0);
+
458  RCHECK(default_constant_iv.empty());
+
459  }
+
460  return true;
+
461 }
+
462 
+
463 uint32_t TrackEncryption::ComputeSizeInternal() {
+
464  return HeaderSize() + sizeof(uint32_t) + kCencKeyIdSize +
+
465  (default_constant_iv.empty() ? 0 : (sizeof(uint8_t) +
+
466  default_constant_iv.size()));
+
467 }
+
468 
+
469 SchemeInfo::SchemeInfo() {}
+
470 SchemeInfo::~SchemeInfo() {}
+
471 FourCC SchemeInfo::BoxType() const { return FOURCC_schi; }
+
472 
+
473 bool SchemeInfo::ReadWriteInternal(BoxBuffer* buffer) {
+
474  RCHECK(ReadWriteHeaderInternal(buffer) && buffer->PrepareChildren() &&
+
475  buffer->ReadWriteChild(&track_encryption));
+
476  return true;
+
477 }
+
478 
+
479 uint32_t SchemeInfo::ComputeSizeInternal() {
+
480  return HeaderSize() + track_encryption.ComputeSize();
+
481 }
+
482 
+
483 ProtectionSchemeInfo::ProtectionSchemeInfo() {}
+
484 ProtectionSchemeInfo::~ProtectionSchemeInfo() {}
+
485 FourCC ProtectionSchemeInfo::BoxType() const { return FOURCC_sinf; }
+
486 
+
487 bool ProtectionSchemeInfo::ReadWriteInternal(BoxBuffer* buffer) {
+
488  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
489  buffer->PrepareChildren() &&
+
490  buffer->ReadWriteChild(&format) &&
+
491  buffer->ReadWriteChild(&type));
+
492  if (IsProtectionSchemeSupported(type.type)) {
+
493  RCHECK(buffer->ReadWriteChild(&info));
+
494  } else {
+
495  DLOG(WARNING) << "Ignore unsupported protection scheme: "
+
496  << FourCCToString(type.type);
+
497  }
+
498  // Other protection schemes are silently ignored. Since the protection scheme
+
499  // type can't be determined until this box is opened, we return 'true' for
+
500  // non-CENC protection scheme types. It is the parent box's responsibility to
+
501  // ensure that this scheme type is a supported one.
+
502  return true;
+
503 }
+
504 
+
505 uint32_t ProtectionSchemeInfo::ComputeSizeInternal() {
+
506  // Skip sinf box if it is not initialized.
+
507  if (format.format == FOURCC_NULL)
+
508  return 0;
+
509  return HeaderSize() + format.ComputeSize() + type.ComputeSize() +
+
510  info.ComputeSize();
+
511 }
+
512 
+
513 MovieHeader::MovieHeader()
+
514  : creation_time(0),
+
515  modification_time(0),
+
516  timescale(0),
+
517  duration(0),
+
518  rate(1 << 16),
+
519  volume(1 << 8),
+
520  next_track_id(0) {}
+
521 MovieHeader::~MovieHeader() {}
+
522 FourCC MovieHeader::BoxType() const { return FOURCC_mvhd; }
+
523 
+
524 bool MovieHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
525  RCHECK(ReadWriteHeaderInternal(buffer));
+
526 
+
527  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
+
528  RCHECK(buffer->ReadWriteUInt64NBytes(&creation_time, num_bytes) &&
+
529  buffer->ReadWriteUInt64NBytes(&modification_time, num_bytes) &&
+
530  buffer->ReadWriteUInt32(&timescale) &&
+
531  buffer->ReadWriteUInt64NBytes(&duration, num_bytes));
+
532 
+
533  std::vector<uint8_t> matrix(kUnityMatrix,
+
534  kUnityMatrix + arraysize(kUnityMatrix));
+
535  RCHECK(buffer->ReadWriteInt32(&rate) &&
+
536  buffer->ReadWriteInt16(&volume) &&
+
537  buffer->IgnoreBytes(10) && // reserved
+
538  buffer->ReadWriteVector(&matrix, matrix.size()) &&
+
539  buffer->IgnoreBytes(24) && // predefined zero
+
540  buffer->ReadWriteUInt32(&next_track_id));
+
541  return true;
+
542 }
+
543 
+
544 uint32_t MovieHeader::ComputeSizeInternal() {
+
545  version = IsFitIn32Bits(creation_time, modification_time, duration) ? 0 : 1;
+
546  return HeaderSize() + sizeof(uint32_t) * (1 + version) * 3 +
+
547  sizeof(timescale) + sizeof(rate) + sizeof(volume) +
+
548  sizeof(next_track_id) + sizeof(kUnityMatrix) + 10 +
+
549  24; // 10 bytes reserved, 24 bytes predefined.
+
550 }
+
551 
+
552 TrackHeader::TrackHeader()
+
553  : creation_time(0),
+
554  modification_time(0),
+
555  track_id(0),
+
556  duration(0),
+
557  layer(0),
+
558  alternate_group(0),
+
559  volume(-1),
+
560  width(0),
+
561  height(0) {
+
562  flags = kTrackEnabled | kTrackInMovie;
+
563 }
+
564 TrackHeader::~TrackHeader() {}
+
565 FourCC TrackHeader::BoxType() const { return FOURCC_tkhd; }
+
566 
+
567 bool TrackHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
568  RCHECK(ReadWriteHeaderInternal(buffer));
+
569 
+
570  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
+
571  RCHECK(buffer->ReadWriteUInt64NBytes(&creation_time, num_bytes) &&
+
572  buffer->ReadWriteUInt64NBytes(&modification_time, num_bytes) &&
+
573  buffer->ReadWriteUInt32(&track_id) &&
+
574  buffer->IgnoreBytes(4) && // reserved
+
575  buffer->ReadWriteUInt64NBytes(&duration, num_bytes));
+
576 
+
577  if (!buffer->Reading()) {
+
578  // Set default value for volume, if track is audio, 0x100 else 0.
+
579  if (volume == -1)
+
580  volume = (width != 0 && height != 0) ? 0 : 0x100;
+
581  }
+
582  std::vector<uint8_t> matrix(kUnityMatrix,
+
583  kUnityMatrix + arraysize(kUnityMatrix));
+
584  RCHECK(buffer->IgnoreBytes(8) && // reserved
+
585  buffer->ReadWriteInt16(&layer) &&
+
586  buffer->ReadWriteInt16(&alternate_group) &&
+
587  buffer->ReadWriteInt16(&volume) &&
+
588  buffer->IgnoreBytes(2) && // reserved
+
589  buffer->ReadWriteVector(&matrix, matrix.size()) &&
+
590  buffer->ReadWriteUInt32(&width) &&
+
591  buffer->ReadWriteUInt32(&height));
+
592  return true;
+
593 }
+
594 
+
595 uint32_t TrackHeader::ComputeSizeInternal() {
+
596  version = IsFitIn32Bits(creation_time, modification_time, duration) ? 0 : 1;
+
597  return HeaderSize() + sizeof(track_id) +
+
598  sizeof(uint32_t) * (1 + version) * 3 + sizeof(layer) +
+
599  sizeof(alternate_group) + sizeof(volume) + sizeof(width) +
+
600  sizeof(height) + sizeof(kUnityMatrix) + 14; // 14 bytes reserved.
+
601 }
+
602 
+
603 SampleDescription::SampleDescription() : type(kInvalid) {}
+
604 SampleDescription::~SampleDescription() {}
+
605 FourCC SampleDescription::BoxType() const { return FOURCC_stsd; }
+
606 
+
607 bool SampleDescription::ReadWriteInternal(BoxBuffer* buffer) {
+
608  uint32_t count = 0;
+
609  switch (type) {
+
610  case kVideo:
+
611  count = video_entries.size();
+
612  break;
+
613  case kAudio:
+
614  count = audio_entries.size();
+
615  break;
+
616  case kText:
+
617  count = text_entries.size();
+
618  break;
+
619  default:
+
620  NOTIMPLEMENTED() << "SampleDecryption type " << type
+
621  << " is not handled. Skipping.";
+
622  }
+
623  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
624  buffer->ReadWriteUInt32(&count));
+
625 
+
626  if (buffer->Reading()) {
+
627  BoxReader* reader = buffer->reader();
+
628  DCHECK(reader);
+
629  video_entries.clear();
+
630  audio_entries.clear();
+
631  // Note: this value is preset before scanning begins. See comments in the
+
632  // Parse(Media*) function.
+
633  if (type == kVideo) {
+
634  RCHECK(reader->ReadAllChildren(&video_entries));
+
635  RCHECK(video_entries.size() == count);
+
636  } else if (type == kAudio) {
+
637  RCHECK(reader->ReadAllChildren(&audio_entries));
+
638  RCHECK(audio_entries.size() == count);
+
639  } else if (type == kText) {
+
640  RCHECK(reader->ReadAllChildren(&text_entries));
+
641  RCHECK(text_entries.size() == count);
+
642  }
+
643  } else {
+
644  DCHECK_LT(0u, count);
+
645  if (type == kVideo) {
+
646  for (uint32_t i = 0; i < count; ++i)
+
647  RCHECK(buffer->ReadWriteChild(&video_entries[i]));
+
648  } else if (type == kAudio) {
+
649  for (uint32_t i = 0; i < count; ++i)
+
650  RCHECK(buffer->ReadWriteChild(&audio_entries[i]));
+
651  } else if (type == kText) {
+
652  for (uint32_t i = 0; i < count; ++i)
+
653  RCHECK(buffer->ReadWriteChild(&text_entries[i]));
+
654  } else {
+
655  NOTIMPLEMENTED();
+
656  }
+
657  }
+
658  return true;
+
659 }
+
660 
+
661 uint32_t SampleDescription::ComputeSizeInternal() {
+
662  uint32_t box_size = HeaderSize() + sizeof(uint32_t);
+
663  if (type == kVideo) {
+
664  for (uint32_t i = 0; i < video_entries.size(); ++i)
+
665  box_size += video_entries[i].ComputeSize();
+
666  } else if (type == kAudio) {
+
667  for (uint32_t i = 0; i < audio_entries.size(); ++i)
+
668  box_size += audio_entries[i].ComputeSize();
+
669  } else if (type == kText) {
+
670  for (uint32_t i = 0; i < text_entries.size(); ++i)
+
671  box_size += text_entries[i].ComputeSize();
+
672  }
+
673  return box_size;
+
674 }
+
675 
+
676 DecodingTimeToSample::DecodingTimeToSample() {}
+
677 DecodingTimeToSample::~DecodingTimeToSample() {}
+
678 FourCC DecodingTimeToSample::BoxType() const { return FOURCC_stts; }
+
679 
+
680 bool DecodingTimeToSample::ReadWriteInternal(BoxBuffer* buffer) {
+
681  uint32_t count = decoding_time.size();
+
682  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
683  buffer->ReadWriteUInt32(&count));
+
684 
+
685  decoding_time.resize(count);
+
686  for (uint32_t i = 0; i < count; ++i) {
+
687  RCHECK(buffer->ReadWriteUInt32(&decoding_time[i].sample_count) &&
+
688  buffer->ReadWriteUInt32(&decoding_time[i].sample_delta));
+
689  }
+
690  return true;
+
691 }
+
692 
+
693 uint32_t DecodingTimeToSample::ComputeSizeInternal() {
+
694  return HeaderSize() + sizeof(uint32_t) +
+
695  sizeof(DecodingTime) * decoding_time.size();
+
696 }
+
697 
+
698 CompositionTimeToSample::CompositionTimeToSample() {}
+
699 CompositionTimeToSample::~CompositionTimeToSample() {}
+
700 FourCC CompositionTimeToSample::BoxType() const { return FOURCC_ctts; }
+
701 
+
702 bool CompositionTimeToSample::ReadWriteInternal(BoxBuffer* buffer) {
+
703  uint32_t count = composition_offset.size();
+
704  if (!buffer->Reading()) {
+
705  // Determine whether version 0 or version 1 should be used.
+
706  // Use version 0 if possible, use version 1 if there is a negative
+
707  // sample_offset value.
+
708  version = 0;
+
709  for (uint32_t i = 0; i < count; ++i) {
+
710  if (composition_offset[i].sample_offset < 0) {
+
711  version = 1;
+
712  break;
+
713  }
+
714  }
+
715  }
+
716 
+
717  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
718  buffer->ReadWriteUInt32(&count));
+
719 
+
720  composition_offset.resize(count);
+
721  for (uint32_t i = 0; i < count; ++i) {
+
722  RCHECK(buffer->ReadWriteUInt32(&composition_offset[i].sample_count));
+
723 
+
724  if (version == 0) {
+
725  uint32_t sample_offset = composition_offset[i].sample_offset;
+
726  RCHECK(buffer->ReadWriteUInt32(&sample_offset));
+
727  composition_offset[i].sample_offset = sample_offset;
+
728  } else {
+
729  int32_t sample_offset = composition_offset[i].sample_offset;
+
730  RCHECK(buffer->ReadWriteInt32(&sample_offset));
+
731  composition_offset[i].sample_offset = sample_offset;
+
732  }
+
733  }
+
734  return true;
+
735 }
+
736 
+
737 uint32_t CompositionTimeToSample::ComputeSizeInternal() {
+
738  // This box is optional. Skip it if it is empty.
+
739  if (composition_offset.empty())
+
740  return 0;
+
741  // Structure CompositionOffset contains |sample_offset| (uint32_t) and
+
742  // |sample_offset| (int64_t). The actual size of |sample_offset| is
+
743  // 4 bytes (uint32_t for version 0 and int32_t for version 1).
+
744  const uint32_t kCompositionOffsetSize = sizeof(uint32_t) * 2;
+
745  return HeaderSize() + sizeof(uint32_t) +
+
746  kCompositionOffsetSize * composition_offset.size();
+
747 }
+
748 
+
749 SampleToChunk::SampleToChunk() {}
+
750 SampleToChunk::~SampleToChunk() {}
+
751 FourCC SampleToChunk::BoxType() const { return FOURCC_stsc; }
+
752 
+
753 bool SampleToChunk::ReadWriteInternal(BoxBuffer* buffer) {
+
754  uint32_t count = chunk_info.size();
+
755  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
756  buffer->ReadWriteUInt32(&count));
+
757 
+
758  chunk_info.resize(count);
+
759  for (uint32_t i = 0; i < count; ++i) {
+
760  RCHECK(buffer->ReadWriteUInt32(&chunk_info[i].first_chunk) &&
+
761  buffer->ReadWriteUInt32(&chunk_info[i].samples_per_chunk) &&
+
762  buffer->ReadWriteUInt32(&chunk_info[i].sample_description_index));
+
763  // first_chunk values are always increasing.
+
764  RCHECK(i == 0 ? chunk_info[i].first_chunk == 1
+
765  : chunk_info[i].first_chunk > chunk_info[i - 1].first_chunk);
+
766  }
+
767  return true;
+
768 }
+
769 
+
770 uint32_t SampleToChunk::ComputeSizeInternal() {
+
771  return HeaderSize() + sizeof(uint32_t) +
+
772  sizeof(ChunkInfo) * chunk_info.size();
+
773 }
+
774 
+
775 SampleSize::SampleSize() : sample_size(0), sample_count(0) {}
+
776 SampleSize::~SampleSize() {}
+
777 FourCC SampleSize::BoxType() const { return FOURCC_stsz; }
+
778 
+
779 bool SampleSize::ReadWriteInternal(BoxBuffer* buffer) {
+
780  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
781  buffer->ReadWriteUInt32(&sample_size) &&
+
782  buffer->ReadWriteUInt32(&sample_count));
+
783 
+
784  if (sample_size == 0) {
+
785  if (buffer->Reading())
+
786  sizes.resize(sample_count);
+
787  else
+
788  DCHECK(sample_count == sizes.size());
+
789  for (uint32_t i = 0; i < sample_count; ++i)
+
790  RCHECK(buffer->ReadWriteUInt32(&sizes[i]));
+
791  }
+
792  return true;
+
793 }
+
794 
+
795 uint32_t SampleSize::ComputeSizeInternal() {
+
796  return HeaderSize() + sizeof(sample_size) + sizeof(sample_count) +
+
797  (sample_size == 0 ? sizeof(uint32_t) * sizes.size() : 0);
+
798 }
+
799 
+
800 CompactSampleSize::CompactSampleSize() : field_size(0) {}
+
801 CompactSampleSize::~CompactSampleSize() {}
+
802 FourCC CompactSampleSize::BoxType() const { return FOURCC_stz2; }
+
803 
+
804 bool CompactSampleSize::ReadWriteInternal(BoxBuffer* buffer) {
+
805  uint32_t sample_count = sizes.size();
+
806  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
807  buffer->IgnoreBytes(3) &&
+
808  buffer->ReadWriteUInt8(&field_size) &&
+
809  buffer->ReadWriteUInt32(&sample_count));
+
810 
+
811  // Reserve one more entry if field size is 4 bits.
+
812  sizes.resize(sample_count + (field_size == 4 ? 1 : 0), 0);
+
813  switch (field_size) {
+
814  case 4:
+
815  for (uint32_t i = 0; i < sample_count; i += 2) {
+
816  if (buffer->Reading()) {
+
817  uint8_t size = 0;
+
818  RCHECK(buffer->ReadWriteUInt8(&size));
+
819  sizes[i] = size >> 4;
+
820  sizes[i + 1] = size & 0x0F;
+
821  } else {
+
822  DCHECK_LT(sizes[i], 16u);
+
823  DCHECK_LT(sizes[i + 1], 16u);
+
824  uint8_t size = (sizes[i] << 4) | sizes[i + 1];
+
825  RCHECK(buffer->ReadWriteUInt8(&size));
+
826  }
+
827  }
+
828  break;
+
829  case 8:
+
830  for (uint32_t i = 0; i < sample_count; ++i) {
+
831  uint8_t size = sizes[i];
+
832  RCHECK(buffer->ReadWriteUInt8(&size));
+
833  sizes[i] = size;
+
834  }
+
835  break;
+
836  case 16:
+
837  for (uint32_t i = 0; i < sample_count; ++i) {
+
838  uint16_t size = sizes[i];
+
839  RCHECK(buffer->ReadWriteUInt16(&size));
+
840  sizes[i] = size;
+
841  }
+
842  break;
+
843  default:
+
844  RCHECK(false);
+
845  }
+
846  sizes.resize(sample_count);
+
847  return true;
+
848 }
+
849 
+
850 uint32_t CompactSampleSize::ComputeSizeInternal() {
+
851  return HeaderSize() + sizeof(uint32_t) + sizeof(uint32_t) +
+
852  (field_size * sizes.size() + 7) / 8;
+
853 }
+
854 
+
855 ChunkOffset::ChunkOffset() {}
+
856 ChunkOffset::~ChunkOffset() {}
+
857 FourCC ChunkOffset::BoxType() const { return FOURCC_stco; }
+
858 
+
859 bool ChunkOffset::ReadWriteInternal(BoxBuffer* buffer) {
+
860  uint32_t count = offsets.size();
+
861  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
862  buffer->ReadWriteUInt32(&count));
+
863 
+
864  offsets.resize(count);
+
865  for (uint32_t i = 0; i < count; ++i)
+
866  RCHECK(buffer->ReadWriteUInt64NBytes(&offsets[i], sizeof(uint32_t)));
+
867  return true;
+
868 }
+
869 
+
870 uint32_t ChunkOffset::ComputeSizeInternal() {
+
871  return HeaderSize() + sizeof(uint32_t) + sizeof(uint32_t) * offsets.size();
+
872 }
+
873 
+
874 ChunkLargeOffset::ChunkLargeOffset() {}
+
875 ChunkLargeOffset::~ChunkLargeOffset() {}
+
876 FourCC ChunkLargeOffset::BoxType() const { return FOURCC_co64; }
+
877 
+
878 bool ChunkLargeOffset::ReadWriteInternal(BoxBuffer* buffer) {
+
879  uint32_t count = offsets.size();
+
880 
+
881  if (!buffer->Reading()) {
+
882  // Switch to ChunkOffset box if it is able to fit in 32 bits offset.
+
883  if (count == 0 || IsFitIn32Bits(offsets[count - 1])) {
+
884  ChunkOffset stco;
+
885  stco.offsets.swap(offsets);
+
886  DCHECK(buffer->writer());
+
887  stco.Write(buffer->writer());
+
888  stco.offsets.swap(offsets);
+
889  return true;
+
890  }
+
891  }
+
892 
+
893  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
894  buffer->ReadWriteUInt32(&count));
+
895 
+
896  offsets.resize(count);
+
897  for (uint32_t i = 0; i < count; ++i)
+
898  RCHECK(buffer->ReadWriteUInt64(&offsets[i]));
+
899  return true;
+
900 }
+
901 
+
902 uint32_t ChunkLargeOffset::ComputeSizeInternal() {
+
903  uint32_t count = offsets.size();
+
904  int use_large_offset =
+
905  (count > 0 && !IsFitIn32Bits(offsets[count - 1])) ? 1 : 0;
+
906  return HeaderSize() + sizeof(count) +
+
907  sizeof(uint32_t) * (1 + use_large_offset) * offsets.size();
+
908 }
+
909 
+
910 SyncSample::SyncSample() {}
+
911 SyncSample::~SyncSample() {}
+
912 FourCC SyncSample::BoxType() const { return FOURCC_stss; }
+
913 
+
914 bool SyncSample::ReadWriteInternal(BoxBuffer* buffer) {
+
915  uint32_t count = sample_number.size();
+
916  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
917  buffer->ReadWriteUInt32(&count));
+
918 
+
919  sample_number.resize(count);
+
920  for (uint32_t i = 0; i < count; ++i)
+
921  RCHECK(buffer->ReadWriteUInt32(&sample_number[i]));
+
922  return true;
+
923 }
+
924 
+
925 uint32_t SyncSample::ComputeSizeInternal() {
+
926  // Sync sample box is optional. Skip it if it is empty.
+
927  if (sample_number.empty())
+
928  return 0;
+
929  return HeaderSize() + sizeof(uint32_t) +
+
930  sizeof(uint32_t) * sample_number.size();
+
931 }
+
932 
+
933 CencSampleEncryptionInfoEntry::CencSampleEncryptionInfoEntry()
+
934  : is_protected(0),
+
935  per_sample_iv_size(0),
+
936  crypt_byte_block(0),
+
937  skip_byte_block(0) {}
+
938 CencSampleEncryptionInfoEntry::~CencSampleEncryptionInfoEntry() {};
+
939 
+
940 bool CencSampleEncryptionInfoEntry::ReadWrite(BoxBuffer* buffer) {
+
941  if (!buffer->Reading()) {
+
942  if (key_id.size() != kCencKeyIdSize) {
+
943  LOG(WARNING) << "CENC defines key id length of " << kCencKeyIdSize
+
944  << " bytes; got " << key_id.size()
+
945  << ". Resized accordingly.";
+
946  key_id.resize(kCencKeyIdSize);
+
947  }
+
948  RCHECK(crypt_byte_block < 16 && skip_byte_block < 16);
+
949  }
+
950 
+
951  RCHECK(buffer->IgnoreBytes(1)); // reserved.
+
952 
+
953  uint8_t pattern = crypt_byte_block << 4 | skip_byte_block;
+
954  RCHECK(buffer->ReadWriteUInt8(&pattern));
+
955  crypt_byte_block = pattern >> 4;
+
956  skip_byte_block = pattern & 0x0F;
+
957 
+
958  RCHECK(buffer->ReadWriteUInt8(&is_protected) &&
+
959  buffer->ReadWriteUInt8(&per_sample_iv_size) &&
+
960  buffer->ReadWriteVector(&key_id, kCencKeyIdSize));
+
961 
+
962  if (is_protected == 1) {
+
963  if (per_sample_iv_size == 0) { // For constant iv.
+
964  uint8_t constant_iv_size = static_cast<uint8_t>(constant_iv.size());
+
965  RCHECK(buffer->ReadWriteUInt8(&constant_iv_size));
+
966  RCHECK(constant_iv_size == 8 || constant_iv_size == 16);
+
967  RCHECK(buffer->ReadWriteVector(&constant_iv, constant_iv_size));
+
968  } else {
+
969  RCHECK(per_sample_iv_size == 8 || per_sample_iv_size == 16);
+
970  DCHECK(constant_iv.empty());
+
971  }
+
972  } else {
+
973  // Expect |is_protected| to be 0, i.e. not protected. Other values of
+
974  // |is_protected| is not supported.
+
975  RCHECK(is_protected == 0);
+
976  RCHECK(per_sample_iv_size == 0);
+
977  }
+
978  return true;
+
979 }
+
980 
+
981 uint32_t CencSampleEncryptionInfoEntry::ComputeSize() const {
+
982  return sizeof(uint32_t) + kCencKeyIdSize +
+
983  (constant_iv.empty() ? 0 : (sizeof(uint8_t) + constant_iv.size()));
+
984 }
+
985 
+
986 AudioRollRecoveryEntry::AudioRollRecoveryEntry(): roll_distance(0) {}
+
987 AudioRollRecoveryEntry::~AudioRollRecoveryEntry() {}
+
988 
+
989 bool AudioRollRecoveryEntry::ReadWrite(BoxBuffer* buffer) {
+
990  RCHECK(buffer->ReadWriteInt16(&roll_distance));
+
991  return true;
+
992 }
+
993 
+
994 uint32_t AudioRollRecoveryEntry::ComputeSize() const {
+
995  return sizeof(roll_distance);
+
996 }
+
997 
+
998 SampleGroupDescription::SampleGroupDescription() : grouping_type(0) {}
+
999 SampleGroupDescription::~SampleGroupDescription() {}
+
1000 FourCC SampleGroupDescription::BoxType() const { return FOURCC_sgpd; }
+
1001 
+
1002 bool SampleGroupDescription::ReadWriteInternal(BoxBuffer* buffer) {
+
1003  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1004  buffer->ReadWriteUInt32(&grouping_type));
+
1005 
+
1006  switch (grouping_type) {
+
1007  case FOURCC_seig:
+
1008  return ReadWriteEntries(buffer, &cenc_sample_encryption_info_entries);
+
1009  case FOURCC_roll:
+
1010  return ReadWriteEntries(buffer, &audio_roll_recovery_entries);
+
1011  default:
+
1012  DCHECK(buffer->Reading());
+
1013  DLOG(WARNING) << "Ignore unsupported sample group: "
+
1014  << FourCCToString(static_cast<FourCC>(grouping_type));
+
1015  return true;
+
1016  }
+
1017 }
+
1018 
+
1019 template <typename T>
+
1020 bool SampleGroupDescription::ReadWriteEntries(BoxBuffer* buffer,
+
1021  std::vector<T>* entries) {
+
1022  uint32_t default_length = 0;
+
1023  if (!buffer->Reading()) {
+
1024  DCHECK(!entries->empty());
+
1025  default_length = (*entries)[0].ComputeSize();
+
1026  DCHECK_NE(default_length, 0u);
+
1027  }
+
1028  if (version == 1)
+
1029  RCHECK(buffer->ReadWriteUInt32(&default_length));
+
1030  if (version >= 2) {
+
1031  NOTIMPLEMENTED() << "Unsupported SampleGroupDescriptionBox 'sgpd' version "
+
1032  << static_cast<int>(version);
+
1033  return false;
+
1034  }
+
1035 
+
1036  uint32_t count = entries->size();
+
1037  RCHECK(buffer->ReadWriteUInt32(&count));
+
1038  RCHECK(count != 0);
+
1039  entries->resize(count);
+
1040 
+
1041  for (T& entry : *entries) {
+
1042  if (version == 1) {
+
1043  uint32_t description_length = default_length;
+
1044  if (buffer->Reading() && default_length == 0)
+
1045  RCHECK(buffer->ReadWriteUInt32(&description_length));
+
1046  RCHECK(entry.ReadWrite(buffer));
+
1047  RCHECK(entry.ComputeSize() == description_length);
+
1048  } else {
+
1049  RCHECK(entry.ReadWrite(buffer));
+
1050  }
+
1051  }
+
1052  return true;
+
1053 }
+
1054 
+
1055 uint32_t SampleGroupDescription::ComputeSizeInternal() {
+
1056  // Version 0 is obsoleted, so always generate version 1 box.
+
1057  version = 1;
+
1058  size_t entries_size = 0;
+
1059  switch (grouping_type) {
+
1060  case FOURCC_seig:
+
1061  for (const auto& entry : cenc_sample_encryption_info_entries)
+
1062  entries_size += entry.ComputeSize();
+
1063  break;
+
1064  case FOURCC_roll:
+
1065  for (const auto& entry : audio_roll_recovery_entries)
+
1066  entries_size += entry.ComputeSize();
+
1067  break;
+
1068  }
+
1069  // This box is optional. Skip it if it is not used.
+
1070  if (entries_size == 0)
+
1071  return 0;
+
1072  return HeaderSize() + sizeof(grouping_type) +
+
1073  (version == 1 ? sizeof(uint32_t) : 0) + sizeof(uint32_t) +
+
1074  entries_size;
+
1075 }
+
1076 
+
1077 SampleToGroup::SampleToGroup() : grouping_type(0), grouping_type_parameter(0) {}
+
1078 SampleToGroup::~SampleToGroup() {}
+
1079 FourCC SampleToGroup::BoxType() const { return FOURCC_sbgp; }
+
1080 
+
1081 bool SampleToGroup::ReadWriteInternal(BoxBuffer* buffer) {
+
1082  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1083  buffer->ReadWriteUInt32(&grouping_type));
+
1084  if (version == 1)
+
1085  RCHECK(buffer->ReadWriteUInt32(&grouping_type_parameter));
+
1086 
+
1087  if (grouping_type != FOURCC_seig && grouping_type != FOURCC_roll) {
+
1088  DCHECK(buffer->Reading());
+
1089  DLOG(WARNING) << "Ignore unsupported sample group: "
+
1090  << FourCCToString(static_cast<FourCC>(grouping_type));
+
1091  return true;
+
1092  }
+
1093 
+
1094  uint32_t count = entries.size();
+
1095  RCHECK(buffer->ReadWriteUInt32(&count));
+
1096  entries.resize(count);
+
1097  for (uint32_t i = 0; i < count; ++i) {
+
1098  RCHECK(buffer->ReadWriteUInt32(&entries[i].sample_count) &&
+
1099  buffer->ReadWriteUInt32(&entries[i].group_description_index));
+
1100  }
+
1101  return true;
+
1102 }
+
1103 
+
1104 uint32_t SampleToGroup::ComputeSizeInternal() {
+
1105  // This box is optional. Skip it if it is not used.
+
1106  if (entries.empty())
+
1107  return 0;
+
1108  return HeaderSize() + sizeof(grouping_type) +
+
1109  (version == 1 ? sizeof(grouping_type_parameter) : 0) +
+
1110  sizeof(uint32_t) + entries.size() * sizeof(entries[0]);
+
1111 }
+
1112 
+
1113 SampleTable::SampleTable() {}
+
1114 SampleTable::~SampleTable() {}
+
1115 FourCC SampleTable::BoxType() const { return FOURCC_stbl; }
+
1116 
+
1117 bool SampleTable::ReadWriteInternal(BoxBuffer* buffer) {
+
1118  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1119  buffer->PrepareChildren() &&
+
1120  buffer->ReadWriteChild(&description) &&
+
1121  buffer->ReadWriteChild(&decoding_time_to_sample) &&
+
1122  buffer->TryReadWriteChild(&composition_time_to_sample) &&
+
1123  buffer->ReadWriteChild(&sample_to_chunk));
+
1124 
+
1125  if (buffer->Reading()) {
+
1126  BoxReader* reader = buffer->reader();
+
1127  DCHECK(reader);
+
1128 
+
1129  // Either SampleSize or CompactSampleSize must present.
+
1130  if (reader->ChildExist(&sample_size)) {
+
1131  RCHECK(reader->ReadChild(&sample_size));
+
1132  } else {
+
1133  CompactSampleSize compact_sample_size;
+
1134  RCHECK(reader->ReadChild(&compact_sample_size));
+
1135  sample_size.sample_size = 0;
+
1136  sample_size.sample_count = compact_sample_size.sizes.size();
+
1137  sample_size.sizes.swap(compact_sample_size.sizes);
+
1138  }
+
1139 
+
1140  // Either ChunkOffset or ChunkLargeOffset must present.
+
1141  if (reader->ChildExist(&chunk_large_offset)) {
+
1142  RCHECK(reader->ReadChild(&chunk_large_offset));
+
1143  } else {
+
1144  ChunkOffset chunk_offset;
+
1145  RCHECK(reader->ReadChild(&chunk_offset));
+
1146  chunk_large_offset.offsets.swap(chunk_offset.offsets);
+
1147  }
+
1148  } else {
+
1149  RCHECK(buffer->ReadWriteChild(&sample_size) &&
+
1150  buffer->ReadWriteChild(&chunk_large_offset));
+
1151  }
+
1152  RCHECK(buffer->TryReadWriteChild(&sync_sample));
+
1153  if (buffer->Reading()) {
+
1154  RCHECK(buffer->reader()->TryReadChildren(&sample_group_descriptions) &&
+
1155  buffer->reader()->TryReadChildren(&sample_to_groups));
+
1156  } else {
+
1157  for (auto& sample_group_description : sample_group_descriptions)
+
1158  RCHECK(buffer->ReadWriteChild(&sample_group_description));
+
1159  for (auto& sample_to_group : sample_to_groups)
+
1160  RCHECK(buffer->ReadWriteChild(&sample_to_group));
+
1161  }
+
1162  return true;
+
1163 }
+
1164 
+
1165 uint32_t SampleTable::ComputeSizeInternal() {
+
1166  uint32_t box_size =
+
1167  HeaderSize() + description.ComputeSize() +
+
1168  decoding_time_to_sample.ComputeSize() +
+
1169  composition_time_to_sample.ComputeSize() + sample_to_chunk.ComputeSize() +
+
1170  sample_size.ComputeSize() + chunk_large_offset.ComputeSize() +
+
1171  sync_sample.ComputeSize();
+
1172  for (auto& sample_group_description : sample_group_descriptions)
+
1173  box_size += sample_group_description.ComputeSize();
+
1174  for (auto& sample_to_group : sample_to_groups)
+
1175  box_size += sample_to_group.ComputeSize();
+
1176  return box_size;
+
1177 }
+
1178 
+
1179 EditList::EditList() {}
+
1180 EditList::~EditList() {}
+
1181 FourCC EditList::BoxType() const { return FOURCC_elst; }
+
1182 
+
1183 bool EditList::ReadWriteInternal(BoxBuffer* buffer) {
+
1184  uint32_t count = edits.size();
+
1185  RCHECK(ReadWriteHeaderInternal(buffer) && buffer->ReadWriteUInt32(&count));
+
1186  edits.resize(count);
+
1187 
+
1188  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
+
1189  for (uint32_t i = 0; i < count; ++i) {
+
1190  RCHECK(
+
1191  buffer->ReadWriteUInt64NBytes(&edits[i].segment_duration, num_bytes) &&
+
1192  buffer->ReadWriteInt64NBytes(&edits[i].media_time, num_bytes) &&
+
1193  buffer->ReadWriteInt16(&edits[i].media_rate_integer) &&
+
1194  buffer->ReadWriteInt16(&edits[i].media_rate_fraction));
+
1195  }
+
1196  return true;
+
1197 }
+
1198 
+
1199 uint32_t EditList::ComputeSizeInternal() {
+
1200  // EditList box is optional. Skip it if it is empty.
+
1201  if (edits.empty())
+
1202  return 0;
+
1203 
+
1204  version = 0;
+
1205  for (uint32_t i = 0; i < edits.size(); ++i) {
+
1206  if (!IsFitIn32Bits(edits[i].segment_duration, edits[i].media_time)) {
+
1207  version = 1;
+
1208  break;
+
1209  }
+
1210  }
+
1211  return HeaderSize() + sizeof(uint32_t) +
+
1212  (sizeof(uint32_t) * (1 + version) * 2 + sizeof(int16_t) * 2) *
+
1213  edits.size();
+
1214 }
+
1215 
+
1216 Edit::Edit() {}
+
1217 Edit::~Edit() {}
+
1218 FourCC Edit::BoxType() const { return FOURCC_edts; }
+
1219 
+
1220 bool Edit::ReadWriteInternal(BoxBuffer* buffer) {
+
1221  return ReadWriteHeaderInternal(buffer) &&
+
1222  buffer->PrepareChildren() &&
+
1223  buffer->ReadWriteChild(&list);
+
1224 }
+
1225 
+
1226 uint32_t Edit::ComputeSizeInternal() {
+
1227  // Edit box is optional. Skip it if it is empty.
+
1228  if (list.edits.empty())
+
1229  return 0;
+
1230  return HeaderSize() + list.ComputeSize();
+
1231 }
+
1232 
+
1233 HandlerReference::HandlerReference() : handler_type(FOURCC_NULL) {}
+
1234 HandlerReference::~HandlerReference() {}
+
1235 FourCC HandlerReference::BoxType() const { return FOURCC_hdlr; }
+
1236 
+
1237 bool HandlerReference::ReadWriteInternal(BoxBuffer* buffer) {
+
1238  std::vector<uint8_t> handler_name;
+
1239  if (!buffer->Reading()) {
+
1240  switch (handler_type) {
+
1241  case FOURCC_vide:
+
1242  handler_name.assign(kVideoHandlerName,
+
1243  kVideoHandlerName + arraysize(kVideoHandlerName));
+
1244  break;
+
1245  case FOURCC_soun:
+
1246  handler_name.assign(kAudioHandlerName,
+
1247  kAudioHandlerName + arraysize(kAudioHandlerName));
+
1248  break;
+
1249  case FOURCC_text:
+
1250  handler_name.assign(kTextHandlerName,
+
1251  kTextHandlerName + arraysize(kTextHandlerName));
+
1252  break;
+
1253  case FOURCC_ID32:
+
1254  break;
+
1255  default:
+
1256  NOTIMPLEMENTED();
+
1257  return false;
+
1258  }
+
1259  }
+
1260  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1261  buffer->IgnoreBytes(4) && // predefined.
+
1262  buffer->ReadWriteFourCC(&handler_type));
+
1263  if (!buffer->Reading()) {
+
1264  RCHECK(buffer->IgnoreBytes(12) && // reserved.
+
1265  buffer->ReadWriteVector(&handler_name, handler_name.size()));
+
1266  }
+
1267  return true;
+
1268 }
+
1269 
+
1270 uint32_t HandlerReference::ComputeSizeInternal() {
+
1271  uint32_t box_size = HeaderSize() + kFourCCSize + 16; // 16 bytes Reserved
+
1272  switch (handler_type) {
+
1273  case FOURCC_vide:
+
1274  box_size += sizeof(kVideoHandlerName);
+
1275  break;
+
1276  case FOURCC_soun:
+
1277  box_size += sizeof(kAudioHandlerName);
+
1278  break;
+
1279  case FOURCC_text:
+
1280  box_size += sizeof(kTextHandlerName);
+
1281  break;
+
1282  case FOURCC_ID32:
+
1283  break;
+
1284  default:
+
1285  NOTIMPLEMENTED();
+
1286  }
+
1287  return box_size;
+
1288 }
+
1289 
+
1290 bool Language::ReadWrite(BoxBuffer* buffer) {
+
1291  if (buffer->Reading()) {
+
1292  // Read language codes into temp first then use BitReader to read the
+
1293  // values. ISO-639-2/T language code: unsigned int(5)[3] language (2 bytes).
+
1294  std::vector<uint8_t> temp;
+
1295  RCHECK(buffer->ReadWriteVector(&temp, 2));
+
1296 
+
1297  BitReader bit_reader(&temp[0], 2);
+
1298  bit_reader.SkipBits(1);
+
1299  char language[3];
+
1300  for (int i = 0; i < 3; ++i) {
+
1301  CHECK(bit_reader.ReadBits(5, &language[i]));
+
1302  language[i] += 0x60;
+
1303  }
+
1304  code.assign(language, 3);
+
1305  } else {
+
1306  // Set up default language if it is not set.
+
1307  const char kUndefinedLanguage[] = "und";
+
1308  if (code.empty())
+
1309  code = kUndefinedLanguage;
+
1310  DCHECK_EQ(code.size(), 3u);
+
1311 
+
1312  // Lang format: bit(1) pad, unsigned int(5)[3] language.
+
1313  uint16_t lang = 0;
+
1314  for (int i = 0; i < 3; ++i)
+
1315  lang |= (code[i] - 0x60) << ((2 - i) * 5);
+
1316  RCHECK(buffer->ReadWriteUInt16(&lang));
+
1317  }
+
1318  return true;
+
1319 }
+
1320 
+
1321 uint32_t Language::ComputeSize() const {
+
1322  // ISO-639-2/T language code: unsigned int(5)[3] language (2 bytes).
+
1323  return 2;
+
1324 }
+
1325 
+
1326 bool PrivFrame::ReadWrite(BoxBuffer* buffer) {
+
1327  FourCC fourcc = FOURCC_PRIV;
+
1328  RCHECK(buffer->ReadWriteFourCC(&fourcc));
+
1329  if (fourcc != FOURCC_PRIV) {
+
1330  VLOG(1) << "Skip unrecognized id3 frame during read: "
+
1331  << FourCCToString(fourcc);
+
1332  return true;
+
1333  }
+
1334 
+
1335  uint32_t frame_size = owner.size() + 1 + value.size();
+
1336  // size should be encoded as synchsafe integer, which is not support here.
+
1337  // We don't expect frame_size to be larger than 0x7F. Synchsafe integers less
+
1338  // than 0x7F is encoded in the same way as normal integer.
+
1339  DCHECK_LT(frame_size, 0x7Fu);
+
1340  uint16_t flags = 0;
+
1341  RCHECK(buffer->ReadWriteUInt32(&frame_size) &&
+
1342  buffer->ReadWriteUInt16(&flags));
+
1343 
+
1344  if (buffer->Reading()) {
+
1345  std::string str;
+
1346  RCHECK(buffer->ReadWriteString(&str, frame_size));
+
1347  // |owner| is null terminated.
+
1348  size_t pos = str.find('\0');
+
1349  RCHECK(pos < str.size());
+
1350  owner = str.substr(0, pos);
+
1351  value = str.substr(pos + 1);
+
1352  } else {
+
1353  uint8_t byte = 0; // Null terminating byte between owner and value.
+
1354  RCHECK(buffer->ReadWriteString(&owner, owner.size()) &&
+
1355  buffer->ReadWriteUInt8(&byte) &&
+
1356  buffer->ReadWriteString(&value, value.size()));
+
1357  }
+
1358  return true;
+
1359 }
+
1360 
+
1361 uint32_t PrivFrame::ComputeSize() const {
+
1362  if (owner.empty() && value.empty())
+
1363  return 0;
+
1364  const uint32_t kFourCCSize = 4;
+
1365  return kFourCCSize + sizeof(uint32_t) + sizeof(uint16_t) + owner.size() + 1 +
+
1366  value.size();
+
1367 }
+
1368 
+
1369 ID3v2::ID3v2() {}
+
1370 ID3v2::~ID3v2() {}
+
1371 
+
1372 FourCC ID3v2::BoxType() const { return FOURCC_ID32; }
+
1373 
+
1374 bool ID3v2::ReadWriteInternal(BoxBuffer* buffer) {
+
1375  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1376  language.ReadWrite(buffer));
+
1377 
+
1378  // Read/Write ID3v2 header
+
1379  std::string id3v2_identifier = kID3v2Identifier;
+
1380  uint16_t version = kID3v2Version;
+
1381  // We only support PrivateFrame in ID3.
+
1382  uint32_t data_size = private_frame.ComputeSize();
+
1383  // size should be encoded as synchsafe integer, which is not support here.
+
1384  // We don't expect data_size to be larger than 0x7F. Synchsafe integers less
+
1385  // than 0x7F is encoded in the same way as normal integer.
+
1386  DCHECK_LT(data_size, 0x7Fu);
+
1387  uint8_t flags = 0;
+
1388  RCHECK(buffer->ReadWriteString(&id3v2_identifier, id3v2_identifier.size()) &&
+
1389  buffer->ReadWriteUInt16(&version) &&
+
1390  buffer->ReadWriteUInt8(&flags) &&
+
1391  buffer->ReadWriteUInt32(&data_size));
+
1392 
+
1393  RCHECK(private_frame.ReadWrite(buffer));
+
1394  return true;
+
1395 }
+
1396 
+
1397 uint32_t ID3v2::ComputeSizeInternal() {
+
1398  uint32_t private_frame_size = private_frame.ComputeSize();
+
1399  // Skip ID3v2 box generation if there is no private frame.
+
1400  return private_frame_size == 0 ? 0 : HeaderSize() + language.ComputeSize() +
+
1401  kID3v2HeaderSize +
+
1402  private_frame_size;
+
1403 }
+
1404 
+
1405 Metadata::Metadata() {}
+
1406 Metadata::~Metadata() {}
+
1407 
+
1408 FourCC Metadata::BoxType() const {
+
1409  return FOURCC_meta;
+
1410 }
+
1411 
+
1412 bool Metadata::ReadWriteInternal(BoxBuffer* buffer) {
+
1413  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1414  buffer->PrepareChildren() &&
+
1415  buffer->ReadWriteChild(&handler) &&
+
1416  buffer->TryReadWriteChild(&id3v2));
+
1417  return true;
+
1418 }
+
1419 
+
1420 uint32_t Metadata::ComputeSizeInternal() {
+
1421  uint32_t id3v2_size = id3v2.ComputeSize();
+
1422  // Skip metadata box generation if there is no metadata box.
+
1423  return id3v2_size == 0 ? 0
+
1424  : HeaderSize() + handler.ComputeSize() + id3v2_size;
+
1425 }
+
1426 
+
1427 CodecConfiguration::CodecConfiguration() : box_type(FOURCC_NULL) {}
+
1428 CodecConfiguration::~CodecConfiguration() {}
+
1429 
+ +
1431  // CodecConfiguration box should be parsed according to format recovered in
+
1432  // VideoSampleEntry. |box_type| is determined dynamically there.
+
1433  return box_type;
+
1434 }
+
1435 
+
1436 bool CodecConfiguration::ReadWriteInternal(BoxBuffer* buffer) {
+
1437  DCHECK_NE(box_type, FOURCC_NULL);
+
1438  RCHECK(ReadWriteHeaderInternal(buffer));
+
1439 
+
1440  // VPCodecConfiguration box inherits from FullBox instead of Box. The extra 4
+
1441  // bytes are handled here.
+
1442  if (box_type == FOURCC_vpcC) {
+
1443  uint32_t version_flags = 0;
+
1444  RCHECK(buffer->ReadWriteUInt32(&version_flags));
+
1445  RCHECK(version_flags == 0);
+
1446  }
+
1447 
+
1448  if (buffer->Reading()) {
+
1449  RCHECK(buffer->ReadWriteVector(&data, buffer->BytesLeft()));
+
1450  } else {
+
1451  RCHECK(buffer->ReadWriteVector(&data, data.size()));
+
1452  }
+
1453  return true;
+
1454 }
+
1455 
+
1456 uint32_t CodecConfiguration::ComputeSizeInternal() {
+
1457  if (data.empty())
+
1458  return 0;
+
1459  DCHECK_NE(box_type, FOURCC_NULL);
+
1460  return HeaderSize() + (box_type == FOURCC_vpcC ? 4 : 0) + data.size();
+
1461 }
+
1462 
+
1463 PixelAspectRatio::PixelAspectRatio() : h_spacing(0), v_spacing(0) {}
+
1464 PixelAspectRatio::~PixelAspectRatio() {}
+
1465 FourCC PixelAspectRatio::BoxType() const { return FOURCC_pasp; }
+
1466 
+
1467 bool PixelAspectRatio::ReadWriteInternal(BoxBuffer* buffer) {
+
1468  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1469  buffer->ReadWriteUInt32(&h_spacing) &&
+
1470  buffer->ReadWriteUInt32(&v_spacing));
+
1471  return true;
+
1472 }
+
1473 
+
1474 uint32_t PixelAspectRatio::ComputeSizeInternal() {
+
1475  // This box is optional. Skip it if it is not initialized.
+
1476  if (h_spacing == 0 && v_spacing == 0)
+
1477  return 0;
+
1478  // Both values must be positive.
+
1479  DCHECK(h_spacing != 0 && v_spacing != 0);
+
1480  return HeaderSize() + sizeof(h_spacing) + sizeof(v_spacing);
+
1481 }
+
1482 
+
1483 VideoSampleEntry::VideoSampleEntry()
+
1484  : format(FOURCC_NULL), data_reference_index(1), width(0), height(0) {}
+
1485 
+
1486 VideoSampleEntry::~VideoSampleEntry() {}
+ +
1488  if (format == FOURCC_NULL) {
+
1489  LOG(ERROR) << "VideoSampleEntry should be parsed according to the "
+
1490  << "handler type recovered in its Media ancestor.";
+
1491  }
+
1492  return format;
+
1493 }
+
1494 
+
1495 bool VideoSampleEntry::ReadWriteInternal(BoxBuffer* buffer) {
+
1496  std::vector<uint8_t> compressor_name;
+
1497  if (buffer->Reading()) {
+
1498  DCHECK(buffer->reader());
+
1499  format = buffer->reader()->type();
+
1500  } else {
+
1501  RCHECK(ReadWriteHeaderInternal(buffer));
+
1502 
+
1503  const FourCC actual_format = GetActualFormat();
+
1504  switch (actual_format) {
+
1505  case FOURCC_avc1:
+
1506  compressor_name.assign(
+
1507  kAvcCompressorName,
+
1508  kAvcCompressorName + arraysize(kAvcCompressorName));
+
1509  break;
+
1510  case FOURCC_hev1:
+
1511  case FOURCC_hvc1:
+
1512  compressor_name.assign(
+
1513  kHevcCompressorName,
+
1514  kHevcCompressorName + arraysize(kHevcCompressorName));
+
1515  break;
+
1516  case FOURCC_vp08:
+
1517  case FOURCC_vp09:
+
1518  case FOURCC_vp10:
+
1519  compressor_name.assign(
+
1520  kVpcCompressorName,
+
1521  kVpcCompressorName + arraysize(kVpcCompressorName));
+
1522  break;
+
1523  default:
+
1524  LOG(ERROR) << FourCCToString(actual_format) << " is not supported.";
+
1525  return false;
+
1526  }
+
1527  compressor_name.resize(kCompressorNameSize);
+
1528  }
+
1529 
+
1530  uint32_t video_resolution = kVideoResolution;
+
1531  uint16_t video_frame_count = kVideoFrameCount;
+
1532  uint16_t video_depth = kVideoDepth;
+
1533  int16_t predefined = -1;
+
1534  RCHECK(buffer->IgnoreBytes(6) && // reserved.
+
1535  buffer->ReadWriteUInt16(&data_reference_index) &&
+
1536  buffer->IgnoreBytes(16) && // predefined 0.
+
1537  buffer->ReadWriteUInt16(&width) &&
+
1538  buffer->ReadWriteUInt16(&height) &&
1539  buffer->ReadWriteUInt32(&video_resolution) &&
-
1540  buffer->IgnoreBytes(4) && // reserved.
-
1541  buffer->ReadWriteUInt16(&video_frame_count) &&
-
1542  buffer->ReadWriteVector(&compressor_name, kCompressorNameSize) &&
-
1543  buffer->ReadWriteUInt16(&video_depth) &&
-
1544  buffer->ReadWriteInt16(&predefined));
-
1545 
-
1546  RCHECK(buffer->PrepareChildren());
-
1547 
-
1548  if (format == FOURCC_encv) {
-
1549  if (buffer->Reading()) {
-
1550  // Continue scanning until a supported protection scheme is found, or
-
1551  // until we run out of protection schemes.
-
1552  while (!IsProtectionSchemeSupported(sinf.type.type))
-
1553  RCHECK(buffer->ReadWriteChild(&sinf));
-
1554  } else {
-
1555  DCHECK(IsProtectionSchemeSupported(sinf.type.type));
-
1556  RCHECK(buffer->ReadWriteChild(&sinf));
-
1557  }
-
1558  }
-
1559 
-
1560  const FourCC actual_format = GetActualFormat();
-
1561  if (buffer->Reading()) {
-
1562  codec_configuration.box_type = GetCodecConfigurationBoxType(actual_format);
-
1563  } else {
-
1564  DCHECK_EQ(codec_configuration.box_type,
-
1565  GetCodecConfigurationBoxType(actual_format));
-
1566  }
-
1567  DCHECK_NE(codec_configuration.box_type, FOURCC_NULL);
-
1568 
-
1569  RCHECK(buffer->ReadWriteChild(&codec_configuration));
-
1570  RCHECK(buffer->TryReadWriteChild(&pixel_aspect));
-
1571  return true;
-
1572 }
-
1573 
-
1574 uint32_t VideoSampleEntry::ComputeSizeInternal() {
-
1575  const FourCC actual_format = GetActualFormat();
-
1576  if (actual_format == FOURCC_NULL)
-
1577  return 0;
-
1578  codec_configuration.box_type = GetCodecConfigurationBoxType(actual_format);
-
1579  DCHECK_NE(codec_configuration.box_type, FOURCC_NULL);
-
1580  return HeaderSize() + sizeof(data_reference_index) + sizeof(width) +
-
1581  sizeof(height) + sizeof(kVideoResolution) * 2 +
-
1582  sizeof(kVideoFrameCount) + sizeof(kVideoDepth) +
-
1583  pixel_aspect.ComputeSize() + sinf.ComputeSize() +
-
1584  codec_configuration.ComputeSize() + kCompressorNameSize + 6 + 4 + 16 +
-
1585  2; // 6 + 4 bytes reserved, 16 + 2 bytes predefined.
-
1586 }
-
1587 
-
1588 FourCC VideoSampleEntry::GetCodecConfigurationBoxType(FourCC format) const {
-
1589  switch (format) {
-
1590  case FOURCC_avc1:
-
1591  return FOURCC_avcC;
-
1592  case FOURCC_hev1:
-
1593  case FOURCC_hvc1:
-
1594  return FOURCC_hvcC;
-
1595  case FOURCC_vp08:
-
1596  case FOURCC_vp09:
-
1597  case FOURCC_vp10:
-
1598  return FOURCC_vpcC;
-
1599  default:
-
1600  LOG(ERROR) << FourCCToString(format) << " is not supported.";
-
1601  return FOURCC_NULL;
-
1602  }
-
1603 }
-
1604 
-
1605 ElementaryStreamDescriptor::ElementaryStreamDescriptor() {}
-
1606 ElementaryStreamDescriptor::~ElementaryStreamDescriptor() {}
-
1607 FourCC ElementaryStreamDescriptor::BoxType() const { return FOURCC_esds; }
-
1608 
-
1609 bool ElementaryStreamDescriptor::ReadWriteInternal(BoxBuffer* buffer) {
-
1610  RCHECK(ReadWriteHeaderInternal(buffer));
-
1611  if (buffer->Reading()) {
-
1612  std::vector<uint8_t> data;
-
1613  RCHECK(buffer->ReadWriteVector(&data, buffer->BytesLeft()));
-
1614  RCHECK(es_descriptor.Parse(data));
-
1615  if (es_descriptor.IsAAC()) {
-
1616  RCHECK(aac_audio_specific_config.Parse(
-
1617  es_descriptor.decoder_specific_info()));
-
1618  }
-
1619  } else {
-
1620  DCHECK(buffer->writer());
-
1621  es_descriptor.Write(buffer->writer());
-
1622  }
-
1623  return true;
-
1624 }
-
1625 
-
1626 uint32_t ElementaryStreamDescriptor::ComputeSizeInternal() {
-
1627  // This box is optional. Skip it if not initialized.
-
1628  if (es_descriptor.object_type() == kForbidden)
-
1629  return 0;
-
1630  return HeaderSize() + es_descriptor.ComputeSize();
-
1631 }
-
1632 
-
1633 DTSSpecific::DTSSpecific()
-
1634  : sampling_frequency(0),
-
1635  max_bitrate(0),
-
1636  avg_bitrate(0),
-
1637  pcm_sample_depth(0) {}
-
1638 DTSSpecific::~DTSSpecific() {}
-
1639 FourCC DTSSpecific::BoxType() const { return FOURCC_ddts; }
-
1640 
-
1641 bool DTSSpecific::ReadWriteInternal(BoxBuffer* buffer) {
-
1642  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1643  buffer->ReadWriteUInt32(&sampling_frequency) &&
-
1644  buffer->ReadWriteUInt32(&max_bitrate) &&
-
1645  buffer->ReadWriteUInt32(&avg_bitrate) &&
-
1646  buffer->ReadWriteUInt8(&pcm_sample_depth));
-
1647 
-
1648  if (buffer->Reading()) {
-
1649  RCHECK(buffer->ReadWriteVector(&extra_data, buffer->BytesLeft()));
-
1650  } else {
-
1651  if (extra_data.empty()) {
-
1652  extra_data.assign(kDdtsExtraData,
-
1653  kDdtsExtraData + sizeof(kDdtsExtraData));
-
1654  }
-
1655  RCHECK(buffer->ReadWriteVector(&extra_data, extra_data.size()));
-
1656  }
-
1657  return true;
-
1658 }
-
1659 
-
1660 uint32_t DTSSpecific::ComputeSizeInternal() {
-
1661  // This box is optional. Skip it if not initialized.
-
1662  if (sampling_frequency == 0)
-
1663  return 0;
-
1664  return HeaderSize() + sizeof(sampling_frequency) + sizeof(max_bitrate) +
-
1665  sizeof(avg_bitrate) + sizeof(pcm_sample_depth) +
-
1666  sizeof(kDdtsExtraData);
-
1667 }
-
1668 
-
1669 AC3Specific::AC3Specific() {}
-
1670 AC3Specific::~AC3Specific() {}
-
1671 
-
1672 FourCC AC3Specific::BoxType() const { return FOURCC_dac3; }
-
1673 
-
1674 bool AC3Specific::ReadWriteInternal(BoxBuffer* buffer) {
-
1675  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1676  buffer->ReadWriteVector(
-
1677  &data, buffer->Reading() ? buffer->BytesLeft() : data.size()));
-
1678  return true;
-
1679 }
-
1680 
-
1681 uint32_t AC3Specific::ComputeSizeInternal() {
-
1682  // This box is optional. Skip it if not initialized.
-
1683  if (data.empty())
-
1684  return 0;
-
1685  return HeaderSize() + data.size();
-
1686 }
-
1687 
-
1688 EC3Specific::EC3Specific() {}
-
1689 EC3Specific::~EC3Specific() {}
-
1690 
-
1691 FourCC EC3Specific::BoxType() const { return FOURCC_dec3; }
-
1692 
-
1693 bool EC3Specific::ReadWriteInternal(BoxBuffer* buffer) {
-
1694  RCHECK(ReadWriteHeaderInternal(buffer));
-
1695  uint32_t size = buffer->Reading() ? buffer->BytesLeft() : data.size();
-
1696  RCHECK(buffer->ReadWriteVector(&data, size));
-
1697  return true;
-
1698 }
-
1699 
-
1700 uint32_t EC3Specific::ComputeSizeInternal() {
-
1701  // This box is optional. Skip it if not initialized.
-
1702  if (data.empty())
-
1703  return 0;
-
1704  return HeaderSize() + data.size();
-
1705 }
-
1706 
-
1707 OpusSpecific::OpusSpecific() : preskip(0) {}
-
1708 OpusSpecific::~OpusSpecific() {}
-
1709 
-
1710 FourCC OpusSpecific::BoxType() const { return FOURCC_dOps; }
-
1711 
-
1712 bool OpusSpecific::ReadWriteInternal(BoxBuffer* buffer) {
-
1713  RCHECK(ReadWriteHeaderInternal(buffer));
-
1714  if (buffer->Reading()) {
-
1715  std::vector<uint8_t> data;
-
1716  const int kMinOpusSpecificBoxDataSize = 11;
-
1717  RCHECK(buffer->BytesLeft() >= kMinOpusSpecificBoxDataSize);
-
1718  RCHECK(buffer->ReadWriteVector(&data, buffer->BytesLeft()));
-
1719  preskip = data[2] + (data[3] << 8);
-
1720 
-
1721  // https://tools.ietf.org/html/draft-ietf-codec-oggopus-06#section-5
-
1722  BufferWriter writer;
-
1723  writer.AppendInt(FOURCC_Opus);
-
1724  writer.AppendInt(FOURCC_Head);
-
1725  // The version must always be 1.
-
1726  const uint8_t kOpusIdentificationHeaderVersion = 1;
-
1727  data[0] = kOpusIdentificationHeaderVersion;
-
1728  writer.AppendVector(data);
-
1729  writer.SwapBuffer(&opus_identification_header);
-
1730  } else {
-
1731  // https://tools.ietf.org/html/draft-ietf-codec-oggopus-06#section-5
-
1732  // The first 8 bytes is "magic signature".
-
1733  const size_t kOpusMagicSignatureSize = 8u;
-
1734  DCHECK_GT(opus_identification_header.size(), kOpusMagicSignatureSize);
-
1735  // https://www.opus-codec.org/docs/opus_in_isobmff.html
-
1736  // The version field shall be set to 0.
-
1737  const uint8_t kOpusSpecificBoxVersion = 0;
-
1738  buffer->writer()->AppendInt(kOpusSpecificBoxVersion);
-
1739  buffer->writer()->AppendArray(
-
1740  &opus_identification_header[kOpusMagicSignatureSize + 1],
-
1741  opus_identification_header.size() - kOpusMagicSignatureSize - 1);
-
1742  }
-
1743  return true;
-
1744 }
-
1745 
-
1746 uint32_t OpusSpecific::ComputeSizeInternal() {
-
1747  // This box is optional. Skip it if not initialized.
-
1748  if (opus_identification_header.empty())
-
1749  return 0;
-
1750  // https://tools.ietf.org/html/draft-ietf-codec-oggopus-06#section-5
-
1751  // The first 8 bytes is "magic signature".
-
1752  const size_t kOpusMagicSignatureSize = 8u;
-
1753  DCHECK_GT(opus_identification_header.size(), kOpusMagicSignatureSize);
-
1754  return HeaderSize() + opus_identification_header.size() -
-
1755  kOpusMagicSignatureSize;
-
1756 }
-
1757 
-
1758 AudioSampleEntry::AudioSampleEntry()
-
1759  : format(FOURCC_NULL),
-
1760  data_reference_index(1),
-
1761  channelcount(2),
-
1762  samplesize(16),
-
1763  samplerate(0) {}
-
1764 
-
1765 AudioSampleEntry::~AudioSampleEntry() {}
-
1766 
- -
1768  if (format == FOURCC_NULL) {
-
1769  LOG(ERROR) << "AudioSampleEntry should be parsed according to the "
-
1770  << "handler type recovered in its Media ancestor.";
-
1771  }
-
1772  return format;
-
1773 }
-
1774 
-
1775 bool AudioSampleEntry::ReadWriteInternal(BoxBuffer* buffer) {
-
1776  if (buffer->Reading()) {
-
1777  DCHECK(buffer->reader());
-
1778  format = buffer->reader()->type();
-
1779  } else {
-
1780  RCHECK(ReadWriteHeaderInternal(buffer));
-
1781  }
-
1782 
-
1783  // Convert from integer to 16.16 fixed point for writing.
-
1784  samplerate <<= 16;
-
1785  RCHECK(buffer->IgnoreBytes(6) && // reserved.
-
1786  buffer->ReadWriteUInt16(&data_reference_index) &&
-
1787  buffer->IgnoreBytes(8) && // reserved.
-
1788  buffer->ReadWriteUInt16(&channelcount) &&
-
1789  buffer->ReadWriteUInt16(&samplesize) &&
-
1790  buffer->IgnoreBytes(4) && // predefined.
-
1791  buffer->ReadWriteUInt32(&samplerate));
-
1792  // Convert from 16.16 fixed point to integer.
-
1793  samplerate >>= 16;
-
1794 
-
1795  RCHECK(buffer->PrepareChildren());
-
1796  if (format == FOURCC_enca) {
-
1797  if (buffer->Reading()) {
-
1798  // Continue scanning until a supported protection scheme is found, or
-
1799  // until we run out of protection schemes.
-
1800  while (!IsProtectionSchemeSupported(sinf.type.type))
-
1801  RCHECK(buffer->ReadWriteChild(&sinf));
-
1802  } else {
-
1803  DCHECK(IsProtectionSchemeSupported(sinf.type.type));
-
1804  RCHECK(buffer->ReadWriteChild(&sinf));
-
1805  }
-
1806  }
-
1807 
-
1808  RCHECK(buffer->TryReadWriteChild(&esds));
-
1809  RCHECK(buffer->TryReadWriteChild(&ddts));
-
1810  RCHECK(buffer->TryReadWriteChild(&dac3));
-
1811  RCHECK(buffer->TryReadWriteChild(&dec3));
-
1812  RCHECK(buffer->TryReadWriteChild(&dops));
-
1813  return true;
-
1814 }
-
1815 
-
1816 uint32_t AudioSampleEntry::ComputeSizeInternal() {
-
1817  if (GetActualFormat() == FOURCC_NULL)
-
1818  return 0;
-
1819  return HeaderSize() + sizeof(data_reference_index) + sizeof(channelcount) +
-
1820  sizeof(samplesize) + sizeof(samplerate) + sinf.ComputeSize() +
-
1821  esds.ComputeSize() + ddts.ComputeSize() + dac3.ComputeSize() +
-
1822  dec3.ComputeSize() + dops.ComputeSize() +
-
1823  6 + 8 + // 6 + 8 bytes reserved.
-
1824  4; // 4 bytes predefined.
-
1825 }
-
1826 
-
1827 WebVTTConfigurationBox::WebVTTConfigurationBox() {}
-
1828 WebVTTConfigurationBox::~WebVTTConfigurationBox() {}
-
1829 
- -
1831  return FOURCC_vttC;
-
1832 }
-
1833 
-
1834 bool WebVTTConfigurationBox::ReadWriteInternal(BoxBuffer* buffer) {
-
1835  RCHECK(ReadWriteHeaderInternal(buffer));
-
1836  return buffer->ReadWriteString(
-
1837  &config,
-
1838  buffer->Reading() ? buffer->BytesLeft() : config.size());
-
1839 }
-
1840 
-
1841 uint32_t WebVTTConfigurationBox::ComputeSizeInternal() {
-
1842  return HeaderSize() + config.size();
-
1843 }
-
1844 
-
1845 WebVTTSourceLabelBox::WebVTTSourceLabelBox() {}
-
1846 WebVTTSourceLabelBox::~WebVTTSourceLabelBox() {}
-
1847 
- -
1849  return FOURCC_vlab;
-
1850 }
-
1851 
-
1852 bool WebVTTSourceLabelBox::ReadWriteInternal(BoxBuffer* buffer) {
-
1853  RCHECK(ReadWriteHeaderInternal(buffer));
-
1854  return buffer->ReadWriteString(&source_label, buffer->Reading()
-
1855  ? buffer->BytesLeft()
-
1856  : source_label.size());
-
1857 }
-
1858 
-
1859 uint32_t WebVTTSourceLabelBox::ComputeSizeInternal() {
-
1860  if (source_label.empty())
-
1861  return 0;
-
1862  return HeaderSize() + source_label.size();
-
1863 }
-
1864 
-
1865 TextSampleEntry::TextSampleEntry() : format(FOURCC_NULL) {}
-
1866 TextSampleEntry::~TextSampleEntry() {}
-
1867 
- -
1869  if (format == FOURCC_NULL) {
-
1870  LOG(ERROR) << "TextSampleEntry should be parsed according to the "
-
1871  << "handler type recovered in its Media ancestor.";
-
1872  }
-
1873  return format;
-
1874 }
-
1875 
-
1876 bool TextSampleEntry::ReadWriteInternal(BoxBuffer* buffer) {
-
1877  if (buffer->Reading()) {
-
1878  DCHECK(buffer->reader());
-
1879  format = buffer->reader()->type();
-
1880  } else {
-
1881  RCHECK(ReadWriteHeaderInternal(buffer));
-
1882  }
-
1883  RCHECK(buffer->IgnoreBytes(6) && // reserved for SampleEntry.
-
1884  buffer->ReadWriteUInt16(&data_reference_index));
-
1885 
-
1886  if (format == FOURCC_wvtt) {
-
1887  // TODO(rkuroiwa): Handle the optional MPEG4BitRateBox.
-
1888  RCHECK(buffer->PrepareChildren() &&
-
1889  buffer->ReadWriteChild(&config) &&
-
1890  buffer->ReadWriteChild(&label));
-
1891  }
-
1892  return true;
-
1893 }
-
1894 
-
1895 uint32_t TextSampleEntry::ComputeSizeInternal() {
-
1896  // 6 for the (anonymous) reserved bytes for SampleEntry class.
-
1897  return HeaderSize() + 6 + sizeof(data_reference_index) +
-
1898  config.ComputeSize() + label.ComputeSize();
-
1899 }
-
1900 
-
1901 MediaHeader::MediaHeader()
-
1902  : creation_time(0), modification_time(0), timescale(0), duration(0) {}
-
1903 MediaHeader::~MediaHeader() {}
-
1904 FourCC MediaHeader::BoxType() const { return FOURCC_mdhd; }
-
1905 
-
1906 bool MediaHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
1907  RCHECK(ReadWriteHeaderInternal(buffer));
-
1908 
-
1909  uint8_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
-
1910  RCHECK(buffer->ReadWriteUInt64NBytes(&creation_time, num_bytes) &&
-
1911  buffer->ReadWriteUInt64NBytes(&modification_time, num_bytes) &&
-
1912  buffer->ReadWriteUInt32(&timescale) &&
-
1913  buffer->ReadWriteUInt64NBytes(&duration, num_bytes) &&
-
1914  language.ReadWrite(buffer) &&
-
1915  buffer->IgnoreBytes(2)); // predefined.
-
1916  return true;
-
1917 }
-
1918 
-
1919 uint32_t MediaHeader::ComputeSizeInternal() {
-
1920  version = IsFitIn32Bits(creation_time, modification_time, duration) ? 0 : 1;
-
1921  return HeaderSize() + sizeof(timescale) +
-
1922  sizeof(uint32_t) * (1 + version) * 3 + language.ComputeSize() +
-
1923  2; // 2 bytes predefined.
-
1924 }
-
1925 
-
1926 VideoMediaHeader::VideoMediaHeader()
-
1927  : graphicsmode(0), opcolor_red(0), opcolor_green(0), opcolor_blue(0) {
-
1928  const uint32_t kVideoMediaHeaderFlags = 1;
-
1929  flags = kVideoMediaHeaderFlags;
-
1930 }
-
1931 VideoMediaHeader::~VideoMediaHeader() {}
-
1932 FourCC VideoMediaHeader::BoxType() const { return FOURCC_vmhd; }
-
1933 bool VideoMediaHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
1934  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1935  buffer->ReadWriteUInt16(&graphicsmode) &&
-
1936  buffer->ReadWriteUInt16(&opcolor_red) &&
-
1937  buffer->ReadWriteUInt16(&opcolor_green) &&
-
1938  buffer->ReadWriteUInt16(&opcolor_blue));
-
1939  return true;
-
1940 }
-
1941 
-
1942 uint32_t VideoMediaHeader::ComputeSizeInternal() {
-
1943  return HeaderSize() + sizeof(graphicsmode) + sizeof(opcolor_red) +
-
1944  sizeof(opcolor_green) + sizeof(opcolor_blue);
-
1945 }
-
1946 
-
1947 SoundMediaHeader::SoundMediaHeader() : balance(0) {}
-
1948 SoundMediaHeader::~SoundMediaHeader() {}
-
1949 FourCC SoundMediaHeader::BoxType() const { return FOURCC_smhd; }
-
1950 bool SoundMediaHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
1951  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
1952  buffer->ReadWriteUInt16(&balance) &&
-
1953  buffer->IgnoreBytes(2)); // reserved.
-
1954  return true;
-
1955 }
-
1956 
-
1957 uint32_t SoundMediaHeader::ComputeSizeInternal() {
-
1958  return HeaderSize() + sizeof(balance) + sizeof(uint16_t);
-
1959 }
-
1960 
-
1961 SubtitleMediaHeader::SubtitleMediaHeader() {}
-
1962 SubtitleMediaHeader::~SubtitleMediaHeader() {}
-
1963 
-
1964 FourCC SubtitleMediaHeader::BoxType() const { return FOURCC_sthd; }
-
1965 
-
1966 bool SubtitleMediaHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
1967  return ReadWriteHeaderInternal(buffer);
-
1968 }
-
1969 
-
1970 uint32_t SubtitleMediaHeader::ComputeSizeInternal() {
-
1971  return HeaderSize();
-
1972 }
-
1973 
-
1974 DataEntryUrl::DataEntryUrl() {
-
1975  const uint32_t kDataEntryUrlFlags = 1;
-
1976  flags = kDataEntryUrlFlags;
-
1977 }
-
1978 DataEntryUrl::~DataEntryUrl() {}
-
1979 FourCC DataEntryUrl::BoxType() const { return FOURCC_url; }
-
1980 bool DataEntryUrl::ReadWriteInternal(BoxBuffer* buffer) {
-
1981  RCHECK(ReadWriteHeaderInternal(buffer));
-
1982  if (buffer->Reading()) {
-
1983  RCHECK(buffer->ReadWriteVector(&location, buffer->BytesLeft()));
-
1984  } else {
-
1985  RCHECK(buffer->ReadWriteVector(&location, location.size()));
-
1986  }
-
1987  return true;
-
1988 }
-
1989 
-
1990 uint32_t DataEntryUrl::ComputeSizeInternal() {
-
1991  return HeaderSize() + location.size();
-
1992 }
-
1993 
-
1994 DataReference::DataReference() {
-
1995  // Default 1 entry.
-
1996  data_entry.resize(1);
-
1997 }
-
1998 DataReference::~DataReference() {}
-
1999 FourCC DataReference::BoxType() const { return FOURCC_dref; }
-
2000 bool DataReference::ReadWriteInternal(BoxBuffer* buffer) {
-
2001  uint32_t entry_count = data_entry.size();
-
2002  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2003  buffer->ReadWriteUInt32(&entry_count));
-
2004  data_entry.resize(entry_count);
-
2005  RCHECK(buffer->PrepareChildren());
-
2006  for (uint32_t i = 0; i < entry_count; ++i)
-
2007  RCHECK(buffer->ReadWriteChild(&data_entry[i]));
-
2008  return true;
-
2009 }
-
2010 
-
2011 uint32_t DataReference::ComputeSizeInternal() {
-
2012  uint32_t count = data_entry.size();
-
2013  uint32_t box_size = HeaderSize() + sizeof(count);
-
2014  for (uint32_t i = 0; i < count; ++i)
-
2015  box_size += data_entry[i].ComputeSize();
-
2016  return box_size;
-
2017 }
-
2018 
-
2019 DataInformation::DataInformation() {}
-
2020 DataInformation::~DataInformation() {}
-
2021 FourCC DataInformation::BoxType() const { return FOURCC_dinf; }
-
2022 
-
2023 bool DataInformation::ReadWriteInternal(BoxBuffer* buffer) {
-
2024  return ReadWriteHeaderInternal(buffer) &&
-
2025  buffer->PrepareChildren() &&
-
2026  buffer->ReadWriteChild(&dref);
-
2027 }
-
2028 
-
2029 uint32_t DataInformation::ComputeSizeInternal() {
-
2030  return HeaderSize() + dref.ComputeSize();
-
2031 }
-
2032 
-
2033 MediaInformation::MediaInformation() {}
-
2034 MediaInformation::~MediaInformation() {}
-
2035 FourCC MediaInformation::BoxType() const { return FOURCC_minf; }
-
2036 
-
2037 bool MediaInformation::ReadWriteInternal(BoxBuffer* buffer) {
-
2038  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2039  buffer->PrepareChildren() &&
-
2040  buffer->ReadWriteChild(&dinf) &&
-
2041  buffer->ReadWriteChild(&sample_table));
-
2042  switch (sample_table.description.type) {
-
2043  case kVideo:
-
2044  RCHECK(buffer->ReadWriteChild(&vmhd));
-
2045  break;
-
2046  case kAudio:
-
2047  RCHECK(buffer->ReadWriteChild(&smhd));
-
2048  break;
-
2049  case kText:
-
2050  RCHECK(buffer->TryReadWriteChild(&sthd));
-
2051  break;
-
2052  default:
-
2053  NOTIMPLEMENTED();
-
2054  }
-
2055  // Hint is not supported for now.
-
2056  return true;
-
2057 }
-
2058 
-
2059 uint32_t MediaInformation::ComputeSizeInternal() {
-
2060  uint32_t box_size =
-
2061  HeaderSize() + dinf.ComputeSize() + sample_table.ComputeSize();
-
2062  switch (sample_table.description.type) {
-
2063  case kVideo:
-
2064  box_size += vmhd.ComputeSize();
-
2065  break;
-
2066  case kAudio:
-
2067  box_size += smhd.ComputeSize();
-
2068  break;
-
2069  case kText:
-
2070  box_size += sthd.ComputeSize();
-
2071  break;
-
2072  default:
-
2073  NOTIMPLEMENTED();
-
2074  }
-
2075  return box_size;
-
2076 }
-
2077 
-
2078 Media::Media() {}
-
2079 Media::~Media() {}
-
2080 FourCC Media::BoxType() const { return FOURCC_mdia; }
-
2081 
-
2082 bool Media::ReadWriteInternal(BoxBuffer* buffer) {
-
2083  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2084  buffer->PrepareChildren() &&
-
2085  buffer->ReadWriteChild(&header));
-
2086  if (buffer->Reading()) {
-
2087  RCHECK(buffer->ReadWriteChild(&handler));
-
2088  // Maddeningly, the HandlerReference box specifies how to parse the
-
2089  // SampleDescription box, making the latter the only box (of those that we
-
2090  // support) which cannot be parsed correctly on its own (or even with
-
2091  // information from its strict ancestor tree). We thus copy the handler type
-
2092  // to the sample description box *before* parsing it to provide this
-
2093  // information while parsing.
-
2094  information.sample_table.description.type =
-
2095  FourCCToTrackType(handler.handler_type);
-
2096  } else {
-
2097  handler.handler_type =
-
2098  TrackTypeToFourCC(information.sample_table.description.type);
-
2099  RCHECK(handler.handler_type != FOURCC_NULL);
-
2100  RCHECK(buffer->ReadWriteChild(&handler));
-
2101  }
-
2102  RCHECK(buffer->ReadWriteChild(&information));
-
2103  return true;
-
2104 }
-
2105 
-
2106 uint32_t Media::ComputeSizeInternal() {
-
2107  handler.handler_type =
-
2108  TrackTypeToFourCC(information.sample_table.description.type);
-
2109  return HeaderSize() + header.ComputeSize() + handler.ComputeSize() +
-
2110  information.ComputeSize();
-
2111 }
-
2112 
-
2113 Track::Track() {}
-
2114 Track::~Track() {}
-
2115 FourCC Track::BoxType() const { return FOURCC_trak; }
-
2116 
-
2117 bool Track::ReadWriteInternal(BoxBuffer* buffer) {
-
2118  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2119  buffer->PrepareChildren() &&
-
2120  buffer->ReadWriteChild(&header) &&
-
2121  buffer->ReadWriteChild(&media) &&
-
2122  buffer->TryReadWriteChild(&edit) &&
-
2123  buffer->TryReadWriteChild(&sample_encryption));
-
2124  return true;
-
2125 }
-
2126 
-
2127 uint32_t Track::ComputeSizeInternal() {
-
2128  return HeaderSize() + header.ComputeSize() + media.ComputeSize() +
-
2129  edit.ComputeSize();
-
2130 }
-
2131 
-
2132 MovieExtendsHeader::MovieExtendsHeader() : fragment_duration(0) {}
-
2133 MovieExtendsHeader::~MovieExtendsHeader() {}
-
2134 FourCC MovieExtendsHeader::BoxType() const { return FOURCC_mehd; }
-
2135 
-
2136 bool MovieExtendsHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
2137  RCHECK(ReadWriteHeaderInternal(buffer));
-
2138  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
-
2139  RCHECK(buffer->ReadWriteUInt64NBytes(&fragment_duration, num_bytes));
-
2140  return true;
-
2141 }
-
2142 
-
2143 uint32_t MovieExtendsHeader::ComputeSizeInternal() {
-
2144  // This box is optional. Skip it if it is not used.
-
2145  if (fragment_duration == 0)
-
2146  return 0;
-
2147  version = IsFitIn32Bits(fragment_duration) ? 0 : 1;
-
2148  return HeaderSize() + sizeof(uint32_t) * (1 + version);
-
2149 }
-
2150 
-
2151 TrackExtends::TrackExtends()
-
2152  : track_id(0),
-
2153  default_sample_description_index(0),
-
2154  default_sample_duration(0),
-
2155  default_sample_size(0),
-
2156  default_sample_flags(0) {}
-
2157 TrackExtends::~TrackExtends() {}
-
2158 FourCC TrackExtends::BoxType() const { return FOURCC_trex; }
-
2159 
-
2160 bool TrackExtends::ReadWriteInternal(BoxBuffer* buffer) {
-
2161  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2162  buffer->ReadWriteUInt32(&track_id) &&
-
2163  buffer->ReadWriteUInt32(&default_sample_description_index) &&
-
2164  buffer->ReadWriteUInt32(&default_sample_duration) &&
-
2165  buffer->ReadWriteUInt32(&default_sample_size) &&
-
2166  buffer->ReadWriteUInt32(&default_sample_flags));
-
2167  return true;
-
2168 }
-
2169 
-
2170 uint32_t TrackExtends::ComputeSizeInternal() {
-
2171  return HeaderSize() + sizeof(track_id) +
-
2172  sizeof(default_sample_description_index) +
-
2173  sizeof(default_sample_duration) + sizeof(default_sample_size) +
-
2174  sizeof(default_sample_flags);
-
2175 }
-
2176 
-
2177 MovieExtends::MovieExtends() {}
-
2178 MovieExtends::~MovieExtends() {}
-
2179 FourCC MovieExtends::BoxType() const { return FOURCC_mvex; }
-
2180 
-
2181 bool MovieExtends::ReadWriteInternal(BoxBuffer* buffer) {
-
2182  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2183  buffer->PrepareChildren() &&
-
2184  buffer->TryReadWriteChild(&header));
-
2185  if (buffer->Reading()) {
-
2186  DCHECK(buffer->reader());
-
2187  RCHECK(buffer->reader()->ReadChildren(&tracks));
-
2188  } else {
-
2189  for (uint32_t i = 0; i < tracks.size(); ++i)
-
2190  RCHECK(buffer->ReadWriteChild(&tracks[i]));
-
2191  }
-
2192  return true;
-
2193 }
-
2194 
-
2195 uint32_t MovieExtends::ComputeSizeInternal() {
-
2196  // This box is optional. Skip it if it does not contain any track.
-
2197  if (tracks.size() == 0)
-
2198  return 0;
-
2199  uint32_t box_size = HeaderSize() + header.ComputeSize();
-
2200  for (uint32_t i = 0; i < tracks.size(); ++i)
-
2201  box_size += tracks[i].ComputeSize();
-
2202  return box_size;
-
2203 }
-
2204 
-
2205 Movie::Movie() {}
-
2206 Movie::~Movie() {}
-
2207 FourCC Movie::BoxType() const { return FOURCC_moov; }
-
2208 
-
2209 bool Movie::ReadWriteInternal(BoxBuffer* buffer) {
-
2210  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2211  buffer->PrepareChildren() &&
-
2212  buffer->ReadWriteChild(&header) &&
-
2213  buffer->TryReadWriteChild(&metadata) &&
-
2214  buffer->TryReadWriteChild(&extends));
-
2215  if (buffer->Reading()) {
-
2216  BoxReader* reader = buffer->reader();
-
2217  DCHECK(reader);
-
2218  RCHECK(reader->ReadChildren(&tracks) &&
-
2219  reader->TryReadChildren(&pssh));
-
2220  } else {
-
2221  for (uint32_t i = 0; i < tracks.size(); ++i)
-
2222  RCHECK(buffer->ReadWriteChild(&tracks[i]));
-
2223  for (uint32_t i = 0; i < pssh.size(); ++i)
-
2224  RCHECK(buffer->ReadWriteChild(&pssh[i]));
-
2225  }
-
2226  return true;
-
2227 }
-
2228 
-
2229 uint32_t Movie::ComputeSizeInternal() {
-
2230  uint32_t box_size = HeaderSize() + header.ComputeSize() +
-
2231  metadata.ComputeSize() + extends.ComputeSize();
-
2232  for (uint32_t i = 0; i < tracks.size(); ++i)
-
2233  box_size += tracks[i].ComputeSize();
-
2234  for (uint32_t i = 0; i < pssh.size(); ++i)
-
2235  box_size += pssh[i].ComputeSize();
-
2236  return box_size;
-
2237 }
-
2238 
-
2239 TrackFragmentDecodeTime::TrackFragmentDecodeTime() : decode_time(0) {}
-
2240 TrackFragmentDecodeTime::~TrackFragmentDecodeTime() {}
-
2241 FourCC TrackFragmentDecodeTime::BoxType() const { return FOURCC_tfdt; }
-
2242 
-
2243 bool TrackFragmentDecodeTime::ReadWriteInternal(BoxBuffer* buffer) {
-
2244  RCHECK(ReadWriteHeaderInternal(buffer));
-
2245  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
-
2246  RCHECK(buffer->ReadWriteUInt64NBytes(&decode_time, num_bytes));
-
2247  return true;
-
2248 }
-
2249 
-
2250 uint32_t TrackFragmentDecodeTime::ComputeSizeInternal() {
-
2251  version = IsFitIn32Bits(decode_time) ? 0 : 1;
-
2252  return HeaderSize() + sizeof(uint32_t) * (1 + version);
-
2253 }
-
2254 
-
2255 MovieFragmentHeader::MovieFragmentHeader() : sequence_number(0) {}
-
2256 MovieFragmentHeader::~MovieFragmentHeader() {}
-
2257 FourCC MovieFragmentHeader::BoxType() const { return FOURCC_mfhd; }
-
2258 
-
2259 bool MovieFragmentHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
2260  return ReadWriteHeaderInternal(buffer) &&
-
2261  buffer->ReadWriteUInt32(&sequence_number);
-
2262 }
-
2263 
-
2264 uint32_t MovieFragmentHeader::ComputeSizeInternal() {
-
2265  return HeaderSize() + sizeof(sequence_number);
-
2266 }
-
2267 
-
2268 TrackFragmentHeader::TrackFragmentHeader()
-
2269  : track_id(0),
-
2270  sample_description_index(0),
-
2271  default_sample_duration(0),
-
2272  default_sample_size(0),
-
2273  default_sample_flags(0) {}
-
2274 
-
2275 TrackFragmentHeader::~TrackFragmentHeader() {}
-
2276 FourCC TrackFragmentHeader::BoxType() const { return FOURCC_tfhd; }
-
2277 
-
2278 bool TrackFragmentHeader::ReadWriteInternal(BoxBuffer* buffer) {
-
2279  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2280  buffer->ReadWriteUInt32(&track_id));
-
2281 
-
2282  if (flags & kBaseDataOffsetPresentMask) {
-
2283  // MSE requires 'default-base-is-moof' to be set and
-
2284  // 'base-data-offset-present' not to be set. We omit these checks as some
-
2285  // valid files in the wild don't follow these rules, though they use moof as
-
2286  // base.
-
2287  uint64_t base_data_offset;
-
2288  RCHECK(buffer->ReadWriteUInt64(&base_data_offset));
-
2289  DLOG(WARNING) << "base-data-offset-present is not expected. Assumes "
-
2290  "default-base-is-moof.";
-
2291  }
-
2292 
-
2293  if (flags & kSampleDescriptionIndexPresentMask) {
-
2294  RCHECK(buffer->ReadWriteUInt32(&sample_description_index));
-
2295  } else if (buffer->Reading()) {
-
2296  sample_description_index = 0;
-
2297  }
-
2298 
-
2299  if (flags & kDefaultSampleDurationPresentMask) {
-
2300  RCHECK(buffer->ReadWriteUInt32(&default_sample_duration));
-
2301  } else if (buffer->Reading()) {
-
2302  default_sample_duration = 0;
-
2303  }
-
2304 
-
2305  if (flags & kDefaultSampleSizePresentMask) {
-
2306  RCHECK(buffer->ReadWriteUInt32(&default_sample_size));
-
2307  } else if (buffer->Reading()) {
-
2308  default_sample_size = 0;
-
2309  }
-
2310 
-
2311  if (flags & kDefaultSampleFlagsPresentMask)
-
2312  RCHECK(buffer->ReadWriteUInt32(&default_sample_flags));
-
2313  return true;
-
2314 }
-
2315 
-
2316 uint32_t TrackFragmentHeader::ComputeSizeInternal() {
-
2317  uint32_t box_size = HeaderSize() + sizeof(track_id);
-
2318  if (flags & kSampleDescriptionIndexPresentMask)
-
2319  box_size += sizeof(sample_description_index);
-
2320  if (flags & kDefaultSampleDurationPresentMask)
-
2321  box_size += sizeof(default_sample_duration);
-
2322  if (flags & kDefaultSampleSizePresentMask)
-
2323  box_size += sizeof(default_sample_size);
-
2324  if (flags & kDefaultSampleFlagsPresentMask)
-
2325  box_size += sizeof(default_sample_flags);
-
2326  return box_size;
-
2327 }
-
2328 
-
2329 TrackFragmentRun::TrackFragmentRun() : sample_count(0), data_offset(0) {}
-
2330 TrackFragmentRun::~TrackFragmentRun() {}
-
2331 FourCC TrackFragmentRun::BoxType() const { return FOURCC_trun; }
-
2332 
-
2333 bool TrackFragmentRun::ReadWriteInternal(BoxBuffer* buffer) {
-
2334  if (!buffer->Reading()) {
-
2335  // Determine whether version 0 or version 1 should be used.
-
2336  // Use version 0 if possible, use version 1 if there is a negative
-
2337  // sample_offset value.
-
2338  version = 0;
-
2339  if (flags & kSampleCompTimeOffsetsPresentMask) {
-
2340  for (uint32_t i = 0; i < sample_count; ++i) {
-
2341  if (sample_composition_time_offsets[i] < 0) {
-
2342  version = 1;
-
2343  break;
-
2344  }
-
2345  }
-
2346  }
-
2347  }
-
2348 
-
2349  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2350  buffer->ReadWriteUInt32(&sample_count));
-
2351 
-
2352  bool data_offset_present = (flags & kDataOffsetPresentMask) != 0;
-
2353  bool first_sample_flags_present = (flags & kFirstSampleFlagsPresentMask) != 0;
-
2354  bool sample_duration_present = (flags & kSampleDurationPresentMask) != 0;
-
2355  bool sample_size_present = (flags & kSampleSizePresentMask) != 0;
-
2356  bool sample_flags_present = (flags & kSampleFlagsPresentMask) != 0;
-
2357  bool sample_composition_time_offsets_present =
-
2358  (flags & kSampleCompTimeOffsetsPresentMask) != 0;
-
2359 
-
2360  if (data_offset_present) {
-
2361  RCHECK(buffer->ReadWriteUInt32(&data_offset));
-
2362  } else {
-
2363  // NOTE: If the data-offset is not present, then the data for this run
-
2364  // starts immediately after the data of the previous run, or at the
-
2365  // base-data-offset defined by the track fragment header if this is the
-
2366  // first run in a track fragment. If the data-offset is present, it is
-
2367  // relative to the base-data-offset established in the track fragment
-
2368  // header.
-
2369  NOTIMPLEMENTED();
-
2370  }
-
2371 
-
2372  uint32_t first_sample_flags;
-
2373 
-
2374  if (buffer->Reading()) {
-
2375  if (first_sample_flags_present)
-
2376  RCHECK(buffer->ReadWriteUInt32(&first_sample_flags));
-
2377 
-
2378  if (sample_duration_present)
-
2379  sample_durations.resize(sample_count);
-
2380  if (sample_size_present)
-
2381  sample_sizes.resize(sample_count);
-
2382  if (sample_flags_present)
-
2383  sample_flags.resize(sample_count);
-
2384  if (sample_composition_time_offsets_present)
-
2385  sample_composition_time_offsets.resize(sample_count);
-
2386  } else {
-
2387  if (first_sample_flags_present) {
-
2388  first_sample_flags = sample_flags[0];
-
2389  DCHECK(sample_flags.size() == 1);
-
2390  RCHECK(buffer->ReadWriteUInt32(&first_sample_flags));
-
2391  }
-
2392 
-
2393  if (sample_duration_present)
-
2394  DCHECK(sample_durations.size() == sample_count);
-
2395  if (sample_size_present)
-
2396  DCHECK(sample_sizes.size() == sample_count);
-
2397  if (sample_flags_present)
-
2398  DCHECK(sample_flags.size() == sample_count);
-
2399  if (sample_composition_time_offsets_present)
-
2400  DCHECK(sample_composition_time_offsets.size() == sample_count);
-
2401  }
-
2402 
-
2403  for (uint32_t i = 0; i < sample_count; ++i) {
-
2404  if (sample_duration_present)
-
2405  RCHECK(buffer->ReadWriteUInt32(&sample_durations[i]));
-
2406  if (sample_size_present)
-
2407  RCHECK(buffer->ReadWriteUInt32(&sample_sizes[i]));
-
2408  if (sample_flags_present)
-
2409  RCHECK(buffer->ReadWriteUInt32(&sample_flags[i]));
-
2410 
-
2411  if (sample_composition_time_offsets_present) {
-
2412  if (version == 0) {
-
2413  uint32_t sample_offset = sample_composition_time_offsets[i];
-
2414  RCHECK(buffer->ReadWriteUInt32(&sample_offset));
-
2415  sample_composition_time_offsets[i] = sample_offset;
-
2416  } else {
-
2417  int32_t sample_offset = sample_composition_time_offsets[i];
-
2418  RCHECK(buffer->ReadWriteInt32(&sample_offset));
-
2419  sample_composition_time_offsets[i] = sample_offset;
-
2420  }
-
2421  }
-
2422  }
-
2423 
-
2424  if (buffer->Reading()) {
-
2425  if (first_sample_flags_present) {
-
2426  if (sample_flags.size() == 0) {
-
2427  sample_flags.push_back(first_sample_flags);
-
2428  } else {
-
2429  sample_flags[0] = first_sample_flags;
-
2430  }
-
2431  }
-
2432  }
-
2433  return true;
-
2434 }
-
2435 
-
2436 uint32_t TrackFragmentRun::ComputeSizeInternal() {
-
2437  uint32_t box_size = HeaderSize() + sizeof(sample_count);
-
2438  if (flags & kDataOffsetPresentMask)
-
2439  box_size += sizeof(data_offset);
-
2440  if (flags & kFirstSampleFlagsPresentMask)
-
2441  box_size += sizeof(uint32_t);
-
2442  uint32_t fields = (flags & kSampleDurationPresentMask ? 1 : 0) +
-
2443  (flags & kSampleSizePresentMask ? 1 : 0) +
-
2444  (flags & kSampleFlagsPresentMask ? 1 : 0) +
-
2445  (flags & kSampleCompTimeOffsetsPresentMask ? 1 : 0);
-
2446  box_size += fields * sizeof(uint32_t) * sample_count;
-
2447  return box_size;
-
2448 }
-
2449 
-
2450 TrackFragment::TrackFragment() : decode_time_absent(false) {}
-
2451 TrackFragment::~TrackFragment() {}
-
2452 FourCC TrackFragment::BoxType() const { return FOURCC_traf; }
-
2453 
-
2454 bool TrackFragment::ReadWriteInternal(BoxBuffer* buffer) {
-
2455  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2456  buffer->PrepareChildren() &&
-
2457  buffer->ReadWriteChild(&header));
-
2458  if (buffer->Reading()) {
-
2459  DCHECK(buffer->reader());
-
2460  decode_time_absent = !buffer->reader()->ChildExist(&decode_time);
-
2461  if (!decode_time_absent)
-
2462  RCHECK(buffer->ReadWriteChild(&decode_time));
-
2463  RCHECK(buffer->reader()->TryReadChildren(&runs) &&
-
2464  buffer->reader()->TryReadChildren(&sample_group_descriptions) &&
-
2465  buffer->reader()->TryReadChildren(&sample_to_groups));
-
2466  } else {
-
2467  if (!decode_time_absent)
-
2468  RCHECK(buffer->ReadWriteChild(&decode_time));
-
2469  for (uint32_t i = 0; i < runs.size(); ++i)
-
2470  RCHECK(buffer->ReadWriteChild(&runs[i]));
-
2471  for (uint32_t i = 0; i < sample_to_groups.size(); ++i)
-
2472  RCHECK(buffer->ReadWriteChild(&sample_to_groups[i]));
-
2473  for (uint32_t i = 0; i < sample_group_descriptions.size(); ++i)
-
2474  RCHECK(buffer->ReadWriteChild(&sample_group_descriptions[i]));
-
2475  }
-
2476  return buffer->TryReadWriteChild(&auxiliary_size) &&
-
2477  buffer->TryReadWriteChild(&auxiliary_offset) &&
-
2478  buffer->TryReadWriteChild(&sample_encryption);
-
2479 }
-
2480 
-
2481 uint32_t TrackFragment::ComputeSizeInternal() {
-
2482  uint32_t box_size =
-
2483  HeaderSize() + header.ComputeSize() + decode_time.ComputeSize() +
-
2484  auxiliary_size.ComputeSize() + auxiliary_offset.ComputeSize() +
-
2485  sample_encryption.ComputeSize();
-
2486  for (uint32_t i = 0; i < runs.size(); ++i)
-
2487  box_size += runs[i].ComputeSize();
-
2488  for (uint32_t i = 0; i < sample_group_descriptions.size(); ++i)
-
2489  box_size += sample_group_descriptions[i].ComputeSize();
-
2490  for (uint32_t i = 0; i < sample_to_groups.size(); ++i)
-
2491  box_size += sample_to_groups[i].ComputeSize();
-
2492  return box_size;
-
2493 }
-
2494 
-
2495 MovieFragment::MovieFragment() {}
-
2496 MovieFragment::~MovieFragment() {}
-
2497 FourCC MovieFragment::BoxType() const { return FOURCC_moof; }
-
2498 
-
2499 bool MovieFragment::ReadWriteInternal(BoxBuffer* buffer) {
-
2500  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2501  buffer->PrepareChildren() &&
-
2502  buffer->ReadWriteChild(&header));
-
2503  if (buffer->Reading()) {
-
2504  BoxReader* reader = buffer->reader();
-
2505  DCHECK(reader);
-
2506  RCHECK(reader->ReadChildren(&tracks) &&
-
2507  reader->TryReadChildren(&pssh));
-
2508  } else {
-
2509  for (uint32_t i = 0; i < tracks.size(); ++i)
-
2510  RCHECK(buffer->ReadWriteChild(&tracks[i]));
-
2511  for (uint32_t i = 0; i < pssh.size(); ++i)
-
2512  RCHECK(buffer->ReadWriteChild(&pssh[i]));
-
2513  }
-
2514  return true;
-
2515 }
-
2516 
-
2517 uint32_t MovieFragment::ComputeSizeInternal() {
-
2518  uint32_t box_size = HeaderSize() + header.ComputeSize();
-
2519  for (uint32_t i = 0; i < tracks.size(); ++i)
-
2520  box_size += tracks[i].ComputeSize();
-
2521  for (uint32_t i = 0; i < pssh.size(); ++i)
-
2522  box_size += pssh[i].ComputeSize();
-
2523  return box_size;
-
2524 }
-
2525 
-
2526 SegmentIndex::SegmentIndex()
-
2527  : reference_id(0),
-
2528  timescale(0),
-
2529  earliest_presentation_time(0),
-
2530  first_offset(0) {}
-
2531 SegmentIndex::~SegmentIndex() {}
-
2532 FourCC SegmentIndex::BoxType() const { return FOURCC_sidx; }
-
2533 
-
2534 bool SegmentIndex::ReadWriteInternal(BoxBuffer* buffer) {
-
2535  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2536  buffer->ReadWriteUInt32(&reference_id) &&
-
2537  buffer->ReadWriteUInt32(&timescale));
-
2538 
-
2539  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
-
2540  RCHECK(
-
2541  buffer->ReadWriteUInt64NBytes(&earliest_presentation_time, num_bytes) &&
-
2542  buffer->ReadWriteUInt64NBytes(&first_offset, num_bytes));
-
2543 
-
2544  uint16_t reference_count = references.size();
-
2545  RCHECK(buffer->IgnoreBytes(2) && // reserved.
-
2546  buffer->ReadWriteUInt16(&reference_count));
-
2547  references.resize(reference_count);
-
2548 
-
2549  uint32_t reference_type_size;
-
2550  uint32_t sap;
-
2551  for (uint32_t i = 0; i < reference_count; ++i) {
-
2552  if (!buffer->Reading()) {
-
2553  reference_type_size = references[i].referenced_size;
-
2554  if (references[i].reference_type)
-
2555  reference_type_size |= (1 << 31);
-
2556  sap = (references[i].sap_type << 28) | references[i].sap_delta_time;
-
2557  if (references[i].starts_with_sap)
-
2558  sap |= (1 << 31);
-
2559  }
-
2560  RCHECK(buffer->ReadWriteUInt32(&reference_type_size) &&
-
2561  buffer->ReadWriteUInt32(&references[i].subsegment_duration) &&
-
2562  buffer->ReadWriteUInt32(&sap));
-
2563  if (buffer->Reading()) {
-
2564  references[i].reference_type = (reference_type_size >> 31) ? true : false;
-
2565  references[i].referenced_size = reference_type_size & ~(1 << 31);
-
2566  references[i].starts_with_sap = (sap >> 31) ? true : false;
-
2567  references[i].sap_type =
-
2568  static_cast<SegmentReference::SAPType>((sap >> 28) & 0x07);
-
2569  references[i].sap_delta_time = sap & ~(0xF << 28);
-
2570  }
-
2571  }
-
2572  return true;
-
2573 }
-
2574 
-
2575 uint32_t SegmentIndex::ComputeSizeInternal() {
-
2576  version = IsFitIn32Bits(earliest_presentation_time, first_offset) ? 0 : 1;
-
2577  return HeaderSize() + sizeof(reference_id) + sizeof(timescale) +
-
2578  sizeof(uint32_t) * (1 + version) * 2 + 2 * sizeof(uint16_t) +
-
2579  3 * sizeof(uint32_t) * references.size();
-
2580 }
-
2581 
-
2582 MediaData::MediaData() : data_size(0) {}
-
2583 MediaData::~MediaData() {}
-
2584 FourCC MediaData::BoxType() const { return FOURCC_mdat; }
-
2585 
-
2586 bool MediaData::ReadWriteInternal(BoxBuffer* buffer) {
-
2587  NOTIMPLEMENTED() << "Actual data is parsed and written separately.";
-
2588  return false;
-
2589 }
-
2590 
-
2591 uint32_t MediaData::ComputeSizeInternal() {
-
2592  return HeaderSize() + data_size;
-
2593 }
-
2594 
-
2595 CueSourceIDBox::CueSourceIDBox() : source_id(kCueSourceIdNotSet) {}
-
2596 CueSourceIDBox::~CueSourceIDBox() {}
-
2597 
-
2598 FourCC CueSourceIDBox::BoxType() const { return FOURCC_vsid; }
-
2599 
-
2600 bool CueSourceIDBox::ReadWriteInternal(BoxBuffer* buffer) {
-
2601  RCHECK(ReadWriteHeaderInternal(buffer) && buffer->ReadWriteInt32(&source_id));
-
2602  return true;
-
2603 }
-
2604 
-
2605 uint32_t CueSourceIDBox::ComputeSizeInternal() {
-
2606  if (source_id == kCueSourceIdNotSet)
-
2607  return 0;
-
2608  return HeaderSize() + sizeof(source_id);
-
2609 }
-
2610 
-
2611 CueTimeBox::CueTimeBox() {}
-
2612 CueTimeBox::~CueTimeBox() {}
-
2613 
-
2614 FourCC CueTimeBox::BoxType() const {
-
2615  return FOURCC_ctim;
-
2616 }
-
2617 
-
2618 bool CueTimeBox::ReadWriteInternal(BoxBuffer* buffer) {
-
2619  RCHECK(ReadWriteHeaderInternal(buffer));
-
2620  return buffer->ReadWriteString(
-
2621  &cue_current_time,
-
2622  buffer->Reading() ? buffer->BytesLeft() : cue_current_time.size());
-
2623 }
-
2624 
-
2625 uint32_t CueTimeBox::ComputeSizeInternal() {
-
2626  if (cue_current_time.empty())
-
2627  return 0;
-
2628  return HeaderSize() + cue_current_time.size();
-
2629 }
-
2630 
-
2631 CueIDBox::CueIDBox() {}
-
2632 CueIDBox::~CueIDBox() {}
-
2633 
-
2634 FourCC CueIDBox::BoxType() const {
-
2635  return FOURCC_iden;
-
2636 }
-
2637 
-
2638 bool CueIDBox::ReadWriteInternal(BoxBuffer* buffer) {
-
2639  RCHECK(ReadWriteHeaderInternal(buffer));
-
2640  return buffer->ReadWriteString(
-
2641  &cue_id, buffer->Reading() ? buffer->BytesLeft() : cue_id.size());
-
2642 }
-
2643 
-
2644 uint32_t CueIDBox::ComputeSizeInternal() {
-
2645  if (cue_id.empty())
-
2646  return 0;
-
2647  return HeaderSize() + cue_id.size();
-
2648 }
-
2649 
-
2650 CueSettingsBox::CueSettingsBox() {}
-
2651 CueSettingsBox::~CueSettingsBox() {}
-
2652 
-
2653 FourCC CueSettingsBox::BoxType() const {
-
2654  return FOURCC_sttg;
-
2655 }
-
2656 
-
2657 bool CueSettingsBox::ReadWriteInternal(BoxBuffer* buffer) {
-
2658  RCHECK(ReadWriteHeaderInternal(buffer));
-
2659  return buffer->ReadWriteString(
-
2660  &settings, buffer->Reading() ? buffer->BytesLeft() : settings.size());
-
2661 }
-
2662 
-
2663 uint32_t CueSettingsBox::ComputeSizeInternal() {
-
2664  if (settings.empty())
-
2665  return 0;
-
2666  return HeaderSize() + settings.size();
-
2667 }
-
2668 
-
2669 CuePayloadBox::CuePayloadBox() {}
-
2670 CuePayloadBox::~CuePayloadBox() {}
-
2671 
-
2672 FourCC CuePayloadBox::BoxType() const {
-
2673  return FOURCC_payl;
-
2674 }
-
2675 
-
2676 bool CuePayloadBox::ReadWriteInternal(BoxBuffer* buffer) {
-
2677  RCHECK(ReadWriteHeaderInternal(buffer));
-
2678  return buffer->ReadWriteString(
-
2679  &cue_text, buffer->Reading() ? buffer->BytesLeft() : cue_text.size());
-
2680 }
-
2681 
-
2682 uint32_t CuePayloadBox::ComputeSizeInternal() {
-
2683  return HeaderSize() + cue_text.size();
-
2684 }
-
2685 
-
2686 VTTEmptyCueBox::VTTEmptyCueBox() {}
-
2687 VTTEmptyCueBox::~VTTEmptyCueBox() {}
-
2688 
-
2689 FourCC VTTEmptyCueBox::BoxType() const {
-
2690  return FOURCC_vtte;
-
2691 }
-
2692 
-
2693 bool VTTEmptyCueBox::ReadWriteInternal(BoxBuffer* buffer) {
-
2694  return ReadWriteHeaderInternal(buffer);
-
2695 }
-
2696 
-
2697 uint32_t VTTEmptyCueBox::ComputeSizeInternal() {
-
2698  return HeaderSize();
-
2699 }
-
2700 
-
2701 VTTAdditionalTextBox::VTTAdditionalTextBox() {}
-
2702 VTTAdditionalTextBox::~VTTAdditionalTextBox() {}
-
2703 
- -
2705  return FOURCC_vtta;
-
2706 }
-
2707 
-
2708 bool VTTAdditionalTextBox::ReadWriteInternal(BoxBuffer* buffer) {
-
2709  RCHECK(ReadWriteHeaderInternal(buffer));
-
2710  return buffer->ReadWriteString(
-
2711  &cue_additional_text,
-
2712  buffer->Reading() ? buffer->BytesLeft() : cue_additional_text.size());
-
2713 }
-
2714 
-
2715 uint32_t VTTAdditionalTextBox::ComputeSizeInternal() {
-
2716  return HeaderSize() + cue_additional_text.size();
-
2717 }
-
2718 
-
2719 VTTCueBox::VTTCueBox() {}
-
2720 VTTCueBox::~VTTCueBox() {}
-
2721 
-
2722 FourCC VTTCueBox::BoxType() const {
-
2723  return FOURCC_vttc;
-
2724 }
-
2725 
-
2726 bool VTTCueBox::ReadWriteInternal(BoxBuffer* buffer) {
-
2727  RCHECK(ReadWriteHeaderInternal(buffer) &&
-
2728  buffer->PrepareChildren() &&
-
2729  buffer->ReadWriteChild(&cue_source_id) &&
-
2730  buffer->ReadWriteChild(&cue_id) &&
-
2731  buffer->ReadWriteChild(&cue_time) &&
-
2732  buffer->ReadWriteChild(&cue_settings) &&
-
2733  buffer->ReadWriteChild(&cue_payload));
-
2734  return true;
-
2735 }
-
2736 
-
2737 uint32_t VTTCueBox::ComputeSizeInternal() {
-
2738  return HeaderSize() + cue_source_id.ComputeSize() + cue_id.ComputeSize() +
-
2739  cue_time.ComputeSize() + cue_settings.ComputeSize() +
-
2740  cue_payload.ComputeSize();
-
2741 }
-
2742 
-
2743 } // namespace mp4
-
2744 } // namespace media
-
2745 } // namespace shaka
-
FourCC BoxType() const override
- - +
1540  buffer->ReadWriteUInt32(&video_resolution) &&
+
1541  buffer->IgnoreBytes(4) && // reserved.
+
1542  buffer->ReadWriteUInt16(&video_frame_count) &&
+
1543  buffer->ReadWriteVector(&compressor_name, kCompressorNameSize) &&
+
1544  buffer->ReadWriteUInt16(&video_depth) &&
+
1545  buffer->ReadWriteInt16(&predefined));
+
1546 
+
1547  RCHECK(buffer->PrepareChildren());
+
1548 
+
1549  if (format == FOURCC_encv) {
+
1550  if (buffer->Reading()) {
+
1551  // Continue scanning until a supported protection scheme is found, or
+
1552  // until we run out of protection schemes.
+
1553  while (!IsProtectionSchemeSupported(sinf.type.type))
+
1554  RCHECK(buffer->ReadWriteChild(&sinf));
+
1555  } else {
+
1556  DCHECK(IsProtectionSchemeSupported(sinf.type.type));
+
1557  RCHECK(buffer->ReadWriteChild(&sinf));
+
1558  }
+
1559  }
+
1560 
+
1561  const FourCC actual_format = GetActualFormat();
+
1562  if (buffer->Reading()) {
+
1563  codec_configuration.box_type = GetCodecConfigurationBoxType(actual_format);
+
1564  } else {
+
1565  DCHECK_EQ(codec_configuration.box_type,
+
1566  GetCodecConfigurationBoxType(actual_format));
+
1567  }
+
1568  DCHECK_NE(codec_configuration.box_type, FOURCC_NULL);
+
1569 
+
1570  RCHECK(buffer->ReadWriteChild(&codec_configuration));
+
1571  RCHECK(buffer->TryReadWriteChild(&pixel_aspect));
+
1572  return true;
+
1573 }
+
1574 
+
1575 uint32_t VideoSampleEntry::ComputeSizeInternal() {
+
1576  const FourCC actual_format = GetActualFormat();
+
1577  if (actual_format == FOURCC_NULL)
+
1578  return 0;
+
1579  codec_configuration.box_type = GetCodecConfigurationBoxType(actual_format);
+
1580  DCHECK_NE(codec_configuration.box_type, FOURCC_NULL);
+
1581  return HeaderSize() + sizeof(data_reference_index) + sizeof(width) +
+
1582  sizeof(height) + sizeof(kVideoResolution) * 2 +
+
1583  sizeof(kVideoFrameCount) + sizeof(kVideoDepth) +
+
1584  pixel_aspect.ComputeSize() + sinf.ComputeSize() +
+
1585  codec_configuration.ComputeSize() + kCompressorNameSize + 6 + 4 + 16 +
+
1586  2; // 6 + 4 bytes reserved, 16 + 2 bytes predefined.
+
1587 }
+
1588 
+
1589 FourCC VideoSampleEntry::GetCodecConfigurationBoxType(FourCC format) const {
+
1590  switch (format) {
+
1591  case FOURCC_avc1:
+
1592  return FOURCC_avcC;
+
1593  case FOURCC_hev1:
+
1594  case FOURCC_hvc1:
+
1595  return FOURCC_hvcC;
+
1596  case FOURCC_vp08:
+
1597  case FOURCC_vp09:
+
1598  case FOURCC_vp10:
+
1599  return FOURCC_vpcC;
+
1600  default:
+
1601  LOG(ERROR) << FourCCToString(format) << " is not supported.";
+
1602  return FOURCC_NULL;
+
1603  }
+
1604 }
+
1605 
+
1606 ElementaryStreamDescriptor::ElementaryStreamDescriptor() {}
+
1607 ElementaryStreamDescriptor::~ElementaryStreamDescriptor() {}
+
1608 FourCC ElementaryStreamDescriptor::BoxType() const { return FOURCC_esds; }
+
1609 
+
1610 bool ElementaryStreamDescriptor::ReadWriteInternal(BoxBuffer* buffer) {
+
1611  RCHECK(ReadWriteHeaderInternal(buffer));
+
1612  if (buffer->Reading()) {
+
1613  std::vector<uint8_t> data;
+
1614  RCHECK(buffer->ReadWriteVector(&data, buffer->BytesLeft()));
+
1615  RCHECK(es_descriptor.Parse(data));
+
1616  if (es_descriptor.IsAAC()) {
+
1617  RCHECK(aac_audio_specific_config.Parse(
+
1618  es_descriptor.decoder_specific_info()));
+
1619  }
+
1620  } else {
+
1621  DCHECK(buffer->writer());
+
1622  es_descriptor.Write(buffer->writer());
+
1623  }
+
1624  return true;
+
1625 }
+
1626 
+
1627 uint32_t ElementaryStreamDescriptor::ComputeSizeInternal() {
+
1628  // This box is optional. Skip it if not initialized.
+
1629  if (es_descriptor.object_type() == kForbidden)
+
1630  return 0;
+
1631  return HeaderSize() + es_descriptor.ComputeSize();
+
1632 }
+
1633 
+
1634 DTSSpecific::DTSSpecific()
+
1635  : sampling_frequency(0),
+
1636  max_bitrate(0),
+
1637  avg_bitrate(0),
+
1638  pcm_sample_depth(0) {}
+
1639 DTSSpecific::~DTSSpecific() {}
+
1640 FourCC DTSSpecific::BoxType() const { return FOURCC_ddts; }
+
1641 
+
1642 bool DTSSpecific::ReadWriteInternal(BoxBuffer* buffer) {
+
1643  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1644  buffer->ReadWriteUInt32(&sampling_frequency) &&
+
1645  buffer->ReadWriteUInt32(&max_bitrate) &&
+
1646  buffer->ReadWriteUInt32(&avg_bitrate) &&
+
1647  buffer->ReadWriteUInt8(&pcm_sample_depth));
+
1648 
+
1649  if (buffer->Reading()) {
+
1650  RCHECK(buffer->ReadWriteVector(&extra_data, buffer->BytesLeft()));
+
1651  } else {
+
1652  if (extra_data.empty()) {
+
1653  extra_data.assign(kDdtsExtraData,
+
1654  kDdtsExtraData + sizeof(kDdtsExtraData));
+
1655  }
+
1656  RCHECK(buffer->ReadWriteVector(&extra_data, extra_data.size()));
+
1657  }
+
1658  return true;
+
1659 }
+
1660 
+
1661 uint32_t DTSSpecific::ComputeSizeInternal() {
+
1662  // This box is optional. Skip it if not initialized.
+
1663  if (sampling_frequency == 0)
+
1664  return 0;
+
1665  return HeaderSize() + sizeof(sampling_frequency) + sizeof(max_bitrate) +
+
1666  sizeof(avg_bitrate) + sizeof(pcm_sample_depth) +
+
1667  sizeof(kDdtsExtraData);
+
1668 }
+
1669 
+
1670 AC3Specific::AC3Specific() {}
+
1671 AC3Specific::~AC3Specific() {}
+
1672 
+
1673 FourCC AC3Specific::BoxType() const { return FOURCC_dac3; }
+
1674 
+
1675 bool AC3Specific::ReadWriteInternal(BoxBuffer* buffer) {
+
1676  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1677  buffer->ReadWriteVector(
+
1678  &data, buffer->Reading() ? buffer->BytesLeft() : data.size()));
+
1679  return true;
+
1680 }
+
1681 
+
1682 uint32_t AC3Specific::ComputeSizeInternal() {
+
1683  // This box is optional. Skip it if not initialized.
+
1684  if (data.empty())
+
1685  return 0;
+
1686  return HeaderSize() + data.size();
+
1687 }
+
1688 
+
1689 EC3Specific::EC3Specific() {}
+
1690 EC3Specific::~EC3Specific() {}
+
1691 
+
1692 FourCC EC3Specific::BoxType() const { return FOURCC_dec3; }
+
1693 
+
1694 bool EC3Specific::ReadWriteInternal(BoxBuffer* buffer) {
+
1695  RCHECK(ReadWriteHeaderInternal(buffer));
+
1696  uint32_t size = buffer->Reading() ? buffer->BytesLeft() : data.size();
+
1697  RCHECK(buffer->ReadWriteVector(&data, size));
+
1698  return true;
+
1699 }
+
1700 
+
1701 uint32_t EC3Specific::ComputeSizeInternal() {
+
1702  // This box is optional. Skip it if not initialized.
+
1703  if (data.empty())
+
1704  return 0;
+
1705  return HeaderSize() + data.size();
+
1706 }
+
1707 
+
1708 OpusSpecific::OpusSpecific() : preskip(0) {}
+
1709 OpusSpecific::~OpusSpecific() {}
+
1710 
+
1711 FourCC OpusSpecific::BoxType() const { return FOURCC_dOps; }
+
1712 
+
1713 bool OpusSpecific::ReadWriteInternal(BoxBuffer* buffer) {
+
1714  RCHECK(ReadWriteHeaderInternal(buffer));
+
1715  if (buffer->Reading()) {
+
1716  std::vector<uint8_t> data;
+
1717  const int kMinOpusSpecificBoxDataSize = 11;
+
1718  RCHECK(buffer->BytesLeft() >= kMinOpusSpecificBoxDataSize);
+
1719  RCHECK(buffer->ReadWriteVector(&data, buffer->BytesLeft()));
+
1720  preskip = data[2] + (data[3] << 8);
+
1721 
+
1722  // https://tools.ietf.org/html/draft-ietf-codec-oggopus-06#section-5
+
1723  BufferWriter writer;
+
1724  writer.AppendInt(FOURCC_Opus);
+
1725  writer.AppendInt(FOURCC_Head);
+
1726  // The version must always be 1.
+
1727  const uint8_t kOpusIdentificationHeaderVersion = 1;
+
1728  data[0] = kOpusIdentificationHeaderVersion;
+
1729  writer.AppendVector(data);
+
1730  writer.SwapBuffer(&opus_identification_header);
+
1731  } else {
+
1732  // https://tools.ietf.org/html/draft-ietf-codec-oggopus-06#section-5
+
1733  // The first 8 bytes is "magic signature".
+
1734  const size_t kOpusMagicSignatureSize = 8u;
+
1735  DCHECK_GT(opus_identification_header.size(), kOpusMagicSignatureSize);
+
1736  // https://www.opus-codec.org/docs/opus_in_isobmff.html
+
1737  // The version field shall be set to 0.
+
1738  const uint8_t kOpusSpecificBoxVersion = 0;
+
1739  buffer->writer()->AppendInt(kOpusSpecificBoxVersion);
+
1740  buffer->writer()->AppendArray(
+
1741  &opus_identification_header[kOpusMagicSignatureSize + 1],
+
1742  opus_identification_header.size() - kOpusMagicSignatureSize - 1);
+
1743  }
+
1744  return true;
+
1745 }
+
1746 
+
1747 uint32_t OpusSpecific::ComputeSizeInternal() {
+
1748  // This box is optional. Skip it if not initialized.
+
1749  if (opus_identification_header.empty())
+
1750  return 0;
+
1751  // https://tools.ietf.org/html/draft-ietf-codec-oggopus-06#section-5
+
1752  // The first 8 bytes is "magic signature".
+
1753  const size_t kOpusMagicSignatureSize = 8u;
+
1754  DCHECK_GT(opus_identification_header.size(), kOpusMagicSignatureSize);
+
1755  return HeaderSize() + opus_identification_header.size() -
+
1756  kOpusMagicSignatureSize;
+
1757 }
+
1758 
+
1759 AudioSampleEntry::AudioSampleEntry()
+
1760  : format(FOURCC_NULL),
+
1761  data_reference_index(1),
+
1762  channelcount(2),
+
1763  samplesize(16),
+
1764  samplerate(0) {}
+
1765 
+
1766 AudioSampleEntry::~AudioSampleEntry() {}
+
1767 
+ +
1769  if (format == FOURCC_NULL) {
+
1770  LOG(ERROR) << "AudioSampleEntry should be parsed according to the "
+
1771  << "handler type recovered in its Media ancestor.";
+
1772  }
+
1773  return format;
+
1774 }
+
1775 
+
1776 bool AudioSampleEntry::ReadWriteInternal(BoxBuffer* buffer) {
+
1777  if (buffer->Reading()) {
+
1778  DCHECK(buffer->reader());
+
1779  format = buffer->reader()->type();
+
1780  } else {
+
1781  RCHECK(ReadWriteHeaderInternal(buffer));
+
1782  }
+
1783 
+
1784  // Convert from integer to 16.16 fixed point for writing.
+
1785  samplerate <<= 16;
+
1786  RCHECK(buffer->IgnoreBytes(6) && // reserved.
+
1787  buffer->ReadWriteUInt16(&data_reference_index) &&
+
1788  buffer->IgnoreBytes(8) && // reserved.
+
1789  buffer->ReadWriteUInt16(&channelcount) &&
+
1790  buffer->ReadWriteUInt16(&samplesize) &&
+
1791  buffer->IgnoreBytes(4) && // predefined.
+
1792  buffer->ReadWriteUInt32(&samplerate));
+
1793  // Convert from 16.16 fixed point to integer.
+
1794  samplerate >>= 16;
+
1795 
+
1796  RCHECK(buffer->PrepareChildren());
+
1797  if (format == FOURCC_enca) {
+
1798  if (buffer->Reading()) {
+
1799  // Continue scanning until a supported protection scheme is found, or
+
1800  // until we run out of protection schemes.
+
1801  while (!IsProtectionSchemeSupported(sinf.type.type))
+
1802  RCHECK(buffer->ReadWriteChild(&sinf));
+
1803  } else {
+
1804  DCHECK(IsProtectionSchemeSupported(sinf.type.type));
+
1805  RCHECK(buffer->ReadWriteChild(&sinf));
+
1806  }
+
1807  }
+
1808 
+
1809  RCHECK(buffer->TryReadWriteChild(&esds));
+
1810  RCHECK(buffer->TryReadWriteChild(&ddts));
+
1811  RCHECK(buffer->TryReadWriteChild(&dac3));
+
1812  RCHECK(buffer->TryReadWriteChild(&dec3));
+
1813  RCHECK(buffer->TryReadWriteChild(&dops));
+
1814  return true;
+
1815 }
+
1816 
+
1817 uint32_t AudioSampleEntry::ComputeSizeInternal() {
+
1818  if (GetActualFormat() == FOURCC_NULL)
+
1819  return 0;
+
1820  return HeaderSize() + sizeof(data_reference_index) + sizeof(channelcount) +
+
1821  sizeof(samplesize) + sizeof(samplerate) + sinf.ComputeSize() +
+
1822  esds.ComputeSize() + ddts.ComputeSize() + dac3.ComputeSize() +
+
1823  dec3.ComputeSize() + dops.ComputeSize() +
+
1824  6 + 8 + // 6 + 8 bytes reserved.
+
1825  4; // 4 bytes predefined.
+
1826 }
+
1827 
+
1828 WebVTTConfigurationBox::WebVTTConfigurationBox() {}
+
1829 WebVTTConfigurationBox::~WebVTTConfigurationBox() {}
+
1830 
+ +
1832  return FOURCC_vttC;
+
1833 }
+
1834 
+
1835 bool WebVTTConfigurationBox::ReadWriteInternal(BoxBuffer* buffer) {
+
1836  RCHECK(ReadWriteHeaderInternal(buffer));
+
1837  return buffer->ReadWriteString(
+
1838  &config,
+
1839  buffer->Reading() ? buffer->BytesLeft() : config.size());
+
1840 }
+
1841 
+
1842 uint32_t WebVTTConfigurationBox::ComputeSizeInternal() {
+
1843  return HeaderSize() + config.size();
+
1844 }
+
1845 
+
1846 WebVTTSourceLabelBox::WebVTTSourceLabelBox() {}
+
1847 WebVTTSourceLabelBox::~WebVTTSourceLabelBox() {}
+
1848 
+ +
1850  return FOURCC_vlab;
+
1851 }
+
1852 
+
1853 bool WebVTTSourceLabelBox::ReadWriteInternal(BoxBuffer* buffer) {
+
1854  RCHECK(ReadWriteHeaderInternal(buffer));
+
1855  return buffer->ReadWriteString(&source_label, buffer->Reading()
+
1856  ? buffer->BytesLeft()
+
1857  : source_label.size());
+
1858 }
+
1859 
+
1860 uint32_t WebVTTSourceLabelBox::ComputeSizeInternal() {
+
1861  if (source_label.empty())
+
1862  return 0;
+
1863  return HeaderSize() + source_label.size();
+
1864 }
+
1865 
+
1866 TextSampleEntry::TextSampleEntry() : format(FOURCC_NULL) {}
+
1867 TextSampleEntry::~TextSampleEntry() {}
+
1868 
+ +
1870  if (format == FOURCC_NULL) {
+
1871  LOG(ERROR) << "TextSampleEntry should be parsed according to the "
+
1872  << "handler type recovered in its Media ancestor.";
+
1873  }
+
1874  return format;
+
1875 }
+
1876 
+
1877 bool TextSampleEntry::ReadWriteInternal(BoxBuffer* buffer) {
+
1878  if (buffer->Reading()) {
+
1879  DCHECK(buffer->reader());
+
1880  format = buffer->reader()->type();
+
1881  } else {
+
1882  RCHECK(ReadWriteHeaderInternal(buffer));
+
1883  }
+
1884  RCHECK(buffer->IgnoreBytes(6) && // reserved for SampleEntry.
+
1885  buffer->ReadWriteUInt16(&data_reference_index));
+
1886 
+
1887  if (format == FOURCC_wvtt) {
+
1888  // TODO(rkuroiwa): Handle the optional MPEG4BitRateBox.
+
1889  RCHECK(buffer->PrepareChildren() &&
+
1890  buffer->ReadWriteChild(&config) &&
+
1891  buffer->ReadWriteChild(&label));
+
1892  }
+
1893  return true;
+
1894 }
+
1895 
+
1896 uint32_t TextSampleEntry::ComputeSizeInternal() {
+
1897  // 6 for the (anonymous) reserved bytes for SampleEntry class.
+
1898  return HeaderSize() + 6 + sizeof(data_reference_index) +
+
1899  config.ComputeSize() + label.ComputeSize();
+
1900 }
+
1901 
+
1902 MediaHeader::MediaHeader()
+
1903  : creation_time(0), modification_time(0), timescale(0), duration(0) {}
+
1904 MediaHeader::~MediaHeader() {}
+
1905 FourCC MediaHeader::BoxType() const { return FOURCC_mdhd; }
+
1906 
+
1907 bool MediaHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
1908  RCHECK(ReadWriteHeaderInternal(buffer));
+
1909 
+
1910  uint8_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
+
1911  RCHECK(buffer->ReadWriteUInt64NBytes(&creation_time, num_bytes) &&
+
1912  buffer->ReadWriteUInt64NBytes(&modification_time, num_bytes) &&
+
1913  buffer->ReadWriteUInt32(&timescale) &&
+
1914  buffer->ReadWriteUInt64NBytes(&duration, num_bytes) &&
+
1915  language.ReadWrite(buffer) &&
+
1916  buffer->IgnoreBytes(2)); // predefined.
+
1917  return true;
+
1918 }
+
1919 
+
1920 uint32_t MediaHeader::ComputeSizeInternal() {
+
1921  version = IsFitIn32Bits(creation_time, modification_time, duration) ? 0 : 1;
+
1922  return HeaderSize() + sizeof(timescale) +
+
1923  sizeof(uint32_t) * (1 + version) * 3 + language.ComputeSize() +
+
1924  2; // 2 bytes predefined.
+
1925 }
+
1926 
+
1927 VideoMediaHeader::VideoMediaHeader()
+
1928  : graphicsmode(0), opcolor_red(0), opcolor_green(0), opcolor_blue(0) {
+
1929  const uint32_t kVideoMediaHeaderFlags = 1;
+
1930  flags = kVideoMediaHeaderFlags;
+
1931 }
+
1932 VideoMediaHeader::~VideoMediaHeader() {}
+
1933 FourCC VideoMediaHeader::BoxType() const { return FOURCC_vmhd; }
+
1934 bool VideoMediaHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
1935  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1936  buffer->ReadWriteUInt16(&graphicsmode) &&
+
1937  buffer->ReadWriteUInt16(&opcolor_red) &&
+
1938  buffer->ReadWriteUInt16(&opcolor_green) &&
+
1939  buffer->ReadWriteUInt16(&opcolor_blue));
+
1940  return true;
+
1941 }
+
1942 
+
1943 uint32_t VideoMediaHeader::ComputeSizeInternal() {
+
1944  return HeaderSize() + sizeof(graphicsmode) + sizeof(opcolor_red) +
+
1945  sizeof(opcolor_green) + sizeof(opcolor_blue);
+
1946 }
+
1947 
+
1948 SoundMediaHeader::SoundMediaHeader() : balance(0) {}
+
1949 SoundMediaHeader::~SoundMediaHeader() {}
+
1950 FourCC SoundMediaHeader::BoxType() const { return FOURCC_smhd; }
+
1951 bool SoundMediaHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
1952  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
1953  buffer->ReadWriteUInt16(&balance) &&
+
1954  buffer->IgnoreBytes(2)); // reserved.
+
1955  return true;
+
1956 }
+
1957 
+
1958 uint32_t SoundMediaHeader::ComputeSizeInternal() {
+
1959  return HeaderSize() + sizeof(balance) + sizeof(uint16_t);
+
1960 }
+
1961 
+
1962 SubtitleMediaHeader::SubtitleMediaHeader() {}
+
1963 SubtitleMediaHeader::~SubtitleMediaHeader() {}
+
1964 
+
1965 FourCC SubtitleMediaHeader::BoxType() const { return FOURCC_sthd; }
+
1966 
+
1967 bool SubtitleMediaHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
1968  return ReadWriteHeaderInternal(buffer);
+
1969 }
+
1970 
+
1971 uint32_t SubtitleMediaHeader::ComputeSizeInternal() {
+
1972  return HeaderSize();
+
1973 }
+
1974 
+
1975 DataEntryUrl::DataEntryUrl() {
+
1976  const uint32_t kDataEntryUrlFlags = 1;
+
1977  flags = kDataEntryUrlFlags;
+
1978 }
+
1979 DataEntryUrl::~DataEntryUrl() {}
+
1980 FourCC DataEntryUrl::BoxType() const { return FOURCC_url; }
+
1981 bool DataEntryUrl::ReadWriteInternal(BoxBuffer* buffer) {
+
1982  RCHECK(ReadWriteHeaderInternal(buffer));
+
1983  if (buffer->Reading()) {
+
1984  RCHECK(buffer->ReadWriteVector(&location, buffer->BytesLeft()));
+
1985  } else {
+
1986  RCHECK(buffer->ReadWriteVector(&location, location.size()));
+
1987  }
+
1988  return true;
+
1989 }
+
1990 
+
1991 uint32_t DataEntryUrl::ComputeSizeInternal() {
+
1992  return HeaderSize() + location.size();
+
1993 }
+
1994 
+
1995 DataReference::DataReference() {
+
1996  // Default 1 entry.
+
1997  data_entry.resize(1);
+
1998 }
+
1999 DataReference::~DataReference() {}
+
2000 FourCC DataReference::BoxType() const { return FOURCC_dref; }
+
2001 bool DataReference::ReadWriteInternal(BoxBuffer* buffer) {
+
2002  uint32_t entry_count = data_entry.size();
+
2003  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2004  buffer->ReadWriteUInt32(&entry_count));
+
2005  data_entry.resize(entry_count);
+
2006  RCHECK(buffer->PrepareChildren());
+
2007  for (uint32_t i = 0; i < entry_count; ++i)
+
2008  RCHECK(buffer->ReadWriteChild(&data_entry[i]));
+
2009  return true;
+
2010 }
+
2011 
+
2012 uint32_t DataReference::ComputeSizeInternal() {
+
2013  uint32_t count = data_entry.size();
+
2014  uint32_t box_size = HeaderSize() + sizeof(count);
+
2015  for (uint32_t i = 0; i < count; ++i)
+
2016  box_size += data_entry[i].ComputeSize();
+
2017  return box_size;
+
2018 }
+
2019 
+
2020 DataInformation::DataInformation() {}
+
2021 DataInformation::~DataInformation() {}
+
2022 FourCC DataInformation::BoxType() const { return FOURCC_dinf; }
+
2023 
+
2024 bool DataInformation::ReadWriteInternal(BoxBuffer* buffer) {
+
2025  return ReadWriteHeaderInternal(buffer) &&
+
2026  buffer->PrepareChildren() &&
+
2027  buffer->ReadWriteChild(&dref);
+
2028 }
+
2029 
+
2030 uint32_t DataInformation::ComputeSizeInternal() {
+
2031  return HeaderSize() + dref.ComputeSize();
+
2032 }
+
2033 
+
2034 MediaInformation::MediaInformation() {}
+
2035 MediaInformation::~MediaInformation() {}
+
2036 FourCC MediaInformation::BoxType() const { return FOURCC_minf; }
+
2037 
+
2038 bool MediaInformation::ReadWriteInternal(BoxBuffer* buffer) {
+
2039  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2040  buffer->PrepareChildren() &&
+
2041  buffer->ReadWriteChild(&dinf) &&
+
2042  buffer->ReadWriteChild(&sample_table));
+
2043  switch (sample_table.description.type) {
+
2044  case kVideo:
+
2045  RCHECK(buffer->ReadWriteChild(&vmhd));
+
2046  break;
+
2047  case kAudio:
+
2048  RCHECK(buffer->ReadWriteChild(&smhd));
+
2049  break;
+
2050  case kText:
+
2051  RCHECK(buffer->TryReadWriteChild(&sthd));
+
2052  break;
+
2053  default:
+
2054  NOTIMPLEMENTED();
+
2055  }
+
2056  // Hint is not supported for now.
+
2057  return true;
+
2058 }
+
2059 
+
2060 uint32_t MediaInformation::ComputeSizeInternal() {
+
2061  uint32_t box_size =
+
2062  HeaderSize() + dinf.ComputeSize() + sample_table.ComputeSize();
+
2063  switch (sample_table.description.type) {
+
2064  case kVideo:
+
2065  box_size += vmhd.ComputeSize();
+
2066  break;
+
2067  case kAudio:
+
2068  box_size += smhd.ComputeSize();
+
2069  break;
+
2070  case kText:
+
2071  box_size += sthd.ComputeSize();
+
2072  break;
+
2073  default:
+
2074  NOTIMPLEMENTED();
+
2075  }
+
2076  return box_size;
+
2077 }
+
2078 
+
2079 Media::Media() {}
+
2080 Media::~Media() {}
+
2081 FourCC Media::BoxType() const { return FOURCC_mdia; }
+
2082 
+
2083 bool Media::ReadWriteInternal(BoxBuffer* buffer) {
+
2084  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2085  buffer->PrepareChildren() &&
+
2086  buffer->ReadWriteChild(&header));
+
2087  if (buffer->Reading()) {
+
2088  RCHECK(buffer->ReadWriteChild(&handler));
+
2089  // Maddeningly, the HandlerReference box specifies how to parse the
+
2090  // SampleDescription box, making the latter the only box (of those that we
+
2091  // support) which cannot be parsed correctly on its own (or even with
+
2092  // information from its strict ancestor tree). We thus copy the handler type
+
2093  // to the sample description box *before* parsing it to provide this
+
2094  // information while parsing.
+
2095  information.sample_table.description.type =
+
2096  FourCCToTrackType(handler.handler_type);
+
2097  } else {
+
2098  handler.handler_type =
+
2099  TrackTypeToFourCC(information.sample_table.description.type);
+
2100  RCHECK(handler.handler_type != FOURCC_NULL);
+
2101  RCHECK(buffer->ReadWriteChild(&handler));
+
2102  }
+
2103  RCHECK(buffer->ReadWriteChild(&information));
+
2104  return true;
+
2105 }
+
2106 
+
2107 uint32_t Media::ComputeSizeInternal() {
+
2108  handler.handler_type =
+
2109  TrackTypeToFourCC(information.sample_table.description.type);
+
2110  return HeaderSize() + header.ComputeSize() + handler.ComputeSize() +
+
2111  information.ComputeSize();
+
2112 }
+
2113 
+
2114 Track::Track() {}
+
2115 Track::~Track() {}
+
2116 FourCC Track::BoxType() const { return FOURCC_trak; }
+
2117 
+
2118 bool Track::ReadWriteInternal(BoxBuffer* buffer) {
+
2119  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2120  buffer->PrepareChildren() &&
+
2121  buffer->ReadWriteChild(&header) &&
+
2122  buffer->ReadWriteChild(&media) &&
+
2123  buffer->TryReadWriteChild(&edit) &&
+
2124  buffer->TryReadWriteChild(&sample_encryption));
+
2125  return true;
+
2126 }
+
2127 
+
2128 uint32_t Track::ComputeSizeInternal() {
+
2129  return HeaderSize() + header.ComputeSize() + media.ComputeSize() +
+
2130  edit.ComputeSize();
+
2131 }
+
2132 
+
2133 MovieExtendsHeader::MovieExtendsHeader() : fragment_duration(0) {}
+
2134 MovieExtendsHeader::~MovieExtendsHeader() {}
+
2135 FourCC MovieExtendsHeader::BoxType() const { return FOURCC_mehd; }
+
2136 
+
2137 bool MovieExtendsHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
2138  RCHECK(ReadWriteHeaderInternal(buffer));
+
2139  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
+
2140  RCHECK(buffer->ReadWriteUInt64NBytes(&fragment_duration, num_bytes));
+
2141  return true;
+
2142 }
+
2143 
+
2144 uint32_t MovieExtendsHeader::ComputeSizeInternal() {
+
2145  // This box is optional. Skip it if it is not used.
+
2146  if (fragment_duration == 0)
+
2147  return 0;
+
2148  version = IsFitIn32Bits(fragment_duration) ? 0 : 1;
+
2149  return HeaderSize() + sizeof(uint32_t) * (1 + version);
+
2150 }
+
2151 
+
2152 TrackExtends::TrackExtends()
+
2153  : track_id(0),
+
2154  default_sample_description_index(0),
+
2155  default_sample_duration(0),
+
2156  default_sample_size(0),
+
2157  default_sample_flags(0) {}
+
2158 TrackExtends::~TrackExtends() {}
+
2159 FourCC TrackExtends::BoxType() const { return FOURCC_trex; }
+
2160 
+
2161 bool TrackExtends::ReadWriteInternal(BoxBuffer* buffer) {
+
2162  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2163  buffer->ReadWriteUInt32(&track_id) &&
+
2164  buffer->ReadWriteUInt32(&default_sample_description_index) &&
+
2165  buffer->ReadWriteUInt32(&default_sample_duration) &&
+
2166  buffer->ReadWriteUInt32(&default_sample_size) &&
+
2167  buffer->ReadWriteUInt32(&default_sample_flags));
+
2168  return true;
+
2169 }
+
2170 
+
2171 uint32_t TrackExtends::ComputeSizeInternal() {
+
2172  return HeaderSize() + sizeof(track_id) +
+
2173  sizeof(default_sample_description_index) +
+
2174  sizeof(default_sample_duration) + sizeof(default_sample_size) +
+
2175  sizeof(default_sample_flags);
+
2176 }
+
2177 
+
2178 MovieExtends::MovieExtends() {}
+
2179 MovieExtends::~MovieExtends() {}
+
2180 FourCC MovieExtends::BoxType() const { return FOURCC_mvex; }
+
2181 
+
2182 bool MovieExtends::ReadWriteInternal(BoxBuffer* buffer) {
+
2183  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2184  buffer->PrepareChildren() &&
+
2185  buffer->TryReadWriteChild(&header));
+
2186  if (buffer->Reading()) {
+
2187  DCHECK(buffer->reader());
+
2188  RCHECK(buffer->reader()->ReadChildren(&tracks));
+
2189  } else {
+
2190  for (uint32_t i = 0; i < tracks.size(); ++i)
+
2191  RCHECK(buffer->ReadWriteChild(&tracks[i]));
+
2192  }
+
2193  return true;
+
2194 }
+
2195 
+
2196 uint32_t MovieExtends::ComputeSizeInternal() {
+
2197  // This box is optional. Skip it if it does not contain any track.
+
2198  if (tracks.size() == 0)
+
2199  return 0;
+
2200  uint32_t box_size = HeaderSize() + header.ComputeSize();
+
2201  for (uint32_t i = 0; i < tracks.size(); ++i)
+
2202  box_size += tracks[i].ComputeSize();
+
2203  return box_size;
+
2204 }
+
2205 
+
2206 Movie::Movie() {}
+
2207 Movie::~Movie() {}
+
2208 FourCC Movie::BoxType() const { return FOURCC_moov; }
+
2209 
+
2210 bool Movie::ReadWriteInternal(BoxBuffer* buffer) {
+
2211  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2212  buffer->PrepareChildren() &&
+
2213  buffer->ReadWriteChild(&header) &&
+
2214  buffer->TryReadWriteChild(&metadata) &&
+
2215  buffer->TryReadWriteChild(&extends));
+
2216  if (buffer->Reading()) {
+
2217  BoxReader* reader = buffer->reader();
+
2218  DCHECK(reader);
+
2219  RCHECK(reader->ReadChildren(&tracks) &&
+
2220  reader->TryReadChildren(&pssh));
+
2221  } else {
+
2222  for (uint32_t i = 0; i < tracks.size(); ++i)
+
2223  RCHECK(buffer->ReadWriteChild(&tracks[i]));
+
2224  for (uint32_t i = 0; i < pssh.size(); ++i)
+
2225  RCHECK(buffer->ReadWriteChild(&pssh[i]));
+
2226  }
+
2227  return true;
+
2228 }
+
2229 
+
2230 uint32_t Movie::ComputeSizeInternal() {
+
2231  uint32_t box_size = HeaderSize() + header.ComputeSize() +
+
2232  metadata.ComputeSize() + extends.ComputeSize();
+
2233  for (uint32_t i = 0; i < tracks.size(); ++i)
+
2234  box_size += tracks[i].ComputeSize();
+
2235  for (uint32_t i = 0; i < pssh.size(); ++i)
+
2236  box_size += pssh[i].ComputeSize();
+
2237  return box_size;
+
2238 }
+
2239 
+
2240 TrackFragmentDecodeTime::TrackFragmentDecodeTime() : decode_time(0) {}
+
2241 TrackFragmentDecodeTime::~TrackFragmentDecodeTime() {}
+
2242 FourCC TrackFragmentDecodeTime::BoxType() const { return FOURCC_tfdt; }
+
2243 
+
2244 bool TrackFragmentDecodeTime::ReadWriteInternal(BoxBuffer* buffer) {
+
2245  RCHECK(ReadWriteHeaderInternal(buffer));
+
2246  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
+
2247  RCHECK(buffer->ReadWriteUInt64NBytes(&decode_time, num_bytes));
+
2248  return true;
+
2249 }
+
2250 
+
2251 uint32_t TrackFragmentDecodeTime::ComputeSizeInternal() {
+
2252  version = IsFitIn32Bits(decode_time) ? 0 : 1;
+
2253  return HeaderSize() + sizeof(uint32_t) * (1 + version);
+
2254 }
+
2255 
+
2256 MovieFragmentHeader::MovieFragmentHeader() : sequence_number(0) {}
+
2257 MovieFragmentHeader::~MovieFragmentHeader() {}
+
2258 FourCC MovieFragmentHeader::BoxType() const { return FOURCC_mfhd; }
+
2259 
+
2260 bool MovieFragmentHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
2261  return ReadWriteHeaderInternal(buffer) &&
+
2262  buffer->ReadWriteUInt32(&sequence_number);
+
2263 }
+
2264 
+
2265 uint32_t MovieFragmentHeader::ComputeSizeInternal() {
+
2266  return HeaderSize() + sizeof(sequence_number);
+
2267 }
+
2268 
+
2269 TrackFragmentHeader::TrackFragmentHeader()
+
2270  : track_id(0),
+
2271  sample_description_index(0),
+
2272  default_sample_duration(0),
+
2273  default_sample_size(0),
+
2274  default_sample_flags(0) {}
+
2275 
+
2276 TrackFragmentHeader::~TrackFragmentHeader() {}
+
2277 FourCC TrackFragmentHeader::BoxType() const { return FOURCC_tfhd; }
+
2278 
+
2279 bool TrackFragmentHeader::ReadWriteInternal(BoxBuffer* buffer) {
+
2280  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2281  buffer->ReadWriteUInt32(&track_id));
+
2282 
+
2283  if (flags & kBaseDataOffsetPresentMask) {
+
2284  // MSE requires 'default-base-is-moof' to be set and
+
2285  // 'base-data-offset-present' not to be set. We omit these checks as some
+
2286  // valid files in the wild don't follow these rules, though they use moof as
+
2287  // base.
+
2288  uint64_t base_data_offset;
+
2289  RCHECK(buffer->ReadWriteUInt64(&base_data_offset));
+
2290  DLOG(WARNING) << "base-data-offset-present is not expected. Assumes "
+
2291  "default-base-is-moof.";
+
2292  }
+
2293 
+
2294  if (flags & kSampleDescriptionIndexPresentMask) {
+
2295  RCHECK(buffer->ReadWriteUInt32(&sample_description_index));
+
2296  } else if (buffer->Reading()) {
+
2297  sample_description_index = 0;
+
2298  }
+
2299 
+
2300  if (flags & kDefaultSampleDurationPresentMask) {
+
2301  RCHECK(buffer->ReadWriteUInt32(&default_sample_duration));
+
2302  } else if (buffer->Reading()) {
+
2303  default_sample_duration = 0;
+
2304  }
+
2305 
+
2306  if (flags & kDefaultSampleSizePresentMask) {
+
2307  RCHECK(buffer->ReadWriteUInt32(&default_sample_size));
+
2308  } else if (buffer->Reading()) {
+
2309  default_sample_size = 0;
+
2310  }
+
2311 
+
2312  if (flags & kDefaultSampleFlagsPresentMask)
+
2313  RCHECK(buffer->ReadWriteUInt32(&default_sample_flags));
+
2314  return true;
+
2315 }
+
2316 
+
2317 uint32_t TrackFragmentHeader::ComputeSizeInternal() {
+
2318  uint32_t box_size = HeaderSize() + sizeof(track_id);
+
2319  if (flags & kSampleDescriptionIndexPresentMask)
+
2320  box_size += sizeof(sample_description_index);
+
2321  if (flags & kDefaultSampleDurationPresentMask)
+
2322  box_size += sizeof(default_sample_duration);
+
2323  if (flags & kDefaultSampleSizePresentMask)
+
2324  box_size += sizeof(default_sample_size);
+
2325  if (flags & kDefaultSampleFlagsPresentMask)
+
2326  box_size += sizeof(default_sample_flags);
+
2327  return box_size;
+
2328 }
+
2329 
+
2330 TrackFragmentRun::TrackFragmentRun() : sample_count(0), data_offset(0) {}
+
2331 TrackFragmentRun::~TrackFragmentRun() {}
+
2332 FourCC TrackFragmentRun::BoxType() const { return FOURCC_trun; }
+
2333 
+
2334 bool TrackFragmentRun::ReadWriteInternal(BoxBuffer* buffer) {
+
2335  if (!buffer->Reading()) {
+
2336  // Determine whether version 0 or version 1 should be used.
+
2337  // Use version 0 if possible, use version 1 if there is a negative
+
2338  // sample_offset value.
+
2339  version = 0;
+
2340  if (flags & kSampleCompTimeOffsetsPresentMask) {
+
2341  for (uint32_t i = 0; i < sample_count; ++i) {
+
2342  if (sample_composition_time_offsets[i] < 0) {
+
2343  version = 1;
+
2344  break;
+
2345  }
+
2346  }
+
2347  }
+
2348  }
+
2349 
+
2350  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2351  buffer->ReadWriteUInt32(&sample_count));
+
2352 
+
2353  bool data_offset_present = (flags & kDataOffsetPresentMask) != 0;
+
2354  bool first_sample_flags_present = (flags & kFirstSampleFlagsPresentMask) != 0;
+
2355  bool sample_duration_present = (flags & kSampleDurationPresentMask) != 0;
+
2356  bool sample_size_present = (flags & kSampleSizePresentMask) != 0;
+
2357  bool sample_flags_present = (flags & kSampleFlagsPresentMask) != 0;
+
2358  bool sample_composition_time_offsets_present =
+
2359  (flags & kSampleCompTimeOffsetsPresentMask) != 0;
+
2360 
+
2361  if (data_offset_present) {
+
2362  RCHECK(buffer->ReadWriteUInt32(&data_offset));
+
2363  } else {
+
2364  // NOTE: If the data-offset is not present, then the data for this run
+
2365  // starts immediately after the data of the previous run, or at the
+
2366  // base-data-offset defined by the track fragment header if this is the
+
2367  // first run in a track fragment. If the data-offset is present, it is
+
2368  // relative to the base-data-offset established in the track fragment
+
2369  // header.
+
2370  NOTIMPLEMENTED();
+
2371  }
+
2372 
+
2373  uint32_t first_sample_flags(0);
+
2374 
+
2375  if (buffer->Reading()) {
+
2376  if (first_sample_flags_present)
+
2377  RCHECK(buffer->ReadWriteUInt32(&first_sample_flags));
+
2378 
+
2379  if (sample_duration_present)
+
2380  sample_durations.resize(sample_count);
+
2381  if (sample_size_present)
+
2382  sample_sizes.resize(sample_count);
+
2383  if (sample_flags_present)
+
2384  sample_flags.resize(sample_count);
+
2385  if (sample_composition_time_offsets_present)
+
2386  sample_composition_time_offsets.resize(sample_count);
+
2387  } else {
+
2388  if (first_sample_flags_present) {
+
2389  first_sample_flags = sample_flags[0];
+
2390  DCHECK(sample_flags.size() == 1);
+
2391  RCHECK(buffer->ReadWriteUInt32(&first_sample_flags));
+
2392  }
+
2393 
+
2394  if (sample_duration_present)
+
2395  DCHECK(sample_durations.size() == sample_count);
+
2396  if (sample_size_present)
+
2397  DCHECK(sample_sizes.size() == sample_count);
+
2398  if (sample_flags_present)
+
2399  DCHECK(sample_flags.size() == sample_count);
+
2400  if (sample_composition_time_offsets_present)
+
2401  DCHECK(sample_composition_time_offsets.size() == sample_count);
+
2402  }
+
2403 
+
2404  for (uint32_t i = 0; i < sample_count; ++i) {
+
2405  if (sample_duration_present)
+
2406  RCHECK(buffer->ReadWriteUInt32(&sample_durations[i]));
+
2407  if (sample_size_present)
+
2408  RCHECK(buffer->ReadWriteUInt32(&sample_sizes[i]));
+
2409  if (sample_flags_present)
+
2410  RCHECK(buffer->ReadWriteUInt32(&sample_flags[i]));
+
2411 
+
2412  if (sample_composition_time_offsets_present) {
+
2413  if (version == 0) {
+
2414  uint32_t sample_offset = sample_composition_time_offsets[i];
+
2415  RCHECK(buffer->ReadWriteUInt32(&sample_offset));
+
2416  sample_composition_time_offsets[i] = sample_offset;
+
2417  } else {
+
2418  int32_t sample_offset = sample_composition_time_offsets[i];
+
2419  RCHECK(buffer->ReadWriteInt32(&sample_offset));
+
2420  sample_composition_time_offsets[i] = sample_offset;
+
2421  }
+
2422  }
+
2423  }
+
2424 
+
2425  if (buffer->Reading()) {
+
2426  if (first_sample_flags_present) {
+
2427  if (sample_flags.size() == 0) {
+
2428  sample_flags.push_back(first_sample_flags);
+
2429  } else {
+
2430  sample_flags[0] = first_sample_flags;
+
2431  }
+
2432  }
+
2433  }
+
2434  return true;
+
2435 }
+
2436 
+
2437 uint32_t TrackFragmentRun::ComputeSizeInternal() {
+
2438  uint32_t box_size = HeaderSize() + sizeof(sample_count);
+
2439  if (flags & kDataOffsetPresentMask)
+
2440  box_size += sizeof(data_offset);
+
2441  if (flags & kFirstSampleFlagsPresentMask)
+
2442  box_size += sizeof(uint32_t);
+
2443  uint32_t fields = (flags & kSampleDurationPresentMask ? 1 : 0) +
+
2444  (flags & kSampleSizePresentMask ? 1 : 0) +
+
2445  (flags & kSampleFlagsPresentMask ? 1 : 0) +
+
2446  (flags & kSampleCompTimeOffsetsPresentMask ? 1 : 0);
+
2447  box_size += fields * sizeof(uint32_t) * sample_count;
+
2448  return box_size;
+
2449 }
+
2450 
+
2451 TrackFragment::TrackFragment() : decode_time_absent(false) {}
+
2452 TrackFragment::~TrackFragment() {}
+
2453 FourCC TrackFragment::BoxType() const { return FOURCC_traf; }
+
2454 
+
2455 bool TrackFragment::ReadWriteInternal(BoxBuffer* buffer) {
+
2456  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2457  buffer->PrepareChildren() &&
+
2458  buffer->ReadWriteChild(&header));
+
2459  if (buffer->Reading()) {
+
2460  DCHECK(buffer->reader());
+
2461  decode_time_absent = !buffer->reader()->ChildExist(&decode_time);
+
2462  if (!decode_time_absent)
+
2463  RCHECK(buffer->ReadWriteChild(&decode_time));
+
2464  RCHECK(buffer->reader()->TryReadChildren(&runs) &&
+
2465  buffer->reader()->TryReadChildren(&sample_group_descriptions) &&
+
2466  buffer->reader()->TryReadChildren(&sample_to_groups));
+
2467  } else {
+
2468  if (!decode_time_absent)
+
2469  RCHECK(buffer->ReadWriteChild(&decode_time));
+
2470  for (uint32_t i = 0; i < runs.size(); ++i)
+
2471  RCHECK(buffer->ReadWriteChild(&runs[i]));
+
2472  for (uint32_t i = 0; i < sample_to_groups.size(); ++i)
+
2473  RCHECK(buffer->ReadWriteChild(&sample_to_groups[i]));
+
2474  for (uint32_t i = 0; i < sample_group_descriptions.size(); ++i)
+
2475  RCHECK(buffer->ReadWriteChild(&sample_group_descriptions[i]));
+
2476  }
+
2477  return buffer->TryReadWriteChild(&auxiliary_size) &&
+
2478  buffer->TryReadWriteChild(&auxiliary_offset) &&
+
2479  buffer->TryReadWriteChild(&sample_encryption);
+
2480 }
+
2481 
+
2482 uint32_t TrackFragment::ComputeSizeInternal() {
+
2483  uint32_t box_size =
+
2484  HeaderSize() + header.ComputeSize() + decode_time.ComputeSize() +
+
2485  auxiliary_size.ComputeSize() + auxiliary_offset.ComputeSize() +
+
2486  sample_encryption.ComputeSize();
+
2487  for (uint32_t i = 0; i < runs.size(); ++i)
+
2488  box_size += runs[i].ComputeSize();
+
2489  for (uint32_t i = 0; i < sample_group_descriptions.size(); ++i)
+
2490  box_size += sample_group_descriptions[i].ComputeSize();
+
2491  for (uint32_t i = 0; i < sample_to_groups.size(); ++i)
+
2492  box_size += sample_to_groups[i].ComputeSize();
+
2493  return box_size;
+
2494 }
+
2495 
+
2496 MovieFragment::MovieFragment() {}
+
2497 MovieFragment::~MovieFragment() {}
+
2498 FourCC MovieFragment::BoxType() const { return FOURCC_moof; }
+
2499 
+
2500 bool MovieFragment::ReadWriteInternal(BoxBuffer* buffer) {
+
2501  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2502  buffer->PrepareChildren() &&
+
2503  buffer->ReadWriteChild(&header));
+
2504  if (buffer->Reading()) {
+
2505  BoxReader* reader = buffer->reader();
+
2506  DCHECK(reader);
+
2507  RCHECK(reader->ReadChildren(&tracks) &&
+
2508  reader->TryReadChildren(&pssh));
+
2509  } else {
+
2510  for (uint32_t i = 0; i < tracks.size(); ++i)
+
2511  RCHECK(buffer->ReadWriteChild(&tracks[i]));
+
2512  for (uint32_t i = 0; i < pssh.size(); ++i)
+
2513  RCHECK(buffer->ReadWriteChild(&pssh[i]));
+
2514  }
+
2515  return true;
+
2516 }
+
2517 
+
2518 uint32_t MovieFragment::ComputeSizeInternal() {
+
2519  uint32_t box_size = HeaderSize() + header.ComputeSize();
+
2520  for (uint32_t i = 0; i < tracks.size(); ++i)
+
2521  box_size += tracks[i].ComputeSize();
+
2522  for (uint32_t i = 0; i < pssh.size(); ++i)
+
2523  box_size += pssh[i].ComputeSize();
+
2524  return box_size;
+
2525 }
+
2526 
+
2527 SegmentIndex::SegmentIndex()
+
2528  : reference_id(0),
+
2529  timescale(0),
+
2530  earliest_presentation_time(0),
+
2531  first_offset(0) {}
+
2532 SegmentIndex::~SegmentIndex() {}
+
2533 FourCC SegmentIndex::BoxType() const { return FOURCC_sidx; }
+
2534 
+
2535 bool SegmentIndex::ReadWriteInternal(BoxBuffer* buffer) {
+
2536  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2537  buffer->ReadWriteUInt32(&reference_id) &&
+
2538  buffer->ReadWriteUInt32(&timescale));
+
2539 
+
2540  size_t num_bytes = (version == 1) ? sizeof(uint64_t) : sizeof(uint32_t);
+
2541  RCHECK(
+
2542  buffer->ReadWriteUInt64NBytes(&earliest_presentation_time, num_bytes) &&
+
2543  buffer->ReadWriteUInt64NBytes(&first_offset, num_bytes));
+
2544 
+
2545  uint16_t reference_count = static_cast<uint16_t>(references.size());
+
2546  RCHECK(buffer->IgnoreBytes(2) && // reserved.
+
2547  buffer->ReadWriteUInt16(&reference_count));
+
2548  references.resize(reference_count);
+
2549 
+
2550  uint32_t reference_type_size;
+
2551  uint32_t sap;
+
2552  for (uint32_t i = 0; i < reference_count; ++i) {
+
2553  if (!buffer->Reading()) {
+
2554  reference_type_size = references[i].referenced_size;
+
2555  if (references[i].reference_type)
+
2556  reference_type_size |= (1 << 31);
+
2557  sap = (references[i].sap_type << 28) | references[i].sap_delta_time;
+
2558  if (references[i].starts_with_sap)
+
2559  sap |= (1 << 31);
+
2560  }
+
2561  RCHECK(buffer->ReadWriteUInt32(&reference_type_size) &&
+
2562  buffer->ReadWriteUInt32(&references[i].subsegment_duration) &&
+
2563  buffer->ReadWriteUInt32(&sap));
+
2564  if (buffer->Reading()) {
+
2565  references[i].reference_type = (reference_type_size >> 31) ? true : false;
+
2566  references[i].referenced_size = reference_type_size & ~(1 << 31);
+
2567  references[i].starts_with_sap = (sap >> 31) ? true : false;
+
2568  references[i].sap_type =
+
2569  static_cast<SegmentReference::SAPType>((sap >> 28) & 0x07);
+
2570  references[i].sap_delta_time = sap & ~(0xF << 28);
+
2571  }
+
2572  }
+
2573  return true;
+
2574 }
+
2575 
+
2576 uint32_t SegmentIndex::ComputeSizeInternal() {
+
2577  version = IsFitIn32Bits(earliest_presentation_time, first_offset) ? 0 : 1;
+
2578  return HeaderSize() + sizeof(reference_id) + sizeof(timescale) +
+
2579  sizeof(uint32_t) * (1 + version) * 2 + 2 * sizeof(uint16_t) +
+
2580  3 * sizeof(uint32_t) * references.size();
+
2581 }
+
2582 
+
2583 MediaData::MediaData() : data_size(0) {}
+
2584 MediaData::~MediaData() {}
+
2585 FourCC MediaData::BoxType() const { return FOURCC_mdat; }
+
2586 
+
2587 bool MediaData::ReadWriteInternal(BoxBuffer* buffer) {
+
2588  NOTIMPLEMENTED() << "Actual data is parsed and written separately.";
+
2589  return false;
+
2590 }
+
2591 
+
2592 uint32_t MediaData::ComputeSizeInternal() {
+
2593  return HeaderSize() + data_size;
+
2594 }
+
2595 
+
2596 CueSourceIDBox::CueSourceIDBox() : source_id(kCueSourceIdNotSet) {}
+
2597 CueSourceIDBox::~CueSourceIDBox() {}
+
2598 
+
2599 FourCC CueSourceIDBox::BoxType() const { return FOURCC_vsid; }
+
2600 
+
2601 bool CueSourceIDBox::ReadWriteInternal(BoxBuffer* buffer) {
+
2602  RCHECK(ReadWriteHeaderInternal(buffer) && buffer->ReadWriteInt32(&source_id));
+
2603  return true;
+
2604 }
+
2605 
+
2606 uint32_t CueSourceIDBox::ComputeSizeInternal() {
+
2607  if (source_id == kCueSourceIdNotSet)
+
2608  return 0;
+
2609  return HeaderSize() + sizeof(source_id);
+
2610 }
+
2611 
+
2612 CueTimeBox::CueTimeBox() {}
+
2613 CueTimeBox::~CueTimeBox() {}
+
2614 
+
2615 FourCC CueTimeBox::BoxType() const {
+
2616  return FOURCC_ctim;
+
2617 }
+
2618 
+
2619 bool CueTimeBox::ReadWriteInternal(BoxBuffer* buffer) {
+
2620  RCHECK(ReadWriteHeaderInternal(buffer));
+
2621  return buffer->ReadWriteString(
+
2622  &cue_current_time,
+
2623  buffer->Reading() ? buffer->BytesLeft() : cue_current_time.size());
+
2624 }
+
2625 
+
2626 uint32_t CueTimeBox::ComputeSizeInternal() {
+
2627  if (cue_current_time.empty())
+
2628  return 0;
+
2629  return HeaderSize() + cue_current_time.size();
+
2630 }
+
2631 
+
2632 CueIDBox::CueIDBox() {}
+
2633 CueIDBox::~CueIDBox() {}
+
2634 
+
2635 FourCC CueIDBox::BoxType() const {
+
2636  return FOURCC_iden;
+
2637 }
+
2638 
+
2639 bool CueIDBox::ReadWriteInternal(BoxBuffer* buffer) {
+
2640  RCHECK(ReadWriteHeaderInternal(buffer));
+
2641  return buffer->ReadWriteString(
+
2642  &cue_id, buffer->Reading() ? buffer->BytesLeft() : cue_id.size());
+
2643 }
+
2644 
+
2645 uint32_t CueIDBox::ComputeSizeInternal() {
+
2646  if (cue_id.empty())
+
2647  return 0;
+
2648  return HeaderSize() + cue_id.size();
+
2649 }
+
2650 
+
2651 CueSettingsBox::CueSettingsBox() {}
+
2652 CueSettingsBox::~CueSettingsBox() {}
+
2653 
+
2654 FourCC CueSettingsBox::BoxType() const {
+
2655  return FOURCC_sttg;
+
2656 }
+
2657 
+
2658 bool CueSettingsBox::ReadWriteInternal(BoxBuffer* buffer) {
+
2659  RCHECK(ReadWriteHeaderInternal(buffer));
+
2660  return buffer->ReadWriteString(
+
2661  &settings, buffer->Reading() ? buffer->BytesLeft() : settings.size());
+
2662 }
+
2663 
+
2664 uint32_t CueSettingsBox::ComputeSizeInternal() {
+
2665  if (settings.empty())
+
2666  return 0;
+
2667  return HeaderSize() + settings.size();
+
2668 }
+
2669 
+
2670 CuePayloadBox::CuePayloadBox() {}
+
2671 CuePayloadBox::~CuePayloadBox() {}
+
2672 
+
2673 FourCC CuePayloadBox::BoxType() const {
+
2674  return FOURCC_payl;
+
2675 }
+
2676 
+
2677 bool CuePayloadBox::ReadWriteInternal(BoxBuffer* buffer) {
+
2678  RCHECK(ReadWriteHeaderInternal(buffer));
+
2679  return buffer->ReadWriteString(
+
2680  &cue_text, buffer->Reading() ? buffer->BytesLeft() : cue_text.size());
+
2681 }
+
2682 
+
2683 uint32_t CuePayloadBox::ComputeSizeInternal() {
+
2684  return HeaderSize() + cue_text.size();
+
2685 }
+
2686 
+
2687 VTTEmptyCueBox::VTTEmptyCueBox() {}
+
2688 VTTEmptyCueBox::~VTTEmptyCueBox() {}
+
2689 
+
2690 FourCC VTTEmptyCueBox::BoxType() const {
+
2691  return FOURCC_vtte;
+
2692 }
+
2693 
+
2694 bool VTTEmptyCueBox::ReadWriteInternal(BoxBuffer* buffer) {
+
2695  return ReadWriteHeaderInternal(buffer);
+
2696 }
+
2697 
+
2698 uint32_t VTTEmptyCueBox::ComputeSizeInternal() {
+
2699  return HeaderSize();
+
2700 }
+
2701 
+
2702 VTTAdditionalTextBox::VTTAdditionalTextBox() {}
+
2703 VTTAdditionalTextBox::~VTTAdditionalTextBox() {}
+
2704 
+ +
2706  return FOURCC_vtta;
+
2707 }
+
2708 
+
2709 bool VTTAdditionalTextBox::ReadWriteInternal(BoxBuffer* buffer) {
+
2710  RCHECK(ReadWriteHeaderInternal(buffer));
+
2711  return buffer->ReadWriteString(
+
2712  &cue_additional_text,
+
2713  buffer->Reading() ? buffer->BytesLeft() : cue_additional_text.size());
+
2714 }
+
2715 
+
2716 uint32_t VTTAdditionalTextBox::ComputeSizeInternal() {
+
2717  return HeaderSize() + cue_additional_text.size();
+
2718 }
+
2719 
+
2720 VTTCueBox::VTTCueBox() {}
+
2721 VTTCueBox::~VTTCueBox() {}
+
2722 
+
2723 FourCC VTTCueBox::BoxType() const {
+
2724  return FOURCC_vttc;
+
2725 }
+
2726 
+
2727 bool VTTCueBox::ReadWriteInternal(BoxBuffer* buffer) {
+
2728  RCHECK(ReadWriteHeaderInternal(buffer) &&
+
2729  buffer->PrepareChildren() &&
+
2730  buffer->ReadWriteChild(&cue_source_id) &&
+
2731  buffer->ReadWriteChild(&cue_id) &&
+
2732  buffer->ReadWriteChild(&cue_time) &&
+
2733  buffer->ReadWriteChild(&cue_settings) &&
+
2734  buffer->ReadWriteChild(&cue_payload));
+
2735  return true;
+
2736 }
+
2737 
+
2738 uint32_t VTTCueBox::ComputeSizeInternal() {
+
2739  return HeaderSize() + cue_source_id.ComputeSize() + cue_id.ComputeSize() +
+
2740  cue_time.ComputeSize() + cue_settings.ComputeSize() +
+
2741  cue_payload.ComputeSize();
+
2742 }
+
2743 
+
2744 } // namespace mp4
+
2745 } // namespace media
+
2746 } // namespace shaka
+
FourCC BoxType() const override
+ + - -
FourCC BoxType() const override
- - -
FourCC BoxType() const override
-
FourCC BoxType() const override
- + +
FourCC BoxType() const override
+ + +
FourCC BoxType() const override
+
FourCC BoxType() const override
+
bool ParseFromBuffer(uint8_t iv_size, bool has_subsamples, BufferReader *reader)
- +
FourCC BoxType() const override
-
FourCC BoxType() const override
- +
FourCC BoxType() const override
+
uint32_t HeaderSize() const final
Definition: box.cc:75
FourCC BoxType() const override
-
FourCC BoxType() const override
- +
FourCC BoxType() const override
+
bool ReadWriteHeaderInternal(BoxBuffer *buffer) final
Definition: box.cc:80
-
FourCC BoxType() const override
+
FourCC BoxType() const override
bool TryReadChildren(std::vector< T > *children) WARN_UNUSED_RESULT
Definition: box_reader.h:133
- +
bool TryReadWriteChild(Box *box)
Definition: box_buffer.h:177
- - -
FourCC BoxType() const override
-
FourCC BoxType() const override
+ + +
FourCC BoxType() const override
+
FourCC BoxType() const override
size_t BytesLeft() const
Definition: box_buffer.h:62
- -
FourCC BoxType() const override
-
FourCC BoxType() const override
- -
FourCC BoxType() const override
+ +
FourCC BoxType() const override
+
FourCC BoxType() const override
+ +
FourCC BoxType() const override
virtual bool Parse(const std::vector< uint8_t > &data)
- - -
FourCC BoxType() const override
- + + +
FourCC BoxType() const override
+
virtual bool ReadWriteHeaderInternal(BoxBuffer *buffer)
Definition: box.cc:61
-
FourCC BoxType() const override
+
FourCC BoxType() const override
-
FourCC BoxType() const override
- - +
FourCC BoxType() const override
+ + -
FourCC BoxType() const override
+
FourCC BoxType() const override
-
bool ParseFromSampleEncryptionData(size_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const
uint32_t ComputeSize()
Definition: box.cc:50
bool ReadWrite(uint8_t iv_size, bool has_subsamples, BoxBuffer *buffer)
- -
FourCC BoxType() const override
-
FourCC BoxType() const override
- + +
FourCC BoxType() const override
+
FourCC BoxType() const override
+
FourCC BoxType() const override
bool ReadChildren(std::vector< T > *children) WARN_UNUSED_RESULT
Definition: box_reader.h:127
std::vector< uint8_t > sample_encryption_data
-
FourCC BoxType() const override
- - +
FourCC BoxType() const override
+
bool ParseFromSampleEncryptionData(uint8_t iv_size, std::vector< SampleEncryptionEntry > *sample_encryption_entries) const
+ + -
FourCC BoxType() const override
+
FourCC BoxType() const override
uint32_t box_size()
Definition: box.h:55
- -
FourCC BoxType() const override
+ +
FourCC BoxType() const override
BufferWriter * writer()
Definition: box_buffer.h:200
-
FourCC BoxType() const override
-
FourCC BoxType() const override
- +
FourCC BoxType() const override
+
FourCC BoxType() const override
+
virtual uint32_t HeaderSize() const
Definition: box.cc:55
bool IgnoreBytes(size_t num_bytes)
Definition: box_buffer.h:189
Class for reading MP4 boxes.
Definition: box_reader.h:24
bool ReadWriteString(std::string *str, size_t size)
Definition: box_buffer.h:139
-
FourCC BoxType() const override
+
FourCC BoxType() const override
bool ReadChild(Box *child) WARN_UNUSED_RESULT
Definition: box_reader.cc:88
- -
FourCC BoxType() const override
+ +
FourCC BoxType() const override
bool ReadWriteUInt64NBytes(uint64_t *v, size_t num_bytes)
Definition: box_buffer.h:117
-
FourCC BoxType() const override
-
FourCC BoxType() const override
- - +
FourCC BoxType() const override
+
FourCC BoxType() const override
+ + -
FourCC BoxType() const override
- +
FourCC BoxType() const override
+ - -
FourCC BoxType() const override
+ +
FourCC BoxType() const override
PrivFrame private_frame
We only support PrivateFrame in ID3. Other frames are ignored.
-
FourCC BoxType() const override
+
FourCC BoxType() const override
void Write(BufferWriter *writer)
Definition: box.cc:25
-
FourCC BoxType() const override
-
FourCC BoxType() const override
+
FourCC BoxType() const override
+
FourCC BoxType() const override
FourCC BoxType() const override
-
FourCC BoxType() const override
+
FourCC BoxType() const override
bool ChildExist(Box *child) WARN_UNUSED_RESULT
Definition: box_reader.cc:101
bool ReadWriteChild(Box *box)
Definition: box_buffer.h:166
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 d20672edd7..56704a4a90 100644 --- a/docs/dd/df2/webm_2multi__segment__segmenter_8h_source.html +++ b/docs/dd/df2/webm_2multi__segment__segmenter_8h_source.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 0092a181ef..4c193b0ba5 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 @@ -201,7 +201,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2331 of file box_definitions.cc.

+

Definition at line 2332 of file box_definitions.cc.

@@ -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 1f8a343cde..0812f1d2c7 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 @@ -174,7 +174,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1407 of file box_definitions.cc.

+

Definition at line 1408 of file box_definitions.cc.

@@ -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 4bfa75922a..fe3c46431a 100644 --- a/docs/de/d0f/local__file_8h_source.html +++ b/docs/de/d0f/local__file_8h_source.html @@ -137,22 +137,22 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
58 
59 #endif // PACKAGER_FILE_LOCAL_FILE_H_
Implement LocalFile which deals with local storage.
Definition: local_file.h:21
-
int64_t Read(void *buffer, uint64_t length) override
Definition: local_file.cc:30
-
bool Close() override
Definition: local_file.cc:20
-
bool Seek(uint64_t position) override
Definition: local_file.cc:64
+
int64_t Read(void *buffer, uint64_t length) override
Definition: local_file.cc:40
+
bool Close() override
Definition: local_file.cc:30
+
bool Seek(uint64_t position) override
Definition: local_file.cc:75
Define an abstract file interface.
Definition: file.h:24
-
LocalFile(const char *file_name, const char *mode)
Definition: local_file.cc:17
-
bool Tell(uint64_t *position) override
Definition: local_file.cc:68
-
int64_t Write(const void *buffer, uint64_t length) override
Definition: local_file.cc:36
+
LocalFile(const char *file_name, const char *mode)
Definition: local_file.cc:22
+
bool Tell(uint64_t *position) override
Definition: local_file.cc:84
+
int64_t Write(const void *buffer, uint64_t length) override
Definition: local_file.cc:46
const std::string & file_name() const
Definition: file.h:91
-
bool Open() override
Internal open. Should not be used directly.
Definition: local_file.cc:78
-
bool Flush() override
Definition: local_file.cc:59
-
int64_t Size() override
Definition: local_file.cc:42
-
static bool Delete(const char *file_name)
Definition: local_file.cc:84
+
bool Open() override
Internal open. Should not be used directly.
Definition: local_file.cc:98
+
bool Flush() override
Definition: local_file.cc:70
+
int64_t Size() override
Definition: local_file.cc:52
+
static bool Delete(const char *file_name)
Definition: local_file.cc:104
diff --git a/docs/de/d12/container__names_8h_source.html b/docs/de/d12/container__names_8h_source.html index e7997b671b..bb64ee2abc 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 86eee8af6a..4236344afa 100644 --- a/docs/de/d13/ts__writer_8cc_source.html +++ b/docs/de/d13/ts__writer_8cc_source.html @@ -361,7 +361,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 02461cc11c..c814e8cbd5 100644 --- a/docs/de/d15/media__stream_8cc_source.html +++ b/docs/de/d15/media__stream_8cc_source.html @@ -210,7 +210,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 6682436c18..cb820a53eb 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 82e20afa2f..fab7311273 100644 --- a/docs/de/d17/cluster__builder_8cc_source.html +++ b/docs/de/d17/cluster__builder_8cc_source.html @@ -330,7 +330,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 a5ebfbeedf..444a5bf097 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 @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 cdbcac1347..f8e89ebbde 100644 --- a/docs/de/d1e/mp4_2single__segment__segmenter_8cc_source.html +++ b/docs/de/d1e/mp4_2single__segment__segmenter_8cc_source.html @@ -172,170 +172,171 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
83  LOG(ERROR) << "Failed to create temporary file.";
84  return Status(error::FILE_FAILURE, "Unable to create temporary file.");
85  }
-
86  temp_file_name_ = temp_file_path.value();
+
86  temp_file_name_ = temp_file_path.AsUTF8Unsafe();
87  } else {
88  temp_file_name_ =
-
89  base::FilePath(options().temp_dir).Append(TempFileName()).value();
-
90  }
-
91  temp_file_.reset(File::Open(temp_file_name_.c_str(), "w"));
-
92  return temp_file_
-
93  ? Status::OK
-
94  : Status(error::FILE_FAILURE,
-
95  "Cannot open file to write " + temp_file_name_);
-
96 }
-
97 
-
98 Status SingleSegmentSegmenter::DoFinalize() {
-
99  DCHECK(temp_file_);
-
100  DCHECK(ftyp());
-
101  DCHECK(moov());
-
102  DCHECK(vod_sidx_);
-
103 
-
104  // Close the temp file to prepare for reading later.
-
105  if (!temp_file_.release()->Close()) {
-
106  return Status(error::FILE_FAILURE,
-
107  "Cannot close the temp file " + temp_file_name_);
-
108  }
-
109 
-
110  scoped_ptr<File, FileCloser> file(
-
111  File::Open(options().output_file_name.c_str(), "w"));
-
112  if (file == NULL) {
-
113  return Status(error::FILE_FAILURE,
-
114  "Cannot open file to write " + options().output_file_name);
-
115  }
-
116 
-
117  LOG(INFO) << "Update media header (moov) and rewrite the file to '"
-
118  << options().output_file_name << "'.";
-
119 
-
120  // Write ftyp, moov and sidx to output file.
-
121  scoped_ptr<BufferWriter> buffer(new BufferWriter());
-
122  ftyp()->Write(buffer.get());
-
123  moov()->Write(buffer.get());
-
124  vod_sidx_->Write(buffer.get());
-
125  Status status = buffer->WriteToFile(file.get());
-
126  if (!status.ok())
-
127  return status;
-
128 
-
129  // Load the temp file and write to output file.
-
130  scoped_ptr<File, FileCloser> temp_file(
-
131  File::Open(temp_file_name_.c_str(), "r"));
-
132  if (temp_file == NULL) {
-
133  return Status(error::FILE_FAILURE,
-
134  "Cannot open file to read " + temp_file_name_);
-
135  }
-
136 
-
137  // The target of 2nd stage of single segment segmentation.
-
138  const uint64_t re_segment_progress_target = progress_target() * 0.5;
-
139 
-
140  const int kBufSize = 0x200000; // 2MB.
-
141  scoped_ptr<uint8_t[]> buf(new uint8_t[kBufSize]);
-
142  while (true) {
-
143  int64_t size = temp_file->Read(buf.get(), kBufSize);
-
144  if (size == 0) {
-
145  break;
-
146  } else if (size < 0) {
-
147  return Status(error::FILE_FAILURE,
-
148  "Failed to read file " + temp_file_name_);
-
149  }
-
150  int64_t size_written = file->Write(buf.get(), size);
-
151  if (size_written != size) {
-
152  return Status(error::FILE_FAILURE,
-
153  "Failed to write file " + options().output_file_name);
-
154  }
-
155  UpdateProgress(static_cast<double>(size) / temp_file->Size() *
-
156  re_segment_progress_target);
-
157  }
-
158  SetComplete();
-
159  return Status::OK;
-
160 }
-
161 
-
162 Status SingleSegmentSegmenter::DoFinalizeSegment() {
-
163  DCHECK(sidx());
-
164  DCHECK(fragment_buffer());
-
165  // sidx() contains pre-generated segment references with one reference per
-
166  // fragment. In VOD, this segment is converted into a subsegment, i.e. one
-
167  // reference, which contains all the fragments in sidx().
-
168  std::vector<SegmentReference>& refs = sidx()->references;
-
169  SegmentReference& vod_ref = refs[0];
-
170  uint64_t first_sap_time =
-
171  refs[0].sap_delta_time + refs[0].earliest_presentation_time;
-
172  for (uint32_t i = 1; i < refs.size(); ++i) {
-
173  vod_ref.referenced_size += refs[i].referenced_size;
-
174  // NOTE: We calculate subsegment duration based on the total duration of
-
175  // this subsegment instead of subtracting earliest_presentation_time as
-
176  // indicated in the spec.
-
177  vod_ref.subsegment_duration += refs[i].subsegment_duration;
-
178  vod_ref.earliest_presentation_time = std::min(
-
179  vod_ref.earliest_presentation_time, refs[i].earliest_presentation_time);
-
180 
-
181  if (vod_ref.sap_type == SegmentReference::TypeUnknown &&
-
182  refs[i].sap_type != SegmentReference::TypeUnknown) {
-
183  vod_ref.sap_type = refs[i].sap_type;
-
184  first_sap_time =
-
185  refs[i].sap_delta_time + refs[i].earliest_presentation_time;
-
186  }
-
187  }
-
188  // Calculate sap delta time w.r.t. earliest_presentation_time.
-
189  if (vod_ref.sap_type != SegmentReference::TypeUnknown) {
-
190  vod_ref.sap_delta_time =
-
191  first_sap_time - vod_ref.earliest_presentation_time;
-
192  }
-
193 
-
194  // Create segment if it does not exist yet.
-
195  if (vod_sidx_ == NULL) {
-
196  vod_sidx_.reset(new SegmentIndex());
-
197  vod_sidx_->reference_id = sidx()->reference_id;
-
198  vod_sidx_->timescale = sidx()->timescale;
-
199 
-
200  if (vod_ref.earliest_presentation_time > 0) {
-
201  const double starting_time_in_seconds =
-
202  static_cast<double>(vod_ref.earliest_presentation_time) /
-
203  GetReferenceTimeScale();
-
204  // Give a warning if it is significant.
-
205  if (starting_time_in_seconds > 0.5) {
-
206  // Note that DASH IF player requires presentationTimeOffset to be set in
-
207  // Segment{Base,List,Template} if there is non-zero starting time. Since
-
208  // current Chromium's MSE implementation uses DTS, the player expects
-
209  // DTS to be used.
-
210  LOG(WARNING) << "Warning! Non-zero starting time (in seconds): "
-
211  << starting_time_in_seconds
-
212  << ". Manual adjustment of presentationTimeOffset in "
-
213  "mpd might be necessary.";
-
214  }
-
215  }
-
216  // Force earliest_presentation_time to start from 0 for VOD.
-
217  vod_sidx_->earliest_presentation_time = 0;
-
218  }
-
219  vod_sidx_->references.push_back(vod_ref);
-
220 
-
221  // Append fragment buffer to temp file.
-
222  size_t segment_size = fragment_buffer()->Size();
-
223  Status status = fragment_buffer()->WriteToFile(temp_file_.get());
-
224  if (!status.ok()) return status;
-
225 
-
226  UpdateProgress(vod_ref.subsegment_duration);
-
227  if (muxer_listener()) {
-
228  muxer_listener()->OnSampleDurationReady(sample_duration());
-
229  muxer_listener()->OnNewSegment(options().output_file_name,
-
230  vod_ref.earliest_presentation_time,
-
231  vod_ref.subsegment_duration, segment_size);
-
232  }
-
233  return Status::OK;
-
234 }
-
235 
-
236 } // namespace mp4
-
237 } // namespace media
-
238 } // namespace shaka
+
89  base::FilePath::FromUTF8Unsafe(options().temp_dir)
+
90  .Append(base::FilePath::FromUTF8Unsafe(TempFileName())).AsUTF8Unsafe();
+
91  }
+
92  temp_file_.reset(File::Open(temp_file_name_.c_str(), "w"));
+
93  return temp_file_
+
94  ? Status::OK
+
95  : Status(error::FILE_FAILURE,
+
96  "Cannot open file to write " + temp_file_name_);
+
97 }
+
98 
+
99 Status SingleSegmentSegmenter::DoFinalize() {
+
100  DCHECK(temp_file_);
+
101  DCHECK(ftyp());
+
102  DCHECK(moov());
+
103  DCHECK(vod_sidx_);
+
104 
+
105  // Close the temp file to prepare for reading later.
+
106  if (!temp_file_.release()->Close()) {
+
107  return Status(error::FILE_FAILURE,
+
108  "Cannot close the temp file " + temp_file_name_);
+
109  }
+
110 
+
111  scoped_ptr<File, FileCloser> file(
+
112  File::Open(options().output_file_name.c_str(), "w"));
+
113  if (file == NULL) {
+
114  return Status(error::FILE_FAILURE,
+
115  "Cannot open file to write " + options().output_file_name);
+
116  }
+
117 
+
118  LOG(INFO) << "Update media header (moov) and rewrite the file to '"
+
119  << options().output_file_name << "'.";
+
120 
+
121  // Write ftyp, moov and sidx to output file.
+
122  scoped_ptr<BufferWriter> buffer(new BufferWriter());
+
123  ftyp()->Write(buffer.get());
+
124  moov()->Write(buffer.get());
+
125  vod_sidx_->Write(buffer.get());
+
126  Status status = buffer->WriteToFile(file.get());
+
127  if (!status.ok())
+
128  return status;
+
129 
+
130  // Load the temp file and write to output file.
+
131  scoped_ptr<File, FileCloser> temp_file(
+
132  File::Open(temp_file_name_.c_str(), "r"));
+
133  if (temp_file == NULL) {
+
134  return Status(error::FILE_FAILURE,
+
135  "Cannot open file to read " + temp_file_name_);
+
136  }
+
137 
+
138  // The target of 2nd stage of single segment segmentation.
+
139  const uint64_t re_segment_progress_target = progress_target() * 0.5;
+
140 
+
141  const int kBufSize = 0x200000; // 2MB.
+
142  scoped_ptr<uint8_t[]> buf(new uint8_t[kBufSize]);
+
143  while (true) {
+
144  int64_t size = temp_file->Read(buf.get(), kBufSize);
+
145  if (size == 0) {
+
146  break;
+
147  } else if (size < 0) {
+
148  return Status(error::FILE_FAILURE,
+
149  "Failed to read file " + temp_file_name_);
+
150  }
+
151  int64_t size_written = file->Write(buf.get(), size);
+
152  if (size_written != size) {
+
153  return Status(error::FILE_FAILURE,
+
154  "Failed to write file " + options().output_file_name);
+
155  }
+
156  UpdateProgress(static_cast<double>(size) / temp_file->Size() *
+
157  re_segment_progress_target);
+
158  }
+
159  SetComplete();
+
160  return Status::OK;
+
161 }
+
162 
+
163 Status SingleSegmentSegmenter::DoFinalizeSegment() {
+
164  DCHECK(sidx());
+
165  DCHECK(fragment_buffer());
+
166  // sidx() contains pre-generated segment references with one reference per
+
167  // fragment. In VOD, this segment is converted into a subsegment, i.e. one
+
168  // reference, which contains all the fragments in sidx().
+
169  std::vector<SegmentReference>& refs = sidx()->references;
+
170  SegmentReference& vod_ref = refs[0];
+
171  uint64_t first_sap_time =
+
172  refs[0].sap_delta_time + refs[0].earliest_presentation_time;
+
173  for (uint32_t i = 1; i < refs.size(); ++i) {
+
174  vod_ref.referenced_size += refs[i].referenced_size;
+
175  // NOTE: We calculate subsegment duration based on the total duration of
+
176  // this subsegment instead of subtracting earliest_presentation_time as
+
177  // indicated in the spec.
+
178  vod_ref.subsegment_duration += refs[i].subsegment_duration;
+
179  vod_ref.earliest_presentation_time = std::min(
+
180  vod_ref.earliest_presentation_time, refs[i].earliest_presentation_time);
+
181 
+
182  if (vod_ref.sap_type == SegmentReference::TypeUnknown &&
+
183  refs[i].sap_type != SegmentReference::TypeUnknown) {
+
184  vod_ref.sap_type = refs[i].sap_type;
+
185  first_sap_time =
+
186  refs[i].sap_delta_time + refs[i].earliest_presentation_time;
+
187  }
+
188  }
+
189  // Calculate sap delta time w.r.t. earliest_presentation_time.
+
190  if (vod_ref.sap_type != SegmentReference::TypeUnknown) {
+
191  vod_ref.sap_delta_time =
+
192  first_sap_time - vod_ref.earliest_presentation_time;
+
193  }
+
194 
+
195  // Create segment if it does not exist yet.
+
196  if (vod_sidx_ == NULL) {
+
197  vod_sidx_.reset(new SegmentIndex());
+
198  vod_sidx_->reference_id = sidx()->reference_id;
+
199  vod_sidx_->timescale = sidx()->timescale;
+
200 
+
201  if (vod_ref.earliest_presentation_time > 0) {
+
202  const double starting_time_in_seconds =
+
203  static_cast<double>(vod_ref.earliest_presentation_time) /
+
204  GetReferenceTimeScale();
+
205  // Give a warning if it is significant.
+
206  if (starting_time_in_seconds > 0.5) {
+
207  // Note that DASH IF player requires presentationTimeOffset to be set in
+
208  // Segment{Base,List,Template} if there is non-zero starting time. Since
+
209  // current Chromium's MSE implementation uses DTS, the player expects
+
210  // DTS to be used.
+
211  LOG(WARNING) << "Warning! Non-zero starting time (in seconds): "
+
212  << starting_time_in_seconds
+
213  << ". Manual adjustment of presentationTimeOffset in "
+
214  "mpd might be necessary.";
+
215  }
+
216  }
+
217  // Force earliest_presentation_time to start from 0 for VOD.
+
218  vod_sidx_->earliest_presentation_time = 0;
+
219  }
+
220  vod_sidx_->references.push_back(vod_ref);
+
221 
+
222  // Append fragment buffer to temp file.
+
223  size_t segment_size = fragment_buffer()->Size();
+
224  Status status = fragment_buffer()->WriteToFile(temp_file_.get());
+
225  if (!status.ok()) return status;
+
226 
+
227  UpdateProgress(vod_ref.subsegment_duration);
+
228  if (muxer_listener()) {
+
229  muxer_listener()->OnSampleDurationReady(sample_duration());
+
230  muxer_listener()->OnNewSegment(options().output_file_name,
+
231  vod_ref.earliest_presentation_time,
+
232  vod_ref.subsegment_duration, segment_size);
+
233  }
+
234  return Status::OK;
+
235 }
+
236 
+
237 } // namespace mp4
+
238 } // namespace media
+
239 } // namespace shaka
virtual void OnNewSegment(const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t segment_file_size)=0
virtual bool Open()=0
Internal open. Should not be used directly.
virtual void OnSampleDurationReady(uint32_t sample_duration)=0
void UpdateProgress(uint64_t progress)
Update segmentation progress using ProgressListener.
Definition: segmenter.cc:254
-
static bool Delete(const char *file_name)
Definition: file.cc:162
+
static bool Delete(const char *file_name)
Definition: file.cc:167
diff --git a/docs/de/d22/aes__pattern__cryptor_8cc_source.html b/docs/de/d22/aes__pattern__cryptor_8cc_source.html index 1b04d84f83..47587b906b 100644 --- a/docs/de/d22/aes__pattern__cryptor_8cc_source.html +++ b/docs/de/d22/aes__pattern__cryptor_8cc_source.html @@ -198,7 +198,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 ee0d7737bb..05ab208037 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 5ab2e7f5d3..913706ad46 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 @@ -183,7 +183,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2158 of file box_definitions.cc.

+

Definition at line 2159 of file box_definitions.cc.

@@ -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 8e4349ac42..247489cd6e 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 1bd571989b..de32c2fc03 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 7bbe921f8f..b50340a98b 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 1cf99b53bd..f59a4c4df4 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 3cf82f70b7..01a373d45c 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 adef03988a..d35402a19e 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 ee9a3394e6..a9ef905e9e 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 8b9cb1154f..34aa68954e 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 0c2ff6f320..de4b0d1f28 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 06ddbd580c..5734449e40 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 9dfe3ec737..22697acbf2 100644 --- a/docs/de/d52/classshaka_1_1Representation.html +++ b/docs/de/d52/classshaka_1_1Representation.html @@ -200,7 +200,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 1036 of file mpd_builder.cc.

+

Definition at line 1035 of file mpd_builder.cc.

@@ -234,7 +234,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 1093 of file mpd_builder.cc.

+

Definition at line 1092 of file mpd_builder.cc.

@@ -285,7 +285,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 1105 of file mpd_builder.cc.

+

Definition at line 1104 of file mpd_builder.cc.

@@ -303,7 +303,7 @@ template<MpdBuilder::MpdType type>
Returns
Copy of <Representation>.
-

Definition at line 1145 of file mpd_builder.cc.

+

Definition at line 1144 of file mpd_builder.cc.

@@ -348,7 +348,7 @@ template<MpdBuilder::MpdType type>

Tries to initialize the instance. If this does not succeed, the instance should not be used.

Returns
true on success, false otherwise.
-

Definition at line 1051 of file mpd_builder.cc.

+

Definition at line 1050 of file mpd_builder.cc.

@@ -381,7 +381,7 @@ template<MpdBuilder::MpdType type> -

Definition at line 1129 of file mpd_builder.cc.

+

Definition at line 1128 of file mpd_builder.cc.

@@ -400,7 +400,7 @@ template<MpdBuilder::MpdType type>

By calling this methods, the next time GetXml() is called, the corresponding attributes will not be set. For example, if SuppressOnce(kSuppressWidth) is called, then GetXml() will return a <Representation> element without a attribute. Note that it only applies to the next call to GetXml(), calling GetXml() again without calling this methods will return a <Representation> element with the attribute. This may be called multiple times to set different (or the same) flags.

-

Definition at line 1208 of file mpd_builder.cc.

+

Definition at line 1207 of file mpd_builder.cc.

@@ -445,7 +445,7 @@ template<MpdBuilder::MpdType type>
Attention
This might get removed once DASH IF IOP specification makes a a clear guideline on how to handle key rotation. Also to get this working with shaka-player, this method DOES NOT update the PSSH element. Instead, it removes the element regardless of the content of pssh.
-

Definition at line 1099 of file mpd_builder.cc.

+

Definition at line 1098 of file mpd_builder.cc.

@@ -456,7 +456,7 @@ template<MpdBuilder::MpdType type> 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 cbdca0e7e9..12d1b51cdf 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 177878f9cb..41cbf7bbab 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 2525b20115..522fba352b 100644 --- a/docs/de/d5c/mpd__flags_8h_source.html +++ b/docs/de/d5c/mpd__flags_8h_source.html @@ -114,7 +114,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 2fcd79eb64..651dd5b84d 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 bab2c67127..a5eb721ea0 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 6a8283e90c..56aeca9668 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 c717ad2978..ee39d2657f 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 bec89d96c9..cf82ad2b28 100644 --- a/docs/de/d70/http__key__fetcher_8cc_source.html +++ b/docs/de/d70/http__key__fetcher_8cc_source.html @@ -238,7 +238,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 9f331ec623..7d566f7723 100644 --- a/docs/de/d77/webm__content__encodings__client_8cc_source.html +++ b/docs/de/d77/webm__content__encodings__client_8cc_source.html @@ -361,7 +361,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 1b47439af5..74305652da 100644 --- a/docs/de/d7b/mp4__media__parser_8h_source.html +++ b/docs/de/d7b/mp4__media__parser_8h_source.html @@ -206,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); 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 e35efc403c..9f9e9964bf 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 3ca64f23a7..5e4bd69fb5 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 57a2973f56..c6a55d3a3f 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 a16cf6b1cb..48b3d0b356 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 108c15263d..ad606e440a 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 0f4f43d58c..64bec7120a 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 81bd62d396..f7ef365d45 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 5dabe57177..e4cce4b9e3 100644 --- a/docs/de/dab/es__parser__h26x_8cc_source.html +++ b/docs/de/dab/es__parser__h26x_8cc_source.html @@ -415,7 +415,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/de/dad/validate__flag_8cc_source.html b/docs/de/dad/validate__flag_8cc_source.html index 2ea26decd1..b847a242f0 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 0e78feab2f..da03e64fd4 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 f7abe7392c..f16f14cd6b 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/dc1/demuxer_8h_source.html b/docs/de/dc1/demuxer_8h_source.html index df15ee262b..39e6af8171 100644 --- a/docs/de/dc1/demuxer_8h_source.html +++ b/docs/de/dc1/demuxer_8h_source.html @@ -187,7 +187,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 99fea4db04..de8fcd1be8 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 7bedcbae1c..14d0292704 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 639010c2a3..bd0464aabf 100644 --- a/docs/de/dcb/ts__segmenter_8h_source.html +++ b/docs/de/dcb/ts__segmenter_8h_source.html @@ -211,7 +211,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 6283ef2657..dfe428e2b1 100644 --- a/docs/de/dcc/mock__mpd__notifier_8cc_source.html +++ b/docs/de/dcc/mock__mpd__notifier_8cc_source.html @@ -98,7 +98,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 ad093dabad..e0337d1830 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 c22ba53bec..b70ce03e6b 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 ecc1fc040d..004d605582 100644 --- a/docs/de/dd6/muxer__listener__test__helper_8cc_source.html +++ b/docs/de/dd6/muxer__listener__test__helper_8cc_source.html @@ -219,7 +219,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 99ffafe443..35e4c79d53 100644 --- a/docs/de/ddd/classshaka_1_1media_1_1Muxer-members.html +++ b/docs/de/ddd/classshaka_1_1media_1_1Muxer-members.html @@ -116,7 +116,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 726efe54ae..8236139f0a 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 @@ -256,7 +256,7 @@ void  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 343e287ffc..844197e460 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 60a4e55119..8217f6ac21 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 b9dbbabcf1..c13efaeb03 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 @@ -117,7 +117,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 5894b6b388..0cee8c6821 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 da86468cc6..d9b8328a34 100644 --- a/docs/de/dea/classshaka_1_1media_1_1H26xByteToUnitStreamConverter.html +++ b/docs/de/dea/classshaka_1_1media_1_1H26xByteToUnitStreamConverter.html @@ -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 c80bddadc1..a9602a7cac 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 677 of file box_definitions.cc.

+

Definition at line 678 of file box_definitions.cc.

@@ -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 a0c2e479d6..45bf4007c5 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 d4c929e035..7655308874 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 @@ -203,7 +203,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 f2e47e406f..c9266898e5 100644 --- a/docs/de/dfa/muxer__listener_8h_source.html +++ b/docs/de/dfa/muxer__listener_8h_source.html @@ -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 e528712461..000fb6623a 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 @@ -165,7 +165,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1710 of file box_definitions.cc.

+

Definition at line 1711 of file box_definitions.cc.

@@ -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 780ba55e84..bb92686226 100644 --- a/docs/de/dfd/stream__info_8cc_source.html +++ b/docs/de/dfd/stream__info_8cc_source.html @@ -143,7 +143,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 484ce26375..e27665e3ff 100644 --- a/docs/df/d05/vp__codec__configuration__record_8cc_source.html +++ b/docs/df/d05/vp__codec__configuration__record_8cc_source.html @@ -250,116 +250,117 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
161  uint8_t chroma = (chroma_subsampling_ << 4) | (transfer_function_ << 1) |
162  (video_full_range_flag_ ? 1 : 0);
163  writer.AppendInt(chroma);
-
164  uint16_t codec_initialization_data_size = codec_initialization_data_.size();
-
165  writer.AppendInt(codec_initialization_data_size);
-
166  writer.AppendVector(codec_initialization_data_);
-
167  writer.SwapBuffer(data);
-
168 }
-
169 
-
170 void VPCodecConfigurationRecord::WriteWebM(std::vector<uint8_t>* data) const {
-
171  BufferWriter writer;
-
172 
-
173  if (profile_is_set_) {
-
174  writer.AppendInt(static_cast<uint8_t>(kFeatureProfile)); // ID = 1
-
175  writer.AppendInt(static_cast<uint8_t>(1)); // Length = 1
-
176  writer.AppendInt(static_cast<uint8_t>(profile_));
-
177  }
-
178 
-
179  if (level_is_set_ && level_ != 0) {
-
180  writer.AppendInt(static_cast<uint8_t>(kFeatureLevel)); // ID = 2
-
181  writer.AppendInt(static_cast<uint8_t>(1)); // Length = 1
-
182  writer.AppendInt(static_cast<uint8_t>(level_));
-
183  }
-
184 
-
185  if (bit_depth_is_set_) {
-
186  writer.AppendInt(static_cast<uint8_t>(kFeatureBitDepth)); // ID = 3
-
187  writer.AppendInt(static_cast<uint8_t>(1)); // Length = 1
-
188  writer.AppendInt(static_cast<uint8_t>(bit_depth_));
-
189  }
-
190 
-
191  if (chroma_subsampling_is_set_) {
-
192  // WebM doesn't differentiate whether it is vertical or collocated with luma
-
193  // for 4:2:0.
-
194  const uint8_t subsampling =
-
195  chroma_subsampling_ == CHROMA_420_COLLOCATED_WITH_LUMA
-
196  ? CHROMA_420_VERTICAL
-
197  : chroma_subsampling_;
-
198  // ID = 4, Length = 1
-
199  writer.AppendInt(static_cast<uint8_t>(kFeatureChromaSubsampling));
-
200  writer.AppendInt(static_cast<uint8_t>(1));
-
201  writer.AppendInt(subsampling);
-
202  }
-
203 
-
204  writer.SwapBuffer(data);
-
205 }
-
206 
-
207 std::string VPCodecConfigurationRecord::GetCodecString(VideoCodec codec) const {
-
208  const std::string fields[] = {
-
209  base::IntToString(profile_),
-
210  base::IntToString(level_),
-
211  base::IntToString(bit_depth_),
-
212  base::IntToString(color_space_),
-
213  base::IntToString(chroma_subsampling_),
-
214  base::IntToString(transfer_function_),
-
215  (video_full_range_flag_ ? "01" : "00"),
-
216  };
-
217 
-
218  std::string codec_string = VPCodecAsString(codec);
-
219  for (const std::string& field : fields) {
-
220  // Make sure every field is at least 2-chars wide. The space will be
-
221  // replaced with '0' afterwards.
-
222  base::StringAppendF(&codec_string, ".%2s", field.c_str());
-
223  }
-
224  base::ReplaceChars(codec_string, " ", "0", &codec_string);
-
225  return codec_string;
-
226 }
-
227 
-
228 void VPCodecConfigurationRecord::MergeFrom(
-
229  const VPCodecConfigurationRecord& other) {
-
230  MergeField("profile", other.profile_, other.profile_is_set_, &profile_,
-
231  &profile_is_set_);
-
232  MergeField("level", other.level_, other.level_is_set_, &level_,
-
233  &level_is_set_);
-
234  MergeField("bit depth", other.bit_depth_, other.bit_depth_is_set_,
-
235  &bit_depth_, &bit_depth_is_set_);
-
236  MergeField("color space", other.color_space_, other.color_space_is_set_,
-
237  &color_space_, &color_space_is_set_);
-
238  MergeField("chroma subsampling", other.chroma_subsampling_,
-
239  other.chroma_subsampling_is_set_, &chroma_subsampling_,
-
240  &chroma_subsampling_is_set_);
-
241  MergeField("transfer function", other.transfer_function_,
-
242  other.transfer_function_is_set_, &transfer_function_,
-
243  &transfer_function_is_set_);
-
244  MergeField("video full range flag", other.video_full_range_flag_,
-
245  other.video_full_range_flag_is_set_, &video_full_range_flag_,
-
246  &video_full_range_flag_is_set_);
-
247 
-
248  if (codec_initialization_data_.empty() ||
-
249  !other.codec_initialization_data_.empty()) {
-
250  if (!codec_initialization_data_.empty() &&
-
251  codec_initialization_data_ != other.codec_initialization_data_) {
-
252  LOG(WARNING) << "VPx codec initialization data is inconsistent";
-
253  }
-
254  codec_initialization_data_ = other.codec_initialization_data_;
-
255  }
-
256 }
-
257 
-
258 } // namespace media
-
259 } // namespace shaka
+
164  uint16_t codec_initialization_data_size =
+
165  static_cast<uint16_t>(codec_initialization_data_.size());
+
166  writer.AppendInt(codec_initialization_data_size);
+
167  writer.AppendVector(codec_initialization_data_);
+
168  writer.SwapBuffer(data);
+
169 }
+
170 
+
171 void VPCodecConfigurationRecord::WriteWebM(std::vector<uint8_t>* data) const {
+
172  BufferWriter writer;
+
173 
+
174  if (profile_is_set_) {
+
175  writer.AppendInt(static_cast<uint8_t>(kFeatureProfile)); // ID = 1
+
176  writer.AppendInt(static_cast<uint8_t>(1)); // Length = 1
+
177  writer.AppendInt(static_cast<uint8_t>(profile_));
+
178  }
+
179 
+
180  if (level_is_set_ && level_ != 0) {
+
181  writer.AppendInt(static_cast<uint8_t>(kFeatureLevel)); // ID = 2
+
182  writer.AppendInt(static_cast<uint8_t>(1)); // Length = 1
+
183  writer.AppendInt(static_cast<uint8_t>(level_));
+
184  }
+
185 
+
186  if (bit_depth_is_set_) {
+
187  writer.AppendInt(static_cast<uint8_t>(kFeatureBitDepth)); // ID = 3
+
188  writer.AppendInt(static_cast<uint8_t>(1)); // Length = 1
+
189  writer.AppendInt(static_cast<uint8_t>(bit_depth_));
+
190  }
+
191 
+
192  if (chroma_subsampling_is_set_) {
+
193  // WebM doesn't differentiate whether it is vertical or collocated with luma
+
194  // for 4:2:0.
+
195  const uint8_t subsampling =
+
196  chroma_subsampling_ == CHROMA_420_COLLOCATED_WITH_LUMA
+
197  ? CHROMA_420_VERTICAL
+
198  : chroma_subsampling_;
+
199  // ID = 4, Length = 1
+
200  writer.AppendInt(static_cast<uint8_t>(kFeatureChromaSubsampling));
+
201  writer.AppendInt(static_cast<uint8_t>(1));
+
202  writer.AppendInt(subsampling);
+
203  }
+
204 
+
205  writer.SwapBuffer(data);
+
206 }
+
207 
+
208 std::string VPCodecConfigurationRecord::GetCodecString(VideoCodec codec) const {
+
209  const std::string fields[] = {
+
210  base::IntToString(profile_),
+
211  base::IntToString(level_),
+
212  base::IntToString(bit_depth_),
+
213  base::IntToString(color_space_),
+
214  base::IntToString(chroma_subsampling_),
+
215  base::IntToString(transfer_function_),
+
216  (video_full_range_flag_ ? "01" : "00"),
+
217  };
+
218 
+
219  std::string codec_string = VPCodecAsString(codec);
+
220  for (const std::string& field : fields) {
+
221  // Make sure every field is at least 2-chars wide. The space will be
+
222  // replaced with '0' afterwards.
+
223  base::StringAppendF(&codec_string, ".%2s", field.c_str());
+
224  }
+
225  base::ReplaceChars(codec_string, " ", "0", &codec_string);
+
226  return codec_string;
+
227 }
+
228 
+
229 void VPCodecConfigurationRecord::MergeFrom(
+
230  const VPCodecConfigurationRecord& other) {
+
231  MergeField("profile", other.profile_, other.profile_is_set_, &profile_,
+
232  &profile_is_set_);
+
233  MergeField("level", other.level_, other.level_is_set_, &level_,
+
234  &level_is_set_);
+
235  MergeField("bit depth", other.bit_depth_, other.bit_depth_is_set_,
+
236  &bit_depth_, &bit_depth_is_set_);
+
237  MergeField("color space", other.color_space_, other.color_space_is_set_,
+
238  &color_space_, &color_space_is_set_);
+
239  MergeField("chroma subsampling", other.chroma_subsampling_,
+
240  other.chroma_subsampling_is_set_, &chroma_subsampling_,
+
241  &chroma_subsampling_is_set_);
+
242  MergeField("transfer function", other.transfer_function_,
+
243  other.transfer_function_is_set_, &transfer_function_,
+
244  &transfer_function_is_set_);
+
245  MergeField("video full range flag", other.video_full_range_flag_,
+
246  other.video_full_range_flag_is_set_, &video_full_range_flag_,
+
247  &video_full_range_flag_is_set_);
+
248 
+
249  if (codec_initialization_data_.empty() ||
+
250  !other.codec_initialization_data_.empty()) {
+
251  if (!codec_initialization_data_.empty() &&
+
252  codec_initialization_data_ != other.codec_initialization_data_) {
+
253  LOG(WARNING) << "VPx codec initialization data is inconsistent";
+
254  }
+
255  codec_initialization_data_ = other.codec_initialization_data_;
+
256  }
+
257 }
+
258 
+
259 } // namespace media
+
260 } // namespace shaka
Class for parsing or writing VP codec configuration record.
A class to read bit streams.
Definition: bit_reader.h:17
void WriteMP4(std::vector< uint8_t > *data) const
-
void WriteWebM(std::vector< uint8_t > *data) const
+
void WriteWebM(std::vector< uint8_t > *data) const
bool ParseMP4(const std::vector< uint8_t > &data)
-
std::string GetCodecString(VideoCodec codec) const
+
std::string GetCodecString(VideoCodec codec) const
bool ParseWebM(const std::vector< uint8_t > &data)
diff --git a/docs/df/d1a/offset__byte__queue_8cc_source.html b/docs/df/d1a/offset__byte__queue_8cc_source.html index daebca096a..1ff0302c38 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 dbf368dda5..8930ee1fe3 100644 --- a/docs/df/d1c/classshaka_1_1media_1_1MediaSample-members.html +++ b/docs/df/d1c/classshaka_1_1media_1_1MediaSample-members.html @@ -123,7 +123,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d1c/composition__offset__iterator_8h_source.html b/docs/df/d1c/composition__offset__iterator_8h_source.html index 2e5772461a..958d1b3a72 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 b4ec681225..f5d334af1e 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 3dd25b40b2..70e8d31e3b 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 1b2e86911e..5d4c1f39c9 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 75c6e6ca99..d4a0a1888c 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 9acc8868d2..1e0dd8d504 100644 --- a/docs/df/d31/muxer__util_8cc_source.html +++ b/docs/df/d31/muxer__util_8cc_source.html @@ -264,7 +264,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 b4d89aebf6..70da571a42 100644 --- a/docs/df/d32/audio__stream__info_8h_source.html +++ b/docs/df/d32/audio__stream__info_8h_source.html @@ -193,7 +193,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 a2b49ac0b0..08ae74ea6e 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 3e060ebfb3..14bb156bd6 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 fd64acb53c..608da62668 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 54d184c26d..2ae392a638 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 398f3c392f..1508a576d0 100644 --- a/docs/df/d46/classshaka_1_1media_1_1Muxer.html +++ b/docs/df/d46/classshaka_1_1media_1_1Muxer.html @@ -342,7 +342,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 19ee5c2958..f3d4d9ade1 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 1482995ab8..7fb5cf06f7 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 93aa4df2d9..a7549016ae 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 ff10b30577..64f02df5af 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 @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d60/classshaka_1_1MockMpdBuilder.html b/docs/df/d60/classshaka_1_1MockMpdBuilder.html index 8ad86d7fb5..230819e4df 100644 --- a/docs/df/d60/classshaka_1_1MockMpdBuilder.html +++ b/docs/df/d60/classshaka_1_1MockMpdBuilder.html @@ -153,7 +153,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 d0a1d9101d..5212dbec6c 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 ca5ecb3443..4e753a379c 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 7e330eb49c..692523d582 100644 --- a/docs/df/d6a/classshaka_1_1MockMpdBuilder-members.html +++ b/docs/df/d6a/classshaka_1_1MockMpdBuilder-members.html @@ -112,7 +112,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 14c856a8af..d06ab24c13 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 74ec8507ee..27b89ed431 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 699 of file box_definitions.cc.

+

Definition at line 700 of file box_definitions.cc.

@@ -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 d884e5b32c..8abd7bcd14 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 @@ -187,7 +187,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2452 of file box_definitions.cc.

+

Definition at line 2453 of file box_definitions.cc.

@@ -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 24cc3c4da2..d09b2eae73 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 2719c64787..172ae59c90 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 73d353d4f4..bb3b47f525 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 6a8db148e1..c2483499e9 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 1979 of file box_definitions.cc.

+

Definition at line 1980 of file box_definitions.cc.

@@ -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 d7d383975b..df1c162757 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 07b492834b..978b65a5f9 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 3d118c4dbe..922c94082a 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 @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d8d/es__parser__h26x_8h_source.html b/docs/df/d8d/es__parser__h26x_8h_source.html index 73ed77e25c..c77270712b 100644 --- a/docs/df/d8d/es__parser__h26x_8h_source.html +++ b/docs/df/d8d/es__parser__h26x_8h_source.html @@ -222,7 +222,7 @@ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); diff --git a/docs/df/d94/classshaka_1_1RepresentationStateChangeListener.html b/docs/df/d94/classshaka_1_1RepresentationStateChangeListener.html index 1fd14745e4..7992d18951 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 fb41e04398..69fffa11c3 100644 --- a/docs/df/d96/xml__node_8cc_source.html +++ b/docs/df/d96/xml__node_8cc_source.html @@ -488,7 +488,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 411a4ddd00..73bdd5e749 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 @@ -171,7 +171,7 @@ Additional Inherited Members

Implements shaka::media::mp4::Box.

-

Definition at line 2241 of file box_definitions.cc.

+

Definition at line 2242 of file box_definitions.cc.

@@ -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 b983055c46..9f28f4f0f2 100644 --- a/docs/df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html +++ b/docs/df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html @@ -311,7 +311,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 0e913fc377..d7c7e064ae 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 e980ce89b4..ab29ce7d9e 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 032b785c7b..1f876dcce0 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 5543470618..6b9a692cfc 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 6ea6d94f23..472c64135a 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 950069acae..057a4852bd 100644 --- a/docs/df/dd2/mpd__utils_8h_source.html +++ b/docs/df/dd2/mpd__utils_8h_source.html @@ -174,7 +174,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 e2b734f020..4d5e33e6b4 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 a8ab9cc630..4521511a0b 100644 --- a/docs/df/ddc/webm_2segmenter_8h_source.html +++ b/docs/df/ddc/webm_2segmenter_8h_source.html @@ -250,7 +250,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 c8a8d967f6..4f55668500 100644 --- a/docs/df/dde/ts__section__psi_8cc_source.html +++ b/docs/df/dde/ts__section__psi_8cc_source.html @@ -228,7 +228,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 d97f0a8e57..84336d122b 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 48a913fdbd..05851c502a 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 384056b08b..5805839677 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 60f997f4e5..ed27fd2b04 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/dir_0494b8c96e3190a776d2b97ade9c8ddf.html b/docs/dir_0494b8c96e3190a776d2b97ade9c8ddf.html index 86577ef08a..f8ba3c2c62 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 a2762f78d7..593576dbce 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 de09f41f7c..74cd0346d0 100644 --- a/docs/dir_279fd47bebb21302c25cfb685e84c359.html +++ b/docs/dir_279fd47bebb21302c25cfb685e84c359.html @@ -119,7 +119,7 @@ Files diff --git a/docs/dir_2eceb70145328c029a5f43350007537a.html b/docs/dir_2eceb70145328c029a5f43350007537a.html index ae226e3e37..5c6ca22317 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 2e74d476cb..8673d6d722 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 ef925a3188..5354354470 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 864b230dce..417a3fd3b4 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 94be196cba..539146e522 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 fe1ea1f130..07b60d44c6 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 8238b0df78..33021ba2bd 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 91c7d26487..23d2735f12 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 3dec6cfdb2..400c105bd1 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 fcf2b60093..194426e261 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 d3c2f960c2..2bc160e7e6 100644 --- a/docs/dir_c6ada2450b25ab5438a4dba6c9b890af.html +++ b/docs/dir_c6ada2450b25ab5438a4dba6c9b890af.html @@ -245,7 +245,7 @@ Files diff --git a/docs/dir_d422163b96683743ed3963d4aac17747.html b/docs/dir_d422163b96683743ed3963d4aac17747.html index a485bce26b..ff077a182e 100644 --- a/docs/dir_d422163b96683743ed3963d4aac17747.html +++ b/docs/dir_d422163b96683743ed3963d4aac17747.html @@ -135,7 +135,7 @@ Files diff --git a/docs/dir_eeaeb49ac3913fcfb450d3ce9cc0141b.html b/docs/dir_eeaeb49ac3913fcfb450d3ce9cc0141b.html index 007cad1f18..af4c8d4819 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 515ad13564..481a8a62d4 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 0e4c5280f1..50feba4f0d 100644 --- a/docs/files.html +++ b/docs/files.html @@ -430,7 +430,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions.html b/docs/functions.html index 32eb26c235..34b28c0a75 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -240,7 +240,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_b.html b/docs/functions_b.html index 77b3d22e4f..e5297c3835 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 df33eada39..2e8df11a9f 100644 --- a/docs/functions_c.html +++ b/docs/functions_c.html @@ -241,7 +241,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_d.html b/docs/functions_d.html index 74ee8a5a61..968e85f836 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 0a58c9248f..5731fd266c 100644 --- a/docs/functions_e.html +++ b/docs/functions_e.html @@ -146,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_enum.html b/docs/functions_enum.html index 2d96acab1b..a7b4c6bc8d 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 54846248e2..d8d2220677 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 ed3f0e4681..51c98563a4 100644 --- a/docs/functions_f.html +++ b/docs/functions_f.html @@ -193,7 +193,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func.html b/docs/functions_func.html index e8662bac02..b46a182aff 100644 --- a/docs/functions_func.html +++ b/docs/functions_func.html @@ -240,7 +240,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_b.html b/docs/functions_func_b.html index 53e9b3d64a..b1c08823e4 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 971522efb8..e8c18bb399 100644 --- a/docs/functions_func_c.html +++ b/docs/functions_func_c.html @@ -241,7 +241,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_d.html b/docs/functions_func_d.html index 4b483f23fd..d37abef476 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 66bd12dc28..0d154ffd84 100644 --- a/docs/functions_func_e.html +++ b/docs/functions_func_e.html @@ -146,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_f.html b/docs/functions_func_f.html index 2e95bf6f53..d9cecb3ce8 100644 --- a/docs/functions_func_f.html +++ b/docs/functions_func_f.html @@ -187,7 +187,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_g.html b/docs/functions_func_g.html index 0392112266..f7b9367367 100644 --- a/docs/functions_func_g.html +++ b/docs/functions_func_g.html @@ -259,7 +259,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_h.html b/docs/functions_func_h.html index 733c175fde..8591ddaaf0 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 4eaacd8e68..d2a74ec1d1 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 194344ce96..960ea4c19e 100644 --- a/docs/functions_func_k.html +++ b/docs/functions_func_k.html @@ -129,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_l.html b/docs/functions_func_l.html index 45b019114a..3f8040ec46 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 728e794528..1a0cc1afd0 100644 --- a/docs/functions_func_m.html +++ b/docs/functions_func_m.html @@ -147,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_n.html b/docs/functions_func_n.html index 5fb50beaee..9105f00cef 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 6cee86104f..f94c9506a7 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 f7af7f8677..b2a8318aec 100644 --- a/docs/functions_func_p.html +++ b/docs/functions_func_p.html @@ -151,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::mp4::SampleEncryptionEntry
  • ParseFromSampleEncryptionData() -: shaka::media::mp4::SampleEncryption +: shaka::media::mp4::SampleEncryption
  • ParseMP4() : shaka::media::VPCodecConfigurationRecord @@ -228,7 +228,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_r.html b/docs/functions_func_r.html index 95dc6a1e8c..5b1fb5074f 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 13c6cb08a4..e5e718b594 100644 --- a/docs/functions_func_s.html +++ b/docs/functions_func_s.html @@ -285,7 +285,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_t.html b/docs/functions_func_t.html index 9b25679c76..2b132e5d00 100644 --- a/docs/functions_func_t.html +++ b/docs/functions_func_t.html @@ -179,7 +179,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_func_u.html b/docs/functions_func_u.html index 95788a17b4..7f82f8f7ea 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 480c54535d..72696fdd32 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 ae64684b82..be90aa10d1 100644 --- a/docs/functions_func_w.html +++ b/docs/functions_func_w.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , shaka::media::UdpFile
  • WriteFromFile() -: shaka::media::MkvWriter +: shaka::media::MkvWriter
  • WriteHeader() : shaka::media::mp4::Box @@ -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 afb5a10b4c..758243767b 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 e0efeaea59..25b21fa87c 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 6c87c5b5fb..9f5012a5c2 100644 --- a/docs/functions_g.html +++ b/docs/functions_g.html @@ -259,7 +259,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_h.html b/docs/functions_h.html index fd0097b27f..45b2c28342 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 6f6d841284..1139577fd4 100644 --- a/docs/functions_i.html +++ b/docs/functions_i.html @@ -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 ed5adbc5db..b119d725c3 100644 --- a/docs/functions_k.html +++ b/docs/functions_k.html @@ -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 0045627885..26b590983a 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 bfe94b465e..d1e2655069 100644 --- a/docs/functions_m.html +++ b/docs/functions_m.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_n.html b/docs/functions_n.html index 352688bec8..7cb20ad8be 100644 --- a/docs/functions_n.html +++ b/docs/functions_n.html @@ -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 571610a9f5..1771ba5e09 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 c7108f9d69..2daeb92793 100644 --- a/docs/functions_p.html +++ b/docs/functions_p.html @@ -151,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : shaka::media::mp4::SampleEncryptionEntry
  • ParseFromSampleEncryptionData() -: shaka::media::mp4::SampleEncryption +: shaka::media::mp4::SampleEncryption
  • ParseMP4() : shaka::media::VPCodecConfigurationRecord @@ -234,7 +234,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_r.html b/docs/functions_r.html index 15b8d18ca8..198b5b1fb2 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 d31b4ee26b..d823c13f8d 100644 --- a/docs/functions_s.html +++ b/docs/functions_s.html @@ -300,7 +300,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_t.html b/docs/functions_t.html index 6d351a4fee..6c2201552b 100644 --- a/docs/functions_t.html +++ b/docs/functions_t.html @@ -182,7 +182,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_type.html b/docs/functions_type.html index d4cba37a14..879fa72461 100644 --- a/docs/functions_type.html +++ b/docs/functions_type.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_u.html b/docs/functions_u.html index 7ba80497a2..b3ceb7225b 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 4f3d21c2f3..abf7ea0223 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 933f4f6bac..afd7c05e43 100644 --- a/docs/functions_vars.html +++ b/docs/functions_vars.html @@ -145,7 +145,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/functions_w.html b/docs/functions_w.html index 6f7cfa8b56..d68b6f7b23 100644 --- a/docs/functions_w.html +++ b/docs/functions_w.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , shaka::media::UdpFile
  • WriteFromFile() -: shaka::media::MkvWriter +: shaka::media::MkvWriter
  • WriteHeader() : shaka::media::mp4::Box @@ -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 3d8fba6492..8fa1b845bd 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 423094068d..bbfefadd30 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 bce3bdd6c0..85cd65fc9e 100644 --- a/docs/hierarchy.html +++ b/docs/hierarchy.html @@ -368,7 +368,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/index.html b/docs/index.html index ccc58c4b4c..2b016bb893 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 d28e43c654..5c7ad1807d 100644 --- a/docs/namespacemembers.html +++ b/docs/namespacemembers.html @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/namespacemembers_func.html b/docs/namespacemembers_func.html index b19d857d43..53ad01caae 100644 --- a/docs/namespacemembers_func.html +++ b/docs/namespacemembers_func.html @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/docs/namespaces.html b/docs/namespaces.html index 54a3224fad..8557238662 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_14.js b/docs/search/all_14.js index 5c0e269004..7989dc37e1 100644 --- a/docs/search/all_14.js +++ b/docs/search/all_14.js @@ -21,7 +21,7 @@ var searchData= ['widevinekeysource',['WidevineKeySource',['../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#a93480a98e423d0456482844ac629bd2e',1,'shaka::media::WidevineKeySource']]], ['widevinekeysource',['WidevineKeySource',['../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html',1,'shaka::media']]], ['write',['Write',['../d3/d61/classshaka_1_1media_1_1File.html#a3149670c0d085e71f0aa085ee87fdda5',1,'shaka::media::File::Write()'],['../dd/d7c/classshaka_1_1media_1_1IoCache.html#a0349796209c24a99bfe3c1bfdafb1d28',1,'shaka::media::IoCache::Write()'],['../d9/de6/classshaka_1_1media_1_1LocalFile.html#ac23125695f0cfe77adee36df9650da8b',1,'shaka::media::LocalFile::Write()'],['../d9/dbd/classshaka_1_1media_1_1MemoryFile.html#a429e316e7bf529acb3586df1cd02be64',1,'shaka::media::MemoryFile::Write()'],['../d0/d66/classshaka_1_1media_1_1ThreadedIoFile.html#aa14502dd48c1c64329283f5f1340f60f',1,'shaka::media::ThreadedIoFile::Write()'],['../d7/d7a/classshaka_1_1media_1_1UdpFile.html#a7039c2dbc214f755a9eaaab4d3e10cb9',1,'shaka::media::UdpFile::Write()'],['../d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html#a15bd0622fdb129d921287e690f117bde',1,'shaka::media::mp4::Box::Write()'],['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a2468514d1d9efdb15a9e4df2e44b75d8',1,'shaka::media::MkvWriter::Write()'],['../dc/d16/classshaka_1_1media_1_1SeekHead.html#a46313134eebf68a7c34187705726b982',1,'shaka::media::SeekHead::Write()']]], - ['writefromfile',['WriteFromFile',['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#ab331684a758a93bf0c77fa224fe429ea',1,'shaka::media::MkvWriter::WriteFromFile(File *source)'],['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a3d2b28502f9d1fe721c59d67e7d5a436',1,'shaka::media::MkvWriter::WriteFromFile(File *source, uint64_t max_copy)']]], + ['writefromfile',['WriteFromFile',['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#ab331684a758a93bf0c77fa224fe429ea',1,'shaka::media::MkvWriter::WriteFromFile(File *source)'],['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a2dfac99ec5531ca2e102e5b145bb29ed',1,'shaka::media::MkvWriter::WriteFromFile(File *source, int64_t max_copy)']]], ['writeheader',['WriteHeader',['../d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html#a57b8837c93d51f5cf03d3862069d509a',1,'shaka::media::mp4::Box']]], ['writemediainfotofile',['WriteMediaInfoToFile',['../db/dd0/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener.html#ae0a573e1c785164f40bfbfba2ced6a16',1,'shaka::media::VodMediaInfoDumpMuxerListener']]], ['writemp4',['WriteMP4',['../d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html#a790c2bbfed9caa79aefb5c597c892e00',1,'shaka::media::VPCodecConfigurationRecord']]], diff --git a/docs/search/all_e.js b/docs/search/all_e.js index a92b5b00e1..adc7450a38 100644 --- a/docs/search/all_e.js +++ b/docs/search/all_e.js @@ -3,7 +3,7 @@ var searchData= ['parse',['Parse',['../dd/d17/classshaka_1_1media_1_1Demuxer.html#a0f9b7c954ff48c3021467300d755ac29',1,'shaka::media::Demuxer::Parse()'],['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0c85f3cb0591f67c036276be82a1ba9d',1,'shaka::media::MediaParser::Parse()'],['../d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html#a13b0f93b68efff614c5356df081f2560',1,'shaka::media::ProtectionSystemSpecificInfo::Parse()'],['../d0/da2/classshaka_1_1media_1_1AACAudioSpecificConfig.html#a6b3deca725a42113bf7303387ab74f0f',1,'shaka::media::AACAudioSpecificConfig::Parse()'],['../de/de0/classshaka_1_1media_1_1DecoderConfigurationRecord.html#ab05a1971c60e510b7bc0b5b578dfb04b',1,'shaka::media::DecoderConfigurationRecord::Parse(const std::vector< uint8_t > &data)'],['../de/de0/classshaka_1_1media_1_1DecoderConfigurationRecord.html#a07b7d0dbae45971d4fd4a24652980f65',1,'shaka::media::DecoderConfigurationRecord::Parse(const uint8_t *data, size_t data_size)'],['../d8/d14/classshaka_1_1media_1_1VP8Parser.html#a8baec0e4c74b0b220b777426d0c463e1',1,'shaka::media::VP8Parser::Parse()'],['../db/d5a/classshaka_1_1media_1_1VP9Parser.html#ae915c36aa472d70b55e3d65b24612e57',1,'shaka::media::VP9Parser::Parse()'],['../db/dcb/classshaka_1_1media_1_1VPxParser.html#abb83c8c74d304e83efb8fa60bd7bb722',1,'shaka::media::VPxParser::Parse()'],['../d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html#a2e154d7423498baf8cd8888c70dcfca9',1,'shaka::media::mp2t::AdtsHeader::Parse()'],['../d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html#af1a8a33b4ce61777c876717b005d0026',1,'shaka::media::mp2t::Mp2tMediaParser::Parse()'],['../d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html#a209382fcd42e82a896c29e856627ca52',1,'shaka::media::mp4::Box::Parse()'],['../d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html#a4105cdbe5ece03071a17c06fb27699b0',1,'shaka::media::mp4::MP4MediaParser::Parse()'],['../da/de4/classshaka_1_1media_1_1WebMClusterParser.html#aba1bae97c2d96181027e43b0a1993e67',1,'shaka::media::WebMClusterParser::Parse()'],['../db/dae/classshaka_1_1media_1_1WebMInfoParser.html#ae0b4d37e02d43627b1bc9c64f43ee3f7',1,'shaka::media::WebMInfoParser::Parse()'],['../d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html#a40940ec01d965e3a78213861a93f7cfc',1,'shaka::media::WebMMediaParser::Parse()'],['../dc/dca/classshaka_1_1media_1_1WebMListParser.html#acd805b7eb25afcd9a3be2d8d88e3c6af',1,'shaka::media::WebMListParser::Parse()'],['../d8/d86/classshaka_1_1media_1_1WebMTracksParser.html#aa4b6d4ac9fa57b47cbc17ee7c1bd3639',1,'shaka::media::WebMTracksParser::Parse()'],['../d4/d59/classshaka_1_1media_1_1WebMWebVTTParser.html#a4e6f754e4fba24f7ea77fd0db959908b',1,'shaka::media::WebMWebVTTParser::Parse()'],['../dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html#a5295c061b251726d1525cefc091101a2',1,'shaka::media::WebVttMediaParser::Parse()'],['../dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html#a246702aa75891cbe396ca7cc11e13eeb',1,'shaka::media::wvm::WvmMediaParser::Parse()']]], ['parseboxes',['ParseBoxes',['../d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html#aa984e27d2655a451ea87ff0a4ddd8b79',1,'shaka::media::ProtectionSystemSpecificInfo']]], ['parsefrombuffer',['ParseFromBuffer',['../d6/dcb/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry.html#a247ca9987470a6c724f1e099a78d3460',1,'shaka::media::mp4::SampleEncryptionEntry']]], - ['parsefromsampleencryptiondata',['ParseFromSampleEncryptionData',['../d4/dad/structshaka_1_1media_1_1mp4_1_1SampleEncryption.html#a2ed0aa8236ed7bc84fc605eeca61146a',1,'shaka::media::mp4::SampleEncryption']]], + ['parsefromsampleencryptiondata',['ParseFromSampleEncryptionData',['../d4/dad/structshaka_1_1media_1_1mp4_1_1SampleEncryption.html#a0498009b07beb46e029c65bfb55fc741',1,'shaka::media::mp4::SampleEncryption']]], ['parsemp4',['ParseMP4',['../d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html#aac5eac6e0a62201dcb68fd3f084bb281',1,'shaka::media::VPCodecConfigurationRecord']]], ['parsepps',['ParsePps',['../de/dc2/classshaka_1_1media_1_1H265Parser.html#a222c85ac46e908c8478304f2be769d6d',1,'shaka::media::H265Parser']]], ['parsesliceheader',['ParseSliceHeader',['../de/dc2/classshaka_1_1media_1_1H265Parser.html#ae94e80774a60cc7b9cfdb7503f5047fe',1,'shaka::media::H265Parser']]], diff --git a/docs/search/functions_14.js b/docs/search/functions_14.js index be3d667b30..1fa0a454b8 100644 --- a/docs/search/functions_14.js +++ b/docs/search/functions_14.js @@ -6,7 +6,7 @@ var searchData= ['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']]], ['write',['Write',['../d3/d61/classshaka_1_1media_1_1File.html#a3149670c0d085e71f0aa085ee87fdda5',1,'shaka::media::File::Write()'],['../dd/d7c/classshaka_1_1media_1_1IoCache.html#a0349796209c24a99bfe3c1bfdafb1d28',1,'shaka::media::IoCache::Write()'],['../d9/de6/classshaka_1_1media_1_1LocalFile.html#ac23125695f0cfe77adee36df9650da8b',1,'shaka::media::LocalFile::Write()'],['../d9/dbd/classshaka_1_1media_1_1MemoryFile.html#a429e316e7bf529acb3586df1cd02be64',1,'shaka::media::MemoryFile::Write()'],['../d0/d66/classshaka_1_1media_1_1ThreadedIoFile.html#aa14502dd48c1c64329283f5f1340f60f',1,'shaka::media::ThreadedIoFile::Write()'],['../d7/d7a/classshaka_1_1media_1_1UdpFile.html#a7039c2dbc214f755a9eaaab4d3e10cb9',1,'shaka::media::UdpFile::Write()'],['../d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html#a15bd0622fdb129d921287e690f117bde',1,'shaka::media::mp4::Box::Write()'],['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a2468514d1d9efdb15a9e4df2e44b75d8',1,'shaka::media::MkvWriter::Write()'],['../dc/d16/classshaka_1_1media_1_1SeekHead.html#a46313134eebf68a7c34187705726b982',1,'shaka::media::SeekHead::Write()']]], - ['writefromfile',['WriteFromFile',['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#ab331684a758a93bf0c77fa224fe429ea',1,'shaka::media::MkvWriter::WriteFromFile(File *source)'],['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a3d2b28502f9d1fe721c59d67e7d5a436',1,'shaka::media::MkvWriter::WriteFromFile(File *source, uint64_t max_copy)']]], + ['writefromfile',['WriteFromFile',['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#ab331684a758a93bf0c77fa224fe429ea',1,'shaka::media::MkvWriter::WriteFromFile(File *source)'],['../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a2dfac99ec5531ca2e102e5b145bb29ed',1,'shaka::media::MkvWriter::WriteFromFile(File *source, int64_t max_copy)']]], ['writeheader',['WriteHeader',['../d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html#a57b8837c93d51f5cf03d3862069d509a',1,'shaka::media::mp4::Box']]], ['writemediainfotofile',['WriteMediaInfoToFile',['../db/dd0/classshaka_1_1media_1_1VodMediaInfoDumpMuxerListener.html#ae0a573e1c785164f40bfbfba2ced6a16',1,'shaka::media::VodMediaInfoDumpMuxerListener']]], ['writemp4',['WriteMP4',['../d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html#a790c2bbfed9caa79aefb5c597c892e00',1,'shaka::media::VPCodecConfigurationRecord']]], diff --git a/docs/search/functions_e.js b/docs/search/functions_e.js index e1ea85d214..768e30bde0 100644 --- a/docs/search/functions_e.js +++ b/docs/search/functions_e.js @@ -3,7 +3,7 @@ var searchData= ['parse',['Parse',['../dd/d17/classshaka_1_1media_1_1Demuxer.html#a0f9b7c954ff48c3021467300d755ac29',1,'shaka::media::Demuxer::Parse()'],['../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0c85f3cb0591f67c036276be82a1ba9d',1,'shaka::media::MediaParser::Parse()'],['../d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html#a13b0f93b68efff614c5356df081f2560',1,'shaka::media::ProtectionSystemSpecificInfo::Parse()'],['../d0/da2/classshaka_1_1media_1_1AACAudioSpecificConfig.html#a6b3deca725a42113bf7303387ab74f0f',1,'shaka::media::AACAudioSpecificConfig::Parse()'],['../de/de0/classshaka_1_1media_1_1DecoderConfigurationRecord.html#ab05a1971c60e510b7bc0b5b578dfb04b',1,'shaka::media::DecoderConfigurationRecord::Parse(const std::vector< uint8_t > &data)'],['../de/de0/classshaka_1_1media_1_1DecoderConfigurationRecord.html#a07b7d0dbae45971d4fd4a24652980f65',1,'shaka::media::DecoderConfigurationRecord::Parse(const uint8_t *data, size_t data_size)'],['../d8/d14/classshaka_1_1media_1_1VP8Parser.html#a8baec0e4c74b0b220b777426d0c463e1',1,'shaka::media::VP8Parser::Parse()'],['../db/d5a/classshaka_1_1media_1_1VP9Parser.html#ae915c36aa472d70b55e3d65b24612e57',1,'shaka::media::VP9Parser::Parse()'],['../db/dcb/classshaka_1_1media_1_1VPxParser.html#abb83c8c74d304e83efb8fa60bd7bb722',1,'shaka::media::VPxParser::Parse()'],['../d3/d0c/classshaka_1_1media_1_1mp2t_1_1AdtsHeader.html#a2e154d7423498baf8cd8888c70dcfca9',1,'shaka::media::mp2t::AdtsHeader::Parse()'],['../d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html#af1a8a33b4ce61777c876717b005d0026',1,'shaka::media::mp2t::Mp2tMediaParser::Parse()'],['../d1/d2d/structshaka_1_1media_1_1mp4_1_1Box.html#a209382fcd42e82a896c29e856627ca52',1,'shaka::media::mp4::Box::Parse()'],['../d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html#a4105cdbe5ece03071a17c06fb27699b0',1,'shaka::media::mp4::MP4MediaParser::Parse()'],['../da/de4/classshaka_1_1media_1_1WebMClusterParser.html#aba1bae97c2d96181027e43b0a1993e67',1,'shaka::media::WebMClusterParser::Parse()'],['../db/dae/classshaka_1_1media_1_1WebMInfoParser.html#ae0b4d37e02d43627b1bc9c64f43ee3f7',1,'shaka::media::WebMInfoParser::Parse()'],['../d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html#a40940ec01d965e3a78213861a93f7cfc',1,'shaka::media::WebMMediaParser::Parse()'],['../dc/dca/classshaka_1_1media_1_1WebMListParser.html#acd805b7eb25afcd9a3be2d8d88e3c6af',1,'shaka::media::WebMListParser::Parse()'],['../d8/d86/classshaka_1_1media_1_1WebMTracksParser.html#aa4b6d4ac9fa57b47cbc17ee7c1bd3639',1,'shaka::media::WebMTracksParser::Parse()'],['../d4/d59/classshaka_1_1media_1_1WebMWebVTTParser.html#a4e6f754e4fba24f7ea77fd0db959908b',1,'shaka::media::WebMWebVTTParser::Parse()'],['../dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html#a5295c061b251726d1525cefc091101a2',1,'shaka::media::WebVttMediaParser::Parse()'],['../dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html#a246702aa75891cbe396ca7cc11e13eeb',1,'shaka::media::wvm::WvmMediaParser::Parse()']]], ['parseboxes',['ParseBoxes',['../d0/dd4/classshaka_1_1media_1_1ProtectionSystemSpecificInfo.html#aa984e27d2655a451ea87ff0a4ddd8b79',1,'shaka::media::ProtectionSystemSpecificInfo']]], ['parsefrombuffer',['ParseFromBuffer',['../d6/dcb/structshaka_1_1media_1_1mp4_1_1SampleEncryptionEntry.html#a247ca9987470a6c724f1e099a78d3460',1,'shaka::media::mp4::SampleEncryptionEntry']]], - ['parsefromsampleencryptiondata',['ParseFromSampleEncryptionData',['../d4/dad/structshaka_1_1media_1_1mp4_1_1SampleEncryption.html#a2ed0aa8236ed7bc84fc605eeca61146a',1,'shaka::media::mp4::SampleEncryption']]], + ['parsefromsampleencryptiondata',['ParseFromSampleEncryptionData',['../d4/dad/structshaka_1_1media_1_1mp4_1_1SampleEncryption.html#a0498009b07beb46e029c65bfb55fc741',1,'shaka::media::mp4::SampleEncryption']]], ['parsemp4',['ParseMP4',['../d1/da5/classshaka_1_1media_1_1VPCodecConfigurationRecord.html#aac5eac6e0a62201dcb68fd3f084bb281',1,'shaka::media::VPCodecConfigurationRecord']]], ['parsepps',['ParsePps',['../de/dc2/classshaka_1_1media_1_1H265Parser.html#a222c85ac46e908c8478304f2be769d6d',1,'shaka::media::H265Parser']]], ['parsesliceheader',['ParseSliceHeader',['../de/dc2/classshaka_1_1media_1_1H265Parser.html#ae94e80774a60cc7b9cfdb7503f5047fe',1,'shaka::media::H265Parser']]],