Skip to content

Commit

Permalink
subpicture: rename confusing option
Browse files Browse the repository at this point in the history
background is always rendered on region depending on renderer
  • Loading branch information
fcartegnie committed Aug 24, 2015
1 parent f5eb3ce commit 9f43cea
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/vlc_subpicture.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct subpicture_region_t
int i_alpha; /**< transparency */

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 */

subpicture_region_t *p_next; /**< next region in the list */
Expand Down
2 changes: 1 addition & 1 deletion modules/codec/cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
p_spu_sys->align = SUBPICTURE_ALIGN_LEAVETEXT;
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;
/* Set style defaults (will be added to segments if none set) */
p_spu_sys->p_default_style->i_style_flags |= STYLE_MONOSPACED;
Expand Down
4 changes: 2 additions & 2 deletions modules/codec/substext.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct subpicture_updater_sys_t {
bool is_fixed;
int fixed_width;
int fixed_height;
bool renderbg;
bool noregionbg;
bool gridmode;

/* styling */
Expand Down Expand Up @@ -66,7 +66,7 @@ static void SubpictureTextUpdate(subpicture_t *subpic,

r->p_text = sys->p_segments;
r->i_align = sys->align;
r->b_renderbg = sys->renderbg;
r->b_noregionbg = sys->noregionbg;
r->b_gridmode = sys->gridmode;
if (!sys->is_fixed) {
const float margin_ratio = 0.04;
Expand Down
2 changes: 1 addition & 1 deletion modules/codec/zvbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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->align = i_align;
p_spu_sys->renderbg = b_opaque;
p_spu_sys->noregionbg = b_opaque;

#ifdef ZVBI_DEBUG
msg_Info( p_dec, "page %x-%x(%d)\n\"%s\"", p_page.pgno, p_page.subno, i_total, &p_text[offset] );
Expand Down
2 changes: 1 addition & 1 deletion modules/text_renderer/freetype.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ static inline int RenderAXYZ( filter_t *p_filter,
i_a = VLC_CLIP( i_a, 0, 255 );
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 */
FillPicture( p_picture, STYLE_ALPHA_TRANSPARENT, 0x00, 0x00, 0x00 );
RenderBackground(p_region, p_line_head, p_bbox, i_margin, p_picture, i_text_width,
Expand Down

0 comments on commit 9f43cea

Please sign in to comment.