1// qmediatimerange.sip generated by MetaSIP
2//
3// This file is part of the QtMultimedia Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QMediaTimeInterval
24{
25%TypeHeaderCode
26#include <qmediatimerange.h>
27%End
28
29public:
30    QMediaTimeInterval();
31    QMediaTimeInterval(qint64 start, qint64 end);
32    QMediaTimeInterval(const QMediaTimeInterval &);
33    qint64 start() const;
34    qint64 end() const;
35    bool contains(qint64 time) const;
36    bool isNormal() const;
37    QMediaTimeInterval normalized() const;
38    QMediaTimeInterval translated(qint64 offset) const;
39};
40
41bool operator==(const QMediaTimeInterval &, const QMediaTimeInterval &);
42bool operator!=(const QMediaTimeInterval &, const QMediaTimeInterval &);
43
44class QMediaTimeRange
45{
46%TypeHeaderCode
47#include <qmediatimerange.h>
48%End
49
50public:
51    QMediaTimeRange();
52    QMediaTimeRange(qint64 start, qint64 end);
53    QMediaTimeRange(const QMediaTimeInterval &);
54    QMediaTimeRange(const QMediaTimeRange &range);
55    ~QMediaTimeRange();
56    qint64 earliestTime() const;
57    qint64 latestTime() const;
58    QList<QMediaTimeInterval> intervals() const;
59    bool isEmpty() const;
60    bool isContinuous() const;
61    bool contains(qint64 time) const;
62    void addInterval(qint64 start, qint64 end);
63    void addInterval(const QMediaTimeInterval &interval);
64    void addTimeRange(const QMediaTimeRange &);
65    void removeInterval(qint64 start, qint64 end);
66    void removeInterval(const QMediaTimeInterval &interval);
67    void removeTimeRange(const QMediaTimeRange &);
68    QMediaTimeRange &operator+=(const QMediaTimeRange &);
69    QMediaTimeRange &operator+=(const QMediaTimeInterval &);
70    QMediaTimeRange &operator-=(const QMediaTimeRange &);
71    QMediaTimeRange &operator-=(const QMediaTimeInterval &);
72    void clear();
73};
74
75bool operator==(const QMediaTimeRange &, const QMediaTimeRange &);
76bool operator!=(const QMediaTimeRange &, const QMediaTimeRange &);
77QMediaTimeRange operator+(const QMediaTimeRange &, const QMediaTimeRange &);
78QMediaTimeRange operator-(const QMediaTimeRange &, const QMediaTimeRange &);
79