Shaka Packager SDK
Public Member Functions | List of all members
shaka::media::mp4::SingleSegmentSegmenter Class Reference

#include <single_segment_segmenter.h>

Inheritance diagram for shaka::media::mp4::SingleSegmentSegmenter:
shaka::media::mp4::Segmenter

Public Member Functions

 SingleSegmentSegmenter (const MuxerOptions &options, std::unique_ptr< FileType > ftyp, std::unique_ptr< Movie > moov)
 
Segmenter implementation overrides.
bool GetInitRange (size_t *offset, size_t *size) override
 
bool GetIndexRange (size_t *offset, size_t *size) override
 
std::vector< RangeGetSegmentRanges () override
 
- Public Member Functions inherited from shaka::media::mp4::Segmenter
 Segmenter (const MuxerOptions &options, std::unique_ptr< FileType > ftyp, std::unique_ptr< Movie > moov)
 
Status Initialize (const std::vector< std::shared_ptr< const StreamInfo >> &streams, MuxerListener *muxer_listener, ProgressListener *progress_listener)
 
Status Finalize ()
 
Status AddSample (size_t stream_id, const MediaSample &sample)
 
Status FinalizeSegment (size_t stream_id, const SegmentInfo &segment_info)
 
int32_t GetReferenceTimeScale () const
 
double GetDuration () const
 
int64_t sample_duration () const
 

Additional Inherited Members

- Protected Member Functions inherited from shaka::media::mp4::Segmenter
void UpdateProgress (uint64_t progress)
 Update segmentation progress using ProgressListener.
 
void SetComplete ()
 Set progress to 100%.
 
const MuxerOptionsoptions () const
 
FileTypeftyp ()
 
Moviemoov ()
 
BufferWriterfragment_buffer ()
 
SegmentIndexsidx ()
 
MuxerListenermuxer_listener ()
 
uint64_t progress_target ()
 
const std::vector< KeyFrameInfo > & key_frame_infos () const
 
void set_progress_target (uint64_t progress_target)
 

Detailed Description

Segmenter for MP4 Dash Video-On-Demand profile. A single MP4 file with a single segment is created, i.e. with only one SIDX box. The generated media file can contain one or many subsegments with subsegment duration defined by MuxerOptions.segment_duration. A subsegment can contain one or many fragments with fragment duration defined by MuxerOptions.fragment_duration. The actual subsegment or fragment duration may not match the requested duration exactly, but will be approximated. That is, the Segmenter tries to end subsegment/fragment at the first sample with overall subsegment/fragment duration not smaller than defined duration and yet meet SAP requirements.

Definition at line 29 of file single_segment_segmenter.h.

Member Function Documentation

◆ GetIndexRange()

bool shaka::media::mp4::SingleSegmentSegmenter::GetIndexRange ( size_t *  offset,
size_t *  size 
)
overridevirtual
Returns
true if there is an index byte range, while setting offset and size; or false if index byte range does not apply.

Implements shaka::media::mp4::Segmenter.

Definition at line 44 of file single_segment_segmenter.cc.

◆ GetInitRange()

bool shaka::media::mp4::SingleSegmentSegmenter::GetInitRange ( size_t *  offset,
size_t *  size 
)
overridevirtual
Returns
true if there is an initialization range, while setting offset and size; or false if initialization range does not apply.

Implements shaka::media::mp4::Segmenter.

Definition at line 37 of file single_segment_segmenter.cc.


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