xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions | Variables
xine_mad_decoder.c File Reference
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include <xine/xine_internal.h>
#include <xine/audio_out.h>
#include <xine/buffer.h>
#include <xine/xineutils.h>
#include "bswap.h"
#include "frame.h"
#include "synth.h"

Data Structures

struct  mad_decoder_s
 

Macros

#define LOG_MODULE   "mad_decoder"
 
#define LOG_VERBOSE
 
#define REST_SIZE   16384
 
#define MAD_MIN_SIZE   2889
 
#define MAD_PTS_LD   3
 
#define MAD_PTS_SIZE   (1 << MAD_PTS_LD)
 
#define MAD_PTS_MASK   (MAD_PTS_SIZE - 1)
 

Typedefs

typedef struct mad_decoder_s mad_decoder_t
 

Functions

static int _mad_frame_size (const uint8_t *h)
 
static void mad_reset (audio_decoder_t *this_gen)
 
static void mad_discontinuity (audio_decoder_t *this_gen)
 
static int32_t _mad_scale (mad_fixed_t sample)
 
static int _mad_consume (mad_decoder_t *this)
 
static void mad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
 
static int _mad_fixed_2_db (mad_fixed_t v)
 
static void mad_dispose (audio_decoder_t *this_gen)
 
static audio_decoder_topen_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
 

Macro Definition Documentation

◆ LOG_MODULE

#define LOG_MODULE   "mad_decoder"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MAD_MIN_SIZE

#define MAD_MIN_SIZE   2889

◆ MAD_PTS_LD

#define MAD_PTS_LD   3

◆ MAD_PTS_MASK

#define MAD_PTS_MASK   (MAD_PTS_SIZE - 1)

Referenced by _mad_consume(), and mad_decode_data().

◆ MAD_PTS_SIZE

#define MAD_PTS_SIZE   (1 << MAD_PTS_LD)

◆ REST_SIZE

#define REST_SIZE   16384

Referenced by mad_decode_data().

Typedef Documentation

◆ mad_decoder_t

typedef struct mad_decoder_s mad_decoder_t

Function Documentation

◆ _mad_consume()

static int _mad_consume ( mad_decoder_t * this)
static

References MAD_PTS_MASK.

Referenced by mad_decode_data().

◆ _mad_fixed_2_db()

static int _mad_fixed_2_db ( mad_fixed_t v)
static

References v.

Referenced by mad_dispose().

◆ _mad_frame_size()

static int _mad_frame_size ( const uint8_t * h)
static

References _X_BE_32, and type.

Referenced by mad_decode_data().

◆ _mad_scale()

static int32_t _mad_scale ( mad_fixed_t sample)
inlinestatic

References v.

Referenced by mad_decode_data().

◆ init_plugin()

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

◆ mad_decode_data()

static void mad_decode_data ( audio_decoder_t * this_gen,
buf_element_t * buf )
static

◆ mad_discontinuity()

static void mad_discontinuity ( audio_decoder_t * this_gen)
static

References xine_container_of.

Referenced by open_plugin().

◆ mad_dispose()

static void mad_dispose ( audio_decoder_t * this_gen)
static

◆ mad_reset()

static void mad_reset ( audio_decoder_t * this_gen)
static

References xine_container_of.

Referenced by mad_decode_data(), and open_plugin().

◆ open_plugin()

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

Variable Documentation

◆ audio_types

const uint32_t audio_types[]
static
Initial value:
= {
}
#define BUF_AUDIO_MPEG
Definition buffer.h:210

◆ dec_info_audio

const decoder_info_t dec_info_audio
static
Initial value:
= {
.supported_types = audio_types,
.priority = 8,
}
static const uint32_t audio_types[]
Definition xine_mad_decoder.c:748

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
#define XINE_VERSION_CODE
Definition xine_internal.h:57
static void * init_plugin(xine_t *xine, const void *data)
Definition xine_mad_decoder.c:736
static const decoder_info_t dec_info_audio
Definition xine_mad_decoder.c:752
NULL
Definition xine_plugin.c:78
#define PLUGIN_AUDIO_DECODER
Definition xine_plugin.h:32
#define PLUGIN_NONE
Definition xine_plugin.h:29