Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
6fe45a5e
Commit
6fe45a5e
authored
Apr 29, 2011
by
Jean-Marc Valin
Browse files
Getting shared libraries to build
parent
e05aaf22
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/opus.h
View file @
6fe45a5e
...
...
@@ -32,7 +32,7 @@
extern
"C"
{
#endif
#if defined(__GNUC__) && defined(
CELT
_BUILD)
#if defined(__GNUC__) && defined(
OPUS
_BUILD)
#define EXPORT __attribute__ ((visibility ("default")))
#elif defined(WIN32)
#define EXPORT __declspec(dllexport)
...
...
@@ -133,36 +133,36 @@ extern "C" {
typedef
struct
OpusEncoder
OpusEncoder
;
typedef
struct
OpusDecoder
OpusDecoder
;
OpusEncoder
*
opus_encoder_create
(
int
Fs
,
int
channels
);
EXPORT
OpusEncoder
*
opus_encoder_create
(
int
Fs
,
int
channels
);
/* returns length of data payload (in bytes) */
int
opus_encode
(
OpusEncoder
*
st
,
const
short
*
pcm
,
int
frame_size
,
EXPORT
int
opus_encode
(
OpusEncoder
*
st
,
const
short
*
pcm
,
int
frame_size
,
unsigned
char
*
data
,
int
max_data_bytes
);
void
opus_encoder_destroy
(
OpusEncoder
*
st
);
EXPORT
void
opus_encoder_destroy
(
OpusEncoder
*
st
);
int
opus_encoder_ctl
(
OpusEncoder
*
st
,
int
request
,
...);
EXPORT
int
opus_encoder_ctl
(
OpusEncoder
*
st
,
int
request
,
...);
OpusDecoder
*
opus_decoder_create
(
int
Fs
,
int
channels
);
EXPORT
OpusDecoder
*
opus_decoder_create
(
int
Fs
,
int
channels
);
/* returns (CELT) error code */
int
opus_decode
(
OpusDecoder
*
st
,
const
unsigned
char
*
data
,
int
len
,
EXPORT
int
opus_decode
(
OpusDecoder
*
st
,
const
unsigned
char
*
data
,
int
len
,
short
*
pcm
,
int
frame_size
,
int
decode_fec
);
int
opus_decoder_ctl
(
OpusDecoder
*
st
,
int
request
,
...);
EXPORT
int
opus_decoder_ctl
(
OpusDecoder
*
st
,
int
request
,
...);
void
opus_decoder_destroy
(
OpusDecoder
*
st
);
EXPORT
void
opus_decoder_destroy
(
OpusDecoder
*
st
);
int
opus_packet_get_bandwidth
(
const
unsigned
char
*
data
);
int
opus_packet_get_samples_per_frame
(
const
unsigned
char
*
data
,
int
Fs
);
int
opus_packet_get_nb_channels
(
const
unsigned
char
*
data
);
int
opus_packet_get_nb_frames
(
const
unsigned
char
packet
[],
int
len
);
int
opus_decoder_get_nb_samples
(
const
OpusDecoder
*
dec
,
const
unsigned
char
packet
[],
int
len
);
EXPORT
int
opus_packet_get_bandwidth
(
const
unsigned
char
*
data
);
EXPORT
int
opus_packet_get_samples_per_frame
(
const
unsigned
char
*
data
,
int
Fs
);
EXPORT
int
opus_packet_get_nb_channels
(
const
unsigned
char
*
data
);
EXPORT
int
opus_packet_get_nb_frames
(
const
unsigned
char
packet
[],
int
len
);
EXPORT
int
opus_decoder_get_nb_samples
(
const
OpusDecoder
*
dec
,
const
unsigned
char
packet
[],
int
len
);
#if OPUS_TEST_RANGE_CODER_STATE
int
opus_encoder_get_final_range
(
OpusEncoder
*
st
);
int
opus_decoder_get_final_range
(
OpusDecoder
*
st
);
EXPORT
int
opus_encoder_get_final_range
(
OpusEncoder
*
st
);
EXPORT
int
opus_decoder_get_final_range
(
OpusDecoder
*
st
);
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment