Corrected display of track number offset with -toc and -minfo
This commit is contained in:
parent
87b816085f
commit
2145161863
@ -4803,6 +4803,7 @@ int Cdrskin_toc(struct CdrskiN *skin, int flag)
|
|||||||
{
|
{
|
||||||
int num_sessions= 0,num_tracks= 0,lba= 0,track_count= 0,total_tracks= 0;
|
int num_sessions= 0,num_tracks= 0,lba= 0,track_count= 0,total_tracks= 0;
|
||||||
int session_no, track_no, pmin, psec, pframe, ret, final_ret= 1;
|
int session_no, track_no, pmin, psec, pframe, ret, final_ret= 1;
|
||||||
|
int track_offset = 1;
|
||||||
struct burn_drive *drive;
|
struct burn_drive *drive;
|
||||||
struct burn_disc *disc= NULL;
|
struct burn_disc *disc= NULL;
|
||||||
struct burn_session **sessions;
|
struct burn_session **sessions;
|
||||||
@ -4838,19 +4839,26 @@ int Cdrskin_toc(struct CdrskiN *skin, int flag)
|
|||||||
goto cannot_read;
|
goto cannot_read;
|
||||||
}
|
}
|
||||||
sessions= burn_disc_get_sessions(disc,&num_sessions);
|
sessions= burn_disc_get_sessions(disc,&num_sessions);
|
||||||
|
if(num_sessions > 0)
|
||||||
|
track_offset = burn_session_get_start_tno(sessions[0], 0);
|
||||||
|
if(track_offset <= 0)
|
||||||
|
track_offset= 1;
|
||||||
if(flag&1) {
|
if(flag&1) {
|
||||||
for(session_no= 0; session_no<num_sessions; session_no++) {
|
for(session_no= 0; session_no<num_sessions; session_no++) {
|
||||||
tracks= burn_session_get_tracks(sessions[session_no],&num_tracks);
|
tracks= burn_session_get_tracks(sessions[session_no],&num_tracks);
|
||||||
total_tracks+= num_tracks;
|
total_tracks+= num_tracks;
|
||||||
}
|
}
|
||||||
printf("first: 1 last %d\n",total_tracks);
|
printf("first: %d last %d\n",
|
||||||
|
track_offset, total_tracks + track_offset - 1);
|
||||||
}
|
}
|
||||||
for(session_no= 0; session_no<num_sessions; session_no++) {
|
for(session_no= 0; session_no<num_sessions; session_no++) {
|
||||||
tracks= burn_session_get_tracks(sessions[session_no],&num_tracks);
|
tracks= burn_session_get_tracks(sessions[session_no],&num_tracks);
|
||||||
if(tracks==NULL)
|
if(tracks==NULL)
|
||||||
continue;
|
continue;
|
||||||
if(!(flag&1))
|
if(!(flag&1))
|
||||||
printf("first: %d last: %d\n",track_count+1,track_count+num_tracks);
|
printf("first: %d last: %d\n",
|
||||||
|
track_count + track_offset,
|
||||||
|
track_count + num_tracks + track_offset - 1);
|
||||||
for(track_no= 0; track_no<num_tracks; track_no++) {
|
for(track_no= 0; track_no<num_tracks; track_no++) {
|
||||||
track_count++;
|
track_count++;
|
||||||
burn_track_get_entry(tracks[track_no], &toc_entry);
|
burn_track_get_entry(tracks[track_no], &toc_entry);
|
||||||
@ -4865,8 +4873,8 @@ int Cdrskin_toc(struct CdrskiN *skin, int flag)
|
|||||||
}
|
}
|
||||||
if(track_no==0 && burn_session_get_hidefirst(sessions[session_no]))
|
if(track_no==0 && burn_session_get_hidefirst(sessions[session_no]))
|
||||||
printf("cdrskin: NOTE : first track is marked as \"hidden\".\n");
|
printf("cdrskin: NOTE : first track is marked as \"hidden\".\n");
|
||||||
printf("track: %2d lba: %9d (%9d) %2.2d:%2.2d:%2.2d",track_count,
|
printf("track: %2d lba: %9d (%9d) %2.2d:%2.2d:%2.2d",
|
||||||
lba,4*lba,pmin,psec,pframe);
|
track_count + track_offset - 1, lba, 4 * lba, pmin, psec, pframe);
|
||||||
printf(" adr: %d control: %d",toc_entry.adr,toc_entry.control);
|
printf(" adr: %d control: %d",toc_entry.adr,toc_entry.control);
|
||||||
|
|
||||||
/* >>> From where does cdrecord take "mode" ? */
|
/* >>> From where does cdrecord take "mode" ? */
|
||||||
@ -4947,7 +4955,7 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
|
|||||||
{
|
{
|
||||||
int num_sessions= 0,num_tracks= 0,lba= 0,track_count= 0,total_tracks= 0;
|
int num_sessions= 0,num_tracks= 0,lba= 0,track_count= 0,total_tracks= 0;
|
||||||
int session_no, track_no, pmin, psec, pframe, ret, size= 0, nwa= 0;
|
int session_no, track_no, pmin, psec, pframe, ret, size= 0, nwa= 0;
|
||||||
int last_leadout= 0, ovwrt_full= 0;
|
int last_leadout= 0, ovwrt_full= 0, track_offset= 1;
|
||||||
struct burn_drive *drive;
|
struct burn_drive *drive;
|
||||||
struct burn_disc *disc= NULL;
|
struct burn_disc *disc= NULL;
|
||||||
struct burn_session **sessions= NULL;
|
struct burn_session **sessions= NULL;
|
||||||
@ -5017,8 +5025,12 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
|
|||||||
ftils= ltils= 1;
|
ftils= ltils= 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
first_track= 1;
|
|
||||||
sessions= burn_disc_get_sessions(disc, &num_sessions);
|
sessions= burn_disc_get_sessions(disc, &num_sessions);
|
||||||
|
if(num_sessions > 0)
|
||||||
|
track_offset= burn_session_get_start_tno(sessions[0], 0);
|
||||||
|
if(track_offset <= 0)
|
||||||
|
track_offset= 1;
|
||||||
|
first_track= track_offset;
|
||||||
nominal_sessions= num_sessions;
|
nominal_sessions= num_sessions;
|
||||||
if(s == BURN_DISC_APPENDABLE)
|
if(s == BURN_DISC_APPENDABLE)
|
||||||
nominal_sessions++;
|
nominal_sessions++;
|
||||||
@ -5038,8 +5050,8 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
|
|||||||
}
|
}
|
||||||
printf("first track: %d\n", first_track);
|
printf("first track: %d\n", first_track);
|
||||||
printf("number of sessions: %d\n", nominal_sessions);
|
printf("number of sessions: %d\n", nominal_sessions);
|
||||||
printf("first track in last sess: %d\n", ftils);
|
printf("first track in last sess: %d\n", ftils + track_offset - 1);
|
||||||
printf("last track in last sess: %d\n", ltils);
|
printf("last track in last sess: %d\n", ltils + track_offset - 1);
|
||||||
|
|
||||||
burn_disc_get_cd_info(drive, disc_type, &disc_id, bar_code, &app_code,
|
burn_disc_get_cd_info(drive, disc_type, &disc_id, bar_code, &app_code,
|
||||||
&cd_info_valid);
|
&cd_info_valid);
|
||||||
@ -5110,7 +5122,7 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
|
|||||||
#endif /* Cdrskin_with_last_recorded_addresS */
|
#endif /* Cdrskin_with_last_recorded_addresS */
|
||||||
|
|
||||||
printf("%5d %5d %-6s %-10d %-10d %-10d\n",
|
printf("%5d %5d %-6s %-10d %-10d %-10d\n",
|
||||||
track_count, session_no + 1,
|
track_count + track_offset - 1, session_no + 1,
|
||||||
((toc_entry.control&7)<4) ? "Audio" : "Data", lba, lra, size);
|
((toc_entry.control&7)<4) ? "Audio" : "Data", lba, lra, size);
|
||||||
|
|
||||||
last_leadout= lba + size;
|
last_leadout= lba + size;
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2012.01.08.141104"
|
#define Cdrskin_timestamP "2012.01.08.154822"
|
||||||
|
Loading…
Reference in New Issue
Block a user