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)  

stream.h File Reference
#include "fsource.h"
Include dependency graph for stream.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  FSrcStreamData
 

Functions

void iso_stream_get_file_name (IsoStream *stream, char *name)
 
int iso_file_source_stream_new (IsoFileSource *src, IsoStream **stream)
 
int iso_cut_out_stream_new (IsoFileSource *src, off_t offset, off_t size, IsoStream **stream)
 
int iso_stream_get_src_zf (IsoStream *stream, uint8_t zisofs_algo[2], int *header_size_div4, int *block_size_log2, uint64_t *uncompressed_size, int flag)
 
int iso_stream_set_image_ino (IsoStream *stream, ino_t ino, int flag)
 
int iso_stream_read_buffer (IsoStream *stream, char *buf, size_t count, size_t *got)
 
int iso_stream_make_md5 (IsoStream *stream, char md5[16], int flag)
 
int iso_stream_clone_filter_common (IsoStream *old_stream, IsoStream **new_stream, IsoStream **new_input, int flag)
 
int iso_stream_destroy_cmpranks (int flag)
 

Function Documentation

◆ iso_cut_out_stream_new()

int iso_cut_out_stream_new ( IsoFileSource src,
off_t  offset,
off_t  size,
IsoStream **  stream 
)

Create a new stream to read a chunk of an IsoFileSource.. The stream will add a ref. to the IsoFileSource.

Returns
1 success, < 0 error

Definition at line 507 of file stream.c.

References cut_out_serial_id, cut_out_stream_class, cut_out_stream::dev_id, cut_out_stream::ino_id, ISO_FILE_OFFSET_TOO_BIG, iso_file_source_access(), iso_file_source_ref(), iso_file_source_stat(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, ISO_WRONG_ARG_VALUE, MIN, cut_out_stream::offset, cut_out_stream::size, and cut_out_stream::src.

Referenced by iso_tree_add_new_cut_out_node().

◆ iso_file_source_stream_new()

int iso_file_source_stream_new ( IsoFileSource src,
IsoStream **  stream 
)

Create a stream to read from a IsoFileSource. The stream will take the ref. to the IsoFileSource, so after a successfully execution of this function, you must not unref() the source, unless you take an extra ref.

Returns
1 success, < 0 error Possible errors:

Definition at line 225 of file stream.c.

References FSrcStreamData::dev_id, fsrc_stream_class, iso_filesystem::get_id, FSrcStreamData::ino_id, ISO_FILE_IS_DIR, iso_file_source_access(), iso_file_source_get_filesystem(), iso_file_source_stat(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, serial_id, FSrcStreamData::size, and FSrcStreamData::src.

Referenced by default_create_file(), default_create_node(), and image_builder_create_node().

◆ iso_stream_clone_filter_common()

int iso_stream_clone_filter_common ( IsoStream old_stream,
IsoStream **  new_stream,
IsoStream **  new_input,
int  flag 
)

Create a clone of the input stream of old_stream and a roughly initialized clone of old_stream which has the same class and refcount 1. Its data pointer will be NULL and needs to be filled by an expert which knows how to clone the data of old_stream.

Parameters
old_streamThe existing stream which is in process of cloning
new_streamWill return the uninitialized memory object which shall later become the clone of old_stream.
new_inputThe clone of the input stream of old stream.
flagSubmit 0 for now.
Returns
ISO_SUCCESS or an error code <0

Definition at line 1292 of file stream.c.

References iso_stream::class, iso_stream::data, ISO_OUT_OF_MEM, iso_stream_clone(), iso_stream_get_input_stream(), ISO_STREAM_NO_CLONE, ISO_SUCCESS, and iso_stream::refcount.

Referenced by extf_clone_stream(), gzip_clone_stream(), and ziso_clone_stream().

◆ iso_stream_destroy_cmpranks()

int iso_stream_destroy_cmpranks ( int  flag)

Dispose the internal list of stream class cmp_ino() functions. It is a static global of stream.c, created and used by iso_stream_cmp_ino(). This function is supposed to be called by iso_finish() only.

Definition at line 1028 of file stream.c.

References ISO_SUCCESS, LIBISO_FREE_MEM, iso_streamcmprank::next, and streamcmpranks.

Referenced by iso_finish().

◆ iso_stream_get_file_name()

void iso_stream_get_file_name ( IsoStream stream,
char *  name 
)

Get an identifier for the file of the source, for debug purposes

Parameters
nameMust provide at least PATH_MAX bytes. If no PATH_MAX is defined then assume PATH_MAX = Libisofs_default_path_maX from libisofs.h

Definition at line 841 of file stream.c.

References iso_stream::class, iso_stream::data, iso_file_source_get_path(), PATH_MAX, FSrcStreamData::src, and IsoStream_Iface::type.

Referenced by iso_filesrc_write_data().

◆ iso_stream_get_src_zf()

int iso_stream_get_src_zf ( IsoStream stream,
uint8_t  zisofs_algo[2],
int *  header_size_div4,
int *  block_size_log2,
uint64_t *  uncompressed_size,
int  flag 
)

Obtain eventual zisofs ZF field entry parameters from a file source out of a loaded ISO image. To make hope for non-zero reply the stream has to be the original stream of an IsoFile with .from_old_session==1. The call is safe with any stream type, though, unless fsrc_stream_class would be used without FSrcStreamData.

Returns
1= returned parameters are valid, 0=no ZF info found , <0 error

Definition at line 293 of file stream.c.

References iso_stream::class, iso_stream::data, fsrc_stream_class, iso_ifs_source_get_zf(), and FSrcStreamData::src.

Referenced by add_zf_field().

◆ iso_stream_make_md5()

int iso_stream_make_md5 ( IsoStream stream,
char  md5[16],
int  flag 
)

◆ iso_stream_read_buffer()

int iso_stream_read_buffer ( IsoStream stream,
char *  buf,
size_t  count,
size_t *  got 
)

Read the full required amount of data unless error or EOF occurs. Fill missing bytes by 0s.

Parameters
countRequired amount
gotReturns number of actually read bytes
Returns
1 no problem encountered, 0 EOF encountered, < 0 error
1 ok, 0 EOF, < 0 error

Definition at line 1197 of file stream.c.

References iso_stream_read().

Referenced by filesrc_read(), and iso_stream_make_md5().

◆ iso_stream_set_image_ino()

int iso_stream_set_image_ino ( IsoStream stream,
ino_t  ino,
int  flag 
)

Set the inode number of a stream that is based on FSrcStreamData, i.e. stems from the imported ISO image.

Returns
1 = ok , 0 = not an ISO image stream , <0 = error

Definition at line 923 of file stream.c.

References iso_stream::class, iso_stream::data, fsrc_stream_class, FSrcStreamData::ino_id, ISO_NULL_POINTER, and iso_stream_get_input_stream().

Referenced by iso_node_set_ino().