[libbluray-devel] RFC: remove and mark static functions that are not exported and unused out of their unit .

Diego Elio Pettenò git at videolan.org
Mon Feb 25 07:51:37 CET 2013


libbluray | branch: flameeyes | Diego Elio Pettenò <flameeyes at flameeyes.eu> | Thu Feb 14 23:18:09 2013 -0800| [75b390413a224ae856fc975afba5117657b8f15f] | committer: Diego Elio Pettenò

RFC: remove and mark static functions that are not exported and unused out of their unit.

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=75b390413a224ae856fc975afba5117657b8f15f
---

 src/libbluray/decoders/graphics_processor.c |    2 +-
 src/libbluray/decoders/graphics_processor.h |   19 ----------------
 src/libbluray/decoders/ig_decode.c          |    5 -----
 src/libbluray/decoders/ig_decode.h          |    1 -
 src/libbluray/decoders/pg_decode.c          |   32 +--------------------------
 src/libbluray/decoders/pg_decode.h          |    5 -----
 6 files changed, 2 insertions(+), 62 deletions(-)

diff --git a/src/libbluray/decoders/graphics_processor.c b/src/libbluray/decoders/graphics_processor.c
index 845e239..c251e58 100644
--- a/src/libbluray/decoders/graphics_processor.c
+++ b/src/libbluray/decoders/graphics_processor.c
@@ -357,7 +357,7 @@ static int _decode_segment(PG_DISPLAY_SET *s, PES_BUFFER *p)
  * mpeg-pes interface
  */
 
-int graphics_processor_decode_pes(PG_DISPLAY_SET **s, PES_BUFFER **p, int64_t stc)
+static int graphics_processor_decode_pes(PG_DISPLAY_SET **s, PES_BUFFER **p, int64_t stc)
 {
     if (!s) {
         return 0;
diff --git a/src/libbluray/decoders/graphics_processor.h b/src/libbluray/decoders/graphics_processor.h
index 48333ae..f93cd9b 100644
--- a/src/libbluray/decoders/graphics_processor.h
+++ b/src/libbluray/decoders/graphics_processor.h
@@ -63,25 +63,6 @@ BD_PRIVATE void                graphics_processor_free(GRAPHICS_PROCESSOR **p);
 
 /**
  *
- *  Decode data from MPEG-PES input stream
- *
- *  Only segments where DTS <= STC are decoded.
- *  If STC < 0, all segments are immediately decoded to display set.
- *
- *  All decoded PES packets are removed from buffer.
- *
- * @param s  display set
- * @param buf  data to decode
- * @param stc  current playback time
- * @return 1 if display set was completed, 0 otherwise
- */
-BD_PRIVATE int
-graphics_processor_decode_pes(PG_DISPLAY_SET **s,
-                              struct pes_buffer_s **buf,
-                              int64_t stc);
-
-/**
- *
  *  Decode data from MPEG-TS input stream
  *
  *  Segments are queued and decoded when DTS <= STC.
diff --git a/src/libbluray/decoders/ig_decode.c b/src/libbluray/decoders/ig_decode.c
index fa0ae53..019b30d 100644
--- a/src/libbluray/decoders/ig_decode.c
+++ b/src/libbluray/decoders/ig_decode.c
@@ -285,11 +285,6 @@ int ig_decode_interactive(BITBUFFER *bb, BD_IG_INTERACTIVE *p)
     return _decode_interactive_composition(bb, &p->interactive_composition);
 }
 
-void ig_clean_interactive(BD_IG_INTERACTIVE *p)
-{
-    _clean_interactive_composition(&p->interactive_composition);
-}
-
 void ig_free_interactive(BD_IG_INTERACTIVE **p)
 {
     if (p && *p) {
diff --git a/src/libbluray/decoders/ig_decode.h b/src/libbluray/decoders/ig_decode.h
index aeb1370..e510abd 100644
--- a/src/libbluray/decoders/ig_decode.h
+++ b/src/libbluray/decoders/ig_decode.h
@@ -33,7 +33,6 @@
 
 BD_PRIVATE int  ig_decode_interactive(BITBUFFER *bb, BD_IG_INTERACTIVE *p);
 
-BD_PRIVATE void ig_clean_interactive(BD_IG_INTERACTIVE *p);
 BD_PRIVATE void ig_free_interactive(BD_IG_INTERACTIVE **p);
 
 
diff --git a/src/libbluray/decoders/pg_decode.c b/src/libbluray/decoders/pg_decode.c
index ab9b66b..7e85c54 100644
--- a/src/libbluray/decoders/pg_decode.c
+++ b/src/libbluray/decoders/pg_decode.c
@@ -259,35 +259,13 @@ void pg_clean_object(BD_PG_OBJECT *p)
     }
 }
 
-void pg_clean_composition(BD_PG_COMPOSITION *p)
+static void pg_clean_composition(BD_PG_COMPOSITION *p)
 {
     if (p) {
         X_FREE(p->composition_object);
     }
 }
 
-void pg_clean_windows(BD_PG_WINDOWS *p)
-{
-    if (p) {
-        X_FREE(p->window);
-    }
-}
-
-void pg_free_palette(BD_PG_PALETTE **p)
-{
-    if (p && *p) {
-        X_FREE(*p);
-    }
-}
-
-void pg_free_object(BD_PG_OBJECT **p)
-{
-    if (p && *p) {
-        pg_clean_object(*p);
-        X_FREE(*p);
-    }
-}
-
 void pg_free_composition(BD_PG_COMPOSITION **p)
 {
     if (p && *p) {
@@ -295,11 +273,3 @@ void pg_free_composition(BD_PG_COMPOSITION **p)
         X_FREE(*p);
     }
 }
-
-void pg_free_windows(BD_PG_WINDOWS **p)
-{
-    if (p && *p) {
-        pg_clean_windows(*p);
-        X_FREE(*p);
-    }
-}
diff --git a/src/libbluray/decoders/pg_decode.h b/src/libbluray/decoders/pg_decode.h
index 975b9e2..ade166c 100644
--- a/src/libbluray/decoders/pg_decode.h
+++ b/src/libbluray/decoders/pg_decode.h
@@ -50,12 +50,7 @@ BD_PRIVATE int pg_decode_windows(BITBUFFER *bb, BD_PG_WINDOWS *p);
  */
 
 BD_PRIVATE void pg_clean_object(BD_PG_OBJECT *p);
-BD_PRIVATE void pg_clean_composition(BD_PG_COMPOSITION *p);
-BD_PRIVATE void pg_clean_windows(BD_PG_WINDOWS *p);
 
-BD_PRIVATE void pg_free_palette(BD_PG_PALETTE **p);
-BD_PRIVATE void pg_free_object(BD_PG_OBJECT **p);
 BD_PRIVATE void pg_free_composition(BD_PG_COMPOSITION **p);
-BD_PRIVATE void pg_free_windows(BD_PG_WINDOWS **p);
 
 #endif // _PG_DECODE_H_



More information about the libbluray-devel mailing list