diff options
author | David Schleef <ds@schleef.org> | 2005-08-23 19:29:38 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2005-08-23 19:29:38 +0000 |
commit | bde8ec9bf7f84427f403755282b45d3994fad7ce (patch) | |
tree | 48577ddcb554ad57e60efc77881eabf63610aff7 /gst/audioresample/buffer.h | |
parent | 3a9fc486801df3e37e59843dad52022732708105 (diff) | |
download | gst-plugins-bad-bde8ec9bf7f84427f403755282b45d3994fad7ce.tar.gz gst-plugins-bad-bde8ec9bf7f84427f403755282b45d3994fad7ce.tar.bz2 gst-plugins-bad-bde8ec9bf7f84427f403755282b45d3994fad7ce.zip |
gst/audioresample/Makefile.am: Leet audioresampling code
Original commit message from CVS:
* gst/audioresample/Makefile.am: Leet audioresampling code
* gst/audioresample/buffer.c:
* gst/audioresample/buffer.h:
* gst/audioresample/debug.c:
* gst/audioresample/debug.h:
* gst/audioresample/functable.c:
* gst/audioresample/functable.h:
* gst/audioresample/gstaudioresample.c:
* gst/audioresample/gstaudioresample.h:
* gst/audioresample/resample.c:
* gst/audioresample/resample.h:
* gst/audioresample/resample_chunk.c:
* gst/audioresample/resample_functable.c:
* gst/audioresample/resample_ref.c:
Diffstat (limited to 'gst/audioresample/buffer.h')
-rw-r--r-- | gst/audioresample/buffer.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gst/audioresample/buffer.h b/gst/audioresample/buffer.h new file mode 100644 index 00000000..17fb5f90 --- /dev/null +++ b/gst/audioresample/buffer.h @@ -0,0 +1,48 @@ + +#ifndef __AUDIORESAMPLE_BUFFER_H__ +#define __AUDIORESAMPLE_BUFFER_H__ + +#include <glib.h> + +typedef struct _AudioresampleBuffer AudioresampleBuffer; +typedef struct _AudioresampleBufferQueue AudioresampleBufferQueue; + +struct _AudioresampleBuffer +{ + unsigned char *data; + int length; + + int ref_count; + + AudioresampleBuffer *parent; + + void (*free) (AudioresampleBuffer *, void *); + void *priv; + void *priv2; +}; + +struct _AudioresampleBufferQueue +{ + GList *buffers; + int depth; + int offset; +}; + +AudioresampleBuffer *audioresample_buffer_new (void); +AudioresampleBuffer *audioresample_buffer_new_and_alloc (int size); +AudioresampleBuffer *audioresample_buffer_new_with_data (void *data, int size); +AudioresampleBuffer *audioresample_buffer_new_subbuffer (AudioresampleBuffer * buffer, int offset, + int length); +void audioresample_buffer_ref (AudioresampleBuffer * buffer); +void audioresample_buffer_unref (AudioresampleBuffer * buffer); + +AudioresampleBufferQueue *audioresample_buffer_queue_new (void); +void audioresample_buffer_queue_free (AudioresampleBufferQueue * queue); +int audioresample_buffer_queue_get_depth (AudioresampleBufferQueue * queue); +int audioresample_buffer_queue_get_offset (AudioresampleBufferQueue * queue); +void audioresample_buffer_queue_push (AudioresampleBufferQueue * queue, + AudioresampleBuffer * buffer); +AudioresampleBuffer *audioresample_buffer_queue_pull (AudioresampleBufferQueue * queue, int len); +AudioresampleBuffer *audioresample_buffer_queue_peek (AudioresampleBufferQueue * queue, int len); + +#endif |