Movatterモバイル変換


[0]ホーム

URL:


CN100367199C - Method for Acquiring Covered Surface Video Information - Google Patents

Method for Acquiring Covered Surface Video Information
Download PDF

Info

Publication number
CN100367199C
CN100367199CCNB2004100521274ACN200410052127ACN100367199CCN 100367199 CCN100367199 CCN 100367199CCN B2004100521274 ACNB2004100521274 ACN B2004100521274ACN 200410052127 ACN200410052127 ACN 200410052127ACN 100367199 CCN100367199 CCN 100367199C
Authority
CN
China
Prior art keywords
pointer
component object
covering surfaces
covering
object model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
CNB2004100521274A
Other languages
Chinese (zh)
Other versions
CN1770096A (en
Inventor
张禹
梁柱
文强
刘奇勇
刘程伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co LtdfiledCriticalTencent Technology Shenzhen Co Ltd
Priority to CNB2004100521274ApriorityCriticalpatent/CN100367199C/en
Publication of CN1770096ApublicationCriticalpatent/CN1770096A/en
Application grantedgrantedCritical
Publication of CN100367199CpublicationCriticalpatent/CN100367199C/en
Anticipated expirationlegal-statusCritical
Expired - Lifetimelegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明公开一种覆盖表面视频信息的获取方法,包括以下步骤:在当前应用程序的进程空间中建立新的组件对象实例;从该新组件对象中获取新组件对象模型接口指针;以所述新组件对象模型接口指针为首指针,进入链表,沿链表寻找所有保存的组件对象模型接口;调用当前组件对象指针获取覆盖表面指针;利用覆盖表面指针获得该覆盖表面的视频数据及特征信息;根据该覆盖表面的视频数据及特征信息重组再现图像。

Figure 200410052127

The invention discloses a method for acquiring video information of a covered surface, comprising the following steps: establishing a new component object instance in the process space of the current application program; obtaining a new component object model interface pointer from the new component object; using the new component object The component object model interface pointer is the first pointer, enter the linked list, and find all the saved component object model interfaces along the linked list; call the current component object pointer to obtain the covering surface pointer; use the covering surface pointer to obtain the video data and feature information of the covering surface; according to the covering surface The surface video data and feature information are reconstructed to reproduce the image.

Figure 200410052127

Description

Method for acquiring covering surface video information
Technical field
The present invention relates to the screen capture technology, relate in particular to a kind of method for acquiring covering surface video information.
Background technology
Present most media player has all used the Directx technology, and for the most existing display card, can use Overlay (covering surfaces) the technology show events video of Directdraw.Covering surfaces is the surface with display card tenability, is generally used for show events video, recorded video or static bitmap.The support of described covering surfaces is that display card provides by hardware fully, and DirectDraw supports the characteristic that display device driver is supported, DirectDraw can not the emulation covering surfaces.
The principle of work of covering surfaces is very similar with the principle that transparent plastic paper covers, and described covering surfaces can be envisioned as a slice transparent plastic paper, and drawing on this sheet plastic paper also can place it in the display front.When plastic paper covers the display front, can see covering surfaces and first type surface, remove plastic paper after, first type surface does not change.When showing a covering surfaces, tell exactly as seen how where device driver make covering surfaces, when the display device sweep trace repaints on the display, check each pixel on the first type surface then, see that whether being capped the surface replaces; If, display card just extracts related pixel from covering surfaces data substitute, display card generates the synthetic surface of first type surface and covering surfaces on display, produce transparent and drawing effect and do not need to change each surperficial content, described synthetic surface is directly delivered to display by video data stream and is shown.
Because it is the operation of hardware level that covering surfaces processing and pixel substitute, can seamlessly synthesize first type surface and covering surfaces by enough different pixel formats, so there is not tangible performance loss.
Therefore, if player has adopted the mode displaying video of covering surfaces, video content appears on the covering surfaces, it is the video content that can't obtain covering surfaces that prior art is carried out the just simple first type surface of catching of screen capture, can cause like this to grasp video data and be not the desired video data even present a slice black in video window.
Prior art is that simple extracting on-screen data is kept at this locality, can not in time share and be distributed to other good friends, adds the Video Capture characteristic at instant communication situation, and the communication that can strengthen both sides is experienced; In addition, prior art can only grasp a two field picture at every turn, can not once grasp multiple image and conversion generation GIF (GIF(Graphic Interchange format)) file.
Summary of the invention
The invention provides a kind of method for acquiring covering surface video information, solve the problem that to catch the covering surfaces video data in the prior art.
For addressing the above problem, method for acquiring covering surface video information of the present invention may further comprise the steps: 1) set up new component object example in the process space of current application program; 2) from this New Parent object, obtain New Parent object model interface pointer; 3) be owner pointer with described New Parent object model interface pointer, enter chained list, seek the The Component Object Model interface of all preservations along chained list; 4) call current component object pointer and obtain the covering surfaces pointer; 5) utilize the covering surfaces pointer to obtain the video data and the characteristic information of this covering surfaces; 6) according to the video data of this covering surfaces and characteristic information reorganization reproduced image.
Further, comprise step 3), 4): whether the process identification (PID) of The Component Object Model interface of judging this preservation is identical with the process identification (PID) of current application program; If identical, then expression finds current process to use component object, returns the The Component Object Model interface pointer and the component object pointer of this preservation; If the process identification (PID) of the process identification (PID) of the The Component Object Model interface of preserving and current application program is inequality, the The Component Object Model interface pointer of then changing another version is as New Parent object model interface pointer execution in step 3).As seen whether the first type surface of judging this component object have covering surfaces sign and covering surfaces; If can, execution in step 4); If the first type surface of component object does not have covering surfaces to identify or covering surfaces is invisible, then return or grasp first type surface
Further, described video information is that single frames obtains, and then reproduced image is stored with bitmap format.
Further, described video information is that multiframe is obtained, then by predetermined frame number, the time interval, scaling repeating said steps 1) to 6), reproduced image is stored with GIF(Graphic Interchange format).
Further, described video data refer to can with the video chromatism data of the conversion in three primary colors space, the pointer that obtains the buffer zone of the video data of preserving this covering surfaces correspondence by the covering surfaces pointer obtains.
Further, carry out this method and comprise step before: set up system's hook program, the keyboard message of responding system; When after pressing the button of next appointment on the player, the hook program begins to carry out following step; Judge that whether current application program has used DirectDraw, if do not have, then returns; If have, then execution in step 1).
Compared with prior art, the present invention has the following advantages:
Can catch the video information of covering surfaces, and can finish static state and dynamically obtain;
The picture format that reproduces (static state is obtained the employing bitmap format, dynamically obtains and adopts GIF(Graphic Interchange format)) then reaches transmission and demonstration in the JICQ easily on the net.
Description of drawings
Fig. 1 is a method for acquiring covering surface video information process flow diagram of the present invention.
Embodiment
The screen capture method is only operated first type surface in the prior art, when adopting covering surfaces to show, then can't obtain the video data of covering surfaces and can't obtain definite video data, can definitely obtain video data so must be able to get access to the video information of covering surfaces.
DirectDraw, create various different types of " surfaces " (Surface) by DirectDraw object (in the present specification with component object as its Chinese appellation), lip-deep content can freely be copied, be made up, and generates Protean figure.The DirectDraw object is used for representing viewing hardware, can be used to inquire about and obtain various supports The Component Object Model interface (com interface, the basis of being devoted to reuse the object-oriented system of interface resource), the cooperation grade is set, operation display mode and display surface.Each surface is represented by corresponding surface-object.By the entity of pointer to object access object and then access object representative, APIs (application programming interface) forms by object with based on com interface usually in DirectDraw.
DirectDraw can be surface creation in display memory (video memory) or Installed System Memory, and display memory is divided into conventional display memory and AGP Accelerated Graphics Port internal memory.Because the display memory capacity is limited, so which part storage area each surface specifically should be created in should make overall planning, generally will use frequently, need surface hardware-accelerated or the realization function be arranged in display memory.If you are the position of designated surface establishment not, DirectDraw will at first create the surface at conventional display memory, when conventional display memory is not enough, if the support AGP of system internal memory then uses the AGP internal memory earlier, final using system internal memory.
DirectDraw manages video memory, allows directly storage and manipulation bitmap in video memory.Utilize vision hardware Bliter (position piece transmitter) to carry out the Blit (position piece transmission) of bitmap in video memory inside.
Following several types is divided on described surface: (1) first type surface (Primary Surface): the surface that promptly shows on screen; Each DirectDraw object can only have a first type surface, and the size of first type surface, position and form can not be changed by the current display mode decision of system.
(2) off-screen surfaces (Off-screen Surface): this type of surface can not be directly visible.In general, the surface, backstage is often used for the memory buffer as parts such as the smart animation of recreation, background graphics.
(3) covering surfaces (Overlay Surface): being positioned at video memory, and can covering any position that is presented at first type surface, is a kind of surface by hardware supported, and DirectDraw can not emulation.Hide some pith such as menu, the dialog box etc. in the first type surface in order to prevent covering surfaces, covering surfaces is also high the chroma key function, when having only color value in the first type surface identical with the chroma key value, just covering surfaces covers first type surface.
When the beginning real-time video shows, at first start DirectDraw interface (being the The Component Object Model interface), create first type surface and covering surfaces, and write down the information of relevant covering surfaces, as size, data layout, memory address etc., select a color as chroma key for covering surfaces simultaneously, normally carmetta.According to the information initializing hardware device of covering surfaces, DMA (direct memory access (DMA)) equipment is directly sent into video data in the video memory at covering surfaces place then.When display window moved or change size, video capture engine can send the notice driver update and show that driver should be filled the color of chroma key in video window, and mobile covering surfaces makes it align with video window.
Please refer to shown in Figure 1ly, method for acquiring covering surface video information of the present invention may further comprise the steps:
1) in the process space of current application program, sets up new DirectDraw object (component object) example, because use the The Component Object Model interface must create the DirectDraw object earlier;
2) from this New Parent object, obtain New Parent object model interface pointer;
3) because the employed all The Component Object Model interface pointer of system are preserved in internal memory with the form of chained list, be owner pointer, enter chained list, seek the The Component Object Model interface of all preservations along chained list with described New Parent object model interface pointer;
4) judge whether the process identification (PID) of The Component Object Model interface of this preservation is identical with the process identification (PID) of current application program;
5) if identical, then expression finds current process to use component object, returns the The Component Object Model interface pointer and the component object pointer of this preservation; If different, the The Component Object Model interface pointer of then changing another version re-executes step 3) as New Parent object model interface pointer;
6) as seen whether the first type surface of judging this component object have covering surfaces sign and covering surfaces, because each DirectDraw object can only have a first type surface, exists so covering surfaces relies on first type surface;
7) if then call current component object pointer and obtain the covering surfaces pointer; If do not have covering surfaces sign or covering surfaces invisible, then return or grasp the first type surface video information;
8) utilize the covering surfaces pointer to obtain the video data and the characteristic information of this covering surfaces, described video data refer to can with the video chromatism data of the conversion in three primary colors space, the pointer that obtains the buffer zone of the video data of preserving this covering surfaces correspondence by the covering surfaces pointer obtains; Described characteristic information refers to form, the length of video data, width, highly, the color figure place of span, video data and the buffer pointer of preserving video data;
9) according to the video data of this covering surfaces and characteristic information reorganization reproduced image, the video data that corresponding corresponding format converts the video chromatism data to the three primary colors space is basis again.
Obtain if described video information is a single frames, then reproduced image is stored with bitmap format; (animation) obtains if described video information is multiframe, then by predetermined frame number, the time interval, scaling repeating said steps 1) to 9), reproduced image is stored with GIF(Graphic Interchange format) (GIF form).Can directly show animation at webpage like this; Also can in the JICQ of supporting the GIF form, show animation, pass to the good friend and watch.
Comprise step before carrying out this method: set up system's hook program, the keyboard message of responding system; When after pressing the button of next appointment on the player, the hook program begins to carry out following step; Judge that whether current application program has used DirectDraw, if do not have, then returns; If have, then execution in step 1).
In concrete the enforcement, adopt and realize as minor function:
Use DirectDrawCreate function creation component object.
IDirectDraw represents the com interface that DirectDraw provides, and IDirectdraw7 then represents the com interface of the 7th version; Call the DirectDrawCreate api function and can access newly-built component object pointer; Can call QueryInterface (IID_IDirectDraw7, (void then*) ﹠amp; M_pDirectDraw7)) function is obtained the The Component Object Model interface pointer of IDirectdraw7, i.e. New Parent object model interface pointer.
The Component Object Model interface pointer with acquisition IDirectdraw7 is an owner pointer, enters chained list, judges whether 12 bytes backward can visit; If can visit, judge then whether the content of preceding four bytes of this sheet internal memory is identical with the IDirectdraw7 object handle; If identical, then the region of memory of preserving the IDirectdraw7 object information is found in expression, calls pdwProcessID=(DWORD then*) (((LPBYTE) * (pdwDirectDraw+1))+0x14) can obtain using the process identification (PID) (ID) of this component object interface (being IDirectdraw7), wherein represents this sheet region of memory with pdwDirectDraw;
The acquisition methods of current process of application program sign (ID) is: DWORD dwProcessID=GetCurrentProcessId ();
Relatively judge process identification (PID) and the current process of application program sign of the IDirectdraw7 that obtains; If identical then expression finds current process to use component object, return the The Component Object Model interface pointer and the component object pointer of this preservation.
The EnumSurfaces of invocation component object obtains the covering surfaces pointer, specifically call into:
if(SUCCEEDED(pDirectDraw4->EnumSurfaces(
DDENUMSURFACES_DOESEXIST,
&ddsd2,
this,
EnumSurfacesCallback2)))
The covering surfaces pointer that obtains is saved in the m_m_pPrimaryDirectDrawSurface4 member variable.
Because the characteristic information of all surface is filled in DDSURFACEDESC structure and the DDPIXELFORMAT structure, can obtain characteristic information so call the GetSurfaceDesc method to covering surfaces, as:
DDSURFACEDESC2?ddsd2={0};
m_pPrimaryDirectDrawSurface4->GetSurfaceDesc(&ddsd2)
After extracting finishes, with the video chromatism data (YUV is generally YUV2, YV12, YUYV UYUV) is converted to RGB (three primary colors) data, preserve and copy to Clipboard in for the use.
Described YUV follows following formula to the conversion of RGB:
R=Y+1.403*(U-128)
G=Y-0.344*(U-128)-0.714*(V-128)
B=Y+1.773*(V-128)
If static state is captured (single frames obtains), only capture frame data of current broadcast, only the RGB data in the buffer zone need be generated BMP (bitmap) file, and store in the shear plate;
If dynamically grab screen pattern (multiframe is obtained), then the ratio of the data based application appointment of the RGB in the buffer zone is carried out convergent-divergent after, be inserted in the file object of GIF; Repeat to grab the screen process then, until generating the gif file of specifying frame number.
In sum, method for acquiring covering surface video information of the present invention can be caught the video information of covering surfaces, and can be by certain format reproduced image/animation.

