[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106161938B - A kind of flash lamp deployment method and device - Google Patents

A kind of flash lamp deployment method and device Download PDF

Info

Publication number
CN106161938B
CN106161938B CN201610584742.2A CN201610584742A CN106161938B CN 106161938 B CN106161938 B CN 106161938B CN 201610584742 A CN201610584742 A CN 201610584742A CN 106161938 B CN106161938 B CN 106161938B
Authority
CN
China
Prior art keywords
flash lamp
application
mode
current
open
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.)
Active
Application number
CN201610584742.2A
Other languages
Chinese (zh)
Other versions
CN106161938A (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.)
Sichuan sac Communication Technology Co., Ltd.
Yibin Chen'an Intelligent Manufacturing Co., Ltd.
Original Assignee
Shenzhen Tinno Wireless 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 Shenzhen Tinno Wireless Technology Co Ltd filed Critical Shenzhen Tinno Wireless Technology Co Ltd
Priority to CN201610584742.2A priority Critical patent/CN106161938B/en
Publication of CN106161938A publication Critical patent/CN106161938A/en
Application granted granted Critical
Publication of CN106161938B publication Critical patent/CN106161938B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)
  • Lighting Device Outwards From Vehicle And Optical Signal (AREA)
  • Telephone Function (AREA)

Abstract

The present invention provides a kind of flash lamp deployment method and device.Wherein, this method comprises: receiving the opening flash lamp application that current application is initiated, the application includes the mode that flash-mode is opened in the current application application;According to the present mode of the current state of flash lamp and flash lamp, it is determined whether open flash lamp for current application;The present mode of flash lamp is the mode that formerly flash lamp is opened in application;The state of the flash lamp includes opening and closing;When the current state of flash lamp is to open and be determined as current application to open flash lamp, flash lamp is closed for formerly application and notifies formerly application;When being determined as current application opening flash lamp, flash lamp is opened according to the application of current application, and the present mode of flash lamp is updated to the mode that flash lamp is opened in current application application, notify the opening result of current application flash lamp.Since the present invention considers the mode using application opening flash lamp when opening flash lamp, the purpose of the reasonable distribution flash lamp right to use is realized.

Description

