CN104679697B - File reading, device and CD-ROM drive driving plate and CD-ROM equipment - Google Patents
File reading, device and CD-ROM drive driving plate and CD-ROM equipment Download PDFInfo
- Publication number
- CN104679697B CN104679697B CN201510092241.8A CN201510092241A CN104679697B CN 104679697 B CN104679697 B CN 104679697B CN 201510092241 A CN201510092241 A CN 201510092241A CN 104679697 B CN104679697 B CN 104679697B
- Authority
- CN
- China
- Prior art keywords
- file
- host
- rom
- specified
- rom equipment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of file reading, device and CD-ROM drive driving plate and CD-ROM equipments, belong to field of computer technology.The method includes:Receiving host is instructed by what USB interface was sent for reading the reading of specified file;Read the specified file for meeting ISO9660 standards in the CD-ROM equipment in CD, and the specified type file that the specified file is converted into meeting usb protocol;The specified type file being converted to by the USB interface to host transmission.After the present invention by the file of ISO9660 standards in CD by being converted into the file for meeting usb protocol type, transformed file is sent to host;Solving the problems, such as in the prior art can not normal use CD-ROM equipment without the host of CD-ROM drive driver;Achieve the effect that ensure that the host without CD-ROM drive driver still can normally access optical file in CD-ROM equipment.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of file reading, device and CD-ROM drive driving plate and
CD-ROM equipment.
Background technology
CD is the common mass-memory unit for storage file.When using CD, due to many at present main
Machine do not have CD-ROM drive, it is therefore desirable to using set universal serial bus (English:Universal Serial Bus, referred to as:USB)
The CD-ROM equipment of interface is connect with host.
These CD-ROM equipments with USB interface can be connect by USB interface with host, as these CD-ROM equipments and master
After machine connection, these CD-ROM equipments can be identified as CD-ROM drive by host.Host must carry the driver of CD-ROM drive, could read light
File in drive apparatus.
In the implementation of the present invention, inventor has found that the prior art has at least the following problems:Host needs carry
The driver of CD-ROM drive could read the data in external CD-ROM equipment, (such as mobile phone, flat without the host of CD-ROM drive driver
Plate computer) it then can not normal use CD-ROM equipment.
Invention content
In order to solve the problems, such as in the prior art without the host of CD-ROM drive driver can not normal use CD-ROM equipment, this
Inventive embodiments provide a kind of file reading, device and CD-ROM drive driving plate and CD-ROM equipment.The technical solution is as follows:
In a first aspect, provide a kind of file reading, which is characterized in that applied in CD-ROM equipment, the CD-ROM drive
Equipment is connect with host by general-purpose serial bus USB interface, the method includes:
The host is received to instruct for reading the reading of specified file by what the USB interface was sent;
Read the specified file for meeting ISO9660 standards in the CD-ROM equipment in CD, and by the specified text
Part is converted into the specified type file for meeting usb protocol;
The specified type file being converted to by the USB interface to host transmission.
Optionally, it is described to read the specified file for meeting ISO9660 standards in the CD-ROM equipment in CD, and
The specified file is converted into the specified type file for meeting usb protocol, including:
The specified file for meeting ISO9660 standards in the CD-ROM equipment in CD is read to the CD-ROM equipment
In data buffer in;
The specified type file that the specified file in the data buffer is converted into meeting usb protocol.
Optionally, it is described that the specified file is converted into specified type file, including:
If the specified file is unpressed audio file type, the specified file is converted into the specified class
Type file, the specified type file are WAV types, MP3 types, FLAC types or APE types.
Optionally, in the reading for being used to read specified file for receiving the host and being sent by the USB interface
Before instruction, further include:
When the CD-ROM equipment is connect and the CD-ROM equipment is inserted into CD by the USB interface with the host
Afterwards, the capacity parameter of the CD and the catalogue of file in the CD are obtained, the capacity parameter of the CD includes described
The total capacity parameter of CD and using capacity parameter, the catalogue includes bibliographic structure and filename;
The capacity parameter of the CD is converted to the capacity parameter for meeting the usb protocol;
The catalogue of the file is converted into the catalogue for meeting the usb protocol;
The property parameters of the CD-ROM equipment are defined as USB flash disk;
The property parameters after the transformed capacity parameter and the catalogue and definition are stored to data and are delayed
In storage.
Optionally, in the property parameters by after the transformed capacity parameter and the catalogue and definition
After storing to data buffer, further include:
The host is received by what the USB interface was sent for reading the reading of the attribute of the CD-ROM equipment attribute to refer to
It enables;
The capacity parameter and the property parameters are read out of described data buffer;
The capacity parameter read and the property parameters are sent to the host by the USB interface.
Optionally, it after the capacity parameter that reading is sent by the USB interface, further includes:
It receives the host and is used to read in the CD-ROM equipment file directory in CD by what the USB interface was sent
Catalogue read instruction;
The catalogue is read out of described data buffer;
The catalogue read is sent to the host by the USB interface.
Optionally, the method further includes:
When the CD-ROM equipment is connect and CD export in the CD-ROM equipment by the USB interface with the host
Afterwards, all data in the data buffer are removed.
Second aspect provides a kind of document reading apparatus, and applied in CD-ROM equipment, the CD-ROM equipment leads to host
The connection of general-purpose serial bus USB interface is crossed, described device includes:
First receiving module, for receive the host by the USB interface send for reading specified file
Read instruction;
Type modular converter, for reading the specified text for meeting ISO9660 standards in the CD-ROM equipment in CD
Part, and the specified type file that the specified file is converted into meeting usb protocol;
File sending module is converted for sending the type modular converter to the host by the USB interface
The specified type file arrived.
Optionally, the type modular converter, including:
Document reading unit, for the specified file that will meet ISO9660 standards in the CD-ROM equipment in CD
It reads to the data buffer in the CD-ROM equipment;
Type conversion unit, for the specified file in the data buffer to be converted into meeting usb protocol
The specified type file.
Optionally, the type conversion unit, is additionally operable to:
If the specified file is unpressed audio file type, the specified file is converted into the specified class
Type file, the specified type file are WAV types, MP3 types, FLAC types or APE types.
Optionally, described device further includes:
Parameter acquisition module is connect and the light for working as the CD-ROM equipment by the USB interface with the host
After drive apparatus is inserted into CD, the capacity parameter of the CD and the catalogue of file in the CD are obtained, the CD
Capacity parameter includes the total capacity parameter of the CD and using capacity parameter, and the catalogue includes bibliographic structure and file
Name;
Parameter Switch module meets for the capacity parameter of the CD that the parameter acquisition module obtains to be converted to
The capacity parameter of the usb protocol;
Catalogue modular converter, it is described for the catalogue of the file that the parameter acquisition module obtains to be converted into meeting
The catalogue of usb protocol;
Attribute definition module, for the property parameters of the CD-ROM equipment to be defined as USB flash disk;
Memory module, for the property parameters by the transformed capacity parameter and the catalogue and after defining
It stores to data buffer.
Optionally, described device further includes:
Second receiving module is set for receiving the host by what the USB interface was sent for reading the CD-ROM drive
The attribute of standby attribute reads instruction;
First read module, for reading the capacity parameter and the property parameters out of described data buffer;
Attribute sending module sends the capacity parameter read and institute for passing through the USB interface to the host
State property parameters.
Optionally, described device further includes:
Third receiving module is set for receiving the host by what the USB interface was sent for reading the CD-ROM drive
The catalogue of file directory reads instruction in standby interior CD;
Second read module, for reading the catalogue out of described data buffer;
Catalogue sending module, for sending the catalogue read to the host by the USB interface.
Optionally, described device further includes:
Module is removed, the CD-ROM equipment is connect by the USB interface with the host and the CD-ROM drive is set for working as
After standby interior CD export, all data in the data buffer are removed.
The third aspect, provides a kind of CD-ROM drive driving plate, and the CD-ROM drive driving plate includes such as second aspect and second party
The document reading apparatus provided in the various alternatives in face.
Fourth aspect, provides a kind of CD-ROM equipment, and the CD-ROM equipment includes the CD-ROM drive driving provided such as the third aspect
Plate.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
It, will be transformed after the file of ISO9660 standards in CD is converted into the file for meeting usb protocol type
File is sent to host;Since the file of ISO9660 standards identified by CD-ROM drive driver can will be needed in CD, turn
Change the file for meeting usb protocol type into, therefore transformed file can be identified by the host without CD-ROM drive driver,
Therefore solving the problems, such as in the prior art can not normal use CD-ROM equipment without the host of CD-ROM drive driver;Having reached can
To ensure that the host without CD-ROM drive driver still can normally access the effect of optical file in CD-ROM equipment.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is the method flow diagram of the file reading provided in one embodiment of the invention;
Fig. 2 is the method flow diagram of the file reading provided in another embodiment of the present invention;
Fig. 3 A are the method flow diagrams of the file reading provided in further embodiment of the present invention;
Fig. 3 B are the method flow diagrams of the file reading provided in further embodiment of the present invention;
Fig. 3 C are the method flow diagrams of the file reading provided in further embodiment of the present invention;
Fig. 4 is the block diagram of the document reading apparatus provided in one embodiment of the invention;
Fig. 5 is the block diagram of the document reading apparatus provided in another embodiment of the present invention;
Fig. 6 is the block diagram of CD-ROM drive driving plate provided in one embodiment of the invention;
Fig. 7 is the block diagram of the CD-ROM equipment provided in one embodiment of the invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
In order to facilitate the understanding of the present invention, some nouns of the present invention are explained first:
File system:Storage and the software mechanism of constituent act information.
ISO 9660:Compact disk file system is a kind of by file system of the International Organization for standardization for optical disc medium publication.
FAT32:A kind of file system for being compatible with and being identified by almost all of operating system.
CD-ROM drive movement:Abbreviation movement, refer to the drive motor designed for CD read and write, laser head, electronic building brick and
The summation of mechanical structure.
CD-ROM drive driving plate:Or CD-ROM drive decoding deck, it is responsible for the circuit board that control movement works.
Driving plate firmware:The software that driving plate is made to realize expectation function and is write, programming is in the control chip of driving plate.
Fig. 1 is the method flow diagram of the file reading provided in one embodiment of the invention, shown in Figure 1,
This document read method is applied in CD-ROM equipment, which is connect with host by USB interface, the host said here
Can be smart mobile phone, tablet computer, multimedia player, wearable device etc..This document read method includes:
Step 101, receiving host is instructed by what USB interface was sent for reading the reading of specified file.
Step 102, the specified file for meeting ISO9660 standards in CD-ROM equipment in CD is read, and specified file is turned
Change the specified type file for meeting usb protocol into.
Since the file in CD is the file that meets ISO9660 standards, and the file of ISO9660 standards can not be by
Usb protocol identified, but usb protocol can identify the file of the non-ISO9660 standards such as FAT32, FAT16, therefore in order to can be with
Ensure host can still identify CD under the premise of not having CD-ROM drive driver in file, need to read in CD
ISO9660 files be converted into the file for meeting usb protocol type.
Step 103, the specified type file being converted to by USB interface to host transmission.
In conclusion file reading provided in an embodiment of the present invention, by by the file of ISO9660 standards in CD
After being converted into the file for meeting usb protocol type, transformed file is sent to host;Due to that will can need to lead in CD
The file of the ISO9660 standards of CD-ROM drive driver identification is crossed, is converted into the file for meeting usb protocol type, therefore after conversion
File can be identified by the host without CD-ROM drive driver, therefore solve in the prior art without CD-ROM drive driver
Host can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be with
The normal effect for accessing optical file in CD-ROM equipment.
Fig. 2 is the method flow diagram of the file reading provided in another embodiment of the present invention, refers to Fig. 2 institutes
Show, this document read method is applied in CD-ROM equipment, which is connect with host by USB interface, is said here
Host can be smart mobile phone, tablet computer, multimedia player, wearable device etc..This document read method includes:
Step 201, receiving host is instructed by what USB interface was sent for reading the reading of specified file.
It, can be by USB interface to CD-ROM equipment when host needs to read in CD-ROM equipment some file in CD
Send the reading instruction for reading specified file.Corresponding, CD-ROM equipment can receive what host was sent by USB interface
For reading the reading of specified file instruction.
Step 202, the specified file for meeting ISO9660 standards in CD-ROM equipment in CD is read into CD-ROM equipment
In data buffer.
Since the file in CD is the file that meets ISO9660 standards, and the file of ISO9660 standards can not be by
Usb protocol identified, but usb protocol can identify the file of the non-ISO9660 standards such as FAT32, FAT16, therefore in order to can be with
Ensure host can still identify CD under the premise of not having CD-ROM drive driver in file, need to read in CD
ISO9660 files be converted into the file for meeting usb protocol type.
Since data conversion needs certain time delay, in order to ensure the fluency of host file in CD is read,
Specified file in CD-ROM equipment in CD can be read in the data buffer into CD-ROM equipment.
Optionally, it can prestore in data buffer there are one buffer area, which can be exclusively used in storage from CD
The file data of middle reading.
It should be noted that since the size of data buffer or buffer area is usually smaller, it can even be less than one
The size of audio file, such as the size of data buffer or buffer area are 2M, and the size of an audio file can be 2M
Or more than 2M, therefore, CD-ROM equipment, can be according to time shaft the past of the specified file when reading specified file from CD
The data being successively read backward in the specified file.
Supplementary explanation is also needed to, since the specified file stored in CD is usually uncompressed file, can be passed through
The time shaft of specified file reads the partial data of specified file.
Step 203, the specified file in data buffer is converted into the specified type file for meeting usb protocol.
As long as incorporating the data of specified file in data buffer, then specified class can be directly converted the data into
Type file.
Optionally, CD-ROM equipment can include when specified file is converted into specified type file:If specified file is
Unpressed audio file type, then be converted into specified type file by specified file, and specified type file is sound waveform sound
Frequency form (English:WAVEform audio format Sound, referred to as:WAV) type, dynamic image expert's compression standard sound
(the English of frequency level 3:Moving Picture Experts Group Audio Layer III, referred to as:MP3) type, lossless
Compressed audio coding (English:Free Lossless Audio Codec, referred to as:FLAC) type or digital music lossless compression
Encode APE types.
Above-mentioned specified type file can be identified by host in the case of no CD drive driver.
Step 204, the specified type file being converted to by USB interface to host transmission.
Transformed data directly can be passed through USB by CD-ROM equipment after by the data conversion in data buffer
Interface is sent to host.
Optionally, the process to data buffer deposit data, the process for converting the data in data buffer
And it can be three parallel processes that data buffer is sent to the process of host.
In conclusion file reading provided in an embodiment of the present invention, by by the file of ISO9660 standards in CD
After being converted into the file for meeting usb protocol type, transformed file is sent to host;Due to that will can need to lead in CD
The file of the ISO9660 standards of CD-ROM drive driver identification is crossed, is converted into the file for meeting usb protocol type, therefore after conversion
File can be identified by the host without CD-ROM drive driver, therefore solve in the prior art without CD-ROM drive driver
Host can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be with
The normal effect for accessing optical file in CD-ROM equipment.
In practical applications, for the host of CD-ROM drive driver is not installed, external equipment should be for USB flash disk,
Rather than CD, therefore, in order to ensure after CD-ROM equipment is connect with host, the CD can be shown as USB flash disk on host,
Can also disguise oneself as the attribute of CD-ROM equipment USB flash disk.It, can also be by the attribute of CD-ROM equipment namely in fig. 2 before step 201
Disguise oneself as USB flash disk, and the information after camouflage is sent to host, and the information after camouflage can be used for triggering host and be shown.Tool
Body may refer to the description in Fig. 3 A.
Fig. 3 A are the method flow diagrams of the file reading provided in another embodiment of the present invention, refer to Fig. 3 A institutes
Show, this document read method is applied in CD-ROM equipment, which is connect with host by USB interface, is said here
Host can be smart mobile phone, tablet computer, multimedia player, wearable device etc..This document read method includes:
Step 301, after CD-ROM equipment is connect by USB interface with host and CD-ROM equipment is inserted into CD, light is obtained
The catalogue of file in the capacity parameter and CD of disk, the capacity parameter of CD include the total capacity parameter of CD and use capacity
Parameter, catalogue include bibliographic structure and filename.
After CD-ROM equipment is connect by USB interface with host and CD-ROM equipment is inserted into CD, host usually requires to obtain
Take the information of the CD-ROM equipment, such as the attribute information of CD-ROM equipment, capacity information, directory information etc..Wherein attribute information is used
In the type of instruction CD-ROM equipment, capacity information includes the total capacity of CD in CD-ROM equipment and uses capacity, directory information packet
Include the catalogue of each file in CD.
Here the catalogue said can include bibliographic structure and filename.Wherein, bibliographic structure refers to each filename
The structure of composition, the structure are usually tree.In bibliographic structure, each filename can be as the section of the bibliographic structure
Point.
It will be apparent that when in CD there are the file that during file, file can be special as one, alternatively, the catalogue
It can also include folder name.Wherein, folder name is as a node in bibliographic structure, and in this document folder file text
Child node of the part name in bibliographic structure as node corresponding to this document folder name.
The bibliographic structure is used to indicate between each file, between each file and the knot between file and file
Structure.
Therefore, after CD-ROM equipment is connect by USB interface with host and CD-ROM equipment is inserted into CD, CD-ROM equipment is first
First obtain the catalogue of file in the capacity parameter and CD of CD.
Step 302, the capacity parameter of CD is converted to the capacity parameter for meeting usb protocol.
In general, the catalogue of file is typically to utilize in the capacity parameter and CD of the CD that drive apparatus obtains
ISO9660 standards describe, therefore the catalogue of file generally can not in the capacity parameter and CD of these CDs obtained
It is identified by usb protocol, in order to ensure can be identified by usb protocol, the capacity parameter of the CD of acquisition can be converted to and met
The capacity parameter of usb protocol.
Step 303, the catalogue of file is converted into the catalogue for meeting usb protocol.
Similar, the catalogue of file in the CD of acquisition can be converted into the catalogue for meeting usb protocol.
Step 304, the property parameters of CD-ROM equipment are defined as USB flash disk.
In practical applications, become USB flash disk, and show the drive of USB flash disk to ensure that host can identify the CD-ROM equipment,
The property parameters of CD-ROM equipment can also be defined as USB flash disk by CD-ROM equipment, and the property parameters that can be defined as USB flash disk pass to master
Machine.
Step 305, the property parameters after transformed capacity parameter and catalogue and definition are stored to data buffer
It is interior.
Generally, as long as the non-export of CD in the CD-ROM equipment, transformed capacity parameter and catalogue and definition
Attribute afterwards is had been stored in data buffer.To ensure, the information of the reading CD-ROM equipment of host randomness.
Optionally, the property parameters for being defined as USB flash disk can not also be stored in data buffer, but are learnt in host needs
During the property parameters, step 304 is performed, and the property parameters that will be defined as USB flash disk pass to host.
Optionally, mode of the data buffer when storing data and being read data is first in first out.Due to can be with
Time shaft according to file reads data from file, and sequentially writes data into data buffer, then sequentially from data
Data are read out in buffer, and by the data conversion read out into host is sent to after specified type file, so as to avoid leading
Machine is distorted when playing this document.
In conclusion file reading provided in an embodiment of the present invention, by by the file of ISO9660 standards in CD
After being converted into the file for meeting usb protocol type, transformed file is sent to host;Due to that will can need to lead in CD
The file of the ISO9660 standards of CD-ROM drive driver identification is crossed, is converted into the file for meeting usb protocol type, therefore after conversion
File can be identified by the host without CD-ROM drive driver, therefore solve in the prior art without CD-ROM drive driver
Host can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be with
The normal effect for accessing optical file in CD-ROM equipment.
In addition, by the way that the file read from CD is first stored in data buffer, in conversion, from data buffer
Middle reading data, and specified type file is converted the data into, thereby may be ensured that the data for being sent to host is according to original
Sequence sequence, it avoids being distorted.
In a kind of realization scene, after step 305, host may need to know the property parameters of CD-ROM equipment and
Capacity parameter, such as host need to show the external equipment for USB flash disk or CD, and the capacity of external equipment be it is how many, at this time
The information for meeting usb protocol standard can be then read out of CD-ROM equipment data buffer.Specifically it may refer in Fig. 3 B
Description.
Fig. 3 B are the method flow diagrams of the file reading provided in further embodiment of the present invention, refer to Fig. 3 B institutes
Show, this document read method is applied in CD-ROM equipment, which is connect with host by USB interface, is said here
Host can be smart mobile phone, tablet computer, multimedia player, wearable device etc..This document read method includes:
Step 306, receiving host reads instruction by what USB interface was sent for reading the attribute of CD-ROM equipment attribute.
After step 305, if the attribute that CD-ROM equipment has received host transmission reads instruction, show host needs
The property parameters and capacity parameter of CD-ROM equipment are learnt, at this time in order to ensure that the host without CD-ROM drive driver can identify
Go out the property parameters and capacity parameter of CD-ROM equipment, CD-ROM equipment can then perform step 307.
Step 307, capacity parameter and property parameters are read out of data buffer.
It will be apparent that the capacity parameter and property parameters in data buffer meet usb protocol.
Step 308, the capacity parameter and property parameters that read are sent to host by USB interface.
After the capacity parameter and property parameters that meet usb protocol are sent to host by USB interface, host then can root
CD-ROM equipment is directly identified as USB flash disk, and show USB flash disk drive according to property parameters, when showing USB flash disk drive, while can also shown
Show each capacity information of CD in the CD-ROM equipment.
In conclusion file reading provided in an embodiment of the present invention, by by the file of ISO9660 standards in CD
After being converted into the file for meeting usb protocol type, transformed file is sent to host;Due to that will can need to lead in CD
The file of the ISO9660 standards of CD-ROM drive driver identification is crossed, is converted into the file for meeting usb protocol type, therefore after conversion
File can be identified by the host without CD-ROM drive driver, therefore solve in the prior art without CD-ROM drive driver
Host can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be with
The normal effect for accessing optical file in CD-ROM equipment.
In addition, after due to reading instruction in the attribute for receiving host transmission, USB associations can will be met in data buffer
The capacity parameter and property parameters of view are sent to host, therefore ensure that host can normally show the capacity information of CD-ROM equipment
And attribute information.
In a kind of realization scene, after step 308, host is after the drive for showing the CD-ROM equipment, it is also possible to
Need to know the file directory of CD in CD-ROM equipment, CD-ROM equipment can then be read out of data buffer at this time meets USB
The catalogue of consensus standard.The specific description that may refer in Fig. 3 C.
Fig. 3 C are the method flow diagrams of the file reading provided in further embodiment of the present invention, refer to Fig. 3 C institutes
Show, this document read method is applied in CD-ROM equipment, which is connect with host by USB interface, is said here
Host can be smart mobile phone, tablet computer, multimedia player, wearable device etc..This document read method includes:
Step 309, the mesh for being used to read file directory in CD in CD-ROM equipment that receiving host is sent by USB interface
Instruction is read in record.
Step 310, catalogue is read out of data buffer.
It will be apparent that the catalogue in data buffer meets usb protocol.
Step 311, the catalogue read is sent to host by USB interface.
After the catalogue for meeting usb protocol is sent to host by USB interface, host can be then shown in the CD-ROM equipment
The file directory of CD.
In conclusion file reading provided in an embodiment of the present invention, by by the file of ISO9660 standards in CD
After being converted into the file for meeting usb protocol type, transformed file is sent to host;Due to that will can need to lead in CD
The file of the ISO9660 standards of CD-ROM drive driver identification is crossed, is converted into the file for meeting usb protocol type, therefore after conversion
File can be identified by the host without CD-ROM drive driver, therefore solve in the prior art without CD-ROM drive driver
Host can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be with
The normal effect for accessing optical file in CD-ROM equipment.
In addition, after due to reading instruction in the catalogue for receiving host transmission, USB associations can will be met in data buffer
The catalogue of view is sent to host, therefore ensure that host can normally show the file directory in CD-ROM equipment in CD.
In a kind of possible realization method, when CD-ROM equipment is connect by USB interface with host and in CD-ROM equipment
After CD export, CD-ROM equipment can clear data all data in buffer.In this way, when other CDs are inserted into the CD-ROM drive
After equipment, it is ensured that the data in data buffer can uniquely correspond to the CD being currently inserted into CD-ROM equipment.
Fig. 4 is the block diagram of the document reading apparatus provided in one embodiment of the invention, shown in Figure 4,
This document reading device can combine all or part for being implemented as CD-ROM equipment, the light by software, hardware or the two
Drive apparatus is connect with host by USB interface, and the host said here can be smart mobile phone, tablet computer, multimedia
Device, wearable device etc..This document reading device includes:First receiving module 402, type modular converter 404 and file hair
Send module 406.
First receiving module 402, for receiving the reading for being used to read specified file that the host is sent by the USB interface
Instruction fetch;
Type modular converter 404, for reading the specified file for meeting ISO9660 standards in CD-ROM equipment in CD, and
The specified type file that specified file is converted into meeting usb protocol;
File sending module 406 sends what the type modular converter was converted to for passing through the USB interface to the host
The specified type file.
In conclusion document reading apparatus provided in an embodiment of the present invention, by by the file of ISO9660 standards in CD
After being converted into the file for meeting usb protocol type, transformed file is sent to host;Due to that will can need to lead in CD
The file of the ISO9660 standards of CD-ROM drive driver identification is crossed, is converted into the file for meeting usb protocol type, therefore after conversion
File can be identified by the host without CD-ROM drive driver, therefore solve in the prior art without CD-ROM drive driver
Host can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be with
The normal effect for accessing optical file in CD-ROM equipment.
Fig. 5 is the block diagram of the document reading apparatus provided in another embodiment of the present invention, refers to Fig. 5 institutes
Show, this document reading device can combine all or part for being implemented as CD-ROM equipment by software, hardware or the two, should
CD-ROM equipment is connect with host by USB interface, and the host said here can be broadcast for smart mobile phone, tablet computer, multimedia
Put device, wearable device etc..This document reading device includes:First receiving module 502, type modular converter 504 and file
Sending module 506.
First receiving module 502, for receiving the reading for being used to read specified file that the host is sent by the USB interface
Instruction fetch;
Type modular converter 504, for reading the specified file for meeting ISO9660 standards in CD-ROM equipment in CD, and
The specified type file that specified file is converted into meeting usb protocol;
File sending module 506 sends what the type modular converter was converted to for passing through the USB interface to the host
The specified type file.
In an optional implementation manner, the type modular converter 504, including:Document reading unit 504a and type
Converting unit 504b.
Document reading unit 504a, for the specified file that will meet ISO9660 standards in the CD-ROM equipment in CD
It reads to the data buffer in the CD-ROM equipment;
Type conversion unit 504b, for the specified file in the data buffer to be converted into meeting usb protocol
The specified type file.
In an optional implementation manner, type conversion unit 504b is additionally operable to:
If the specified file is unpressed audio file type, which is converted into specified type text
Part, the specified type file are WAV types, MP3 types, FLAC types or APE types.
In an optional implementation manner, document reading apparatus can also include:Parameter acquisition module 508, parameter turn
Change the mold block 510, catalogue modular converter 512, attribute definition module 514 and memory module 516.
Parameter acquisition module 508 is connect and the CD-ROM equipment for working as the CD-ROM equipment by the USB interface with the host
After being inserted into CD, the catalogue of file in the capacity parameter and the CD of the CD is obtained, the capacity parameter of the CD includes
The total capacity parameter of the CD and using capacity parameter, catalogue includes bibliographic structure and filename;
Parameter Switch module 510, the capacity parameter of the CD for the parameter acquisition module 508 to be obtained are converted to symbol
Close the capacity parameter of the usb protocol;
Catalogue modular converter 512, the catalogue of this document for the parameter acquisition module 508 to be obtained are converted into meeting this
The catalogue of usb protocol;
Attribute definition module 514, for being USB flash disk by the attribute definition of the CD-ROM equipment;
Memory module 516, for by the attribute after the transformed capacity parameter and the catalogue and definition store to
In data buffer.
In an optional implementation manner, this document reading device can also include:Second receiving module 518, first
Read module 520 and attribute sending module 522.
Second receiving module 518, for receive the host by the USB interface send for reading the CD-ROM equipment category
Property attribute read instruction;
First read module 520, for reading the capacity parameter and the attribute out of this data buffer;
Attribute sending module 522 sends the capacity parameter and the category for reading to the host for passing through the USB interface
Property.
In an optional implementation manner, this document reading device can also include:Third receiving module 524, second
Read module 526 and catalogue sending module 528.
Third receiving module 524 is used to read in the CD-ROM equipment for receiving the host by what the USB interface was sent
The catalogue of file directory reads instruction in CD;
Second read module 526, for reading the catalogue out of this data buffer;
Catalogue sending module 528 sends the catalogue read for passing through the USB interface to the host.
In an optional implementation manner, this document reading device can also include:Remove module 530.
Module 530 is removed, is connect for working as the CD-ROM equipment by the USB interface with the host and in the CD-ROM equipment
After CD export, all data in the data buffer are removed.
In conclusion document reading apparatus provided in an embodiment of the present invention, by by the file of ISO9660 standards in CD
After being converted into the file for meeting usb protocol type, transformed file is sent to host;Due to that will can need to lead in CD
The file of the ISO9660 standards of CD-ROM drive driver identification is crossed, is converted into the file for meeting usb protocol type, therefore after conversion
File can be identified by the host without CD-ROM drive driver, therefore solve in the prior art without CD-ROM drive driver
Host can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be with
The normal effect for accessing optical file in CD-ROM equipment.
In addition, by the way that the file read from CD is first stored in data buffer, in conversion, from data buffer
Middle reading data, and specified type file is converted the data into, thereby may be ensured that the data for being sent to host is according to original
Sequence sequence, it avoids being distorted.
After reading instruction in the attribute for receiving host transmission, it can will meet usb protocol in data buffer
Capacity parameter and property parameters are sent to host, therefore ensure that host can normally show the capacity information and category of CD-ROM equipment
Property information.
After reading instruction in the catalogue for receiving host transmission, it can will meet usb protocol in data buffer
Catalogue is sent to host, therefore ensure that host can normally show the file directory in CD-ROM equipment in CD.
It should be noted that:The document reading apparatus provided in above-described embodiment read CD in file when, only more than
The division progress of each function module is stated for example, in practical application, it can be as needed and by above-mentioned function distribution by difference
Function module complete, i.e., the internal structure of CD-ROM equipment is divided into different function modules, it is described above complete to complete
Portion or partial function.In addition, the document reading apparatus that above-described embodiment provides belongs to same with file reading embodiment
Design, specific implementation process refer to embodiment of the method, and which is not described herein again.
The present invention also provides a kind of CD-ROM drive driving plate, which is included such as the file reading described in Fig. 4 or Fig. 5
Take device.
Fig. 6 is the block diagram of CD-ROM drive driving plate provided in one embodiment of the invention, which includes
Drive motor interface 601, laser head interface 602, sensor interface 603, motor driver 604, USB interface 605 and processor
606。
CD-ROM drive driving plate passes through drive motor interface 601, laser head interface 602, sensor interface 603 (optional) and CD-ROM drive
The movement of equipment is connected, and controls movement writable disc, into operations such as export CDs, and can lead to by USB interface 605 with host
Letter.
Processor 606 is logic control and the arithmetic center of CD-ROM drive driving plate, and processor 606 is set according to driving plate firmware
Meter performs corresponding instruction, controls the correct work of movement, and pass through USB interface 605 and communicate with host.
Optionally, which can also include program storage 607, and wherein program storage 607 can be used for
Storage driving plate firmware, driving plate firmware here include the document reading apparatus in Fig. 4 or Fig. 5.Optionally, which stores
Device 607 can be independent chip, can also be integrated into same chip with processor 606.
Optionally, which can also include data buffer 608, and wherein data buffer 608 can be used for
Buffering is kept in from disc reading data.Optionally, which can be independent chip, can also be with processor
606 are integrated in same chip.
In conclusion CD-ROM drive driving plate provided in an embodiment of the present invention, by the way that the file of ISO9660 standards in CD is turned
After changing the file for meeting usb protocol type into, transformed file is sent to host;Due to that will can need to pass through in CD
The file of the ISO9660 standards of CD-ROM drive driver identification, is converted into the file for meeting usb protocol type, therefore transformed
File can be identified, therefore solve in the prior art without CD-ROM drive driver by the host without CD-ROM drive driver
Host can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be just
The effect of optical file in CD-ROM equipment is asked in frequentation.
The present invention also provides a kind of CD-ROM equipment, which includes CD-ROM drive driving plate, which can wrap
It includes such as the document reading apparatus described in Fig. 4 or Fig. 5, is driven alternatively, the CD-ROM drive driving plate can be CD-ROM drive described in Fig. 6
Movable plate.
Fig. 7 is the block diagram of the CD-ROM equipment provided in one embodiment of the invention, which includes CD-ROM drive
Driving plate 701, CD-ROM drive movement 702 and CD 703.
Wherein CD-ROM drive driving plate 701 can be the CD-ROM drive driving plate described in Fig. 6, specifically may refer in Fig. 6 to light
The description of driving plate is driven, is just repeated no more here.
When in use, CD 703 can be injected in CD-ROM equipment, can also from CD-ROM equipment export.
In conclusion CD-ROM equipment provided in an embodiment of the present invention, by the way that the file of ISO9660 standards in CD is converted
Into after the file for meeting usb protocol type, transformed file is sent to host;Due to that will can need to pass through light in CD
The file of the ISO9660 standards of driver identification is driven, is converted into the file for meeting usb protocol type, therefore transformed text
Part can be identified, therefore solve in the prior art without the master of CD-ROM drive driver by the host without CD-ROM drive driver
Machine can not normal use CD-ROM equipment the problem of;Having reached can ensure that the host without CD-ROM drive driver still can be normal
Access the effect of optical file in CD-ROM equipment.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (14)
1. a kind of file reading, which is characterized in that applied in CD-ROM equipment, the CD-ROM equipment passes through general with host
Serial bus USB interface connects, the method includes:
The host is received to instruct for reading the reading of specified file by what the USB interface was sent;
The specified file for meeting ISO9660 standards in the CD-ROM equipment in CD is read, and the specified file is turned
Change the specified type file for meeting usb protocol into;
The specified type file being converted to by the USB interface to host transmission;
Wherein, it is described to read the specified file for meeting ISO9660 standards in the CD-ROM equipment in CD, and by the finger
Determine file and be converted into the specified type file for meeting usb protocol, including:
The specified file for meeting ISO9660 standards in the CD-ROM equipment in CD is read into the CD-ROM equipment
In data buffer, wherein, the CD-ROM equipment is according to the time shaft of the specified file is successively read from front to back
Data in specified file;
The specified type file that the specified file in the data buffer is converted into meeting usb protocol;
Wherein, by the process of the data deposit data buffer in the specified file, by the data in the data buffer
The process converted and by the data in the data buffer be sent to the process of the host for parallel three into
Journey.
2. according to the method described in claim 1, it is characterized in that, described be converted into specified type text by the specified file
Part, including:
If the specified file is unpressed audio file type, the specified file is converted into the specified type text
Part, the specified type file are WAV types, MP3 types, FLAC types or APE types.
3. method according to claim 1 or 2, which is characterized in that pass through the USB interface in the reception host
Before the reading instruction for being used to read specified file sent, further include:
After the CD-ROM equipment is connect by the USB interface with the host and the CD-ROM equipment is inserted into CD, obtain
The capacity parameter of the CD and the catalogue of file in the CD are taken, the capacity parameter of the CD includes the CD
Total capacity parameter and using capacity parameter, the catalogue includes bibliographic structure and filename;
The capacity parameter of the CD is converted to the capacity parameter for meeting the usb protocol;
The catalogue of the file is converted into the catalogue for meeting the usb protocol;
The property parameters of the CD-ROM equipment are defined as USB flash disk;
The property parameters after the transformed capacity parameter and the catalogue and definition are stored to data buffer
It is interior.
4. according to the method described in claim 3, it is characterized in that, described by the transformed capacity parameter and the mesh
After the property parameters after record and definition are stored to data buffer, further include:
It receives the host and reads instruction by what the USB interface was sent for reading the attribute of the CD-ROM equipment attribute;
The capacity parameter and the property parameters are read out of described data buffer;
The capacity parameter read and the property parameters are sent to the host by the USB interface.
5. it according to the method described in claim 3, it is characterized in that, is sent described in reading by the USB interface described
After capacity parameter, further include:
Receive the mesh for being used to read file directory in CD in the CD-ROM equipment that the host is sent by the USB interface
Instruction is read in record;
The catalogue is read out of described data buffer;
The catalogue read is sent to the host by the USB interface.
6. according to the method described in claim 3, it is characterized in that, the method further includes:
When the CD-ROM equipment is connect by the USB interface with the host and after CD export in the CD-ROM equipment,
Remove all data in the data buffer.
7. a kind of document reading apparatus, which is characterized in that applied in CD-ROM equipment, the CD-ROM equipment passes through general with host
Serial bus USB interface connects, and described device includes:
First receiving module, for receiving the reading for being used to read specified file that the host is sent by the USB interface
Instruction;
Type modular converter, for reading the specified file for meeting ISO9660 standards in the CD-ROM equipment in CD, and
The specified type file that the specified file is converted into meeting usb protocol;
File sending module, for sending what the type modular converter was converted to the host by the USB interface
The specified type file;
The type modular converter, including:
Document reading unit, for the specified file for meeting ISO9660 standards in the CD-ROM equipment in CD to be read
To the data buffer in the CD-ROM equipment, wherein, the CD-ROM equipment be according to the time shaft of the specified file from
The data being successively read after going in the specified file;
Type conversion unit, for the specified file in the data buffer to be converted into meeting described in usb protocol
Specified type file;
Wherein, by the process of the data deposit data buffer in the specified file, by the data in the data buffer
The process converted and by the data in the data buffer be sent to the process of the host for parallel three into
Journey.
8. device according to claim 7, which is characterized in that the type conversion unit is additionally operable to:
If the specified file is unpressed audio file type, the specified file is converted into the specified type text
Part, the specified type file are WAV types, MP3 types, FLAC types or APE types.
9. device according to claim 7 or 8, which is characterized in that described device further includes:
Parameter acquisition module, for working as, the CD-ROM equipment is connect by the USB interface with the host and the CD-ROM drive is set
It is standby be inserted into CD after, obtain the capacity parameter of the CD and the catalogue of file in the CD, the capacity of the CD
Parameter includes the total capacity parameter of the CD and using capacity parameter, and the catalogue includes bibliographic structure and filename;
Parameter Switch module, for the capacity parameter of the CD that the parameter acquisition module obtains is converted to meet it is described
The capacity parameter of usb protocol;
Catalogue modular converter, for the catalogue of the file that the parameter acquisition module obtains to be converted into meeting the USB
The catalogue of agreement;
Attribute definition module, for the property parameters of the CD-ROM equipment to be defined as USB flash disk;
Memory module, for the property parameters after the transformed capacity parameter and the catalogue and definition to be stored
To data buffer.
10. device according to claim 9, which is characterized in that described device further includes:
Second receiving module, for receive the host by the USB interface send for reading the CD-ROM equipment category
Property attribute read instruction;
First read module, for reading the capacity parameter and the property parameters out of described data buffer;
Attribute sending module sends the capacity parameter read and the category for passing through the USB interface to the host
Property parameter.
11. device according to claim 9, which is characterized in that described device further includes:
Third receiving module is used to read in the CD-ROM equipment for receiving the host by what the USB interface was sent
The catalogue of file directory reads instruction in CD;
Second read module, for reading the catalogue out of described data buffer;
Catalogue sending module, for sending the catalogue read to the host by the USB interface.
12. device according to claim 9, which is characterized in that described device further includes:
Module is removed, is connect for working as the CD-ROM equipment by the USB interface with the host and in the CD-ROM equipment
CD export after, remove all data in the data buffer.
13. a kind of CD-ROM drive driving plate, which is characterized in that the CD-ROM drive driving plate is included as described in any in claim 7 to 12
Document reading apparatus.
14. a kind of CD-ROM equipment, which is characterized in that the CD-ROM equipment includes CD-ROM drive driving plate as claimed in claim 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510092241.8A CN104679697B (en) | 2015-02-28 | 2015-02-28 | File reading, device and CD-ROM drive driving plate and CD-ROM equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510092241.8A CN104679697B (en) | 2015-02-28 | 2015-02-28 | File reading, device and CD-ROM drive driving plate and CD-ROM equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104679697A CN104679697A (en) | 2015-06-03 |
CN104679697B true CN104679697B (en) | 2018-06-08 |
Family
ID=53314769
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510092241.8A Active CN104679697B (en) | 2015-02-28 | 2015-02-28 | File reading, device and CD-ROM drive driving plate and CD-ROM equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104679697B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664421B (en) * | 2018-04-28 | 2020-04-28 | 广州酷狗计算机科技有限公司 | Method, device and storage medium for acquiring multimedia data |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102467921A (en) * | 2010-11-10 | 2012-05-23 | 日立-Lg数据存储韩国公司 | Optical disc drive capable of changing mode and mode-changing method |
CN102750958A (en) * | 2010-12-17 | 2012-10-24 | 日立-Lg数据存储韩国公司 | Method for converting data in optical disc drive |
CN103594099A (en) * | 2012-08-14 | 2014-02-19 | 建兴电子科技股份有限公司 | External CD module with USB interface and operation method thereof |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130076633A1 (en) * | 2011-09-27 | 2013-03-28 | Ctx Virtual Technologies | Integrated, portable computing and entertainment device |
-
2015
- 2015-02-28 CN CN201510092241.8A patent/CN104679697B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102467921A (en) * | 2010-11-10 | 2012-05-23 | 日立-Lg数据存储韩国公司 | Optical disc drive capable of changing mode and mode-changing method |
CN102750958A (en) * | 2010-12-17 | 2012-10-24 | 日立-Lg数据存储韩国公司 | Method for converting data in optical disc drive |
CN103594099A (en) * | 2012-08-14 | 2014-02-19 | 建兴电子科技股份有限公司 | External CD module with USB interface and operation method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN104679697A (en) | 2015-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111381954B (en) | Audio data recording method, system and terminal equipment | |
KR101229522B1 (en) | Efficient low power retrieval techniques of media data from non-volatile memory | |
US20030002194A1 (en) | Record and playback apparatus, and the method | |
US20200021772A1 (en) | Multimedia recording data obtaining method and terminal device | |
CN104679697B (en) | File reading, device and CD-ROM drive driving plate and CD-ROM equipment | |
US7314180B2 (en) | Memory card and reproducing apparatus | |
CN101656089A (en) | Apparatus and method for playing digital audio and video | |
CN101025724A (en) | Audio media storage and play device | |
CN210776642U (en) | Automatic disk splicing device for multiple TF cards | |
US20020156986A1 (en) | Storage medium, a data obtaining apparatus, a data holding apparatus, a data obtaining method, and a data holding method | |
EP2492915B1 (en) | Optical disc drive and method of accessing optical disc | |
CN201936613U (en) | Effector with built-in various kinds of background music | |
CN102147766B (en) | Method for maintaining TCP (Transmission Control Protocol) stream table structure and unordered buffer area | |
US20100202468A1 (en) | Bridge, data compressing method thereof and computer system applying the same | |
US20080282010A1 (en) | Apparatus for digital/analog audio storage and playback | |
CN2922038Y (en) | Digital sound effect device with recording function | |
JP2006127401A (en) | Medium storage device, cache segment switch method for the same, and medium storage system | |
US20010018683A1 (en) | High-speed audio/video information server and magnetic disk device extension method thereof | |
US20030226119A1 (en) | Integrated circuit design of a standard access interface for playing compressed music | |
CN111757168B (en) | Audio decoding method, device, storage medium and equipment | |
JP2006065505A (en) | Memory card and reproducing apparatus | |
JP4655547B2 (en) | Memory card and method for making the same | |
CN101739216B (en) | External device with virtual storage device | |
CN114817626A (en) | Video data processing method, device and computer readable storage medium | |
CN116325697A (en) | Fast in-place FMP4 to MP4 conversion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17 Applicant after: Guangzhou KuGou Networks Co., Ltd. Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F Applicant before: Guangzhou KuGou Networks Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |