• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) <2002> David A. Schleef <ds@schleef.org>
3  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
4  * Copyright (C) 2020 Huawei Technologies Co., Ltd.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the Free
18  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef __GST_SUBPARSE_ELEMENT_H__
22 #define __GST_SUBPARSE_ELEMENT_H__
23 
24 #include <gst/gst.h>
25 
26 /* format enum */
27 typedef enum
28 {
29   GST_SUB_PARSE_FORMAT_UNKNOWN = 0,
30   GST_SUB_PARSE_FORMAT_MDVDSUB = 1,
31   GST_SUB_PARSE_FORMAT_SUBRIP = 2,
32   GST_SUB_PARSE_FORMAT_MPSUB = 3,
33   GST_SUB_PARSE_FORMAT_SAMI = 4,
34   GST_SUB_PARSE_FORMAT_TMPLAYER = 5,
35   GST_SUB_PARSE_FORMAT_MPL2 = 6,
36   GST_SUB_PARSE_FORMAT_SUBVIEWER = 7,
37   GST_SUB_PARSE_FORMAT_DKS = 8,
38   GST_SUB_PARSE_FORMAT_QTTEXT = 9,
39   GST_SUB_PARSE_FORMAT_LRC = 10,
40   GST_SUB_PARSE_FORMAT_VTT = 11
41 } GstSubParseFormat;
42 
43 
44 G_GNUC_INTERNAL GstSubParseFormat gst_sub_parse_data_format_autodetect (gchar * match_str);
45 G_GNUC_INTERNAL gchar * gst_sub_parse_detect_encoding (const gchar * str, gsize len);
46 G_GNUC_INTERNAL gchar * gst_sub_parse_gst_convert_to_utf8 (const gchar * str, gsize len, const gchar * encoding,
47     gsize * consumed, GError ** err);
48 G_GNUC_INTERNAL gboolean sub_parse_element_init (GstPlugin * plugin);
49 
50 GST_ELEMENT_REGISTER_DECLARE (subparse);
51 GST_ELEMENT_REGISTER_DECLARE (ssaparse);
52 
53 GST_TYPE_FIND_REGISTER_DECLARE (subparse);
54 
55 GST_DEBUG_CATEGORY_EXTERN (sub_parse_debug);
56 #define GST_CAT_DEFAULT sub_parse_debug
57 
58 #endif /* __GST_SUBPARSE_ELEMENT_H__ */
59