Background technology
The high speed development of infotech, brings huge change to the productive life of society, and the utilization of digital video technology in every field is also increasingly universal and perfect.In the prior art, suitable progress has been achieved about video screenshotss technology.But the technical issues that need to address that prior art is paid close attention to are: while Time Delay when how to solve picture capturing technically, ensure that the requirement accurately obtaining the target picture needed for user.However, also there are some places not fully up to expectations in prior art, user wants to carry out video interception, has needed following several step, clicks screenshotss button with mouse; At player, the sectional drawing file found in file is set; By sectional drawing paper cut in destination folder.Although can be completed the sectional drawing of picture by above-mentioned steps, now user is the preview graph that can't see sectional drawing, if need the effect judging sectional drawing, also must first open sectional drawing file.This make user many times because the picture that cuts be unsatisfied with and have to again operate.Therefore, if can be improved this, make in the process of sectional drawing process, along with preview graph, user can be facilitated to leave picture required for it quickly and accurately, increase work efficiency, then more effectively can promote the popularization and application of video technique.
inventionthe method of the invention comprises further: the screenshotss data removing temporary storage area with good conditionsi.
Hold
In order to overcome above-mentioned the deficiencies in the prior art, the technical problem to be solved in the present invention is, proposes a kind of method of video screenshotss, adopts the present invention in the process of screenshotss, interface is made to occur screenshotss thumbnail, by pulling in target storage that its source file is saved in by this thumbnail.
The technical scheme of the method for the invention is such:
A method for video screenshotss, it comprises the following steps:
Step one, receives screenshotss operation information;
Step 2, obtains screenshotss data;
Step 3, by screenshotss data Replica to temporary storage area and preserve temporary path, described temporary path is the path of described temporary storage area, and produces the picture that comprises thumbnail;
Step 4, by the bitmap handle of screenshotss data, pulls form and picture absolute path information initializing to com component;
Step 5, what the bitmap handle of thumbnail and temporary path are initialised to described com component pulls in interface, utilizes and pulls interface, thumbnail is moved along with the instruction of input equipment.
Step 6, after determining territory, target storage, corresponds to the screenshotss data Replica of thumbnail in territory, target storage by being kept in temporary storage area;
Rapid six, after determining territory, target storage, correspond to the screenshotss data Replica of thumbnail in territory, target storage by being kept in temporary storage area; Described thumbnail passes through G
di
dI + the A that provides
pi
pI produce.2. method according to claim 1, is characterized in that: also comprise: determine territory, target storage by thumbnail being moved to destination folder.3. method according to claim 1, is characterized in that: the screenshotss data removing temporary storage area with good conditionsi
: when user abandons preserving sectional drawing, the screenshotss data of preserving in temporary storage area can be removed immediately; Or, when the sectional drawing of temporary file stored in setting quantity, delete in temporary storage area the screenshotss data of preserving; Or, often at regular intervals, delete the screenshotss data of preserving in temporary storage area .
The method of the invention also comprises: determine territory, target storage by thumbnail being moved to destination folder.
The method of the invention comprises further: the screenshotss data removing temporary storage area with good conditionsi.
Video screenshotss method of the present invention, can reduce original loaded down with trivial details operation steps, and can pass through preview graph, determines whether will preserve picture, greatly facilitates user.In addition, under the prerequisite not affecting video playback, the present invention can realize quick screenshotss to the video that computer is being play and convenient to preserve, simultaneously can also preview screenshotss effect and avoid time lag.
Embodiment
Below in conjunction with accompanying drawing, specifically introduce the principle of work of the method for the invention.
Basic practice of the present invention is: after starting the user interface of playing device, user interface UI module, and namely UserInterface module (hereinafter referred to as UI module), receives the operation information from external input device; If the instruction of this information starts screenshotss, then call the interface that playing module provides, UI module by screenshotss data Replica to External memory equipment temporary storage area (such as, temporary folder) in and preserve the path (temporary path) of temporary storage area, and produce a thumbnail (i.e. preview graph); UI module by the bitmap handle of screenshotss data, pull form and picture absolute path information initializing to com component, after determining territory, target storage, UI module by screenshotss data Replica in territory, target storage; The bitmap handle of thumbnail and temporary path are also initialised to pulling in interface of COM by UI module.At screenshotss data Replica to territory, target storage, the data removing element deletion temporary storage area of UI module; User can also set the condition of removing, when user abandons preserving sectional drawing, the screenshotss data of preserving in temporary storage area can be removed immediately, such as, when the sectional drawing of temporary file stored in setting quantity or every at regular intervals, delete the screenshotss data of preserving in temporary storage area.
As shown in Figure 2, input equipment receives the screenshotss operational order of user to the playing device that can perform video screenshotss of the present invention, and such as, user can under the user interface of player, left button a mouse click.Screenshotss operation information is sent to UI module by input equipment, and whether whether screenshotss flow process is activated UI module verification.User can activate screenshotss flow process by input equipment.Such as, user the Macintosh (such as: Ctrl/Alt/Shift..) of keyboard can activate screenshotss flow process, is in available state to make screenshotss function.
Under the state that screenshotss flow process has been activated, the interface that the converting unit of UI module calls playing module to be provided obtains the internal storage data of sectional drawing.Under the unactivated state of screenshotss flow process, UI module controls the movement of player interface.
UI module by converting unit will preserve the path (temporary path) of temporary storage area in screenshotss data Replica to temporary storage area, and produce a thumbnail by the API (application programming interfaces) that GDI+ provides, wherein, GDI+ is a subsystem in WindowsXP, its primary responsibility exports for information about at display screen and printing device, and it is one group of application programming interface realized by C++ class.GDI+ is the successor of version GDI in the past, the GDI of version before WindowsXP still supports, but when development of new applications program, developer should use GDI+ to meet images outputting needs, because GDI+ is optimized GDI in former version of window, and with the addition of many new functions.
UI module also comprises initialization unit, its by the bitmap handle of screenshotss data, pull form and picture absolute path information initializing to com component, after determining territory, target storage, the source file (corresponding screenshotss data) that thumbnail is preserved by UI module in temporary storage area copies in territory, target storage (such as, completed by Explorer and copy).
The bitmap handle of thumbnail and temporary path are also initialised to pulling in interface of COM by UI module.
Pulling interface can allow thumbnail move along with the instruction of input equipment.
When thumbnail is moved to the territory, target storage of External memory equipment, determine territory, target storage.
UI module deletes the source file in temporary storage area by delete cells after drag and drop flow process terminates.
Below according to Fig. 1, describe the concrete implementation of the method for the invention in detail.
1 shortcut screenshotss
In a step 101, when user sends screenshotss operation information by input equipment in the player playing video (such as, pressing left mouse button), this message conversion is screenshotss operational order by input equipment, and sends to UI module.In a step 102, after UI module (being responsible for interface and the user interactions of software) receives this user's screenshotss operational order (such as, WM_LBUTTONDOWN), if screenshotss flow process is activated, the instruction of screenshotss will be activated.UI module will call the sectional drawing interface that playing module (be responsible for the broadcasting of audio-video document, adjustment and obtain media data) provides, and obtains the internal storage data of sectional drawing.
An implementation of sectional drawing interface:
/*********************************************************
Function name: GetCurrentImage
Function representation: obtain current video image
Parameter 1:PBYTE*ppbuf, exports, BITMAPINFOHEADER+ data bitmap
Rreturn value: successfully return E_QVOD_S_OK, otherwise be unsuccessfully
*********************************************************/
virtualQVOD_ERRORGetCurrentImage(PBYTE*ppbuf);
2 preview graph and temporary file
At step 104, the internal storage data of the sectional drawing obtained from playing module copies in hard disk (temporary folder) by UI module, as copy source.Simultaneously in step 103, internal storage data is scaled to a preview graph by the API provided by GDI+, as following picture when pulling thumbnail (such as, can be pulled by mouse).
3 initialization dragging objects
In step 105, the drag and drop interface provided by com component, is initialised to temporary file path and preview graph bitmap handle in a dragging object.In order to make destination folder finally can generate sectional drawing file, also need to specify the form pulling data, changing form can be CF_HDROP (clipbook drag and drop) form.
Pull an implementation of interface:
/***********************************************************
Function name: DoDragDrop
Function representation: realize wholely pulling flow process
Parameter 1:LPCTSTRpzTempPath, input, the path of temporary file
Parameter 2:HBITMAPhImage, input, follows the bitmap handle of picture
Rreturn value: successfully return S_OK, otherwise be unsuccessfully
***********************************************************/HRESULTDoDragDrop(LPCTSTRpzTempPath,HBITMAPhImage)
4 pull
In step 106, while video playback, pull instruction (such as, pulling mouse) by input equipment input, the preview graph of sectional drawing also can move thereupon, and this process is realized by COM.
COM can the type of initialization dragging object, file path and the picture of following, and following of picture acts on pulling of input equipment, and can respond to Explorer the initialization of dragging object type and file path thus realize the process of preserving.
COMcomponent (com component) is Microsoft in order to the software setup of computer industry meets a kind of new software development technique of the behavior exploitation of the mankind more.Under COM framework, people can develop the single-minded assembly of various function, then they are combined as required, form complicated application system.The benefit brought thus is many-sided: new of the assembly in system can be replaced, to carry out upgrading and the customization of system at any time; Same assembly can be reused in multiple application system; Under easily application system can being expanded to network environment; COM and language, the characteristic that platform has nothing to do makes all programmers all can give full play to oneself ability and intelligence and speciality writes assembly module.
5 preserve
When preview graph is left video and moved to destination folder time, in step 107, the source file of preview graph can be copied to destination folder from temporary folder by UI module, and the process of copy can be completed by Explorer.So far whole screenshotss flow process terminates, and the picture file in temporary folder can be deleted by UI module.
Below in conjunction with accompanying drawing 2, specifically introduce the structure of device of the present invention:
The playing device that can perform video screenshotss provided by the invention comprises: UI module 201, playing module 202, COM module 203.
The operation information that external input device 300 sends for receiving user, is corresponding operational order by this message conversion and sends to UI module 201;
The screenshotss operation information of UI module 201 for receiving in response to external input device 300;
The converting unit 214 of UI module 201 calls the sectional drawing interface 212 that playing module 202 provides, to obtain the internal storage data of sectional drawing in memory device, converting unit 214 by screenshotss data Replica to the temporary storage area of External memory equipment 100 and preserve temporary path, described temporary path is the path of temporary storage area, and produces a thumbnail; Meanwhile, what the bitmap handle of thumbnail and temporary path were also initialised to COM module 203 by the com component initialization unit 215 of UI module 201 pulls in interface 213;
When Macintosh un-activation, described UI module 201 controls the movement of player interface.
Pulling interface 213 makes thumbnail move along with the instruction of input equipment.
UI module 201 remove unit 216 behind the territory, target storage thumbnail being moved to memory device 100, correspond to the screenshotss data Replica of thumbnail in territory, described target storage by being kept in described temporary storage area, and the screenshotss data in described temporary storage area are deleted.
The API that UI module 201 is provided by GDI+ produces thumbnail.
Figure 3 shows a specific embodiment of playing device of the present invention.
Memory device 100, input equipment 300 in memory module 102 in Fig. 3, transmission control module 101 difference corresponding diagram 2.Playing device 400 comprises com component 303, playing module 302, UI module 301.Com component 203 playing module 202, UI module 201 in com component 303 in playing device 400, playing module 302, UI module 301 difference corresponding diagram 2.Sectional drawing interface 212 in screenshotss unit 310 corresponding diagram 2 in playing module 302.Buanch unit 314 in UI module 301, com component initialization unit 315 and remove converting unit 214, the initialization unit 215 of unit 316 respectively in corresponding diagram 2 and remove unit 216.Pulling in com component 303 pulls interface 213 in interface 313 corresponding diagram 2.
Playing module 302 comprises file read module 321, generation request of data and separation module 322, audio decoder module 323, the Video decoding module 324 of being classified by resource data and is used for dispatching and the playing controller 325 controlled.This audio decoder module 323 exports audio playing apparatus 327 to after being processed via audio frequency rendering module 326 by the voice data of decoding.The video requency frame data of this Video decoding module 324 decoding delivers to the broadcasting Logic control module 311 of UI module 301 via Video Rendering module 328, and presents to user by the broadcast window 312 of UI module 301.
Wherein, file read module 321 passes through data communication interface 329 from memory device 102 Gains resources data and the subscriber control information from transmission control equipment 101.
During playing audio-video document, the resource data received is preserved or is kept in memory module 102 temporarily by transmission control equipment 101, and preservation address is sent to data communication interface 329.Separation module 322 constantly reads resource data in the mode of request/response from memory module 102 by file read module 321 and data communication interface 329.
Resource data is classified by this separation module 322, and voice data is sent to audio decoder module 323, video data sends to Video decoding module 324.Video decoding module 324 presents to user by the broadcast window of UI module 301 after transferring to rendering module 326 to process the frame of parsing.
The present invention has thoroughly overturned the thought in the past being clicked the mode of software screen button screenshotss by keyboard screenshotss and mouse, screenshotss operation is simplified to by original 34 steps and settles at one go, for user saves the time, also more efficient and convenient.