A kind of flash lamp deployment method and device
Technical field
The present invention relates to electronic technology more particularly to a kind of flash lamp deployment methods and device.
Background technique
Most of smart machine is equipped with flash lamp.With the configuration of flash lamp, occur a large amount of with flash lamp Using for example, the flashlight application for being used to illuminate, the camera applications for reaching using flash lamp light filling purpose etc..Currently, flash lamp There are two types of unfolding modes: can be preempted formula and exclusive formula.The so-called formula that can be preempted refers to that the rear application for opening flash lamp has There is priority, the right to use for occupying flash application is seized in the rear application for opening flash lamp, and answering for flash lamp is used With the use that can be discharged automatically to flash lamp.That is, flash lamp can be other when formerly flash lamp is opened in application Using seizing, flash lamp is preempted rear formerly using the use abandoned automatically to flash lamp.And exclusive formula refers to, first opens flash of light The application of lamp has priority, and before discharging the flash lamp right to use, other application is the right to use that can not apply to flash lamp.
For each application using flash lamp, the unfolding mode of flash lamp is not only unification, and in terminal It is had determined that before factory.That is, each application using flash lamp on smart machine, the mode for opening flash lamp is all one Sample or be all exclusive formula or be all preemptive type.Therefore, the existing method for opening flash lamp, does not account for the need of application It asks, the mode for opening flash lamp is unreasonable.
Summary of the invention
It is an object of the present invention to propose one aiming at the problem that right to use unreasonable distribution of flash lamp in the prior art Kind flash lamp deployment method and device consider the mode for opening flash lamp using application when opening flash lamp, realize The purpose of the reasonable distribution flash lamp right to use.
To achieve the above object, flash lamp deployment method provided by the invention includes:
The opening flash lamp application that current application is initiated is received, the application includes that flash of light is opened in the current application application The mode of formula;
According to the present mode of the current state of flash lamp and flash lamp, it is determined whether open flash of light for the current application Lamp;The present mode of the flash lamp is the mode that formerly flash lamp is opened in application;The state of the flash lamp include open and It closes;
When the current state of the flash lamp is to open and be determined as the current application to open flash lamp, formerly to answer With closing flash lamp and notify formerly application;
When being determined as current application opening flash lamp, flash lamp is opened according to the application of current application, and will dodge The present mode of light lamp is updated to the mode that flash lamp is opened in the current application application, notifies the current application flash lamp Open result.
Further, described according to the current state of flash lamp and the present mode of flash lamp, it is determined whether to work as to be described Flash lamp is opened in preceding application, comprising:
It is to close or when the present mode of flash lamp is not exclusive formula, be determined as described current in the current state of flash lamp Using opening flash lamp;
It is to open and when the present mode of flash lamp is exclusive formula in the current state of flash lamp, determination cannot work as to be described Flash lamp is opened in preceding application.
Further, if the present mode of flash lamp, which is, allows interim preemptive type, flash of light is closed for formerly application described Lamp simultaneously notifies after formerly applying, further includes:
Save the information before flash lamp is closed;
The present mode of flash lamp is updated to after the mode that flash lamp is opened in the current application application, further includes:
After the current application is discharged to the use of flash lamp, flash of light is opened according to the flashlight information being previously saved Lamp, and notify the first opening result using flash lamp.
Further, if the present mode of flash lamp is to allow interim preemptive type, the current state according to flash lamp With the present mode of flash lamp, it is determined whether open flash lamp for the current application, further includes:
The current state of flash lamp be open, the present mode of flash lamp allows interim preemptive type and temporarily seizes When nesting is identified as zero, it is determined as the current application and opens flash lamp, and the nested mark temporarily seized is added One operation;The initial value of the nested mark temporarily seized is zero;
The current state of flash lamp be open, the present mode of flash lamp is to allow interim preemptive type and described temporarily rob The nested mark accounted for is equal to for the moment, determines and does not open flash lamp for the current application.
To achieve the above object, flash lamp device for opening provided by the invention includes:
Receiving module, for receiving the opening flash lamp application of current application initiation, the application is currently answered including described The mode of flash-mode is opened with application;
Determining module, for according to the current state of flash lamp and the present mode of flash lamp, it is determined whether work as to be described Flash lamp is opened in preceding application;The present mode of the flash lamp is the mode that formerly flash lamp is opened in application;The flash lamp State includes opening and closing;
Closedown module is opened for determining the current state of the flash lamp in the determining module and is determined as described When current application opens flash lamp, flash lamp is closed for formerly application and notifies formerly application;
Module is opened, for when the determining module is determined as current application and opens flash lamp, according to currently answering Flash lamp is opened in application, and the present mode of flash lamp is updated to the side that flash lamp is opened in the current application application Formula notifies the opening result of the current application flash lamp.
Further, the determining module specifically: in the current mould that the current state of flash lamp is closing or flash lamp When formula is not exclusive formula, it is determined as the current application and opens flash lamp;It is opening and flash lamp in the current state of flash lamp Present mode when being exclusive formula, determination cannot open flash lamp for the current application.
Further, described device further include:
Recovery module, if the present mode for flash lamp is to allow interim contention mode, the closedown module be After first application closes flash lamp and notifies formerly application, the information before flash lamp is closed is saved;It will be dodged in the opening module The present mode of light lamp is updated to after the mode that flash lamp is opened in the current application application, is discharged in current application to flash of light After the use of lamp, flash lamp is opened according to the flashlight information being previously saved, and notifies the opening result for formerly applying flash lamp.
Further, the determining module, is also used to: in the current mould that the current state of flash lamp is opening, flash lamp Formula is to allow interim preemptive type and when the nesting temporarily seized is identified as zero, is determined as the current application and opens flash lamp, and The nested mark temporarily seized is carried out plus one operates;The initial value of the nested mark temporarily seized is zero;It is dodging The current state of light lamp be open, the present mode of flash lamp is to allow interim preemptive type and the nested mark temporarily seized Equal to for the moment, determining flash lamp is not opened for the current application.
It include that application application is opened in application when opening flash lamp using application in technical solution provided by the invention The mode of flash-mode.Flash lamp management service opens the mode of flash lamp according to the current state and formerly application of flash lamp, really After being set to using flash lamp is opened, the present mode of flash lamp is updated to the mode that flash lamp is opened in application application, so as to According to the present mode of flash lamp when flash lamp is opened in the application, if flash lamp is opened in other application application, it is determined whether Flash lamp is opened for other application.Since the present invention considers the side using application opening flash lamp when opening flash lamp Formula realizes the purpose of the reasonable distribution flash lamp right to use.
Detailed description of the invention
Figure 1A is the frame diagram provided by the invention using flash lamp;
Figure 1B is a kind of flash lamp deployment method flow chart provided by the invention;
Fig. 2 is another flash lamp deployment method flow chart provided by the invention;
Fig. 3 is a kind of Session data structure provided by the invention and Session stack schematic diagram;
Fig. 4 is a kind of flash lamp device for opening structural schematic diagram provided by the invention;
Fig. 5 is another flash lamp device for opening structural schematic diagram provided by the invention.
Specific embodiment
As shown in Figure 1A, flash lamp management service (Flash Manager Service) is added between flash lamp and application, Each application carries out the operation of flash lamp by flash lamp management service, and applies for opening the application and sudden strain of a muscle of flash lamp Light lamp tube reason service interacts formula communication to obtain using the mode for opening flash lamp.
Figure 1B is a kind of flash lamp deployment method flow chart provided by the invention.As shown in Figure 1B, provided in this embodiment Method includes:
Step 101: flash lamp management service receives the opening flash lamp application that current application is initiated, and the application includes institute State the mode that flash-mode is opened in current application application;
The unfolding mode of flash lamp in the present invention specifically can pass through application by user by application application unfolding mode The user interface of offer selects flash lamp unfolding mode, is also possible to the operating system of smart machine according to the priority thing of application First determine flash lamp unfolding mode.The mode that flash-mode is opened in current application application can be exclusive formula and be also possible to be robbed Account for formula.
Step 102: flash lamp management service is according to the current state of flash lamp and the present mode of flash lamp, it is determined whether Flash lamp is opened for the current application;The present mode of the flash lamp is the mode that formerly flash lamp is opened in application;
The state of flash lamp includes opening and closing.The current state of flash lamp refers to that flash lamp is opened in current application application When, the state of flash lamp, that is, flash lamp is in close state or opening state.The mode of flash lamp includes that can be preempted Formula and exclusive formula.The present mode of flash lamp is the mode that formerly flash lamp is opened in application.Previous utilization, which refers to, has opened flash of light The application of lamp.
If the current state of flash lamp is to close, flash lamp management service is determined as current application and opens flash of light Lamp.If the current state of flash lamp is to open, and the present mode of flash lamp is not exclusive formula, then flash lamp management takes Business is determined as current application and opens flash lamp.For example, the current state of flash lamp is to open, and the present mode of flash lamp is It can be preempted formula, then flash lamp management service, which is determined as current application, opens flash lamp.It is in the open state in flash lamp And the present mode of flash lamp is when monopolizing formula, determination cannot open flash lamp for the current application.
Optionally, invention increases a kind of new flash lamp unfolding modes: allowing interim preemptive type.Using temporarily to rob When accounting for formula opening flash lamp, in flash lamp, flash lamp can be seized by other application in the open state, and other application uses After complete flash lamp, flash lamp management service is that flash lamp is opened in first application again, i.e., distributes to the flash lamp right to use formerly Using.Therefore, be in the current state of flash lamp open and when the present mode of flash lamp is to allow interim contention mode, then Flash lamp management service is determined as current application and opens flash lamp.
Step 103: when being determined as the current state of current application opening flash lamp and flash lamp to open, flash lamp tube Reason service closes flash lamp for formerly application and notifies formerly application;
When being determined as the current state of current application opening flash lamp and flash lamp to close, flash lamp management service is straight It connects and executes step 104, do not need to execute step 103.
Step 104: flash lamp management service is when being determined as current application opening flash lamp, according to current application Flash lamp is opened in application, and the present mode of flash lamp is updated to the mode that flash lamp is opened in the current application application, is led to Know the opening result of the current application flash lamp.
When being determined as current application opening flash lamp, no matter the current state of flash lamp is to open or close, it is both needed to Step 104 is executed, it is, flash lamp management service opens flash lamp, and working as flash lamp according to the application of current application Premode is updated to the mode that flash lamp is opened in the current application application, notifies the opening knot of the current application flash lamp Fruit.
Optionally, if the present mode of flash lamp, which is, allows interim preemptive type, flash lamp is closed for formerly application described And after notifying formerly application, i.e., after step 103 further include: save the information before flash lamp is closed;By the current of flash lamp Schema update is opened for the current application application after the mode of flash lamp, further includes: discharges in current application to flash lamp Use after, flash lamp is opened according to the flashlight information that is previously saved, and notify the opening result for formerly applying flash lamp.
Specifically, if the current state of flash lamp is to open and the present mode of flash lamp is to allow interim preemptive type, Flash lamp management service is that flash lamp is closed in the first application, while saving the information before flash lamp is closed, and notify first Using there is the application of new opening flash lamp to arrive, flash lamp is opened according to the application of current application, by the current mould of flash lamp Formula is updated to the current application application and opens the mode of flash lamp, and notifies the opening of current application flash lamp as a result, working as After preceding application release is to the use of flash lamp, flash lamp is opened according to the flashlight information being previously saved, and notify formerly application The opening result of flash lamp.
Flash lamp deployment method provided by the invention is applied when opening flash lamp to flash lamp management service request, It include the mode that flash-mode is opened using application in application.Flash lamp management service is answered according to the current state of flash lamp and formerly With the mode for opening flash lamp, after being determined as using flash lamp is opened, the present mode of flash lamp is updated to application application Open flash lamp mode, if so as to this application open flash lamp when other application application open flash lamp when according to flash of light The present mode of lamp, it is determined whether open flash lamp for other application.It is answered since the present invention is considered when opening flash lamp The mode that flash lamp is opened with application, realizes the purpose of the reasonable distribution flash lamp right to use.
Fig. 2 is another flash lamp deployment method flow chart provided by the invention.As shown in Fig. 2, provided in this embodiment Method includes:
Step 201: flash lamp management service receives the opening flash lamp application that current application is initiated, and the application includes institute State the mode that flash-mode is opened in current application application;
Step 202: flash lamp management service judges whether the current state of flash lamp is closing, if so, executing step 203, otherwise, execute step 204.
Step 203: flash lamp management service opens flash lamp according to the application of current application, and by the current mould of flash lamp Formula is updated to the mode that flash lamp is opened in the current application application, notifies the opening result of the current application flash lamp.
Step 204: the current state of flash lamp is to open and the present mode of flash lamp is that can be preempted formula, flash lamp Management service is that formerly application closes flash lamp and notifies formerly application, executes step 203 later.
Step 205: the current state of flash lamp is to open and the present mode of flash lamp is to allow interim preemptive type, flash of light Lamp management service is that flash lamp is closed in the first application, while saving the information before flash lamp is closed, and notify formerly application There is the application of new opening flash lamp to arrive, flash lamp is opened according to the application of current application, more by the present mode of flash lamp The mode of flash lamp is newly opened for the current application application, and notifies the opening of current application flash lamp as a result, answering currently It is that flash lamp is opened in formerly application, and notice exists according to the flashlight information being previously saved after discharging to the use of flash lamp First apply the opening result of flash lamp.
For example, camera applications are beaten in application if flashlight is applied to allow temporarily to be preempted formula application and open flash lamp When opening flash lamp, flash lamp management service is that flash lamp is closed in flashlight application, and saves the information before flash lamp is closed, notice Flashlight application has new being applied to carry out i.e. camera applications arrival, then flash lamp is opened for camera applications, by working as flash lamp Premode is updated to the mode that flash lamp is opened in camera applications application, after camera applications are discharged to the use of flash lamp, according to The flashlight information being previously saved is that flash lamp is opened in flashlight application, and notifies the opening result of flashlight application flash lamp. Following scene may be implemented: user opens flashlight application at night, it is seen that relatively good night scene is needed to be opened using camera and be glistened Lamp is shot, and user wishes to continue to use flashlight lighting after having shot.
Step 206: the present mode of flash lamp is exclusive formula, and flash lamp management Service Notification current application cannot open sudden strain of a muscle Light lamp.
For allowing interim preemptive type, single-stage can be taken nested or multistage nested mode.So-called single-stage is nested, refers to Be only to allow to seize primary, the application of the flash lamp right to use by seizing other application, dodged even if the application application is opened The mode of light lamp is interim contention mode, also no longer other application is allowed to open flash lamp.It is multistage nested, it refers to allowing to glisten Lamp is repeatedly seized, as long as the mode of application application flash lamp is to allow interim preemptive type, then regardless of whether the application is logical The flash lamp for seizing other application opening is crossed, flash lamp can be seized by other application.And multistage nested then complexity is more, tool Body can be achieved the goal by stack operation.Whenever an application is with interim preemptive type application flash lamp, as shown in figure 3, flash lamp Management service is the data structure of one entitled Session of type of the application distribution, for saving the current data of flash lamp i.e. Flash lamp close before information, job information including flash lamp and the communication interface to interact with the application.When have other application come When seizing flash lamp, then by the Session data structure stacking, and so on;And when the right to use using release to flash lamp When, then the Session data structure is popped, and is that flash of light is opened in application according to the data in the Session data structure popped Lamp, and notify the opening result of associated application flash lamp.
The current state of flash lamp is to open and the present mode of flash lamp is when allowing interim preemptive type, allow it is multistage Under nested mode, flash lamp management service is the first application closing flash lamp, while to the information before flash lamp closing It carries out stack-incoming operation and is stored in stack top, and the application for notifying formerly application to have new opening flash lamp arrives, according to current application Application open flash lamp, the present mode of flash lamp is updated to the mode that flash lamp is opened in the current application application, and It notifies opening as a result, after current application is discharged to the use of flash lamp for current application flash lamp, carries out Pop operations, according to The information popped opens flash lamp, and notifies the opening result for formerly applying flash lamp.
Under the mode for allowing single-stage nesting, the nesting currently temporarily seized need to be identified by the nested mark temporarily seized Rank can set zero for the initial value for the nested mark temporarily seized, temporarily be seized primary then embedding by what is temporarily seized Set mark increases by one, if the nested mark temporarily seized be equal to first show flash lamp temporarily seized it is primary, at this time its Its application cannot be seized temporarily again.The current state of flash lamp be open, the present mode of flash lamp be allow it is interim When preemptive type, it is determined whether the method for opening flash lamp for current application is as follows:
The current state of flash lamp be open, the present mode of flash lamp allows interim preemptive type and temporarily seizes When nesting is identified as zero, it is determined as the current application and opens flash lamp, and the nested mark temporarily seized is added One operation;The current state of flash lamp be open, the present mode of flash lamp is to allow interim preemptive type and described temporarily rob The nested mark accounted for is equal to for the moment, determines and does not open flash lamp for the current application.
Flash lamp deployment method provided by the embodiment, current application can select suitably when applying for the flash lamp right to use Unfolding mode, can choose allows single-stage or the multistage nested mode temporarily seized to need basis when rear application is opened and glistened The unfolding mode of current application determines whether to open flash lamp, and opens the process of flashing light.It is every compared with the existing technology A application is all compared using unified unfolding mode, is reasonably assigned with the right to use of flash lamp, multiple applications are total to Enjoy flash lamp.
Fig. 4 is a kind of flash lamp device for opening structural schematic diagram provided by the invention.As shown in figure 4, the present embodiment provides Device include: receiving module 41, determining module 42, closedown module 43 and open module 44.
Receiving module 41, for receiving the opening flash lamp application of current application initiation, the application includes described current The mode of flash-mode is opened using application;
Determining module 42, for according to the current state of flash lamp and the present mode of flash lamp, it is determined whether be described Current application opens flash lamp;The present mode of the flash lamp is the mode that formerly flash lamp is opened in application;The flash lamp State include open and close;
Further, the determining module specifically: in the current mould that the current state of flash lamp is closing or flash lamp When formula is not exclusive formula, it is determined as the current application and opens flash lamp;It is opening and flash lamp in the current state of flash lamp Present mode when being exclusive formula, determination cannot open flash lamp for the current application.
Closedown module 43 is to open and be determined as the current application to open sudden strain of a muscle for the current state in the flash lamp When light lamp, flash lamp is closed for formerly application and notifies formerly application;
Module 44 is opened, for being beaten according to the application of current application when being determined as current application opening flash lamp Flash lamp is opened, and the present mode of flash lamp is updated to the mode of the current application application opening flash lamp, described in notice The opening result of current application flash lamp.
Flash lamp device for opening provided by the invention is applied when flash lamp is opened in application, includes applying Shen in application It please open the mode of flash-mode.Flash lamp management service opens the side of flash lamp according to the current state and formerly application of flash lamp The present mode of flash lamp after being determined as using flash lamp is opened, is updated to the mode that flash lamp is opened in application application by formula, If determined so as to present mode when flash lamp is opened in other application application when flash lamp is opened in the application according to flash lamp It whether is that other application opens flash lamp.Flash lamp is opened using application since the present invention is considered when opening flash lamp Mode realizes the purpose of the reasonable distribution flash lamp right to use.
The present invention increases the new flash lamp unfolding mode of one kind on the basis of existing technology allows interim preemptive type. When using opening flash lamp with interim preemptive type, in flash lamp, flash lamp can be seized by other application in the open state, After other application has used flash lamp, flash lamp management service is that flash lamp is opened in first application again, i.e., uses flash lamp Power distributes to first application.As shown in figure 5, device provided by the invention further includes recovery module 45.
Recovery module 45, if the present mode for flash lamp is in the closedown module to allow interim contention mode After formerly application closes flash lamp and notifies formerly application, the information before flash lamp is closed is saved;It is incited somebody to action in the opening module The present mode of flash lamp is updated to after the mode that flash lamp is opened in the current application application, is discharged in current application to sudden strain of a muscle After the use of light lamp, flash lamp is opened according to the flashlight information being previously saved, and notifies the opening knot for formerly applying flash lamp Fruit.
For allowing interim preemptive type, single-stage can be taken nested or multistage nested mode.So-called single-stage is nested, refers to Be only to allow to seize primary, the application of the flash lamp right to use by seizing other application, dodged even if the application application is opened The mode of light lamp is interim contention mode, also no longer other application is allowed to open flash lamp.It is multistage nested, it refers to allowing to glisten Lamp is repeatedly seized, as long as the mode of application application flash lamp is to allow interim preemptive type, then regardless of whether the application is logical The flash lamp for seizing other application opening is crossed, flash lamp can be seized by other application.
The present mode of flash lamp is to allow interim preemptive type, in the case where allowing multistage nested mode, if flash lamp Current state is to open, and closedown module 43 is that flash lamp is closed in the first application, at the same the information before being closed to flash lamp into Row stack-incoming operation is stored in stack top, and the application for notifying formerly application to have new opening flash lamp arrives, and opens 44 basis of module Flash lamp is opened in the application of current application, and the present mode of flash lamp is updated to the current application application and opens flash lamp Mode, and notify current application flash lamp opening as a result, recovery module 45 current application discharge to the use of flash lamp after, Pop operations are carried out, flash lamp is opened according to the information popped, and notify the opening result for formerly applying flash lamp.
When allowing single-stage nesting, the nested rank currently temporarily seized need to be identified by the nested mark temporarily seized, Zero can be set by the initial value for the nested mark temporarily seized, temporarily be seized the primary nesting that then will temporarily seize and identified Increase by one, if first the nested mark temporarily seized, which is equal to, shows that flash lamp has temporarily been seized primary, other application at this time It cannot temporarily be seized again.Therefore, the determining module 42, is also used to: being opening, flash lamp in the current state of flash lamp Present mode be to allow interim preemptive type and when the nesting temporarily seized is identified as zero, be determined as the current application and open to dodge Light lamp, and the nested mark temporarily seized is carried out adding an operation;The initial value of the nested mark temporarily seized is Zero;The current state of flash lamp be open, the present mode of flash lamp allows interim preemptive type and described temporarily seizes Nesting mark is equal to for the moment, determines and does not open flash lamp for the current application.
Flash lamp device for opening provided by the embodiment, current application can select suitably when applying for the flash lamp right to use Unfolding mode, can choose allows single-stage or the multistage nested mode temporarily seized to need basis when rear application is opened and glistened The unfolding mode of current application determines whether to open flash lamp, and opens the process of flashing light.It is every compared with the existing technology A application is all compared using unified unfolding mode, is reasonably assigned with the right to use of flash lamp, multiple applications are total to Enjoy flash lamp.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (6)

