1 /*
2 * Copyright (C) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 #include "config.h"
16 #include "gst_subtitle_display_sink.h"
17
plugin_init(GstPlugin * plugin)18 static gboolean plugin_init(GstPlugin *plugin)
19 {
20 g_return_val_if_fail(plugin != nullptr, false);
21 gboolean ret = gst_element_register(plugin,
22 "subtitledisplaysink", GST_RANK_PRIMARY, GST_TYPE_SUBTITLE_DISPLAY_SINK);
23 if (ret == FALSE) {
24 GST_WARNING_OBJECT(nullptr, "register subtitledisplaysink failed");
25 }
26 return TRUE;
27 }
28
29 GST_PLUGIN_DEFINE(GST_VERSION_MAJOR,
30 GST_VERSION_MINOR,
31 _subtitle_sink,
32 "GStreamer Subtitle Sink",
33 plugin_init,
34 PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
35