1+ /**
2+ * @file
3+ * @brief Subtitle Attribute Enums and structures.
4+ * @interfacetype Platform
5+ * @privlevel None-privilege
6+ * @privilege None
7+ * @product TV, AV, B2B
8+ * @version 8.0
9+ * @SDK_Support N
10+ * @remark This is a group of C style Subtitle Attribute related enums
11+ * and structures.
12+ * @see Subtitle Attribute enum conversion and structures.
13+ *
14+ * Copyright (c) 2025 Samsung Electronics Co., Ltd All Rights Reserved
15+ *
16+ * Licensed under the Apache License, Version 2.0 (the "License");
17+ * you may not use this file except in compliance with the License.
18+ * You may obtain a copy of the License at
19+ *
20+ * http://www.apache.org/licenses/LICENSE-2.0
21+ *
22+ * Unless required by applicable law or agreed to in writing, software
23+ * distributed under the License is distributed on an "AS IS" BASIS,
24+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25+ * See the License for the specific language governing permissions and
26+ * limitations under the License.
27+ */
28+
29+ #ifndef __PLUSPLAYER_PLUSPLAYER_CAPI_ATTRIBUTE_H__
30+ #define __PLUSPLAYER_PLUSPLAYER_CAPI_ATTRIBUTE_H__
31+
32+ #ifdef __cplusplus
33+ extern "C" {
34+ #endif
35+
36+ #include <stdint.h>
37+
38+ /**
39+ * @brief Enumeration for supported subtitle attributes
40+ */
41+ typedef enum {
42+ PLUSPLAYER_SUBTITLE_ATTR_REGION_XPOS , /**< float type */
43+ PLUSPLAYER_SUBTITLE_ATTR_REGION_YPOS , /**< float type */
44+ PLUSPLAYER_SUBTITLE_ATTR_REGION_WIDTH , /**< float type */
45+ PLUSPLAYER_SUBTITLE_ATTR_REGION_HEIGHT , /**< float type */
46+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_XPADDING , /**< float type */
47+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_YPADDING , /**< float type */
48+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_LEFT_MARGIN , /**< int type */
49+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_RIGHT_MARGIN , /**< int type */
50+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_TOP_MARGIN , /**< int type */
51+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_BOTTOM_MARGIN , /**< int type */
52+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_BG_COLOR , /**< int type */
53+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_OPACITY , /**< float type */
54+ PLUSPLAYER_SUBTITLE_ATTR_WINDOW_SHOW_BG , /**< how to show window background,
55+ uint type */
56+ PLUSPLAYER_SUBTITLE_ATTR_FONT_FAMILY , /**< char* type */
57+ PLUSPLAYER_SUBTITLE_ATTR_FONT_SIZE , /**< float type */
58+ PLUSPLAYER_SUBTITLE_ATTR_FONT_WEIGHT , /**< int type */
59+ PLUSPLAYER_SUBTITLE_ATTR_FONT_STYLE , /**< int type */
60+ PLUSPLAYER_SUBTITLE_ATTR_FONT_COLOR , /**< int type */
61+ PLUSPLAYER_SUBTITLE_ATTR_FONT_BG_COLOR , /**< int type */
62+ PLUSPLAYER_SUBTITLE_ATTR_FONT_OPACITY , /**< float type */
63+ PLUSPLAYER_SUBTITLE_ATTR_FONT_BG_OPACITY , /**< float type */
64+ PLUSPLAYER_SUBTITLE_ATTR_FONT_TEXT_OUTLINE_COLOR , /**< int type */
65+ PLUSPLAYER_SUBTITLE_ATTR_FONT_TEXT_OUTLINE_THICKNESS , /**< int type */
66+ PLUSPLAYER_SUBTITLE_ATTR_FONT_TEXT_OUTLINE_BLUR_RADIUS , /**< int type */
67+ PLUSPLAYER_SUBTITLE_ATTR_FONT_VERTICAL_ALIGN , /**< int type */
68+ PLUSPLAYER_SUBTITLE_ATTR_FONT_HORIZONTAL_ALIGN , /**< int type */
69+ PLUSPLAYER_SUBTITLE_ATTR_RAW_SUBTITLE , /**< char* type */
70+ PLUSPLAYER_SUBTITLE_ATTR_WEBVTT_CUE_LINE , /**< float type */
71+ PLUSPLAYER_SUBTITLE_ATTR_WEBVTT_CUE_LINE_NUM , /**< int type */
72+ PLUSPLAYER_SUBTITLE_ATTR_WEBVTT_CUE_LINE_ALIGN , /**< int type */
73+ PLUSPLAYER_SUBTITLE_ATTR_WEBVTT_CUE_ALIGN , /**< int type */
74+ PLUSPLAYER_SUBTITLE_ATTR_WEBVTT_CUE_SIZE , /**< float type */
75+ PLUSPLAYER_SUBTITLE_ATTR_WEBVTT_CUE_POSITION , /**< float type */
76+ PLUSPLAYER_SUBTITLE_ATTR_WEBVTT_CUE_POSITION_ALIGN , /**< int type */
77+ PLUSPLAYER_SUBTITLE_ATTR_WEBVTT_CUE_VERTICAL , /**< int type */
78+ PLUSPLAYER_SUBTITLE_ATTR_TIMESTAMP ,
79+ PLUSPLAYER_SUBTITLE_ATTR_EXTSUB_INDEX /**< File index of external subtitle */
80+ } plusplayer_subtitle_attr_e ;
81+
82+ /**
83+ * @brief Enumeration for player supported subtitle types
84+ */
85+ typedef enum {
86+ PLUSPLAYER_SUBTITLE_TYPE_TEXT , /**< subtitle type text */
87+ PLUSPLAYER_SUBTITLE_TYPE_PICTURE , /**< subtitle type picture */
88+ PLUSPLAYER_SUBTITLE_TYPE_TTML , /**< subtitle type ttml */
89+ } plusplayer_subtitle_type_e ;
90+
91+ /**
92+ * @brief Enumeration for player supported subtitle attribute data types
93+ */
94+ typedef enum {
95+ PLUSPLAYER_SUBTITLE_ATTR_TYPE_BOOL , /**< subtitle attribute data type bool */
96+ PLUSPLAYER_SUBTITLE_ATTR_TYPE_FLOAT , /**< subtitle attribute data type float
97+ */
98+ PLUSPLAYER_SUBTITLE_ATTR_TYPE_DOUBLE , /**< subtitle attribute data type double
99+ */
100+ PLUSPLAYER_SUBTITLE_ATTR_TYPE_STRING , /**< subtitle attribute data type string
101+ */
102+ PLUSPLAYER_SUBTITLE_ATTR_TYPE_INT , /**< subtitle attribute data type int */
103+ PLUSPLAYER_SUBTITLE_ATTR_TYPE_UINT , /**< subtitle attribute data type uint */
104+ PLUSPLAYER_SUBTITLE_ATTR_TYPE_INT64 , /**< subtitle attribute data type int64
105+ */
106+ PLUSPLAYER_SUBTITLE_ATTR_TYPE_UINT64 /**< subtitle attribute data type uint64
107+ */
108+ } plusplayer_subtitle_attr_type_e ;
109+
110+ /**
111+ * @brief structure definition of subtitle attribute
112+ */
113+ typedef struct {
114+ /**
115+ * @brief Subtitle attribute.
116+ */
117+ plusplayer_subtitle_attr_e attr ;
118+
119+ /**
120+ * @brief Subtitle attribute data type.
121+ */
122+ plusplayer_subtitle_attr_type_e dtype ;
123+
124+ /**
125+ * @brief Start time.
126+ */
127+ uint32_t start_time ;
128+
129+ /**
130+ * @brief Stop time.
131+ */
132+ uint32_t stop_time ;
133+
134+ /**
135+ * @brief Subtitle attribute value. It can be float, int32, char*,
136+ * unsigned int.
137+ */
138+ union {
139+ /**
140+ * @brief Floating type subtitle attribute value.
141+ */
142+ float float_value ;
143+
144+ /**
145+ * @brief 32bit integer type subtitle atribute value.
146+ */
147+ int32_t int32_value ;
148+
149+ /**
150+ * @brief String type subtitle atribute value.
151+ */
152+ const char * str_value ;
153+
154+ /**
155+ * @brief Unsigned 32bit integer type subtitle attribute value.
156+ */
157+ uint32_t uint32_value ;
158+
159+ /**
160+ * @brief Unsigned 64bit integer type subtitle attribute value.
161+ */
162+ uint64_t uint64_value ;
163+
164+ /**
165+ * @brief 64bit integer type subtitle attribute value.
166+ */
167+ int64_t int64_value ;
168+
169+ /**
170+ * @brief Double type subtitle attribute value.
171+ */
172+ double double_value ;
173+ } value ;
174+
175+ /**
176+ * @brief Extra subtitle attribute index.
177+ */
178+ int extsub_index ;
179+ } plusplayer_subtitle_attr_s ;
180+
181+ #ifdef __cplusplus
182+ } // extern "C"
183+ #endif
184+
185+ #endif // __PLUSPLAYER_PLUSPLAYER_CAPI_ATTRIBUTE_H__
0 commit comments