Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[mb-commits] r9183 - in libdiscid/trunk: . include/discid src: msg#00002

audio.musicbrainz.cvs

Subject: [mb-commits] r9183 - in libdiscid/trunk: . include/discid src

Author: luks
Date: 2007-06-16 11:52:50 +0000 (Sat, 16 Jun 2007)
New Revision: 9183

Added:
libdiscid/trunk/CMakeLists.txt
Removed:
libdiscid/trunk/Makefile.msvc
libdiscid/trunk/discid.def
Modified:
libdiscid/trunk/ChangeLog
libdiscid/trunk/Makefile.am
libdiscid/trunk/include/discid/discid.h
libdiscid/trunk/src/disc_win32.c
libdiscid/trunk/src/disc_win32_new.c
Log:
* Replace MSVC makefile with a CMake build system.
* Use the new TOC reading code on Windows NT.


Added: libdiscid/trunk/CMakeLists.txt


Property changes on: libdiscid/trunk/CMakeLists.txt
___________________________________________________________________
Name: svn:eol-style
+ native

Modified: libdiscid/trunk/ChangeLog
===================================================================
--- libdiscid/trunk/ChangeLog 2007-06-15 03:14:13 UTC (rev 9182)
+++ libdiscid/trunk/ChangeLog 2007-06-16 11:52:50 UTC (rev 9183)
@@ -2,9 +2,16 @@
--------------------


+libdiscid-0.1.2:
+
+ - Replace custom MSVC makefile with CMake build system. (Lukas)
+ - Use accurate TOC reading method for multi-session CDs on
+ Windows NT/2000/XP. (Lukas)
+
+
libdiscid-0.1.1:

- - Use generic 'cdaudio' device name on windows (Luks).
+ - Use generic 'cdaudio' device name on windows. (Lukas)


libdiscid-0.1.0:

Modified: libdiscid/trunk/Makefile.am
===================================================================
--- libdiscid/trunk/Makefile.am 2007-06-15 03:14:13 UTC (rev 9182)
+++ libdiscid/trunk/Makefile.am 2007-06-16 11:52:50 UTC (rev 9183)
@@ -26,4 +26,4 @@
pcdir = $(libdir)/pkgconfig
pc_DATA = libdiscid.pc

-EXTRA_DIST = libdiscid.pc.in Doxyfile.in Makefile.msvc discid.def
+EXTRA_DIST = libdiscid.pc.in Doxyfile.in CMakeLists.txt

Deleted: libdiscid/trunk/Makefile.msvc

Deleted: libdiscid/trunk/discid.def

Modified: libdiscid/trunk/include/discid/discid.h
===================================================================
--- libdiscid/trunk/include/discid/discid.h 2007-06-15 03:14:13 UTC (rev
9182)
+++ libdiscid/trunk/include/discid/discid.h 2007-06-16 11:52:50 UTC (rev
9183)
@@ -24,7 +24,18 @@
#ifndef MUSICBRAINZ_DISC_ID_H
#define MUSICBRAINZ_DISC_ID_H

+#ifdef WIN32
+# ifdef libdiscid_EXPORTS
+# define LIBDISCID_API __declspec(dllexport)
+# else
+# define LIBDISCID_API __declspec(dllimport)
+# endif
+#else
+# define LIBDISCID_API
+#endif

+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -90,7 +101,7 @@
*
* @return a DiscId object, or NULL.
*/
-DiscId *discid_new();
+LIBDISCID_API DiscId *discid_new();


/**
@@ -98,7 +109,7 @@
*
* @param d a DiscId object created by discid_new()
*/
-void discid_free(DiscId *d);
+LIBDISCID_API void discid_free(DiscId *d);


/**
@@ -118,7 +129,7 @@
* @param device an operating system dependent device identifier, or NULL
* @return true if successful, or false on error.
*/
-int discid_read(DiscId *d, const char *device);
+LIBDISCID_API int discid_read(DiscId *d, const char *device);


/**
@@ -142,7 +153,7 @@
* @param offsets a pointer to an array of 100 track offsets
* @return true if the given data was valid, and false on error
*/
-int discid_put(DiscId *d, int first, int last, int *offsets);
+LIBDISCID_API int discid_put(DiscId *d, int first, int last, int *offsets);


/**
@@ -154,7 +165,7 @@
* @param d a DiscId object created by discid_new()
* @return a string describing the error that occurred
*/
-char *discid_get_error_msg(DiscId *d);
+LIBDISCID_API char *discid_get_error_msg(DiscId *d);


