Abstract base class to read an MPEG-TS file and demux its content. More...
Public Member Functions | |
QtlMovieTsDemux (const QString &fileName, const QtlMovieSettings *settings, QtlLogger *log, QObject *parent=0) | |
Constructor. More... | |
virtual void | abort () Q_DECL_OVERRIDE |
Abort analysis. More... | |
bool | isM2tsFile () const |
Check if the input file has M2TS format. More... | |
virtual bool | start () Q_DECL_OVERRIDE |
Start the analysis. More... | |
![]() | |
QtlMovieAction (const QtlMovieSettings *settings, QtlLogger *log, QObject *parent=0) | |
Constructor. More... | |
virtual | ~QtlMovieAction () |
Virtual destructor. More... | |
virtual void | debug (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE |
Log a line of debug text. More... | |
QString | description () const |
Get the description of the action. More... | |
int | elapsedSeconds () const |
Get the number of seconds since the action started. More... | |
bool | isCompleted () const |
Check if the action is completed. More... | |
bool | isSilent () const |
Check if unimportant messages are skipped. More... | |
bool | isStarted () const |
Check if the action was started (and possibly completed in the meantime). More... | |
virtual void | line (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE |
Log a line of text. More... | |
void | setDescription (const QString &description) |
Set the description of the action. More... | |
void | setSilent (bool silent) |
Set if unimportant messages are skipped. More... | |
const QtlMovieSettings * | settings () const |
Get the application settings. More... | |
virtual void | text (const QString &text) Q_DECL_OVERRIDE |
Log text. More... | |
Protected Member Functions | |
virtual QtsDemux * | demux ()=0 |
Get the demux. More... | |
virtual void | emitCompleted (bool success, const QString &message=QString()) Q_DECL_OVERRIDE |
Emit the completed() signal. More... | |
virtual void | timerEvent (QTimerEvent *event) Q_DECL_OVERRIDE |
Event handler to handle timer. More... | |
![]() | |
virtual void | emitProgress (int current, int maximum, int remainingSeconds=-1) |
Emit the progress() signal. More... | |
Private Member Functions | |
QtlMovieTsDemux () Q_DECL_EQ_DELETE | |
Private Attributes | |
QtsTsFile | _file |
TS file. More... | |
bool | _isM2ts |
File has M2TS format. More... | |
int | _nextReport |
Next packet index to indicate progress report. More... | |
int | _packetInterval |
Min number of packets between two progress reports. More... | |
int | _timerId |
Repetitive timer. More... | |
int | _totalPackets |
File size in packets. More... | |
Additional Inherited Members | |
![]() | |
void | completed (bool success) |
Emitted when the action completes. More... | |
void | progress (const QString &description, int current, int maximum, int elapsedSeconds, int remainingSeconds) |
Emitted when some progress in the reporting is available. More... | |
void | started () |
Emitted when the action starts. More... | |
Abstract base class to read an MPEG-TS file and demux its content.
Reading a TS file is not a blocking operation. When start() is invoked, the file is not synchronously read. The Qt event loop invokes the appropriate slots when data is available from the file. The completion is notified using the signal completed(), inherited from QtlMovieAction.
QtlMovieTsDemux::QtlMovieTsDemux | ( | const QString & | fileName, |
const QtlMovieSettings * | settings, | ||
QtlLogger * | log, | ||
QObject * | parent = 0 |
||
) |
Constructor.
[in] | fileName | MPEG-TS file name. |
[in] | settings | Application settings. |
[in] | log | Where to log errors. |
[in] | parent | Optional parent object. |
|
private |
|
virtual |
Start the analysis.
Reimplemented from QtlMovieAction.
Reimplemented from QtlMovieAction.
Reimplemented in QtlMovieTeletextExtract.
|
virtual |
Abort analysis.
Reimplemented from QtlMovieAction. If the analysis is in progress(), the signal completed() will be emitted.
Reimplemented from QtlMovieAction.
|
inline |
Check if the input file has M2TS format.
This information is available after reading at least one packet from the file.
|
protectedvirtual |
Emit the completed() signal.
Reimplemented from QtlMovieAction.
[in] | success | True when the action completed successfully, false otherwise. |
[in] | message | Optional error message to log. |
Reimplemented from QtlMovieAction.
Reimplemented in QtlMovieTeletextExtract.
|
protectedpure virtual |
Get the demux.
Must be implemented by subclasses.
Implemented in QtlMovieTeletextExtract, and QtlMovieTeletextSearch.
|
protectedvirtual |
Event handler to handle timer.
event | Notified event. |
|
private |
TS file.
|
private |
File has M2TS format.
|
private |
Repetitive timer.
|
private |
File size in packets.
|
private |
Min number of packets between two progress reports.
|
private |
Next packet index to indicate progress report.