summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPiotr Srebrny <piotr.srebrny@qt.io>2021-06-25 20:14:23 +0200
committerPiotr Srebrny <piotr.srebrny@qt.io>2021-06-28 10:21:56 +0200
commitb01e1af40530b27f9bec4d784a7b422d499f8126 (patch)
treebdda794c4aec08635dc8851a5220240abeff95fd /tests
parent32c02e1711db669704d51397c3d81cf52523665e (diff)
Provide encoderSettings with the applySettings function
setEncoderSettings is always followed by a call to applySettings, which is called only once for a sequence of setEncoderSettings calls. Furthermore, QGstreamerMediaEncoder::setEncoderSettings called applySettings() which is later called again anyway, leading to multiple unnecessary applySettings calls. The existence of setEncoderSettings and applySettings at the same time is confusing and unnecessary Change-Id: Id24d47c65f54a37a449eeb0a8aeea6a550154c67 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/unit/mockbackend/qmockmediaencoder.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/unit/mockbackend/qmockmediaencoder.h b/tests/auto/unit/mockbackend/qmockmediaencoder.h
index e835a5959..dcf33ee48 100644
--- a/tests/auto/unit/mockbackend/qmockmediaencoder.h
+++ b/tests/auto/unit/mockbackend/qmockmediaencoder.h
@@ -60,13 +60,12 @@ public:
return m_position;
}
- void applySettings()
+ void applySettings(const QMediaEncoderSettings &settings)
{
+ m_settings = settings;
m_settingAppliedCount++;
}
- void setEncoderSettings(const QMediaEncoderSettings &settings) { m_settings = settings; }
-
virtual void setMetaData(const QMediaMetaData &m)
{
m_metaData = m;