xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

file.h
Go to the documentation of this file.
1 /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
2 
3 /* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
4  Copyright (c) 2006 - 2017 Thomas Schmitt <scdbackup@gmx.net>
5  Provided under GPL version 2 or later.
6 */
7 
8 #ifndef BURN__FILE_H
9 #define BURN__FILE_H
10 
12 {
13  char magic[4];
14 
15  int datafd;
16  int subfd;
17  off_t fixed_size;
18 };
19 
20 /* ts A70126 : burn_source_file obsoleted burn_source_fd */
21 
22 
23 /* ts A70930 */
25  char magic[4];
26 
27  /* The fifo stays inactive and unequipped with eventual resources
28  until its read() method is called for the first time.
29  Only then burn_fifo_start() gets called, allocates the complete
30  resources, starts a thread with burn_fifo_source_shoveller()
31  which shovels data and finally destroys the resources.
32  This late start is to stay modest in case of multiple tracks
33  in one disc.
34  */
36 
37  void *thread_handle; /* actually a pointer to a thread_t */
40 
41  /* The shoveller aborts if this is 1. Resource leaks are possible. */
42  volatile int do_abort;
43 
44  /* the burn_source for which this fifo is acting as proxy */
45  struct burn_source *inp;
47 
48  /* <<< up to now it was only a pipe. This is on its way out. */
49  int outlet[2];
50 
51  /* The ring buffer mechanism */
52  int chunksize;
53  int chunks;
54  char *buf;
55  volatile int buf_writepos;
56  volatile int buf_readpos;
57  volatile int end_of_input;
58  volatile int input_error;
59  volatile int end_of_consumption;
60 
61  off_t in_counter;
62  off_t out_counter;
63 
70 
71 };
72 
73 
74 /** The worker behind the fifo thread.
75  Gets started from burn_fifo_start() in async.c
76 */
77 int burn_fifo_source_shoveller(struct burn_source *source, int flag);
78 
79 
80 /* ts B00922 */
82 
83  /* See burn_offst_source_new() */
84  struct burn_source *inp;
85  struct burn_source *prev;
86  off_t start;
87  off_t size;
89 
90  /* for set_size/get_size */
92 
93  /* To help offst_free() */
94  struct burn_source *next;
95 
96  /* The current reading position */
97  int running;
98  off_t pos;
99 
100 };
101 
102 #endif /* LIBBURN__FILE_H */
int burn_fifo_source_shoveller(struct burn_source *source, int flag)
Definition: file.c:369
int put_counter
Definition: file.h:66
off_t in_counter
Definition: file.h:61
int get_counter
Definition: file.h:67
int chunks
Definition: file.h:53
volatile int end_of_input
Definition: file.h:57
int outlet[2]
Definition: file.h:49
int chunksize
Definition: file.h:52
volatile int input_error
Definition: file.h:58
struct burn_source * inp
Definition: file.h:45
volatile int do_abort
Definition: file.h:42
int thread_is_valid
Definition: file.h:39
void * thread_handle
Definition: file.h:37
volatile int end_of_consumption
Definition: file.h:59
volatile int buf_readpos
Definition: file.h:56
int inp_read_size
Definition: file.h:46
volatile int buf_writepos
Definition: file.h:55
int is_started
Definition: file.h:35
int total_min_fill
Definition: file.h:64
int interval_min_fill
Definition: file.h:65
char magic[4]
Definition: file.h:25
int empty_counter
Definition: file.h:68
char * buf
Definition: file.h:54
int thread_pid
Definition: file.h:38
int full_counter
Definition: file.h:69
off_t out_counter
Definition: file.h:62
off_t fixed_size
Definition: file.h:17
char magic[4]
Definition: file.h:13
int datafd
Definition: file.h:15
struct burn_source * inp
Definition: file.h:84
int size_adjustable
Definition: file.h:88
int nominal_size
Definition: file.h:91
off_t start
Definition: file.h:86
struct burn_source * next
Definition: file.h:94
off_t pos
Definition: file.h:98
off_t size
Definition: file.h:87
struct burn_source * prev
Definition: file.h:85