The method of a kind of portable terminal and raising screen interface render speed thereof
Technical field
The present invention relates to communication technical field, more specifically, relate to the method for a kind of portable terminal and raising screen interface render speed thereof.
Background technology
The mode that screen interface drafting is in the past used is that loading, the drafting of clear screen and picture video resource carried out simultaneously.Will cause the use of CPU too high like this, make terminal load bigger, cause some application program not accomplish smoothly, occur such as the interface of video draw imperfect, or block motionless situation.
At present the mobile phone of the overwhelming majority uses the hardware decoding, and hardware decoding needs hardware that hardware decoder module, relevant driving cooperation, suitable playout software and the setting correct to playout software are arranged, and lacks any one and all can not open the hardware decoding function.
The advantage of hardware decoding is that efficient is high, low in energy consumption, heat power consumption is low; Shortcoming is to lack strong support (comprising filter, captions etc.), limitation big (for example opening the disabler etc. of the energy-conservation aspect at terminal, hardware decoding back), terminal CPU to use too highly, and is provided with comparatively complicated.
Therefore, be necessary to propose a kind of new technology and overcome above-mentioned drawback.
Summary of the invention
The present invention seeks to solve under the multi-media decoding and encoding software realization condition, portable terminal is under the situation of using multimedia application, and the long problem of time-delay is drawn at the interface.
For realizing above-mentioned purpose, the present invention proposes a kind of method that improves the screen interface render speed, when multimedia application is play; Adopt soft realization encoding and decoding, do not carry out the screen overlap-add operation during initialization video, reduce the brush screen or do not brush screen; The picture resource that will be used for drawing is simultaneously moved internal memory; Draw at the completion interface, notifies bottom to open equipment then, and the brush screen is play.
Further, when multimedia application is play, the high application of meeting preferential answering priority when the application that other priority are high arrives; Multimedia application is taked to suspend the processing of playing or withdraw from application makes portable terminal can respond other application.
Further, when multimedia application is play, obtain the message that the upper strata thread sends initialization apparatus, lower floor can set and play correlation parameter.
Further, said correlation parameter comprises the size in video playback zone, the pattern of broadcast, the passage that audio frequency is set, inspection earphone state, preset key color.
Further, behind lower floor's initialization apparatus, receive message response, carry out the resource that Loads Image and in internal memory, be used for the interface drafting.
Further, after the picture resource of video player loads, accomplish the drafting interface through drawing function.
Further, the said back sendaisle message of completing is to lower floor, and notice layer open equipment, crucial colour that completion will be set down is added on the screen of portable terminal, creates the drafting of a thread brush screen completion video data on screen separately.
The present invention also proposes a kind of portable terminal, and said portable terminal comprises application management functional module, interface drafting functional module and video playback capability module;
Said application management functional module realizes the management of portable terminal upper layer application and mobile terminal key response;
Said interface draw functional module move will rendered images resource in internal memory, accomplish the interface and draw;
Said video playback capability module initialization sound, video equipment realize that multimedia soft decoding and brush frame of video are to screen, display video picture.
Further, when multimedia application is play, the high application of meeting preferential answering priority when the application that other priority are high arrives; Multimedia application is taked to suspend the processing of playing or withdraw from application makes portable terminal can respond other application.
Further; When multimedia application is play; Obtain the message that the upper strata thread sends initialization apparatus, lower floor can set and play correlation parameter, and said correlation parameter comprises the size in video playback zone, the pattern of broadcast, the passage that audio frequency is set, inspection earphone state, preset key color.
In sum, adopt the present invention to have following beneficial effect:
In technical scheme of the present invention, can effectively reduce the load of processor, preferentially accomplish the interface and draw, and also can respond brush screen, decoding in a short period of time, so can be good at having promoted user experience.
Description of drawings
Fig. 1 is that embodiment of the invention portable terminal is formed synoptic diagram;
Fig. 2 is that the embodiment of the invention improves screen interface render speed method flow synoptic diagram.
Embodiment
The present invention solves under the multi-media decoding and encoding software realization condition, and portable terminal is under the situation of using multimedia application, and the long problem of time-delay is drawn at the interface.
Main thought of the present invention is:
When multimedia application is play, the high application of meeting preferential answering priority when the application that other priority are high arrives; Media application is taked to suspend the processing of playing or withdraw from application makes portable terminal can respond other application; Adopt under the situation of soft realization encoding and decoding, do not carry out the screen overlap-add operation during initialization video, reduce the brush screen or do not brush screen, the picture resource that is used for simultaneously drawing is moved internal memory, accomplishes the interface and draws; Notify bottom to open equipment then, the brush screen is play.
Below in conjunction with accompanying drawing concrete realization principle of the present invention and processing procedure are described.
Please refer to shown in Figure 1ly, is that embodiment of the invention portable terminal is formed synoptic diagram, and portable terminal of the present invention comprises that application management functional module, interface draw functional module and video playback capability module.
Said application management functional module is used for realizing management and the mobile terminal key response to the portable terminal upper layer application.
Functional module is drawn at said interface, move will rendered images resource in internal memory, accomplish the interface and draw.
Said video playback capability module is used for initialization sound, video equipment realization multimedia soft decoding and brush frame of video to LCD, display video picture.
Please refer to shown in Figure 2ly, is that the embodiment of the invention improves screen interface render speed method flow synoptic diagram, and it comprises the steps:
S201: start and use;
Portable terminal starts and improves interface render speed function, and this function can be provided with by the user and open or close, and perhaps starting up of terminal just starts automatically.
S202: initialization apparatus;
Obtain after the message that the upper strata thread sends initialization apparatus; Lower floor can set some and the correlation parameter of playing, like the size in video playback zone, and the pattern of broadcast (full frame or half screen is play), the passage that audio frequency is set, inspection earphone state, preset key color; Accomplish the initialization of video and audio frequency apparatus; Rather than continue operation of equipment, open equipment (handle if the equipment of next opening can be made the brush screen to LCD, take the resource of CPU).The initialization of notice upper strata lower floor is accomplished.
S203: resource is written into;
Behind lower floor's initialization sound, video equipment, receive message response, carry out the resource that Loads Image and in internal memory, be used for the interface drafting.At present, the storage resources major part of falling appearance technology now all is stored in the file system, and the unique ID through picture searches this picture resource in file system, be loaded in the internal memory.
S204: draw screen;
After the picture resource of video player loads; Lower floor does not have other action to take the resource of processor; Draw the interface this moment, under the condition of resource abundance, accomplish the drafting interface, because can use the processing resource to greatest extent this moment through the drafting function of GUI; So can accomplish the drafting to the interface at once, the user can experience Video Applications the very first time and open.Promote user's visual experience.
S205: open audio frequency, video equipment;
Sendaisle message after completing; Send messages directly to lower floor; The be added to screen of portable terminal of the crucial colour that is used to notify down layer open equipment, completion will be set can be created a thread this moment separately and be used for brushing screen and accomplish the drafting of video data on LCD.
S206: displaying video.
Next utilize soft decoding to come decode video data, the beginning video separate frame, the Frame that obtains and key color are superimposed through the thread that has started to be presented on the LCD, reaches the purpose of video playback video.
After portable terminal was accepted press key message, message processing function added the response to this message in message queue, and whether the video format that judgement will be opened is legal, whether inquiry has Video Applications to be in operation; If there is Video Applications to be in operation; Application before finishing responds current key response, and it is in service whether processing simultaneously has multimedia other to be applied in; Because guarantee playing process at video; Audio frequency apparatus and video equipment all are to monopolize and judge that video playback is present priority at first, when condition has satisfied, start video playback and use.In handling function, intercept and capture the application of accomplishing screen buffer when press key message notice lower floor when handling this message starts the application of video playback.
In sum, in the present invention, portable terminal uses resource rationally to control; Concurrent and the path message through thread is accomplished the message response between the levels, can guarantee like this in the shortest time, message to be passed to upper strata (or lower floor); Path message can also guarantee not losing of message; Begin to adopt in the process first initialization apparatus not brush the scheme of screen stack, drafting module completion interface drafting at application start, adopt the load that can effectively reduce processor in such a way, preferentially accomplish the interface and draw; And also can respond brush screen, decoding in a short period of time, so can be good at having promoted user experience.
Certainly; The present invention also can have numerous embodiments; In the situation that does not deviate from spirit of the present invention and essence thereof; Those of ordinary skill in the art can make various corresponding changes or variation according to the present invention certainly, any modification of in every case within spirit of the present invention and principle, being done, are equal to replacement, improvement, all should be included within protection scope of the present invention.