/*! Get format of track. */ static track_format_t _cdio_get_track_format(void *p_obj, track_t i_track) { _img_private_t *p_env = p_obj; if ( !p_env ) return TRACK_FORMAT_ERROR; if (!p_env->gen.toc_init) if (!read_toc_win32 (p_env)) return TRACK_FORMAT_ERROR; if ( i_track < p_env->gen.i_first_track || i_track >= p_env->gen.i_tracks + p_env->gen.i_first_track ) return TRACK_FORMAT_ERROR; return get_track_format_win32ioctl(p_env, i_track); }
/*! Return the starting MSF (minutes/secs/frames) for track number i_tracks in obj. Track numbers start at 1. The "leadout" track is specified either by using i_tracks LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static bool _cdio_get_track_msf(void *p_user_data, track_t i_tracks, msf_t *p_msf) { _img_private_t *p_env = p_user_data; if (!p_msf) return false; if (!p_env->gen.toc_init) if (!read_toc_win32 (p_env)) return false; if (i_tracks == CDIO_CDROM_LEADOUT_TRACK) i_tracks = p_env->gen.i_tracks+1; if (i_tracks > p_env->gen.i_tracks+1 || i_tracks == 0) { return false; } else { cdio_lsn_to_msf(p_env->tocent[i_tracks-1].start_lsn, p_msf); return true; } }
/*! Get format of track. */ static track_format_t _cdio_get_track_format(void *p_obj, track_t i_track) { _img_private_t *p_env = p_obj; if ( !p_env ) return TRACK_FORMAT_ERROR; if (!p_env->gen.toc_init) if (!read_toc_win32 (p_env)) return TRACK_FORMAT_ERROR; if ( i_track < p_env->gen.i_first_track || i_track >= p_env->gen.i_tracks + p_env->gen.i_first_track ) return TRACK_FORMAT_ERROR; #if !(defined (WIN32) || defined (_XBOX)) if( p_env->hASPI ) { return get_track_format_aspi(p_env, i_track); } else { return get_track_format_win32ioctl(p_env, i_track); } #else return get_track_format_win32ioctl(p_env, i_track); #endif }