Summary of the invention
The technical problem that the present invention will solve is; Need revise the defective of former video content to the method that has when video playback display text or picture now; Provide a kind of on the video of playing the method and system of displaying contents; Can on the basis of not revising former video content, the video of playing perhaps recorded central video adding literal or image.
The technical solution adopted for the present invention to solve the technical problems is: construct a kind of on the video of playing the method for displaying contents, may further comprise the steps:
A, displaying video;
B, when displaying video, obtain the broadcast state information of video window, and generate the forms layer according to said broadcast state information, cover on the said video window, said forms layer has puts top and transparent attribute; The content information that the user is imported in advance is presented on the said forms layer.
According to of the present invention on the video of playing in the method for displaying contents, the broadcast state information of the video window that obtains among the said step B comprises: the positional information of said video window and dimension information.
According to of the present invention on the video of playing in the method for displaying contents, it is related that the said forms layer that generates among the said step B and said video window mobile carries out.
According to of the present invention on the video of playing in the method for displaying contents; Said method also comprises step: C, obtains the content modification information and/or the location updating information of user's input, to making amendment in said forms layer content displayed and/or position among the step B.
According to of the present invention on the video of playing in the method for displaying contents, said content information comprises: literal and/or image.
The present invention also provide a kind of on the video of playing the system of displaying contents, comprising:
The video playback module is used for displaying video;
Memory module is used to store the content information that the user imports in advance;
Window forms module; Link to each other with memory module with said video playback module; Be used to obtain the broadcast state information of the video window of said video playback module institute displaying video; And according to said broadcast state information generation forms layer, cover on the said video window, said forms layer has puts top and transparent attribute;
The Window layer display control module forms module with said window and links to each other, and is used for the content information that the user imports in advance is presented at said forms layer.
According to of the present invention on the video of playing in the system of displaying contents, the broadcast state information that said window forms the video window that module obtains comprises: the positional information of said video window and dimension information.
According to of the present invention on the video of playing in the system of displaying contents, said window forms said forms layer that module generates and said video window mobile carry out related.
According to of the present invention on the video of playing in the system of displaying contents; Said Window layer display control module also obtains the content modification information and/or the location updating information of user's input, will make amendment in said forms layer content displayed and/or position.
According to of the present invention on the video of playing in the system of displaying contents, said content information comprises: literal and/or image.
The method and system of displaying contents on the video of playing of embodiment of the present invention; Have following beneficial effect: the present invention is through obtaining the broadcast state information of video window when the displaying video; And generate the forms layer according to said broadcast state information and cover on the video window; And the content information that invoke user is imported in advance shows, can be on the basis of not revising former video content, to the video play or the video in the middle of recording add literal or image.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.
The present invention conceived a kind of on the video of playing the method and system of displaying contents, can be on the basis of not revising former video content, to the video play or the video in the middle of recording add literal or image.
See also Fig. 1, for according to the present invention on the video of playing the flow chart of the preferred embodiment of the method for displaying contents.As shown in Figure 1, the method for displaying contents on the video of playing that this embodiment provides may further comprise the steps:
In step S101, displaying video.This video can be the video file of storing in the system, perhaps the video content for recording.
In step S102, in step S101 displaying video, obtain the broadcast state information of the video window of this current institute displaying video, and generate the forms layer according to this broadcast state information, cover on the video window.This forms layer is set to put top layer, and has transparent attribute.And the content information that this step invoke user is imported in advance is presented on the forms layer.The stored in form that this content information of importing in advance can adopt file can be information such as literal or picture in system.
The broadcast state information of the above-mentioned video window that obtains comprises: the positional information of video window and dimension information.According to the size of the size relative set forms layer of video window, and the position of forms is set in this step, the forms layer is covered on the video window shows according to the position of video window.
Above-mentioned on the video of playing the method for displaying contents further comprising the steps of: obtain the content modification information and/or the location updating information of user's input, to making amendment in forms layer content displayed and/or position among the step S102.
Particularly, above-mentioned additional forms layer has the WS_EX_LAYERED attribute when generating, and it belongs to the Microsft Windows extended attribute, can realize the function of window transparence at the api layer face.Therefore, can this forms layer of putting the top be covered on the video window of broadcast pellucidly.
And the forms layer of generation can carry out relatedly with video window mobile, and mainly through calling the WM_MOVE function, and the WM_MOVING function is realized.Wherein the WM_MOVING function is used for the moved further forms.The WM_MOVE function is:
CWnd::OnMove
afx_msgvoidOnMove(intx,inty);
Parameter: x has specified the new x axial coordinate in the upper left corner, client area.Y has specified the new y axial coordinate in the upper left corner, client area.For eclipsed form and pop-up window, coordinate provides with screen coordinate, for subwindow, is that the client area coordinate with parent window provides.
Therefore, forms layer and the mobile of video window that will put the top through the message of handling WM_MOVE, two functions of WM_MOVING link together, and promptly this forms layer can move along with moving of video window.
Further, the content information of user's input can be many images, can in the forms layer, play many images according to preset order, to present dynamic effect.
See also Fig. 2, for according to of the present invention on the video of playing the module diagram of the preferred embodiment of the system of displaying contents.The system of displaying contents on the video of playing as shown in Figure 2, that this embodiment provides, comprising: video playback module 10, window form module 20, memory module 30 and Window layer display control module 40.
Wherein, video playback module 10 is used for displaying video.This video can be the video file of storing in the system, perhaps the video content for recording.
Memory module 30 is used to store the content information that the user imports in advance.This content information of importing in advance can adopt the stored in form of file, can be information such as literal or picture.
Window forms module 20 and links to each other with memory module 30 with said video playback module 10; Be used in video playback module 10 displaying videos; Obtain the broadcast state information of the video window of 10 displaying videos of video playback module; And, cover on the said video window according to this broadcast state information generation forms layer.This forms layer is set to put top layer, and has transparent attribute.And window forms module 20 content information that invoke user is imported in advance from memory module 30 and is presented on the said forms layer.Further, the content information of the user of storage input can be many images in the above-mentioned memory module 30, and window forms module 20 and can in the forms layer, play many images according to preset order, to present dynamic effect.
Above-mentioned window formation module 20 comprises from the broadcast state information of the video window that video playback module 10 is obtained: the positional information of video window and dimension information.Window forms the size of module 20 according to the size relative set forms layer of video window, and according to the position of video window the position of forms is set, and the forms layer is covered on the video window show.
Window layer display control module 40 forms module 20 with window and links to each other, and is used to obtain the content modification information and/or the location updating information of user's input, is made amendment in the forms layer content displayed and/or the position that generate.The content modification information that Window layer display control module 40 can also be imported according to the user who obtains simultaneously; The content information that the user who stores in the memory module 30 is imported in advance upgrades, and then makes the forms layer call and content displayed information generation respective change.
Particularly, the additional forms layer that above-mentioned window forms module 20 generations has the WS_EX_LAYERED attribute, and it belongs to the Microsft Windows extended attribute, can realize the function of window transparence at the api layer face.Therefore, can this forms layer of putting the top be covered on the video window of broadcast pellucidly.
And window forms forms layer that module 20 generates and can carry out relatedly with video window mobile, and mainly through calling the WM_MOVE function, and the WM_MOVING function is realized.Wherein the WM_MOVING function is used for the moved further forms.The WM_MOVE function is:
CWnd::OnMove
afx_msgvoidOnMove(intx,inty);
Parameter: x has specified the new x axial coordinate in the upper left corner, client area.Y has specified the new y axial coordinate in the upper left corner, client area.For eclipsed form and pop-up window, coordinate provides with screen coordinate, for subwindow, is that the client area coordinate with parent window provides.
Therefore, forms layer and the mobile of video window that will put the top through the message of handling WM_MOVE, two functions of WM_MOVING link together, and promptly this forms layer can move along with moving of video window.
The present invention describes according to specific embodiment, but it will be understood by those skilled in the art that when not breaking away from the scope of the invention, can carry out various variations and be equal to replacement.In addition, for adapting to the specific occasion or the material of the present invention's technology, can carry out many modifications and not break away from its protection range the present invention.Therefore, the present invention is not limited to specific embodiment disclosed herein, and comprises that all drop into the embodiment of claim protection range.