Reporting BD speed units with pacifier rather than DVD units
This commit is contained in:
parent
f9740b5aeb
commit
327412eb54
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2008.11.29.214208"
|
#define Xorriso_timestamP "2008.11.30.095007"
|
||||||
|
@ -1033,7 +1033,7 @@ int Xorriso_auto_format(struct XorrisO *xorriso, int flag)
|
|||||||
*/
|
*/
|
||||||
int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||||
{
|
{
|
||||||
int ret, relax= 0, i;
|
int ret, relax= 0, i, pacifier_speed= 0;
|
||||||
int major, minor, micro;
|
int major, minor, micro;
|
||||||
char xorriso_id[256], *img_id, sfe[5*SfileadrL], *cpt;
|
char xorriso_id[256], *img_id, sfe[5*SfileadrL], *cpt;
|
||||||
struct isoburn_imgen_opts *sopts= NULL;
|
struct isoburn_imgen_opts *sopts= NULL;
|
||||||
@ -1050,11 +1050,12 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
|||||||
IsoNode *node;
|
IsoNode *node;
|
||||||
ElToritoBootImage *bootimg;
|
ElToritoBootImage *bootimg;
|
||||||
enum eltorito_boot_media_type emul_type= ELTORITO_NO_EMUL;
|
enum eltorito_boot_media_type emul_type= ELTORITO_NO_EMUL;
|
||||||
|
int profile_number;
|
||||||
|
char profile_name[80];
|
||||||
|
|
||||||
#ifdef NIX
|
#ifdef NIX
|
||||||
|
|
||||||
int profile, status, num_formats;
|
int profile, status, num_formats;
|
||||||
char profile_name[80];
|
|
||||||
off_t size;
|
off_t size;
|
||||||
unsigned dummy;
|
unsigned dummy;
|
||||||
|
|
||||||
@ -1124,6 +1125,12 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
|||||||
{ret= 0; goto ex;}
|
{ret= 0; goto ex;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ret= Xorriso_get_profile(xorriso, &profile_number, profile_name, 2);
|
||||||
|
if(ret == 2)
|
||||||
|
pacifier_speed= 1;
|
||||||
|
else if(ret == 1 && (profile_number == 0x41 || profile_number == 0x42 ||
|
||||||
|
profile_number == 0x43))
|
||||||
|
pacifier_speed= 2;
|
||||||
|
|
||||||
ret= isoburn_igopt_new(&sopts, 0);
|
ret= isoburn_igopt_new(&sopts, 0);
|
||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
@ -1394,7 +1401,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
|||||||
isoburn_disc_write(burn_options, disc);
|
isoburn_disc_write(burn_options, disc);
|
||||||
burn_write_opts_free(burn_options);
|
burn_write_opts_free(burn_options);
|
||||||
|
|
||||||
ret= Xorriso_pacifier_loop(xorriso, drive, 0);
|
ret= Xorriso_pacifier_loop(xorriso, drive, pacifier_speed << 4);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
goto ex;
|
goto ex;
|
||||||
if(!isoburn_drive_wrote_well(drive)) {
|
if(!isoburn_drive_wrote_well(drive)) {
|
||||||
@ -1502,6 +1509,7 @@ int Xorriso_check_burn_abort(struct XorrisO *xorriso, int flag)
|
|||||||
1= mkisofs
|
1= mkisofs
|
||||||
2= cdrecord
|
2= cdrecord
|
||||||
bit4= report speed in CD units
|
bit4= report speed in CD units
|
||||||
|
bit5= report speed in BD units
|
||||||
*/
|
*/
|
||||||
int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||||
int flag)
|
int flag)
|
||||||
@ -1526,6 +1534,8 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
|||||||
emul= xorriso->pacifier_style;
|
emul= xorriso->pacifier_style;
|
||||||
if(flag&16)
|
if(flag&16)
|
||||||
speed_factor= 150.0*1024;
|
speed_factor= 150.0*1024;
|
||||||
|
else if(flag & 32)
|
||||||
|
speed_factor= 4495625;
|
||||||
progress.sector= 0;
|
progress.sector= 0;
|
||||||
current_time= Sfile_microtime(0);
|
current_time= Sfile_microtime(0);
|
||||||
while(1) {
|
while(1) {
|
||||||
@ -7101,7 +7111,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
|||||||
char *track_source, off_t tsize, int flag)
|
char *track_source, off_t tsize, int flag)
|
||||||
{
|
{
|
||||||
int ret, fd, unpredicted_size, profile_number, is_cd= 0, dummy, nwa= -1;
|
int ret, fd, unpredicted_size, profile_number, is_cd= 0, dummy, nwa= -1;
|
||||||
int isosize= -1, do_isosize;
|
int isosize= -1, do_isosize, is_bd= 0;
|
||||||
|
|
||||||
struct burn_drive_info *dinfo;
|
struct burn_drive_info *dinfo;
|
||||||
struct burn_drive *drive;
|
struct burn_drive *drive;
|
||||||
@ -7238,6 +7248,8 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
|||||||
|
|
||||||
ret= Xorriso_get_profile(xorriso, &profile_number, profile_name, 2);
|
ret= Xorriso_get_profile(xorriso, &profile_number, profile_name, 2);
|
||||||
is_cd= (ret==2);
|
is_cd= (ret==2);
|
||||||
|
is_bd= (profile_number == 0x41 || profile_number == 0x42 ||
|
||||||
|
profile_number == 0x43);
|
||||||
|
|
||||||
if(isoburn_needs_emulation(drive)) {
|
if(isoburn_needs_emulation(drive)) {
|
||||||
if(flag&1) {
|
if(flag&1) {
|
||||||
@ -7282,7 +7294,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
|
|||||||
xorriso->run_state= 1; /* Indicate that burning has started */
|
xorriso->run_state= 1; /* Indicate that burning has started */
|
||||||
burn_disc_write(burn_options, disc);
|
burn_disc_write(burn_options, disc);
|
||||||
|
|
||||||
ret= Xorriso_pacifier_loop(xorriso, drive, 2|(is_cd<<4));
|
ret= Xorriso_pacifier_loop(xorriso, drive, 2 | (is_cd << 4) | (is_bd << 5));
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
goto ex;
|
goto ex;
|
||||||
if(!burn_drive_wrote_well(drive)) {
|
if(!burn_drive_wrote_well(drive)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user