This application claims the benefit of Taiwan application Serial No. 102104156, filed Feb. 4, 2013, the subject matter of which is incorporated herein by reference.
1. Field of the Invention
The invention relates in general to a display method, an electronic device and a computer program product, and more particularly to a display method, an electronic device and a computer program product.
2. Description of the Related Art
Electronic devices currently available in the market, such as mobile phones, tablet PCs, automotive electronic products, are normally equipped with multimedia playing function. However, along with the quick and mass generation of multimedia files, the conventional operation procedures for playing multimedia files, such as photos, music, and films, on electronic devices by using file listing method are very complicated.
Referring to
The directory “A” further contains four jpg files (Photo1.jpg, Photo2.jpg, Photo3.jpg and Photo4.jpg) and two sub-directories (directories “A1” and “A2”). The directory “A1” merely contains a directory “a”. The directory “A2” does not contain any multimedia files nor directories.
Moreover, the directory “a” further contains three sub-directories (directories “aa”, “bb”, and “cc”). The directory “a” further contains a jpg file (play1.jpg) and three mp3 files (song1.mp3, song2.mgp and song3.mp3). The directories “bb” and “cc” do not contain any multimedia files nor sub-directories.
The directory “B” further contains three sub-directories (directories “B1” “B2”, and “B3”).
The directory “B1” contains an Animal.wav file and a directory “a”. The directory “a” contains a sub-directory “aa”. Moreover, the directory “aa” contains seven jpg files (game1.jpg, game2.jpg, game3.jpg, game4.jpg, game5.jpg, game6.jpg, and game7.jpg).
The directory B2 contains three mp3 files (Music1.mp3, Music2.mp3, and Music3.mp3).
The directory B3 contains a sub-directory “a”, which contains two files (Travel1.mpg and Travel2.mpg).
Presumably, when the directory structure of
Referring to
After the user selects the root directory, the electronic device displays two sub-directories (directories “A” and “B”) under the root directory for the user to select.
Referring to
The directory structure of
Moreover, the multimedia files played by the electronic device may be provided by an internal memory or an external storage device (such as a memory card or a USB device). Given that the storage devices from different sources, and each storage device has its respective directory structure, the process for selecting files from such directory structure will become even more complicated.
It can be known from the above descriptions that the conventional technology recursively selects multimedia files via a layer-by-layer scheme. Such approach is meandering, circuitous, and unpractical. Thus, how to provide a convenient directory selection operation taken in conjunction with the multimedia playing function of the electronic device has become a prominent task.
According to one embodiment of the present invention, a display method applied to an electronic device is provided. The display method includes steps of: searching storage positions of a plurality of multimedia files in a storage device so as to retrieve a plurality of storage path strings corresponding to the plurality of multimedia files; parsing the plurality of storage path strings and consequently retrieving at least one simplified path corresponding to the plurality of multimedia files; displaying the at least one simplified path; selecting one of the at least one simplified path according to a directory selection operation; displaying at least one multimedia file corresponding to the at least one simplified path being selected.
According to another embodiment of the present invention, an electronic device is provided. The electronic device includes a non-volatile storage module, a control module, a parsing module, a display module, and an input module. The non-volatile storage module stores a plurality of multimedia files. The control module is electrically connected to the storage module for searching storage positions of the plurality of multimedia files in the non-volatile storage module so as to retrieve a plurality of storage path strings corresponding to the plurality of multimedia files. The parsing module is electrically connected to the control module for parsing the plurality of storage path strings and consequently retrieving at least one simplified path corresponding to the plurality of multimedia files. The display module is electrically connected to the parsing module for displaying the at least one simplified path. The input module senses a directory selection operation. The control module selects one of the at least one simplified path according to the directory selection operation and controls the display module to display at least one multimedia file corresponding to the at least one simplified path being selected.
According to an alternate embodiment of the present invention, a multimedia system is provided. The multimedia system includes a storage device, and an electronic device. The storage device stores a plurality of multimedia files. The electronic device includes a read module, a control module, a parsing module, a display module, and an input module. The read module accesses the storage device. The control module is electrically connected to the read module for searching storage positions of the plurality of multimedia files in the storage device through the read module so as to retrieve a plurality of storage path strings corresponding to the plurality of multimedia files. The parsing module is electrically connected to the control module for parsing the plurality of storage path strings and consequently retrieving at least one simplified path corresponding to the plurality of multimedia files. The display module is electrically connected to the parsing module for displaying the at least one simplified path. The input module is electrically connected to the control module for transmitting a directory selection operation obtained by sensing to the control module. The control module selects one of the at least one simplified path according to the directory selection operation and consequently controls the display module to display at least one multimedia file corresponding to the at least one simplified path being selected.
According to another alternate embodiment of the present invention, a computer program product equipped with a software program is provided. When the software program is executed, the software program performs a display method on an electronic device having a controller. The display method includes steps of: searching storage positions of a plurality of multimedia files in a storage device so as to retrieve a plurality of storage path strings corresponding to the plurality of multimedia files; parsing the plurality of storage path strings and consequently retrieving at least one simplified path corresponding to the plurality of multimedia files; displaying the at least one simplified path; selecting one of the at least one simplified path according to a directory selection operation; and displaying at least one multimedia file corresponding to the at least one simplified path being selected.
The above and other aspects of the invention will become better understood with regard to the following detailed description of the preferred but non-limiting embodiment(s). The following description is made with reference to the accompanying drawings.
The present invention improves procedures for displaying and selecting directories. Electronic device using the display method of the present invention can largely reduce process time and procedures required for selecting multimedia files. For convenience of descriptions, it is assumed that the electronic device exemplified in the embodiments below adopts Android operating system, but the application of the present invention is not limited thereto. Similar approaches taken in conjunction with different programs and functions can be implemented in other operating systems.
Firstly, based on MediaScanner function, all multimedia files stored in the storage device are completely checked so as to retrieve storage positions of all the multimedia files in the storage device. That is, whether any multimedia files or sub-directories are contained under each layer of directories is determined. If a directory contains any multimedia file, the storage path of the multimedia file can be correspondingly retrieved. If the directory further contains a sub-directory, then whether the sub-directory contains any multimedia files can be verified through recursive retrieval or other approaches.
The directories in each layer between the root directory and the storage position of a multimedia file are referred as storage path of the multimedia file. The multimedia files may be stored under the root directory or under the directories (sub-directories) at different layers.
The multimedia files may be stored under the roor directory or sub-directories. The storage paths of some multimedia files are exemplified below for description purpose.
The multimedia files stored under the root directory are exemplified below.
root/dog1.jpg
root/dog2.jpg
Under the sub-directories of the root directory, the multimedia files stored are exemplified below.
root/A/Photo1.jpg
root/A/A1/a/aa/play1.jpg
root/A/A1/a/aa/song1.mp3
root/A/A1/a/aa/song2.mp3
root/A/A1/a/aa/song3.mp3
Similarly, the storage paths of the remaining multimedia files can be retrieved by analogy, but are not exemplified here. Then, storage path strings representing the storage paths can be retrieved by using GetAllMediaFilePath function. The storage path strings represent absolute paths of the multimedia files. The absolute paths includes names of directories at each layer between the root directory of the storage device and the directory containing the multimedia files.
Afterwards, simplified paths corresponding to the multimedia files are retrieved. In short, the storage path strings are parsed; and, only part of the storage path strings are reserved and considered as the simplified paths.
For instance, the three files dog1.jpg, dog2.jpg, and dog3.jpg are stored under the root directory. Thus, the storage path string of the three files dog1.jpg, dog2.jpg, and dog3.jpg are identical as “root/”, and the simplified path of these three files is “root/” as well.
The four files Photo1.jpg, Photo2.jpg, Photo3.jpg and Photo4.jpg are stored under the directory “A” contained in the root directory. Thus, the storage path string of these four files is “root/A/”, but the simplified path of these four files is “A/”.
The four files, play1.jpg, son1.mp3, song2.mp3 and song3.mp3, are stored under the sub-directory “aa” of the directory “a”, wherein the directory “a” is further contained in the sub-directory “A1” of the directory “A”. Thus, the storage path string of these four files is “root/A/A1/a/aa”, and the simplified path of these four files is “aa/”.
Similarly, the storage path string of the file “Animal.wav” is “root/B/B1/”, and the simplified path of that is “B1/”. The storage path strings of the files game1.jpg to game7.jpg are “root/B/B1/a/aa/”, and the simplified path of these files are “aa/”. The storage path strings of the files Music1.mp3, Music2.mp3, and Music3.mp3 are “root/B/B2/”, and the simplified path of these files is “B2/”. The storage path string of the files Travel1.mpg and Travel2.mpg is “root/B/B3/a/”, and the simplified path of these files is “a/”.
The first column of
As indicated in
The simplified path “aa/” of the fourth row represents storage path string of “root/A/A1/a/aa/”, and the simplified path “aa/” of the sixth row represents storage path string of “root/B/B1/a/aa”.
With respect to the above case in which the same simplified path corresponds to different storage path strings, the simplified paths are differentiated according to attributes such as creator name, setup time, storage path string, and ID3 information of the MP3 music of the directory, or any other attributes capable of differentiating directories.
As summarized in
Referring to
Based on the concept of the present invention, when the electronic device is booted or loaded with a memory card, all multimedia files stored in the storage device are searched through the GetAllMediaFilePath function. After the storage path strings of all multimedia files are retrieved, the storage path strings are consequentially parsed so as to retrieve simplified path corresponding to the multimedia files. The multimedia files are then displayed in the form of the simplified paths.
The simplified paths representing the seven directories disclosed above are displayed in
After the user sees the display panel as shown in
According to the present invention, if Travel1.mpg file is selected, the user only needs to perform the directory selection operation once and the file selection operation once.
A comparison between
Given that the above approach is adopted, the user can quickly find out whether the user selects a wrong simplified path in the first place and re-select a correct simplified path even though.
In practical application, format of simplified path is not subjected to particular restrictions. For instance, the user can set the directory at the bottommost layer as simplified path, or display the two bottommost layers of directories as simplified path.
Or, the format of the simplified path displayed by the electronic device can be defined according to the user's habits of use. For instance, if the user A prefers to listen to audio files when using a mobile phone, the mobile phone of the user A can set the directories containing music files as simplified path so as to simplify the operation procedure.
Referring to
In fact, the directory “aa” corresponding to the files song1.mp3, song2.mp3, and song3.mp3 also contains a video file “play1.jpg”. However, the video “play1.jpg” file not will not be displayed even if the user clicks on the simplified path “aa/”.
Referring to
Referring to
Based on the concept of the present invention, the electronic device, further parses the storage path strings so as to retrieve names of directories from the storage path strings after retrieving the storage path strings of all multimedia files. The names of directories represent the directories containing the multimedia files at the bottommost layer.
Then, as indicated in
As indicated in
For instance, the storage path string of the file “dog1.jpg” is “root/”, and the simplified path corresponding to the storage path string of the file “dog1.jpg” is “root”. The simplified path represents root directory “root” under which three files, dog1.jpg, dog2.jpg, and dog3.jpg, are contained.
When the user boots the electronic device or installs a memory card in the electronic device, the seven simplified paths are first retrieved. Given that the user selects a simplified path “B1”, the name of directory being selected is “B1” as well. Then, the electronic device displays at least one candidate multimedia file stored under the selected name of directory (B1). Since the directory B1 merely contains file “Animal.wav”, the electronic device will start playing the file Animal.wav selected by the user.
Similarly, the present invention also provides similar operation mode for other multimedia files stored in the electronic device. For instance, the user makes judgment according to attributes of “root/A/A1/a/” and selects the third simplified path counting down from the top of
When displaying a directory representing simplified path, icon of multimedia file can be used to represent the directory containing the multimedia file. For instance, when the multimedia file contains a graphic file, the graphic file can be used as the icon of the directory. When the multimedia file contains audio/video files, image segment of audio/video bitstream can be used as the icon of the directory. When the multimedia file contains an audio file, information corresponding to the audio file such as album titles and singer names is displayed.
Representation of directories corresponding to the simplified paths can be adjusted or modified by anyone who is skilled in the technology field of the present invention, and variations of the said representation are not elaborated here.
Moreover, in practical application, if different directories have similar storage paths, similar strings can be omitted when recording the storage paths. For example, in the said directory structure, directories B1, B2, and B3 are positioned at a layer under the directory B.
Thus, the portion “/root/B/” is the similar storage path of the directories B1, B2, and B3. This portion of storage path does not need to be stored with respect to the directories B1, B2, and B3 respectively. Hence, efficiency in the use of storage space is improved.
Referring to
Firstly, the storage positions of the multimedia files in the storage device are searched. The storage path strings corresponding to the multimedia files are consequently retrieved (step S1). Next, the storage path strings are parsed and simplified path corresponding to the multimedia files is consequently retrieved (step S3). Correspondence relationships between the simplified paths, the multimedia files, and the storage path strings are obtained and stored (step S4). The at least one simplified path is displayed (step S5). A simplified path is selected according to a directory selection operation (step S7). The multimedia files corresponding to the simplified path being selected are displayed (step S9).
Step S1 further includes the following steps. Directories contained in the storage device are searched (step S11). The storage positions of the multimedia files in the storage device are obtained after searching (step S13). The storage path strings corresponding to the multimedia files are retrieved according to the storage positions of the multimedia files in the storage device (step S15).
The purpose for searching the directories of the storage device is to retrieve the storage path strings corresponding to the multimedia files, and searching method is not limited to any particular approaches. For instance, the searching method can be implemented by using recursive searching method, sequential searching method or other searching methods.
Step S3 further includes the following steps. The storage path strings are parsed to determine names of directories of bottommost directories containing the plurality of multimedia files (step S31). The names of the bottommost directories containing the multimedia files are used as the simplified paths (step S33).
When the names of the directories are identical, the display method of the present invention further displays attributes associated with the directories. Examples of the attributes are such as but not limited to storage path strings, creator, setup time, content information, and storage file types of the directories etc.
According to the present invention, the origins of multimedia files may be a built-in storage device, a non-volatile storage module or other sources.
Also, the multimedia files may be provided by an external memory card, or an external storage device connected through a USB. These external storage devices can be electrically connected to the electronic device in a detachable manner, and the electronic device can access the multimedia files stored in the storage device through a read module.
Referring to
The non-volatile storage module 96 used for storing multimedia files can be a flash memory or other types of memory devices. The file system of the memory device is not limited to particular restrictions.
When the electronic device is booted, the control module 92 searches storage positions of the multimedia files in the non-volatile storage module 96 so as to retrieve the storage path strings corresponding to the multimedia files. The control module 92 searches directories contained in the non-volatile storage module. The storage path strings corresponding to the multimedia files can be retrieved after the storage positions of the multimedia files in the non-volatile storage module 96 are obtained.
After obtaining the correspondence relationships between the simplified path, the multimedia files, and the storage path strings, the control module 92 stores the correspondence relationships in the volatile storage module 91.
Besides, the parsing module 93 parses the storage path strings retrieved by the control module 92 and consequently retrieves the simplified path corresponding to the multimedia files.
The display module 94 displays at least one simplified path and multimedia data (such as images and video strings) decoded by the play module.
After the input module 95 senses a directory selection operation, the control module 92 selects one or some of the at least one simplified path according to the directory selection operation and controls the display module 94 to display one or more than one multimedia file corresponding to the simplified path(s) being selected.
Then, the input module 95 transmits a file selection operation obtained by way of sensing to the control module 92. After the control module 92 selects the plurality of multimedia files through the read module, the play module 97 plays the multimedia files being selected. The play module 97 may be a video play module or an audio play module.
Referring to
In comparison to the electronic device of
Since the storage device 11 can be an external memory card or a hard disc connected through a USB, the storage device 11 can be dynamically replaced. Thus, as well as searching multimedia files when the electronic device 10 is booted, the control module 102 further searches the storage positions of the multimedia files when the storage device 11 is plugged or replaced.
The present invention can combine the function of the electronic device of
The present invention can also be applied to other types of computer program products. When the software programs stored in the computer program product are executed, the electronic device equipped with a controller can perform the display method as shown in
When the display method of the present invention is applied to a multiplex electronic device, the display method can be implemented by a service or a task of the operating system. Or, when the electronic device operates at a simplex mode, the display method of the present invention can be implemented through polling.
In other words, the implementation of the present invention is very flexible. Any approaches are within the scope of protection of the present invention as long as all storage paths of the plurality of multimedia files are searched, the retrieved simplified paths are parsed, and the multimedia files are accessed according to correspondence relationships between the simplified path and the multimedia files.
It should also be noted that the electronic device may write correspondence relationships between the multimedia files, the storage path and the simplified path as well as information associated with the multimedia files to a particular reference file or a reference directory. By doing so, subsequent processing can be expedited.
The use of input device is more convenient in a PC than in an ordinary portable product. When the method of the present invention is adopted, the user's inconvenience of selecting files on the small display screen of the portable product would be largely reduced.
In terms of the application of vehicle electronics, when driving a vehicle, the user can dynamically select files and consequentially play the selected files in a more efficient manner. By doing so, the user will be less distracted with operations of vehicle electronics.
As disclosed above, through the file listing function provided by the operating system of the electronic device of the present invention, multimedia files can be selected and played in a more convenient manner. According to the method of the present invention, directory structure of storage device can be quickly retrieved, and no complicated computation is required.
While the invention has been described through example and in terms of the preferred embodiment(s), it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.
Number | Date | Country | Kind |
---|---|---|---|
102104156 | Feb 2013 | TW | national |