1. Technical Field
The present disclosure relates to a media player.
2. Description of Related Art
Media players, such as a DVD player, store breakpoint information while playing audio file. The breakpoint information indicates a position where interruption of the playing media player occurs. However, the breakpoint information includes a large amount of data, such that storing the breakpoint information may affect the performance of the media player.
Therefore, there is room for improvement in the art.
Many aspects of the embodiments can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the media player and information updating method thereof. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, for example, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. Modules may comprise connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage system. Embodiments of the present disclosure will be described with reference to the drawings.
The media player 10 includes storage 12, an obtaining module 13, a determining module 14, an extracting module 15, and a comparing module 16.
The storage 12 is used for storing the breakpoint information and the parameters of the breakpoint information are stored in a predetermined order. In the embodiment, there is no breakpoint information in the storage 12 before the media player 10 plays the audio files.
The obtaining module 13 obtains current breakpoint information at a predetermined time period and generates a first determining signal while the media player 10 is playing the audio files. The predetermined time period can be set by operations of a user.
The determining module 14 determines whether there is breakpoint information in the storage 12 in response to the first determining signal. When there is no previous stored breakpoint information in the storage 12, the determining module 14 generates a storing signal; when there is previous stored breakpoint information in the storage 12, the determining module 14 generates an extracting signal.
The storage 12 stores the current breakpoint information in response to the storing signal.
The extracting module 15 extracts one parameter of the current breakpoint information according to the predetermined order in response to the extracting signal.
The comparing module 16 compares the extracted parameter of the current breakpoint information and the corresponding parameter of the previous stored breakpoint information in the storage 12. For example, the comparing module 15 compares the disc indicating code of the current breaking information and the previous stored disc indicating code in the storage 12. When the extracted parameter of the current breaking information is identical to the corresponding parameter of the previous stored breakpoint information in the storage 12, the comparing module 16 generates a second determining signal. When the extracted parameter of the current breaking information is different from the corresponding parameter of the previous stored breakpoint information in the storage 12, the comparing module 16 controls the storage 12 to replace the corresponding parameter of the previous stored breakpoint information with the extracted parameter of the current breaking information.
The determining module 14 further determines whether the extracted parameter is the last parameter of the current breakpoint information in response to the second determining signal. If the extracted parameter is not the last parameter of the current breakpoint information, the determining module 14 generates the extracting signal; if the extracted parameter is the last parameter of the current breakpoint information, the determining module 14 determines that the stored breakpoint information is completely updated.
In step S301, the obtaining module 13 obtains breakpoint information at a predetermined time period. The predetermined time period can be set by operations of a user.
In step S302, the determining module 14 determines whether there is previous breakpoint information in the storage 12. If there is previous stored breakpoint information in the storage 12, the procedure goes to S303; if there is no previous stored breakpoint information in the storage 12, the procedure goes to S307.
In step S303, the extracting module 15 extracts one parameter of the current breakpoint information according to the predetermined order.
In step S304, the comparing module 16 compares the extracted parameter of the current breakpoint information and the corresponding parameter of the previous stored breakpoint information in the storage 12 correspondingly. If the extracted parameter of the current breakpoint information is different from the corresponding parameter of the previous stored breakpoint information, the procedure goes to S305; if the extracted parameter of the current breakpoint information is identical to the corresponding parameter of the previous stored breakpoint information, the procedure goes to S306.
In step S305, the storage 12 replaces the corresponding parameter of the previous stored breakpoint information with the extracted parameter of the current breakpoint information.
In step S306, the determining module 16 determines whether the extracted parameter is the last parameter of the current breakpoint information. If the extracted parameter is not the last parameter of the current breakpoint information, the, stored breakpoint information is not completely updated and the procedure goes to S303; if the extracted parameter is the last parameter of the current breakpoint information, the stored breakpoint information is completely updated and the procedure ends.
In step S307, the storage 12 stores the current breakpoint information.
By utilizing the present disclosure, the media player 100 only replaces the changing parameters of the previous stored breakpoint information, such that the amount of data needed to be stored is reduced and the affect is limited when playing the audio files.
While various exemplary embodiments have been described, the disclosure is not to be limited thereto. Various modifications and similar arrangements (as would be apparent to those skilled in the art) are also intended to be covered. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
| Number | Date | Country | Kind |
|---|---|---|---|
| 2012105825603 | Dec 2012 | CN | national |