DTS decoder for xine.
More...
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/audio_out.h>
#include <xine/buffer.h>
#include "bswap.h"
#include <dts.h>
DTS decoder for xine.
- Author
- Joachim Koenig (2001-09-04)
-
James Courtier-Dutton (2001-12-09)
◆ _BSD_SOURCE
◆ _DEFAULT_SOURCE
#define _DEFAULT_SOURCE 1 |
◆ _XOPEN_SOURCE
#define _XOPEN_SOURCE 500 |
◆ LOG_MODULE
#define LOG_MODULE "libdts" |
◆ LOG_VERBOSE
◆ MAX_AC5_FRAME
#define MAX_AC5_FRAME 4096 |
◆ dts_decode_data()
References _x_meta_info_get(), _x_meta_info_set_utf8(), _x_stream_info_set(), be2me_32, BUF_FLAG_PREVIEW, BUF_FLAG_STDHEADER, buf_element_s::content, buf_element_s::decoder_flags, dts_decode_frame(), lprintf, MAX_AC5_FRAME, buf_element_s::pts, buf_element_s::size, xine_container_of, XINE_META_INFO_AUDIOCODEC, XINE_STREAM_INFO_AUDIO_BITRATE, and XINE_STREAM_INFO_AUDIO_SAMPLERATE.
Referenced by open_plugin().
◆ dts_decode_frame()
static void dts_decode_frame |
( |
dts_decoder_t * | this, |
|
|
const int64_t | pts ) |
|
static |
References AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_AC5, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, float_to_int(), lprintf, MAX_AC5_FRAME, audio_buffer_s::mem, mute_channel(), audio_buffer_s::num_frames, audio_buffer_s::stream, audio_buffer_s::vpts, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by dts_decode_data().
◆ dts_discontinuity()
◆ dts_dispose()
◆ dts_reset()
◆ float_to_int()
static void float_to_int |
( |
const float *const | _f, |
|
|
int16_t *const | s16, |
|
|
const int | num_channels ) |
|
inlinestatic |
Convert a array of floating point samples into 16-bit signed integer samples.
- Parameters
-
f | Floating point samples array (origin) |
s16 | 16-bit signed integer samples array (destination) |
num_channels | Number of channels present in the stream |
- Todo
- This same work is being done in many decoders to adapt the output of the decoder to what the audio output can actually use, this should be done by the audio_output loop, not by the decoders.
- Note
- This is subtly different from the function with the same name in xine_musepack_decoder.c
References INT16_MAX, and INT16_MIN.
Referenced by dts_decode_frame().
◆ init_plugin()
static void * init_plugin |
( |
xine_t * | xine, |
|
|
const void * | data ) |
|
static |
◆ mute_channel()
static void mute_channel |
( |
int16_t *const | s16, |
|
|
const int | num_channels ) |
|
inlinestatic |
◆ open_plugin()
References _, AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_AC5, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, xine_stream_s::audio_out, dts_decode_data(), dts_discontinuity(), dts_dispose(), dts_reset(), xine_audio_port_s::get_capabilities, lprintf, NULL, xine_stream_s::xine, XINE_VERBOSITY_LOG, and xprintf.
Referenced by init_plugin().
◆ audio_types
const uint32_t audio_types[] |
|
static |
Initial value:= {
}
#define BUF_AUDIO_DTS
Definition buffer.h:214
◆ dec_info_audio
Initial value:= {
.priority = 8,
}
static const uint32_t audio_types[]
Definition xine_dts_decoder.c:579
◆ EXPORTED
Initial value:= {
}
static void * init_plugin(xine_t *xine, const void *data)
Definition xine_dts_decoder.c:566
static const decoder_info_t dec_info_audio
Definition xine_dts_decoder.c:583
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
Definition xine_plugin.c:78
#define PLUGIN_AUDIO_DECODER
Definition xine_plugin.h:32
#define PLUGIN_NONE
Definition xine_plugin.h:29