]> git.sesse.net Git - vlc/blobdiff - modules/packetizer/mpeg4audio.c
More cleanup
[vlc] / modules / packetizer / mpeg4audio.c
index 10928dffa49225ec998d12b491a4abe44ea6452e..f1128f72e1e77fcc96fd8afa87027150c75d37f4 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * mpeg4audio.c: parse and packetize an MPEG 4 audio stream
  *****************************************************************************
- * Copyright (C) 2001, 2002 VideoLAN
- * $Id: mpeg4audio.c,v 1.14 2003/12/22 02:24:53 sam Exp $
+ * Copyright (C) 2001, 2002, 2006 the VideoLAN team
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
 #include <string.h>                                              /* strdup() */
 
 #include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include <vlc/decoder.h>
-#include <vlc/input.h>
-#include <vlc/sout.h>
-#include "codecs.h"
+#include <vlc_aout.h>
+#include <vlc_codec.h>
+#include <vlc_block.h>
+#include <vlc_sout.h>
+#include <vlc_codecs.h>
 
 #include "vlc_block_helper.h"
 
@@ -68,7 +68,8 @@ struct decoder_sys_t
     audio_date_t end_date;
     mtime_t i_pts;
 
-    int i_frame_size, i_raw_blocks;
+    int i_frame_size;
+    unsigned int i_raw_blocks;
     unsigned int i_channels;
     unsigned int i_rate, i_frame_length, i_header_size;
 };
@@ -113,6 +114,8 @@ static int ADTSSyncInfo( decoder_t *, const byte_t * p_buf,
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
+    set_category( CAT_SOUT );
+    set_subcategory( SUBCAT_SOUT_PACKETIZER );
     set_description( _("MPEG4 audio packetizer") );
     set_capability( "packetizer", 50 );
     set_callbacks( OpenPacketizer, ClosePacketizer );
@@ -151,7 +154,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
     /* Set callback */
     p_dec->pf_packetize = PacketizeBlock;
 
-    msg_Info( p_dec, "Running MPEG4 audio packetizer" );
+    msg_Dbg( p_dec, "running MPEG4 audio packetizer" );
 
     if( p_dec->fmt_in.i_extra > 0 )
     {
@@ -188,7 +191,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
     }
     else
     {
-        msg_Dbg( p_dec, "No decoder specific info, must be an ADTS stream" );
+        msg_Dbg( p_dec, "no decoder specific info, must be an ADTS stream" );
 
         /* We will try to create a AAC Config from adts */
         p_dec->fmt_out.i_extra = 0;
@@ -253,7 +256,7 @@ static block_t *ADTSPacketizeBlock( decoder_t *p_dec, block_t **pp_block )
         return NULL;
     }
 
-    if( (*pp_block)->b_discontinuity )
+    if( (*pp_block)->i_flags&BLOCK_FLAG_DISCONTINUITY )
     {
         p_sys->i_state = STATE_NOSYNC;
     }