DVBCore  22.3.0
Open Source DVB Engine
stbcc.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2020 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright (c) 2020 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 /* pre-processor mechanism so multiple inclusions don't cause compilation error*/
26 
27 #ifndef _STBCC_H
28 #define _STBCC_H
29 
30 #include "techtype.h"
31 #include "stbhwav.h"
32 
33 /*---Constant and macro definitions for public use-----------------------------*/
34 
35 /*---Enumerations for public use-----------------------------------------------*/
36 typedef enum
37 {
38  CC_FONT_STYLE_DEFAULT = 0,
39  CC_FONT_STYLE_MONOSPACE_SERIFS = 1,
40  CC_FONT_STYLE_PROPORTIONAL_SERIFS = 2,
41  CC_FONT_STYLE_MONOSPACE_NO_SERIFS = 3,
42  CC_FONT_STYLE_PROPORTIONAL_NO_SERIFS = 4,
43  CC_FONT_STYLE_CASUAL = 5,
44  CC_FONT_STYLE_CURSIVE = 6,
45  CC_FONT_STYLE_SMALL_CAPITALS = 7,
46  CC_FONT_STYLE_BROADCAST = 255 /* Use broadcast font style */
47 } E_CC_FONT_STYLE;
48 
49 typedef enum
50 {
51  CC_TEXT_SIZE_SMALL = 0,
52  CC_TEXT_SIZE_STANDARD = 1,
53  CC_TEXT_SIZE_LARGE = 2,
54  CC_TEXT_SIZE_BROADCAST = 3 /* Use broadcast text size */
55 } E_CC_TEXT_SIZE;
56 
57 
58 /*---Global type defs for public use-------------------------------------------*/
59 
60 /*---Global Function prototypes for public use---------------------------------*/
61 
65 void STB_CCInitialise(void);
66 
75 void STB_CCSetDisplayInfo(E_STB_AV_ASPECT_RATIO tv_aspect_ratio, U16BIT screen_width, U16BIT screen_height);
76 
86 void STB_CCSetFont(E_CC_FONT_STYLE font_style, U8BIT *font_data, U32BIT font_size);
87 
94 void STB_CCSetUserFontStyle(E_CC_FONT_STYLE font_style);
95 
100 E_CC_FONT_STYLE STB_CCGetUserFontStyle(void);
101 
109 void STB_CCSetUserTextSize(E_CC_TEXT_SIZE text_size);
110 
115 E_CC_TEXT_SIZE STB_CCGetUserTextSize(void);
116 
124 BOOLEAN STB_CCStart(U8BIT path, BOOLEAN digital_cc, U8BIT caption_service_number);
125 
131 void STB_CCEnable(BOOLEAN enable);
132 
137 void STB_CCStop(U8BIT path);
138 
144 void STB_CCStatus(BOOLEAN *started, BOOLEAN *enabled);
145 
146 #endif /* _STBCC_H */
void STB_CCSetDisplayInfo(E_STB_AV_ASPECT_RATIO tv_aspect_ratio, U16BIT screen_width, U16BIT screen_height)
The TV aspect ratio and size in pixels are needed for closed captions so the safe area can be determi...
Definition: stbcc.c:931
void STB_CCSetUserFontStyle(E_CC_FONT_STYLE font_style)
Sets the user defined font style that will be used to display caption text, overriding the style defi...
Definition: stbcc.c:1048
Header file - Function prototypes for A/V control.
E_CC_FONT_STYLE STB_CCGetUserFontStyle(void)
Returns the user defined font style for rendering caption text.
Definition: stbcc.c:1068
BOOLEAN STB_CCStart(U8BIT path, BOOLEAN digital_cc, U8BIT caption_service_number)
Starts processing closed caption subtitling.
Definition: stbcc.c:1162
void STB_CCInitialise(void)
Initialises closed caption subtitling control.
Definition: stbcc.c:844
void STB_CCSetUserTextSize(E_CC_TEXT_SIZE text_size)
Sets the user defined text size of the caption text, overriding the broadcast text size...
Definition: stbcc.c:1090
void STB_CCEnable(BOOLEAN enable)
Enables or disables display of CC subtitles. If the CC service to be used hasn't been set then servic...
Definition: stbcc.c:1228
System Wide Global Technical Data Type Definitions.
void STB_CCStatus(BOOLEAN *started, BOOLEAN *enabled)
Returns the current status of CC subtitling.
Definition: stbcc.c:1359
void STB_CCSetFont(E_CC_FONT_STYLE font_style, U8BIT *font_data, U32BIT font_size)
Closed captions can use a number of defined font styles: monospaced serif, proportional serif...
Definition: stbcc.c:986
void STB_CCStop(U8BIT path)
Stops subtitling display.
Definition: stbcc.c:1286
E_CC_TEXT_SIZE STB_CCGetUserTextSize(void)
Returns the user defined text size for rendering caption text.
Definition: stbcc.c:1124