changeset 30574:928359c13d93

Add separate header for aac_parse_frame(); avoids forward declarations.
author diego
date Wed, 17 Feb 2010 22:28:24 +0000
parents 02420b32391b
children ec7569a7deb1
files libmpdemux/aac_hdr.c libmpdemux/aac_hdr.h libmpdemux/demux_aac.c libmpdemux/muxer_mpeg.c
diffstat 4 files changed, 29 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aac_hdr.c	Wed Feb 17 22:22:51 2010 +0000
+++ b/libmpdemux/aac_hdr.c	Wed Feb 17 22:28:24 2010 +0000
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libmpdemux/aac_hdr.h	Wed Feb 17 22:28:24 2010 +0000
@@ -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 */
--- a/libmpdemux/demux_aac.c	Wed Feb 17 22:22:51 2010 +0000
+++ b/libmpdemux/demux_aac.c	Wed Feb 17 22:28:24 2010 +0000
@@ -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 @@
 	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;
--- a/libmpdemux/muxer_mpeg.c	Wed Feb 17 22:22:51 2010 +0000
+++ b/libmpdemux/muxer_mpeg.c	Wed Feb 17 22:28:24 2010 +0000
@@ -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 @@
 	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;