xine-lib: xine-lib-1.2.12/src/audio_dec/xine_a52_decoder.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
xine_a52_decoder.c File Reference
`#include "config.h"`
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/types.h>`
`#include <xine/xine_internal.h>`
`#include <xine/audio_out.h>`
`#include "a52.h"`
`#include <xine/buffer.h>`
`#include <xine/xineutils.h>`
`#include "xine_a52_parser.h"`

## Data Structures
struct | a52dec_class_t
struct | a52dec_decoder_s

## Macros
#define | LOG_MODULE "a52_decoder"
#define | LOG_VERBOSE
#define | SAMPLE_OFFS 384

## Typedefs
typedef struct a52dec_decoder_s | a52dec_decoder_t

## Functions
static void | a52dec_reset (audio_decoder_t *this_gen)
static void | a52dec_discontinuity (audio_decoder_t *this_gen)
static void | downmix_lfe_1 (sample_t *target, sample_t *lfe, sample_t gain)
static void | downmix_lfe_2 (sample_t *target1, sample_t *target2, sample_t *lfe, sample_t gain)
static void | float_to_int (sample_t *_f, int16_t *s16, int num_channels)
static void | mute_channel (int16_t *s16, int num_channels)
static void | a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts, int preview_mode)
static void | a52dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
static void | a52dec_dispose (audio_decoder_t *this_gen)
static audio_decoder_t * | open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream)
static void | dispose_class (audio_decoder_class_t *this_gen)
static void | lfe_level_change_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | a52_level_change_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | dynrng_compress_change_cb (void *this_gen, xine_cfg_entry_t *entry)
static void | surround_downmix_change_cb (void *this_gen, xine_cfg_entry_t *entry)
static void * | init_plugin (xine_t *xine, const void *data)

## Variables
static const uint32_t | audio_types []
static const decoder_info_t | dec_info_audio
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ LOG_MODULE

#define LOG_MODULE "a52_decoder"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ SAMPLE_OFFS

#define SAMPLE_OFFS 384

## Typedef Documentation

## ◆ a52dec_decoder_t

typedef struct a52dec_decoder_s a52dec_decoder_t

## Function Documentation

## ◆ a52_level_change_cb()

static void a52_level_change_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References a52dec_class_t::a52_level, and xine_cfg_entry_s::num_value.

Referenced by init_plugin().

## ◆ a52dec_decode_data()

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

References a52dec_decode_frame(), BUF_AUDIO_DNET, BUF_FLAG_HEADER, BUF_FLAG_PREVIEW, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, do_swab(), lprintf, buf_element_s::pts, buf_element_s::size, buf_element_s::type, xine_a52_parse_data(), and xine_container_of.

Referenced by open_plugin().

## ◆ a52dec_decode_frame()

static void a52dec_decode_frame | ( | a52dec_decoder_t * | this,
|  | int64_t | pts,
|  | int | preview_mode
| ) |  |
| static

References A52_CHANNEL_MASK, A52_LFE, AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, downmix_lfe_1(), downmix_lfe_2(), float_to_int(), lprintf, audio_buffer_s::mem, mute_channel(), NULL, audio_buffer_s::num_frames, SAMPLE_OFFS, audio_buffer_s::stream, audio_buffer_s::vpts, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by a52dec_decode_data().

## ◆ a52dec_discontinuity()

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

References xine_container_of.

Referenced by open_plugin().

## ◆ a52dec_dispose()

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

References NULL, and xine_container_of.

Referenced by open_plugin().

## ◆ a52dec_reset()

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

References xine_a52_parser_reset(), and xine_container_of.

Referenced by open_plugin().

## ◆ dispose_class()

static void dispose_class | ( | audio_decoder_class_t * | this_gen | ) |
| static

References a52dec_class_t::config, NULL, and config_values_s::unregister_callbacks.

Referenced by init_plugin().

## ◆ downmix_lfe_1()

