libcdio-paranoia 10.2+2.0.2
Data Structures | Macros | Typedefs | Functions
p_block.h File Reference
#include <cdio/paranoia/paranoia.h>
#include <cdio/paranoia/cdda.h>
#include "isort.h"

Go to the source code of this file.

Data Structures

struct  linked_list_t
 
struct  linked_element
 
struct  c_block
 
struct  v_fragment_s
 
struct  root_block
 
struct  offsets
 
struct  cdrom_paranoia_s
 

Macros

#define MIN_WORDS_OVERLAP   64 /* 16 bit words */
 
#define MIN_WORDS_SEARCH   64 /* 16 bit words */
 
#define MIN_WORDS_RIFT   16 /* 16 bit words */
 
#define MAX_SECTOR_OVERLAP   32 /* sectors */
 
#define MIN_SECTOR_EPSILON   128 /* words */
 
#define MIN_SECTOR_BACKUP   16 /* sectors */
 
#define JIGGLE_MODULO   15 /* sectors */
 
#define MIN_SILENCE_BOUNDARY   1024 /* 16 bit words */
 
#define CACHEMODEL_SECTORS   1200
 
#define min(x, y)   ((x)>(y)?(y):(x))
 
#define max(x, y)   ((x)<(y)?(y):(x))
 
#define ce(v)   (v->begin+v->size)
 
#define cb(v)   (v->begin)
 
#define cs(v)   (v->size)
 
#define cv(c)   (c->vector)
 
#define fe(f)   (f->begin+f->size)
 
#define fb(f)   (f->begin)
 
#define fs(f)   (f->size)
 
#define fv(f)   (v_buffer(f))
 
#define linked_list   linked_list_t
 
#define CDP_COMPILE
 

Typedefs

typedef struct linked_element linked_element
 
typedef struct c_block c_block_t
 
typedef struct v_fragment_s v_fragment_t
 
typedef struct root_block root_block
 
typedef struct offsets offsets
 

Functions

linked_list_tnew_list (void *(*new_fn)(void), void(*free)(void *))
 
linked_elementnew_elem (linked_list_t *list)
 
linked_elementadd_elem (linked_list_t *list, void *elem)
 
void free_list (linked_list_t *list, int free_ptr)
 
void free_elem (linked_element *e, int free_ptr)
 
void * get_elem (linked_element *e)
 
linked_list_tcopy_list (linked_list_t *p_list)
 
void free_c_block (c_block_t *c)
 
void i_cblock_destructor (c_block_t *c)
 
c_block_tnew_c_block (cdrom_paranoia_t *p)
 
void free_v_fragment (v_fragment_t *c)
 
v_fragment_tnew_v_fragment (cdrom_paranoia_t *p, c_block_t *one, long int begin, long int end, int lastsector)
 
int16_t * v_buffer (v_fragment_t *v)
 
c_block_tc_first (cdrom_paranoia_t *p)
 
c_block_tc_last (cdrom_paranoia_t *p)
 
c_block_tc_next (c_block_t *c)
 
c_block_tc_prev (c_block_t *c)
 
v_fragment_tv_first (cdrom_paranoia_t *p)
 
v_fragment_tv_last (cdrom_paranoia_t *p)
 
v_fragment_tv_next (v_fragment_t *v)
 
v_fragment_tv_prev (v_fragment_t *v)
 
c_block_tc_alloc (int16_t *vector, long begin, long size)
 
void c_set (c_block_t *v, long begin)
 
void c_insert (c_block_t *v, long pos, int16_t *b, long size)
 
void c_remove (c_block_t *v, long cutpos, long cutsize)
 
void c_overwrite (c_block_t *v, long pos, int16_t *b, long size)
 
void c_append (c_block_t *v, int16_t *vector, long size)
 
void c_removef (c_block_t *v, long cut)
 
void recover_cache (cdrom_paranoia_t *p)
 
void i_paranoia_firstlast (cdrom_paranoia_t *p)
 

Macro Definition Documentation

◆ CACHEMODEL_SECTORS

#define CACHEMODEL_SECTORS   1200

◆ cb

#define cb (   v)    (v->begin)

◆ CDP_COMPILE

#define CDP_COMPILE

◆ ce

#define ce (   v)    (v->begin+v->size)

◆ cs

#define cs (   v)    (v->size)

◆ cv

#define cv (   c)    (c->vector)

◆ fb

#define fb (   f)    (f->begin)

◆ fe

#define fe (   f)    (f->begin+f->size)

◆ fs

#define fs (   f)    (f->size)

◆ fv

#define fv (   f)    (v_buffer(f))

◆ JIGGLE_MODULO

#define JIGGLE_MODULO   15 /* sectors */

◆ linked_list

#define linked_list   linked_list_t

For compatibility with good ol' paranoia

◆ max

