Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qgstsubtitlesink_p.h
Go to the documentation of this file.
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/qstring.h>
21#include <common/qgst_p.h>
22#include <gst/base/gstbasesink.h>
23
25
27{
28public:
29 virtual ~QAbstractSubtitleObserver() = default;
30 virtual void updateSubtitle(QString) = 0;
31};
32
34{
35public:
36 GstBaseSink parent{};
37
39
40private:
41 static GType get_type();
42 static void class_init(gpointer g_class, gpointer class_data);
43 static void base_init(gpointer g_class);
44 static void instance_init(GTypeInstance *instance, gpointer g_class);
45
46 static void finalize(GObject *object);
47
48 static GstStateChangeReturn change_state(GstElement *element, GstStateChange transition);
49
50 static GstCaps *get_caps(GstBaseSink *sink, GstCaps *filter);
51 static gboolean set_caps(GstBaseSink *sink, GstCaps *caps);
52
53 static gboolean propose_allocation(GstBaseSink *sink, GstQuery *query);
54
55 static GstFlowReturn wait_event(GstBaseSink * sink, GstEvent * event);
56 static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer);
57
58private:
59 QAbstractSubtitleObserver *observer = nullptr;
60};
61
63
64#endif
virtual ~QAbstractSubtitleObserver()=default
virtual void updateSubtitle(QString)=0
static QGstElement createSink(QAbstractSubtitleObserver *observer)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
struct _GstElement GstElement
GLenum GLuint buffer
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
struct _cl_event * event
GLenum query
GLsizei GLenum GLboolean sink