xine-lib: xine-lib-1.2.13/src/input/input_cdda.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
input_cdda.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <unistd.h>`
`#include <pthread.h>`
`#include <time.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <fcntl.h>`
`#include <errno.h>`
`#include <signal.h>`
`#include <basedir.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/input_plugin.h>`
`#include "../xine-engine/bswap.h"`
`#include "media_helper.h"`

## Data Structures
struct | cdrom_toc_entry_t
struct | cdrom_toc_t
struct | sha160_t
struct | trackinfo_t
struct | cdda_input_plugin_t
struct | cdda_input_class_t

## Macros
#define | LOG_MODULE "input_cdda"
#define | LOG_VERBOSE
#define | DEFAULT_CDDA_DEVICE "/dev/cdrom"
#define | CDDB_SERVER "gnudb.gnudb.org"
#define | CDDB_PORT 8880
#define | CDDB_PROTOCOL 6
#define | CDDB_TIMEOUT 5000
#define | CD_SECONDS_PER_MINUTE 60
#define | CD_FRAMES_PER_SECOND 75
#define | CD_RAW_FRAME_SIZE 2352
#define | CD_LEADOUT_TRACK 0xAA
#define | CD_BLOCK_OFFSET 150
#define | sha160_digest_len 20
#define | MAX_TRACKS 99
#define | CACHED_FRAMES 90 /* be a multiple of 3, see read_block () */
#define | _BUFSIZ 300

## Functions
static void | sha160_init (sha160_t *s)
static void | sha160_trans (sha160_t *s)
static void | sha160_update (sha160_t *s, const uint8_t *data, size_t len)
static void | sha160_final (sha160_t *s, uint8_t *dest)
static void | print_cdrom_toc (xine_t *xine, cdrom_toc_t *toc)
static void | free_cdrom_toc (cdrom_toc_t *toc)
static cdrom_toc_t * | read_cdrom_toc (int fd)
static int | read_cdrom_frames (cdda_input_plugin_t *this_gen, int frame, int num_frames, unsigned char *data)
static int | parse_url (char *urlbuf, char **host, int *port)
static int | XINE_FORMAT_PRINTF (4, 5)
static int | network_connect (xine_stream_t *stream, const char *got_url)
static cdrom_toc_t * | network_read_cdrom_toc (xine_stream_t *stream, int fd)
static int | network_read_cdrom_frames (xine_stream_t *stream, int fd, int first_frame, int num_frames, unsigned char data[2352])
static void | cdda_device_cb (void *data, xine_cfg_entry_t *cfg)
static void | enable_cddb_changed_cb (void *data, xine_cfg_entry_t *cfg)
static void | server_changed_cb (void *data, xine_cfg_entry_t *cfg)
static void | port_changed_cb (void *data, xine_cfg_entry_t *cfg)
static int | _cdda_is_cd_changed (cdda_input_plugin_t *this)
static void | _cdda_mkdir_safe (xine_t *xine, char *path)
static void | _cdda_mkdir_recursive_safe (xine_t *xine, char *path)
static int | _cdda_cddb_socket_read (cdda_input_plugin_t *this, char *str, int size)
static int | _cdda_cddb_send_command (cdda_input_plugin_t *this, char *cmd)
static int | _cdda_cddb_handle_code (char *buf)
static char * | _cdda_append (char *first, const char *second)
static void | _cdda_parse_cddb_info (cdda_input_plugin_t *this, char *buffer, char **dtitle)
static int | _cdda_load_cached_cddb_infos (cdda_input_plugin_t *this)
static void | _cdda_save_cached_cddb_infos (cdda_input_plugin_t *this, char *filecontent)
static int | _cdda_cddb_socket_open (cdda_input_plugin_t *this)
static void | _cdda_cddb_socket_close (cdda_input_plugin_t *this)
static int | _cdda_cddb_retrieve (cdda_input_plugin_t *this)
static unsigned int | _cdda_cddb_sum (int n)
static uint32_t | _cdda_calc_cddb_id (cdda_input_plugin_t *this)
static void | _cdda_cdindex (cdda_input_plugin_t *this, cdrom_toc_t *toc)
static uint32_t | _cdda_get_cddb_id (cdda_input_plugin_t *this)
static void | _cdda_free_cddb_info (cdda_input_plugin_t *this)
static int | cdda_open (cdda_input_plugin_t *this_gen, const char *cdda_device, int *fdd)
static int | cdda_close (cdda_input_plugin_t *this_gen)
static uint32_t | cdda_plugin_get_capabilities (input_plugin_t *this_gen)
static off_t | cdda_plugin_read (input_plugin_t *this_gen, void *buf, off_t len)
static buf_element_t * | cdda_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t nlen)
static off_t | cdda_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
static off_t | cdda_plugin_get_current_pos (input_plugin_t *this_gen)
static off_t | cdda_plugin_get_length (input_plugin_t *this_gen)
static uint32_t | cdda_plugin_get_blocksize (input_plugin_t *this_gen)
static const char * | cdda_plugin_get_mrl (input_plugin_t *this_gen)
static int | cdda_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
static void | cdda_plugin_dispose (input_plugin_t *this_gen)
static int | cdda_plugin_open (input_plugin_t *this_gen)
static void | free_autoplay_list (cdda_input_class_t *this)
static const char *const * | cdda_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
static input_plugin_t * | cdda_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl)
static void | cdda_class_dispose (input_class_t *this_gen)
static int | cdda_class_eject_media (input_class_t *this_gen)
static void * | init_plugin (xine_t *xine, const void *data)

