Commit 3ec1e797 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

small cleanup

parent 9e10cc34
......@@ -73,11 +73,6 @@ class ELISALIB_EXPORT AudioWrapper : public QObject
READ seekable
NOTIFY seekableChanged)
Q_PROPERTY(QAudio::Role audioRole
READ audioRole
WRITE setAudioRole
NOTIFY audioRoleChanged)
public:
explicit AudioWrapper(QObject *parent = nullptr);
......@@ -102,8 +97,6 @@ public:
bool seekable() const;
QAudio::Role audioRole() const;
Q_SIGNALS:
void mutedChanged(bool muted);
......@@ -132,8 +125,6 @@ Q_SIGNALS:
void stopped();
void audioRoleChanged();
public Q_SLOTS:
void setMuted(bool muted);
......@@ -156,8 +147,6 @@ public Q_SLOTS:
void seek(qint64 position);
void setAudioRole(QAudio::Role audioRole);
private Q_SLOTS:
void mediaStatusChanged();
......
......@@ -161,8 +161,11 @@ QUrl AudioWrapper::source() const
if (!d->mPlayer) {
return {};
}
return {}/*d->mPlayer.media().canonicalUrl()*/;
if (d->mMedia) {
auto filePath = QString::fromUtf8(libvlc_media_get_mrl(d->mMedia));
return QUrl::fromUserInput(filePath);
}
return {};
}
QMediaPlayer::Error AudioWrapper::error() const
......@@ -193,15 +196,6 @@ bool AudioWrapper::seekable() const
return d->mIsSeekable;
}
QAudio::Role AudioWrapper::audioRole() const
{
if (!d->mPlayer) {
return {};
}
return {}/*d->mPlayer.audioRole()*/;
}
QMediaPlayer::State AudioWrapper::playbackState() const
{
return d->mPreviousPlayerState;
......@@ -334,12 +328,6 @@ void AudioWrapper::seek(qint64 position)
setPosition(position);
}
void AudioWrapper::setAudioRole(QAudio::Role audioRole)
{
Q_UNUSED(audioRole)
// d->mPlayer.setAudioRole(audioRole);
}
void AudioWrapper::mediaStatusChanged()
{
}
......
......@@ -102,11 +102,6 @@ bool AudioWrapper::seekable() const
return d->mPlayer.isSeekable();
}
QAudio::Role AudioWrapper::audioRole() const
{
return d->mPlayer.audioRole();
}
QMediaPlayer::State AudioWrapper::playbackState() const
{
return d->mPlayer.state();
......@@ -184,11 +179,6 @@ void AudioWrapper::seek(qint64 position)
d->mPlayer.setPosition(position);
}
void AudioWrapper::setAudioRole(QAudio::Role audioRole)
{
d->mPlayer.setAudioRole(audioRole);
}
void AudioWrapper::mediaStatusChanged()
{
qCDebug(orgKdeElisaPlayerQtMultimedia) << "AudioWrapper::mediaStatusChanged";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment