QtlMovie 1.12 (A specialized FFmpeg front-end)
QtsDvdBandwidthReport Class Reference

A utility class to report transfer bandwidth on DVD media. More...

Public Member Functions

 QtsDvdBandwidthReport (int reportInterval, QtlLogger *log)
 Constructor. More...
 
void reportBandwidth ()
 Report bandwidth immediately. More...
 
void start ()
 Start the transfer. More...
 
void transfered (int sectorCount)
 Declare the transfer of sectors from DVD media. More...
 

Static Public Member Functions

static QString transferRateToString (qint64 bytes, qint64 milliSeconds, Qts::TransferRateFlags flags=Qts::TransferDvdBase)
 Build a human-readable string for DVD transfer rate. More...
 

Private Attributes

int _countAverage
 Count sectors for average bandwidth reporting. More...
 
int _countInstant
 Count sectors for instant bandwidth reporting. More...
 
QtlLogger_log
 Where to log the messages. More...
 
int _reportInterval
 Interval in milli-seconds between bandwidth reporting. More...
 
bool _started
 If the report was actually started. More...
 
QTime _timeAverage
 Timer for average bandwidth reporting. More...
 
QTime _timeInstant
 Timer for instant bandwidth reporting. More...
 

Detailed Description

A utility class to report transfer bandwidth on DVD media.

Constructor & Destructor Documentation

◆ QtsDvdBandwidthReport()

QtsDvdBandwidthReport::QtsDvdBandwidthReport ( int  reportInterval,
QtlLogger log 
)

Constructor.

Parameters
[in]reportIntervalInterval in milli-seconds between bandwidth reporting.
[in]logWhere to report messages.

Member Function Documentation

◆ start()

void QtsDvdBandwidthReport::start ( )

Start the transfer.

◆ transfered()

void QtsDvdBandwidthReport::transfered ( int  sectorCount)

Declare the transfer of sectors from DVD media.

If it is time to report the bandwidth, a message is logged.

Parameters
[in]sectorCountNumber of sectors transfered.

◆ reportBandwidth()

void QtsDvdBandwidthReport::reportBandwidth ( )

Report bandwidth immediately.

◆ transferRateToString()

QString QtsDvdBandwidthReport::transferRateToString ( qint64  bytes,
qint64  milliSeconds,
Qts::TransferRateFlags  flags = Qts::TransferDvdBase 
)
static

Build a human-readable string for DVD transfer rate.

Parameters
[in]bytesNumber of bytes transfered.
[in]milliSecondsNumber of milliseconds to transfer bytes.
[in]flagsA set of flags to specify the format.
Returns
A human readable string.

Member Data Documentation

◆ _log

QtlLogger* QtsDvdBandwidthReport::_log
private

Where to log the messages.

◆ _started

bool QtsDvdBandwidthReport::_started
private

If the report was actually started.

◆ _timeAverage

QTime QtsDvdBandwidthReport::_timeAverage
private

Timer for average bandwidth reporting.

◆ _timeInstant

QTime QtsDvdBandwidthReport::_timeInstant
private

Timer for instant bandwidth reporting.

◆ _countAverage

int QtsDvdBandwidthReport::_countAverage
private

Count sectors for average bandwidth reporting.

◆ _countInstant

int QtsDvdBandwidthReport::_countInstant
private

Count sectors for instant bandwidth reporting.

◆ _reportInterval

int QtsDvdBandwidthReport::_reportInterval
private

Interval in milli-seconds between bandwidth reporting.


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