libopusenc  0.2.1-13-gdc6ab59
Stand-alone encoder library for .opus files.
Data Structures
Callback Functions

Data Structures

struct  OpusEncCallbacks
 Callback functions for accessing the stream. More...
 

Callback functions

These are the callbacks that can be implemented for an encoder.

typedef int(* ope_write_func) (void *user_data, const unsigned char *ptr, opus_int32 len)
 Called for writing a page. More...
 
typedef int(* ope_close_func) (void *user_data)
 Called for closing a stream. More...
 
typedef void(* ope_packet_func) (void *user_data, const unsigned char *packet_ptr, opus_int32 packet_len, opus_uint32 flags)
 Called on every packet encoded (including header). More...
 

Detailed Description

Typedef Documentation

◆ ope_write_func

typedef int(* ope_write_func) (void *user_data, const unsigned char *ptr, opus_int32 len)

Called for writing a page.

Parameters
user_datauser-defined data passed to the callback
ptrbuffer to be written
lennumber of bytes to be written
Returns
error code
Return values
0success
1failure

◆ ope_close_func

typedef int(* ope_close_func) (void *user_data)

Called for closing a stream.

Parameters
user_datauser-defined data passed to the callback
Returns
error code
Return values
0success
1failure

◆ ope_packet_func

typedef void(* ope_packet_func) (void *user_data, const unsigned char *packet_ptr, opus_int32 packet_len, opus_uint32 flags)

Called on every packet encoded (including header).

Parameters
user_datauser-defined data passed to the callback
packet_ptrpacket data
packet_lennumber of bytes in the packet
flagsoptional flags (none defined for now so zero)