]> git.sesse.net Git - vlc/blobdiff - modules/codec/mpeg_audio.c
Remove recursion into modules/codec/dmo/
[vlc] / modules / codec / mpeg_audio.c
index 26d72785e598075131dafc73cc3eb5eca0cc6cf8..1ec26afb914cc0daf6f41dced848975788644e20 100644 (file)
@@ -40,6 +40,8 @@
 
 #include <vlc_block_helper.h>
 
+#include "../packetizer/packetizer_helper.h"
+
 /*****************************************************************************
  * decoder_sys_t : decoder descriptor
  *****************************************************************************/
@@ -71,21 +73,11 @@ struct decoder_sys_t
     bool   b_discontinuity;
 };
 
-enum {
-
-    STATE_NOSYNC,
-    STATE_SYNC,
-    STATE_HEADER,
-    STATE_NEXT_SYNC,
-    STATE_GET_DATA,
-    STATE_SEND_DATA
-};
-
 /* This isn't the place to put mad-specific stuff. However, it makes the
  * mad plug-in's life much easier if we put 8 extra bytes at the end of the
- * buffer, because that way it doesn't have to copy the aout_buffer_t to a
- * bigger buffer. This has no implication on other plug-ins, and we only
- * lose 8 bytes per frame. --Meuuh */
+ * buffer, because that way it doesn't have to copy the block_t to a bigger
+ * buffer. This has no implication on other plug-ins, and we only lose 8 bytes
+ * per frame. --Meuuh */
 #define MAD_BUFFER_GUARD 8
 #define MPGA_HEADER_SIZE 4
 
@@ -97,9 +89,9 @@ static int  OpenPacketizer( vlc_object_t * );
 static void CloseDecoder  ( vlc_object_t * );
 static block_t *DecodeBlock  ( decoder_t *, block_t ** );
 
-static uint8_t       *GetOutBuffer ( decoder_t *, block_t ** );
-static aout_buffer_t *GetAoutBuffer( decoder_t * );
-static block_t       *GetSoutBuffer( decoder_t * );
+static uint8_t *GetOutBuffer ( decoder_t *, block_t ** );
+static block_t *GetAoutBuffer( decoder_t * );
+static block_t *GetSoutBuffer( decoder_t * );
 
 static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
                      unsigned int * pi_channels_conf,
@@ -115,11 +107,7 @@ vlc_module_begin ()
     set_description( N_("MPEG audio layer I/II/III decoder") )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_ACODEC )
-#if defined(UNDER_CE)
-   set_capability( "decoder", 5 )
-#else
     set_capability( "decoder", 100 )
-#endif
     set_callbacks( OpenDecoder, CloseDecoder )
 
     add_submodule ()
@@ -524,7 +512,7 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, block_t **pp_out_buffer )
     }
     else
     {
-        aout_buffer_t *p_aout_buffer = GetAoutBuffer( p_dec );
+        block_t *p_aout_buffer = GetAoutBuffer( p_dec );
         p_buf = p_aout_buffer ? p_aout_buffer->p_buffer : NULL;
         *pp_out_buffer = p_aout_buffer;
     }
@@ -535,10 +523,10 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, block_t **pp_out_buffer )
 /*****************************************************************************
  * GetAoutBuffer:
  *****************************************************************************/
-static aout_buffer_t *GetAoutBuffer( decoder_t *p_dec )
+static block_t *GetAoutBuffer( decoder_t *p_dec )
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
-    aout_buffer_t *p_buf;
+    block_t *p_buf;
 
     p_buf = decoder_NewAudioBuffer( p_dec, p_sys->i_frame_length );
     if( p_buf == NULL ) return NULL;