1. a kind of flash lamp deployment method characterized by comprising
The opening flash lamp application that current application is initiated is received, the application includes that flash-mode is opened in the current application application Mode;
According to the present mode of the current state of flash lamp and flash lamp, it is determined whether open flash lamp for the current application; The present mode of the flash lamp is the mode that formerly flash lamp is opened in application;The state of the flash lamp includes beating on and off It closes;
When the current state of the flash lamp is to open and be determined as the current application to open flash lamp, closed for formerly application It closes flash lamp and notifies formerly application;
When being determined as current application and opening flash lamp, flash lamp is opened according to the application of current application, and by flash lamp Present mode be updated to the mode that flash lamp is opened in the current application application, notify the opening of the current application flash lamp As a result;
If the present mode of flash lamp is the interim preemptive type of permission, formerly answered to be first using closing flash lamp and notice described With later, further includes:
Save the information before flash lamp is closed;
The present mode of flash lamp is updated to after the mode that flash lamp is opened in the current application application, further includes:
After the current application is discharged to the use of flash lamp, flash lamp is opened according to the flashlight information being previously saved, and Notify the first opening result using flash lamp.
2. the method according to claim 1, wherein described according to the current state of flash lamp and working as flash lamp Premode, it is determined whether open flash lamp for the current application, comprising:
It is to close or when the present mode of flash lamp is not exclusive formula, be determined as the current application in the current state of flash lamp Open flash lamp;
It is to open and when the present mode of flash lamp is exclusive formula in the current state of flash lamp, determination cannot currently answer to be described With opening flash lamp.
3. method according to claim 1 or 2, which is characterized in that the current state and flash lamp according to flash lamp Present mode, it is determined whether for the current application open flash lamp, further includes:
The current state of flash lamp be open, the present mode of flash lamp is the nesting for allowing interim preemptive type and temporarily seizing When being identified as zero, it is determined as the current application and opens flash lamp, and the nested mark temporarily seized is carried out adding a behaviour Make;The initial value of the nested mark temporarily seized is zero;
The current state of flash lamp be open, the present mode of flash lamp allows interim preemptive type and described temporarily seizes Nesting mark is equal to for the moment, determines and does not open flash lamp for the current application.
4. a kind of flash lamp device for opening characterized by comprising
Receiving module, for receiving the opening flash lamp application of current application initiation, the application includes the current application Shen It please open the mode of flash-mode;
Determining module, for according to the current state of flash lamp and the present mode of flash lamp, it is determined whether currently answered to be described With opening flash lamp;The present mode of the flash lamp is the mode that formerly flash lamp is opened in application;The state of the flash lamp Including opening and closing;
Closedown module is opened for determining the current state of the flash lamp in the determining module and is determined as described current When using opening flash lamp, flash lamp is closed for formerly application and notifies formerly application;
Open module, in the case that the determining module be determined as current application open flash lamp, according to current application Flash lamp is opened in application, and the present mode of flash lamp is updated to the mode that flash lamp is opened in the current application application, is led to Know the opening result of the current application flash lamp;
The flash lamp device for opening further include:
Recovery module is formerly to answer in the closedown module if the present mode for flash lamp is to allow interim contention mode After closing flash lamp and notifying formerly application, the information before flash lamp is closed is saved;In the opening module by flash lamp Present mode be updated to after the mode that flash lamp is opened in the current application application, discharge in current application to flash lamp After use, flash lamp is opened according to the flashlight information being previously saved, and notifies the opening result for formerly applying flash lamp.
5. device according to claim 4, which is characterized in that the determining module specifically: in the current shape of flash lamp State is to close or when the present mode of flash lamp is not exclusive formula, be determined as the current application and open flash lamp;In flash lamp Current state be to open and when the present mode of flash lamp is exclusive formula, determination cannot open flash of light for the current application Lamp.
6. device according to claim 4 or 5, which is characterized in that the determining module is also used to: in working as flash lamp Preceding state be open, the present mode of flash lamp is to allow interim preemptive type and when the nesting temporarily seized is identified as zero, determine Flash lamp is opened for the current application, and the nested mark temporarily seized is carried out adding an operation;It is described temporarily to seize The initial value of nested mark be zero;The current state of flash lamp be open, the present mode of flash lamp is to allow temporarily to rob It accounts for formula and the nested mark temporarily seized is equal to for the moment, determine and do not open flash lamp for the current application.
CN201610584742.2A 2016-07-22 2016-07-22 A kind of flash lamp deployment method and device Active CN106161938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610584742.2A CN106161938B (en) 2016-07-22 2016-07-22 A kind of flash lamp deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610584742.2A CN106161938B (en) 2016-07-22 2016-07-22 A kind of flash lamp deployment method and device

