CN106791356A - For the method and device of camera data distribution - Google Patents

For the method and device of camera data distribution Download PDF

Info

Publication number
CN106791356A
CN106791356A CN201610997183.8A CN201610997183A CN106791356A CN 106791356 A CN106791356 A CN 106791356A CN 201610997183 A CN201610997183 A CN 201610997183A CN 106791356 A CN106791356 A CN 106791356A
Authority
CN
China
Prior art keywords
camera
application
destination application
data distribution
program
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.)
Pending
Application number
CN201610997183.8A
Other languages
Chinese (zh)
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.)
Beijing Intelligent Housekeeper Technology Co Ltd
Original Assignee
Beijing Intelligent Housekeeper Technology 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 Beijing Intelligent Housekeeper Technology Co Ltd filed Critical Beijing Intelligent Housekeeper Technology Co Ltd
Priority to CN201610997183.8A priority Critical patent/CN106791356A/en
Publication of CN106791356A publication Critical patent/CN106791356A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/617Upgrading or updating of programs or applications for camera control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/65Control of camera operation in relation to power supply

Abstract

The present invention proposes a kind of method for camera data distribution.Methods described includes:Open and close correlation API corresponding to camera is packaged;Each self-corresponding monitoring interface of registrer application is distinguished at the camera;The monitoring interface is packaged;When destination application request is connected with camera, the camera is attached with corresponding destination application respectively by the corresponding interface of monitoring of the destination application;After the destination application with the camera successful connection, the data carried out between camera and destination application are distributed in real time;When target complete application program all exits the connection with the camera, then the camera is closed.By the present invention, the view data that multiple application services can be simultaneously to camera is processed, while having evaded various failures or the exception that the frequent open and close of camera brings, greatly improves the Stability and veracity of camera.

Description