/**
@@ -165,7 +176,7 @@
* @param d a DiscId object created by discid_new()
* @return a string containing a MusicBrainz DiscID
*/
-char *discid_get_id(DiscId *d);
+LIBDISCID_API char *discid_get_id(DiscId *d);


/**
@@ -176,7 +187,7 @@
* @param d a DiscId object created by discid_new()
* @return a string containing a FreeDB DiscID
*/
-char *discid_get_freedb_id(DiscId *d);
+LIBDISCID_API char *discid_get_freedb_id(DiscId *d);


/**
@@ -191,7 +202,7 @@
* @param d a DiscId object created by discid_new()
* @return a string containing an URL
*/
-char *discid_get_submission_url(DiscId *d);
+LIBDISCID_API char *discid_get_submission_url(DiscId *d);


/**
@@ -199,7 +210,7 @@
*
* @return a string containing an operating system dependent device identifier
*/
-char *discid_get_default_device(void);
+LIBDISCID_API char *discid_get_default_device(void);


/**
@@ -208,7 +219,7 @@
* @param d a DiscId object created by discid_new()
* @return the number of the first track
*/
-int discid_get_first_track_num(DiscId *d);
+LIBDISCID_API int discid_get_first_track_num(DiscId *d);


/**
@@ -217,7 +228,7 @@
* @param d a DiscId object created by discid_new()
* @return the number of the last track
*/
-int discid_get_last_track_num(DiscId *d);
+LIBDISCID_API int discid_get_last_track_num(DiscId *d);


/**
@@ -226,7 +237,7 @@
* @param d a DiscId object created by discid_new()
* @return the length of the disc in sectors
*/
-int discid_get_sectors(DiscId *d);
+LIBDISCID_API int discid_get_sectors(DiscId *d);


/**
@@ -239,7 +250,7 @@
* @param track_num the number of a track
* @return sector offset of the specified track
*/
-int discid_get_track_offset(DiscId *d, int track_num);
+LIBDISCID_API int discid_get_track_offset(DiscId *d, int track_num);


/**
@@ -252,7 +263,7 @@
* @param track_num the number of a track
* @return length of the specified track
*/
-int discid_get_track_length(DiscId *d, int track_num);
+LIBDISCID_API int discid_get_track_length(DiscId *d, int track_num);


#ifdef __cplusplus

Modified: libdiscid/trunk/src/disc_win32.c
===================================================================
--- libdiscid/trunk/src/disc_win32.c 2007-06-15 03:14:13 UTC (rev 9182)
+++ libdiscid/trunk/src/disc_win32.c 2007-06-16 11:52:50 UTC (rev 9183)
@@ -35,6 +35,8 @@

#define MB_DEFAULT_DEVICE "cdaudio"

+int mb_disc_read_unportable_nt(mb_disc_private *disc, const char *device);
+
char *mb_disc_get_default_device_unportable(void) {
return MB_DEFAULT_DEVICE;
}
@@ -44,6 +46,15 @@
char mci_command[128];
char mci_return[128];
char alias[128], device_str[128], error_msg[256];
+
+ if ( GetVersion() < 0x80000000 ) {
+ if ( strlen(device) == 0 || strcmp(device, "cdaudio") == 0 ) {
+ sprintf(device_str, "D:"); /* FIXME */
+ device = device_str;
+ }
+ return mb_disc_read_unportable_nt(disc, device);
+ }
+

if ( strlen(device) == 0 || strcmp(device, "cdaudio") == 0 ) {
sprintf(device_str, "cdaudio");

Modified: libdiscid/trunk/src/disc_win32_new.c
===================================================================
--- libdiscid/trunk/src/disc_win32_new.c 2007-06-15 03:14:13 UTC (rev
9182)
+++ libdiscid/trunk/src/disc_win32_new.c 2007-06-16 11:52:50 UTC (rev
9183)
@@ -59,18 +59,12 @@
TRACK_DATA TrackData[1];
} CDROM_TOC_SESSION_DATA;

-#define MB_DEFAULT_DEVICE "D:"
-
int AddressToSectors(UCHAR address[4])
{
return address[1] * 4500 + address[2] * 75 + address[3];
}

-char *mb_disc_get_default_device_unportable(void) {
- return MB_DEFAULT_DEVICE;
-}
-
-int mb_disc_read_unportable(mb_disc_private *disc, const char *device)
+int mb_disc_read_unportable_nt(mb_disc_private *disc, const char *device)
{
HANDLE hDevice;
DWORD dwReturned;
@@ -79,7 +73,7 @@
CDROM_TOC_SESSION_DATA session;
char filename[128];
int i;
-
+
snprintf(filename, 128, "\\\\.\\%s", device);

hDevice = CreateFile(filename, GENERIC_READ,


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation