blob: fd397be99f57a991652ce19d0492aa392826b7da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qplatformmediaplayer_p.h"
#include <private/qmediaplayer_p.h>
#include "qmediaplayer.h"
#include "qplatformaudiodevices_p.h"
#include "qplatformmediaintegration_p.h"
QT_BEGIN_NAMESPACE
QPlatformMediaPlayer::QPlatformMediaPlayer(QMediaPlayer *parent) : player(parent)
{
}
QPlatformMediaPlayer::~QPlatformMediaPlayer() = default;
void QPlatformMediaPlayer::stateChanged(QMediaPlayer::PlaybackState newState)
{
if (newState == m_state)
return;
m_state = newState;
player->d_func()->setState(newState);
}
void QPlatformMediaPlayer::mediaStatusChanged(QMediaPlayer::MediaStatus status)
{
if (m_status == status)
return;
m_status = status;
player->d_func()->setStatus(status);
}
void QPlatformMediaPlayer::error(QMediaPlayer::Error error, const QString &errorString)
{
player->d_func()->setError(error, errorString);
}
QPlatformMediaPlayer::PitchCompensationAvailability
QPlatformMediaPlayer::pitchCompensationAvailability() const
{
return PitchCompensationAvailability::PitchCompensationUnavailable;
}
void QPlatformMediaPlayer::setPitchCompensation(bool /*enabled*/)
{
qWarning() << "QMediaPlayer::setPitchCompensation not supported on this QtMultimedia "
"backend";
}
bool QPlatformMediaPlayer::pitchCompensation() const
{
return false;
}
void QPlatformMediaPlayer::pitchCompensationChanged(bool enabled) const
{
emit player->pitchCompensationChanged(enabled);
}
QPlaybackOptions QPlatformMediaPlayer::playbackOptions() const
{
return player->playbackOptions();
}
QT_END_NAMESPACE
|