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

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
xine_lpcm_decoder.c File Reference
`#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>`

## Data Structures
struct | lpcm_decoder_s

## Macros
#define | _DEFAULT_SOURCE 1
#define | _XOPEN_SOURCE 500
#define | _BSD_SOURCE 1

## Typedefs
typedef struct lpcm_decoder_s | lpcm_decoder_t

## Functions
static void | lpcm_reset (audio_decoder_t *this_gen)
static void | lpcm_discontinuity (audio_decoder_t *this_gen)
static void | lpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
static void | lpcm_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 uint32_t | audio_types []
static const decoder_info_t | dec_info_audio
const plugin_info_t xine_plugin_info[] | EXPORTED

## Detailed Description

Author
  James Courtier-Dutton james.nosp@m.@sup.nosp@m.erbug.nosp@m..dem.nosp@m.on.co.nosp@m..uk

Date
  2001-08-31 Added LPCM rate sensing

## Macro Definition Documentation

## ◆ _BSD_SOURCE

#define _BSD_SOURCE 1

## ◆ _DEFAULT_SOURCE

#define _DEFAULT_SOURCE 1

## ◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE 500

## Typedef Documentation

## ◆ lpcm_decoder_t

typedef struct lpcm_decoder_s lpcm_decoder_t

## Function Documentation

## ◆ 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().

## ◆ lpcm_decode_data()

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

References _x_ao_channels2mode(), _x_meta_info_set_utf8(), _x_stream_info_set(), BUF_AUDIO_LPCM_BE, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_PREVIEW, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, BUF_SPECIAL_LPCM_CONFIG, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, lprintf, audio_buffer_s::mem, audio_buffer_s::num_frames, buf_element_s::pts, buf_element_s::size, audio_buffer_s::stream, buf_element_s::type, audio_buffer_s::vpts, xine_container_of, xine_log(), XINE_LOG_MSG, XINE_META_INFO_AUDIOCODEC, XINE_STREAM_INFO_AUDIO_BITRATE, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ lpcm_discontinuity()

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

References lpcm_reset().

Referenced by open_plugin().

## ◆ lpcm_dispose()

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

References _x_freep(), and xine_container_of.

Referenced by open_plugin().

## ◆ lpcm_reset()

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

References _x_freep(), and xine_container_of.

Referenced by lpcm_discontinuity(), and open_plugin().

## ◆ 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, lpcm_decode_data(), lpcm_discontinuity(), lpcm_dispose(), lpcm_reset(), and NULL.

Referenced by init_plugin().

## Variable Documentation

## ◆ audio_types

const uint32_t audio_types[]
| static

Initial value:
= {
BUF_AUDIO_LPCM_BE, BUF_AUDIO_LPCM_LE, 0
}
BUF_AUDIO_LPCM_BE
#define BUF_AUDIO_LPCM_BE
Definition buffer.h:211
BUF_AUDIO_LPCM_LE
#define BUF_AUDIO_LPCM_LE
Definition buffer.h:212

## ◆ dec_info_audio

const decoder_info_t dec_info_audio
| static

Initial value:
= {
.supported_types = audio_types,
.priority = 1,
}
audio_types
static const uint32_t audio_types[]
Definition xine_lpcm_decoder.c:404

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_AUDIO_DECODER, 16, "pcm", XINE_VERSION_CODE, &dec_info_audio, init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition xine_lpcm_decoder.c:391
dec_info_audio
static const decoder_info_t dec_info_audio
Definition xine_lpcm_decoder.c:408
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