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

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
ff_dvaudio_decoder.c File Reference
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <inttypes.h>`
`#include <string.h>`
`#include <math.h>`
`#include <xine/xine_internal.h>`
`#include <xine/buffer.h>`
`#include <xine/xineutils.h>`
`#include "ff_dvdata.h"`

## Data Structures
struct | dvaudio_decoder_s

## Macros
#define | LOG_MODULE "dvaudio"
#define | LOG_VERBOSE
#define | AUDIOBUFSIZE 128*1024
#define | MAXFRAMESIZE 131072

## Typedefs
typedef struct dvaudio_decoder_s | dvaudio_decoder_t

## Functions
static const uint8_t * | dv_extract_pack (uint8_t *frame, enum dv_pack_type t)
static uint16_t | dv_audio_12to16 (uint16_t sample)
static int | dv_extract_audio (uint8_t *frame, uint8_t *pcm, uint8_t *pcm2)
static void | dvaudio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
static void | dvaudio_reset (audio_decoder_t *this_gen)
static void | dvaudio_discontinuity (audio_decoder_t *this_gen)
static void | dvaudio_dispose (audio_decoder_t *this_gen)
static audio_decoder_t * | dvaudio_open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream)
static void * | init_dvaudio_plugin (xine_t *xine, const void *data)

## Variables
static uint32_t | supported_audio_types []
static const decoder_info_t | dec_info_dvaudio
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ AUDIOBUFSIZE

#define AUDIOBUFSIZE 128*1024

Referenced by dvaudio_decode_data().

## ◆ LOG_MODULE

#define LOG_MODULE "dvaudio"

Referenced by ao_alsa_mixer_init(), bitplane_decode_data(), checkXvMCCap(), create_ximage(), open_plugin(), open_plugin(), xxmc_check_capability(), xxmc_create_context(), xxmc_dispose(), xxmc_dispose_context(), xxmc_find_context(), xxmc_frame_updates(), xxmc_get_property(), xxmc_set_property(), xxmc_setup_subpictures(), xxmc_update_attr(), xxmc_xvmc_alloc_subpicture(), xxmc_xvmc_alloc_surface(), xxmc_xvmc_free_subpicture(), xxmc_xvmc_free_surface(), xxmc_xvmc_update_context(), and yuv_decode_data().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MAXFRAMESIZE

#define MAXFRAMESIZE 131072

Referenced by dvaudio_decode_data().

## Typedef Documentation

## ◆ dvaudio_decoder_t

typedef struct dvaudio_decoder_s dvaudio_decoder_t

## Function Documentation

## ◆ dv_audio_12to16()

static uint16_t dv_audio_12to16 | ( | uint16_t | sample | ) |
| inlinestatic

Referenced by dv_extract_audio().

## ◆ dv_extract_audio()

static int dv_extract_audio | ( | uint8_t * | frame,
|  | uint8_t * | pcm,
|  | uint8_t * | pcm2 )
| static

References DVprofile::audio_min_samples, DVprofile::audio_shuffle, DVprofile::audio_stride, DVprofile::difseg_size, dv_audio_12to16(), dv_audio_source, dv_extract_pack(), and dv_frame_profile().

Referenced by dvaudio_decode_data().

## ◆ dv_extract_pack()

static const uint8_t * dv_extract_pack | ( | uint8_t * | frame,
|  | enum dv_pack_type | t )
| static

References dv_audio_control, dv_audio_source, dv_video_control, and NULL.

Referenced by dv_extract_audio().

## ◆ dvaudio_decode_data()

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

References _, _x_ao_channels2mode(), _x_meta_info_set_utf8(), AUDIOBUFSIZE, BUF_FLAG_FRAME_END, BUF_FLAG_HEADER, BUF_FLAG_PREVIEW, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, dv_extract_audio(), dv_frame_profile(), DVprofile::frame_size, MAXFRAMESIZE, audio_buffer_s::mem, audio_buffer_s::mem_size, NULL, audio_buffer_s::num_frames, buf_element_s::pts, buf_element_s::size, audio_buffer_s::stream, audio_buffer_s::vpts, xine_container_of, xine_fast_memcpy, XINE_META_INFO_AUDIOCODEC, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dvaudio_open_plugin().

## ◆ dvaudio_discontinuity()

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

Referenced by dvaudio_open_plugin().

## ◆ dvaudio_dispose()

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

References _x_freep(), and xine_container_of.

Referenced by dvaudio_open_plugin().

## ◆ dvaudio_open_plugin()

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

References dvaudio_decode_data(), dvaudio_discontinuity(), dvaudio_dispose(), dvaudio_reset(), and NULL.

Referenced by init_dvaudio_plugin().

## ◆ dvaudio_reset()

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

References xine_container_of.

Referenced by dvaudio_open_plugin().

## ◆ init_dvaudio_plugin()

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

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

## Variable Documentation

## ◆ dec_info_dvaudio

const decoder_info_t dec_info_dvaudio
| static

Initial value:
= {
.supported_types = supported_audio_types,
.priority = 5,
}
supported_audio_types
static uint32_t supported_audio_types[]
Definition ff_dvaudio_decoder.c:374

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ 3 , 16, "dvaudio", 1 *10000+ 2 *100+ 13 , &dec_info_dvaudio, init_dvaudio_plugin },
{ 0 , 0, NULL, 0, NULL, NULL }
}
dec_info_dvaudio
static const decoder_info_t dec_info_dvaudio
Definition ff_dvaudio_decoder.c:379
init_dvaudio_plugin
static void * init_dvaudio_plugin(xine_t *xine, const void *data)
Definition ff_dvaudio_decoder.c:361
NULL
NULL
Definition xine_plugin.c:78

## ◆ supported_audio_types

uint32_t supported_audio_types[]
| static

Initial value:
= {
0x032D0000 ,
0
}