libcdio-paranoia 10.2+2.0.2
Functions
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>

Functions

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

◆ add_elem()

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

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 p_list)

◆ new_list()

linked_list_t * new_list ( void *(*)(void)  newp,
void(*)(void *)  freep 
)

◆ new_v_fragment()

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

◆ paranoia_cachemodel_size()

int paranoia_cachemodel_size ( cdrom_paranoia_t p,
int  sectors 
)

◆ paranoia_init()

cdrom_paranoia_t * paranoia_init ( cdrom_drive_t d)

◆ paranoia_set_range()

void paranoia_set_range ( cdrom_paranoia_t p,
long  start,
long  end 
)

◆ 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)