Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qffmpegthread_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 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
#ifndef QFFMPEGTHREAD_P_H
4
#define QFFMPEGTHREAD_P_H
5
6
//
7
// W A R N I N G
8
// -------------
9
//
10
// This file is not part of the Qt API. It exists purely as an
11
// implementation detail. This header file may change from version to
12
// version without notice, or even be removed.
13
//
14
// We mean it.
15
//
16
17
#include <private/qtmultimediaglobal_p.h>
18
19
#include <
qmutex.h
>
20
#include <
qwaitcondition.h
>
21
#include <
qthread.h
>
22
23
QT_BEGIN_NAMESPACE
24
25
class
QAudioSink
;
26
27
namespace
QFFmpeg
28
{
29
30
class
Thread
:
public
QThread
31
{
32
public
:
33
mutable
QMutex
mutex
;
34
qint64
timeOut
= -1;
35
private
:
36
QWaitCondition
condition
;
37
38
protected
:
39
QAtomicInteger<bool>
exit
=
false
;
40
41
public
:
42
// public API is thread-safe
43
44
void
kill
();
45
virtual
void
killHelper
() {}
46
47
void
wake
() {
48
condition
.wakeAll();
49
}
50
51
protected
:
52
virtual
void
init
() {}
53
virtual
void
cleanup
() {}
54
// loop() should never block, all blocking has to happen in shouldWait()
55
virtual
void
loop
() = 0;
56
virtual
bool
shouldWait
()
const
{
return
false
; }
57
58
private
:
59
void
maybePause();
60
61
void
run
()
override
;
62
};
63
64
}
65
66
QT_END_NAMESPACE
67
68
#endif
QAtomicInteger
\inmodule QtCore
Definition
qatomic.h:18
QAudioSink
The QAudioSink class provides an interface for sending audio data to an audio output device.
Definition
qaudiosink.h:24
QFFmpeg::Thread
Definition
qffmpegthread_p.h:31
QFFmpeg::Thread::cleanup
virtual void cleanup()
Definition
qffmpegthread_p.h:53
QFFmpeg::Thread::init
virtual void init()
Definition
qffmpegthread_p.h:52
QFFmpeg::Thread::run
void run() override
Definition
qffmpegthread.cpp:44
QFFmpeg::Thread::loop
virtual void loop()=0
QFFmpeg::Thread::wake
void wake()
Definition
qffmpegthread_p.h:47
QFFmpeg::Thread::killHelper
virtual void killHelper()
Definition
qffmpegthread_p.h:45
QFFmpeg::Thread::mutex
QMutex mutex
Definition
qffmpegthread_p.h:33
QFFmpeg::Thread::kill
void kill()
Definition
qffmpegthread.cpp:12
QFFmpeg::Thread::timeOut
qint64 timeOut
Definition
qffmpegthread_p.h:34
QFFmpeg::Thread::shouldWait
virtual bool shouldWait() const
Definition
qffmpegthread_p.h:56
QFFmpeg::Thread::exit
QAtomicInteger< bool > exit
Definition
qffmpegthread_p.h:39
QMutex
\inmodule QtCore
Definition
qmutex.h:285
QThread
Definition
qthread.h:30
QWaitCondition
Definition
qwaitcondition.h:49
QFFmpeg
Definition
qffmpegaudiorenderer.cpp:17
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
qmutex.h
condition
GLenum condition
Definition
qopengles2ext.h:2741
qthread.h
qint64
long long qint64
Definition
qtypes.h:55
qwaitcondition.h
qtmultimedia
src
plugins
multimedia
ffmpeg
qffmpegthread_p.h
Generated by
1.9.7