PulseAudio: make plugin more robust.
Handle more thoroughly error cases, such as when the PulseAudio daemon does not respond or terminates while QAudioInput/QAudioOutput is active, in which cases it used to crash or hang. We now correctly emit the error signal and change the state when errors occur. Task-number: QTBUG-29742 Change-Id: I173d35aece60d96e578785e1522cf78b24dcb8b8 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the Qt Toolkit.
|
||||
@@ -105,12 +105,16 @@ public:
|
||||
void streamUnderflowCallback();
|
||||
|
||||
private:
|
||||
void setState(QAudio::State state);
|
||||
void setError(QAudio::Error error);
|
||||
|
||||
bool open();
|
||||
void close();
|
||||
qint64 write(const char *data, qint64 len);
|
||||
|
||||
private Q_SLOTS:
|
||||
void userFeed();
|
||||
void onPulseContextFailed();
|
||||
|
||||
private:
|
||||
QByteArray m_device;
|
||||
|
||||
Reference in New Issue
Block a user