static void downmix_lfe_1 | ( | sample_t * | target,
|  | sample_t * | lfe,
|  | sample_t | gain
| ) |  |
| inlinestatic

Referenced by a52dec_decode_frame().

## ◆ downmix_lfe_2()

static void downmix_lfe_2 | ( | sample_t * | target1,
|  | sample_t * | target2,
|  | sample_t * | lfe,
|  | sample_t | gain
| ) |  |
| inlinestatic

References v.

Referenced by a52dec_decode_frame().

## ◆ dynrng_compress_change_cb()

static void dynrng_compress_change_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::num_value.

Referenced by init_plugin().

## ◆ float_to_int()

static void float_to_int | ( | sample_t * | _f,
|  | int16_t * | s16,
|  | int | num_channels
| ) |  |
| inlinestatic

References v.

Referenced by a52dec_decode_frame().

## ◆ init_plugin()

static void * init_plugin | ( | xine_t * | xine,
|  | const void * | data
| ) |  |
| static

References _, a52dec_class_t::a52_level, a52_level_change_cb(), xine_s::config, a52dec_class_t::config, a52dec_class_t::decoder_class, audio_decoder_class_s::description, a52dec_class_t::disable_dynrng_compress, audio_decoder_class_s::dispose, dispose_class(), dynrng_compress_change_cb(), a52dec_class_t::enable_surround_downmix, audio_decoder_class_s::identifier, a52dec_class_t::lfe_level_1, a52dec_class_t::lfe_level_2, lfe_level_change_cb(), lprintf, N_, NULL, open_plugin(), audio_decoder_class_s::open_plugin, config_values_s::register_bool, config_values_s::register_range, surround_downmix_change_cb(), and v.

## ◆ lfe_level_change_cb()

static void lfe_level_change_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References a52dec_class_t::lfe_level_1, a52dec_class_t::lfe_level_2, and xine_cfg_entry_s::num_value.

Referenced by init_plugin().

## ◆ mute_channel()

static void mute_channel | ( | int16_t * | s16,
|  | int | num_channels
| ) |  |
| inlinestatic

Referenced by a52dec_decode_frame().

## ◆ open_plugin()

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

References _, A52_2F1R, A52_2F2R, A52_3F, A52_3F1R, A52_3F2R, A52_DOLBY, A52_LFE, A52_MONO, A52_STEREO, a52dec_decode_data(), a52dec_discontinuity(), a52dec_dispose(), a52dec_reset(), AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, xine_stream_s::audio_out, xine_audio_port_s::get_capabilities, lprintf, NULL, xine_stream_s::xine, xine_a52_parser_reset(), xine_create_cloexec(), xine_mm_accel(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by init_plugin().

## ◆ surround_downmix_change_cb()

static void surround_downmix_change_cb | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::num_value.

Referenced by init_plugin().

## Variable Documentation

## ◆ audio_types

const uint32_t audio_types[]
| static

Initial value:
= {
BUF_AUDIO_A52,
BUF_AUDIO_DNET,
0
}
BUF_AUDIO_DNET
#define BUF_AUDIO_DNET
Definition: buffer.h:224
BUF_AUDIO_A52
#define BUF_AUDIO_A52
Definition: buffer.h:209

## ◆ dec_info_audio

const decoder_info_t dec_info_audio
| static

Initial value:
= {
.supported_types = audio_types,
.priority = 8,
}
audio_types
static const uint32_t audio_types[]
Definition: xine_a52_decoder.c:705

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "a/52", XINE_VERSION_CODE, &dec_info_audio, init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition: xine_a52_decoder.c:636
dec_info_audio
static const decoder_info_t dec_info_audio
Definition: xine_a52_decoder.c:711
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_AUDIO_DECODER
#define PLUGIN_AUDIO_DECODER
Definition: xine_plugin.h:32
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_MUST_PRELOAD
#define PLUGIN_MUST_PRELOAD
Definition: xine_plugin.h:46