TSDuck Version 3.15-964 (TSDuck - The MPEG Transport Stream Toolkit)
ts::TSFileOutputResync Class Reference

A specialized form of transport stream output file with resynchronized PID and continuity counters. More...

Inheritance diagram for ts::TSFileOutputResync:
Collaboration diagram for ts::TSFileOutputResync:

Public Member Functions

 TSFileOutputResync ()
 Default constructor.
 
virtual ~TSFileOutputResync ()
 Destructor.
 
bool close (Report &report)
 Close the file. More...
 
const UStringgetDisplayFileName () const
 Get the file name as a display string. More...
 
int getErrorSeverityLevel () const
 Get the severity level for error reporting. More...
 
const UStringgetFileName () const
 Get the file name. More...
 
PacketCounter getPacketCount () const
 Get the number of written packets. More...
 
bool isOpen () const
 Check if the file is open. More...
 
virtual bool open (const UString &filename, bool append, bool keep, Report &report) override
 Open or create the file. More...
 
void setErrorSeverityLevel (int level)
 Set the severity level for error reporting. More...
 
bool write (TSPacket *buffer, size_t packet_count, Report &report)
 Write TS packets to the file. More...
 
bool write (const TSPacket *buffer, size_t packet_count, Report &report)
 Write TS packets to the file. More...
 
bool write (TSPacket *buffer, size_t packet_count, PID pid, Report &report)
 Write TS packets to the file. More...
 

Detailed Description

A specialized form of transport stream output file with resynchronized PID and continuity counters.

On each PID, the continuity counters are automatically updated and synchronized. It is also possible to force the PID of packets.

Member Function Documentation

◆ open()

virtual bool ts::TSFileOutputResync::open ( const UString filename,
bool  append,
bool  keep,
Report report 
)
overridevirtual

Open or create the file.

Parameters
[in]filenameFile name. If empty, use standard output.
[in]appendAppend packets to an existing file.
[in]keepKeep previous file with same name. Fail if it already exists.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

Reimplemented from ts::TSFileOutput.

◆ write() [1/3]

bool ts::TSFileOutputResync::write ( TSPacket buffer,
size_t  packet_count,
Report report 
)

Write TS packets to the file.

Parameters
[in,out]bufferAddress of first packet to write. The continuity counters of all packets are modified.
[in]packet_countNumber of packets to write.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ write() [2/3]

bool ts::TSFileOutputResync::write ( TSPacket buffer,
size_t  packet_count,
PID  pid,
Report report 
)

Write TS packets to the file.

Parameters
[in,out]bufferAddress of first packet to write. The continuity counters of all packets are modified.
[in]packet_countNumber of packets to write.
[in]pidThe PID of all packets is forced to this value.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ close()

bool ts::TSFileOutput::close ( Report report)
inherited

Close the file.

Parameters
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ write() [3/3]

bool ts::TSFileOutput::write ( const TSPacket buffer,
size_t  packet_count,
Report report 
)
inherited

Write TS packets to the file.

Parameters
[in]bufferAddress of first packet to write.
[in]packet_countNumber of packets to write.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ isOpen()

bool ts::TSFileOutput::isOpen ( ) const
inlineinherited

Check if the file is open.

Returns
True if the file is open.

◆ getErrorSeverityLevel()

int ts::TSFileOutput::getErrorSeverityLevel ( ) const
inlineinherited

Get the severity level for error reporting.

Returns
The severity level for error reporting.

◆ setErrorSeverityLevel()

void ts::TSFileOutput::setErrorSeverityLevel ( int  level)
inlineinherited

Set the severity level for error reporting.

Parameters
[in]levelThe severity level for error reporting. The default is Error.

◆ getFileName()

const UString& ts::TSFileOutput::getFileName ( ) const
inlineinherited

Get the file name.

Returns
The file name.

◆ getDisplayFileName()

const UString& ts::TSFileOutput::getDisplayFileName ( ) const
inlineinherited

Get the file name as a display string.

Returns
The file name as a display string. Not always a valid file name. Use in error messages only.

◆ getPacketCount()

PacketCounter ts::TSFileOutput::getPacketCount ( ) const
inlineinherited

Get the number of written packets.

Returns
The number of written packets.

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