decfuncs (3) - Linux Manuals

NAME

Functions for Decoding -

Modules


Configuration keys for the decoder ctl interface.
Decoder CTL settings.

Functions for decoding

You must link to libdaalaadec if you use any of the functions in this section.
int daala_decode_header_in (daala_info *info, daala_comment *dc, daala_setup_info **ds, const daala_packet *dp)
Parses the header packets from an Ogg Daala stream.
daala_dec_ctx * daala_decode_create (const daala_info *info, const daala_setup_info *setup)
Allocates a decoder instance.
void daala_setup_free (daala_setup_info *setup)
Releases all storage used for the decoder setup information.
int daala_decode_ctl (daala_dec_ctx *dec, int req, void *buf, size_t buf_sz)
Decoder control function.
void daala_decode_free (daala_dec_ctx *dec)
Frees an allocated decoder instance.
int daala_decode_packet_in (daala_dec_ctx *dec, const daala_packet *dp)
Retrieves decoded video data frames.
int daala_decode_img_out (daala_dec_ctx *dec, daala_image *img)
Outputs the next available decoded image frame.

Detailed Description

Function Documentation

int daala_decode_header_in (daala_info *info, daala_comment *dc, daala_setup_info **ds, const daala_packet *dp)

Parses the header packets from an Ogg Daala stream. To use this function:

Initialize a daala_info structure using daala_info_init().
Initialize a daala_comment structure using daala_comment_init().
Initialize a daala_setup_info pointer to NULL.
Call this function three times, passing in pointers to the same daala_info, daala_comment, and daala_setup_info pointer each time, and the three successive header packets.

Parameters:

info The daala_info structure to fill in. This must have been previously initialized with daala_info_init(). The application may begin using the contents of this structure after the first header is decoded, though it must continue to be passed in unmodified on all subsequent calls.
dc The daala_comment structure to fill in. This must have been previously initialized with daala_comment_init(). The application may immediately begin using the contents of this structure after the second header is decoded, though it must continue to be passed in on all subsequent calls. Users should free the returned data with daala_comment_clear().
ds A pointer to a daala_setup_info pointer to fill in. The contents of this pointer must be initialized to NULL on the first call, and the returned value must continue to be passed in on all subsequent calls.
dp The current header packet to process.

Returns:

A positive value indicates that a Daala header was successfully processed and indicates the remaining number of headers to be read.

Return values:

0 The last header was processed and the next packet will contain video.
OD_EFAULT One of info, dc, or ds was NULL, or there was a memory allocation failure.
OD_EBADHEADER op was NULL, the packet was not the next header packet in the expected sequence, or the format fo the header data was invalid.
OD_EVERSION The packet data was a Daala header, but for a bitstream version not decodable with this version of libdaaladec.
OD_ENOTFORMAT The packet was not a Daala header.

daala_dec_ctx* daala_decode_create (const daala_info *info, const daala_setup_info *setup)

Allocates a decoder instance.

Parameters:

info A daala_info struct filled via daala_decode_header_in().
setup A daala_setup_info handle returned via daala_decode_header_in().

Returns:

The initialized daala_dec_ctx handle.

Return values:

NULL If the decoding parameters were invalid.

void daala_setup_free (daala_setup_info *setup)

Releases all storage used for the decoder setup information. This should be called after you no longer want to create any decoders for a stream whose headers you have parsed with daala_decode_header_in().

Parameters:

setup The setup information to free. This can safely be NULL.

int daala_decode_ctl (daala_dec_ctx *dec, intreq, void *buf, size_tbuf_sz)

Decoder control function. This is used to provide advanced control of the decoding process.

Parameters:

dec A daala_dec_ctx handle.
req The control code to process. See the list of available control codes for details.
buf The parameters for this control code.
buf_sz The size of the parameter buffer.

void daala_decode_free (daala_dec_ctx *dec)

Frees an allocated decoder instance.

Parameters:

dec A daala_dec_ctx handle.

int daala_decode_packet_in (daala_dec_ctx *dec, const daala_packet *dp)

Retrieves decoded video data frames.

Parameters:

dec A daala_dec_ctx handle.

int daala_decode_img_out (daala_dec_ctx *dec, daala_image *img)

Outputs the next available decoded image frame.

Parameters:

img A buffer to receive the decoded image data.
dp An incoming Daala packet.

Returns:

A positive value 1 means an output image was available and was placed in img.

Return values:

1 An decoded image was available and was placed in img.
0 No image was available, so the contents of img were left unchanged.
OD_EFAULT One of dec or img was NULL.

Author

Generated automatically by Doxygen for daala from the source code.