A kind of method that on the video player of portable electronic equipment, realizes video interception
[technical field]
The present invention relates to technical field of image processing, specifically be meant a kind of method that on the video player of portable electronic equipment, realizes video interception.
[background technology]
Along with content supplier constantly releases colourful high-definition content, supporting high-definition content to play has become indispensable function in the portable electronic product, portable electronic product such as mobile phone, MP4, MID, PSP etc.It is a series of with the player function associated that video player can provide broadcast when selecting, thumbnail demonstration, loop play device and online request etc. in the present portable electronic product.Wherein, thumbnail shows and to be meant to be truncated to the form of picture after a certain frame picture that can see in the video player tabulation in this video content zooms to fixed proportion and to store on the local memory device.This thumbnail is player intercepting one two field picture automatically generally speaking, not controlled by the user, and after this video deletion, corresponding generally speaking thumbnail can corresponding deletion.
The user wishes that sometimes perhaps a plurality of picture capturings in a period of time get off as the thumbnail of this video with a frame picture relatively more excellent in the in progress video in watching the process of HD video; Perhaps wish the intercepting multiframe picture that energy is continuous, so that the video interception that the user can select oneself to like is as other purposes such as desktops.
Can support in the market video playback capability portable equipment with video player generally do not have video sectional drawing function, the thumbnail of this video also can only use for video player itself, can not for the user provide real needs as other functions such as desktops.
A lot of users are when running into the video pictures of oneself wanting to intercept, can only intercept the video pictures that needs intercepting by the player of third-party sectional drawing instrument or PC end on the PC end, and the video interception document copying of once more PC being held is to portable equipment, through just finishing user's demand after this loaded down with trivial details operation.And at present some players and the sectional drawing instrument on the PC end can be play this video, is truncated to video pictures surely but differ.
[summary of the invention]
Technical matters to be solved by this invention is to provide a kind of method that realizes video interception on the video player of portable electronic equipment.
The present invention solves the problems of the technologies described above by the following technical solutions:
A kind of method that realizes video interception on video player comprises the steps:
Step 1: the sectional drawing initialization module receives the sectional drawing instruction and resolves user instruction; Subsequently, carry out step 2 and step 4 simultaneously;
Step 2: video display module obtains current player display frame information, and preserves parameter;
Step 3: generate the sectional drawing file module and convert current picture data to the BMP formatted file; Change step 5 over to;
Step 4: the functional requirement analysis module obtains the demand of user's sectional drawing according to the user instruction that is resolved to; Change step 5 over to;
Step 5: the post-processed preparation block confirms to preserve file layout and resolution according to demand;
Step 6: the post-processed module is carried out post-processed with the BMP file according to real needs.
Player display frame information comprises the data output type of the resolution of current display video image, current display video image in the described step 2.
Described step 3 comprises: generate the sectional drawing file module and get access to all video informations of current demonstration from video display module, and get access to the video output data that shows on the current screen by concrete display mode, and judge whether the needs data type conversion according to the data type that step 2 gets access to, if output type is not the RGB data, then carry out the operation that corresponding YUV changes into RGB, the information header of the video data parameter configuration BMP file that gets access to according to step 2 simultaneously, the RGB data after the conversion directly encapsulate by the BMP file layout.
Described step 4 comprises: judge whether according to user's request that needs are followed in the system and communicate with user-dependent module.
Described step 5 comprises: after the post-processed preparation block gets access to the pictorial information of user's sectional drawing demand that the functional requirement analysis module passes over, judge whether to carry out the conversion of the convergent-divergent and the picture format of photo resolution and the information notification post-processed module that will specifically need the post-processed module to handle with the current pictorial information of storing of step 3.
The invention has the advantages that: on video player, realize video interception function and continuous video interception function, and guarantee to finish the sectional drawing function as long as no matter the video that this player can be play is which kind of resolution or which kind of form.
[description of drawings]
The invention will be further described in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the main process flow diagram that video player of the present invention is finished the sectional drawing function.
Fig. 2 is the menu list of sectional drawing function among the present invention.
Fig. 3 is the block diagram that video display module obtains display message and data among the present invention.
Fig. 4 generates the concrete workflow diagram of sectional drawing file module among the present invention.
Fig. 5 is the workflow diagram of functional requirement analysis module when among the present invention breviary being set.
[embodiment]
Fig. 1 is the main process flow diagram that video player of the present invention is finished the sectional drawing function.After the user opens player, select film source to play, the user can carry out the function key operation to player in the process of playing, as time-out, display window convergent-divergent, operations such as bookmark, sectional drawing are set.When the user clicked the sectional drawing function key, player just entered the sectional drawing functional module and carries out the sectional drawing operation.Core Feature of the present invention is the sectional drawing functional module of the frame of broken lines representative among Fig. 1, below describes in detail.
Step 1: the sectional drawing initialization module receives the sectional drawing instruction and resolves user instruction;
After the user clicked the sectional drawing button, player entered halted state, ejected the menu list (specifically having which functional requirement can determine according to the location of product) that has appellative function simultaneously.Menu list is similar to the listed functional requirement that comes out of Fig. 2 and organizes block diagram, and the user further confirms functional requirement.Subsequently, carry out step 2 and step 4 simultaneously.
Step 2: video display module obtains current player display frame information, and preserves parameter;
Get access to the resolution of current displaying video and the data output type of current display video image (as RGB555, YUV422) in the video output display module of video display module by player, and preserve parameter, use for later step.Roughly flow process as shown in Figure 3.Then, change step 3 over to.
Step 3: generate the sectional drawing file module and convert current picture data to the BMP formatted file;
Generate the sectional drawing file module and from video display module, get access to all modes of current demonstration, and get access to the video output data that shows on the current screen by concrete display mode, and judge whether the needs data type conversion according to the data type that step 2 gets access to, if output type is not the RGB data, then carry out the operation that corresponding YUV changes into RGB, other parameters of video data (as resolution) that get access to according to step 2 dispose the information header of BMP file simultaneously, and the RGB data after the conversion directly encapsulate by the BMP file layout.Concrete FB(flow block) as shown in Figure 4.Then, change step 5 over to.
Step 4: the functional requirement analysis module obtains the demand of user's sectional drawing according to the user instruction that is resolved to;
The functional requirement analysis module mainly is to judge whether according to user's request that needs are followed in the system to communicate with user-dependent module, obtain specific requirement such as the form of picture, the resolution naming rule of picture etc. of the other side's module, do the preliminary work in early stage for step 5,6 picture.Be that embodiment describes with concrete function as the demand that thumbnail is set below, process flow diagram as shown in Figure 5.When the user click shrinkage figure is set after, the module that shrinkage figure is set in functional requirement analysis module and the player is set up and communicated by letter, and obtains the specific requirement of shrinkage figure: picture format, photo resolution, picture are named and information such as the concrete deposit position of picture.Simultaneously, carry out the mutual of some necessity, as whether needing to change the operations such as value of the thumbnail list item in the multimedia database.Then, change step 5 over to.
Step 5: the post-processed preparation block confirms to preserve file layout and resolution according to demand;
After the post-processed preparation block gets access to the pictorial information of user's sectional drawing demand that the functional requirement analysis module passes over, judge whether to carry out the conversion of the convergent-divergent and the picture format of photo resolution and the information notification post-processed module that will specifically need the post-processed module to handle with the current pictorial information of storing of step 3.
Step 6: the post-processed module is carried out post-processed with the BMP file according to real needs.As require convergent-divergent, then carry out convergent-divergent; As require format transformation, then format transformation; As require to rename, then rename.
Because player is in the state of time-out when entering the sectional drawing module, therefore video pictures can not change, behind the complete operation, player recovers to play, this moment, the user can carry out the sectional drawing operation of next frame picture at once, like this enforcement can guarantee player in the time of sectional drawing because the restriction of hardware platform, cause the sectional drawing module deadline different cause next time can sectional drawing picture can not decide by the user.Finish the function of this continuous sectional drawing, can have two kinds of methods to realize: 1, the continuous click sectional drawing function key of user realizes, 2, play and carry fixed intervals sectional drawing function key.
Therefore, the present invention can realize video interception function and continuous video interception function on video player, and guarantees can both finish the sectional drawing function as long as no matter the video that this player can be play is which kind of resolution or which kind of form.