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

#include <ts_writer.h>

Public Member Functions

 TsWriter (std::unique_ptr< ProgramMapTableWriter > pmt_writer)
 
virtual bool NewSegment (BufferWriter *buffer)
 
virtual void SignalEncrypted ()
 Signals the writer that the rest of the segments are encrypted.
 
virtual bool AddPesPacket (std::unique_ptr< PesPacket > pes_packet, BufferWriter *buffer)
 

Detailed Description

This class takes PesPackets, encapsulates them into TS packets, and write the data to file. This also creates PSI from StreamInfo.

Definition at line 31 of file ts_writer.h.

Member Function Documentation

◆ AddPesPacket()

bool shaka::media::mp2t::TsWriter::AddPesPacket ( std::unique_ptr< PesPacket pes_packet,
BufferWriter buffer 
)
virtual

Add PesPacket to the instance. PesPacket might not be added to the buffer immediately.

Parameters
pes_packetgets added to the writer.
bufferto write pes packet.
Returns
true on success, false otherwise.

Definition at line 190 of file ts_writer.cc.

◆ NewSegment()

bool shaka::media::mp2t::TsWriter::NewSegment ( BufferWriter buffer)
virtual

This will fail if the current segment is not finalized.

Parameters
bufferto write segment data.
Returns
true on success, false otherwise.

Definition at line 169 of file ts_writer.cc.


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