A kind of playback method of multimedia file, device and television setThe application is the applying date on December 18th, 2013, application No. is 201310700323.7, entitled one kindThe divisional application of the playback method of multimedia file, device and television set.
Technical field
The present invention relates to multimedia technology fields, playback method, a kind of more matchmakers more particularly to a kind of multimedia fileThe playing device of body file and a kind of television set.
Background technique
In recent years, various display terminals are also rapidly developing, and function also exists with the rapid development of multimedia technologyIt is increasing.USB(Universal Serial Bus, universal serial bus) interfacing development it is more rapid, USB deviceAlso increasing, for example, MP3(Moving Picture Experts Group Audio Layer III, dynamic image expertCompression standard audio level 3) and digital camera etc., to produce many MP3, JPEG(Joint PhotographicExperts Group, Joint Photographic Experts Group) etc. comprising audio, video information file.
In order to improve user experience, so that user is experienced the sound of higher quality, picture, support more matchmakers in mobile terminalThe broadcasting of body file has become one of the function of current television set indispensability.And with the increase of mobile terminal capacity, it is storableFile is increasing, and for user when playing the multimedia file in mobile terminal, the time for carrying out file selection is also increasingly longer,Therefore, television set additionally provides the function of storing the relevant information of these multimedia files, under some predilections, hopeThe secondary multimedia file for continuing to play, user can store the title of the multimedia file and store path in a television set,When next time plays the multimedia file, it is more that this is searched according to the title of the multimedia file of storage in a television set and store pathMedia file, to shorten the time of locating file when playing next time.
For mobile terminal after being inserted into television set, the file system of television set can distribute a disk partition for it, mobileTerminal is mounted to the disk partition.When the same mobile terminal is inserted into television set at different times, the file system of television setUniting may be different for the disk partition of its distribution, therefore the path of the disk partition of the mobile terminal carry may be different;I.e. certainThe file system of television set is once inserted into the electricity with preceding for the disk partition of its distribution when a mobile terminal is currently inserted into television setThe file system of television set may be different as the disk partition of its distribution when regarding machine.In current technology, by multimedia fileStore path storage in a television set when, be the coordinates measurement multimedia text according to mobile terminal when the disk partition of front mountThe store path of part, and the store path is stored, corresponding multimedia file is then searched according to the store path.
But since mobile terminal often carries out plug operation, and the file system of television set is its point after being inserted into every timeThe disk partition matched is different, and this phenomenon is resulted in when the path of the disk partition of front mount changes, multimedia fileStore path can also change, at this point, the title of the multimedia file stored in reselection television set plays multimedia fileWhen, then can change because of the store path of the multimedia file causes to be unable to normal play.
Summary of the invention
The embodiment of the present invention provides the playback method, device and television set of a kind of multimedia file, to solve in movementAfter terminal carries out plug operation, lead to the problem of being unable to normal play since the store path of multimedia file changes.
To solve the above-mentioned problems, the present invention provides a kind of playback methods of multimedia file, which is characterized in that packetIt includes:
After the insertion message for detecting current mobile terminal, the information of current mobile terminal is obtained;
The absolute path of information update multimedia file according to the current mobile terminal;
The absolute path for the multimedia file selected described in name acquiring according to selected multimedia file;
If there are the selected multimedia files under the absolute path, the selected multimedia file is played.
Preferably, the information of the current mobile terminal includes the disk partition that the current mobile terminal works as front mountThe absolute path of path, the title of the multimedia file and the multimedia file is stored in pre-set favorites listIn, it further include the relative path of the multimedia file in the favorites list.
Preferably, the step of absolute path according to the information update multimedia file of the current mobile terminal is wrappedIt includes:
From the relative path for searching multimedia file in the current mobile terminal in the favorites list;
The relative path of the multimedia file of lookup and the current mobile terminal are worked as to the disk partition of front mountCombination of paths, the path after combination is recorded as to the absolute path of the multimedia file.
Preferably, the step of absolute path according to the information update multimedia file of the current mobile terminal is wrappedIt includes:
The relative path that absolute path is empty multimedia file is searched from the favorites list;
The relative path of the multimedia file of lookup and the current mobile terminal are worked as to the disk partition of front mountCombination of paths, the path after combination is recorded as to the absolute path of the multimedia file.
Preferably, before searching the relative path that absolute path is empty multimedia file in the favorites list, alsoInclude:
Before the extraction message for detecting previous mobile terminal, the magnetic of front mount of the previous mobile terminal in extraction is obtainedThe path of disk subregion;The previous mobile terminal is inserted into before current mobile terminal insertion;
The road of the disk partition including front mount of the previous mobile terminal in extraction is searched from the favorites listThe absolute path of diameter, and the absolute path is set to sky.
Preferably, it before the absolute path according to the information update multimedia file of the current mobile terminal, also wrapsIt includes:
The absolute path for the multimedia file selected described in name acquiring according to the selected multimedia file;
If the selected multimedia file is not present under the absolute path, execute described according to the current movementThe step of absolute path of the information update multimedia file of terminal;
If there are the selected multimedia files under the absolute path, the selected multimedia file is played.
According to another aspect of the present invention, a kind of playing device of multimedia file is additionally provided, which is characterized in that packetIt includes:
Data obtaining module after the insertion message for detecting current mobile terminal, obtains the letter of current mobile terminalBreath;
Routing update module, the absolute path for the information update multimedia file according to the current mobile terminal;
Path obtains module, the multimedia file for selecting described in the name acquiring according to selected multimedia fileAbsolute path;
File playing module, under the absolute path there are when the selected multimedia file, described in broadcastingSelected multimedia file.
Preferably, the information of the current mobile terminal includes the disk partition that the current mobile terminal works as front mountThe absolute path of path, the title of the multimedia file and the multimedia file is stored in pre-set favorites listIn, it further include the relative path of the multimedia file in the favorites list.
Preferably, the routing update module includes:
First searches submodule, for from searching multimedia file in the current mobile terminal in the favorites listRelative path;
First record sub module, the relative path of the multimedia file for that will search and the current mobile terminalWhen the combination of paths of the disk partition of front mount, the path after combination is recorded as to the absolute path of the multimedia file.
According to another aspect of the present invention, a kind of television set is additionally provided, which is characterized in that including more matchmakers as described aboveThe playing device of body file.
Compared with prior art, the embodiment of the present invention includes following advantages:
In the present invention after detecting the insertion message of current mobile terminal, the information of available current mobile terminal,And the absolute path of the information update multimedia file according to the current mobile terminal;When needing that multimedia file is selected to playWhen, the absolute path for the multimedia file that can be selected described in the name acquiring according to selected multimedia file, if describedThere are the selected multimedia files under absolute path, then can be with multimedia file selected described in normal play.Due toAfter detecting mobile terminal insertion, the absolute path of multimedia file can be updated, therefore can in the updated absoluteSelected multimedia file is searched under path, so as to avoid after mobile terminal carries out plug operation, due to multimedia fileAbsolute path change and lead to the problem of being unable to normal play.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the playback method of multimedia file of the embodiment of the present invention one;
Fig. 2 is a kind of flow chart of the playback method of multimedia file of the embodiment of the present invention two;
Fig. 3 is the process that favorites list updates after the extraction message for detecting mobile terminal in the embodiment of the present invention threeFigure;
Fig. 4 is the process that favorites list updates after the insertion message for detecting mobile terminal in the embodiment of the present invention threeFigure;
Fig. 5 is a kind of flow chart of the playback method of multimedia file of the embodiment of the present invention three;
Fig. 6 is a kind of structural block diagram of the playing device of multimedia file of the embodiment of the present invention four.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific realApplying mode, the present invention is described in further detail.
The equipment that equipment in the present invention for playing multimedia file can be capable of external mobile terminal for any one,For example, television set, laptop, desktop computer etc., mobile terminal may be the external storage of any plug and playEquipment, such as the USB device with USB interface are inserted into the above-mentioned equipment for playing multimedia file by USB interface, etc.Deng.Each embodiment below the present invention is illustrated by taking television set as an example, but be not restricted to that a kind of this equipment of television set.
Embodiment one:
Since after carrying out plug operation, the store path of multimedia file will change mobile terminal in current technologyBecome, is unable to normal play so as to cause multimedia file.
The embodiment of the present invention proposes a kind of playback method of multimedia file regarding to the issue above.
Referring to Fig.1, a kind of flow chart of the playback method of multimedia file of the embodiment of the present invention one, this method are shownIt can specifically include following steps:
Step 101, after the insertion message for detecting current mobile terminal, the information of current mobile terminal is obtained.
In one kind of the invention in the specific implementation, detection function can be set to detect the insertion of current mobile terminal and disappearBreath, the detection can be real-time detection, that is, whether real-time detection receives the insertion message of current mobile terminal;It is describedDetection or periodic detection, can periodically be arranged according to particular situation here, such as every 3 minutes, 5 minutes, 10 pointsClock etc., the embodiment of the present invention to this and it is without restriction.
Step 102, the absolute path according to the information update multimedia file of the current mobile terminal.
In the embodiment of the present invention, after detecting the insertion message of current mobile terminal, illustrate there is mobile terminal to be inserted intoIn television set, the absolute path of multimedia file can be updated at this time.The letter of current mobile terminal available firstBreath, then can be according to the absolute path of the information update multimedia file of the current mobile terminal.
It should be noted that the process for updating the absolute path of multimedia file herein can be for described current mobile wholeThe absolute path of multimedia file in end is updated, or to the absolute of the multimedia file saved in television setPath is updated, and for specific renewal process, will be discussed in detail in the following embodiments.
Step 103, the absolute path of multimedia file described in the name acquiring according to selected multimedia file.
The function of the relevant information of storing multimedia can be provided in television set, for some user's predilections,Wish next time continue play multimedia file, can by the relevant information of the multimedia file store in a television set, so as toIt is directly selected when playing next time, so as to shorten the time of locating file.
It in one preferred embodiment of the invention, can be with when storing the relevant information of the favorite multimedia file of userThe title of the multimedia file and the absolute path of the multimedia file are stored in a television set, i.e. the correlation of multimedia fileInformation includes the title of the multimedia file and/or the absolute path of the multimedia file etc..Therefore, when user wishes to play in advanceWhen some multimedia file first stored, the more matchmakers for wishing to play can be selected from the title of the multimedia file of storage firstThe title of body file, the multimedia that then television set can be selected described in the name acquiring automatically according to selected multimedia fileThe absolute path of file.
Step 104, if there are the selected multimedia files under the absolute path, selected more matchmakers are playedBody file.
After the absolute path for getting the selected multimedia file, can be searched under the absolute path described inSelected multimedia file.If there are the selected multimedia files under the absolute path, can be with normal play instituteState selected multimedia file;If the selected multimedia file is not present under the absolute path, illustrate that this is selectedMultimedia file at this time can not normal play, can also further display at this time the selected multimedia file be not present,Can not succeed the prompt information played.
In the embodiment of the present invention, due to after detecting mobile terminal insertion, can absolute path to multimedia file intoRow updates, therefore can search selected multimedia file under absolute path in the updated, so as to avoid in mobile terminalAfter carrying out plug operation, lead to the problem of being unable to normal play since the absolute path of multimedia file changes.
Embodiment two:
Referring to Fig. 2, a kind of flow chart of the playback method of multimedia file of the embodiment of the present invention two, this method are shownIt can specifically include following steps:
Step 201, after the insertion message for detecting current mobile terminal, the information of current mobile terminal is obtained.
For mobile terminal after being inserted into television set, the file system of television set distributes a disk partition for it.Due to sameWhen one mobile terminal is inserted into television set at different times, the file system of television set may for the disk partition of its distributionDifference, therefore the path of the disk partition of the mobile terminal carry is also different, such as hangs in the different moments same mobile terminalThe path of the disk partition of load can be " file: //mnt/media/usb1 " or " file: //mnt/usb/Usb.356729887 ", etc..Wherein, the mobile terminal can for the external storage equipment of plug and play such as USB device orPerson's external connection of storage card, embedded memory card etc..
In the embodiment of the present invention, the information of the current mobile terminal may include that the current mobile terminal works as front mountDisk partition path.
Step 202, multimedia file selected described in the name acquiring according to the selected multimedia file is absolutePath.
It, can be in advance by the absolute of the title of the favorite multimedia file of user and multimedia file in the embodiment of the present inventionPath saves in a television set, the title of the multimedia file and the absolute path of multimedia file be it is corresponding, i.e., be allIndicate the information of the same multimedia file.The absolute path of the multimedia file, which can refer to, is stored with the multimedia fileMobile terminal is after being inserted into television set, actual storage path of the multimedia file relative to television set, when user is from storageMultimedia file title in select wish play multimedia file title after, television set can be automatically according to selectedThe absolute path of multimedia file described in the name acquiring of multimedia file.
Step 203, search whether that there are the selected multimedia files under the absolute path of the multimedia file.
If the selected multimedia file is not present under the absolute path, 204 are thened follow the steps;If the absolute roadThere are the selected multimedia file under diameter, 207 are thened follow the steps.
Step 204, the absolute path according to the information update multimedia file of the current mobile terminal.
The absolute path of multimedia file can refer to that the mobile terminal for being stored with the multimedia file is being inserted into television setIn after, actual storage path of the multimedia file relative to television set, the relative path of multimedia file can refer to more matchmakersStore path of the body file relative to the mobile terminal of above-mentioned insertion.Although the path of disk partition is different, disk partitionThe relative path of interior each multimedia file remains constant.For example, the multimedia file in a disk partition is with respect to roadDiameter be "/test file/video/video file 1.mp4 ", in the path difference of disk partition, the multimedia file it is absolutePath may be " file: //mnt/media/usb1/ test file/video/video file 1.mp4 ", " file: //mnt/Usb/usb.356729887/ test file/video/video file 1.mp4 ", etc..Further, the information of multimedia fileIt can also include the relative path of the multimedia file.
It therefore, can also be by the relative path of the multimedia file and the multimedia file in the embodiment of the present inventionTitle and the absolute path of the multimedia file save together.The title of the multimedia file, multimedia textIt is corresponding between the absolute path of the relative path of part and the multimedia file, i.e., it is that there is corresponding close between above-mentioned threeSystem, expression be the same multimedia file information, it is available to arrive other two according to any one informationInformation.
In one preferred embodiment of the invention, a favorites list can be preset in a television set, work as userIt, can be by the information preservation of the multimedia file described when wanting to save some multimedia file to play out againIn favorites list.It also can be by the title of the multimedia file, the relative path of the multimedia file and described moreThe absolute path of media file is stored in pre-set favorites list.
For example, the favorites list can be as shown in Table 1, including serial number, file name, relative path and absolutelyTo path.It can also include the other information, such as the author of multimedia file etc. of multimedia file in certain favorites listInformation, the embodiment of the present invention to this and it is without restriction.
Table one
| Serial number | File name | Relative path | Absolute path |
| 1 | Video file 1.mp4 | / test file/video/video file 1.mp4 | File: //mnt/usb/usb1/ test file/video/video file 1.mp4 |
| 2 | Music file 2.mp3 | / Music Appreciation/music file 2.mp3 | File: //mnt/usb/usb2/ Music Appreciation/music file 2.mp3 |
| 3 | Picture 3.jpg | / test file/picture/picture 3.jpg | File: //mnt/usb/usb3/ test file/picture/picture 3.jpg |
| …… | …… | …… | …… |
Certainly, it is only illustrated by taking favorites list as an example in the embodiment of the present invention, but is not limited to use and likeList saves the information such as the title of multimedia file, the absolute path of the relative path of multimedia file and multimedia fileThis mode, other modes that can save above- mentioned information are desirable, such as above- mentioned information can be stored in databaseIn etc..
During absolute path of the step 204 according to the information update multimedia file of the current mobile terminal,Can be to be updated to the absolute path of the multimedia file in the current mobile terminal, or in television setThe absolute path of the multimedia file of preservation is updated.Therefore the renewal process of the step 204 may include following two feelingsCondition:
The first situation: the absolute path of multimedia file in the current mobile terminal is updated.
In the embodiment of the present invention, the absolute path of the multimedia file saved in favorites list can be by multimedia textMobile terminal where part in insertion television set when institute's carry disk partition path and the multimedia file it is oppositeCombination of paths forms.Since the same mobile terminal is inserted into television set at different times, the disk partition of institute's carryPath may also be different, therefore after detecting the insertion message of current mobile terminal, if in the current mobile terminalMultimedia file information before have been saved in favorites list, then the multimedia file being stored in favorites listAbsolute path it can also happen that variation, therefore can absolute path to the multimedia file in the current mobile terminal intoRow updates.
In that case, step 204 can specifically include following sub-step:
Sub-step a1, from the relative path for searching multimedia file in the current mobile terminal in the favorites list.
If the title in some multimedia file in the current mobile terminal has been stored in the favorites list,The relative path of the multimedia file can be so searched from the favorites list according to the title of the multimedia file.?That is, from the multimedia identical with the title of multimedia file in the current mobile terminal of lookup names in the favorites listThe relative path of file.
Sub-step a2, by the relative path of the multimedia file of lookup and the current mobile terminal when front mountPath after combination is recorded as the absolute path of the multimedia file by the combination of paths of disk partition.
It, can be by the described more of lookup in finding the current mobile terminal after the relative path of multimedia fileThe relative path of media file and the current mobile terminal work as the combination of paths of the disk partition of front mount, and will be after combinationPath is recorded as the absolute path of the multimedia file, completes the absolute path of the multimedia file in the current mobile terminalUpdate.Further, the absolute path before updating in favorites list can also be deleted, and updated absolute path is protectedThere are in favorites list.
For example, entitled " the video file 1.mp4 " of the multimedia file for including in the current mobile terminal, then basisThe title " video file 1.mp4 " of the multimedia file can find the corresponding multimedia file from the favorites listRelative path be "/test file/video/video file 1.mp4 ", and the current mobile terminal got is when front mountThe path of disk partition be " file: //mnt/usb/usb.356729887 ", at this time can by after combination path " file: //Mnt/usb/usb.356729887/ test file/video/video file 1.mp4 " is recorded as the multimedia file " video textThe absolute path of part 1.mp4 " is (i.e. with the multimedia file " video file saved in the path replacement favorites list after combinationThe absolute path " file: //mnt/usb/usb1/ test file/video/video file 1.mp4 " of 1.mp4 ").
Second situation: the absolute path of the multimedia file saved in the favorites list is updated.
If the mobile terminal having been inserted into television set is extracted from television set, for including in favorites listThe mobile terminal of the extraction the path of the disk partition of the front mount of extraction absolute path, if again according to the absolute pathMultimedia file is searched, then it is possible that the case where multimedia file is not present under absolute path.Therefore of the invention oneIn kind preferred embodiment, the extraction message of mobile terminal whether can be received with real-time detection or periodic detection, is being detectedAfter the extraction message of mobile terminal, illustrate that the mobile terminal is extracted from television set, it at this time can be to position in the favorites listThe absolute path of multimedia file in the mobile terminal is modified, thus when user being avoided to select these multimedia filesCan not normal play the problem of.
Therefore, in one kind of the embodiment of the present invention in the specific implementation, the method can also include: to detect previous movementBefore the extraction message of terminal, the previous mobile terminal is obtained in the path of the disk partition of the front mount of extraction, the previous movementTerminal is inserted into before current mobile terminal insertion;Search from the favorites list includes that the previous mobile terminal existsThe absolute path in the path of the disk partition of the front mount of extraction, and the absolute path is set to sky.Specifically, the previous shiftingDynamic terminal and current mobile terminal can be same mobile terminal, be also possible to different mobile terminal.
For example, the path of the disk partition of front mount of the previous mobile terminal in extractions obtained for " file: //Mnt/media/usb1 " then can will include the absolute of the path " file: //mnt/media/usb1 " in the favorites listPath is set to sky, such as by the absolute path file in table one: //mnt/usb/usb1/ test file/video/video file1.mp4 is set to sky.
Therefore, it can also be updated to empty absolute path is set in favorites list in the embodiment of the present invention.In this kindIn the case of, step 204 can specifically include following sub-step:
Sub-step b1 searches the relative path that absolute path is empty multimedia file from the favorites list.
Sub-step b2, by the relative path of the multimedia file of lookup and the current mobile terminal when front mountPath after combination is recorded as the absolute path of the multimedia file by the combination of paths of disk partition.
After finding the relative path that absolute path is empty multimedia file in the favorites list, can incite somebody to actionThe relative path for the multimedia file searched and the current mobile terminal work as the combination of paths of the disk partition of front mount,And the path after combination is recorded as to the absolute path of the multimedia file, completing the absolute path is empty multimedia fileAbsolute path update.
For example, the current mobile terminal is " file: //mnt/usb/ when the path of the disk partition of front mountUsb.356729887 ", the absolute path found from the favorites list be the relative path of empty multimedia file be "/Test file/video/video file 1.mp4 ", at this time can be by the path " file: //mnt/usb/ after combinationUsb.356729887/ test file/video/video file 1.mp4 " is recorded as the multimedia file " video file 1.mp4 "Absolute path.
Step 205, the absolute path for the multimedia file selected described in the name acquiring according to selected multimedia file.
It, first can be from the favorites list when user wishes to play some multimedia file in the favorites listIn select wish play multimedia file title, then television set can be automatically according to the title of selected multimedia fileThe absolute path of the selected multimedia file is obtained from the favorites list.
Step 206, search whether that there are selected more matchmakers under the absolute path of the selected multimedia fileBody file, if so, executing step 207.
If thening follow the steps 207 there are the selected multimedia file under the absolute path;If the absolute pathDown be not present the selected multimedia file, then illustrate the selected multimedia file at this time can not normal play, at this time alsoThe prompt information that the selected multimedia file is not present, can not successfully play can be further displayed.
Step 207, the selected multimedia file is played.
If judging that illustrating can there are the selected multimedia file under the absolute path in step 203With the multimedia file selected described in normal play, the step 207 can be then executed at this time and plays the selected multimedia textPart.
If judging that illustrating can there are the selected multimedia file under the absolute path in step 206With the multimedia file selected described in normal play, the step 207 can be then executed at this time and plays the selected multimedia textPart.
In the embodiment of the present invention, although after mobile terminal carries out plug operation, the path meeting of the disk partition of institute's carryIt changes, but the relative path of multimedia file will not change, therefore in the insertion for detecting current mobile terminalIt, can be according to current mobile terminal when the path road opposite with corresponding multimedia file of the disk partition of front mount after messageDiameter is updated the absolute path of the multimedia file, then searches corresponding more matchmakers according to updated absolute pathBody file thereby may be ensured that the normal play of multimedia file.
Embodiment three:
It, can be to institute in the insertion message for detecting mobile terminal or after extracting message in the embodiment of the present inventionFavorites list is stated to be updated.Favorites list renewal process in above-mentioned two situations is introduced separately below.
Referring to Fig. 3, the flow chart that favorites list updates after the extraction message for detecting mobile terminal, the update are shownProcess can specifically include following steps:
Step 301, the extraction message of mobile terminal is detected.
It detects whether to receive the extraction of mobile terminal in the specific implementation, detection function can be set in one kind of the inventionMessage, the detection can be real-time detection, or periodic detection, the embodiment of the present invention to this and it is without restriction.
Step 302, before the extraction message for detecting mobile terminal, the mobile terminal of extraction is obtained in the front mount of extractionThe path of disk partition.
After detecting the extraction message of mobile terminal, illustrate that the mobile terminal is extracted from television set, it at this time can be rightThe information for being located at the multimedia file in the mobile terminal in the favorites list is updated, so that user be avoided to select theseWhen multimedia file can not normal play the problem of.The disk of front mount of the mobile terminal of extraction available first in extractionThe path of subregion, for example, acquisition disk partition path be " file: //mnt/media/usb1 ".
Step 303, the mobile terminal including the extraction is searched from the favorites list in the magnetic of the front mount of extractionThe absolute path in the path of disk subregion, and the absolute path is set to sky.
Since the absolute path of multimedia file in favorites list is as the mobile terminal carry where the multimedia fileThe path of disk partition and the relative path of the multimedia file be composed, therefore can be in the embodiment of the present inventionFrom the favorites list search include the extraction mobile terminal extraction front mount disk partition path (such as" file: //mnt/media/usb1 ") absolute path (such as absolute path " file: //mnt/usb/ is found from table oneUsb1/ test file/video/video file 1.mp4 "), the corresponding multimedia file of these absolute path is stored in described pull outIn mobile terminal out.Then the absolute path is set to sky, therefore when user selects the multimedia file, absolutely due to itIt is sky to path, then carries out the lookup that subsequent process carries out multimedia file.
It in one preferred embodiment of the invention, can also be to described after detecting the insertion message of mobile terminalFavorites list is updated.
Referring to Fig. 4, the flow chart that favorites list updates after the insertion message for detecting mobile terminal, Fig. 4 institute are shownThe process shown is illustrated for updating the absolute path that absolute path in favorites list is empty multimedia file.The updateProcess can specifically include following steps:
Step 401, the insertion message of mobile terminal is detected.
In the embodiment of the present invention, when detecting the insertion message of mobile terminal, real-time detection or regular can also be usedThe mode of detection, the embodiment of the present invention to this and it is without restriction.
Step 402, after detecting the insertion message of mobile terminal, the mobile terminal for obtaining insertion works as the disk of front mountThe path of subregion, and the update mark of the favorites list is set and is not completed to update.
After detecting the insertion message of mobile terminal, illustrates there is new mobile terminal to be inserted into television set, at this time may be usedTo be updated to the favorites list.
Specifically, the mobile terminal of insertion available first is when the path of the disk partition of front mount, such as acquisitionThe path of disk partition is " file: //mnt/media/usb1 ".Then the update mark that the favorites list can be set isIt updates and does not complete.In a kind of concrete implementation, the update mark can be indicated using 0 and 1, such as when the update indicatesIt indicates to update when being 0 not completing, indicates to update when update mark is 1 and complete.Certainly, described in the embodiment of the present invention moreNew mark can also be indicated using other way, to this and it is without restriction.
Step 403, the relative path that absolute path is empty multimedia file is searched from the favorites list.
Due to the title of multimedia file in favorites list, the relative path of multimedia file and multimedia fileThere is corresponding relationship between absolute path three, therefore, can be searched according to the absolute path for empty multimedia fileTo relative path corresponding with the absolute path, the relative path found is that the absolute path is empty multimedia fileRelative path.For example, the relative path that the absolute path found is empty multimedia file can be "/test file/viewFrequently/video file 1.mp4 ".
Step 404, the path of the disk partition and the relative path are combined into accessed path.
For example, can be by the mobile terminal of the insertion obtained in above-mentioned steps 302 when the path of the disk partition of front mountThe absolute path found in " file: //mnt/media/usb1 " and step 303 is the relative path of empty multimedia file"/test file/video/video file 1.mp4 " is combined, and the accessed path obtained from is " file: //mnt/usb/Usb1/ test file/video/video file 1.mp4 ".
Step 405, the multimedia file under the accessed path with the presence or absence of the absolute path for sky is searched.
Accessed path " file: the //mnt/usb/usb1/ test file/video/video obtained in the above-mentioned steps 404Search whether there is the multimedia file " video file 1.mp4 " for stating that absolute path is sky under file 1.mp4 ".If so, executingStep 406;If it is not, executing step 407.Step 406, using the accessed path as the absolute path of the multimedia file.
If there are the multimedia file " video file 1.mp4 " illustrating that institute can be passed through under the accessed pathIt states accessed path and finds the multimedia file, it at this time can be using the accessed path as the absolute road of the multimedia fileDiameter, and be saved in favorites list.Such as it can be by above-mentioned accessed path " file: //mnt/usb/usb1/ test textPart/video/video file 1.mp4 " is saved at the absolute path into table one under serial number 1.
After preservation, step 407 is executed.
Step 407, judge whether there are still for empty absolute path in favorites list.
If it exists, then return step 403;If it does not exist, 408 are thened follow the steps.
Step 408, the update mark of the favorites list is arranged to complete to update.
Referring to Fig. 5, a kind of flow chart of the playback method of multimedia file of the embodiment of the present invention two, this method are shownIt can specifically include following steps:
Step 501, the title of multimedia file is selected in favorites list.
When user wants to play some multimedia file, the more matchmakers to be played can be selected in favorites list firstThe title of body file, for example, entitled " the video file 1.mp4 " of selected multimedia file.
Step 502, the title according to selected multimedia file searches the absolute path of the multimedia file.
Due to the title of the multimedia file saved in favorites list, the relative path of multimedia file and more matchmakersIt is corresponding between the absolute path three of body file, therefore can be from described according to the title of above-mentioned selected multimedia fileThe absolute path of multimedia file corresponding with the title of the multimedia file, described is searched in favorites list.
For table one, it can search in favorites list and be located at more matchmakers under same serial number with the title of the multimedia fileThe absolute path of body file.For example, as entitled " the video file 1.mp4 " of selected multimedia file, multimedia textThe title of part is located under serial number 1, therefore can search the absolute path being located under serial number 1 in the favorites list.
Step 503, judge whether the absolute path is empty.
If the absolute path of the multimedia file is sky, illustrating at this time can not be according to the absolute road of the multimedia fileDiameter is searched, and thens follow the steps 504;If the absolute path of the multimedia file is not sky, 508 are thened follow the steps.
According to the above-mentioned description for Fig. 3 and Fig. 4 it is known that in the renewal process of favorites list in the embodiment of the present inventionIn the absolute path of the multimedia file in favorites list can also be configured, can specifically be arranged in the following way:
When there are absolute path in current favorites list under determining accessed path for empty multimedia file, looked into describedPath is looked for be recorded as the absolute path of the multimedia file;
And
After detecting the extraction message of mobile terminal, if finding the shifting including the extraction from the favorites listTerminal is moved in the absolute path in the path of the disk partition of the front mount of extraction, then the absolute path is set to sky.
Step 504, detect whether the favorites list updates completion.
It is not completed if the favorites list updates, thens follow the steps 505;It completes, executes if the favorites list updatesStep 509.
According to the above-mentioned description for Fig. 4 it is known that further including updating mark, therefore the step in the favorites list504, which are specifically as follows the reading update mark, determines whether the favorites list updates completion.For example, if the update is markedWill using 0 and 1 indicate, and be 0 when indicate update do not complete, be 1 when indicate update complete, then if reading the updateMark is 1, then can determine that update is completed;If reading the update mark is 0, it can determine that update does not complete.
Wherein, according to the above-mentioned description for Fig. 4 it is known that the update mark can be arranged in the following way:
After detecting the insertion message of mobile terminal, the road of the disk partition of the mobile terminal of insertion when front mount is obtainedWhen diameter, the update mark is set and is not completed to update;
When there are absolute path in current favorites list under determining accessed path for empty multimedia file, described in settingMark is updated to complete to update;
And
When absolute path is not present in current favorites list under determining accessed path as empty multimedia file, institute is setUpdate mark is stated to complete to update.
Wherein, the accessed path is the opposite road that absolute path is empty multimedia file in the current favorites listDiameter, and, path made of the combination of paths of the disk partition.
Step 505, the path that the mobile terminal being inserted into works as the disk partition of front mount is obtained, and according to the multimediaThe title of file searches the relative path of the multimedia file from the favorites list.
It is not completed if the favorites list updates, it can be said that there is new mobile terminal insertion before improving eyesight, therefore can be withSearch whether that there are the selected multimedia files from the mobile terminal being inserted into.
Disk point of the mobile terminal being inserted into available first when the path of the disk partition of front mount, such as acquisitionThe path in area is " file: //mnt/media/usb1 ".Then according to the title of the multimedia file from the favorites listThe middle relative path for searching the multimedia file, for example, according to the multimedia file title " video file 1.mp4 " fromThe relative path that the multimedia file can be found in table one is "/test file/video/video file 1.mp4 ".
Step 506, the path of the disk partition and the relative path are combined into accessed path.
For example, can be by the mobile terminal being inserted into obtained in above-mentioned steps 505 when the road of the disk partition of front mountRelative path "/test file/video/video file of diameter " file: //mnt/media/usb1 " and the multimedia file1.mp4 " is combined, and the accessed path obtained from is " file: //mnt/usb/usb1/ test file/video/videoFile 1.mp4 ".
Step 507, it searches under the accessed path with the presence or absence of the multimedia file.
Accessed path " file: the //mnt/usb/usb1/ test file/video/video obtained in the above-mentioned steps 506Search whether there is the multimedia file " video file 1.mp4 " for stating that absolute path is sky under file 1.mp4 ".If so, executingStep 508;If it is not, thening follow the steps 509.
Step 508, the multimedia file is played.
If judging the absolute path in step 503 not is sky, it can be said that bright exist under the absolute pathThe selected multimedia file, at this time can multimedia file described in normal play.
If found under the accessed path in step 507, there are the multimedia files, it can be said that bright be inserted intoMobile terminal in there are the selected multimedia files, at this time can also be with multimedia file described in normal play.
Step 509, show that the multimedia file is not present, can not succeed the prompt information played.
If detecting that the favorites list updates in step 504 to complete, it can be said that in the bright mobile terminal being inserted intoThere is no the selected multimedia files, can show at this time the multimedia file be not present, can not succeed play mentionShow information.
If found under the accessed path in step 507, there is no the multimedia files, alternatively brightThe selected multimedia file is not present in the mobile terminal being inserted into, can show that the multimedia file is not deposited at this time, can not succeed play prompt information.
The embodiment of the present invention mainly solving the technical problems that after mobile terminal plugs again original favorites list afterIt is continuous available, avoid the path for the disk partition for only changing carry from leading to not find stored multimedia file in favorites listThe problem of, favorites list is played to the range further expansion of control, the ease for use of television set can be greatlyd improve.
For the various method embodiments described above, for simple description, therefore, it is stated as a series of action combinations, butBe those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because according to the present invention, certainA little steps can be performed in other orders or simultaneously.Secondly, those skilled in the art should also know that, it is retouched in specificationThe embodiment stated belongs to preferred embodiment, and related actions and modules are not necessarily necessary for the present invention.
Example IV:
Referring to Fig. 6, a kind of structural block diagram of the playing device of multimedia file of the embodiment of the present invention four, the dress are shownSetting can specifically include with lower module:
Data obtaining module 601 after the insertion message for detecting current mobile terminal, obtains current mobile terminalInformation;
Routing update module 602, the absolute road for the information update multimedia file according to the current mobile terminalDiameter;
Path obtains module 603, the multimedia text for selecting described in the name acquiring according to selected multimedia fileThe absolute path of part;
File playing module 604, for, there are when the selected multimedia file, playing institute under the absolute pathState selected multimedia file.
Wherein, the information of the current mobile terminal may include the disk partition that the current mobile terminal works as front mountPath, the absolute path of the title of the multimedia file and the multimedia file is stored in pre-set favorites listIn, it can also include the relative path of the multimedia file in the favorites list.
In one preferred embodiment of the invention, the routing update module may include following submodule:
First searches submodule, for from searching multimedia file in the current mobile terminal in the favorites listRelative path;
First record sub module, the relative path of the multimedia file for that will search and the current mobile terminalWhen the combination of paths of the disk partition of front mount, the path after combination is recorded as to the absolute path of the multimedia file;
Second searches submodule, is the opposite of empty multimedia file for searching absolute path from the favorites listPath;
Second record sub module, the relative path of the multimedia file for that will search and the current mobile terminalWhen the combination of paths of the disk partition of front mount, the path after combination is recorded as to the absolute path of the multimedia file.
Wherein, described first submodule and first record sub module are searched to update multimedia in current mobile terminalThe module called when the absolute path of file, the second lookup submodule and second record sub module are to update to like arrangingThe module called when the absolute path of multimedia file in table.
In one preferred embodiment of the invention, described device can also comprise the following modules:
It extracts and obtains module, for searching absolute path from the favorites list in the second lookup submodule as skyMultimedia file relative path before, before detecting the extraction message of previous mobile terminal, obtain the previous movementTerminal is in the path of the disk partition of the front mount of extraction;The previous mobile terminal is before current mobile terminal insertionInsertion;
The road of the disk partition including front mount of the previous mobile terminal in extraction is searched from the favorites listThe absolute path of diameter, and the absolute path is set to sky.
Module is absolutely obtained, for the more matchmakers of information update in the routing update module according to the current mobile terminalBefore the absolute path of body file, selected multimedia file described in the name acquiring according to the selected multimedia fileAbsolute path;
And the routing update mould is called there is no when the selected multimedia file under the absolute pathBlock;There are when the selected multimedia file under the absolute path, the file playing module is called.
In the embodiment of the present invention after detecting mobile terminal insertion, the absolute path of multimedia file can be carried out moreNewly, therefore selected multimedia file can be searched under absolute path in the updated, is carried out so as to avoid in mobile terminalAfter plug operation, lead to the problem of being unable to normal play since the absolute path of multimedia file changes.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simplePlace illustrates referring to the part of embodiment of the method.
Embodiment five:
It can realize that the broadcasting to multimedia file makes to improve user experience by television set in the embodiment of the present inventionUser can experience the sound of higher quality, picture.Therefore the embodiment of the invention also provides a kind of television sets, which canTo include the playing device of multimedia file, the playing device of the multimedia file may include with lower module:
Data obtaining module after the insertion message for detecting current mobile terminal, obtains the letter of current mobile terminalBreath;
Routing update module, the absolute path for the information update multimedia file according to the current mobile terminal;
Path obtains module, the multimedia file for selecting described in the name acquiring according to selected multimedia fileAbsolute path;
File playing module, under the absolute path there are when the selected multimedia file, described in broadcastingSelected multimedia file.
Wherein, the information of the current mobile terminal may include the disk partition that the current mobile terminal works as front mountPath, the absolute path of the title of the multimedia file and the multimedia file is stored in pre-set favorites listIn, it can also include the relative path of the multimedia file in the favorites list.
In one preferred embodiment of the invention, the routing update module may include following submodule:
First searches submodule, for from searching multimedia file in the current mobile terminal in the favorites listRelative path;
First record sub module, the relative path of the multimedia file for that will search and the current mobile terminalWhen the combination of paths of the disk partition of front mount, the path after combination is recorded as to the absolute path of the multimedia file;
Second searches submodule, is the opposite of empty multimedia file for searching absolute path from the favorites listPath;
Second record sub module, the relative path of the multimedia file for that will search and the current mobile terminalWhen the combination of paths of the disk partition of front mount, the path after combination is recorded as to the absolute path of the multimedia file.
Wherein, described first submodule and first record sub module are searched to update multimedia in current mobile terminalThe module called when the absolute path of file, the second lookup submodule and second record sub module are to update to like arrangingThe module called when the absolute path of multimedia file in table.
In one preferred embodiment of the invention, described device can also comprise the following modules:
It extracts and obtains module, for searching absolute path from the favorites list in the second lookup submodule as skyMultimedia file relative path before, before detecting the extraction message of previous mobile terminal, obtain the previous movementTerminal is in the path of the disk partition of the front mount of extraction;The previous mobile terminal is before current mobile terminal insertionInsertion;
The road of the disk partition including front mount of the previous mobile terminal in extraction is searched from the favorites listThe absolute path of diameter, and the absolute path is set to sky.
Module is absolutely obtained, for the more matchmakers of information update in the routing update module according to the current mobile terminalBefore the absolute path of body file, selected multimedia file described in the name acquiring according to the selected multimedia fileAbsolute path;
And the routing update mould is called there is no when the selected multimedia file under the absolute pathBlock;There are when the selected multimedia file under the absolute path, the file playing module is called.
For the present embodiment, since it is basically similar to the method embodiment, so being described relatively simple, correlationPlace illustrates referring to the part of embodiment of the method.
Television set in the embodiment of the present invention is available when Forward after detecting the insertion message of current mobile terminalThe information of dynamic terminal, and the absolute path of the information update multimedia file according to the current mobile terminal;When needing to selectWhen multimedia file plays, the multimedia file that can select described in the name acquiring according to selected multimedia file it is absoluteIt path can be with more matchmakers selected described in normal play if there are the selected multimedia files under the absolute pathBody file.Due to that can be updated to the absolute path of multimedia file, therefore can be after detecting mobile terminal insertionSelected multimedia file is searched under updated absolute path, so as to avoid after mobile terminal carries out plug operation, byChanging in the absolute path of multimedia file leads to the problem of being unable to normal play.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are withThe difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
The embodiment of the present invention can describe in the general context of computer-executable instructions executed by a computer, exampleSuch as program module.Generally, program module include routines performing specific tasks or implementing specific abstract data types, program,Object, component, data structure etc..The present invention can also be practiced in a distributed computing environment, in these distributed computing ringsIn border, by executing task by the connected remote processing devices of communication network.In a distributed computing environment, program mouldBlock can be located in the local and remote computer storage media including storage equipment.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to byOne entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operationBetween there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaningCovering non-exclusive inclusion, so that the process, method, commodity or the equipment that include a series of elements not only include thatA little elements, but also including other elements that are not explicitly listed, or further include for this process, method, commodity orThe intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arrangedExcept there is also other identical elements in process, method, commodity or the equipment for including the element.
Above to a kind of playback method of multimedia file provided by the present invention, device and television set, carry out in detailThin to introduce, used herein a specific example illustrates the principle and implementation of the invention, and above embodiments are saidIt is bright to be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, foundationThought of the invention, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification is notIt is interpreted as limitation of the present invention.