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

#include <packed_audio_segmenter.h>

Public Member Functions

 PackedAudioSegmenter (int32_t transport_stream_timestamp_offset)
 
virtual Status Initialize (const StreamInfo &stream_info)
 
virtual Status AddSample (const MediaSample &sample)
 
virtual Status FinalizeSegment ()
 
virtual double TimescaleScale () const
 
BufferWritersegment_buffer ()
 

Detailed Description

Implements packed audio segment writer. https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-3.4 A Packed Audio Segment contains encoded audio samples and ID3 tags that are simply packed together with minimal framing and no per-sample timestamps.

Definition at line 40 of file packed_audio_segmenter.h.

Constructor & Destructor Documentation

◆ PackedAudioSegmenter()

shaka::media::PackedAudioSegmenter::PackedAudioSegmenter ( int32_t  transport_stream_timestamp_offset)
explicit
Parameters
transport_stream_timestamp_offsetis the offset to be applied to sample timestamps to compensate for possible negative timestamps in the input.

Definition at line 34 of file packed_audio_segmenter.cc.

Member Function Documentation

◆ AddSample()

Status shaka::media::PackedAudioSegmenter::AddSample ( const MediaSample sample)
virtual
Parameters
samplegets added to this object.
Returns
OK on success.

Definition at line 62 of file packed_audio_segmenter.cc.

◆ FinalizeSegment()

Status shaka::media::PackedAudioSegmenter::FinalizeSegment ( )
virtual

Flush all the samples that are (possibly) buffered and write them to the current segment.

Returns
OK on success.

Definition at line 83 of file packed_audio_segmenter.cc.

◆ Initialize()

Status shaka::media::PackedAudioSegmenter::Initialize ( const StreamInfo stream_info)
virtual

Initialize the object.

Parameters
stream_infois the stream info for the segmenter.
Returns
OK on success.

Definition at line 40 of file packed_audio_segmenter.cc.

◆ segment_buffer()

BufferWriter* shaka::media::PackedAudioSegmenter::segment_buffer ( )
inline
Returns
A pointer to the buffer for the current segment.

Definition at line 71 of file packed_audio_segmenter.h.

◆ TimescaleScale()

double shaka::media::PackedAudioSegmenter::TimescaleScale ( ) const
virtual
Returns
The scale for converting timestamp in input stream's scale to output stream's scale.

Definition at line 88 of file packed_audio_segmenter.cc.


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