]> granicus.if.org Git - handbrake/commitdiff
demux: make demux functions static
authorJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 17 May 2016 16:00:40 +0000 (10:00 -0600)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 17 May 2016 16:00:40 +0000 (10:00 -0600)
libhb/demuxmpeg.c

index cb9813fc52389fa6da1773e98e927fd9fb80bf82..dea356e36a4f9026efa3abb3044c0bb882f5cda5 100644 (file)
@@ -71,7 +71,7 @@ static inline void restore_chap( hb_psdemux_t *state, hb_buffer_t *buf )
 
 /* Basic MPEG demuxer */
 
-void hb_demux_dvd_ps( hb_buffer_t * buf, hb_buffer_list_t * list_es, hb_psdemux_t* state )
+static void demux_dvd_ps( hb_buffer_t * buf, hb_buffer_list_t * list_es, hb_psdemux_t* state )
 {
     hb_buffer_t * buf_es;
     int           pos = 0;
@@ -85,7 +85,7 @@ void hb_demux_dvd_ps( hb_buffer_t * buf, hb_buffer_list_t * list_es, hb_psdemux_
         if( d[pos] != 0 || d[pos+1] != 0 ||
             d[pos+2] != 0x1 || d[pos+3] != 0xBA )
         {
-            hb_log( "hb_demux_ps: not a PS packet (%02x%02x%02x%02x)",
+            hb_log( "demux_dvd_ps: not a PS packet (%02x%02x%02x%02x)",
                     d[pos], d[pos+1], d[pos+2], d[pos+3] );
             hb_buffer_t *tmp = buf->next;
             buf->next = NULL;
@@ -248,7 +248,7 @@ void hb_demux_dvd_ps( hb_buffer_t * buf, hb_buffer_list_t * list_es, hb_psdemux_
 // stripped off and buf has all the info gleaned from them: id is set,
 // start contains the pts (if any), renderOffset contains the dts (if any)
 // and stop contains the pcr (if it changed).
-void hb_demux_mpeg(hb_buffer_t *buf, hb_buffer_list_t *list_es,
+static void demux_mpeg(hb_buffer_t *buf, hb_buffer_list_t *list_es,
                    hb_psdemux_t *state, int tolerance)
 {
     while ( buf )
@@ -347,23 +347,23 @@ void hb_demux_mpeg(hb_buffer_t *buf, hb_buffer_list_t *list_es,
     }
 }
 
-void hb_demux_ts(hb_buffer_t *buf, hb_buffer_list_t *list_es, hb_psdemux_t *state)
+static void demux_ts(hb_buffer_t *buf, hb_buffer_list_t *list_es, hb_psdemux_t *state)
 {
     // Distance between PCRs in TS is up to 100ms, but we have seen
     // streams that exceed this, so allow up to 300ms.
-    hb_demux_mpeg(buf, list_es, state, 300);
+    demux_mpeg(buf, list_es, state, 300);
 }
 
-void hb_demux_ps(hb_buffer_t *buf, hb_buffer_list_t *list_es, hb_psdemux_t *state)
+static void demux_ps(hb_buffer_t *buf, hb_buffer_list_t *list_es, hb_psdemux_t *state)
 {
     // Distance between SCRs in PS is up to 700ms
-    hb_demux_mpeg(buf, list_es, state, 700);
+    demux_mpeg(buf, list_es, state, 700);
 }
 
 // "null" demuxer (makes a copy of input buf & returns it in list)
 // used when the reader for some format includes its own demuxer.
 // for example, ffmpeg.
-void hb_demux_null( hb_buffer_t * buf, hb_buffer_list_t * list_es, hb_psdemux_t* state )
+static void demux_null( hb_buffer_t * buf, hb_buffer_list_t * list_es, hb_psdemux_t* state )
 {
     while ( buf )
     {
@@ -393,4 +393,4 @@ void hb_demux_null( hb_buffer_t * buf, hb_buffer_list_t * list_es, hb_psdemux_t*
     }
 }
 
-const hb_muxer_t hb_demux[] = { hb_demux_dvd_ps, hb_demux_ts, hb_demux_ps, hb_demux_null };
+const hb_muxer_t hb_demux[] = { demux_dvd_ps, demux_ts, demux_ps, demux_null };