summaryrefslogtreecommitdiffstats
path: root/libavresample
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-12-21 16:26:51 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2013-01-07 21:49:05 -0500
commit4d68269d58ca4f6f71b4baa30e0cf9fbde52bbc3 (patch)
tree2f6fc38fd3199db653d4c953d23121df58b61bc5 /libavresample
parent6042a12174e58f7cfca47de56c372b4164d270ba (diff)
downloadffmpeg-streaming-4d68269d58ca4f6f71b4baa30e0cf9fbde52bbc3.zip
ffmpeg-streaming-4d68269d58ca4f6f71b4baa30e0cf9fbde52bbc3.tar.gz
lavr: typedef internal structs in internal.h
Simplifies header dependencies by not including all other internal headers in internal.h.
Diffstat (limited to 'libavresample')
-rw-r--r--libavresample/audio_convert.c1
-rw-r--r--libavresample/audio_convert.h3
-rw-r--r--libavresample/audio_data.h5
-rw-r--r--libavresample/audio_mix.h3
-rw-r--r--libavresample/internal.h9
-rw-r--r--libavresample/resample.c1
-rw-r--r--libavresample/resample.h3
-rw-r--r--libavresample/utils.c5
8 files changed, 16 insertions, 14 deletions
diff --git a/libavresample/audio_convert.c b/libavresample/audio_convert.c
index eb3bc1f..288f0f4 100644
--- a/libavresample/audio_convert.c
+++ b/libavresample/audio_convert.c
@@ -30,7 +30,6 @@
#include "audio_convert.h"
#include "audio_data.h"
#include "dither.h"
-#include "internal.h"
enum ConvFuncType {
CONV_FUNC_TYPE_FLAT,
diff --git a/libavresample/audio_convert.h b/libavresample/audio_convert.h
index b8808f1..7d47b15 100644
--- a/libavresample/audio_convert.h
+++ b/libavresample/audio_convert.h
@@ -23,10 +23,9 @@
#include "libavutil/samplefmt.h"
#include "avresample.h"
+#include "internal.h"
#include "audio_data.h"
-typedef struct AudioConvert AudioConvert;
-
/**
* Set conversion function if the parameters match.
*
diff --git a/libavresample/audio_data.h b/libavresample/audio_data.h
index 558e7e6..4e53e31 100644
--- a/libavresample/audio_data.h
+++ b/libavresample/audio_data.h
@@ -27,11 +27,12 @@
#include "libavutil/log.h"
#include "libavutil/samplefmt.h"
#include "avresample.h"
+#include "internal.h"
/**
* Audio buffer used for intermediate storage between conversion phases.
*/
-typedef struct AudioData {
+struct AudioData {
const AVClass *class; /**< AVClass for logging */
uint8_t *data[AVRESAMPLE_MAX_CHANNELS]; /**< data plane pointers */
uint8_t *buffer; /**< data buffer */
@@ -50,7 +51,7 @@ typedef struct AudioData {
int ptr_align; /**< minimum data pointer alignment */
int samples_align; /**< allocated samples alignment */
const char *name; /**< name for debug logging */
-} AudioData;
+};
int ff_audio_data_set_channels(AudioData *a, int channels);
diff --git a/libavresample/audio_mix.h b/libavresample/audio_mix.h
index 4ccfc1f..5bae5ab 100644
--- a/libavresample/audio_mix.h
+++ b/libavresample/audio_mix.h
@@ -25,13 +25,12 @@
#include "libavutil/samplefmt.h"
#include "avresample.h"
+#include "internal.h"
#include "audio_data.h"
typedef void (mix_func)(uint8_t **src, void **matrix, int len, int out_ch,
int in_ch);
-typedef struct AudioMix AudioMix;
-
/**
* Set mixing function if the parameters match.
*
diff --git a/libavresample/internal.h b/libavresample/internal.h
index 2e139ab..c094f08 100644
--- a/libavresample/internal.h
+++ b/libavresample/internal.h
@@ -26,10 +26,11 @@
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "avresample.h"
-#include "audio_convert.h"
-#include "audio_data.h"
-#include "audio_mix.h"
-#include "resample.h"
+
+typedef struct AudioData AudioData;
+typedef struct AudioConvert AudioConvert;
+typedef struct AudioMix AudioMix;
+typedef struct ResampleContext ResampleContext;
struct AVAudioResampleContext {
const AVClass *av_class; /**< AVClass for logging and AVOptions */
diff --git a/libavresample/resample.c b/libavresample/resample.c
index dc121fe..69c9bab 100644
--- a/libavresample/resample.c
+++ b/libavresample/resample.c
@@ -23,6 +23,7 @@
#include "libavutil/libm.h"
#include "libavutil/log.h"
#include "internal.h"
+#include "resample.h"
#include "audio_data.h"
struct ResampleContext {
diff --git a/libavresample/resample.h b/libavresample/resample.h
index 7534e26..4544dab 100644
--- a/libavresample/resample.h
+++ b/libavresample/resample.h
@@ -22,10 +22,9 @@
#define AVRESAMPLE_RESAMPLE_H
#include "avresample.h"
+#include "internal.h"
#include "audio_data.h"
-typedef struct ResampleContext ResampleContext;
-
/**
* Allocate and initialize a ResampleContext.
*
diff --git a/libavresample/utils.c b/libavresample/utils.c
index ed7f470..a303880 100644
--- a/libavresample/utils.c
+++ b/libavresample/utils.c
@@ -26,8 +26,11 @@
#include "libavutil/opt.h"
#include "avresample.h"
-#include "audio_data.h"
#include "internal.h"
+#include "audio_data.h"
+#include "audio_convert.h"
+#include "audio_mix.h"
+#include "resample.h"
int avresample_open(AVAudioResampleContext *avr)
{
OpenPOWER on IntegriCloud