libcdio-paranoia  10.2+0.94+2git
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


#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 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


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


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


Referenced by paranoia_init().

#define cb (   v)    (v->begin)
#define ce (   v)    (v->begin+v->size)
#define cs (   v)    (v->size)
#define cv (   c)    (c->vector)

Referenced by v_buffer().

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

Referenced by offset_adjust_settings().

#define fe (   f)    (f->begin+f->size)
#define fs (   f)    (f->size)
#define fv (   f)    (v_buffer(f))
#define JIGGLE_MODULO   15 /* sectors */

Referenced by paranoia_init(), and paranoia_seek().

#define linked_list   linked_list_t

For compatibility with good ol' paranoia

#define max (   x,
)    ((x)<(y)?(y):(x))
#define MAX_SECTOR_OVERLAP   32 /* sectors */
#define min (   x,
)    ((x)>(y)?(y):(x))
#define MIN_SECTOR_BACKUP   16 /* sectors */
#define MIN_SECTOR_EPSILON   128 /* words */

Referenced by offset_adjust_settings().

#define MIN_SILENCE_BOUNDARY   1024 /* 16 bit words */
#define MIN_WORDS_OVERLAP   64 /* 16 bit words */

Referenced by i_paranoia_trim(), and paranoia_seek().

#define MIN_WORDS_RIFT   16 /* 16 bit words */
#define MIN_WORDS_SEARCH   64 /* 16 bit words */

Typedef Documentation

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

Function Documentation

linked_element* add_elem ( linked_list_t list,
void *  elem 
c_block_t* c_alloc ( int16_t *  vector,
long  begin,
long  size 
void c_append ( c_block_t v,
int16_t *  vector,
long  size 

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

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

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

c_block_t* c_last ( cdrom_paranoia_t p)
c_block_t* c_next ( c_block_t c)
void c_overwrite ( c_block_t v,
long  pos,
int16_t *  b,
long  size 

References cs, and c_block::vector.

c_block_t* c_prev ( c_block_t c)
void c_remove ( c_block_t v,
long  cutpos,
long  cutsize 

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

Referenced by c_removef().

void c_removef ( c_block_t v,
long  cut 

References c_block::begin, and c_remove().

Referenced by i_paranoia_trim().

void c_set ( c_block_t v,
long  begin 

References c_block::begin.

Referenced by offset_adjust_settings().

linked_list_t* copy_list ( linked_list_t p_list)
void free_c_block ( c_block_t c)
void free_elem ( linked_element e,
int  free_ptr 
void free_list ( linked_list_t list,
int  free_ptr 

References free_elem(), and linked_list_t::head.

Referenced by paranoia_free().

void free_v_fragment ( v_fragment_t c)

References v_fragment_s::e, and free_elem().

Referenced by free_c_block(), and paranoia_resetcache().

void* get_elem ( linked_element e)

References linked_element::ptr.

void i_cblock_destructor ( c_block_t c)
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.

References cdda_disc_firstsector(), cdda_disc_lastsector(), cdda_sector_gettrack(), cdda_track_audiop(), cdda_track_firstsector(), cdda_track_lastsector(), cdrom_paranoia_s::current_firstsector, cdrom_paranoia_s::current_lastsector, cdrom_paranoia_s::cursor, cdrom_paranoia_s::d, and cdrom_drive_s::p_cdio.

Referenced by paranoia_init(), and paranoia_seek().

c_block_t* new_c_block ( cdrom_paranoia_t p)
linked_element* new_elem ( linked_list_t list)

References add_elem(), and linked_list_t::new_poly.

Referenced by new_c_block(), and new_v_fragment().

linked_list_t* new_list ( void *(*)(void)  new_fn,
void(*)(void *)  free 
v_fragment_t* new_v_fragment ( cdrom_paranoia_t p,
c_block_t one,
long int  begin,
long int  end,
int  lastsector 
void recover_cache ( cdrom_paranoia_t p)
int16_t* v_buffer ( v_fragment_t v)
v_fragment_t* v_first ( cdrom_paranoia_t p)
v_fragment_t* v_last ( cdrom_paranoia_t p)
v_fragment_t* v_next ( v_fragment_t v)
v_fragment_t* v_prev ( v_fragment_t v)