## Variables
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ _BUFSIZ

#define _BUFSIZ 300

Referenced by network_read_cdrom_toc(), and XINE_FORMAT_PRINTF().

## ◆ CACHED_FRAMES

#define CACHED_FRAMES 90 /* be a multiple of 3, see read_block () */

Referenced by cdda_plugin_read().

## ◆ CD_BLOCK_OFFSET

#define CD_BLOCK_OFFSET 150

## ◆ CD_FRAMES_PER_SECOND

#define CD_FRAMES_PER_SECOND 75

Referenced by _cdda_calc_cddb_id(), cdda_plugin_open(), and network_read_cdrom_toc().

## ◆ CD_LEADOUT_TRACK

#define CD_LEADOUT_TRACK 0xAA

Referenced by network_read_cdrom_toc().

## ◆ CD_RAW_FRAME_SIZE

#define CD_RAW_FRAME_SIZE 2352

Referenced by cdda_plugin_get_current_pos(), cdda_plugin_get_length(), cdda_plugin_read(), and cdda_plugin_seek().

## ◆ CD_SECONDS_PER_MINUTE

#define CD_SECONDS_PER_MINUTE 60

Referenced by cdda_plugin_open(), and network_read_cdrom_toc().

## ◆ CDDB_PORT

#define CDDB_PORT 8880

Referenced by init_plugin().

## ◆ CDDB_PROTOCOL

#define CDDB_PROTOCOL 6

Referenced by _cdda_cddb_retrieve().

## ◆ CDDB_SERVER

#define CDDB_SERVER "gnudb.gnudb.org"

Referenced by init_plugin().

## ◆ CDDB_TIMEOUT

#define CDDB_TIMEOUT 5000

Referenced by _cdda_cddb_socket_open().

## ◆ DEFAULT_CDDA_DEVICE

#define DEFAULT_CDDA_DEVICE "/dev/cdrom"

Referenced by init_plugin().

## ◆ LOG_MODULE

#define LOG_MODULE "input_cdda"

Referenced by _cdda_cddb_socket_open().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MAX_TRACKS

#define MAX_TRACKS 99

Referenced by network_read_cdrom_toc().

## ◆ sha160_digest_len

#define sha160_digest_len 20

## Function Documentation

