CN104679697A - File reading method and device, optical drive driver board and optical drive equipment - Google Patents

File reading method and device, optical drive driver board and optical drive equipment Download PDF

Info

Publication number
CN104679697A
CN104679697A CN201510092241.8A CN201510092241A CN104679697A CN 104679697 A CN104679697 A CN 104679697A CN 201510092241 A CN201510092241 A CN 201510092241A CN 104679697 A CN104679697 A CN 104679697A
Authority
CN
China
Prior art keywords
file
main frame
rom
reading
catalogue
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.)
Granted
Application number
CN201510092241.8A
Other languages
Chinese (zh)
Other versions
CN104679697B (en
Inventor
张斐斐
罗艾亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201510092241.8A priority Critical patent/CN104679697B/en
Publication of CN104679697A publication Critical patent/CN104679697A/en
Application granted granted Critical
Publication of CN104679697B publication Critical patent/CN104679697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a file reading method and device, an optical drive driver board and optical drive driver equipment and belongs to the technical field of computers. The file reading method comprises the steps of receiving a reading instruction for reading an appointed file sent by a host computer through a USB interface (Universal Serial Bus), reading the appointed file which is stored in a compact disk of the optical drive equipment and meets the ISO9660 standard, converting the appointed file into a file in an appointed type meeting the USB protocol and sending the converted file in the appointed type to the host computer through the USB interface. Due to the facts that the ISO9660 file in the compact disk is converted into the file meeting the USB protocol and the converted file is sent to the host computer, the problem that a host computer without a optical drive program cannot normally utilize the optical drive equipment in the prior art is solved. Furthermore, the effect that the host computer without the optical drive program can still normally access to the file in the compact disk of the optical drive equipment is achieved.

Description

File reading, device and CD-ROM drive drive plate and CD-ROM equipment
Technical field
The present invention relates to field of computer technology, particularly a kind of file reading, device and CD-ROM drive drive plate and CD-ROM equipment.
Background technology
CD is the conventional mass-memory unit for storage file.When using CD, because a lot of main frame does not have CD-ROM drive at present, (English: Universal Serial Bus is called for short: USB) CD-ROM equipment of interface is connected with main frame therefore to need utilization to arrange USB (universal serial bus).
These CD-ROM equipments with USB interface can be connected with main frame by USB interface, and after these CD-ROM equipments are connected with main frame, these CD-ROM equipments can be identified as CD-ROM drive by main frame.Main frame with the driver of CD-ROM drive, must could read the file in CD-ROM equipment.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem: main frame needs the data that could read with the driver of CD-ROM drive in external CD-ROM equipment, and the main frame (such as mobile phone, panel computer) not with CD-ROM drive driver then normally cannot use CD-ROM equipment.
Summary of the invention
In order to the main frame solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment, embodiments provide a kind of file reading, device and CD-ROM drive drive plate and CD-ROM equipment.Described technical scheme is as follows:
First aspect, provides a kind of file reading, it is characterized in that, is applied in CD-ROM equipment, and described CD-ROM equipment is connected by general-purpose serial bus USB interface with main frame, and described method comprises:
Receive the reading command for reading specified file that described main frame is sent by described USB interface;
Read the described specified file meeting ISO9660 standard in described CD-ROM equipment in CD, and described specified file is converted to the specified type file meeting usb protocol;
Sent the described specified type file be converted to described main frame by described USB interface.
Optionally, in the described CD-ROM equipment of described reading, in CD, meet the described specified file of ISO9660 standard, and described specified file converted to the specified type file meeting usb protocol, comprising:
The described specified file meeting ISO9660 standard in CD in described CD-ROM equipment is read in the data buffer in described CD-ROM equipment;
Described specified file in described data buffer is converted to the described specified type file meeting usb protocol.
Optionally, describedly convert described specified file to specified type file, comprising:
If described specified file is unpressed audio file type, then convert described specified file to described specified type file, described specified type file is WAV type, MP3 type, FLAC type or APE type.
Optionally, the described main frame of described reception sent by described USB interface for read specified file reading command before, also comprise:
After described CD-ROM equipment to be connected with described main frame by described USB interface and described CD-ROM equipment is inserted into CD, obtain the capacity parameter of described CD and the catalogue of described CD file, the capacity parameter of described CD comprises the total volume parameter of described CD and uses capacity parameter, and described catalogue comprises bibliographic structure and filename;
The capacity parameter of described CD is changed into the capacity parameter meeting described usb protocol;
The catalogue of described file is converted to the catalogue meeting described usb protocol;
The property parameters of described CD-ROM equipment is defined as USB flash disk;
Described property parameters after described capacity parameter after conversion and described catalogue and definition is stored in data buffer.
Optionally, described by conversion after described capacity parameter and described catalogue and definition after described property parameters be stored in data buffer after, also comprise:
Receive the attribute reading command for reading described CD-ROM equipment attribute that described main frame is sent by described USB interface;
Described capacity parameter and described property parameters is read in described data buffer;
Sent the described capacity parameter and described property parameters that read to described main frame by described USB interface.
Optionally, after the described described capacity parameter read by described USB interface transmission, also comprise:
Receive the catalogue reading command for reading CD file catalogue in described CD-ROM equipment that described main frame is sent by described USB interface;
Described catalogue is read in described data buffer;
Sent the described catalogue read to described main frame by described USB interface.
Optionally, described method also comprises:
After described CD-ROM equipment to be connected with described main frame by described USB interface and CD in described CD-ROM equipment delivers from godown, remove all data in described data buffer.
Second aspect, provides a kind of document reading apparatus, is applied in CD-ROM equipment, and described CD-ROM equipment is connected by general-purpose serial bus USB interface with main frame, and described device comprises:
First receiver module, for receiving the reading command for reading specified file that described main frame is sent by described USB interface;
Type conversion module, for reading the described specified file meeting ISO9660 standard in described CD-ROM equipment in CD, and converts the specified type file meeting usb protocol to by described specified file;
File send module, for sending to described main frame the described specified type file that described type conversion module converts obtains by described USB interface.
Optionally, described type conversion module, comprising:
Document reading unit, for reading in the data buffer in described CD-ROM equipment by the described specified file meeting ISO9660 standard in CD in described CD-ROM equipment;
Type conversion unit, for converting the described specified type file meeting usb protocol to by the described specified file in described data buffer.
Optionally, described type conversion unit, also for:
If described specified file is unpressed audio file type, then convert described specified file to described specified type file, described specified type file is WAV type, MP3 type, FLAC type or APE type.
Optionally, described device also comprises:
Parameter acquisition module, for to be connected with described main frame by described USB interface when described CD-ROM equipment and after described CD-ROM equipment is inserted into CD, obtain the capacity parameter of described CD and the catalogue of described CD file, the capacity parameter of described CD comprises the total volume parameter of described CD and uses capacity parameter, and described catalogue comprises bibliographic structure and filename;
Parameter Switch module, the capacity parameter for the described CD described parameter acquisition module obtained changes into the capacity parameter meeting described usb protocol;
Catalogue modular converter, the catalogue for the described file described parameter acquisition module obtained converts the catalogue meeting described usb protocol to;
Attribute definition module, for being defined as USB flash disk by the property parameters of described CD-ROM equipment;
Memory module, for being stored to the described property parameters after the described capacity parameter after conversion and described catalogue and definition in data buffer.
Optionally, described device also comprises:
Second receiver module, for receiving the attribute reading command for reading described CD-ROM equipment attribute that described main frame is sent by described USB interface;
First read module, for reading described capacity parameter and described property parameters in described data buffer;
Attribute sending module, for sending the described capacity parameter and described property parameters that read to described main frame by described USB interface.
Optionally, described device also comprises:
3rd receiver module, for receiving the catalogue reading command for reading CD file catalogue in described CD-ROM equipment that described main frame is sent by described USB interface;
Second read module, for reading described catalogue in described data buffer;
Catalogue sending module, for sending the described catalogue read to described main frame by described USB interface.
Optionally, described device also comprises:
Remove module, for be connected with described main frame by described USB interface when described CD-ROM equipment and after CD in described CD-ROM equipment delivers from godown, to remove all data in described data buffer.
The third aspect, provides a kind of CD-ROM drive drive plate, and described CD-ROM drive drive plate comprises the document reading apparatus as provided in second aspect and the various possibility of second aspect.
Fourth aspect, provides a kind of CD-ROM equipment, and described CD-ROM equipment comprises the CD-ROM drive drive plate as the third aspect provides.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
After becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, the file after conversion is sent to main frame; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access optical file in CD-ROM equipment.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
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 is the method flow diagram of the file reading provided in another embodiment of the present invention;
Fig. 3 B is the method flow diagram of the file reading provided in another embodiment of the present invention;
Fig. 3 C is the method flow diagram of the file reading provided in another 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 the CD-ROM drive drive 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.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
For the ease of the understanding of the present invention, first some nouns that the present invention relates to are made an explanation:
File system: the software mechanism of storage and constituent act information.
ISO 9660: compact disk file system is a kind of is the file system that optical disc medium is issued by ISO (International Standards Organization).
FAT32: a kind of by nearly all operating system compatibility and the file system identified.
CD-ROM drive movement: be called for short movement, makes a general reference for CD read and write and the summation of CD-ROM drive motor, laser head, electronic package and physical construction that designs.
CD-ROM drive drive plate: or claim CD-ROM drive decoding deck, be responsible for the circuit board controlling movement work.
Drive plate firmware: make drive plate realize expectation function and the software write, programming is in the control chip of drive plate.
Fig. 1 is the method flow diagram of the file reading provided in one embodiment of the invention, shown in Figure 1, this file reading is applied in CD-ROM equipment, this CD-ROM equipment is connected by USB interface with main frame, and main frame said here can be smart mobile phone, panel computer, multimedia player, Wearable device etc.This file reading comprises:
Step 101, the reading command for reading specified file that Receiving Host is sent by USB interface.
Step 102, reads the specified file meeting ISO9660 standard in CD-ROM equipment in CD, and specified file is converted to the specified type file meeting usb protocol.
Because the file in CD is all the files meeting ISO9660 standard, and the file of ISO9660 standard can not identify by usb protocol, but usb protocol can identify the file of the non-ISO9660 standard such as FAT32, FAT16, therefore in order to ensure that main frame still can identify the file in CD under the prerequisite not possessing CD-ROM drive driver, the file becoming to meet usb protocol type by the ISO9660 file transform read in CD is needed.
Step 103, sends the specified type file be converted to main frame by USB interface.
In sum, the file reading that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access 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, shown in Figure 2, this file reading is applied in CD-ROM equipment, this CD-ROM equipment is connected by USB interface with main frame, and main frame said here can be smart mobile phone, panel computer, multimedia player, Wearable device etc.This file reading comprises:
Step 201, the reading command for reading specified file that Receiving Host is sent by USB interface.
When main frame needs to read certain file in CD-ROM equipment in CD, can by USB interface to the reading command of CD-ROM equipment transmission for reading specified file.Corresponding, CD-ROM equipment can receive the reading command for reading specified file that main frame is sent by USB interface.
Step 202, reads to the specified file meeting ISO9660 standard in CD in CD-ROM equipment in the data buffer in CD-ROM equipment.
Because the file in CD is all the files meeting ISO9660 standard, and the file of ISO9660 standard can not identify by usb protocol, but usb protocol can identify the file of the non-ISO9660 standard such as FAT32, FAT16, therefore in order to ensure that main frame still can identify the file in CD under the prerequisite not possessing CD-ROM drive driver, the file becoming to meet usb protocol type by the ISO9660 file transform read in CD is needed.
Because data conversion needs certain time delay, therefore in order to ensure that main frame is at the fluency reading CD file, can read to the specified file in CD in CD-ROM equipment in the data buffer in CD-ROM equipment.
Optionally, can prestore a buffer area in data buffer, this buffer area can be exclusively used in the file data storing and read from CD.
It should be noted that, because the size of data buffer or buffer area is usually smaller, the size of an audio file can be less than even, the size of such as data buffer or buffer area is 2M, and the size of an audio file can be 2M or more than 2M, therefore, CD-ROM equipment, when reading specified file from CD, can read the data in this specified file from front to back successively according to the time shaft of this specified file.
Also it should be added that, because the specified file stored in CD is generally uncompressed file, the partial data of specified file can be read by the time shaft of specified file.
Step 203, converts the specified type file meeting usb protocol to by the specified file in data buffer.
As long as incorporate the data of specified file in data buffer, then directly can convert these data to specified type file.
Optionally, CD-ROM equipment is when converting specified type file to by specified file, can comprise: if specified file is unpressed audio file type, then convert specified file to specified type file, specified type file is that sound waveform audio format is (English: WAVEform audio format Sound, be called for short: WAV) type, dynamic image expert compression standard audio frequency aspect 3 is (English: Moving Picture Experts Group Audio Layer III, be called for short: MP3) type, Lossless Audio Compression coding is (English: Free Lossless Audio Codec, be called for short: FLAC) type or digital music lossless compression-encoding APE type.
Above-mentioned specified type file all can be identified when no CD drive driver by main frame.
Step 204, sends the specified type file be converted to main frame by USB interface.
Data after conversion, after the data in data buffer being changed, directly can be sent to main frame by USB interface by CD-ROM equipment.
Optionally, to data buffer stored in the process of data, the data in data buffer are carried out the process changed and the process that data buffer is sent to main frame can be three parallel processes.
In sum, the file reading that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access optical file in CD-ROM equipment.
In actual applications, for the main frame not installing CD-ROM drive driver, external equipment should be USB flash disk, instead of CD, therefore, in order to ensure after CD-ROM equipment is connected with main frame, on main frame, this CD can be shown as USB flash disk, can also disguise oneself as the attribute of CD-ROM equipment USB flash disk.Also namely in fig. 2 before step 201, can also disguise oneself as the attribute of CD-ROM equipment USB flash disk, and the information after camouflage is sent to main frame, and the information after camouflage may be used for trigger host and shows.Specifically can see the description in Fig. 3 A.
Fig. 3 A is the method flow diagram of the file reading provided in another embodiment of the present invention, refer to shown in Fig. 3 A, this file reading is applied in CD-ROM equipment, this CD-ROM equipment is connected by USB interface with main frame, and main frame said here can be smart mobile phone, panel computer, multimedia player, Wearable device etc.This file reading comprises:
Step 301, after CD-ROM equipment to be connected with main frame by USB interface and CD-ROM equipment is inserted into CD, obtain the capacity parameter of CD and the catalogue of CD file, the capacity parameter of CD comprises the total volume parameter of CD and uses capacity parameter, and catalogue comprises bibliographic structure and filename.
After CD-ROM equipment to be connected with main frame by USB interface and CD-ROM equipment is inserted into CD, main frame needs the information obtaining this CD-ROM equipment usually, the attribute information, capacity information, directory information etc. of such as CD-ROM equipment.Wherein attribute information is used to indicate the type of CD-ROM equipment, and capacity information comprises total volume and the use capacity of CD in CD-ROM equipment, and directory information comprises the catalogue of each file in CD.
Here said catalogue can comprise bibliographic structure and filename.Wherein, bibliographic structure refers to the structure that each filename forms, and this structure is generally tree structure.In bibliographic structure, each filename can as the node of this bibliographic structure.
Obviously, when there is file in CD, file can as a special file, or this catalogue can also comprise folder name.Wherein, folder name as the node of in bibliographic structure, and in this file the filename of file in bibliographic structure as the child node of node corresponding to this folder name.
This bibliographic structure is used to indicate the structure between each file, between each file and between file and file.
Therefore, after CD-ROM equipment to be connected with main frame by USB interface and CD-ROM equipment is inserted into CD, first CD-ROM equipment obtains the capacity parameter of CD and the catalogue of CD file.
Step 302, changes into the capacity parameter meeting usb protocol by the capacity parameter of CD.
In general, the capacity parameter of CD that drive apparatus obtains and the catalogue of CD file normally utilize ISO9660 standard to describe, therefore the capacity parameter of these CDs obtained and the catalogue of CD file usually can not by usb protocol identifications, in order to ensure by usb protocol identification, the capacity parameter of the CD of acquisition can be changed into the capacity parameter meeting usb protocol.
Step 303, converts the catalogue meeting usb protocol to by the catalogue of file.
Similar, can the catalogue of the CD file of acquisition be converted to meet usb protocol catalogue.
Step 304, is defined as USB flash disk by the property parameters of CD-ROM equipment.
In actual applications, in order to ensure that this CD-ROM equipment identification can be become USB flash disk by main frame, and show the drive of USB flash disk, 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 passes to main frame.
Step 305, is stored to the property parameters after the capacity parameter after conversion and catalogue and definition in data buffer.
Generally, as long as the CD in this CD-ROM equipment does not deliver from godown, the attribute after the capacity parameter after conversion and catalogue and definition is stored in data buffer all always.To ensure, the information of the reading CD-ROM equipment of main frame randomness.
Optionally, in data buffer, also can not store the property parameters being defined as USB flash disk, but when main frame needs to learn this property parameters, perform step 304, and the property parameters being defined as USB flash disk is passed to main frame.
Optionally, data buffer is first in first out in storage data and mode when being read data.Due to data can be read according to the time shaft of file from file, and sequentially data are write to data buffer, then sequentially from data buffer, data are read out, and send to main frame after converting the data read out to specified type file, thus avoid main frame distortion when playing this file.
In sum, the file reading that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access optical file in CD-ROM equipment.
In addition, first stored in data buffer by the file will read from CD, when changing, data are read from data buffer, and convert data to specified type file, thus can ensure to send to the data of main frame according to original order sequence, avoid distortion.
Realize in scene in one, after step 305, main frame may need property parameters and the capacity parameter of knowing CD-ROM equipment, it is USB flash disk or CD that such as main frame needs to show this external equipment, and the capacity of external equipment is how many, now then can read the information meeting usb protocol standard in the data buffer of CD-ROM equipment.Specifically can see the description in Fig. 3 B.
Fig. 3 B is the method flow diagram of the file reading provided in another embodiment of the present invention, refer to shown in Fig. 3 B, this file reading is applied in CD-ROM equipment, this CD-ROM equipment is connected by USB interface with main frame, and main frame said here can be smart mobile phone, panel computer, multimedia player, Wearable device etc.This file reading comprises:
Step 306, the attribute reading command for reading CD-ROM equipment attribute that Receiving Host is sent by USB interface.
After step 305, if CD-ROM equipment have received the attribute reading command that main frame sends, show that main frame needs to learn property parameters and the capacity parameter of CD-ROM equipment, now in order to ensure that the main frame without CD-ROM drive driver can identify property parameters and the capacity parameter of CD-ROM equipment, CD-ROM equipment then can perform step 307.
Step 307, reads capacity parameter and property parameters in data buffer.
Obviously, the capacity parameter in data buffer and property parameters all meet usb protocol.
Step 308, sends the capacity parameter and property parameters that read to main frame by USB interface.
After the capacity parameter and property parameters that meet usb protocol send to main frame by USB interface, CD-ROM equipment then directly can be identified as USB flash disk according to property parameters by main frame, and show USB flash disk drive, when showing USB flash disk drive, each capacity information of CD in this CD-ROM equipment can also be shown simultaneously.
In sum, the file reading that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access optical file in CD-ROM equipment.
In addition, due to after receiving the attribute reading command that main frame sends, the capacity parameter and property parameters that meet usb protocol can be sent to main frame in data buffer, therefore ensure that main frame can the normally capacity information of display light drive apparatus and attribute information.
Realize in scene in one, after step 308, main frame is after the drive of this CD-ROM equipment of display, and also may need the file directory knowing CD in CD-ROM equipment, now CD-ROM equipment then can read the catalogue meeting usb protocol standard in data buffer.Specifically can see the description in Fig. 3 C.
Fig. 3 C is the method flow diagram of the file reading provided in another embodiment of the present invention, refer to shown in Fig. 3 C, this file reading is applied in CD-ROM equipment, this CD-ROM equipment is connected by USB interface with main frame, and main frame said here can be smart mobile phone, panel computer, multimedia player, Wearable device etc.This file reading comprises:
Step 309, the catalogue reading command for reading CD file catalogue in CD-ROM equipment that Receiving Host is sent by USB interface.
Step 310, reads catalogue in data buffer.
Obviously, the catalogue in data buffer meets usb protocol.
Step 311, sends the catalogue read to main frame by USB interface.
After the catalogue meeting usb protocol sends to main frame by USB interface, main frame then can show the file directory of CD in this CD-ROM equipment.
In sum, the file reading that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access optical file in CD-ROM equipment.
In addition, due to after receiving the catalogue reading command that main frame sends, the catalogue meeting usb protocol can be sent to main frame in data buffer, therefore ensure that main frame can file directory normally in display light drive apparatus in CD.
In a kind of possible implementation, after CD-ROM equipment to be connected with main frame by USB interface and CD in CD-ROM equipment delivers from godown, CD-ROM equipment can clear data all data in buffer.Like this, after other CDs are inserted into this CD-ROM equipment, can ensure that data in data buffer can the unique corresponding current CD be inserted in 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 apparatus can be implemented to become all or part of of CD-ROM equipment by software, hardware or both combination, this CD-ROM equipment is connected by USB interface with main frame, and main frame said here can be smart mobile phone, panel computer, multimedia player, Wearable device etc.This document reading apparatus comprises: the first receiver module 402, type conversion module 404 and file send module 406.
First receiver module 402, for receiving the reading command for reading specified file that this main frame is sent by this USB interface;
Type conversion module 404, for reading the specified file meeting ISO9660 standard in CD-ROM equipment in CD, and converts the specified type file meeting usb protocol to by specified file;
File send module 406, for sending to this main frame this specified type file that the type modular converter is converted to by this USB interface.
In sum, the document reading apparatus that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access 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, shown in Figure 5, this document reading apparatus can be implemented to become all or part of of CD-ROM equipment by software, hardware or both combination, this CD-ROM equipment is connected by USB interface with main frame, and main frame said here can be smart mobile phone, panel computer, multimedia player, Wearable device etc.This document reading apparatus comprises: the first receiver module 502, type conversion module 504 and file send module 506.
First receiver module 502, for receiving the reading command for reading specified file that this main frame is sent by this USB interface;
Type conversion module 504, for reading the specified file meeting ISO9660 standard in CD-ROM equipment in CD, and converts the specified type file meeting usb protocol to by specified file;
File send module 506, for sending to this main frame this specified type file that the type modular converter is converted to by this USB interface.
In the optional implementation of one, the type modular converter 504, comprising: document reading unit 504a and type conversion unit 504b.
Document reading unit 504a, for reading in the data buffer in this CD-ROM equipment by this specified file meeting ISO9660 standard in CD in this CD-ROM equipment;
Type conversion unit 504b, for converting this specified type file meeting usb protocol to by this specified file in this data buffer.
In the optional implementation of one, type conversion unit 504b, also for:
If this specified file is unpressed audio file type, then convert this specified file to this specified type file, this specified type file is WAV type, MP3 type, FLAC type or APE type.
In the optional implementation of one, document reading apparatus can also comprise: parameter acquisition module 508, Parameter Switch module 510, catalogue modular converter 512, attribute definition module 514 and memory module 516.
Parameter acquisition module 508, for to be connected with this main frame by this USB interface when this CD-ROM equipment and after this CD-ROM equipment is inserted into CD, obtain the capacity parameter of this CD and the catalogue of this CD file, the capacity parameter of this CD comprises the total volume parameter of this CD and uses capacity parameter, and catalogue comprises bibliographic structure and filename;
Parameter Switch module 510, the capacity parameter for this CD this parameter acquisition module 508 obtained changes into the capacity parameter meeting this usb protocol;
Catalogue modular converter 512, the catalogue for this file this parameter acquisition module 508 obtained converts the catalogue meeting this usb protocol to;
Attribute definition module 514, for being defined as USB flash disk by the attribute of this CD-ROM equipment;
Memory module 516, for by conversion after this capacity parameter and this catalogue and definition after this property store in data buffer.
In the optional implementation of one, this document reading apparatus can also comprise: the second receiver module 518, first read module 520 and attribute sending module 522.
Second receiver module 518, for receiving the attribute reading command for reading this CD-ROM equipment attribute that this main frame is sent by this USB interface;
First read module 520, for reading this capacity parameter and this attribute in this data buffer;
Attribute sending module 522, for sending this capacity parameter and this attribute of reading to this main frame by this USB interface.
In the optional implementation of one, this document reading apparatus can also comprise: the 3rd receiver module 524, second read module 526 and catalogue sending module 528.
3rd receiver module 524, for receiving the catalogue reading command for reading CD file catalogue in this CD-ROM equipment that this main frame is sent by this USB interface;
Second read module 526, for reading this catalogue in this data buffer;
Catalogue sending module 528, for sending this catalogue read to this main frame by this USB interface.
In the optional implementation of one, this document reading apparatus can also comprise: remove module 530.
Remove module 530, for be connected with this main frame by this USB interface when this CD-ROM equipment and after CD in this CD-ROM equipment delivers from godown, to remove all data in this data buffer.
In sum, the document reading apparatus that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access optical file in CD-ROM equipment.
In addition, first stored in data buffer by the file will read from CD, when changing, data are read from data buffer, and convert data to specified type file, thus can ensure to send to the data of main frame according to original order sequence, avoid distortion.
Due to after receiving the attribute reading command that main frame sends, the capacity parameter and property parameters that meet usb protocol can be sent to main frame in data buffer, therefore ensure that main frame can the normally capacity information of display light drive apparatus and attribute information.
Due to after receiving the catalogue reading command that main frame sends, the catalogue meeting usb protocol can be sent to main frame in data buffer, therefore ensure that main frame can file directory normally in display light drive apparatus in CD.
It should be noted that: the document reading apparatus provided in above-described embodiment is when reading file in CD, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by CD-ROM equipment is divided into different functional modules, to complete all or part of function described above.In addition, the document reading apparatus that above-described embodiment provides and file reading embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The present invention also provides a kind of CD-ROM drive drive plate, and this CD-ROM drive drive plate comprises the document reading apparatus described in Fig. 4 or Fig. 5.
Fig. 6 is the block diagram of the CD-ROM drive drive plate provided in one embodiment of the invention, and this CD-ROM drive drive plate comprises CD-ROM drive motor interface 601, laser head interface 602, sensor interface 603, motor driver 604, USB interface 605 and processor 606.
CD-ROM drive drive plate is connected with the movement of CD-ROM equipment by CD-ROM drive motor interface 601, laser head interface 602, sensor interface 603 (optional), control the operation such as movement writable disc, turnover storehouse CD, and can USB interface 605 and main-machine communication be passed through.
Processor 606 is logic control and the arithmetic center of CD-ROM drive drive plate, and processor 606 performs corresponding instruction according to the design of drive plate firmware, controls the correct work of movement, and is communicated with main frame by USB interface 605.
Optionally, this CD-ROM drive drive plate can also comprise program storage 607, and wherein program storage 607 may be used for storing driver plate firmware, and drive plate firmware here comprises the document reading apparatus in Fig. 4 or Fig. 5.Optionally, this program storage 607 can be independent chip, also can be integrated into same chip with processor 606.
Optionally, this CD-ROM drive drive plate can also comprise data buffer 608, and wherein data buffer 608 may be used for buffering, keeps in from disc reading data.Optionally, this data buffer 608 can be independent chip, also can be integrated in same chip with processor 606.
In sum, the CD-ROM drive drive plate that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access optical file in CD-ROM equipment.
The present invention also provides a kind of CD-ROM equipment, and this CD-ROM equipment comprises CD-ROM drive drive plate, and this CD-ROM drive drive plate can comprise the document reading apparatus described in Fig. 4 or Fig. 5, or this CD-ROM drive drive plate can CD-ROM drive drive plate described in Fig. 6.
Fig. 7 is the block diagram of the CD-ROM equipment provided in one embodiment of the invention, and this CD-ROM equipment comprises CD-ROM drive drive plate 701, CD-ROM drive movement 702 and CD 703.
Wherein CD-ROM drive drive plate 701 can CD-ROM drive drive plate described in Fig. 6, specifically can see in Fig. 6 to the description of CD-ROM drive drive plate, just repeat no more here.
In use, CD 703 can inject in CD-ROM equipment, also can deliver from godown from CD-ROM equipment.
In sum, the CD-ROM equipment that the embodiment of the present invention provides, after becoming to meet the file of usb protocol type by the file transform of ISO9660 standard in CD, sends to main frame by the file after conversion; Due to the file of ISO9660 standard that can will need in CD by the identification of CD-ROM drive driver, convert the file meeting usb protocol type to, therefore the file after conversion can not had the main frame identification of CD-ROM drive driver, and the main frame therefore solved not with CD-ROM drive driver in prior art normally cannot use the problem of CD-ROM equipment; Reach the effect that the main frame that can ensure not with CD-ROM drive driver still normally can access optical file in CD-ROM equipment.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (16)

1. a file reading, is characterized in that, is applied in CD-ROM equipment, and described CD-ROM equipment is connected by general-purpose serial bus USB interface with main frame, and described method comprises:
Receive the reading command for reading specified file that described main frame is sent by described USB interface;
Read the described specified file meeting ISO9660 standard in described CD-ROM equipment in CD, and described specified file is converted to the specified type file meeting usb protocol;
Sent the described specified type file be converted to described main frame by described USB interface.
2. method according to claim 1, is characterized in that, meets the described specified file of ISO9660 standard in the described CD-ROM equipment of described reading in CD, and described specified file is converted to the specified type file meeting usb protocol, comprising:
The described specified file meeting ISO9660 standard in CD in described CD-ROM equipment is read in the data buffer in described CD-ROM equipment;
Described specified file in described data buffer is converted to the described specified type file meeting usb protocol.
3. method according to claim 1, is characterized in that, describedly converts described specified file to specified type file, comprising:
If described specified file is unpressed audio file type, then convert described specified file to described specified type file, described specified type file is WAV type, MP3 type, FLAC type or APE type.
4., according to described method arbitrary in claims 1 to 3, it is characterized in that, the described main frame of described reception sent by described USB interface for read specified file reading command before, also comprise:
After described CD-ROM equipment to be connected with described main frame by described USB interface and described CD-ROM equipment is inserted into CD, obtain the capacity parameter of described CD and the catalogue of described CD file, the capacity parameter of described CD comprises the total volume parameter of described CD and uses capacity parameter, and described catalogue comprises bibliographic structure and filename;
The capacity parameter of described CD is changed into the capacity parameter meeting described usb protocol;
The catalogue of described file is converted to the catalogue meeting described usb protocol;
The property parameters of described CD-ROM equipment is defined as USB flash disk;
Described property parameters after described capacity parameter after conversion and described catalogue and definition is stored in data buffer.
5. method according to claim 4, is characterized in that, described by conversion after described capacity parameter and described catalogue and definition after described property parameters be stored in data buffer after, also comprise:
Receive the attribute reading command for reading described CD-ROM equipment attribute that described main frame is sent by described USB interface;
Described capacity parameter and described property parameters is read in described data buffer;
Sent the described capacity parameter and described property parameters that read to described main frame by described USB interface.
6. method according to claim 4, is characterized in that, after the described described capacity parameter read by described USB interface transmission, also comprises:
Receive the catalogue reading command for reading CD file catalogue in described CD-ROM equipment that described main frame is sent by described USB interface;
Described catalogue is read in described data buffer;
Sent the described catalogue read to described main frame by described USB interface.
7. method according to claim 4, is characterized in that, described method also comprises:
After described CD-ROM equipment to be connected with described main frame by described USB interface and CD in described CD-ROM equipment delivers from godown, remove all data in described data buffer.
8. a document reading apparatus, is characterized in that, is applied in CD-ROM equipment, and described CD-ROM equipment is connected by general-purpose serial bus USB interface with main frame, and described device comprises:
First receiver module, for receiving the reading command for reading specified file that described main frame is sent by described USB interface;
Type conversion module, for reading the described specified file meeting ISO9660 standard in described CD-ROM equipment in CD, and converts the specified type file meeting usb protocol to by described specified file;
File send module, for sending to described main frame the described specified type file that described type conversion module converts obtains by described USB interface.
9. device according to claim 8, is characterized in that, described type conversion module, comprising:
Document reading unit, for reading in the data buffer in described CD-ROM equipment by the described specified file meeting ISO9660 standard in CD in described CD-ROM equipment;
Type conversion unit, for converting the described specified type file meeting usb protocol to by the described specified file in described data buffer.
10. device according to claim 8, is characterized in that, described type conversion unit, also for:
If described specified file is unpressed audio file type, then convert described specified file to described specified type file, described specified type file is WAV type, MP3 type, FLAC type or APE type.
Arbitrary described device in 11. according to Claim 8 to 10, it is characterized in that, described device also comprises:
Parameter acquisition module, for to be connected with described main frame by described USB interface when described CD-ROM equipment and after described CD-ROM equipment is inserted into CD, obtain the capacity parameter of described CD and the catalogue of described CD file, the capacity parameter of described CD comprises the total volume parameter of described CD and uses capacity parameter, and described catalogue comprises bibliographic structure and filename;
Parameter Switch module, the capacity parameter for the described CD described parameter acquisition module obtained changes into the capacity parameter meeting described usb protocol;
Catalogue modular converter, the catalogue for the described file described parameter acquisition module obtained converts the catalogue meeting described usb protocol to;
Attribute definition module, for being defined as USB flash disk by the property parameters of described CD-ROM equipment;
Memory module, for being stored to the described property parameters after the described capacity parameter after conversion and described catalogue and definition in data buffer.
12. devices according to claim 11, is characterized in that, described device also comprises:
Second receiver module, for receiving the attribute reading command for reading described CD-ROM equipment attribute that described main frame is sent by described USB interface;
First read module, for reading described capacity parameter and described property parameters in described data buffer;
Attribute sending module, for sending the described capacity parameter and described property parameters that read to described main frame by described USB interface.
13. devices according to claim 11, is characterized in that, described device also comprises:
3rd receiver module, for receiving the catalogue reading command for reading CD file catalogue in described CD-ROM equipment that described main frame is sent by described USB interface;
Second read module, for reading described catalogue in described data buffer;
Catalogue sending module, for sending the described catalogue read to described main frame by described USB interface.
14. devices according to claim 11, is characterized in that, described device also comprises:
Remove module, for be connected with described main frame by described USB interface when described CD-ROM equipment and after CD in described CD-ROM equipment delivers from godown, to remove all data in described data buffer.
15. 1 kinds of CD-ROM drive drive plates, is characterized in that, described CD-ROM drive drive plate comprises as the document reading apparatus as described in arbitrary in claim 8 to 14.
16. 1 kinds of CD-ROM equipments, is characterized in that, described CD-ROM equipment comprises CD-ROM drive drive plate as claimed in claim 15.
CN201510092241.8A 2015-02-28 2015-02-28 File reading, device and CD-ROM drive driving plate and CD-ROM equipment Active CN104679697B (en)

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 true CN104679697A (en) 2015-06-03
CN104679697B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664421A (en) * 2018-04-28 2018-10-16 广州酷狗计算机科技有限公司 Obtain the method, apparatus and storage medium of multi-medium data

Citations (4)

* Cited by examiner, † Cited by third party
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
US20130076633A1 (en) * 2011-09-27 2013-03-28 Ctx Virtual Technologies Integrated, portable computing and entertainment device
CN103594099A (en) * 2012-08-14 2014-02-19 建兴电子科技股份有限公司 External CD module with USB interface and operation method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
US20130076633A1 (en) * 2011-09-27 2013-03-28 Ctx Virtual Technologies Integrated, portable computing and entertainment device
CN103594099A (en) * 2012-08-14 2014-02-19 建兴电子科技股份有限公司 External CD module with USB interface and operation method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664421A (en) * 2018-04-28 2018-10-16 广州酷狗计算机科技有限公司 Obtain the method, apparatus and storage medium of multi-medium data
CN108664421B (en) * 2018-04-28 2020-04-28 广州酷狗计算机科技有限公司 Method, device and storage medium for acquiring multimedia data

Also Published As

Publication number Publication date
CN104679697B (en) 2018-06-08

Similar Documents

Publication Publication Date Title
CN111381954B (en) Audio data recording method, system and terminal equipment
CN101330621B (en) Uniform video decoding and display
CN103475572B (en) Method, device and system for sending multiple pictures in instant messaging application
JP6934076B2 (en) Smart service methods, devices and equipment
US20050107120A1 (en) Mobile storage device with wireless bluetooth module attached thereto
US20200021772A1 (en) Multimedia recording data obtaining method and terminal device
CN103327021B (en) Method, devices and system of multi-device interaction
US20170169834A1 (en) Android-based audio content processing method and device
CN101656089B (en) Apparatus and method for playing digital audio and video
US20040088440A1 (en) Multi-format card read/write optical disc drive
CN102111677A (en) Method and system for playing specification and electronic equipment terminal
CN103747284A (en) Video pushing method and server
CN103000211A (en) High-definition audio playing system capable of realizing multi-resource sharing
CN104679697A (en) File reading method and device, optical drive driver board and optical drive equipment
KR101416322B1 (en) Authentication method of Contents-protected Title and Device adopting the method
CN1668093A (en) Audio/video recording/reproducing system using an audio/video codec having a video decoder therin
CN105072534A (en) Control method of wireless loudspeaker box system, and terminal
CN104750786A (en) Data display method and device
KR101028618B1 (en) Spi communication system and method for communicating between main board and expansion board
JP6693417B2 (en) Reader / writer device, information processing device, data transfer control method, and program
US20100202468A1 (en) Bridge, data compressing method thereof and computer system applying the same
US20080282010A1 (en) Apparatus for digital/analog audio storage and playback
CN112069356B (en) Video file storage method and device, electronic equipment and readable storage medium
CN113973226B (en) Screen recording method, device, equipment and storage medium
CN102082798A (en) SDIO (secure digital input output) interface based multimedia information coprocessing equipment and communication method thereof

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

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.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant