lavr: typedef internal structs in internal.h

Simplifies header dependencies by not including all other internal headers
in internal.h.
pull/8/head
Justin Ruggles 12 years ago
parent 6042a12174
commit 4d68269d58
  1. 1
      libavresample/audio_convert.c
  2. 3
      libavresample/audio_convert.h
  3. 5
      libavresample/audio_data.h
  4. 3
      libavresample/audio_mix.h
  5. 9
      libavresample/internal.h
  6. 1
      libavresample/resample.c
  7. 3
      libavresample/resample.h
  8. 5
      libavresample/utils.c

@ -30,7 +30,6 @@
#include "audio_convert.h" #include "audio_convert.h"
#include "audio_data.h" #include "audio_data.h"
#include "dither.h" #include "dither.h"
#include "internal.h"
enum ConvFuncType { enum ConvFuncType {
CONV_FUNC_TYPE_FLAT, CONV_FUNC_TYPE_FLAT,

@ -23,10 +23,9 @@
#include "libavutil/samplefmt.h" #include "libavutil/samplefmt.h"
#include "avresample.h" #include "avresample.h"
#include "internal.h"
#include "audio_data.h" #include "audio_data.h"
typedef struct AudioConvert AudioConvert;
/** /**
* Set conversion function if the parameters match. * Set conversion function if the parameters match.
* *

@ -27,11 +27,12 @@
#include "libavutil/log.h" #include "libavutil/log.h"
#include "libavutil/samplefmt.h" #include "libavutil/samplefmt.h"
#include "avresample.h" #include "avresample.h"
#include "internal.h"
/** /**
* Audio buffer used for intermediate storage between conversion phases. * Audio buffer used for intermediate storage between conversion phases.
*/ */
typedef struct AudioData { struct AudioData {
const AVClass *class; /**< AVClass for logging */ const AVClass *class; /**< AVClass for logging */
uint8_t *data[AVRESAMPLE_MAX_CHANNELS]; /**< data plane pointers */ uint8_t *data[AVRESAMPLE_MAX_CHANNELS]; /**< data plane pointers */
uint8_t *buffer; /**< data buffer */ uint8_t *buffer; /**< data buffer */
@ -50,7 +51,7 @@ typedef struct AudioData {
int ptr_align; /**< minimum data pointer alignment */ int ptr_align; /**< minimum data pointer alignment */
int samples_align; /**< allocated samples alignment */ int samples_align; /**< allocated samples alignment */
const char *name; /**< name for debug logging */ const char *name; /**< name for debug logging */
} AudioData; };
int ff_audio_data_set_channels(AudioData *a, int channels); int ff_audio_data_set_channels(AudioData *a, int channels);

@ -25,13 +25,12 @@
#include "libavutil/samplefmt.h" #include "libavutil/samplefmt.h"
#include "avresample.h" #include "avresample.h"
#include "internal.h"
#include "audio_data.h" #include "audio_data.h"
typedef void (mix_func)(uint8_t **src, void **matrix, int len, int out_ch, typedef void (mix_func)(uint8_t **src, void **matrix, int len, int out_ch,
int in_ch); int in_ch);
typedef struct AudioMix AudioMix;
/** /**
* Set mixing function if the parameters match. * Set mixing function if the parameters match.
* *

@ -26,10 +26,11 @@
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/samplefmt.h" #include "libavutil/samplefmt.h"
#include "avresample.h" #include "avresample.h"
#include "audio_convert.h"
#include "audio_data.h" typedef struct AudioData AudioData;
#include "audio_mix.h" typedef struct AudioConvert AudioConvert;
#include "resample.h" typedef struct AudioMix AudioMix;
typedef struct ResampleContext ResampleContext;
struct AVAudioResampleContext { struct AVAudioResampleContext {
const AVClass *av_class; /**< AVClass for logging and AVOptions */ const AVClass *av_class; /**< AVClass for logging and AVOptions */

@ -23,6 +23,7 @@
#include "libavutil/libm.h" #include "libavutil/libm.h"
#include "libavutil/log.h" #include "libavutil/log.h"
#include "internal.h" #include "internal.h"
#include "resample.h"
#include "audio_data.h" #include "audio_data.h"
struct ResampleContext { struct ResampleContext {

@ -22,10 +22,9 @@
#define AVRESAMPLE_RESAMPLE_H #define AVRESAMPLE_RESAMPLE_H
#include "avresample.h" #include "avresample.h"
#include "internal.h"
#include "audio_data.h" #include "audio_data.h"
typedef struct ResampleContext ResampleContext;
/** /**
* Allocate and initialize a ResampleContext. * Allocate and initialize a ResampleContext.
* *

@ -26,8 +26,11 @@
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "avresample.h" #include "avresample.h"
#include "audio_data.h"
#include "internal.h" #include "internal.h"
#include "audio_data.h"
#include "audio_convert.h"
#include "audio_mix.h"
#include "resample.h"
int avresample_open(AVAudioResampleContext *avr) int avresample_open(AVAudioResampleContext *avr)
{ {

Loading…
Cancel
Save