Summary of the invention
The present invention proposes a kind of video data processing system and method, and the vedio data that an image acquisition units is gathered is shared by a plurality of application programs simultaneously and used.
Technical scheme of the present invention is achieved in that
A kind of video data processing system comprises:
Image acquisition units is used to gather vedio data;
Video storage unit is used to store described vedio data;
At least one virtual video unit, described virtual video unit is the virtual video equipment that is registered in the operating system, be used for when the third party software module is selected described virtual video unit, from described video storage unit, obtain the vedio data of described third party software module needs and offer described third party software module and use.
Preferably, also comprise:
Dividing cell is used for the vedio data of described image acquisition units collection is divided into a plurality of vedio datas;
Processing unit is used for according to the demand of described third party software module each vedio data being handled.
Preferably, the number of described processing unit and described video storage unit is determined according to the number of described third party software module.
Preferably, described virtual video unit also is used for grasping static video image from the vedio data that obtains.
Preferably, the com component that described virtual video unit is realized based on DirectShow Filter technology, and be registered in the operating system.
Preferably, described virtual video unit is by inheriting the application layer that DirectShow Source Filter is registered to described operating system.
A kind of video data handling procedure is applied in the video data processing system, and described video data processing system comprises at least one virtual video unit, and described virtual video unit (ONU) registration is in operating system, and described method comprises:
Gather vedio data;
Store described vedio data;
Described virtual video unit obtains the vedio data of third party software module needs and offers described third party software module and uses.
Preferably, also comprise behind the described collection vedio data:
The vedio data of described collection is divided into a plurality of vedio datas;
Demand according to described third party software module is handled each vedio data.
Preferably, described virtual video unit obtains the vedio data that the third party software module needs and offers and also comprises after described third party software module is used:
From the vedio data that obtains, grasp static video image.
Preferably, the com component that described virtual video unit is realized based on DirectShow Filter technology, and be registered in the operating system.
Described virtual video unit is by inheriting the application layer that DirectShow Source Filter is registered to described operating system.
Technical scheme of the present invention is by increasing the virtual video unit, when the third party software module is selected described virtual video unit, from described video storage unit, obtain the vedio data of described third party software module needs and offer described third party software module and use, when a plurality of third party software, can a plurality of virtual videos of corresponding registration unit, thereby the vedio data of having realized an image acquisition units collection can be shared use by a plurality of application programs (as instant messenger) simultaneously, thereby solved the monopolistic shortcoming of existing each application program to the first-class image capture device of making a video recording, realized that application program shares when making a video recording first-class image capture device, and further realized static grabgraf (still pin) function by described virtual video unit.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
With reference to Fig. 1, show the composition structural drawing of a kind of video data processing system first embodiment of the present invention.Described video data processing system 100 comprises image acquisition units 110, dividing cell 120, processing unit 130, video storage unit 140 and at least one virtual video unit 150.
Described image acquisition units 110, be used to gather vedio data.
Described image acquisition units 110 can be traditional first-class image capture device of shooting, can be the image capture device that desk-top computer or mobile notebook etc. carry also, described vedio data can certainly be other video data (as video datas such as picture file, films).
Described dividing cell 120, be used for the vedio data that described image acquisition units 110 is gathered is divided into a plurality of vedio datas.
Described processing unit 130, be used for each vedio data being handled according to the demand of described third party software module.
Described processing unit 130 is handled vedio data according to the demand of third party software module, as with as described in vedio data synthesize, increase relevant special efficacys such as background image data, face tracking or the like with background image.
In another preferential embodiment of the present invention, described video data processing system 100 also can not comprise described dividing cell 120 and described processing unit 130.
Described video storage unit 140, be used to store described vedio data.
When described video data processing system 100 does not comprise described dividing cell 120 and described processing unit 130, the vedio data that the described image acquisition units 110 of described video storage unit 140 storages is gathered.
When described video data processing system 100 comprises described dividing cell 120 and described processing unit 130, the described processing unit 130 processed video view data of described video storage unit 140 storages.
The number of described processing unit 130 and described video storage unit 140 is determined according to the number of described third party software module.Certainly, the number of described processing unit 130 and described video storage unit 140 also can be one, described multi-path video data image stream is handled and stored, when a plurality of third party software modules need identical video data, then can from some video storage unit 140, obtain data, thereby raise the efficiency.
Described virtual video unit 150, be registered in the operating system, be used for when the third party software module is selected described virtual video unit 150, from described video storage unit 140, obtain the vedio data that described third party software module needs.
The application layer com component that described virtual video unit 150 is realized based on DirectShow Filter (filtrator) technology, and be registered in the operating system.
Further, described virtual video unit 150 is by inheriting the application layer that DirectShow Source Filter (supply filter) is registered to described operating system.
Described virtual video unit 150 is realized based on DirectShow technological frame and the COM technology that Microsoft provides.The Source Filter that this virtual video unit is a push-model inherits from CBaseFilter.This Source filter has two outputs Pin, i.e. Capture pin and Still Pin.This Filter has realized the relevant interface of video equipment simultaneously, for third party's routine call.Its registration classification is set to CLSID_VideoInputDeviceCategory when this assembly of registration at last.Can automatically it be registered as video equipment.
After described virtual video unit 150 is registered in operating system, video application (as Instant Messenger (IM) software) promptly can by enumerate the system video device enumeration to as described in virtual video unit 150, thereby can select described virtual video unit 150 as video communication equipment, when a plurality of video application, each video application calls a virtual video unit 150 and obtains identical vedio data or obtain different vedio datas respectively from same video storage unit 140 from a plurality of video storage unit 140, thereby solved the monopolistic shortcoming of existing each application program, realized that application program shares when making a video recording first-class image capture device the first-class image capture device of making a video recording.
Described third party software module can be an Instant Messenger (IM) software, as QQ, MSN, Skype or the like, can also be other Video Applications software.
In another embodiment of the present invention, described virtual video unit 150 also is used for grasping static video image from the vedio data that obtains, thereby realizes static grabgraf (still pin) function.
Technical scheme of the present invention is by increasing the virtual video unit, realized that the vedio data that an image acquisition units is gathered can be shared use by a plurality of application programs (as instant messenger) simultaneously, thereby solved the monopolistic shortcoming of existing each application program, realized that application program shares when making a video recording first-class image capture device the first-class image capture device of making a video recording.And further realized static grabgraf (still pin) function by described virtual video unit.
With reference to Fig. 2, show the process flow diagram of a kind of video data handling procedure first embodiment of the present invention.Described method is applied in the video data processing system, described video data processing system comprises at least one virtual video unit, described virtual video unit (ONU) registration is in operating system, described video data processing system and described virtual video unit are described in detail in the described embodiment of Fig. 1, consider for length, do not repeat them here.When the third party software module is enumerated system video equipment, and when selecting the virtual video unit as current video source, this moment, virtual video equipment can carry out following steps according to the video requirement of third party software module:
Step S210, collection vedio data.
First-class image acquisition units is gathered vedio data by making a video recording.
Step S220, the vedio data of described collection is divided into a plurality of vedio datas.
Step S230, each vedio data is handled according to the demand of described third party software module.
Demand according to the third party software module is handled vedio data, as with as described in vedio data and background image synthesize, increase background image data, change light and shade contrast of image or the like.
Step S240, store described vedio data.
In another preferred embodiment of the present invention, can not comprise described step S220 and described step S230, described step S240 directly stores the vedio data of described collection.
Step S250, described virtual video unit obtain the vedio data that the third party software module needs, and send described vedio data to described third party software module.
The com component that described virtual video unit is realized based on DirectShow Filter (filtrator) technology, and be registered in the operating system.
Further, described virtual video unit is by inheriting the application layer that DirectShow Source Filter (supply filter) is registered to described operating system.
Described virtual video unit (ONU) registration after operating system, video application (as Instant Messenger (IM) software) promptly can by in system, enumerate video equipment enumerate as described in the virtual video unit, thereby can select described virtual video unit as video source.
Described third party software module can be an Instant Messenger (IM) software, as QQ, MSN or the like, can also be other Video Applications software.
In another preferred embodiment of the present invention, behind described step S250, also comprise:
From the vedio data that obtains, grasp static video image, thereby realize static grabgraf function.
Technical scheme of the present invention is by increasing the virtual video unit, realized that the vedio data that an image acquisition units is gathered can be shared use by a plurality of application programs (as instant messenger) simultaneously, thereby solved the monopolistic shortcoming of existing each application program, realized that application program shares when making a video recording first-class image capture device the first-class image capture device of making a video recording.And further realized static grabgraf (still pin) function by described virtual video unit.
One of ordinary skill in the art will appreciate that, realize that all or part of step in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in the computer read/write memory medium, this program is when carrying out, comprise step as above-mentioned method embodiment, described storage medium, as: magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.In each method embodiment of the present invention; the sequence number of described each step can not be used to limit the sequencing of each step; for those of ordinary skills, under the prerequisite of not paying creative work, the priority of each step is changed also within protection scope of the present invention.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.