Publications (2)

Publication Number Publication Date
CN106161938A CN106161938A (en) 2016-11-23
CN106161938B true CN106161938B (en) 2019-05-14

Family

ID=58060457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610584742.2A Active CN106161938B (en) 2016-07-22 2016-07-22 A kind of flash lamp deployment method and device

Country Status (1)

Country Link
CN (1) CN106161938B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650411B (en) * 2018-04-23 2020-11-06 Oppo广东移动通信有限公司 Flash lamp control method, terminal and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677848A (en) * 2013-12-27 2014-03-26 厦门雅迅网络股份有限公司 Camera control method based on Android
CN103995787A (en) * 2014-05-15 2014-08-20 Tcl集团股份有限公司 Regulation and control method and device for camera applications
EP2713606A3 (en) * 2012-09-28 2014-09-17 Samsung Electronics Co., Ltd Method for controlling camera and mobile device
CN104125221A (en) * 2014-07-17 2014-10-29 东北大学 IMS (IP (Internet Protocol) multimedia subsystem) terminal equipment multiple soft-terminal resource sharing and application collaborative device and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294553A (en) * 2012-02-24 2013-09-11 中兴通讯股份有限公司 Method and device for managing multimedia resources of mobile terminal
WO2013171362A1 (en) * 2012-05-16 2013-11-21 Nokia Corporation Method in a processor, an apparatus and a computer program product

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2713606A3 (en) * 2012-09-28 2014-09-17 Samsung Electronics Co., Ltd Method for controlling camera and mobile device
CN103677848A (en) * 2013-12-27 2014-03-26 厦门雅迅网络股份有限公司 Camera control method based on Android
CN103995787A (en) * 2014-05-15 2014-08-20 Tcl集团股份有限公司 Regulation and control method and device for camera applications
CN104125221A (en) * 2014-07-17 2014-10-29 东北大学 IMS (IP (Internet Protocol) multimedia subsystem) terminal equipment multiple soft-terminal resource sharing and application collaborative device and method

