3 Copyright (c) 2003-2015 HandBrake Team
4 This file is part of the HandBrake source code
5 Homepage: <http://handbrake.fr/>.
6 It may be used under the terms of the GNU General Public License v2.
7 For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
13 #ifndef __DECCC608SUB_H__
14 #define __DECCC608SUB_H__
20 #define CC608_SCREEN_WIDTH 32
49 FONT_UNDERLINED_ITALICS
= 3
52 #define FONT_STYLE_MASK FONT_UNDERLINED_ITALICS
54 struct eia608_screen
// A CC buffer
56 unsigned char characters
[15][33];
57 unsigned char colors
[15][33];
58 unsigned char fonts
[15][33]; // Extra char at the end for a 0
59 int row_used
[15]; // Any data in row?
60 int empty
; // Buffer completely empty?
61 int dirty
; // Flag indicates buffer has changed since written
66 struct eia608_screen buffer1
;
67 struct eia608_screen buffer2
;
68 int cursor_row
, cursor_column
;
70 int ssa_counter
; // Number of subs currently written
71 int screenfuls_counter
; // Number of meaningful screenfuls written
72 int64_t current_visible_start_ms
; // At what time did the current visible buffer became so?
74 unsigned char last_c1
, last_c2
;
75 int channel
; // Currently selected channel
76 unsigned char color
; // Color we are currently using to write
77 unsigned char font
; // Font we are currently using to write
82 struct eia608
*data608
;
84 unsigned char *subline
;
88 hb_buffer_t
*hb_buffer
;
89 hb_buffer_t
*hb_last_buffer
;
91 unsigned char *enc_buffer
; // Generic general purpose buffer
92 unsigned enc_buffer_used
;
93 unsigned enc_buffer_capacity
;
95 int clear_sub_needed
; // Indicates that we need to send a null
96 // subtitle to clear the current subtitle
98 int rollup_cr
; // Flag indicates if CR command performed by rollup
100 int line
; // SSA line number
105 uint8_t prev_font_style
;
106 uint8_t prev_font_color
;
112 COM_ERASEDISPLAYEDMEMORY
= 1,
113 COM_RESUMECAPTIONLOADING
= 2,
114 COM_ENDOFCAPTION
= 3,
121 COM_CARRIAGERETURN
= 10,
122 COM_ERASENONDISPLAYEDMEMORY
= 11,
124 COM_RESUMETEXTDISPLAY
= 13
143 #endif // __DECCC608SUB_H__