[vlc-commits] Speex: split encoder from decoder

Jean-Baptiste Kempf git at videolan.org
Wed Sep 26 20:01:09 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Sep 26 20:00:56 2012 +0200| [6a3525f33f420bd4ac2cdeb842f7cfc3f3378e0c] | committer: Jean-Baptiste Kempf

Speex: split encoder from decoder

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

 modules/codec/speex.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/codec/speex.c b/modules/codec/speex.c
index 019f600..40eac1a 100644
--- a/modules/codec/speex.c
+++ b/modules/codec/speex.c
@@ -48,8 +48,11 @@
 static int  OpenDecoder   ( vlc_object_t * );
 static int  OpenPacketizer( vlc_object_t * );
 static void CloseDecoder  ( vlc_object_t * );
+
+#ifdef ENABLE_SOUT
 static int OpenEncoder   ( vlc_object_t * );
 static void CloseEncoder ( vlc_object_t * );
+#endif
 
 #define ENC_CFG_PREFIX "sout-speex-"
 
@@ -102,6 +105,7 @@ vlc_module_begin ()
     set_capability( "packetizer", 100 )
     set_callbacks( OpenPacketizer, CloseDecoder )
 
+#ifdef ENABLE_SOUT
     add_submodule ()
     set_description( N_("Speex audio encoder") )
     set_capability( "encoder", 100 )
@@ -132,6 +136,7 @@ vlc_module_begin ()
                  ENC_DTX_LONGTEXT, false )
 
     /* TODO agc, noise suppression, */
+#endif
 
 vlc_module_end ()
 
@@ -195,8 +200,6 @@ static block_t *SendPacket( decoder_t *, block_t * );
 
 static void ParseSpeexComments( decoder_t *, ogg_packet * );
 
-static block_t *Encode   ( encoder_t *, block_t * );
-
 /*****************************************************************************
  * OpenDecoder: probe the decoder and return score
  *****************************************************************************/
@@ -819,6 +822,7 @@ static void CloseDecoder( vlc_object_t *p_this )
     free( p_sys );
 }
 
+#ifdef ENABLE_SOUT
 /*****************************************************************************
  * encoder_sys_t: encoder descriptor
  *****************************************************************************/
@@ -849,6 +853,8 @@ struct encoder_sys_t
     int i_frame_size;
 };
 
+static block_t *Encode   ( encoder_t *, block_t * );
+
 /*****************************************************************************
  * OpenEncoder: probe the encoder and return score
  *****************************************************************************/
@@ -1084,3 +1090,4 @@ static void CloseEncoder( vlc_object_t *p_this )
     free( p_sys->p_buffer );
     free( p_sys );
 }
+#endif



More information about the vlc-commits mailing list