#include <pes_packet_generator.h>
|
class | PesPacketGeneratorTest |
|
Generates PesPackets from MediaSamples. Methods are virtual for mocking.
Definition at line 30 of file pes_packet_generator.h.
◆ PesPacketGenerator()
shaka::media::mp2t::PesPacketGenerator::PesPacketGenerator |
( |
int32_t |
transport_stream_timestamp_offset | ) |
|
|
explicit |
- Parameters
-
transport_stream_timestamp_offset | is the offset to be applied to sample timestamps to compensate for possible negative timestamps in the input. |
Definition at line 36 of file pes_packet_generator.cc.
◆ Flush()
bool shaka::media::mp2t::PesPacketGenerator::Flush |
( |
| ) |
|
|
virtual |
◆ GetNextPesPacket()
std::unique_ptr< PesPacket > shaka::media::mp2t::PesPacketGenerator::GetNextPesPacket |
( |
| ) |
|
|
virtual |
Removes the next PES packet from the stream and returns it. Must have at least one packet ready.
- Returns
- Next PES packet that is ready.
Definition at line 149 of file pes_packet_generator.cc.
◆ Initialize()
bool shaka::media::mp2t::PesPacketGenerator::Initialize |
( |
const StreamInfo & |
stream | ) |
|
|
virtual |
Initialize the object. This clears the internal state first so any PesPackets that have not been flushed will be lost.
- Parameters
-
stream | is the stream info for the elementary stream that will be added via PushSample(). |
- Returns
- true on success, false otherwise.
Definition at line 42 of file pes_packet_generator.cc.
◆ NumberOfReadyPesPackets()
size_t shaka::media::mp2t::PesPacketGenerator::NumberOfReadyPesPackets |
( |
| ) |
|
|
virtual |
◆ PushSample()
bool shaka::media::mp2t::PesPacketGenerator::PushSample |
( |
const MediaSample & |
sample | ) |
|
|
virtual |
Add a sample to the generator. This does not necessarily increase NumberOfReadyPesPackets(). If this returns false, the object may end up in an undefined state.
- Returns
- true on success, false otherwise.
Definition at line 84 of file pes_packet_generator.cc.
The documentation for this class was generated from the following files: