Shaka Packager SDK
Loading...
Searching...
No Matches
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 24 of file ts_writer.h.

Constructor & Destructor Documentation

◆ TsWriter()

shaka::media::mp2t::TsWriter::TsWriter ( std::unique_ptr< ProgramMapTableWriter >  pmt_writer)
explicit

Definition at line 169 of file ts_writer.cc.

◆ ~TsWriter()

shaka::media::mp2t::TsWriter::~TsWriter ( )
virtual

Definition at line 172 of file ts_writer.cc.

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 195 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 174 of file ts_writer.cc.

◆ SignalEncrypted()

void shaka::media::mp2t::TsWriter::SignalEncrypted ( )
virtual

Signals the writer that the rest of the segments are encrypted.

Definition at line 191 of file ts_writer.cc.


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