xine-lib: xine-lib-1.2.13/src/audio_dec/xine_a52_spdif.c File Reference

xine-lib 1.2.13-20230125hg15249

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

## Data Structures
struct | frmsize_s
struct | a52dec_decoder_s

## Macros
#define | _DEFAULT_SOURCE 1
#define | _XOPEN_SOURCE 500
#define | _BSD_SOURCE 1
#define | LOG_MODULE "a52_spdif"
#define | LOG_VERBOSE
#define | A52_MONO 1
#define | A52_STEREO 2
#define | A52_3F 3
#define | A52_2F1R 4
#define | A52_3F1R 5
#define | A52_2F2R 6
#define | A52_3F2R 7
#define | A52_DOLBY 10
#define | A52_CHANNEL_MASK 15
#define | A52_LFE 16

## Typedefs
typedef struct a52dec_decoder_s | a52dec_decoder_t

## Functions
static int | a52_syncinfo (uint8_t *buf, int *flags, int *sample_rate, int *bit_rate)
static void | a52dec_reset (audio_decoder_t *this_gen)
static void | a52dec_discontinuity (audio_decoder_t *this_gen)
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 * | init_plugin (xine_t *xine, const void *data)

## Variables
static const struct frmsize_s | frmsizecod_tbl [64]
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

## ◆ _BSD_SOURCE

#define _BSD_SOURCE 1

## ◆ _DEFAULT_SOURCE

#define _DEFAULT_SOURCE 1

## ◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE 500

## ◆ A52_2F1R

#define A52_2F1R 4

Referenced by a52_channel_info(), and open_plugin().

## ◆ A52_2F2R

#define A52_2F2R 6

Referenced by a52_channel_info(), and open_plugin().

## ◆ A52_3F

#define A52_3F 3

Referenced by a52_channel_info(), and open_plugin().

## ◆ A52_3F1R

#define A52_3F1R 5

Referenced by a52_channel_info(), and open_plugin().

## ◆ A52_3F2R

#define A52_3F2R 7

Referenced by a52_channel_info(), and open_plugin().

## ◆ A52_CHANNEL_MASK

#define A52_CHANNEL_MASK 15

Referenced by a52_channel_info(), and a52dec_decode_frame().

## ◆ A52_DOLBY

#define A52_DOLBY 10

Referenced by a52_channel_info(), a52_syncinfo(), and open_plugin().

## ◆ A52_LFE

#define A52_LFE 16

Referenced by a52_channel_info(), a52_syncinfo(), a52dec_decode_frame(), and open_plugin().

## ◆ A52_MONO

#define A52_MONO 1

Referenced by a52_channel_info(), and open_plugin().

## ◆ A52_STEREO

#define A52_STEREO 2

Referenced by a52_channel_info(), and open_plugin().

## ◆ LOG_MODULE

#define LOG_MODULE "a52_spdif"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Typedef Documentation

## ◆ a52dec_decoder_t

typedef struct a52dec_decoder_s a52dec_decoder_t

## Function Documentation

## ◆ a52_syncinfo()

static int a52_syncinfo | ( | uint8_t * | buf,
|  | int * | flags,
|  | int * | sample_rate,
|  | int * | bit_rate )
| static

References A52_DOLBY, A52_LFE, and frmsize_s::bit_rate.

Referenced by xine_a52_parse_data().

## ◆ 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, do_swab(), buf_element_s::pts, buf_element_s::size, buf_element_s::type, and xine_a52_parse_data().

Referenced by open_plugin().

## ◆ a52dec_decode_frame()

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

References AO_CAP_MODE_A52, frmsize_s::frm_size, frmsizecod_tbl, audio_buffer_s::mem, audio_buffer_s::num_frames, audio_buffer_s::stream, and audio_buffer_s::vpts.

Referenced by a52dec_decode_data().

## ◆ a52dec_discontinuity()

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

References a52dec_reset().

Referenced by open_plugin().

## ◆ a52dec_dispose()

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

Referenced by open_plugin().

## ◆ a52dec_reset()

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

References xine_a52_parser_reset().

Referenced by a52dec_discontinuity(), and open_plugin().

## ◆ init_plugin()

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

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

## ◆ open_plugin()

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

References a52dec_decode_data(), a52dec_discontinuity(), a52dec_dispose(), a52dec_reset(), AO_CAP_MODE_A52, xine_stream_s::audio_out, xine_audio_port_s::get_capabilities, lprintf, NULL, xine_stream_s::xine, xine_a52_parser_reset(), XINE_VERBOSITY_DEBUG, and xprintf.

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 = 20,
}
audio_types
static const uint32_t audio_types[]
Definition xine_a52_spdif.c:322

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "a/52_spdif", 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_spdif.c:308
dec_info_audio
static const decoder_info_t dec_info_audio
Definition xine_a52_spdif.c:328
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

## ◆ frmsizecod_tbl

const struct frmsize_s frmsizecod_tbl[64]
| static

Referenced by a52dec_decode_frame().