diff options
Diffstat (limited to 'src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp')
-rw-r--r-- | src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp b/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp index fc48ed818..f414b5ff3 100644 --- a/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp +++ b/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp @@ -216,11 +216,10 @@ void MmRendererMediaPlayerControl::attach() return; } - if (m_audioId != -1 && m_audioRoleControl) { - QAudio::Role audioRole = m_audioRoleControl->audioRole(); - QString audioType = (audioRole == QAudio::CustomRole && m_customAudioRoleControl) - ? m_customAudioRoleControl->customAudioRole() - : qnxAudioType(audioRole); + if (m_audioId != -1) { + QString audioType = m_role == QAudio::CustomRole + ? m_customRole + : qnxAudioType(m_role); QByteArray latin1AudioType = audioType.toLatin1(); if (!audioType.isEmpty() && latin1AudioType == audioType) { strm_dict_t *dict = strm_dict_new(); @@ -564,6 +563,28 @@ void MmRendererMediaPlayerControl::stop() stopInternal(StopMmRenderer); } +void MmRendererMediaPlayerControl::setAudioRole(QAudio::Role role) +{ + m_role = role; + m_customRole.clear(); +} + +QList<QAudio::Role> MmRendererMediaPlayerControl::supportedAudioRoles() const +{ + return qnxSupportedAudioRoles(); +} + +void MmRendererMediaPlayerControl::setCustomAudioRole(const QString &role) +{ + m_role = QAudio::CustomRole; + m_customRole = role; +} + +QStringList MmRendererMediaPlayerControl::supportedCustomAudioRoles() const +{ + return QStringList(); +} + MmRendererPlayerVideoRendererControl *MmRendererMediaPlayerControl::videoRendererControl() const { return m_videoRendererControl; @@ -584,16 +605,6 @@ void MmRendererMediaPlayerControl::setMetaDataReaderControl(MmRendererMetaDataRe m_metaDataReaderControl = metaDataReaderControl; } -void MmRendererMediaPlayerControl::setAudioRoleControl(MmRendererAudioRoleControl *audioRoleControl) -{ - m_audioRoleControl = audioRoleControl; -} - -void MmRendererMediaPlayerControl::setCustomAudioRoleControl(MmRendererCustomAudioRoleControl *customAudioRoleControl) -{ - m_customAudioRoleControl = customAudioRoleControl; -} - void MmRendererMediaPlayerControl::setMmPosition(qint64 newPosition) { if (newPosition != 0 && newPosition != m_position) { |