For the method and device of camera data distribution
Technical field
The present invention relates to data processing field, in particular to a kind of method and dress for camera data distribution Put.
Background technology
Usually, intelligent operating system can provide a set of packaged camera and obtain DSV framework, there is provided take the photograph As head opening, closing, obtain the functions such as camera initial data.The most obvious defect of this mode is that camera is same in system One time was only capable of responding an application program, therefore cannot then be carried out in the scene that multiple application programs use camera simultaneously Response.On the other hand, camera is used simultaneously in multiple application programs, and in the middle of different processes, cannot be even more realized The application program of camera internal data in need distribute simultaneously, allow multiple application programs while carried out to view data Treatment.
The content of the invention
Multiple application programs cannot be met present invention aim to address current intelligent operating system while using camera Demand this technical problem.
According to an aspect of the invention, it is proposed that a kind of method for camera data distribution.Methods described includes:To taking the photograph As a corresponding open and close correlation API is packaged, NO VIDEO PLEASE head application program in a device directly invoke;Described Each self-corresponding monitoring interface of registrer application is distinguished at camera;The monitoring interface is packaged, for each application Program is called respectively;When destination application request is connected with camera, by the corresponding prison of the destination application Listen interface that the camera is attached with corresponding destination application respectively;Taken the photograph with described in the destination application As after head successful connection, the data carried out between camera and destination application are distributed in real time;When target complete application journey Sequence all exits the connection with the camera, then close the camera.
Preferably, after the destination application with the camera successful connection, the video that camera is gathered Data are sent to the destination application frame by frame respectively.
Preferably, after the destination application with the camera successful connection, in the inner buffer of camera Picture frame to be sent, and while each destination application is sent in real time, the next frame of described image frame is cached, until Camera is closed.
Preferably, when the destination application and the camera successful connection, then camera reference count adds 1;When Destination application exits the connection with the camera, then camera reference count subtracts 1.
Preferably, when the camera reference count is 0, the camera is closed.
According to another aspect of the invention, it is proposed that a kind of device for camera data distribution.The device can be wrapped Include:For the unit being packaged to the corresponding open and close correlation API of camera, with NO VIDEO PLEASE head application in a device Program is directly invoked;For distinguishing each self-corresponding unit for monitoring interface of registrer application at the camera;For The unit being packaged to the monitoring interface, the monitoring interface is called respectively for each application program;For When destination application request is connected with camera, taken the photograph described respectively by the corresponding interface of monitoring of the destination application As the unit that head is attached with corresponding destination application;For being connected with the camera in the destination application After success, the unit of the data distribution in real time between camera and destination application is carried out;For when target complete application Program all exits the connection with the camera, then the unit closed the camera.
Preferably, after the destination application with the camera successful connection, the video that camera is gathered Data are sent to the destination application frame by frame respectively.
Preferably, after the destination application with the camera successful connection, in the inner buffer of camera Picture frame to be sent, and while each destination application is sent in real time, the next frame of described image frame is cached, until Camera is closed.
Preferably, when the destination application and the camera successful connection, then camera reference count adds 1;When Destination application exits the connection with the camera, then camera reference count subtracts 1.
Preferably, when the camera reference count is 0, the camera is closed.
Method and device for camera data distribution of the invention, is packaged by camera resource, And to the application program of camera data in need distribute the data of camera simultaneously, therefore multiple application service can be simultaneously View data to camera is processed, so that process number, application program number are not received in the use of camera resource Limitation, while having evaded various failures or the exception that the frequent open and close of camera brings, greatly improve the standard of camera True property and stability.And the present invention uses camera internal data buffer mechanism, improves data access efficiency.
The method of the present invention has other characteristics and advantage, these characteristics and advantage from the accompanying drawing being incorporated herein and with Be will be apparent in specific embodiment afterwards, or will entered in the accompanying drawing being incorporated herein and subsequent specific embodiment Row statement in detail, these the drawings and specific embodiments are provided commonly for explaining certain principles of the invention.
Brief description of the drawings
Exemplary embodiment of the present is described in more detail by with reference to accompanying drawing, it is of the invention above-mentioned and other Purpose, feature and advantage will be apparent, wherein, in exemplary embodiments of the present invention, identical reference number is usual Represent same parts.
Fig. 1 is the flow chart of the method for camera data distribution according to one embodiment of the present of invention.
Fig. 2 is the schematic diagram that multiple application programs are connected with camera in application example.
Specific embodiment
The present invention is more fully described below with reference to accompanying drawings.Although showing the preferred embodiments of the present invention in accompanying drawing, However, it is to be appreciated that may be realized in various forms the present invention without that should be limited by embodiments set forth here.Conversely, there is provided These embodiments are in order that the disclosure is more thorough and complete, and the scope of the present disclosure can intactly be conveyed into ability The technical staff in domain.
Intelligent operating system in the present invention is usually android system.Generally, external application passes through Android The Camera classes that system is provided access camera.However, the Camera applications that system is carried have many limitations, it is most important just It is that multiple application programs can not be while call camera.When an application program occupies camera resource, other programs are then Camera cannot be used.
Fig. 1 shows the flow chart of the method for camera data distribution according to an embodiment of the invention.
The method of the present embodiment may comprise steps of:
1) open and close correlation API corresponding to camera is packaged, NO VIDEO PLEASE head application program in a device it is straight Connect and call.
Camera is the class that application layer software is directly used, and the operation such as covers startup, preview, takes pictures, records a video and close Whole interfaces of camera.Camera application program in a device be opening for the Camera classes that are carried by calling system (Open) function opens camera, that is, by calling the corresponding Open correlation API of camera to carry out camera Opening operation.However, the Open correlations API that system is carried can only realize camera in the case where camera is unoccupied Operation is opened, when camera is taken by an application program, when another application program is attempted by Open correlations API Realize opening the operation of camera, can one error message of auto-returned.Therefore more than two application programs in existing equipment The data that camera can not simultaneously be obtained are used.
Similarly, shooting is closed by calling pass (Close) function of Cameral classes using the application program of camera Head, i.e., by calling the corresponding pass correlation API of camera to carry out shutoff operation to camera.
Camera data distributing method of the invention open and close correlation API corresponding to camera first is packaged, and forbids Camera application program in a device directly invoke.That is, making the Camera classes that application program cannot be carried by system Open functions open camera, also camera cannot be closed by the Close functions of Camera classes.
In the present embodiment, can only NO VIDEO PLEASE head be possibly used in a device camera application program it is direct Call the corresponding open and close correlation API of camera.
2) each self-corresponding monitoring interface of registrer application is distinguished at the camera.
The monitoring interface of registrer application at camera, is to make the monitoring interface as action listener person, comes real The monitoring of camera event is used referring now to the application program.When the event that listens to occurs, that is, there are application requests with shooting Head connection, system then notifies to monitor interface to process corresponding event with the corresponding people of the application program.
In the present embodiment, the application program correspondence that camera is possibly used camera in a device can only be registered Monitoring interface.
3) the monitoring interface is packaged, so that each application program is called respectively.
After to registering at the camera to monitorings interface be packaged the process for substantially being initialized to camera, Each interface is stated in the initialization procedure, resource allocation etc., so that each application program is called respectively.
If certain is monitored, interface is non-encapsulated, and corresponding application program cannot call camera
4) when destination application request is connected with camera, interface point is monitored by the way that the destination application is corresponding The camera is not attached with corresponding destination application.
When action listener person listens to the event that destination application request is connected with camera, then system is called and the mesh Beacon course sequence is corresponding to be monitored interface to process the event, namely by monitoring interface corresponding with the target program come camera with Corresponding destination application is attached.
When there is multiple target program requests to be attached with camera, then by prison corresponding with the multiple target program Listen interface that camera is attached with multiple destination applications respectively.
It can be seen that, forbidding the correlation API of the open and close corresponding to the original camera of application call system, and use this instead In invention at camera the corresponding monitoring interface of registrer application, you can to realize multiple destination applications and camera While connect.
5) after the destination application with the camera successful connection, camera and destination application are carried out Between data distribute in real time.
After the destination application with the camera successful connection, the video data difference that camera is gathered The destination application is sent to frame by frame.
Specifically, in the picture frame that the inner buffer of camera is to be sent, and each destination application is being sent in real time While, the next frame of described image frame is cached, until camera is closed.
Because multiple destination applications can be attached with camera simultaneously, thus the data of camera can be simultaneously Be distributed to and all be connected thereto successful destination application so that multiple destination applications can camera simultaneously image Data are processed, it is achieved thereby that the use of camera resource does not limit the effect of application program number.
In the exemplary embodiment, obtained by setPreviewCallbackWithBuffer modes callback interface and imaged The video data of head.
In the exemplary embodiment, it is YUV NV21 forms that the video data of camera is original.
Android system provides two ways callback interface to obtain the initial data of camera.
The first is setPreviewCallback modes, callback interface PreviewCallback is set, in callback method The each frame data for the treatment of in onPreviewFrame ();
Second is setPreviewCallbackWithBuffer modes, equally sets callback interface PreviewCallback, uses cooperatively with addCallbackBuffer modes.
The second way and first way difference are:First way is onPreviewFrame callback methods, meeting All set just called in each frame data, but the second way is to need the onPreviewFrame methods in former frame In call the onPreviewFrame of addCallbackBuffer methods, next frame just to call, while The byte data of the parameter of addCallbackBuffer methods are exactly the former data of each frame.That is first method It is uncontrollable that onPreviewFrame is called, and is exactly that each frame data are all set just adjusted back, but second method is It is controllable, the callback mechanism of onPreviewFrame is controlled by calling for addCallbackBuffer.
Additionally, setPreviewCallbackWithBuffer modes are compared with setPreviewCallback modes, often Producing a frame to open up a new buffer carries out storage frame data, so constantly opens up and reclaim internal memory, and GC reclaims frequency Numerous, efficiency is very low.
And in the present invention, camera begins to internally carry out the video data of collection to cache so after being unlocked Such process is discharged afterwards.After at least one destination application and camera successful connection, the reality of application program is sent to It is to be buffered in the data inside camera in matter.GC is reduced in this way and reclaims frequency, improve data access efficiency.
6) when target complete application program all exits the connection with the camera, then the camera is closed.
There is event as the connection that PROGRAMMED REQUESTS exits with the camera when intended application is listened to, then system Notify that monitoring interface corresponding with the destination application processes corresponding event, i.e., by with the destination application Corresponding monitoring interface opens up its connection with the camera.
When target complete application program all exits the connection with the camera, then camera is closed, discharge resource.
In the exemplary embodiment, when destination application request is connected with camera, if the camera is in The state of closing, then first open the camera.
When camera is closed, the thing that destination application request is connected with camera is listened to when first time Part occurs, then open the camera by with the monitoring interface corresponding to the destination application.When camera is in During opening, then the event generation that the request of other destination applications is connected with camera is listened to, then can directly passed through With camera be connected these destination applications respectively by monitoring interface corresponding with these destination applications, so that these should The video data that camera is gathered can be obtained with program.
In the exemplary embodiment, when the destination application and the camera successful connection, then camera is quoted Count is incremented;When destination application exits the connection with the camera, then camera reference count subtracts 1.
Specifically, when there is application program A to ask to be connected with camera, if now camera is to close, do not appointed What application program takes, then opened camera by monitoring interface corresponding with application program A, will be originally used for 0 reference meter Number Jia 1;If now there is application program B to ask to be connected with camera again, because now camera has already turned on, without carrying out again With camera be connected application program B by monitoring interface corresponding with application program B directly by the step of camera is opened, And reference count is added 1.Often there are an application program and camera successful connection, reference count then adds 1.The number of reference count Mesh shows currently to have several application programs just while being connected with camera.When application program A exits the connection with camera, no longer Using camera, then the reference count of camera subtracts 1;When application program B also exits the connection with camera, reference count subtracts again 1.Often there is an application program to exit the connection with camera, reference count then subtracts 1.
In the exemplary embodiment, when the camera reference count is 0, the camera is closed.
Often there is an application program to exit the connection with camera, reference count then subtracts 1, until reference count is 0, explanation There is no application program using camera, then final plant closure camera, discharges resource.
In an example embodiment, the data of camera inner buffer are transferred to client by external control period End.
The data of camera inner buffer are directly transferred by outside Period, the mode of outside addition readjustment, by data It is supplied to client to use.
Another embodiment of the present invention proposes a kind of device for camera data distribution.
The device can include:For the unit being packaged to the corresponding open and close correlation API of camera, to forbid taking the photograph As head application program in a device directly invoke;It is each self-corresponding for distinguishing registrer application at the camera Monitor the unit of interface;For the unit being packaged to the monitoring interface, the monitoring interface is supplied into each application program It is called respectively;It is corresponding by the destination application for when destination application request is connected with camera Monitor the unit that with corresponding destination application be attached the camera respectively by interface;For in the intended application After program and the camera successful connection, the list of the data distribution in real time between camera and destination application is carried out Unit;For all exiting the connection with the camera when target complete application program, then the unit closed the camera.
In an example embodiment, after the destination application with the camera successful connection, by camera The video data of collection is sent to the destination application frame by frame respectively.
In an example embodiment, after the destination application with the camera successful connection, in camera Inner buffer picture frame to be sent, and while each destination application is sent in real time, caching described image frame Next frame, until camera is closed.
In an example embodiment, when the destination application and the camera successful connection, then camera is quoted Count is incremented;When destination application exits the connection with the camera, then camera reference count subtracts 1.
In an example embodiment, when the camera reference count is 0, the camera is closed.
The camera data distributing method of the present embodiment, efficiently solving multiple application programs can not simultaneously use shooting The problem of head, each application program can concurrently obtain initial data and process the service logic of itself, rather than use The camera serial operation of script, greatly expands the usage scenario of camera with service efficiency, in the absence of some application services Data can be obtained, situation of some application services without response.And unlatching, the shutoff operation of unified camera, take the photograph with tradition Compared as head is called, greatly reduce unlatching, close the number of times of camera, it is various that reduction is caused due to frequent open and close It is abnormal.And the camera data distributing method of the present embodiment uses inside nv21 data source cache mechanism, be finished after data by Client puts back to data source, along with the caching mechanism of itself is invented, substantially increases the efficiency that client uses initial data With internal memory, CPU treatment effeciencies greatly reduce the frequency of GC recovery.
In above-mentioned steps, whole data are provided as an individually service, you can to support multiple threads, multiple applications Service, multiple processes are accessed simultaneously.
Using example
For ease of understanding the scheme and its effect of the embodiment of the present invention, a concrete application example given below.This area It should be understood to the one skilled in the art that the example is only for the purposes of understanding the present invention, its any detail is not intended to limit by any way The system present invention.
The example below be using the method for camera data distribution of the invention by the video data of camera simultaneously It is sent to three application programs:Motion detection program, face tracking program, the specific steps of video calling program.
First, open and close correlation API corresponding to camera is packaged, NO VIDEO PLEASE head in a device all can Can be directly invoked using the application program of camera.
Registered respectively at the camera corresponding with motion detection program, face tracking program, video calling program Interface is monitored, for monitoring the request that these three PROGRAMMED REQUESTSs and camera are attached.
Three corresponding monitoring interfaces of application program are packaged, i.e., these three monitoring interfaces are stated, entered Row resource allocation, so that three application programs are called to it respectively.
In the case where camera is closed, needs to use camera and catch object motion when first listening to Motion detection program request be attached with camera event when, will by monitoring interface corresponding with motion detection program Camera is opened, and motion monitoring program and camera are attached, and 0 camera reference will be originally used for after successful connection Count is incremented.When motion monitoring program and camera successful connection, the video data that camera will be cached inside it passes through It is monitored interface and is sent to motion monitoring program frame by frame, and motion monitoring program can be processed the video data to carry out Motion monitoring.
Had already turned in camera, in the case that reference count is 1, needs also exist for camera and catch to picture when listening to Face-image the event that is connected with camera of face tracking PROGRAMMED REQUESTS, then by the prison corresponding with face tracking program Listen interface to be attached face tracking program and camera, the reference count of camera is added 1 after successful connection, and will take the photograph Interface is monitored by it as the video data of head inner buffer and is sent to the application program frame by frame so that it is processed and is used.Together Reason, if now listening to the event that video calling program also asks to be connected with camera, by with video calling program phase Be attached for video calling program and camera by corresponding monitoring interface, adds 1 by reference count again upon connection.Now image The reference count of head is 3, is shown while there is 3 application programs to be connected with camera.It is connected with camera in video calling program Success is talked about, and video data of camera inner buffer also equally is monitored into interface by it is sent to these three applications frame by frame respectively Program, such as calls inner buffer, will in real time be sent to motion detection program, face respectively after the 1st frame buffer in video data Tracing program, video calling program, while caching the 2nd frame, then are sent to motion detection program, face tracking journey in real time respectively Sequence, video calling program, by that analogy, until certain application program is exited or camera is closed.
When there is a request to exit the connection with camera in these three application programs, then by corresponding with the application program Monitoring interface disconnect its adjunction with camera, while camera is quoted into meter camera is closed, and will be internal, outside slow The data deposited all are fallen clearly, recover camera init state, again wait for application program to call.
It will be understood by those skilled in the art that above to the purpose of the description of embodiments of the invention only for exemplarily saying The beneficial effect of bright embodiments of the invention, is not intended to limit embodiments of the invention to given any example.
The present invention can be device, method and/or computer program product.Computer program product can include computer Readable storage medium storing program for executing, containing for making processor realize the computer-readable program instructions of various aspects of the invention.
Computer-readable recording medium can be the tangible of the instruction that holding and storage are used by instruction execution equipment Equipment.Computer-readable recording medium for example can be-- but be not limited to-- storage device electric, magnetic storage apparatus, optical storage Equipment, electromagnetism storage device, semiconductor memory apparatus or above-mentioned any appropriate combination.Computer-readable recording medium More specifically example (non exhaustive list) includes:Portable computer diskette, hard disk, random access memory (RAM), read-only deposit It is reservoir (ROM), erasable programmable read only memory (EPROM or flash memory), static RAM (SRAM), portable Compact disk read-only storage (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical coding equipment, for example thereon Be stored with instruction punch card or groove internal projection structure and above-mentioned any appropriate combination.Calculating used herein above Machine readable storage medium storing program for executing is not construed as instantaneous signal in itself, the electromagnetic wave of such as radio wave or other Free propagations, logical Cross electromagnetic wave (for example, the light pulse for passing through fiber optic cables) that waveguide or other transmission mediums propagate or by wire transfer Electric signal.
Computer-readable program instructions as described herein can from computer-readable recording medium download to each calculate/ Processing equipment, or outer computer or outer is downloaded to by network, such as internet, LAN, wide area network and/or wireless network Portion's storage device.Network can include copper transmission cable, Optical Fiber Transmission, be wirelessly transferred, router, fire wall, interchanger, gateway Computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment are received from network to be counted Calculation machine readable program instructions, and the computer-readable program instructions are forwarded, for storing the meter in each calculating/processing equipment In calculation machine readable storage medium storing program for executing.
For perform the present invention operation computer program instructions can be assembly instruction, instruction set architecture (ISA) instruction, Machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programming language Source code or object code that any combination is write, programming language of the programming language including object-oriented-such as Smalltalk, C++ etc., and routine procedural programming languages-such as " C " language or similar programming language.Computer Readable program instructions can perform fully on the user computer, partly perform on the user computer, as one solely Vertical software kit is performed, part performs or completely in remote computer on the remote computer on the user computer for part Or performed on server.In the situation for being related to remote computer, remote computer can be by the network-bag of any kind LAN (LAN) or wide area network (WAN)-be connected to subscriber computer are included, or, it may be connected to outer computer (such as profit With ISP come by Internet connection).In certain embodiments, by using computer-readable program instructions Status information carry out personalized customization electronic circuit, such as PLD, field programmable gate array (FPGA) or can Programmed logic array (PLA) (PLA), the electronic circuit can perform computer-readable program instructions, so as to realize each side of the invention Face.
Referring herein to method according to embodiments of the present invention, device (system) and computer program product flow chart and/ Or block diagram describes various aspects of the invention.It should be appreciated that each square frame and flow chart of flow chart and/or block diagram and/ Or in block diagram each square frame combination, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to all-purpose computer, special-purpose computer or other programmable datas The processor of processing unit, so as to produce a kind of machine so that these instructions are by computer or other programmable datas During the computing device of processing unit, work(specified in one or more square frames realized in flow chart and/or block diagram is generated The device of energy/action.Can also be the storage of these computer-readable program instructions in a computer-readable storage medium, these refer to Order causes that computer, programmable data processing unit and/or other equipment work in a specific way, so that, be stored with instruction Computer-readable medium then includes a manufacture, and it includes realizing in one or more square frames in flow chart and/or block diagram The instruction of the various aspects of the function/action of regulation.
Can also computer-readable program instructions be loaded into computer, other programmable data processing units or other In equipment so that perform series of operation steps on computer, other programmable data processing units or miscellaneous equipment, to produce The computer implemented process of life, so that performed on computer, other programmable data processing units or miscellaneous equipment Instruct function/action specified in one or more square frames realized in flow chart and/or block diagram.
Flow chart and block diagram in accompanying drawing show system, method and the computer journey of multiple embodiments of the invention The architectural framework in the cards of sequence product, function and operation.At this point, each square frame in flow chart or block diagram can generation One part for module, program segment or instruction of table a, part for the module, program segment or instruction is used comprising one or more In the executable instruction of the logic function for realizing regulation.In some realizations as replacement, the function of being marked in square frame Can occur with different from the order marked in accompanying drawing.For example, two continuous square frames can essentially be held substantially in parallel OK, they can also be performed in the opposite order sometimes, and this is depending on involved function.It is also noted that block diagram and/or The combination of the square frame in each square frame and block diagram and/or flow chart in flow chart, can use the function of performing regulation or dynamic The special hardware based system made is realized, or can be realized with the combination of computer instruction with specialized hardware.
It is described above various embodiments of the present invention, described above is exemplary, and non-exclusive, and It is not limited to disclosed each embodiment.In the case of without departing from the scope and spirit of illustrated each embodiment, for this skill Many modifications and changes will be apparent from for the those of ordinary skill in art field.The selection of term used herein, purport Best explaining principle, practical application or the improvement to the technology in market of each embodiment, or make the art Other those of ordinary skill are understood that each embodiment disclosed herein.

Claims (10)

1. a kind of method for camera data distribution, it is characterised in that methods described includes:
Open and close correlation API corresponding to camera is packaged, NO VIDEO PLEASE head application program in a device directly adjust With;
Each self-corresponding monitoring interface of registrer application is distinguished at the camera;
The monitoring interface is packaged, so that each application program is called respectively;
When destination application request is connected with camera, by the corresponding interface of monitoring of the destination application respectively by institute Camera is stated to be attached with corresponding destination application;
After the destination application with the camera successful connection, carry out respectively camera and destination application it Between data distribute in real time;
When target complete application program all exits the connection with the camera, then the camera is closed.
2. the method for camera data distribution according to claim 1, it is characterised in that when the intended application journey After sequence and the camera successful connection, the video data that camera is gathered is sent to the intended application journey frame by frame respectively Sequence.
3. the method for camera data distribution according to claim 2, it is characterised in that when the intended application journey After sequence and the camera successful connection, in the picture frame that the inner buffer of camera is to be sent, and it is sent in real time each While destination application, the next frame of described image frame is cached, until camera is closed.
4. the method for camera data distribution according to claim 1, it is characterised in that when the intended application journey Sequence adds 1 with the camera successful connection, then camera reference count;When destination application exits the company with the camera Connect, then camera reference count subtracts 1.
5. the method for camera data distribution according to claim 4, it is characterised in that when the camera is quoted 0 is counted as, the camera is closed.
6. a kind of device for camera data distribution, it is characterised in that described device includes:
For the unit being packaged to the corresponding open and close correlation API of camera, with NO VIDEO PLEASE head application in a device Program is directly invoked;
For distinguishing each self-corresponding unit for monitoring interface of registrer application at the camera;
For the unit being packaged to the monitoring interface, the monitoring interface is adjusted respectively for each application program With;
For when destination application request is connected with camera, interface point being monitored by the way that the destination application is corresponding The unit that camera is not attached with corresponding destination application;
For after the destination application with the camera successful connection, carry out camera and destination application it Between data in real time distribution unit;
For all exiting the connection with the camera when target complete application program, then the unit closed the camera.
7. the device for camera data distribution according to claim 6, it is characterised in that when the intended application journey After sequence and the camera successful connection, the video data that camera is gathered is sent to the intended application journey frame by frame respectively Sequence.
8. the device for camera data distribution according to claim 7, it is characterised in that when the intended application journey After sequence and the camera successful connection, in the picture frame that the inner buffer of camera is to be sent, and it is sent in real time each While destination application, the next frame of described image frame is cached, until camera is closed.
9. the device for camera data distribution according to claim 6, it is characterised in that when the intended application journey Sequence adds 1 with the camera successful connection, then camera reference count;When destination application exits the company with the camera Connect, then camera reference count subtracts 1.
10. the device for camera data distribution according to claim 9, it is characterised in that when the camera draws With being counted as 0, the camera is closed.
CN201610997183.8A 2016-11-10 2016-11-10 For the method and device of camera data distribution Pending CN106791356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610997183.8A CN106791356A (en) 2016-11-10 2016-11-10 For the method and device of camera data distribution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610997183.8A CN106791356A (en) 2016-11-10 2016-11-10 For the method and device of camera data distribution

Publications (1)

Publication Number Publication Date
CN106791356A true CN106791356A (en) 2017-05-31

Family

ID=58973687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610997183.8A Pending CN106791356A (en) 2016-11-10 2016-11-10 For the method and device of camera data distribution

Country Status (1)

Country Link
CN (1) CN106791356A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483812A (en) * 2017-08-02 2017-12-15 深圳依偎控股有限公司 A kind of multi-platform parallel live method and device
CN109462726A (en) * 2017-09-06 2019-03-12 比亚迪股份有限公司 The control method and device of camera
CN110753187A (en) * 2019-10-31 2020-02-04 芋头科技(杭州)有限公司 Camera control method and device
CN111124224A (en) * 2019-12-12 2020-05-08 维沃移动通信有限公司 Application program control method and electronic equipment
CN112685099A (en) * 2020-12-31 2021-04-20 联想(北京)有限公司 Processing method and device
CN113259696A (en) * 2021-05-11 2021-08-13 西安万像电子科技有限公司 Live broadcast method and device, storage medium and electronic equipment
CN113489898A (en) * 2021-06-29 2021-10-08 广州小鹏汽车科技有限公司 Camera calling method and device, vehicle and storage medium
CN113556479A (en) * 2020-09-02 2021-10-26 华为技术有限公司 Method for sharing camera by multiple applications and electronic equipment
CN113596328A (en) * 2021-07-23 2021-11-02 北京字节跳动网络技术有限公司 Camera calling method and device and electronic equipment
CN114205529A (en) * 2021-12-20 2022-03-18 北京鸿合爱学教育科技有限公司 Single-camera calling method and device, terminal and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833520A (en) * 2009-03-11 2010-09-15 凹凸电子(武汉)有限公司 Method for simultaneously utilizing one camera by computer system and a plurality of application programs
CN102883139A (en) * 2011-07-12 2013-01-16 北京中星微电子有限公司 Camera application system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833520A (en) * 2009-03-11 2010-09-15 凹凸电子(武汉)有限公司 Method for simultaneously utilizing one camera by computer system and a plurality of application programs
CN102883139A (en) * 2011-07-12 2013-01-16 北京中星微电子有限公司 Camera application system and method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483812B (en) * 2017-08-02 2020-08-04 深圳依偎控股有限公司 Multi-platform parallel live broadcast method and device
CN107483812A (en) * 2017-08-02 2017-12-15 深圳依偎控股有限公司 A kind of multi-platform parallel live method and device
CN109462726A (en) * 2017-09-06 2019-03-12 比亚迪股份有限公司 The control method and device of camera
CN110753187A (en) * 2019-10-31 2020-02-04 芋头科技(杭州)有限公司 Camera control method and device
CN111124224B (en) * 2019-12-12 2021-08-10 维沃移动通信有限公司 Application program control method and electronic equipment
CN111124224A (en) * 2019-12-12 2020-05-08 维沃移动通信有限公司 Application program control method and electronic equipment
CN113556479A (en) * 2020-09-02 2021-10-26 华为技术有限公司 Method for sharing camera by multiple applications and electronic equipment
WO2022048474A1 (en) * 2020-09-02 2022-03-10 华为技术有限公司 Method for multiple applications to share camera, and electronic device
CN112685099A (en) * 2020-12-31 2021-04-20 联想(北京)有限公司 Processing method and device
CN113259696A (en) * 2021-05-11 2021-08-13 西安万像电子科技有限公司 Live broadcast method and device, storage medium and electronic equipment
CN113489898A (en) * 2021-06-29 2021-10-08 广州小鹏汽车科技有限公司 Camera calling method and device, vehicle and storage medium
CN113489898B (en) * 2021-06-29 2023-10-31 广州小鹏汽车科技有限公司 Camera calling method, device, vehicle and storage medium
CN113596328A (en) * 2021-07-23 2021-11-02 北京字节跳动网络技术有限公司 Camera calling method and device and electronic equipment
CN113596328B (en) * 2021-07-23 2023-02-24 北京字节跳动网络技术有限公司 Camera calling method and device and electronic equipment
CN114205529A (en) * 2021-12-20 2022-03-18 北京鸿合爱学教育科技有限公司 Single-camera calling method and device, terminal and readable storage medium

Similar Documents

Publication Publication Date Title
CN106791356A (en) For the method and device of camera data distribution
CN110377413A (en) Based on the distributed task scheduling asynchronous schedule of BPMN standard and the system of monitoring
CN109828960A (en) Log library expansion method, system, computer installation and readable storage medium storing program for executing
US11863842B2 (en) Method and apparatus for processing audio and video, electronic device and storage medium
CN106921721A (en) A kind of server, conversation managing method and system
CN107295031A (en) A kind of method of data synchronization and device
CN105988886B (en) Fault handling method and device during a kind of O&M
CN103577273A (en) Second failure data capture in co-operating multi-image systems
CN108762757A (en) Direct broadcasting room platform service Quick Development Framework and method, server and medium
WO2021043066A1 (en) Communication method and apparatus for multiple management domains
CN109768962A (en) Firewall strategy-generating method, device, computer equipment and storage medium
CN105824707A (en) Merging back-source method and device for multiple processes of streaming media service
US10587553B1 (en) Methods and systems to support adaptive multi-participant thread monitoring
Manunza et al. Kerberos: A real-time fraud detection system for IMS-enabled VoIP networks
US20190387235A1 (en) Audio and video multimedia modification and presentation
CN109743367A (en) Service processing method, device, electronic equipment and readable storage medium storing program for executing
CN111179299A (en) Image processing method and device
CN109413340A (en) A kind of processing method and processing device generating photograph album
Shehata et al. A taxonomy for identifying requirement interactions in software systems
CN107547437A (en) Application and identification method and device
US10440175B1 (en) Dynamic controlled-environment facility resident communication allocation based on call volume
CN113556585A (en) Video stream limiting method and device
KR20170131007A (en) Apparatus for monitoring communication based on data distribution service
US20190318496A1 (en) Preventing intrusion during video recording or streaming
CN109325789A (en) The put-on method and device of business object

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531

RJ01 Rejection of invention patent application after publication