Also Published As

Publication number Publication date
CN106161938A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
CN110300461A (en) A kind of method for connecting network, device and terminal
CN101159747B (en) TCP concurrency multilink based communication system and method therefor
CN109117270A (en) The method for improving network packet treatment effeciency
CN110203783A (en) Call method and device for robot
CN108377671A (en) Handle the method and computer equipment of message
CN105893320B (en) A kind of remote task function calling method of multi-core processor oriented
CN103995787A (en) Regulation and control method and device for camera applications
CN105122930A (en) Method and apparatus for setting up/releasing radio resource control connection between evolved node b and user equipment in communication system
CN106161938B (en) A kind of flash lamp deployment method and device
CN111200541B (en) Network data processing method and device
CN102897613A (en) Elevator intelligent group control system and method
CN109547519A (en) Reverse proxy method, apparatus and computer readable storage medium
CN103384280B (en) A kind of network address conversion port method for managing resource and system
CN109218232A (en) A kind of method that realizing Mux machine, equipment and system
CN110366056A (en) A kind of implementation method, device, equipment and the storage medium of ASON business model
CN108255608A (en) A kind of management method of memory pool
CN103916316A (en) Linear speed capturing method of network data packages
US20120294188A1 (en) Wireless Data Card, Method and System for Communicating between Wireless Data Card and Computer Side
CN106059956A (en) Time queue processing method and device for session of network equipment
CN109661080A (en) A kind of control method and control system of key networking
CN109885385A (en) A kind of autonomic tuning method, device and equipment of application server thread pool
CN102684983A (en) Cell scheduling method and device
CN105430727B (en) A kind of the carrier aggregation mode setting method and communication terminal of communication terminal
CN107888677A (en) A kind of Realization Method of Communication, control terminal, smart machine and system
CN101990215B (en) Resource allocation method and RNC (Radio Network Controller)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190522

Address after: 644005 Suger Intelligent Industrial Base, 31 Gangyuan Road, Lingang District, Yibin City, Sichuan Province

Co-patentee after: Yibin Chen'an Intelligent Manufacturing Co., Ltd.

Patentee after: Sichuan sac Communication Technology Co., Ltd.

Address before: 518053 H3 501B, east industrial area of overseas Chinese town, Nanshan District, Shenzhen, Guangdong

Patentee before: Shenzhen Tinno Wireless Technology Co., Ltd.

TR01 Transfer of patent right