1 | // Copyright (C) 2021 The Qt Company |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QGSTSUBTITLESINK_P_H |
5 | #define QGSTSUBTITLESINK_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtMultimedia/private/qtmultimediaglobal_p.h> |
19 | |
20 | #include <QtCore/qlist.h> |
21 | #include <QtCore/qmutex.h> |
22 | #include <QtCore/qqueue.h> |
23 | #include <QtCore/qpointer.h> |
24 | #include <QtCore/qwaitcondition.h> |
25 | #include <qgst_p.h> |
26 | #include <gst/base/gstbasesink.h> |
27 | |
28 | QT_BEGIN_NAMESPACE |
29 | |
30 | class QGstreamerVideoSink; |
31 | |
32 | class Q_MULTIMEDIA_EXPORT QGstSubtitleSink |
33 | { |
34 | public: |
35 | GstBaseSink parent; |
36 | |
37 | static QGstSubtitleSink *createSink(QGstreamerVideoSink *sink); |
38 | |
39 | private: |
40 | static GType get_type(); |
41 | static void class_init(gpointer g_class, gpointer class_data); |
42 | static void base_init(gpointer g_class); |
43 | static void instance_init(GTypeInstance *instance, gpointer g_class); |
44 | |
45 | static void finalize(GObject *object); |
46 | |
47 | static GstStateChangeReturn change_state(GstElement *element, GstStateChange transition); |
48 | |
49 | static GstCaps *get_caps(GstBaseSink *sink, GstCaps *filter); |
50 | static gboolean set_caps(GstBaseSink *sink, GstCaps *caps); |
51 | |
52 | static gboolean propose_allocation(GstBaseSink *sink, GstQuery *query); |
53 | |
54 | static GstFlowReturn wait_event(GstBaseSink * sink, GstEvent * event); |
55 | static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer); |
56 | |
57 | private: |
58 | QGstreamerVideoSink *sink = nullptr; |
59 | }; |
60 | |
61 | |
62 | class QGstSubtitleSinkClass |
63 | { |
64 | public: |
65 | GstBaseSinkClass parent_class; |
66 | }; |
67 | |
68 | QT_END_NAMESPACE |
69 | |
70 | #endif |
71 |