Summary of the invention
The invention provides a kind of animation playing method and device, adopt different broadcasting speeds to play to realize whole section of animation, improve the flexibility ratio that animation is play.
First aspect of the present invention is to provide a kind of animation playing method, comprising:
According to the division instruction received, whole section of animation is divided at least two cross-talk animations, and is each cross-talk cartoon setting sequence identification according to playing sequence;
Obtain the broadcasting speed of each cross-talk animation;
According to described sequence identification, the broadcasting speed correspondence of each cross-talk animation got is adopted to play each cross-talk animation respectively.
Another aspect of the present invention is to provide a kind of moving-image playback device, comprising:
Divide module, for according to the division instruction received, whole section of animation is divided at least two cross-talk animations, and is each cross-talk cartoon setting sequence identification according to playing sequence;
Acquisition module, for obtaining the broadcasting speed of each cross-talk animation;
Playing module, for according to described sequence identification, adopts the broadcasting speed correspondence of each cross-talk animation got to play each cross-talk animation respectively.
As shown from the above technical solution, the embodiment of the present invention is by being divided into the sub-animation of multistage by described whole section of animation, then obtain the broadcasting speed of each cross-talk animation, realize adopting different broadcasting speed to play each cross-talk animation, improve the flexibility ratio of whole section of animation broadcasting and play diversity.
Embodiment
The technical scheme that various embodiments of the present invention provide can adopt different broadcasting speeds to play in playing process to realize a complete animation, to improve the dirigibility that animation is play.Such as, the flash demo of a historical evolution, a usual historical process can be divided into different phase, each stage event is different, primary and secondary is different, and the content of important developing stage demonstration needs more detailed, and broadcasting speed possibility will be slower than the developing stage broadcasting speed of insignificant.Adopt technical scheme provided by the invention, the demand of this kind of flash demo can be solved, play in a flexible way, and then improve the diversity of animation broadcasting, also can give prominence to the speech emphasis of demonstrator.For making the object of the embodiment of the present application, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described.
As shown in Figure 1, the schematic flow sheet of animation playing method that provides of the embodiment of the present invention one.The executive agent of the method described in the present embodiment one can be moving-image playback device.As shown in Figure 1, the method described in the present embodiment one comprises:
The division instruction that step 101, basis receive, is divided at least two cross-talk animations by whole section of animation, and is each cross-talk cartoon setting sequence identification according to playing sequence.
Wherein, described whole section of animation refers to a complete animation, and moving-image playback device is according to the division instruction received, and the animation this completed is divided at least two cross-talk animations, so that the different speed of follow-up employing plays each cross-talk animation.
Step 102, obtain the broadcasting speed of each cross-talk animation.
Particularly, this step one may implementation method as follows: receive carry sequence identification and broadcasting speed instruction is set; Instruction is set according to described, obtains the broadcasting speed of sub-animation corresponding to described sequence identification.
Or, if also comprise before this step 102: receive the configuring request carrying sequence identification and audio-frequency information; According to described configuring request, the sub-animation corresponding for described sequence identification configures described audio-frequency information, to play described audio-frequency information when playing described sub-animation simultaneously.Correspondingly, the another kind possibility implementation method of this step 102 is as follows: the totalframes obtaining described sub-animation; Obtain the audio-frequency information playing duration simultaneously play with described sub-animation; According to totalframes and the described audio-frequency information playing duration of described sub-animation, calculate the broadcasting speed that described sub-animation is corresponding.
Step 103, according to described sequence identification, adopt respectively each cross-talk animation got broadcasting speed correspondence play each cross-talk animation.
The present embodiment, by described whole section of animation is divided into the sub-animation of multistage, then obtains the broadcasting speed of each cross-talk animation, realizes adopting different broadcasting speed to play each cross-talk animation, improves the flexibility ratio of whole section of animation broadcasting and plays diversity.
As shown in Figure 2, the schematic flow sheet of animation playing method that provides of the embodiment of the present invention two.Similarly, the executive agent of described method that the present embodiment two provides can be moving-image playback device.As shown in Figure 2, the present embodiment two based on above-described embodiment one, described step 102, obtain each cross-talk animation broadcasting speed after, also comprise:
Step 201, reception carry the play instruction of playing progress rate value.
Particularly, described playing progress rate value can a specifically percent value, if whole section of animation is 100%, then described playing progress rate value can be the arbitrary value in 0% ~ 100%.As shown in Figure 3, described play instruction can be that the shuffle button 2 that user passes through on the slip axle 1 of dragging animation inputs to moving-image playback device.Or, for the animation without slip axle as shown in Figure 4, described play instruction also can be that user sends the play instruction carrying playing progress rate value directly to described moving-image playback device by keyboard, and described playing progress rate value is the value that described user is directly inputted by keyboard.
Step 202, according to described playing progress rate value, determine the play position that described playing progress rate value is corresponding.
Wherein, described play position comprises: play position in sequence identification and sub-animation.Particularly, the one of this step may implementation be: according to the corresponding relation of the playing progress rate value preset and play position, obtain the play position that described playing progress rate value is corresponding.Namely the corresponding relation of described playing progress rate value and play position is pre-stored with in moving-image playback device.The corresponding relation of described playing progress rate value and play position can be artificially set and be stored in described moving-image playback device.Or another of this step may implementation be: according to described playing progress rate value, adopts the computing method preset to calculate play position corresponding to described playing progress rate value.Described default computing method can artificially set.
If the described sequence identification of step 203 is the last mark that sorts, then the broadcasting speed of the sub-animation adopting described sequence identification corresponding, plays the frame after play position in described sub-animation; Otherwise, the broadcasting speed of the sub-animation adopting described sequence identification corresponding, play the frame after play position in described sub-animation, and adopt the broadcasting speed correspondence of the corresponding sub-animation of residue sequence identification come after described sequence identification to play sub-animation corresponding to described residue sequence identification.
Here it should be noted that: each embodiment provided by the invention also can support whole section of animation to be divided into the situation of a cross-talk animation.Particularly, when described whole section of animation is divided into a cross-talk animation, be just similar to prior art, adopt the broadcasting speed of this cross-talk animation got to play whole section of animation.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
As shown in Figure 5, the structural representation of moving-image playback device that provides of the embodiment of the present invention three.As shown in Figure 5, the device described in the present embodiment three comprises: divide module 10, acquisition module 20 and playing module 30.Wherein, whole section of animation, for according to the division instruction received, is divided at least two cross-talk animations, and is each cross-talk cartoon setting sequence identification according to playing sequence by described division module 10.Described acquisition module 20 is for obtaining the broadcasting speed of each cross-talk animation.Described playing module 30, for according to described sequence identification, adopts the broadcasting speed correspondence of each cross-talk animation got to play each cross-talk animation respectively.
The embodiment of the present invention, by described whole section of animation is divided into the sub-animation of multistage, then obtains the broadcasting speed of each cross-talk animation, realizes adopting different broadcasting speed to play each cross-talk animation, improves the flexibility ratio of whole section of animation broadcasting and plays diversity.
Acquisition module described in above-described embodiment comprises: receiving element and acquiring unit.Wherein, described receiving element for receive carry sequence identification and broadcasting speed instruction is set.Described acquiring unit is used for arranging instruction according to described, obtains the broadcasting speed of sub-animation corresponding to described sequence identification.
Further, the moving-image playback device described in above-described embodiment also comprises: the first receiver module and configuration module.Wherein, described first receiver module for receive carry sequence identification and broadcasting speed instruction is set.Described configuration module is used for arranging instruction according to described, obtains the broadcasting speed of sub-animation corresponding to described sequence identification.Correspondingly, described in above-described embodiment one, acquisition module comprises: the first acquiring unit, second acquisition unit and computing unit.Wherein, described first acquiring unit is for obtaining the totalframes of described sub-animation.Described second acquisition unit is for obtaining the audio-frequency information playing duration play with described sub-animation simultaneously.Described computing unit is used for, according to the totalframes of described sub-animation and described audio-frequency information playing duration, calculating the broadcasting speed that described sub-animation is corresponding.
As shown in Figure 6, the structural representation of moving-image playback device that provides of the embodiment of the present invention four.As shown in Figure 6, the embodiment of the present invention four, based on above-described embodiment three, also comprises: the second receiver module 40 and determination module 50.Wherein, described second receiver module 40 is for receiving the play instruction carrying playing progress rate value.Described determination module 50 is for according to described playing progress rate value, determine the play position that described playing progress rate value is corresponding, wherein, described play position comprises: play position in sequence identification and sub-animation, wherein, described play position comprises: play position in sequence identification and sub-animation.When described playing module 30 is also for being the mark sorting last when described sequence identification, the broadcasting speed of the sub-animation adopting described sequence identification corresponding, plays the frame after play position in described sub-animation; When described sequence identification is not the mark sorting last, the broadcasting speed of the sub-animation adopting described sequence identification corresponding, play the frame after play position in described sub-animation, and adopt the broadcasting speed correspondence of the corresponding sub-animation of residue sequence identification come after described sequence identification to play sub-animation corresponding to described residue sequence identification.
Further, described determination module 50, specifically for the corresponding relation according to the playing progress rate value preset and play position, obtains the play position that described playing progress rate value is corresponding; Or, according to described playing progress rate value, adopt the computing method preset to calculate play position corresponding to described playing progress rate value.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.