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

A subclass of QtlDialog which implements the UI for the "Audio Test" action. More...

Inheritance diagram for QtlMovieAudioTestDialog:
QtlDialog

Public Slots

void startStop ()
 Invoked by the Start/Stop button. More...
 
void updateVolume (int value)
 Invoked by the volume slider when it is changed. More...
 

Public Member Functions

 QtlMovieAudioTestDialog (const QtlMovieInputFile *inputFile, int selectedStream, QtlMovieSettings *settings, QtlLogger *log, QWidget *parent=0)
 Constructor. More...
 
virtual ~QtlMovieAudioTestDialog ()
 Destructor. More...
 
- Public Member Functions inherited from QtlDialog
 QtlDialog (QWidget *parent=0, Qt::WindowFlags flags=0, QtlGeometrySettingsInterface *geometrySettings=0)
 Constructor. More...
 
QtlGeometrySettingsInterfacegeometrySettings () const
 Get the object where to save and restore the dialog geometry. More...
 
void setGeometrySettings (QtlGeometrySettingsInterface *geometrySettings, bool restoreImmediately=false)
 Set the object where to save and restore the dialog geometry. More...
 

Private Types

enum  AudioTestState {
  Started,
  Stopping,
  Stopped
}
 Define the three states of the audio play. More...
 

Private Slots

void audioCompletionCheck ()
 Periodically invoked after the process completion to check if the audio processing is complete. More...
 
void audioStateChanged (QAudio::State audioState)
 Invoked by the audio output engine when it changes its state. More...
 
void ffmpegDataReady ()
 Invoked when audio data is available from ffmpeg output. More...
 
void processCompleted ()
 Invoked when the FFmpeg process terminates. More...
 
void updatePlaySlider ()
 Periodically invoked by the audio output engine to update the play slider. More...
 

Private Member Functions

 QtlMovieAudioTestDialog () Q_DECL_EQ_DELETE
 
void cleanup ()
 Perform termination operations when the process and the audio output engine are completed. More...
 
void start ()
 Start the audio play. More...
 
void stop ()
 Stop the audio play. More...
 

Private Attributes

QAudioOutput * _audio
 Audio output device. More...
 
QAudioFormat _audioFormat
 Audio format used in the test. More...
 
QTimer _endTimer
 A timer used after FFmpeg process completion. More...
 
const QtlMovieInputFile_file
 Input file containing audio streams to test. More...
 
QtlLogger_log
 Message logger. More...
 
QtlMovieFFmpegProcess_process
 FFmpeg process. More...
 
qint64 _processedUSecs
 Processed audio time at last timer. More...
 
QtlMovieSettings_settings
 Application settings. More...
 
int _startSecond
 Starting time of current audio play. More...
 
AudioTestState _state
 The state of the audio play. More...
 
Ui::QtlMovieAudioTestDialog _ui
 UI from Qt Designer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from QtlDialog
virtual bool event (QEvent *event) Q_DECL_OVERRIDE
 Process an event. More...
 

Detailed Description

A subclass of QtlDialog which implements the UI for the "Audio Test" action.

The design of the UI is done using Qt Designer.

Member Enumeration Documentation

◆ AudioTestState

Define the three states of the audio play.

Enumerator
Started 

Audio play in progress.

Stopping 

Audio stop requested ("Stop" button), waiting for processing completion.

Stopped 

Audio fully stopped.

Constructor & Destructor Documentation

◆ QtlMovieAudioTestDialog() [1/2]

QtlMovieAudioTestDialog::QtlMovieAudioTestDialog ( const QtlMovieInputFile inputFile,
int  selectedStream,
QtlMovieSettings settings,
QtlLogger log,
QWidget *  parent = 0 
)

Constructor.

Parameters
[in]inputFileInput file containing audio streams to test.
[in]selectedStreamStream index of initially selected stream.
[in]settingsApplication settings.
[in]logMessage logger.
[in]parentOptional parent object.

◆ ~QtlMovieAudioTestDialog()

QtlMovieAudioTestDialog::~QtlMovieAudioTestDialog ( )
virtual

Destructor.

◆ QtlMovieAudioTestDialog() [2/2]

QtlMovieAudioTestDialog::QtlMovieAudioTestDialog ( )
private

Member Function Documentation

◆ startStop

void QtlMovieAudioTestDialog::startStop ( )
slot

Invoked by the Start/Stop button.

◆ updateVolume

void QtlMovieAudioTestDialog::updateVolume ( int  value)
slot

Invoked by the volume slider when it is changed.

◆ updatePlaySlider

void QtlMovieAudioTestDialog::updatePlaySlider ( )
privateslot

Periodically invoked by the audio output engine to update the play slider.

◆ audioStateChanged

void QtlMovieAudioTestDialog::audioStateChanged ( QAudio::State  audioState)
privateslot

Invoked by the audio output engine when it changes its state.

Parameters
[in]audioStateNew state of the audio output engine.

◆ ffmpegDataReady

void QtlMovieAudioTestDialog::ffmpegDataReady ( )
privateslot

Invoked when audio data is available from ffmpeg output.

◆ processCompleted

void QtlMovieAudioTestDialog::processCompleted ( )
privateslot

Invoked when the FFmpeg process terminates.

◆ audioCompletionCheck

void QtlMovieAudioTestDialog::audioCompletionCheck ( )
privateslot

Periodically invoked after the process completion to check if the audio processing is complete.

◆ start()

void QtlMovieAudioTestDialog::start ( )
private

Start the audio play.

◆ stop()

void QtlMovieAudioTestDialog::stop ( )
private

Stop the audio play.

◆ cleanup()

void QtlMovieAudioTestDialog::cleanup ( )
private

Perform termination operations when the process and the audio output engine are completed.

Member Data Documentation

◆ _ui

Ui::QtlMovieAudioTestDialog QtlMovieAudioTestDialog::_ui
private

UI from Qt Designer.

◆ _file

const QtlMovieInputFile* QtlMovieAudioTestDialog::_file
private

Input file containing audio streams to test.

◆ _settings

QtlMovieSettings* QtlMovieAudioTestDialog::_settings
private

Application settings.

◆ _log

QtlLogger* QtlMovieAudioTestDialog::_log
private

Message logger.

◆ _process

QtlMovieFFmpegProcess* QtlMovieAudioTestDialog::_process
private

FFmpeg process.

◆ _audioFormat

QAudioFormat QtlMovieAudioTestDialog::_audioFormat
private

Audio format used in the test.

◆ _audio

QAudioOutput* QtlMovieAudioTestDialog::_audio
private

Audio output device.

◆ _endTimer

QTimer QtlMovieAudioTestDialog::_endTimer
private

A timer used after FFmpeg process completion.

◆ _state

AudioTestState QtlMovieAudioTestDialog::_state
private

The state of the audio play.

◆ _startSecond

int QtlMovieAudioTestDialog::_startSecond
private

Starting time of current audio play.

◆ _processedUSecs

qint64 QtlMovieAudioTestDialog::_processedUSecs
private

Processed audio time at last timer.


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