Win32 fixes for new CD-TEXT interface.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: aspi32.c,v 1.25 2004/07/17 02:43:41 rocky Exp $
|
||||
$Id: aspi32.c,v 1.26 2004/07/17 09:12:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: aspi32.c,v 1.25 2004/07/17 02:43:41 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: aspi32.c,v 1.26 2004/07/17 09:12:21 rocky Exp $";
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/sector.h>
|
||||
@@ -716,15 +716,8 @@ wnaspi32_eject_media (void *user_data) {
|
||||
return true on success, false on error or CD-TEXT information does
|
||||
not exist.
|
||||
*/
|
||||
/*!
|
||||
Get cdtext information for a CdIo object .
|
||||
|
||||
@param obj the CD object that may contain CD-TEXT information.
|
||||
@return the CD-TEXT object or NULL if obj is NULL
|
||||
or CD-TEXT information does not exist.
|
||||
*/
|
||||
static const cdtext_t *
|
||||
_init_cdtext_aspi (_img_private_t *env)
|
||||
bool
|
||||
init_cdtext_aspi (_img_private_t *env)
|
||||
{
|
||||
uint8_t wdata[5000] = { 0, };
|
||||
uint8_t scsi_cdb[10] = { 0, };
|
||||
@@ -801,27 +794,6 @@ _init_cdtext_aspi (_img_private_t *env)
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
Get cdtext information for a CdIo object .
|
||||
|
||||
@param obj the CD object that may contain CD-TEXT information.
|
||||
@return the CD-TEXT object or NULL if obj is NULL
|
||||
or CD-TEXT information does not exist.
|
||||
*/
|
||||
const cdtext_t *
|
||||
get_cdtext_aspi (_img_private_t *env, track_t i_track)
|
||||
{
|
||||
|
||||
env->b_cdtext_init = _init_cdtext_aspi(env);
|
||||
if (!env->b_cdtext_init) return NULL;
|
||||
|
||||
if (0 == i_track)
|
||||
return &(env->cdtext);
|
||||
else
|
||||
return &(env->cdtext_track[i_track-env->i_first_track]);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Return the the kind of drive capabilities of device.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Win32 aspi specific */
|
||||
/*
|
||||
$Id: aspi32.h,v 1.7 2004/07/16 01:25:59 rocky Exp $
|
||||
$Id: aspi32.h,v 1.8 2004/07/17 09:12:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -194,10 +194,13 @@ track_format_t get_track_format_aspi(const _img_private_t *env,
|
||||
*/
|
||||
bool init_aspi (_img_private_t *env);
|
||||
|
||||
/*!
|
||||
Return the CD-TEXT structure
|
||||
/*
|
||||
Read cdtext information for a CdIo object .
|
||||
|
||||
return true on success, false on error or CD-TEXT information does
|
||||
not exist.
|
||||
*/
|
||||
const cdtext_t *get_cdtext_aspi (_img_private_t *env);
|
||||
bool init_cdtext_aspi (_img_private_t *env);
|
||||
|
||||
const char *is_cdrom_aspi(const char drive_letter);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: win32.c,v 1.22 2004/07/17 02:43:41 rocky Exp $
|
||||
$Id: win32.c,v 1.23 2004/07/17 09:12:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: win32.c,v 1.22 2004/07/17 02:43:41 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: win32.c,v 1.23 2004/07/17 09:12:21 rocky Exp $";
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/sector.h>
|
||||
@@ -442,11 +442,17 @@ _get_cdtext_win32 (void *user_data, track_t i_track)
|
||||
&& i_track >= env->i_tracks + env->i_first_track ) )
|
||||
return NULL;
|
||||
|
||||
|
||||
if (env->hASPI) {
|
||||
return get_cdtext_aspi(env, i_track);
|
||||
env->b_cdtext_init = init_cdtext_aspi(env);
|
||||
} else
|
||||
return get_cdtext_win32ioctl(env, i_track);
|
||||
env->b_cdtext_init = init_cdtext_win32ioctl(env);
|
||||
|
||||
if (!env->b_cdtext_init) return NULL;
|
||||
|
||||
if (0 == i_track)
|
||||
return &(env->cdtext);
|
||||
else
|
||||
return &(env->tocent[i_track-env->i_first_track].cdtext);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -501,7 +507,7 @@ _cdio_get_num_tracks(void *user_data)
|
||||
Get format of track.
|
||||
*/
|
||||
static track_format_t
|
||||
_cdio_get_track_format(void *obj, track_t i_tracks)
|
||||
_cdio_get_track_format(void *obj, track_t i_track)
|
||||
{
|
||||
_img_private_t *env = obj;
|
||||
|
||||
@@ -511,9 +517,9 @@ _cdio_get_track_format(void *obj, track_t i_tracks)
|
||||
return TRACK_FORMAT_ERROR;
|
||||
|
||||
if( env->hASPI ) {
|
||||
return get_track_format_aspi(env, i_tracks);
|
||||
return get_track_format_aspi(env, i_track);
|
||||
} else {
|
||||
return get_track_format_win32ioctl(env, i_tracks);
|
||||
return get_track_format_win32ioctl(env, i_track);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: win32.h,v 1.10 2004/07/16 02:48:49 rocky Exp $
|
||||
$Id: win32.h,v 1.11 2004/07/17 09:12:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -105,14 +105,13 @@ bool read_toc_win32ioctl (_img_private_t *env);
|
||||
*/
|
||||
char *get_mcn_win32ioctl (const _img_private_t *env);
|
||||
|
||||
/*!
|
||||
Get cdtext information for a CdIo object .
|
||||
/*
|
||||
Read cdtext information for a CdIo object .
|
||||
|
||||
@param obj the CD object that may contain CD-TEXT information.
|
||||
@return the CD-TEXT object or NULL if obj is NULL
|
||||
or CD-TEXT information does not exist.
|
||||
return true on success, false on error or CD-TEXT information does
|
||||
not exist.
|
||||
*/
|
||||
const cdtext_t * get_cdtext_win32ioctl (_img_private_t *env);
|
||||
bool init_cdtext_win32ioctl (_img_private_t *env);
|
||||
|
||||
/*!
|
||||
Return the the kind of drive capabilities of device.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: win32_ioctl.c,v 1.14 2004/07/16 03:06:53 rocky Exp $
|
||||
$Id: win32_ioctl.c,v 1.15 2004/07/17 09:12:21 rocky Exp $
|
||||
|
||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: win32_ioctl.c,v 1.14 2004/07/16 03:06:53 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: win32_ioctl.c,v 1.15 2004/07/17 09:12:21 rocky Exp $";
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/sector.h>
|
||||
@@ -403,12 +403,9 @@ read_toc_win32ioctl (_img_private_t *env)
|
||||
@return the CD-TEXT object or NULL if obj is NULL
|
||||
or CD-TEXT information does not exist.
|
||||
*/
|
||||
const cdtext_t *
|
||||
get_cdtext_win32ioctl (_img_private_t *env)
|
||||
bool
|
||||
init_cdtext_win32ioctl (_img_private_t *env)
|
||||
{
|
||||
#if 0
|
||||
return NULL;
|
||||
#else
|
||||
uint8_t wdata[5000] = { 0, };
|
||||
|
||||
SCSI_PASS_THROUGH_DIRECT sptd;
|
||||
@@ -451,7 +448,7 @@ get_cdtext_win32ioctl (_img_private_t *env)
|
||||
(LPSTR) psz_msg, 0, NULL);
|
||||
cdio_info("Error reading cdtext: %s", psz_msg);
|
||||
LocalFree(psz_msg);
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
@@ -513,10 +510,7 @@ get_cdtext_win32ioctl (_img_private_t *env)
|
||||
pdata++;
|
||||
}
|
||||
}
|
||||
|
||||
env->b_cdtext_init = true;
|
||||
return &(env->cdtext);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user