Summary of the invention
In order to solve the problem of background technology, embodiments provide a kind of control method for playing back and device of multimedia file.
On the one hand, provide a kind of control method for playing back of multimedia file, described method comprises:
Obtain the accekeration that the transducer in the terminal of described play multimedia file records in rectangular coordinate system in space all directions;
Determine that space sets change and the current status of described terminal of the acceleration on vector according to the accekeration that described transducer records in rectangular coordinate system in space all directions;
If the current status of described terminal is flat condition, then judge that whether the change of the acceleration on described space setting vector is two minor peaks in appearance first number range, and whether the interval time of two minor peaks is less than the first Preset Time, if two minor peaks be changed in described first number range of appearance of the acceleration on described space setting vector, and be less than described first Preset Time the interval time of two minor peaks, then judge that the change of described acceleration meets the pattern feature of double-click event; Or, if the current status of described terminal is hand holding state, then judge whether the change of acceleration on described space setting vector is two minor peaks occurred within the scope of second value, and whether the interval time of two minor peaks is less than the second Preset Time, if two minor peaks be changed within the scope of the described second value of appearance of the acceleration on described space setting vector, and be less than described second Preset Time the interval time of two minor peaks, then judge that the change of described acceleration meets the pattern feature of double-click event;
If the change of described acceleration meets the pattern feature of double-click event, Play Control is carried out to described multimedia file.
Preferably, the described accekeration in rectangular coordinate system in space, all directions recorded according to described transducer determines the current status of described terminal, comprising:
Determine that space sets the acceleration mean value on vector according to the accekeration that described transducer records in rectangular coordinate system in space all directions;
If described acceleration mean value is less than first threshold, then determine that the current status of described terminal is flat condition;
If described acceleration mean value is not less than described first threshold, then determine that the current status of described terminal is hand holding state.
On the other hand, provide a kind of broadcast control device of multimedia file, described device comprises:
Detection module, the accekeration that the transducer in the terminal obtaining described play multimedia file records in rectangular coordinate system in space all directions;
First determination module, the accekeration for recording in rectangular coordinate system in space all directions according to described transducer determines the current status of described terminal;
Second determination module, the accekeration for recording in rectangular coordinate system in space all directions according to described transducer determines the change of the acceleration on space setting vector;
Judge module, for when the current status of described terminal is flat condition, judge that whether the change of the acceleration on described space setting vector is two minor peaks in appearance first number range, and whether the interval time of two minor peaks is less than the first Preset Time, when two minor peaks be changed in described first number range of appearance of the acceleration on described space setting vector, and when being less than described first Preset Time the interval time of two minor peaks, judge that the change of described acceleration meets the pattern feature of double-click event; Or, for when the current status of described terminal is hand holding state, then judge whether the change of acceleration on described space setting vector is two minor peaks occurred within the scope of second value, and whether the interval time of two minor peaks is less than the second Preset Time, if two minor peaks be changed within the scope of the described second value of appearance of the acceleration on described space setting vector, and be less than described second Preset Time the interval time of two minor peaks, then judge that the change of described acceleration meets the pattern feature of double-click event;
Control module, for when the change of described acceleration meets the pattern feature of double-click event, carries out Play Control to described multimedia file.
Preferably, described first determination module, comprising:
First determining unit, the accekeration for recording in rectangular coordinate system in space all directions according to described transducer determines the acceleration mean value on space setting vector;
Second determining unit, for when described acceleration mean value is less than first threshold, determines that the current status of described terminal is flat condition; When described acceleration mean value is not less than described first threshold, determine that the current status of described terminal is hand holding state.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
The double click operation performed due to user can be embodied by the acceleration of terminal, after user carries out double click operation, by the acceleration of sense terminals, judge whether the change of acceleration meets the pattern feature of double-click event, and according to judged result, Play Control is carried out to multimedia file, can realize carrying out Play Control according to double click operation to multimedia file, and then under the prerequisite simplifying user operation, improve the Play Control speed of multimedia file, reduce the chance of other function button of false touch, thus increase proper operation probability.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with accompanying drawing, the embodiment of the present invention is described in further detail.
Embodiment one
Present embodiments provide a kind of control method for playing back of multimedia file, see Fig. 1, the method flow that the present embodiment provides is specific as follows:
101: acceleration detection is carried out to the terminal of play multimedia file;
102: judge whether the change of acceleration meets the pattern feature of double-click event;
103: if the change of acceleration meets the pattern feature of double-click event, then Play Control is carried out to multimedia file.
Preferably, acceleration detection is carried out to the terminal of play multimedia file, comprising:
Obtain the accekeration that the transducer in the terminal of play multimedia file records in rectangular coordinate system in space all directions;
Judge whether the change of acceleration meets the pattern feature of double-click event, comprising:
The current status of accekeration determination terminal recorded in rectangular coordinate system in space all directions according to transducer and space set the change of the acceleration on vector;
Change according to the acceleration on the current status of terminal and space setting vector judges whether the change of acceleration meets the pattern feature of double-click event.
Preferably, according to the current status of accekeration determination terminal that transducer in rectangular coordinate system in space, all directions records, comprising:
Determine that space sets the acceleration mean value on vector according to the accekeration that transducer records in rectangular coordinate system in space all directions;
If acceleration mean value is less than first threshold, then determine that the current status of terminal is flat condition;
If acceleration mean value is not less than first threshold, then determine that the current status of terminal is hand holding state.
Here the space setting vector that acceleration mean value is corresponding, the space corresponding with the change of acceleration sets vector, can be identical, also can not be identical.
Preferably, judge whether the change of acceleration meets the pattern feature of double-click event, comprising according to the change of the acceleration on the current status of terminal and space setting vector:
If the current status of terminal is flat condition, then judges that whether the change of the acceleration on space setting vector is two minor peaks in appearance first number range, and whether be less than the first Preset Time the interval time of two minor peaks;
If two minor peaks be changed in appearance first number range of the acceleration on space setting vector, and be less than the first Preset Time the interval time of two minor peaks, then judge that the change of acceleration meets the pattern feature of double-click event.
Alternatively, judge whether the change of acceleration meets the pattern feature of double-click event, comprising according to the change of the acceleration on the current status of terminal and space setting vector:
If the current status of terminal is hand holding state, then judges whether the change of the acceleration on space setting vector is two minor peaks occurred within the scope of second value, and whether be less than the second Preset Time the interval time of two minor peaks;
If the acceleration on space setting vector be changed to two minor peaks occurred within the scope of second value, and the interval time of two minor peaks is less than the second Preset Time, then judge that the change of acceleration meets the pattern feature of double-click event.
The method that the present embodiment provides, the double click operation performed due to user can be embodied by the acceleration of terminal, after user carries out double click operation, by the acceleration of sense terminals, judge whether the change of acceleration meets the pattern feature of double-click event, and according to judged result, Play Control is carried out to multimedia file, can realize carrying out Play Control according to double click operation to multimedia file, and then under the prerequisite simplifying user operation, improve the Play Control speed of multimedia file, reduce the chance of other function button of false touch, thus increase proper operation probability.
In order to clearly set forth the control method for playing back of a kind of multimedia file that above-described embodiment provides, in conjunction with the content of above-described embodiment, for following embodiment two, a kind of control method for playing back of multimedia file is described in detail, refers to following embodiment two.
Embodiment two
Present embodiments provide a kind of control method for playing back of multimedia file, for convenience of explanation, the mobile phone that the present embodiment is Android system for the terminal of play multimedia for operating system, illustrates in detail to the method that the present embodiment provides.See Fig. 2, the method flow that the present embodiment provides is specific as follows:
201: obtain the accekeration that the transducer in mobile phone records in rectangular coordinate system in space all directions;
For this step, the present embodiment does not specifically limit transducer.Such as, transducer is the gyroscope in mobile phone, or can measure other transducer of acceleration in mobile phone.
In addition, the present embodiment does not also limit the concrete mode detected.Such as, one can be registered monitor module in the system platform of Android system, the accekeration recorded in rectangular coordinate system in space all directions by the transducer in this monitoring module acquisition mobile phone.
Wherein, rectangular coordinate system in space all directions are respectively x, y, z direction, and x is X direction, and y is y direction, and y is number axis direction.
202: the current status of accekeration determination mobile phone recorded in rectangular coordinate system in space all directions according to transducer and space set the change of the acceleration on vector;
For this step, determine that space sets the acceleration mean value on vector according to the accekeration that transducer records in rectangular coordinate system in space all directions, then according to this acceleration mean value, the current status of mobile phone can be determined.Here the space setting vector that acceleration mean value is corresponding, the space corresponding with the change of acceleration sets vector, can be identical, also can not be identical.
For convenience of explanation, comprise hand holding state and flat condition for mobile phone status, the acceleration mean value due to mobile phone hand holding state is generally greater than the acceleration mean value of mobile phone flat condition, therefore, setting first threshold, this first threshold is the minimum value of the acceleration of hand holding state.If acceleration mean value is less than first threshold, then determine that the current status of terminal is flat condition; If acceleration mean value is not less than first threshold, then determine that the current status of terminal is hand holding state.
Wherein, can determine first threshold based on experience value, the present embodiment does not limit the determination mode of first threshold and concrete size.Certainly, mobile phone status, except above-mentioned hand holding state and flat condition, can also have other state, and the present embodiment does not limit the current residing concrete state of mobile phone.In addition, the method of the current status of accekeration determination mobile phone recorded in rectangular coordinate system in space all directions according to transducer is except said method, can also have other method, the present embodiment does not also limit the concrete defining method of the current status of accekeration determination mobile phone recorded in rectangular coordinate system in space all directions according to transducer.
In addition, the accekeration recorded in rectangular coordinate system in space all directions due to transducer is vector, therefore according to the accekeration that transducer records in rectangular coordinate system in space all directions, a space setting vector can be determined, this space setting vector can be the arbitrary vector in space vector, and the present embodiment does not do concrete restriction to this.After statistics by the accekeration in the rectangular coordinate system in space all directions that detect in certain hour section transducer, the acceleration change on this space setting vector in this time period can also be obtained.
203: the change according to the acceleration on the current status of mobile phone and space setting vector judges whether the change of acceleration meets the pattern feature of double-click event, if the change of acceleration meets the pattern feature of double-click event, then perform step 204, if the change of acceleration does not meet the pattern feature of double-click event, then process ends;
For this step, judge that the concrete the judgment mode whether change of acceleration meets the pattern feature of double-click event can adopt but be not limited to following two kinds of modes according to the change of acceleration on the current status of mobile phone and space setting vector:
First kind of way: if the current status of mobile phone is flat condition, then judge that whether the change of the acceleration on space setting vector is two minor peaks in appearance first number range, and whether be less than the first Preset Time the interval time of two minor peaks;
For first kind of way, if two minor peaks be changed in appearance first number range of the acceleration on space setting vector, and be less than the first Preset Time the interval time of two minor peaks, then judge that the change of acceleration meets the pattern feature of double-click event; If space setting vector on acceleration be changed to two minor peaks do not occurred in the first number range, although or space setting vector on acceleration be changed to two minor peaks occurred in the first number range, but the interval time of two minor peaks is not less than the first Preset Time, then judge that the change of acceleration does not meet the pattern feature of double-click event.
In addition, whether the present embodiment is not two minor peaks in appearance first number range to the change of the acceleration judged on space setting vector, and the concrete decision method being less than the first Preset Time the interval time of two minor peaks limits.Such as, according to the change curve of acceleration on space setting vector, judge that whether this curve is two minor peaks in appearance first number range, and whether be less than the first Preset Time the interval time of two minor peaks.Preferably, the first number range can be 1m/s
2(rice/square second)-2m/s
2, the first Preset Time can for being less than arbitrary value of 200ms (millisecond).Certainly, the first number range and the first Preset Time can also be other numerical value, and the present embodiment does not limit the concrete size of the first number range and the first Preset Time.
The second way: if the current status of terminal is hand holding state, then judge whether the change of the acceleration on space setting vector is two minor peaks occurred within the scope of second value, and whether be less than the second Preset Time the interval time of two minor peaks;
For the second way, if the acceleration on space setting vector be changed to two minor peaks occurred within the scope of second value, and the interval time of two minor peaks is less than the second Preset Time, then judge that the change of acceleration meets the pattern feature of double-click event; If space setting vector on acceleration be changed to two minor peaks do not occurred within the scope of second value, although or there are two minor peaks within the scope of second value in the change of acceleration on space setting vector, but the interval time of two minor peaks is not less than the second Preset Time, then judge that the change of acceleration does not meet the pattern feature of double-click event.
In addition, whether the present embodiment is not two minor peaks occurred within the scope of second value to the change of acceleration judged on space setting vector, and the concrete decision method whether being less than the second Preset Time the interval time of two minor peaks limits.Such as, according to the change curve of the acceleration on space setting vector, judge whether this curve is two minor peaks occurred within the scope of second value, and be less than the second Preset Time the interval time of two minor peaks.Preferably, second value scope is 2m/s
2-3m/s
2, the second Preset Time is the arbitrary value between 300ms-500ms.Certainly, second value scope and the second Preset Time can also be other numerical value, and the present embodiment does not limit the concrete size of second value scope and the second Preset Time.
It should be noted that, the pattern feature of double-click event is except two minor peaks in above-mentioned appearance first number range, and the interval time of two minor peaks is less than the first Preset Time, or there are two minor peaks within the scope of second value, and be less than the interval time of two minor peaks outside the second Preset Time, can also be further feature, the present embodiment specifically limit the pattern feature of the event of double-click.
204: Play Control is carried out to multimedia file.
For this step, determine multimedia file status, and carry out Play Control according to multimedia file status.If multimedia file is in broadcast state, then suspend play multimedia file.Or, if multimedia file is in halted state, then play multimedia file.
In addition, multimedia file status can also be other state, and the present embodiment does not limit state concrete residing for multimedia file.In addition, when multimedia file is in other state except broadcast state and halted state, the operation of other Play Control is performed according to the concrete state that multimedia file is in, the present embodiment does not limit the concrete kind of Play Control, and the present embodiment does not also limit the concrete corresponding relation of multimedia state and Play Control.
In addition, the present embodiment does not limit the concrete judgment rule of multimedia file status, include but not limited to: because self meeting of playing controller carry out record to the multimedia file status of current broadcasting, so determine multimedia file status according to self meeting of playing controller to the record of the multimedia file status of current broadcasting.
It should be noted that, the present embodiment only for the terminal of play multimedia for mobile phone, the control method for playing back of the multimedia file that the present embodiment provides is illustrated.During concrete enforcement, the terminal of play multimedia, except mobile phone, can also be panel computer, or miscellaneous equipment, and the present embodiment does not limit the specific product form of the terminal of play multimedia.In addition, the operating system of the terminal use of play multimedia, except Android system, can also be Saipan system, or other system, and the present embodiment does not limit the operating system that the terminal of play multimedia uses.
The method that the present embodiment provides, the double click operation performed due to user can be embodied by the acceleration of terminal, after user carries out double click operation, by the acceleration of sense terminals, judge whether the change of acceleration meets the pattern feature of double-click event, and according to judged result, Play Control is carried out to multimedia file, can realize carrying out Play Control according to double click operation to multimedia file, and then under the prerequisite simplifying user operation, improve the Play Control speed of multimedia file, reduce the chance of other function button of false touch, thus increase proper operation probability.
Embodiment three
Present embodiments provide a kind of broadcast control device of multimedia file, the control method for playing back of multimedia file of this device for performing above-described embodiment one or embodiment two and providing.See Fig. 3, this terminal comprises:
Detection module 301, for carrying out acceleration detection to terminal;
Judge module 302, for judging whether the change of acceleration meets the pattern feature of double-click event;
Control module 303, for when the change of acceleration meets the pattern feature of double-click event, carries out Play Control to multimedia file.
Preferably, detection module 301, the accekeration that the transducer in the terminal obtaining play multimedia file records in rectangular coordinate system in space all directions;
See Fig. 4, judge module 302, comprising:
First determines submodule 3021, for the current status of accekeration determination terminal recorded in rectangular coordinate system in space all directions according to transducer;
Second determines submodule 3022, and the accekeration for recording in rectangular coordinate system in space all directions according to transducer determines the change of the acceleration on space setting vector;
Judge submodule 3023, the change for the acceleration on space setting vector according to the current status of terminal and transducer judges whether the change of acceleration meets the pattern feature of double-click event.
Participate in Fig. 5, first determines submodule 3021, comprising:
First determining unit 30211, the accekeration for recording in rectangular coordinate system in space all directions according to transducer determines the acceleration mean value on space setting vector;
Second determining unit 30212, for when acceleration mean value is less than first threshold, determines that the current status of terminal is flat condition; When acceleration mean value is not less than first threshold, determine that the current status of terminal is hand holding state.
Preferably, judge submodule 3023, for when the current status of terminal is flat condition, judges that whether the change of the acceleration on space setting vector is two minor peaks in appearance first number range, and whether be less than the first Preset Time the interval time of two minor peaks; When two minor peaks be changed in appearance first number range of the acceleration on space setting vector, and when the interval time of two minor peaks is less than the first Preset Time, judge that the change of acceleration meets the pattern feature of double-click event.
Alternatively, judge submodule 3023, for when the current status of terminal is hand holding state, judges whether the change of the acceleration on space setting vector is two minor peaks occurred within the scope of second value, and whether be less than the second Preset Time the interval time of two minor peaks; Be changed to when the acceleration on space setting vector two minor peaks occurred within the scope of second value, and when the interval time of two minor peaks is less than the second Preset Time, judge that the change of acceleration meets the pattern feature of double-click event.
The terminal that the present embodiment provides, the double click operation performed due to user can be embodied by the acceleration of terminal, after user carries out double click operation, by the acceleration of sense terminals, judge whether the change of acceleration meets the pattern feature of double-click event, and according to judged result, Play Control is carried out to multimedia file, can realize carrying out Play Control according to double click operation to multimedia file, and then under the prerequisite simplifying user operation, improve the Play Control speed of multimedia file, reduce the chance of other function button of false touch, thus increase proper operation probability.
It should be noted that: the Play Control terminal of the multimedia file that above-described embodiment provides is when realizing the Play Control of multimedia file, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by terminal is divided into different functional modules, to complete all or part of function described above.In addition, the Play Control terminal of the multimedia file that above-described embodiment provides and the control method for playing back embodiment of multimedia file belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.