~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to sbc/sbc.h

ImportĀ upstreamĀ versionĀ 4.81

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *
3
3
 *  Bluetooth low-complexity, subband codec (SBC) library
4
4
 *
5
 
 *  Copyright (C) 2004-2009  Marcel Holtmann <marcel@holtmann.org>
 
5
 *  Copyright (C) 2008-2010  Nokia Corporation
 
6
 *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
6
7
 *  Copyright (C) 2004-2005  Henryk Ploetz <henryk@ploetzli.ch>
7
8
 *  Copyright (C) 2005-2006  Brad Midgley <bmidgley@xmission.com>
8
9
 *
31
32
#endif
32
33
 
33
34
#include <stdint.h>
 
35
#include <sys/types.h>
34
36
 
35
37
/* sampling frequency */
36
38
#define SBC_FREQ_16000          0x00
81
83
 
82
84
int sbc_init(sbc_t *sbc, unsigned long flags);
83
85
int sbc_reinit(sbc_t *sbc, unsigned long flags);
84
 
int sbc_parse(sbc_t *sbc, void *input, int input_len);
85
 
int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
86
 
                int output_len, int *len);
87
 
int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output,
88
 
                int output_len, int *written);
89
 
int sbc_get_frame_length(sbc_t *sbc);
90
 
int sbc_get_frame_duration(sbc_t *sbc);
91
 
uint16_t sbc_get_codesize(sbc_t *sbc);
 
86
 
 
87
ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len);
 
88
 
 
89
/* Decodes ONE input block into ONE output block */
 
90
ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,
 
91
                        void *output, size_t output_len, size_t *written);
 
92
 
 
93
/* Encodes ONE input block into ONE output block */
 
94
ssize_t sbc_encode(sbc_t *sbc, const void *input, size_t input_len,
 
95
                        void *output, size_t output_len, ssize_t *written);
 
96
 
 
97
/* Returns the output block size in bytes */
 
98
size_t sbc_get_frame_length(sbc_t *sbc);
 
99
 
 
100
/* Returns the time one input/output block takes to play in msec*/
 
101
unsigned sbc_get_frame_duration(sbc_t *sbc);
 
102
 
 
103
/* Returns the input block size in bytes */
 
104
size_t sbc_get_codesize(sbc_t *sbc);
 
105
 
92
106
const char *sbc_get_implementation_info(sbc_t *sbc);
93
107
void sbc_finish(sbc_t *sbc);
94
108