RDK Documentation (Open Sourced RDK Components)
Demuxer Class Reference

Software demuxer of MPEGTS. More...

Collaboration diagram for Demuxer:
Collaboration graph

Public Member Functions

 Demuxer (AampLogManager *logObj, class PrivateInstanceAAMP *aamp, MediaType type)
 Demuxer Constructor. More...
 
 Demuxer (const Demuxer &)=delete
 Copy Constructor.
 
Demuxeroperator= (const Demuxer &)=delete
 Assignment operator overloading.
 
 ~Demuxer ()
 Demuxer Destructor.
 
void init (double position, double duration, bool trickmode, bool resetBasePTS)
 Initialize demux. More...
 
void flush ()
 flush es buffer and reset demux state
 
void reset ()
 reset demux state
 
void setBasePTS (unsigned long long basePTS, bool isFinal)
 Set base PTS used for re-stamping. More...
 
unsigned long long getBasePTS ()
 Get base PTS used for re-stamping. More...
 
void processPacket (unsigned char *packetStart, bool &basePtsUpdated, bool &ptsError, bool &isPacketIgnored, bool applyOffset)
 Process a TS packet. More...
 

Private Member Functions

void send ()
 Sends elementary stream with proper PTS.
 

Private Attributes

AampLogManagermLogObj
 
class PrivateInstanceAAMPaamp
 
int pes_state
 
int pes_header_ext_len
 
int pes_header_ext_read
 
GrowableBuffer pes_header
 
GrowableBuffer es
 
double position
 
double duration
 
uint33_t base_pts
 
uint33_t current_pts
 
uint33_t current_dts
 
uint33_t first_pts
 
bool update_first_pts
 
MediaType type
 
bool trickmode
 
bool finalized_base_pts
 
int sentESCount
 
bool allowPtsRewind
 
bool reached_steady_state
 

yes

Software demuxer of MPEGTS.

Definition at line 230 of file tsprocessor.cpp.

Constructor & Destructor Documentation

◆ Demuxer()

Demuxer::Demuxer ( AampLogManager logObj,
class PrivateInstanceAAMP aamp,
MediaType  type 
)
inline

Demuxer Constructor.

Parameters
[in]aamppointer to PrivateInstanceAAMP object associated with demux
[in]typeMedia type to be demuxed

Definition at line 315 of file tsprocessor.cpp.

Member Function Documentation

◆ init()

void Demuxer::init ( double  position,
double  duration,
bool  trickmode,
bool  resetBasePTS 
)
inline

Initialize demux.

Parameters
[in]positionstart position
[in]durationduration
[in]trickmodetrue if trickmode
[in]resetBasePTStrue to reset base pts used for restamping

Definition at line 351 of file tsprocessor.cpp.

◆ setBasePTS()

void Demuxer::setBasePTS ( unsigned long long  basePTS,
bool  isFinal 
)
inline

Set base PTS used for re-stamping.

Parameters
[in]basePTSnew base PTS
[in]finaltrue if base PTS is finalized

Definition at line 406 of file tsprocessor.cpp.

◆ getBasePTS()

unsigned long long Demuxer::getBasePTS ( )
inline

Get base PTS used for re-stamping.

Return values
basePTS used for re-stamping

Definition at line 420 of file tsprocessor.cpp.

◆ processPacket()

void Demuxer::processPacket ( unsigned char *  packetStart,
bool &  basePtsUpdated,
bool &  ptsError,
bool &  isPacketIgnored,
bool  applyOffset 
)
inline

Process a TS packet.

Parameters
[in]packetStartstart of buffer containing packet
[out]basePtsUpdatedtrue if base PTS is updated
[in]ptsErrortrue if encountered PTS error.

Definition at line 432 of file tsprocessor.cpp.


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