Summary of the invention
Embodiment of the invention technical problem to be solved is, a kind of method and device of play multimedia files is provided.Can simply and at low cost obtain address and the copyright information that multimedia document information is also protected multimedia file simultaneously through configuration file.
In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of method of play multimedia files, comprising:
Obtain the file that comprises multimedia messages or Rule Information;
Judge whether the information that said file comprises is multimedia messages;
If; Then obtain multimedia messages; Otherwise obtain Rule Information, and obtain rule file according to said Rule Information, said rule file comprises multimedia messages or Rule Information; Judge whether the information that said rule file comprises is multimedia messages, repeats this step until obtaining multimedia messages;
Download multimedia file according to said multimedia messages and wait for broadcast.
Preferably, said multimedia messages comprises address information, play mode information and the playing duration information of multimedia file.
Preferably, the play mode of said multimedia file comprise live, intercut and program request.
Preferably, said Rule Information comprises the address information of rule file.
Preferably, the said file that comprises multimedia messages or Rule Information comprises the preset file of encryption and the rule file of encryption.
Preferably, the said step of obtaining the file that comprises multimedia messages or Rule Information comprises:
Read said file;
Whether the said file of verification damages;
Remind the user if said file corruption then reports an error, otherwise decipher said file, obtain the information that said file comprises.
Preferably, the said step that wait is play according to said multimedia messages download multimedia file comprises:
Multimedia file is downloaded in visit multimedia file address;
Said multimedia file is carried out burst, again the group bag;
Again the multimedia file after group is wrapped is mounted in the broadcast formation, waits for and playing.
Further, the embodiment of the invention also provides a kind of STB, comprising:
Processor module is used to obtain the file that comprises multimedia messages or Rule Information, and obtains multimedia messages and control each module and carry out corresponding work according to the information that said file comprises.
Network Interface Module is used to connect network and downloads multimedia file wait broadcast according to said multimedia messages;
Memory module is used to store the said multimedia file of download;
Playing module is used to play the said multimedia file of download;
The transfer bus module is used for transfer of data and communication between inner each module of said STB.
Preferably, the said file that comprises multimedia messages or Rule Information comprises the preset file of encryption and the rule file of encryption, and said processor module also is used to decipher the preset file of said encryption and the rule file of encryption.
Preferably; Said multimedia messages comprises address information, play mode information and the playing duration information of multimedia file, and said each module of processor module control is carried out corresponding work and specifically comprised: said processor module is downloaded multimedia file and is stored to said memory module through said Network Interface Module according to said multimedia address information; Said processor module is play said multimedia file according to said multimedia pattern information and the said playing module of playing duration information Control.
Embodiment of the present invention embodiment has following beneficial effect:
Server end on network is stored a large amount of rule files and multimedia file at random; In fixing preset file access network server end of STB set inside, judge whether the file that is obtained comprises multimedia messages, circulation is play until obtaining multimedia file; This process operates mainly in the STB end and carries out automatically; Server end need not to carry out complicated programming and database programming, therefore drop into and the cost safeguarded lower, STB end simple to operate.And said rule file and multimedia file are encrypt file, have protected the address information and the copyright information thereof of multimedia file, and be safe and reliable.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Please refer to Fig. 1, be the flow chart of the method for embodiment of the invention play multimedia files,
The method of the said play multimedia files of present embodiment comprises:
Step S101 reads preset file, and here, said preset file is for be stored in the equipment and changeless encrypt file in advance.The information that said preset file comprises is multimedia messages or Rule Information; Said multimedia messages comprises that multimedia messages comprises multimedia file address information, play mode information and playing duration information, and said Rule Information comprises the address information of rule file.
Step S102, deciphering is also resolved this document, and file described herein comprises the preset file of encryption and the rule file of encryption.Through encrypting address information and the copyright information thereof that to protect multimedia file, safe and reliable.Before deciphering, need the said file of verification whether to damage; Remind the user if said file corruption then reports an error, otherwise decipher said file, obtain the information that said file comprises.
Step S103 judges whether the information that file comprises is multimedia messages.
Step S104 if the information that said file comprises is multimedia messages, then downloads multimedia file according to said multimedia messages and waits for broadcast.
Particularly, the pattern of play multimedia files comprises live, program request and intercuts.
For example, theing contents are as follows behind the said file decryption:
<?xml?version='1.0'?encoding='UTF-8'?>
<node>
<item>
<playUrl>xxxp://8.8.8.8/allVideo/ad1.avi</playUrl>
</item>
</node>
Explain that then the information that said file comprises is multimedia messages, particularly, comprised the address information of multimedia file in this file.Download multimedia file according to the multimedia file address information in the said multimedia messages; If said multimedia messages also contains play mode information and playing duration information, the pattern and the time of then playing according to the play mode information in the said multimedia messages and playing duration information Control.
S105; If the information that said file comprises is not multimedia messages; The Rule Information that then comprises according to file obtains rule file, and the information that said rule file comprises is multimedia messages or Rule Information, and execution in step S102 and step S103 also constantly circulate until obtaining multimedia messages.
For example, theing contents are as follows behind the said file decryption:
<?xml?version=’1.0’?encoding=’UTF-8’?>
<node>
<item>
<ruleUrl>xxxp://8.8.8.8/allres/rule1</ruleUrl>
</item>
</node>
Explain that then information that said file comprises is not multimedia messages but Rule Information, according to Rule Information visit < ruleUrl >, obtain after the rule file again execution in step S102 and step S103 and constantly circulation until obtaining multimedia messages.
Particularly, when the fileinfo that obtains thes contents are as follows:
<?xml?version='1.0'?encoding='UTF-8'?>
<node>
<item>
<playType>Live</playType>
<playUrl>xxxp://8.8.8.8:8080/allVideo/living?</playUrl>
<playBeginTime>19:00</playBeginTime>
<playEndTime>19:30</playEndTime>
</item>
</node>
Then explain this document requirement the address of < playUrl>is carried out live, and the live time be limited in 19:00 to 19:30 according to < playBeginTime>and < playEndTime >.
When determining documentation requirements certain address is carried out need judging also whether file has other requirement live the time, like the requirement of time, or requirement such as program level.If live is clock news, then when the equipment time reached this integral point, the switching foreground is shown as needed live multimedia messages content.
When the fileinfo that obtains thes contents are as follows:
<?xml?version='1.0'?encoding='UTF-8'?>
<node>
<item>
<playType>Intercut</playType>
<playUrl>xxxp://8.8.8.8/allVideo/ad1.avi</playUrl>
</item>
</node>
After then downloading the multimedia file and storage well of this < playUrl>address, judge the residing running status of current device.If equipment is in the network blockage state, then switch the foreground and show, play the good multimedia file of storage.
When the fileinfo that obtains thes contents are as follows:
<?xml?version='1.0'?encoding='UTF-8'?>
<node>
<playType>Program request</playType>
<item>
<playName>Video 1</playName>
<playUrl>xxxp://8.8.8.8/allVideo/ad1.avi</playUrl>
</item>
<item>
<playName>Video 2</playName>
<playUrl>xxxp://8.8.4.4/allVideo/ad2.avi</playUrl>
</item>
<item>
<playName>Video 3</playName>
<playUrl>xxxp://4.4.4.4/allVideo/ad3.avi</playUrl>
</item>
<item>
<playName>Video 4</playName>
<playUrl>xxxp://8.8.8.8/allVideo/ad4.avi</playUrl>
</item>
</node>
Then point out the user, let the user select the some multimedia files in displaying video 1, video 2, video 3, the video 4.
Please refer to Fig. 2, download multimedia file for the embodiment of the invention and wait for the flow chart of playing.
The said download multimedia file of present embodiment waits for that the flow process of playing comprises:
Step S201, multimedia file is downloaded in visit multimedia file address.
Step S202 carries out burst to said multimedia file, again the group bag.
Step S203 is mounted to the multimedia file after group is wrapped again in the broadcast formation, waits for and playing.
Please refer to Fig. 3, be the composition sketch map of embodiment of the invention STB.
The said STB of present embodiment comprises:
Processor module 100 is used to obtain the file that comprises multimedia messages or Rule Information, and obtains multimedia messages and control each module and carry out corresponding work according to the information that said file comprises.
Particularly, the process that the information that comprises according to said file is obtained multimedia messages comprises: judge whether the information that said file comprises is multimedia messages; If; Then obtain multimedia messages; Otherwise obtain Rule Information, and obtain rule file according to said Rule Information, said rule file comprises multimedia messages or Rule Information; Judge whether the information that said rule file comprises is multimedia messages, repeats this step until obtaining multimedia messages.
Network Interface Module 200 is used to connect network and downloads multimedia file wait broadcast according to said multimedia messages;
Particularly; Said STB connects the server of network terminal through said Network Interface Module 200; And under the control of said processor module 100, obtain multimedia file or rule file, and finally obtain multimedia file through said rule file and wait for broadcast from server end.
Memory module 300 is used to store the said multimedia file of download;
Playing module 400 is used to play the said multimedia file of download;
Transfer bus module 500 is used for transfer of data and communication between inner each module of said STB.
Particularly; Said multimedia messages comprises address information, play mode information and the playing duration information of multimedia file, and said processor module 100 each modules of control are carried out corresponding work and specifically comprised: said processor module 100 is downloaded multimedia file and is stored to said memory module 300 through said Network Interface Module 200 according to said multimedia address information; Said processor module 100 is play said multimedia file according to said multimedia pattern information and the said playing module 400 of playing duration information Control.
Wherein, the said file that comprises multimedia messages or Rule Information comprises the preset file of encryption and the rule file of encryption, and said processor module 100 also is used to decipher the preset file of said encryption and the rule file of encryption.
Since deciphering, the preset file of parsing and rule file, and judge whether the file that is obtained comprises multimedia messages, and circulation is all carried out until the process of obtaining multimedia file automatically in STB, therefore operate very simple.And the multimedia file of server end and rule file are stored at random on the network, need not to carry out complicated programming and database programming, and be therefore lower at the cost of server end input and maintenance.
Through the description of the foregoing description, the present invention has the following advantages:
Server end on network is stored a large amount of rule files and multimedia file at random; In fixing preset file access network server end of STB set inside, judge whether the file that is obtained comprises multimedia messages, circulation is play until obtaining multimedia file; This process operates mainly in the STB end and carries out automatically; Server end need not to carry out complicated programming and database programming, therefore drop into and the cost safeguarded lower, STB end simple to operate.And said rule file and multimedia file are encrypt file, have protected the address information and the copyright information thereof of multimedia file, and be safe and reliable.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Be to instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above disclosedly be merely preferred embodiment of the present invention, can not limit the present invention's interest field certainly with this, the equivalent variations of therefore doing according to claim of the present invention still belongs to the scope that the present invention is contained.