#define max (   x,
 
)    ((x)<(y)?(y):(x))

◆ MAX_SECTOR_OVERLAP

#define MAX_SECTOR_OVERLAP   32 /* sectors */

◆ min

#define min (   x,
 
)    ((x)>(y)?(y):(x))

◆ MIN_SECTOR_BACKUP

#define MIN_SECTOR_BACKUP   16 /* sectors */

◆ MIN_SECTOR_EPSILON

#define MIN_SECTOR_EPSILON   128 /* words */

◆ MIN_SILENCE_BOUNDARY

#define MIN_SILENCE_BOUNDARY   1024 /* 16 bit words */

◆ MIN_WORDS_OVERLAP

#define MIN_WORDS_OVERLAP   64 /* 16 bit words */

◆ MIN_WORDS_RIFT

#define MIN_WORDS_RIFT   16 /* 16 bit words */

◆ MIN_WORDS_SEARCH

#define MIN_WORDS_SEARCH   64 /* 16 bit words */

Typedef Documentation

◆ c_block_t

typedef struct c_block c_block_t

◆ linked_element

◆ offsets

typedef struct offsets offsets

◆ root_block

typedef struct root_block root_block

◆ v_fragment_t

typedef struct v_fragment_s v_fragment_t

Function Documentation

◆ add_elem()

linked_element * add_elem ( linked_list_t list,
void *  elem 
)

◆ c_alloc()

c_block_t * c_alloc ( int16_t *  vector,
long  begin,
long  size 
)

◆ c_append()

void c_append ( c_block_t v,
int16_t *  vector,
long  size 
)

References cs, c_block::size, and c_block::vector.

◆ c_first()

c_block_t * c_first ( cdrom_paranoia_t p)

◆ c_insert()

void c_insert ( c_block_t v,
long  pos,
int16_t *  b,
long  size 
)

References cs, c_block::size, and c_block::vector.

◆ c_last()

c_block_t * c_last ( cdrom_paranoia_t p)

◆ c_next()

c_block_t * c_next ( c_block_t c)

◆ c_overwrite()

void c_overwrite ( c_block_t v,
long  pos,
int16_t *  b,
long  size 
)

References cs, and c_block::vector.

◆ c_prev()

c_block_t * c_prev ( c_block_t c)

◆ c_remove()

void c_remove ( c_block_t v,
long  cutpos,
long  cutsize 
)

References cs, c_block::size, and c_block::vector.

Referenced by c_removef().

◆ c_removef()

void c_removef ( c_block_t v,
long  cut 
)

References c_block::begin, and c_remove().

◆ c_set()

void c_set ( c_block_t v,
long  begin 
)

References c_block::begin.

◆ copy_list()

linked_list_t * copy_list ( linked_list_t p_list)

◆ free_c_block()

void free_c_block ( c_block_t c)

◆ free_elem()

void free_elem ( linked_element e,
int  free_ptr 
)

◆ free_list()

void free_list ( linked_list_t list,
int  free_ptr 
)

References free_elem(), and linked_list_t::head.

◆ free_v_fragment()

void free_v_fragment ( v_fragment_t c)

References v_fragment_s::e, and free_elem().

Referenced by free_c_block().

◆ get_elem()

void * get_elem ( linked_element e)

References linked_element::ptr.

◆ i_cblock_destructor()

void i_cblock_destructor ( c_block_t c)

◆ i_paranoia_firstlast()

void i_paranoia_firstlast ( cdrom_paranoia_t p)

Get the beginning and ending sector bounds given cursor position.

There are a couple of subtle differences between this and the cdda_firsttrack_sector and cdda_lasttrack_sector. If the cursor is an a sector later than cdda_firsttrack_sector, that sectur will be used. As for the difference between cdda_lasttrack_sector, if the CD is mixed and there is a data track after the cursor but before the last audio track, the end of the audio sector before that is used.

◆ new_c_block()

c_block_t * new_c_block ( cdrom_paranoia_t p)

◆ new_elem()

linked_element * new_elem ( linked_list_t list)

◆ new_list()

linked_list_t * new_list ( void *(*)(void)  new_fn,
void(*)(void *)  free 
)

◆ new_v_fragment()

v_fragment_t * new_v_fragment ( cdrom_paranoia_t p,
c_block_t one,
long int  begin,
long int  end,
int  lastsector 
)

◆ recover_cache()

void recover_cache ( cdrom_paranoia_t p)

◆ v_buffer()

int16_t * v_buffer ( v_fragment_t v)

◆ v_first()

v_fragment_t * v_first ( cdrom_paranoia_t p)

Referenced by free_c_block().

◆ v_last()

v_fragment_t * v_last ( cdrom_paranoia_t p)

◆ v_next()

v_fragment_t * v_next ( v_fragment_t v)

◆ v_prev()

v_fragment_t * v_prev ( v_fragment_t v)