[vlc-commits] subpicture: rename confusing option

Francois Cartegnie git at videolan.org
Mon Aug 24 22:45:44 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 24 11:11:28 2015 +0200| [9f43ceac0e980ef2df193f0523b85211ed47ee36] | committer: Francois Cartegnie

subpicture: rename confusing option

background is always rendered on region depending on renderer

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9f43ceac0e980ef2df193f0523b85211ed47ee36
---

 include/vlc_subpicture.h         |    2 +-
 modules/codec/cc.c               |    2 +-
 modules/codec/substext.h         |    4 ++--
 modules/codec/zvbi.c             |    2 +-
 modules/text_renderer/freetype.c |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/vlc_subpicture.h b/include/vlc_subpicture.h
index 3103f09..e17d031 100644
--- a/include/vlc_subpicture.h
+++ b/include/vlc_subpicture.h
@@ -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 */
diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index cef162c..721dcff 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -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;
diff --git a/modules/codec/substext.h b/modules/codec/substext.h
index 51c6af5..aa82224 100644
--- a/modules/codec/substext.h
+++ b/modules/codec/substext.h
@@ -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 */
@@ -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;
diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index f524180..4ed0626 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -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] );
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 5de6a43..dccb8b2 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -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,



More information about the vlc-commits mailing list