📄 info.h
字号:
/*! Get the VCD info list. */ CdioList *vcdinfo_get_offset_list(const vcdinfo_obj_t *obj); /*! Get the VCD info extended offset list. */ CdioList *vcdinfo_get_offset_x_list(const vcdinfo_obj_t *obj); /*! Get the VCD info offset multiplier. */ unsigned int vcdinfo_get_offset_mult(const vcdinfo_obj_t *obj); /*! Get entry in offset list for the item that has offset. This entry has for example the LID. NULL is returned on error. */ vcdinfo_offset_t * vcdinfo_get_offset_t (const vcdinfo_obj_t *obj, unsigned int offset); /*! Return a string containing the VCD preparer id with trailing blanks removed, or NULL if there is some problem in getting this. */ const char * vcdinfo_get_preparer_id(const vcdinfo_obj_t *obj); /*! Get the PSD. */ uint8_t *vcdinfo_get_psd(const vcdinfo_obj_t *obj); /*! Get the extended PSD. */ uint8_t *vcdinfo_get_psd_x(const vcdinfo_obj_t *obj); /*! Return number of bytes in PSD. */ uint32_t vcdinfo_get_psd_size (const vcdinfo_obj_t *obj); /*! Return number of bytes in the extended PSD. */ uint32_t vcdinfo_get_psd_x_size (const vcdinfo_obj_t *obj); /*! Return a string containing the VCD publisher id with trailing blanks removed, or NULL if there is some problem in getting this. */ char * vcdinfo_get_publisher_id(const vcdinfo_obj_t *obj); /** \fn vcdinfo_get_return_offset(const vcdinfo_obj_t *obj); \brief Get return offset for a given LID. \return VCDINFO_INVALID_OFFSET is returned on error or if LID has no "return" entry. Otherwise the LID offset is returned. */ lid_t vcdinfo_get_return_offset(const vcdinfo_obj_t *obj, lid_t lid); /*! Return the audio type for a given segment. VCDINFO_INVALID_AUDIO_TYPE is returned on error. */ unsigned int vcdinfo_get_seg_audio_type(const vcdinfo_obj_t *obj, segnum_t seg_num); /*! Return true if this segment is supposed to continue to the next one, (is part of an "item" or listing in the ISO 9660 filesystem). */ bool vcdinfo_get_seg_continue(const vcdinfo_obj_t *obj, segnum_t seg_num); /*! Return the starting LBA (logical block address) for segment entry_num in obj. VCDINFO_NULL_LBA is returned if there is no entry. Note first seg_num is 0. */ lba_t vcdinfo_get_seg_lba(const vcdinfo_obj_t *obj, segnum_t seg_num); /*! Return the starting LSN (logical sector number) for segment entry_num in obj. VCDINFO_NULL_LBA is returned if there is no entry. Note first seg_num is 0. */ lsn_t vcdinfo_get_seg_lsn(const vcdinfo_obj_t *obj, segnum_t seg_num); /*! Return the starting MSF (minutes/secs/frames) for segment entry_num in obj. NULL is returned if there is no entry. Note first seg_num is 0. */ const msf_t * vcdinfo_get_seg_msf(const vcdinfo_obj_t *obj, segnum_t seg_num); /*! Return the number of sectors for segment entry_num in obj. 0 is returned if there is no entry. Use this routine to figure out the actual number of bytes a physical region of a disk or CD takes up for a segment. If an item has been broken up into a number of "continued" segments, we will report the item size for the first segment and 0 for the remaining ones. We may revisit this decision later. */ uint32_t vcdinfo_get_seg_sector_count(const vcdinfo_obj_t *obj, segnum_t seg_num); /*! Return a string containing the VCD system id with trailing blanks removed, or NULL if there is some problem in getting this. */ const char * vcdinfo_get_system_id(const vcdinfo_obj_t *obj); /*! Return the track number for entry n in obj. In contrast to libcdio we start numbering at 0 which is the ISO9660 and metadata information for the Video CD. Thus track 1 is the first track the first complete MPEG track generally. */ track_t vcdinfo_get_track(const vcdinfo_obj_t *obj, const unsigned int entry_num); /*! Return the audio type for a given track. VCDINFO_INVALID_AUDIO_TYPE is returned on error. Note: track 1 is usually the first track. */ unsigned int vcdinfo_get_track_audio_type(const vcdinfo_obj_t *obj, track_t track_num); /*! Return the starting LBA (logical block address) for track number track_num in obj. The IS0-9660 filesystem track has number 0. Tracks associated with playable entries numbers start at 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. VCDINFO_NULL_LBA is returned on failure. */ lba_t vcdinfo_get_track_lba(const vcdinfo_obj_t *obj, track_t track_num); /*! Return the starting LSN (logical sector number) for track number track_num in obj. The IS0-9660 filesystem track has number 0. Tracks associated with playable entries numbers start at 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. VCDINFO_NULL_LBA is returned on failure. */ lsn_t vcdinfo_get_track_lsn(const vcdinfo_obj_t *obj, track_t track_num); /*! Return the starting MSF (minutes/secs/frames) for track number track_num in obj. The IS0-9660 filesystem track has number 0. Tracks associated with playable entries numbers start at 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. VCDINFO_NULL_LBA is returned on failure. */ int vcdinfo_get_track_msf(const vcdinfo_obj_t *obj, track_t track_num, uint8_t *min, uint8_t *sec, uint8_t *frame); /*! Return the size in sectors for track n. The IS0-9660 filesystem track has number 1. Tracks associated with playable entries numbers start at 2. FIXME: Whether we count the track pregap sectors is a bit haphazard. We should add a parameter to indicate whether this is wanted or not. */ unsigned int vcdinfo_get_track_sect_count(const vcdinfo_obj_t *obj, const track_t track_num); /*! Return size in bytes for track number for entry n in obj. The IS0-9660 filesystem track has number 0. Tracks associated with playable entries numbers start at 1. FIXME: Do we count the track pregap sectors is a bit haphazard. We should add a parameter to indicate whether this is wanted or not. */ unsigned int vcdinfo_get_track_size(const vcdinfo_obj_t *obj, track_t track_num); /*! \brief Get the kind of video stream segment of segment seg_num in obj. \return VCDINFO_FILES_VIDEO_INVALID is returned if on error or obj is null. Otherwise the enumeration type. Note first seg_num is 0! */ vcdinfo_video_segment_type_t vcdinfo_get_video_type(const vcdinfo_obj_t *obj, segnum_t seg_num); /*! \brief Get the kind of VCD that obj refers to. */ vcd_type_t vcdinfo_get_VCD_type(const vcdinfo_obj_t *obj); /*! Return the VCD volume count - the number of CD's in the collection. O is returned if there is some problem in getting this. */ unsigned int vcdinfo_get_volume_count(const vcdinfo_obj_t *obj); /*! Return the VCD ID. NULL is returned if there is some problem in getting this. */ const char * vcdinfo_get_volume_id(const vcdinfo_obj_t *obj); /*! Return the VCD volumeset ID. NULL is returned if there is some problem in getting this. */ const char * vcdinfo_get_volumeset_id(const vcdinfo_obj_t *obj); /*! Return the VCD volume num - the number of the CD in the collection. This is a number between 1 and the volume count. O is returned if there is some problem in getting this. */ unsigned int vcdinfo_get_volume_num(const vcdinfo_obj_t *obj); int vcdinfo_get_wait_time (uint16_t wtime); /*! Return true if there is playback control. */ bool vcdinfo_has_pbc (const vcdinfo_obj_t *obj); /*! Return true if VCD has "extended attributes" (XA). Extended attributes add meta-data attributes to a entries of file describing the file. See also cdio_get_xa_attr_str() which returns a string similar to a string you might get on a Unix filesystem listing ("ls"). */ bool vcdinfo_has_xa(const vcdinfo_obj_t *obj); /*! Add one to the MSF. */ void vcdinfo_inc_msf (uint8_t *min, uint8_t *sec, int8_t *frame); /*! Convert minutes, seconds and frame (MSF components) into a logical block address (or LBA). See also msf_to_lba which uses msf_t as its single parameter. */ void vcdinfo_lba2msf (lba_t lba, uint8_t *min, uint8_t *sec, uint8_t *frame); /*! Get the item id for a given list ID. VCDINFO_REJECTED_MASK is returned on error or if obj is NULL. */ uint16_t vcdinfo_lid_get_itemid(const vcdinfo_obj_t *obj, lid_t lid); /*! \fn vcdinfo_lid_get_offset(const vcdinfo_obj_t *obj, unsigned int entry_num); \brief Get offset entry_num for a given LID. \return VCDINFO_INVALID_OFFSET is returned if obj on error or obj is NULL. Otherwise the LID offset is returned. */ uint16_t vcdinfo_lid_get_offset(const vcdinfo_obj_t *obj, lid_t lid, unsigned int entry_num); /*! Get the PSD Selection List Descriptor for a given lid. False is returned if not found. */ bool vcdinfo_lid_get_pxd(const vcdinfo_obj_t *obj, PsdListDescriptor_t *pxd, uint16_t lid); /*! Return the entry number closest and before the given LSN. */ unsigned int vcdinfo_lsn_get_entry(const vcdinfo_obj_t *obj, lsn_t lsn); /*! Convert minutes, seconds and frame (MSF components) into a logical block address (or LBA). See also msf_to_lba which uses msf_t as its single parameter. */ lba_t vcdinfo_msf2lba (uint8_t min, uint8_t sec, int8_t frame); /*! Convert minutes, seconds and frame (MSF components) into a logical sector number (or LSN). */ lsn_t vcdinfo_msf2lsn (uint8_t min, uint8_t sec, int8_t frame); const char * vcdinfo_ofs2str (const vcdinfo_obj_t *obj, unsigned int offset, bool ext); /*! Calls recursive routine to populate obj->offset_list or obj->offset_x_list by going through LOT. Returns false if there was some error. */ bool vcdinfo_visit_lot (vcdinfo_obj_t *obj, bool extended); bool vcdinfo_read_psd (vcdinfo_obj_t *obj); /*! \fn vcdinfo_selection_get_lid(const vcdinfo_obj_t *obj, lid_t lid, unsigned int selection); \brief Get the "default" lid of a selection for a given lid. Return the LID offset associated with a the selection number of the passed-in LID parameter. \return VCDINFO_INVALID_LID is returned if obj on error or obj is NULL. Otherwise the LID offset is returned. */ lid_t vcdinfo_selection_get_lid(const vcdinfo_obj_t *obj, lid_t lid, unsigned int selection); /*! \fn vcdinfo_selection_get_offset(const vcdinfo_obj_t *obj, lid_t lid, unsigned int selection); \brief Get offset of a selection for a given LID. Return the LID offset associated with a the selection number of the passed-in LID parameter. \return VCDINFO_INVALID_OFFSET is returned if obj on error or obj is NULL. Otherwise the LID offset is returned. */ uint16_t vcdinfo_selection_get_offset(const vcdinfo_obj_t *obj, lid_t lid, unsigned int selection); /*! Change trailing blanks in str to nulls. Str has a maximum size of n characters. */ const char * vcdinfo_strip_trail (const char str[], size_t n); /*! Return the entry number for the given track. */ unsigned int vcdinfo_track_get_entry(const vcdinfo_obj_t *obj, track_t track); /*! Initialize the vcdinfo structure "obj". Should be done before other routines using obj are called. */ bool vcdinfo_init(vcdinfo_obj_t *obj); /*! Set up vcdinfo structure "obj" for reading from a particular medium. This should be done before after initialization but before any routines that need to retrieve data. source_name is the device or file to use for inspection, and source_type indicates what driver to use or class of drivers in the case of DRIVER_DEVICE. access_mode gives the CD access method for reading should the driver allow for more than one kind of access method (e.g. MMC versus ioctl on GNU/Linux) If source_name is NULL we'll fill in the appropriate default device name for the given source_type. However if in addtion source_type is DRIVER_UNKNOWN, then we'll scan for a drive containing a VCD. VCDINFO_OPEN_VCD is returned if everything went okay; VCDINFO_OPEN_ERROR if there was an error and VCDINFO_OPEN_OTHER if the medium is something other than a VCD. */ vcdinfo_open_return_t vcdinfo_open(vcdinfo_obj_t **p_obj, char *source_name[], driver_id_t source_type, const char access_mode[]); /*! Dispose of any resources associated with vcdinfo structure "obj". Call this when "obj" it isn't needed anymore. True is returned is everything went okay, and false if not. */ bool vcdinfo_close(vcdinfo_obj_t *obj); /*! Return true if offset is "rejected". That is shouldn't be displayed in a list of entries. */ bool vcdinfo_is_rejected(uint16_t offset);/* Include lower-level access as well. */#include <libvcd/inf.h>#ifdef __cplusplus}#endif /* __cplusplus */#endif /*_VCD_INFO_H*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -