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

#include <single_segment_segmenter.h>

Inheritance diagram for shaka::media::webm::SingleSegmentSegmenter:
shaka::media::webm::Segmenter shaka::media::webm::TwoPassSingleSegmentSegmenter

Public Member Functions

 SingleSegmentSegmenter (const MuxerOptions &options)
 
Segmenter implementation overrides.
Status FinalizeSegment (int64_t start_timestamp, int64_t duration_timestamp, bool is_subsegment, int64_t segment_number) override
 Finalize the (sub)segment.
 
bool GetInitRangeStartAndEnd (uint64_t *start, uint64_t *end) override
 
bool GetIndexRangeStartAndEnd (uint64_t *start, uint64_t *end) override
 
std::vector< RangeGetSegmentRanges () override
 
- Public Member Functions inherited from shaka::media::webm::Segmenter
 Segmenter (const MuxerOptions &options)
 
Status Initialize (const StreamInfo &info, ProgressListener *progress_listener, MuxerListener *muxer_listener)
 
Status Finalize ()
 
Status AddSample (const MediaSample &sample)
 
float GetDurationInSeconds () const
 

Protected Member Functions

MkvWriterwriter ()
 
uint64_t init_end ()
 
void set_init_end (uint64_t end)
 
void set_index_start (uint64_t start)
 
void set_index_end (uint64_t end)
 
void set_writer (std::unique_ptr< MkvWriter > writer)
 
Status DoInitialize () override
 
Status DoFinalize () override
 
- Protected Member Functions inherited from shaka::media::webm::Segmenter
int64_t FromBmffTimestamp (int64_t bmff_timestamp)
 Converts the given time in ISO BMFF timestamp to WebM timecode.
 
int64_t FromWebMTimecode (int64_t webm_timecode)
 Converts the given time in WebM timecode to ISO BMFF timestamp.
 
Status WriteSegmentHeader (uint64_t file_size, MkvWriter *writer)
 Writes the Segment header to writer.
 
Status SetCluster (int64_t start_webm_timecode, uint64_t position, MkvWriter *writer)
 Creates a Cluster object with the given parameters.
 
void UpdateProgress (uint64_t progress)
 Update segmentation progress using ProgressListener.
 
void set_progress_target (uint64_t target)
 
const MuxerOptionsoptions () const
 
mkvmuxer::Cluster * cluster ()
 
mkvmuxer::Cues * cues ()
 
MuxerListenermuxer_listener ()
 
SeekHeadseek_head ()
 
int track_id () const
 
uint64_t segment_payload_pos () const
 
int64_t duration () const
 

Detailed Description

An implementation of a Segmenter for a single-segment. This assumes that the output file is seekable. For non-seekable files, use TwoPassSingleSegmentSegmenter.

Definition at line 27 of file single_segment_segmenter.h.

Member Function Documentation

◆ GetIndexRangeStartAndEnd()

bool shaka::media::webm::SingleSegmentSegmenter::GetIndexRangeStartAndEnd ( uint64_t *  start,
uint64_t *  end 
)
overridevirtual
Returns
true if there is an index byte range, while setting start and end; or false if index byte range does not apply.

Implements shaka::media::webm::Segmenter.

Definition at line 53 of file single_segment_segmenter.cc.

◆ GetInitRangeStartAndEnd()

bool shaka::media::webm::SingleSegmentSegmenter::GetInitRangeStartAndEnd ( uint64_t *  start,
uint64_t *  end 
)
overridevirtual
Returns
true if there is an initialization range, while setting start and end; or false if initialization range does not apply.

Implements shaka::media::webm::Segmenter.

Definition at line 46 of file single_segment_segmenter.cc.


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