Commit 9f43ceac authored by Francois Cartegnie's avatar Francois Cartegnie

subpicture: rename confusing option

background is always rendered on region depending on renderer
parent f5eb3ce2
...@@ -65,7 +65,7 @@ struct subpicture_region_t ...@@ -65,7 +65,7 @@ struct subpicture_region_t
int i_alpha; /**< transparency */ int i_alpha; /**< transparency */
text_segment_t *p_text; /**< subtitle text, made of a list of segments */ text_segment_t *p_text; /**< subtitle text, made of a list of segments */
bool b_renderbg; /**< render black background under text */ bool b_noregionbg; /**< render background under text only */
bool b_gridmode; /** if the decoder sends row/cols based output */ bool b_gridmode; /** if the decoder sends row/cols based output */
subpicture_region_t *p_next; /**< next region in the list */ subpicture_region_t *p_next; /**< next region in the list */
......
...@@ -424,7 +424,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, text_segment_t *p_segments, mti ...@@ -424,7 +424,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, text_segment_t *p_segments, mti
region itself gets aligned, but the text inside it does not */ region itself gets aligned, but the text inside it does not */
p_spu_sys->align = SUBPICTURE_ALIGN_LEAVETEXT; p_spu_sys->align = SUBPICTURE_ALIGN_LEAVETEXT;
p_spu_sys->p_segments = p_segments; p_spu_sys->p_segments = p_segments;
p_spu_sys->renderbg = p_dec->p_sys->b_opaque; p_spu_sys->noregionbg = p_dec->p_sys->b_opaque;
p_spu_sys->gridmode = true; p_spu_sys->gridmode = true;
/* Set style defaults (will be added to segments if none set) */ /* Set style defaults (will be added to segments if none set) */
p_spu_sys->p_default_style->i_style_flags |= STYLE_MONOSPACED; p_spu_sys->p_default_style->i_style_flags |= STYLE_MONOSPACED;
......
...@@ -11,7 +11,7 @@ struct subpicture_updater_sys_t { ...@@ -11,7 +11,7 @@ struct subpicture_updater_sys_t {
bool is_fixed; bool is_fixed;
int fixed_width; int fixed_width;
int fixed_height; int fixed_height;
bool renderbg; bool noregionbg;
bool gridmode; bool gridmode;
/* styling */ /* styling */
...@@ -66,7 +66,7 @@ static void SubpictureTextUpdate(subpicture_t *subpic, ...@@ -66,7 +66,7 @@ static void SubpictureTextUpdate(subpicture_t *subpic,
r->p_text = sys->p_segments; r->p_text = sys->p_segments;
r->i_align = sys->align; r->i_align = sys->align;
r->b_renderbg = sys->renderbg; r->b_noregionbg = sys->noregionbg;
r->b_gridmode = sys->gridmode; r->b_gridmode = sys->gridmode;
if (!sys->is_fixed) { if (!sys->is_fixed) {
const float margin_ratio = 0.04; const float margin_ratio = 0.04;
......
...@@ -444,7 +444,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -444,7 +444,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
p_spu_sys->p_segments = text_segment_New( &p_text[offset] ); p_spu_sys->p_segments = text_segment_New( &p_text[offset] );
p_spu_sys->align = i_align; p_spu_sys->align = i_align;
p_spu_sys->renderbg = b_opaque; p_spu_sys->noregionbg = b_opaque;
#ifdef ZVBI_DEBUG #ifdef ZVBI_DEBUG
msg_Info( p_dec, "page %x-%x(%d)\n\"%s\"", p_page.pgno, p_page.subno, i_total, &p_text[offset] ); msg_Info( p_dec, "page %x-%x(%d)\n\"%s\"", p_page.pgno, p_page.subno, i_total, &p_text[offset] );
......
...@@ -793,7 +793,7 @@ static inline int RenderAXYZ( filter_t *p_filter, ...@@ -793,7 +793,7 @@ static inline int RenderAXYZ( filter_t *p_filter,
i_a = VLC_CLIP( i_a, 0, 255 ); i_a = VLC_CLIP( i_a, 0, 255 );
uint8_t i_x, i_y, i_z; uint8_t i_x, i_y, i_z;
if (p_region->b_renderbg) { if (p_region->b_noregionbg) {
/* Render the background just under the text */ /* Render the background just under the text */
FillPicture( p_picture, STYLE_ALPHA_TRANSPARENT, 0x00, 0x00, 0x00 ); FillPicture( p_picture, STYLE_ALPHA_TRANSPARENT, 0x00, 0x00, 0x00 );
RenderBackground(p_region, p_line_head, p_bbox, i_margin, p_picture, i_text_width, RenderBackground(p_region, p_line_head, p_bbox, i_margin, p_picture, i_text_width,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment