[MPlayer-cvslog] r30616 - in trunk/libmpdemux: aac_hdr.c aac_hdr.h demux_aac.c muxer_mpeg.c

diego subversion at mplayerhq.hu
Wed Feb 17 23:28:24 CET 2010


Author: diego
Date: Wed Feb 17 23:28:24 2010
New Revision: 30616

Log:
Add separate header for aac_parse_frame(); avoids forward declarations.

Added:
   trunk/libmpdemux/aac_hdr.h
Modified:
   trunk/libmpdemux/aac_hdr.c
   trunk/libmpdemux/demux_aac.c
   trunk/libmpdemux/muxer_mpeg.c

Modified: trunk/libmpdemux/aac_hdr.c
==============================================================================
--- trunk/libmpdemux/aac_hdr.c	Wed Feb 17 23:22:51 2010	(r30615)
+++ trunk/libmpdemux/aac_hdr.c	Wed Feb 17 23:28:24 2010	(r30616)
@@ -19,6 +19,7 @@
  */
 
 #include <stdint.h>
+#include "aac_hdr.h"
 
 /// \param srate (out) sample rate
 /// \param num (out) number of audio frames in this ADTS frame

Added: trunk/libmpdemux/aac_hdr.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/libmpdemux/aac_hdr.h	Wed Feb 17 23:28:24 2010	(r30616)
@@ -0,0 +1,26 @@
+/*
+ * This file is part of MPlayer.
+ *
+ * MPlayer is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * MPlayer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with MPlayer; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef MPLAYER_AAC_HDR_H
+#define MPLAYER_AAC_HDR_H
+
+#include <stdint.h>
+
+int aac_parse_frame(uint8_t *buf, int *srate, int *num);
+
+#endif /* MPLAYER_AAC_HDR_H */

Modified: trunk/libmpdemux/demux_aac.c
==============================================================================
--- trunk/libmpdemux/demux_aac.c	Wed Feb 17 23:22:51 2010	(r30615)
+++ trunk/libmpdemux/demux_aac.c	Wed Feb 17 23:28:24 2010	(r30616)
@@ -28,7 +28,7 @@
 #include "demuxer.h"
 #include "parse_es.h"
 #include "stheader.h"
-
+#include "aac_hdr.h"
 #include "ms_hdr.h"
 
 typedef struct {
@@ -39,12 +39,6 @@ typedef struct {
 	int bitrate;	/// bitrate computed as size/time
 } aac_priv_t;
 
-/// \param srate (out) sample rate
-/// \param num (out) number of audio frames in this ADTS frame
-/// \return size of the ADTS frame in bytes
-/// aac_parse_frames needs a buffer at least 8 bytes long
-int aac_parse_frame(uint8_t *buf, int *srate, int *num);
-
 static int demux_aac_init(demuxer_t *demuxer)
 {
 	aac_priv_t *priv;

Modified: trunk/libmpdemux/muxer_mpeg.c
==============================================================================
--- trunk/libmpdemux/muxer_mpeg.c	Wed Feb 17 23:22:51 2010	(r30615)
+++ trunk/libmpdemux/muxer_mpeg.c	Wed Feb 17 23:28:24 2010	(r30616)
@@ -34,6 +34,7 @@
 #include "demuxer.h"
 #include "stheader.h"
 #include "m_option.h"
+#include "aac_hdr.h"
 #include "mpeg_hdr.h"
 #include "mp3_hdr.h"
 #include "liba52/a52.h"
@@ -2067,8 +2068,6 @@ static int analyze_mpa(muxer_stream_t *s
 	return layer;	//actual layer with the highest score
 }
 
-int aac_parse_frame(uint8_t *buf, int *srate, int *num);
-
 static int parse_audio(muxer_stream_t *s, int finalize, unsigned int *nf, double *timer, double delay, int drop)
 {
 	int i, j, len, chans, srate, spf, layer, dummy, tot, num, frm_idx;


More information about the MPlayer-cvslog mailing list