[vlc-commits] codec: substext: disambiguate updater name

Francois Cartegnie git at videolan.org
Mon May 14 21:23:21 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon May 14 18:36:53 2018 +0200| [f7e79290db19ac2939492a74e1af48a78e035fa2] | committer: Francois Cartegnie

codec: substext: disambiguate updater name

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

 modules/codec/cc.c             |  4 ++--
 modules/codec/cea708.c         |  6 +++---
 modules/codec/substext.h       | 32 ++++++++++++++++----------------
 modules/codec/textst.c         |  6 +++---
 modules/codec/ttml/substtml.c  |  6 +++---
 modules/codec/webvtt/subsvtt.c |  6 +++---
 6 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index 8309eea873..08fb9dd884 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -1207,7 +1207,7 @@ static text_segment_t * Eia608TextLine( struct eia608_screen *screen, int i_row
 static void Eia608FillUpdaterRegions( subpicture_updater_sys_t *p_updater, eia608_t *h )
 {
     struct eia608_screen *screen = &h->screen[h->i_screen];
-    subpicture_updater_sys_region_t *p_region = &p_updater->region;
+    substext_updater_region_t *p_region = &p_updater->region;
     text_segment_t **pp_last = &p_region->p_segments;
     bool b_newregion = false;
 
@@ -1221,7 +1221,7 @@ static void Eia608FillUpdaterRegions( subpicture_updater_sys_t *p_updater, eia60
         {
             if( b_newregion )
             {
-                subpicture_updater_sys_region_t *p_newregion;
+                substext_updater_region_t *p_newregion;
                 p_newregion = SubpictureUpdaterSysRegionNew();
                 if( !p_newregion )
                 {
diff --git a/modules/codec/cea708.c b/modules/codec/cea708.c
index db03d44b81..ca3f7a757e 100644
--- a/modules/codec/cea708.c
+++ b/modules/codec/cea708.c
@@ -981,7 +981,7 @@ static text_segment_t * CEA708RowToSegments( const cea708_text_row_t *p_row,
 }
 
 static void CEA708SpuConvert( const cea708_window_t *p_w,
-                              subpicture_updater_sys_region_t *p_region )
+                              substext_updater_region_t *p_region )
 {
     if( !p_w->b_visible || CEA708_Window_RowCount( p_w ) == 0 )
         return;
@@ -1047,7 +1047,7 @@ static subpicture_t *CEA708_BuildSubtitle( cea708_t *p_cea708 )
         return NULL;
 
     subpicture_updater_sys_t *p_spu_sys = p_spu->updater.p_sys;
-    subpicture_updater_sys_region_t *p_region = &p_spu_sys->region;
+    substext_updater_region_t *p_region = &p_spu_sys->region;
 
     p_spu_sys->margin_ratio = CEA708_SCREEN_SAFE_MARGIN_RATIO;
 
@@ -1058,7 +1058,7 @@ static subpicture_t *CEA708_BuildSubtitle( cea708_t *p_cea708 )
         {
             if( p_region != &p_spu_sys->region )
             {
-                subpicture_updater_sys_region_t *p_newregion =
+                substext_updater_region_t *p_newregion =
                         SubpictureUpdaterSysRegionNew();
                 if( p_newregion == NULL )
                     break;
diff --git a/modules/codec/substext.h b/modules/codec/substext.h
index af98c2351c..600e72cdf8 100644
--- a/modules/codec/substext.h
+++ b/modules/codec/substext.h
@@ -25,9 +25,9 @@
 #include <vlc_text_style.h>
 #include <vlc_subpicture.h>
 
-typedef struct subpicture_updater_sys_region_t subpicture_updater_sys_region_t;
+typedef struct substext_updater_region_t substext_updater_region_t;
 
-enum subpicture_updater_sys_region_flags_e
+enum substext_updater_region_flags_e
 {
     UPDT_REGION_ORIGIN_X_IS_RATIO      = 1 << 0,
     UPDT_REGION_ORIGIN_Y_IS_RATIO      = 1 << 1,
@@ -38,7 +38,7 @@ enum subpicture_updater_sys_region_flags_e
     UPDT_REGION_FIXED_DONE             = 1 << 31,
 };
 
-struct subpicture_updater_sys_region_t
+struct substext_updater_region_t
 {
     struct
     {
@@ -51,13 +51,13 @@ struct subpicture_updater_sys_region_t
     int inner_align; /* alignment of content inside the region */
     text_style_t *p_region_style;
     text_segment_t *p_segments;
-    subpicture_updater_sys_region_t *p_next;
+    substext_updater_region_t *p_next;
 };
 
 struct subpicture_updater_sys_t {
 
     /* a min of one region */
-    subpicture_updater_sys_region_t region;
+    substext_updater_region_t region;
 
     /* styling */
     text_style_t *p_default_style; /* decoder (full or partial) defaults */
@@ -66,31 +66,31 @@ struct subpicture_updater_sys_t {
     bool b_blink_even;
 };
 
-static inline void SubpictureUpdaterSysRegionClean(subpicture_updater_sys_region_t *p_updtregion)
+static inline void SubpictureUpdaterSysRegionClean(substext_updater_region_t *p_updtregion)
 {
     text_segment_ChainDelete( p_updtregion->p_segments );
     text_style_Delete( p_updtregion->p_region_style );
 }
 
-static inline void SubpictureUpdaterSysRegionInit(subpicture_updater_sys_region_t *p_updtregion)
+static inline void SubpictureUpdaterSysRegionInit(substext_updater_region_t *p_updtregion)
 {
     memset(p_updtregion, 0, sizeof(*p_updtregion));
     p_updtregion->align = SUBPICTURE_ALIGN_BOTTOM;
     p_updtregion->inner_align = 0;
 }
 
-static inline subpicture_updater_sys_region_t *SubpictureUpdaterSysRegionNew( )
+static inline substext_updater_region_t *SubpictureUpdaterSysRegionNew( )
 {
-    subpicture_updater_sys_region_t *p_region = malloc(sizeof(*p_region));
+    substext_updater_region_t *p_region = malloc(sizeof(*p_region));
     if(p_region)
         SubpictureUpdaterSysRegionInit(p_region);
     return p_region;
 }
 
-static inline void SubpictureUpdaterSysRegionAdd(subpicture_updater_sys_region_t *p_prev,
-                                                 subpicture_updater_sys_region_t *p_new)
+static inline void SubpictureUpdaterSysRegionAdd(substext_updater_region_t *p_prev,
+                                                 substext_updater_region_t *p_new)
 {
-    subpicture_updater_sys_region_t **pp_next = &p_prev->p_next;
+    substext_updater_region_t **pp_next = &p_prev->p_next;
     for(; *pp_next; pp_next = &(*pp_next)->p_next);
     *pp_next = p_new;
 }
@@ -107,7 +107,7 @@ static int SubpictureTextValidate(subpicture_t *subpic,
         (sys->i_next_update == VLC_TS_INVALID || sys->i_next_update > ts))
         return VLC_SUCCESS;
 
-    subpicture_updater_sys_region_t *p_updtregion = &sys->region;
+    substext_updater_region_t *p_updtregion = &sys->region;
 
     if (!(p_updtregion->flags & UPDT_REGION_FIXED_DONE) &&
         subpic->b_absolute && subpic->p_region &&
@@ -158,7 +158,7 @@ static void SubpictureTextUpdate(subpicture_t *subpic,
     bool b_schedule_blink_update = false;
     subpicture_region_t **pp_last_region = &subpic->p_region;
 
-    for( subpicture_updater_sys_region_t *p_updtregion = &sys->region;
+    for( substext_updater_region_t *p_updtregion = &sys->region;
                                           p_updtregion; p_updtregion = p_updtregion->p_next )
     {
         subpicture_region_t *r = *pp_last_region = subpicture_region_New(&fmt);
@@ -270,10 +270,10 @@ static void SubpictureTextDestroy(subpicture_t *subpic)
     subpicture_updater_sys_t *sys = subpic->updater.p_sys;
 
     SubpictureUpdaterSysRegionClean( &sys->region );
-    subpicture_updater_sys_region_t *p_region = sys->region.p_next;
+    substext_updater_region_t *p_region = sys->region.p_next;
     while( p_region )
     {
-        subpicture_updater_sys_region_t *p_next = p_region->p_next;
+        substext_updater_region_t *p_next = p_region->p_next;
         SubpictureUpdaterSysRegionClean( p_region );
         free( p_region );
         p_region = p_next;
diff --git a/modules/codec/textst.c b/modules/codec/textst.c
index c2e470fac7..0c2c2a1d01 100644
--- a/modules/codec/textst.c
+++ b/modules/codec/textst.c
@@ -62,7 +62,7 @@ vlc_module_end()
 #define BD_TEXTST_DATA_RESET_STYLE 0x0b
 
 static size_t textst_FillRegion(decoder_t *p_dec, const uint8_t *p_data, size_t i_data,
-                                subpicture_updater_sys_region_t *p_region)
+                                substext_updater_region_t *p_region)
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
     text_segment_t **pp_last = &p_region->p_segments;
@@ -192,9 +192,9 @@ static size_t textst_Decode_palette(decoder_t *p_dec, const uint8_t *p_data, siz
 }
 
 static void textst_FillRegions(decoder_t *p_dec, const uint8_t *p_data, size_t i_data,
-                               subpicture_updater_sys_region_t *p_region)
+                               substext_updater_region_t *p_region)
 {
-    subpicture_updater_sys_region_t **pp_last = &p_region;
+    substext_updater_region_t **pp_last = &p_region;
     bool palette_update_flag = p_data[0] >> 7;
     p_data++; i_data--;
 
diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index e6e151d55f..fd2af09467 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -89,7 +89,7 @@ typedef struct
 
 typedef struct
 {
-    subpicture_updater_sys_region_t updt;
+    substext_updater_region_t updt;
     text_segment_t **pp_last_segment;
 } ttml_region_t;
 
@@ -402,7 +402,7 @@ static void FillCoord( ttml_length_t v, int i_flag, float *p_val, int *pi_flags
 }
 
 static void FillUpdaterCoords( ttml_context_t *p_ctx, ttml_length_t h, ttml_length_t v,
-                               bool b_origin, subpicture_updater_sys_region_t *p_updt )
+                               bool b_origin, substext_updater_region_t *p_updt )
 {
     ttml_length_t base = { 100.0, TTML_UNIT_PERCENT };
     ttml_length_t x = ttml_rebase_length( p_ctx->i_cell_resolution_h, h, base );
@@ -1106,7 +1106,7 @@ static int ParseBlock( decoder_t *p_dec, const block_t *p_block )
             p_spu->b_absolute = true;
 
             subpicture_updater_sys_t *p_spu_sys = p_spu->updater.p_sys;
-            subpicture_updater_sys_region_t *p_updtregion = NULL;
+            substext_updater_region_t *p_updtregion = NULL;
             decoder_sys_t *p_dec_sys = p_dec->p_sys;
 
             /* Create region update info from each ttml region */
diff --git a/modules/codec/webvtt/subsvtt.c b/modules/codec/webvtt/subsvtt.c
index c1262c24fc..3dba7e4e7e 100644
--- a/modules/codec/webvtt/subsvtt.c
+++ b/modules/codec/webvtt/subsvtt.c
@@ -1645,7 +1645,7 @@ static void GetTimedTags( const webvtt_dom_node_t *p_node,
 
 static void CreateSpuOrNewUpdaterRegion( decoder_t *p_dec,
                                          subpicture_t **pp_spu,
-                                         subpicture_updater_sys_region_t **pp_updtregion )
+                                         substext_updater_region_t **pp_updtregion )
 {
     if( *pp_spu == NULL )
     {
@@ -1655,7 +1655,7 @@ static void CreateSpuOrNewUpdaterRegion( decoder_t *p_dec,
     }
     else
     {
-        subpicture_updater_sys_region_t *p_new =
+        substext_updater_region_t *p_new =
                                 SubpictureUpdaterSysRegionNew( );
         if( p_new )
         {
@@ -1715,7 +1715,7 @@ static void ApplyCSSRules( decoder_t *p_dec, const vlc_css_rule_t *p_rule,
 static void RenderRegions( decoder_t *p_dec, mtime_t i_start, mtime_t i_stop )
 {
     subpicture_t *p_spu = NULL;
-    subpicture_updater_sys_region_t *p_updtregion = NULL;
+    substext_updater_region_t *p_updtregion = NULL;
     decoder_sys_t *p_sys = p_dec->p_sys;
 
 #ifdef HAVE_CSS



More information about the vlc-commits mailing list