## ◆ _cdda_append()

static char * _cdda_append | ( | char * | first,
|  | const char * | second )
| inlinestatic

Referenced by _cdda_parse_cddb_info().

## ◆ _cdda_calc_cddb_id()

static uint32_t _cdda_calc_cddb_id | ( | cdda_input_plugin_t * | this | ) |
| static

References _cdda_cddb_sum(), CD_FRAMES_PER_SECOND, and NULL.

Referenced by _cdda_get_cddb_id().

## ◆ _cdda_cddb_handle_code()

static int _cdda_cddb_handle_code | ( | char * | buf | ) |
| static

Referenced by _cdda_cddb_retrieve().

## ◆ _cdda_cddb_retrieve()

static int _cdda_cddb_retrieve | ( | cdda_input_plugin_t * | this | ) |
| static

References _, _cdda_cddb_handle_code(), _cdda_cddb_send_command(), _cdda_cddb_socket_close(), _cdda_cddb_socket_open(), _cdda_cddb_socket_read(), _cdda_load_cached_cddb_infos(), _cdda_parse_cddb_info(), _cdda_save_cached_cddb_infos(), CDDB_PROTOCOL, cdda_input_class_t::input_class, NULL, VERSION, xine_strsep, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by cdda_plugin_open().

## ◆ _cdda_cddb_send_command()

static int _cdda_cddb_send_command | ( | cdda_input_plugin_t * | this,
|  | char * | cmd )
| static

References _x_io_tcp_write(), NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _cdda_cddb_retrieve().

## ◆ _cdda_cddb_socket_close()

static void _cdda_cddb_socket_close | ( | cdda_input_plugin_t * | this | ) |
| static

References _x_io_tcp_close(), and NULL.

Referenced by _cdda_cddb_retrieve().

## ◆ _cdda_cddb_socket_open()

static int _cdda_cddb_socket_open | ( | cdda_input_plugin_t * | this | ) |
| static

References _, _x_io_tcp_connect(), _x_io_tcp_connect_finish(), CDDB_TIMEOUT, cdda_input_class_t::input_class, LOG_MODULE, lprintf, xine_log(), XINE_LOG_MSG, and XIO_READY.

Referenced by _cdda_cddb_retrieve().

## ◆ _cdda_cddb_socket_read()

static int _cdda_cddb_socket_read | ( | cdda_input_plugin_t * | this,
|  | char * | str,
|  | int | size )
| static

