Implemented a simple fifo to decouple from burn_source signals

This commit is contained in:
2007-09-30 21:24:55 +00:00
parent 97403bb20e
commit 214de7d7df
6 changed files with 255 additions and 3 deletions

View File

@@ -10,8 +10,45 @@ struct burn_source_file
off_t fixed_size;
};
/* ts A70126 : burn_source_file obsoleted burn_source_fd */
/* ts A70930 */
struct burn_source_fifo {
/* The fifo stays inactive and unequipped with eventual resources
until its read() method is called for the first time.
Only then burn_fifo_start() gets called, allocates the complete
resources, starts a thread with burn_fifo_source_shuffler()
which shuffles data and finally destroys the resources.
This late start is to stay modest in case of multiple tracks
in one disc.
*/
int is_started;
int thread_pid;
int thread_pid_valid;
/* the burn_source for which this fifo is acting as proxy */
struct burn_source *inp;
/* <<< currently it is only a pipe */
int outlet[2];
/* >>> later it will be a ring buffer mechanism */
int chunksize;
int chunks;
char *buf;
off_t in_counter;
off_t out_counter;
};
/** The worker behind the fifo thread.
Gets started from burn_fifo_start() in async.c
*/
int burn_fifo_source_shuffler(struct burn_source *source, int flag);
#endif /* LIBBURN__FILE_H */