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... | |
A utility class to report transfer bandwidth on DVD media.
QtsDvdBandwidthReport::QtsDvdBandwidthReport | ( | int | reportInterval, |
QtlLogger * | log | ||
) |
Constructor.
[in] | reportInterval | Interval in milli-seconds between bandwidth reporting. |
[in] | log | Where to report messages. |
void QtsDvdBandwidthReport::start | ( | ) |
Start the transfer.
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.
[in] | sectorCount | Number of sectors transfered. |
void QtsDvdBandwidthReport::reportBandwidth | ( | ) |
Report bandwidth immediately.
|
static |
Build a human-readable string for DVD transfer rate.
[in] | bytes | Number of bytes transfered. |
[in] | milliSeconds | Number of milliseconds to transfer bytes. |
[in] | flags | A set of flags to specify the format. |
|
private |
Where to log the messages.
|
private |
If the report was actually started.
|
private |
Timer for average bandwidth reporting.
|
private |
Timer for instant bandwidth reporting.
|
private |
Count sectors for average bandwidth reporting.
|
private |
Count sectors for instant bandwidth reporting.
|
private |
Interval in milli-seconds between bandwidth reporting.