xine-lib: xine-lib-1.2.13/src/combined/xine_speex_decoder.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
xine_speex_decoder.c File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include <xine/xine_internal.h>`
`#include <xine/audio_out.h>`
`#include <xine/buffer.h>`
`#include <ogg/ogg.h>`
`#include <speex/speex.h>`
`#include <speex/speex_header.h>`
`#include <speex/speex_callbacks.h>`
`#include <speex/speex_stereo.h>`
`#include "ogg_combined.h"`

## Data Structures
struct | speex_decoder_s

## Macros
#define | LOG_MODULE "speex_decoder"
#define | LOG_VERBOSE
#define | LOG_BUFFERS 0
#define | MAX_FRAME_SIZE 2000
#define | readint(buf, base)

## Typedefs
typedef struct speex_decoder_s | speex_decoder_t

## Functions
static void | speex_reset (audio_decoder_t *this_gen)
static void | speex_discontinuity (audio_decoder_t *this_gen)
static void | read_metadata (speex_decoder_t *this, char *comments, int length)
static void | speex_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
static void | speex_dispose (audio_decoder_t *this_gen)
static audio_decoder_t * | open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream)
void * | speex_init_plugin (xine_t *xine, const void *data)

## Variables
struct { |
char key [16] |
int xine_metainfo_index |
} | speex_comment_keys [] |

## Macro Definition Documentation

## ◆ LOG_BUFFERS

#define LOG_BUFFERS 0

Referenced by speex_decode_data().

## ◆ LOG_MODULE

#define LOG_MODULE "speex_decoder"

Referenced by speex_decode_data().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MAX_FRAME_SIZE

#define MAX_FRAME_SIZE 2000

## ◆ readint

#define readint | ( |  | buf,
|  |  | base )

Value:
(((buf[base+3]<<24)&0xff000000)| \
((buf[base+2]<<16)&0xff0000)| \
((buf[base+1]<<8)&0xff00)| \
(buf[base]&0xff))

Referenced by read_metadata().

## Typedef Documentation

## ◆ speex_decoder_t

typedef struct speex_decoder_s speex_decoder_t

## Function Documentation

## ◆ open_plugin()

static audio_decoder_t * open_plugin | ( | audio_decoder_class_t * | class_gen,
|  | xine_stream_t * | stream )
| static

References audio_decoder_class_s::dispose, NULL, speex_decode_data(), speex_discontinuity(), speex_dispose(), and speex_reset().

Referenced by speex_init_plugin().

## ◆ read_metadata()

static void read_metadata | ( | speex_decoder_t * | this,
|  | char * | comments,
|  | int | length )
| static

References _x_meta_info_set_utf8(), key, lprintf, readint, speex_comment_keys, XINE_META_INFO_AUDIOCODEC, xine_metainfo_index, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by speex_decode_data().

## ◆ speex_decode_data()

static void speex_decode_data | ( | audio_decoder_t * | this_gen,
|  | buf_element_t * | buf )
| static

References _x_ao_channels2mode(), _x_stream_info_set(), bits, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, buf_element_s::content, buf_element_s::decoder_flags, llprintf, LOG_BUFFERS, LOG_MODULE, lprintf, audio_buffer_s::mem, mode(), audio_buffer_s::num_frames, buf_element_s::pts, read_metadata(), buf_element_s::size, audio_buffer_s::stream, audio_buffer_s::vpts, XINE_STREAM_INFO_AUDIO_BITRATE, XINE_STREAM_INFO_AUDIO_SAMPLERATE, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ speex_discontinuity()

static void speex_discontinuity | ( | audio_decoder_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ speex_dispose()

static void speex_dispose | ( | audio_decoder_t * | this_gen | ) |
| static

References bits.

Referenced by open_plugin().

## ◆ speex_init_plugin()

void * speex_init_plugin | ( | xine_t * | xine,
|  | const void * | data )

References audio_decoder_s::dispose, N_, NULL, audio_decoder_class_s::open_plugin, and open_plugin().

## ◆ speex_reset()

static void speex_reset | ( | audio_decoder_t * | this_gen | ) |
| static

References bits.

Referenced by open_plugin().

## Variable Documentation

## ◆ key

char key[16]

Referenced by _insert_node(), _key_2_index(), _sparse_array_find(), _x_config_change_opt(), _xine_sarray_find_default(), _xine_sarray_find_first(), _xine_sarray_find_last(), _xine_stree_load_url(), _xine_stree_load_xml(), call_hash(), config_get_serialized_entry(), config_insert(), config_lookup_entry(), config_lookup_entry_int(), config_lookup_entry_safe(), config_lookup_num(), config_lookup_string(), config_make_sort_key(), config_register_bool(), config_register_enum(), config_register_filename(), config_register_key(), config_register_num(), config_register_range(), config_register_serialized_entry(), config_register_string(), config_translate_key(), config_unregister_callbacks(), config_unregister_cb(), config_update_num(), config_update_string(), config_xlate_internal(), crypto_class_get_instance(), crypto_plugin_open(), dxr3_vo_open_plugin(), entry_get(), entry_new(), entry_put(), event_handler(), event_handler_external(), external_stream_play(), goom_hash_get(), goom_hash_put(), goom_hash_put_float(), goom_hash_put_int(), goom_hash_put_ptr(), hls_parse_args(), http_key_num(), http_plugin_handshake(), internal_write_event_key(), internal_write_event_play_external(), key_num(), open_internal(), read_metadata(), sparse_array_get(), sparse_array_set(), sparse_array_unset(), xine_config_load(), xine_config_lookup_entry(), xine_config_lookup_num(), xine_config_lookup_string(), xine_config_register_bool(), xine_config_register_enum(), xine_config_register_filename(), xine_config_register_num(), xine_config_register_range(), xine_config_register_string(), xine_config_unregister_callbacks(), and xine_sarray_binary_search().

## ◆ [struct]

const struct { ... } speex_comment_keys[]

Initial value:
= {
{"ARTIST=", XINE_META_INFO_ARTIST},
{"ALBUM=", XINE_META_INFO_ALBUM},
{"TITLE=", XINE_META_INFO_TITLE},
{"GENRE=", XINE_META_INFO_GENRE},
{"DESCRIPTION=", XINE_META_INFO_COMMENT},
{"DATE=", XINE_META_INFO_YEAR}
}
XINE_META_INFO_ARTIST
#define XINE_META_INFO_ARTIST
Definition xine.h:1081
XINE_META_INFO_COMMENT
#define XINE_META_INFO_COMMENT
Definition xine.h:1080
XINE_META_INFO_ALBUM
#define XINE_META_INFO_ALBUM
Definition xine.h:1083
XINE_META_INFO_TITLE
#define XINE_META_INFO_TITLE
Definition xine.h:1079
XINE_META_INFO_YEAR
#define XINE_META_INFO_YEAR
Definition xine.h:1084
XINE_META_INFO_GENRE
#define XINE_META_INFO_GENRE
Definition xine.h:1082

Referenced by read_metadata().

## ◆ xine_metainfo_index

int xine_metainfo_index

Referenced by read_metadata().