Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplatformmediaplayer.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
include
"qplatformmediaplayer_p.h"
5
#
include
<
private
/
qmediaplayer_p
.
h
>
6
#
include
"qmediaplayer.h"
7
#
include
"qplatformmediaintegration_p.h"
8
9
QT_BEGIN_NAMESPACE
10
11
QPlatformMediaPlayer::QPlatformMediaPlayer(QMediaPlayer *parent) : player(parent)
12
{
13
}
14
15
QPlatformMediaPlayer::~QPlatformMediaPlayer() =
default
;
16
17
void
QPlatformMediaPlayer::stateChanged(QMediaPlayer::PlaybackState newState)
18
{
19
if
(newState == m_state)
20
return
;
21
m_state = newState;
22
player->d_func()->setState(newState);
23
}
24
25
void
QPlatformMediaPlayer::mediaStatusChanged(QMediaPlayer::MediaStatus status)
26
{
27
if
(m_status == status)
28
return
;
29
m_status = status;
30
player->d_func()->setStatus(status);
31
}
32
33
void
QPlatformMediaPlayer::error(QMediaPlayer::Error error,
const
QString &errorString)
34
{
35
player->d_func()->setError(error, errorString);
36
}
37
38
void
QPlatformMediaPlayer::setInvalidMediaWithError(QMediaPlayer::Error err,
39
const
QString &errString)
40
{
41
mediaStatusChanged(QMediaPlayer::InvalidMedia);
42
error(err, errString);
43
}
44
45
QPlatformMediaPlayer::PitchCompensationAvailability
46
QPlatformMediaPlayer::pitchCompensationAvailability()
const
47
{
48
return
PitchCompensationAvailability::Unavailable;
49
}
50
51
void
QPlatformMediaPlayer::setPitchCompensation(
bool
/*enabled*/
)
52
{
53
qWarning() <<
"QMediaPlayer::setPitchCompensation not supported on this QtMultimedia "
54
"backend"
;
55
}
56
57
bool
QPlatformMediaPlayer::pitchCompensation()
const
58
{
59
return
false
;
60
}
61
62
void
QPlatformMediaPlayer::pitchCompensationChanged(
bool
enabled)
const
63
{
64
emit player->pitchCompensationChanged(enabled);
65
}
66
67
QPlaybackOptions QPlatformMediaPlayer::playbackOptions()
const
68
{
69
return
player->playbackOptions();
70
}
71
72
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtmultimedia
src
multimedia
platform
qplatformmediaplayer.cpp
Generated on
for Qt by
1.16.1