libcdio-paranoia  10.2+0.94+2git
p_block.c File Reference
#include <stdio.h>
#include <limits.h>
#include "p_block.h"
#include <cdio/paranoia/cdda.h>
#include <cdio/paranoia/paranoia.h>


linked_list_tnew_list (void *(*newp)(void), void(*freep)(void *))
linked_elementadd_elem (linked_list_t *l, void *elem)
linked_elementnew_elem (linked_list_t *p_list)
void free_elem (linked_element *e, int free_ptr)
void free_list (linked_list_t *list, int free_ptr)
void * get_elem (linked_element *e)
linked_list_tcopy_list (linked_list_t *list)
void i_cblock_destructor (c_block_t *c)
c_block_tnew_c_block (cdrom_paranoia_t *p)
void free_c_block (c_block_t *c)
v_fragment_tnew_v_fragment (cdrom_paranoia_t *p, c_block_t *one, long int begin, long int end, int last)
void free_v_fragment (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)
void recover_cache (cdrom_paranoia_t *p)
int16_t * v_buffer (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 i_paranoia_firstlast (cdrom_paranoia_t *p)
cdrom_paranoia_tparanoia_init (cdrom_drive_t *d)
void paranoia_set_range (cdrom_paranoia_t *p, long start, long end)
int paranoia_cachemodel_size (cdrom_paranoia_t *p, int sectors)

Function Documentation

linked_element* add_elem ( linked_list_t l,
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 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 v)

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 p_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)  newp,
void(*)(void *)  freep 
v_fragment_t* new_v_fragment ( cdrom_paranoia_t p,
c_block_t one,
long int  begin,
long int  end,
int  last 
int paranoia_cachemodel_size ( cdrom_paranoia_t p,
int  sectors 

References cdrom_paranoia_s::cdcache_size.

Referenced by analyze_cache().

cdrom_paranoia_t* paranoia_init ( cdrom_drive_t d)
void paranoia_set_range ( cdrom_paranoia_t p,
long  start,
long  end 
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)