Logo Search packages:      
Sourcecode: vcdimager version File versions

unsigned int vcdinfo_get_track_size ( const vcdinfo_obj_t *  obj,
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.

Return size in bytes for track number for entry n in obj.

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.

Definition at line 1413 of file info.c.

References vcdinfo_get_track_lba(), vcdinfo_get_track_size(), and VCDINFO_INVALID_TRACK.

Referenced by vcdinfo_get_track_size().

{
  if (NULL == obj || VCDINFO_INVALID_TRACK == track_num) 
    return 0;
  
  {
    iso9660_stat_t statbuf;
    const lsn_t lsn = cdio_lba_to_lsn(vcdinfo_get_track_lba(obj, track_num));
    
    /* Try to get the sector count from the ISO 9660 filesystem */
    if (obj->has_xa && iso9660_find_fs_lsn(obj->img, lsn)) {
      return statbuf.size;
    } 
#if 0
    else {
      /* Failed on ISO 9660 filesystem. Use track information.  */
      if (obj->img != NULL) 
        return cdio_get_track_size(obj->img);
    }
#endif 
  }
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index