Claims (6)

1. method for acquiring covering surface video information may further comprise the steps:
1) in the process space of current application program, sets up new component object example;
2) from this New Parent object, obtain New Parent object model interface pointer;
3) be owner pointer with described New Parent object model interface pointer, enter chained list, seek the The Component Object Model interface of all preservations along chained list;
4) call current component object pointer and obtain the covering surfaces pointer;
5) utilize the covering surfaces pointer to obtain the video data and the characteristic information of this covering surfaces;
6) according to the video data of this covering surfaces and characteristic information reorganization reproduced image.
2. method for acquiring covering surface video information as claimed in claim 1 is characterized in that, also comprises step between described step (3) and the step (4):
Whether the process identification (PID) of The Component Object Model interface of judging this preservation is identical with the process identification (PID) of current application program;
If identical, then expression finds current process to use component object, returns the The Component Object Model interface pointer and the component object pointer of this preservation;
If the process identification (PID) of the process identification (PID) of the The Component Object Model interface of preserving and current application program is inequality, the The Component Object Model interface pointer of then changing another version is as New Parent object model interface pointer execution in step 3)
As seen whether the first type surface of judging this component object have covering surfaces sign and covering surfaces;
If the first type surface of component object does not have covering surfaces to identify or covering surfaces is invisible, then return or grasp first type surface.
3. method for acquiring covering surface video information as claimed in claim 1 is characterized in that, described video information is that single frames obtains, and then reproduced image is stored with bitmap format.
4. method for acquiring covering surface video information as claimed in claim 1 is characterized in that, described video information is that multiframe is obtained, then by predetermined frame number, the time interval, scaling repeating said steps 1) to 6), reproduced image is stored with GIF(Graphic Interchange format).
5. as claim 2 or 3 described method for acquiring covering surface video information, it is characterized in that, described video data refer to can with the video chromatism data of the conversion in three primary colors space, the pointer that obtains the buffer zone of the video data of preserving this covering surfaces correspondence by the covering surfaces pointer obtains.
6. as each described method for acquiring covering surface video information of claim 1 to 3, it is characterized in that, carry out this method and comprise step before:
Set up system's hook program, the keyboard message of responding system;
When after pressing the button of next appointment on the player, the hook program begins to carry out following step; Judge that whether current application program has used DirectDraw, if do not have, then returns; If have, then execution in step 1).
CNB2004100521274A2004-11-052004-11-05 Method for Acquiring Covered Surface Video InformationExpired - LifetimeCN100367199C (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CNB2004100521274ACN100367199C (en)2004-11-052004-11-05 Method for Acquiring Covered Surface Video Information

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CNB2004100521274ACN100367199C (en)2004-11-052004-11-05 Method for Acquiring Covered Surface Video Information

Publications (2)

Publication NumberPublication Date
CN1770096A CN1770096A (en)2006-05-10
CN100367199Ctrue CN100367199C (en)2008-02-06

Family

ID=36751419

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CNB2004100521274AExpired - LifetimeCN100367199C (en)2004-11-052004-11-05 Method for Acquiring Covered Surface Video Information

Country Status (1)

CountryLink
CN (1)CN100367199C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102023852A (en)*2009-09-152011-04-20深圳市巨龙科教高技术股份有限公司Screen capture method and system
CN102103477B (en)*2009-12-212012-09-05联想(北京)有限公司Display data acquiring method and system and electronic equipment
CN102929634B (en)*2012-10-312016-03-23惠州市德赛西威汽车电子股份有限公司A kind of control method of video display

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6064405A (en)*1998-04-102000-05-16Ati Technologies, IncMethod and apparatus for a cached video hardware cursor
CN1354445A (en)*2001-12-112002-06-19深圳安圣电气有限公司Image processing method of remote image monitoring system based on IP network and its equipment
US6614441B1 (en)*2000-01-072003-09-02Intel CorporationMethod and mechanism of automatic video buffer flipping and display sequence management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6064405A (en)*1998-04-102000-05-16Ati Technologies, IncMethod and apparatus for a cached video hardware cursor
US6614441B1 (en)*2000-01-072003-09-02Intel CorporationMethod and mechanism of automatic video buffer flipping and display sequence management
CN1354445A (en)*2001-12-112002-06-19深圳安圣电气有限公司Image processing method of remote image monitoring system based on IP network and its equipment

Also Published As

Publication numberPublication date
CN1770096A (en)2006-05-10

Similar Documents

PublicationPublication DateTitle
US11418832B2 (en)Video processing method, electronic device and computer-readable storage medium
US6573915B1 (en)Efficient capture of computer screens
CN111899322B (en)Video processing method, animation rendering SDK, equipment and computer storage medium
CN106231205B (en)Augmented reality mobile terminal
CN104850388A (en)Method and apparatus for drafting webpage
JP3454914B2 (en) Image generation method and image generation device
US6914608B2 (en)Screen display processing apparatus, screen display processing method and computer program
JPH02213286A (en) video data processing equipment
CN114222185B (en)Video playing method, terminal equipment and storage medium
CN100367199C (en) Method for Acquiring Covered Surface Video Information
KR100610689B1 (en) How to insert a video on a 3D screen and a recording medium therefor
CN102685359A (en)Method for realizing hardware-acceleration-based video picture on remote desktop
JP4321751B2 (en) Drawing processing apparatus, drawing processing method, drawing processing program, and electronic conference system including the same
US9471956B2 (en)Graphic remoting system with masked DMA and graphic processing method
CN101599007A (en)system for displaying dynamic image
CN104125497A (en)Webpage video recording method and device
TW200418322A (en)Processing method and system for real-time video stream
CN110766599B (en)Method and system for preventing white screen from appearing when Qt Quick is used for drawing image
CN106648634A (en)Screen shot method and screen shot device
CN110634098A (en)Lossless sparse image display method, device and system
CN117437342B (en)Three-dimensional scene rendering method and storage medium
CN114721751B (en)Window screenshot method and device, electronic equipment and storage medium
US20070211082A1 (en)Method and System for Volatile Construction of an Image to be Displayed on a Display System from a Plurality of Objects
CN113741836A (en)Media processing method, device and system
CN116821537A (en)Animation display method and device, storage medium and embedded terminal

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant
CX01Expiry of patent term

Granted publication date:20080206

CX01Expiry of patent term

[8]ページ先頭

©2009-2025 Movatter.jp