References _x_io_tcp_read_line(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _cdda_cddb_retrieve().

## ◆ _cdda_cddb_sum()

static unsigned int _cdda_cddb_sum | ( | int | n | ) |
| static

Referenced by _cdda_calc_cddb_id().

## ◆ _cdda_cdindex()

static void _cdda_cdindex | ( | cdda_input_plugin_t * | this,
|  | cdrom_toc_t * | toc )
| static

References _x_meta_info_set_utf8(), cdrom_toc_entry_t::first_frame, cdrom_toc_t::first_track, cdrom_toc_t::ignore_last_track, cdrom_toc_t::last_track, sha160_final(), sha160_init(), sha160_update(), cdrom_toc_t::toc_entries, cdrom_toc_t::total_tracks, xine_base64_encode(), and XINE_META_INFO_CDINDEX_DISCID.

Referenced by cdda_plugin_open().

## ◆ _cdda_free_cddb_info()

static void _cdda_free_cddb_info | ( | cdda_input_plugin_t * | this | ) |
| static

References _x_freep().

Referenced by cdda_plugin_dispose(), and cdda_plugin_open().

## ◆ _cdda_get_cddb_id()

static uint32_t _cdda_get_cddb_id | ( | cdda_input_plugin_t * | this | ) |
| static

References _cdda_calc_cddb_id(), and NULL.

Referenced by cdda_plugin_open().

## ◆ _cdda_is_cd_changed()

static int _cdda_is_cd_changed | ( | cdda_input_plugin_t * | this | ) |
| static

References NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by cdda_plugin_open().

## ◆ _cdda_load_cached_cddb_infos()

static int _cdda_load_cached_cddb_infos | ( | cdda_input_plugin_t * | this | ) |
| static

References _cdda_parse_cddb_info(), NULL, PACKAGE, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _cdda_cddb_retrieve().

## ◆ _cdda_mkdir_recursive_safe()

static void _cdda_mkdir_recursive_safe | ( | xine_t * | xine,
|  | char * | path )
| static

References _cdda_mkdir_safe().

Referenced by _cdda_save_cached_cddb_infos().

## ◆ _cdda_mkdir_safe()

static void _cdda_mkdir_safe | ( | xine_t * | xine,
|  | char * | path )
| static

References NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _cdda_mkdir_recursive_safe().

## ◆ _cdda_parse_cddb_info()

static void _cdda_parse_cddb_info | ( | cdda_input_plugin_t * | this,
|  | char * | buffer,
|  | char ** | dtitle )
| static

References _cdda_append(), and _x_asprintf().

Referenced by _cdda_cddb_retrieve(), and _cdda_load_cached_cddb_infos().

## ◆ _cdda_save_cached_cddb_infos()

static void _cdda_save_cached_cddb_infos | ( | cdda_input_plugin_t * | this,
|  | char * | filecontent )
| static

References _cdda_mkdir_recursive_safe(), NULL, PACKAGE, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _cdda_cddb_retrieve().

## ◆ cdda_class_dispose()

static void cdda_class_dispose | ( | input_class_t * | this_gen | ) |
| static

References cdda_input_class_t::config, xine_s::config, free_autoplay_list(), free_cdrom_toc(), cdda_input_class_t::last_toc, cdda_input_class_t::mutex, NULL, config_values_s::unregister_callbacks, and cdda_input_class_t::xine.

Referenced by init_plugin().

## ◆ cdda_class_eject_media()

static int cdda_class_eject_media | ( | input_class_t * | this_gen | ) |
| static

References cdda_input_class_t::cdda_device, media_eject_media(), cdda_input_class_t::mutex, and cdda_input_class_t::xine.

Referenced by init_plugin().

## ◆ cdda_class_get_autoplay_list()

static const char *const * cdda_class_get_autoplay_list | ( | input_class_t * | this_gen,
|  | int * | num_files )
| static

References cdda_input_class_t::autoplaylist, cdda_close(), cdda_input_class_t::cdda_device, cdda_open(), cdda_input_plugin_t::fd, cdrom_toc_t::first_track, free_autoplay_list(), free_cdrom_toc(), cdrom_toc_t::ignore_last_track, input_plugin_s::input_class, cdda_input_plugin_t::input_plugin, cdda_input_class_t::last_toc, cdrom_toc_t::last_track, lprintf, cdda_input_class_t::mutex, cdda_input_plugin_t::net_fd, network_connect(), network_read_cdrom_toc(), NULL, print_cdrom_toc(), read_cdrom_toc(), cdda_input_plugin_t::stream, and cdda_input_class_t::xine.

Referenced by init_plugin().

## ◆ cdda_class_get_instance()

static input_plugin_t * cdda_class_get_instance | ( | input_class_t * | cls_gen,
|  | xine_stream_t * | stream,
|  | const char * | mrl )
| static

References cdda_plugin_dispose(), cdda_plugin_get_blocksize(), cdda_plugin_get_capabilities(), cdda_plugin_get_current_pos(), cdda_plugin_get_length(), cdda_plugin_get_mrl(), cdda_plugin_get_optional_data(), cdda_plugin_open(), cdda_plugin_read(), cdda_plugin_read_block(), cdda_plugin_seek(), cdda_input_class_t::last_read_time, lprintf, NULL, and z.

Referenced by init_plugin().

## ◆ cdda_close()

static int cdda_close | ( | cdda_input_plugin_t * | this_gen | ) |
| static

References cdda_input_plugin_t::fd, FreeLibrary(), input_plugin_s::input_class, cdda_input_plugin_t::input_plugin, cdda_input_plugin_t::net_fd, NULL, cdda_input_class_t::speed, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by cdda_class_get_autoplay_list(), cdda_plugin_dispose(), and cdda_plugin_open().

## ◆ cdda_device_cb()

static void cdda_device_cb | ( | void * | data,
|  | xine_cfg_entry_t * | cfg )
| static

References xine_cfg_entry_s::str_value.

Referenced by init_plugin().

## ◆ cdda_open()

static int cdda_open | ( | cdda_input_plugin_t * | this_gen,
|  | const char * | cdda_device,
|  | int * | fdd )
| static

References cdda_input_class_t::cdda_device, cdda_input_plugin_t::fd, FreeLibrary(), GetProcAddress(), input_plugin_s::input_class, cdda_input_plugin_t::input_plugin, lprintf, NULL, cdda_input_class_t::speed, xine_open_cloexec(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by cdda_class_get_autoplay_list(), and cdda_plugin_open().

## ◆ cdda_plugin_dispose()

static void cdda_plugin_dispose | ( | input_plugin_t * | this_gen | ) |
| static

References _cdda_free_cddb_info(), cdda_close(), cdda_input_class_t::input_class, and cdda_input_class_t::last_read_time.

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_get_blocksize()

static uint32_t cdda_plugin_get_blocksize | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_get_capabilities()

static uint32_t cdda_plugin_get_capabilities | ( | input_plugin_t * | this_gen | ) |
| static

References INPUT_CAP_SEEKABLE.

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_get_current_pos()

static off_t cdda_plugin_get_current_pos | ( | input_plugin_t * | this_gen | ) |
| static

References CD_RAW_FRAME_SIZE.

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_get_length()

static off_t cdda_plugin_get_length | ( | input_plugin_t * | this_gen | ) |
| static

References CD_RAW_FRAME_SIZE.

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_get_mrl()

static const char * cdda_plugin_get_mrl | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_get_optional_data()

static int cdda_plugin_get_optional_data | ( | input_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type )
| static

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_open()

static int cdda_plugin_open | ( | input_plugin_t * | this_gen | ) |
| static

References _cdda_cddb_retrieve(), _cdda_cdindex(), _cdda_free_cddb_info(), _cdda_get_cddb_id(), _cdda_is_cd_changed(), _x_meta_info_set_utf8(), CD_FRAMES_PER_SECOND, CD_SECONDS_PER_MINUTE, cdda_close(), cdda_input_class_t::cdda_device, cdda_open(), cdrom_toc_entry_t::first_frame, cdrom_toc_entry_t::first_frame_frame, cdrom_toc_entry_t::first_frame_minute, cdrom_toc_entry_t::first_frame_second, cdrom_toc_t::first_track, free_cdrom_toc(), input_plugin_s::input_class, cdda_input_class_t::last_read_time, cdrom_toc_t::last_track, lprintf, network_connect(), network_read_cdrom_toc(), now(), NULL, print_cdrom_toc(), read_cdrom_toc(), cdrom_toc_t::toc_entries, cdrom_toc_t::total_tracks, XINE_META_INFO_ALBUM, XINE_META_INFO_ARTIST, XINE_META_INFO_GENRE, XINE_META_INFO_TITLE, XINE_META_INFO_TRACK_NUMBER, and XINE_META_INFO_YEAR.

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_read()

static off_t cdda_plugin_read | ( | input_plugin_t * | this_gen,
|  | void * | buf,
|  | off_t | len )
| static

References CACHED_FRAMES, CD_RAW_FRAME_SIZE, cdda_input_class_t::last_read_time, network_read_cdrom_frames(), NULL, and read_cdrom_frames().

Referenced by cdda_class_get_instance(), and cdda_plugin_read_block().

## ◆ cdda_plugin_read_block()

static buf_element_t * cdda_plugin_read_block | ( | input_plugin_t * | this_gen,
|  | fifo_buffer_t * | fifo,
|  | off_t | nlen )
| static

References BUF_DEMUX_BLOCK, fifo_buffer_s::buffer_pool_size_alloc, cdda_plugin_read(), buf_element_s::content, buf_element_s::free_buffer, buf_element_s::max_size, buf_element_s::mem, NULL, buf_element_s::size, and buf_element_s::type.

Referenced by cdda_class_get_instance().

## ◆ cdda_plugin_seek()

static off_t cdda_plugin_seek | ( | input_plugin_t * | this_gen,
|  | off_t | offset,
|  | int | origin )
| static

References CD_RAW_FRAME_SIZE, cdda_input_class_t::last_read_time, now(), and NULL.

Referenced by cdda_class_get_instance().

## ◆ enable_cddb_changed_cb()

static void enable_cddb_changed_cb | ( | void * | data,
|  | xine_cfg_entry_t * | cfg )
| static

References xine_cfg_entry_s::num_value.

Referenced by init_plugin().

## ◆ free_autoplay_list()

static void free_autoplay_list | ( | cdda_input_class_t * | this | ) |
| static

References _x_freep(), and cdda_input_class_t::autoplaylist.

Referenced by cdda_class_dispose(), and cdda_class_get_autoplay_list().

## ◆ free_cdrom_toc()

static void free_cdrom_toc | ( | cdrom_toc_t * | toc | ) |
| static

Referenced by cdda_class_dispose(), cdda_class_get_autoplay_list(), and cdda_plugin_open().

## ◆ init_plugin()

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

References _, cdda_input_class_t::autoplaylist, cdda_class_dispose(), cdda_class_eject_media(), cdda_class_get_autoplay_list(), cdda_class_get_instance(), cdda_input_class_t::cdda_device, cdda_device_cb(), cdda_input_class_t::cddb_enable, cdda_input_class_t::cddb_error, CDDB_PORT, cdda_input_class_t::cddb_port, CDDB_SERVER, cdda_input_class_t::cddb_server, cdda_input_class_t::config, xine_s::config, DEFAULT_CDDA_DEVICE, input_class_s::description, input_class_s::dispose, input_class_s::eject_media, enable_cddb_changed_cb(), input_class_s::get_autoplay_list, input_class_s::get_dir, input_class_s::get_instance, input_class_s::identifier, cdda_input_class_t::input_class, cdda_input_class_t::last_read_time, cdda_input_class_t::last_toc, cdda_input_class_t::mutex, N_, NULL, port_changed_cb(), config_values_s::register_bool, config_values_s::register_filename, config_values_s::register_num, config_values_s::register_string, server_changed_cb(), cdda_input_class_t::speed, cdda_input_class_t::xine, XINE_CONFIG_SECURITY, and XINE_CONFIG_STRING_IS_DEVICE_NAME.

## ◆ network_connect()

static int network_connect | ( | xine_stream_t * | stream,
|  | const char * | got_url )
| static

References _x_io_tcp_connect(), lprintf, NULL, parse_url(), xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by cdda_class_get_autoplay_list(), and cdda_plugin_open().

## ◆ network_read_cdrom_frames()

static int network_read_cdrom_frames | ( | xine_stream_t * | stream,
|  | int | fd,
|  | int | first_frame,
|  | int | num_frames,
|  | unsigned char | data[2352] )
| static

Referenced by cdda_plugin_read().

## ◆ network_read_cdrom_toc()

static cdrom_toc_t * network_read_cdrom_toc | ( | xine_stream_t * | stream,
|  | int | fd )
| static

References _BUFSIZ, CD_FRAMES_PER_SECOND, CD_LEADOUT_TRACK, CD_SECONDS_PER_MINUTE, cdrom_toc_entry_t::first_frame, cdrom_toc_entry_t::first_frame_frame, cdrom_toc_entry_t::first_frame_minute, cdrom_toc_entry_t::first_frame_second, cdrom_toc_t::first_track, cdrom_toc_t::last_track, MAX_TRACKS, NULL, cdrom_toc_t::toc_entries, cdrom_toc_t::total_tracks, cdrom_toc_entry_t::track_mode, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by cdda_class_get_autoplay_list(), and cdda_plugin_open().

## ◆ parse_url()

static int parse_url | ( | char * | urlbuf,
|  | char ** | host,
|  | int * | port )
| static

References NULL.

Referenced by network_connect().

## ◆ port_changed_cb()

static void port_changed_cb | ( | void * | data,
|  | xine_cfg_entry_t * | cfg )
| static

References xine_cfg_entry_s::num_value.

Referenced by init_plugin().

## ◆ print_cdrom_toc()

static void print_cdrom_toc | ( | xine_t * | xine,
|  | cdrom_toc_t * | toc )
| static

References cdrom_toc_entry_t::first_frame, cdrom_toc_entry_t::first_frame_frame, cdrom_toc_entry_t::first_frame_minute, cdrom_toc_entry_t::first_frame_second, cdrom_toc_t::first_track, cdrom_toc_t::last_track, cdrom_toc_t::toc_entries, cdrom_toc_t::total_tracks, cdrom_toc_entry_t::track_mode, xine_s::verbosity, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by cdda_class_get_autoplay_list(), and cdda_plugin_open().

## ◆ read_cdrom_frames()

static int read_cdrom_frames | ( | cdda_input_plugin_t * | this_gen,
|  | int | frame,
|  | int | num_frames,
|  | unsigned char * | data )
| static

Referenced by cdda_plugin_read().

## ◆ read_cdrom_toc()

static cdrom_toc_t * read_cdrom_toc | ( | int | fd | ) |
| static

References NULL.

Referenced by cdda_class_get_autoplay_list(), and cdda_plugin_open().

## ◆ server_changed_cb()

static void server_changed_cb | ( | void * | data,
|  | xine_cfg_entry_t * | cfg )
| static

References xine_cfg_entry_s::str_value.

Referenced by init_plugin().

## ◆ sha160_final()

static void sha160_final | ( | sha160_t * | s,
|  | uint8_t * | dest )
| static

References sha160_t::buf, sha160_t::n, sha160_trans(), sha160_t::state, and v.

Referenced by _cdda_cdindex().

## ◆ sha160_init()

static void sha160_init | ( | sha160_t * | s | ) |
| static

References sha160_t::n, and sha160_t::state.

Referenced by _cdda_cdindex().

## ◆ sha160_trans()

static void sha160_trans | ( | sha160_t * | s | ) |
| static

References _X_BE_32, sha160_t::buf, and sha160_t::state.

Referenced by sha160_final(), and sha160_update().

## ◆ sha160_update()

static void sha160_update | ( | sha160_t * | s,
|  | const uint8_t * | data,
|  | size_t | len )
| static

References sha160_t::buf, sha160_t::n, and sha160_trans().

Referenced by _cdda_cdindex().

## ◆ XINE_FORMAT_PRINTF()

static int XINE_FORMAT_PRINTF | ( | 4 | ,
|  | 5 | )
| static

References _BUFSIZ, _x_io_tcp_read(), _x_io_tcp_read_line(), _x_io_tcp_write(), XINE_VERBOSITY_DEBUG, and xprintf.

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "CD", XINE_VERSION_CODE, NULL, init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition input_cdda.c:2824
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
NULL
Definition xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition xine_plugin.h:29
PLUGIN_MUST_PRELOAD
#define PLUGIN_MUST_PRELOAD
Definition xine_plugin.h:46
PLUGIN_INPUT
#define PLUGIN_INPUT
Definition xine_plugin.h:30