CN106161938A - 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
CN106161938A
CN106161938A CN201610584742.2A CN201610584742A CN106161938A CN 106161938 A CN106161938 A CN 106161938A CN 201610584742 A CN201610584742 A CN 201610584742A CN 106161938 A CN106161938 A CN 106161938A
Authority
CN
China
Prior art keywords
flash lamp
application
mode
open
current application
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.)
Granted
Application number
CN201610584742.2A
Other languages
Chinese (zh)
Other versions
CN106161938B (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, the method includes: receive current application initiation opens flash lamp application, and described application includes that the mode of flash-mode is opened in described current application application;Current state according to flash lamp and the present mode of 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 described flash lamp includes opening and closing;Flash lamp current state for open and be defined as current application open flash lamp time, for formerly apply closedown flash lamp and notify formerly apply;Be defined as in the case of current application opens flash lamp, opening flash lamp according to the application of current application, and the present mode of flash lamp is updated to current application application is opening the mode of flash lamp, notice current application flash lamp open result.The mode of flash lamp is opened, it is achieved that the usufructuary purpose of reasonable distribution flash lamp owing to the present invention take into account application application when opening flash lamp.

Description

A kind of flash lamp deployment method and device
Technical field
The present invention relates to electronic technology, particularly relate to a kind of flash lamp deployment method and device.
Background technology
Major part smart machine is equipped with flash lamp.Along with the configuration of flash lamp, occur in that a large amount of utilization flash lamp Application, such as, the pocket lamp being used for illuminating is applied, is used flash lamp to reach the camera applications etc. of light filling purpose.At present, flash lamp There are two kinds of unfolding mode: formula and exclusive formula can be preempted.What is called can be preempted formula and refer to, after open flash lamp answer apparatus Have priority, after open the application of flash lamp and seize the right to use taking flash application, be currently in use flash lamp should With being automatically releasable the use to flash lamp.The when of it is to say, formerly flash lamp is opened in application, flash lamp can be by other Application is seized, and flash lamp is formerly applied after being preempted and automatically abandoned the use to flash lamp.And the formula of monopolizing refers to, first open flash of light The application of lamp has priority, and before the release flash lamp right to use, other application is to apply for the right to use to flash lamp.
For the application of each use flash lamp, the unfolding mode of flash lamp is not only unified, and in terminal Dispatch from the factory and have determined that before.It is to say, the application of each use flash lamp on smart machine, the mode opening flash lamp is all one Sample, or be all exclusive formula, or it is all preemptive type.Therefore, the existing method opening flash lamp, do not account for the need of application Asking, the mode opening flash lamp is unreasonable.
Summary of the invention
It is an object of the invention to, for the problem of the right to use unreasonable distribution of flash lamp in prior art, propose one Plant flash lamp deployment method and device, take into account application application when opening flash lamp and open the mode of flash lamp, it is achieved that The usufructuary purpose of reasonable distribution flash lamp.
For achieving the above object, the flash lamp deployment method that the present invention provides includes:
Receive current application initiation opens flash lamp application, and described application includes that flash of light is opened in described current application application The mode of formula;
Current state according to flash lamp and the present mode of flash lamp, it is determined whether open flash of light for described current application Lamp;The present mode of described flash lamp is the mode that formerly flash lamp is opened in application;The state of described flash lamp include opening and Close;
Described flash lamp current state for open and be defined as described current application open flash lamp time, for formerly should With closing flash lamp and notifying formerly to apply;
It is being defined as in the case of current application opens flash lamp, is opening flash lamp according to the application of current application, and will dodge The present mode of light modulation is updated to described current application application and opens the mode of flash lamp, notifies described current application flash lamp Open result.
Further, the described current state according to flash lamp and the present mode of flash lamp, it is determined whether work as described Flash lamp is opened in front application, including:
Current state at flash lamp is to close or time the present mode of flash lamp is not exclusive formula, be defined as described currently Flash lamp is opened in application;
Current state at flash lamp be open and the present mode of flash lamp for exclusive formula time, determine and can not work as described Flash lamp is opened in front application.
Further, if the present mode of flash lamp for allow interim preemptive type, described be formerly application close glisten After the formerly application of lamp notice, also include:
Preserve the information before flash lamp is closed;
After the present mode of flash lamp is updated to the mode that flash lamp is opened in described current application application, also include:
After the described current application release use to flash lamp, the flashlight information according to being previously saved opens flash of light Lamp, and formerly apply flash lamp described in notifying open result.
Further, if the present mode of flash lamp is for allowing interim preemptive type, the described current state according to flash lamp Present mode with flash lamp, it is determined whether open flash lamp for described current application, also include:
Current state at flash lamp be open, the present mode of flash lamp allows interim preemptive type and seizes temporarily When nesting is designated zero, it is defined as described current application and opens flash lamp, and the described nested mark temporarily seized is added One operation;The initial value of the described nested mark temporarily seized is zero;
Current state at flash lamp be open, the present mode of flash lamp is to allow interim preemptive type and described rob temporarily The nested mark accounted for, equal to for the moment, determines and does not opens flash lamp for described current application.
For achieving the above object, the flash lamp device for opening that the present invention provides includes:
Receiver module, opens flash lamp application for receive that current application initiates, and described application includes described currently should The mode of flash-mode is opened with application;
Determine module, for the current state according to flash lamp and the present mode of flash lamp, it is determined whether work as described Flash lamp is opened in front application;The present mode of described flash lamp is the mode that formerly flash lamp is opened in application;Described flash lamp State includes opening and closing;
Close module, for determining that module determines that the current state of described flash lamp is for opening and being defined as described described When current application opens flash lamp, for formerly applying closedown flash lamp and notifying formerly to apply;
Open module, for determining that module is defined as in the case of current application opens flash lamp, according to currently should described Application open flash lamp, and the present mode of flash lamp be updated to described current application application open the side of flash lamp Formula, notify described current application flash lamp opens result.
Further, described determine module particularly as follows: the current state of flash lamp be close or flash lamp work as front mould When formula is not exclusive formula, it is defined as described current application and opens flash lamp;In the current state of flash lamp for opening and flash lamp Present mode for exclusive formula time, determine and can not open flash lamp for described current application.
Further, described device also includes:
Recover module, if for flash lamp present mode for allow interim contention mode, described closedown module be After first application is closed flash lamp and notified formerly application, preserve the information before flash lamp is closed;To dodge in described module of opening After the present mode of light modulation is updated to the mode that flash lamp is opened in described current application application, discharge flash of light in current application After the use of lamp, open flash lamp according to the flashlight information being previously saved, and notify formerly application flash lamp open result.
Further, described determine module, be additionally operable to: the current state at flash lamp be open, flash lamp work as front mould When formula is to allow interim preemptive type and the nesting temporarily seized to be designated zero, it is defined as described current application and opens flash lamp, and The described nested mark temporarily seized is added an operation;The initial value of the described nested mark temporarily seized is zero;Dodging The current state of light modulation be open, the present mode of flash lamp is to allow interim preemptive type and the described nested mark temporarily seized Equal to for the moment, determine and do not open flash lamp for described current application.
In the technical scheme that the present invention provides, when flash lamp is opened in application application, include applying application to open in application The mode of flash-mode.Flash lamp management service opens the mode of flash lamp, really according to current state and the formerly application of flash lamp It is set to after application opens flash lamp, the present mode of flash lamp is updated to this application application and opens the mode of flash lamp, in order to The present mode according to flash lamp when if flash lamp is opened in other application application when flash lamp is opened in this application, it is determined whether Flash lamp is opened for other application.The side of flash lamp is opened owing to the present invention take into account application application when opening flash lamp Formula, it is achieved that the usufructuary purpose of reasonable distribution flash lamp.
Accompanying drawing explanation
The frame diagram using flash lamp that Figure 1A provides for the present invention;
A kind of flash lamp deployment method flow chart that Figure 1B provides for the present invention;
The another kind of flash lamp deployment method flow chart that Fig. 2 provides for the present invention;
A kind of Session data structure that Fig. 3 provides for the present invention and Session stack schematic diagram;
A kind of flash lamp device for opening structural representation that Fig. 4 provides for the present invention;
The another kind of flash lamp device for opening structural representation that Fig. 5 provides for the present invention.
Detailed description of the invention
As shown in Figure 1A, between flash lamp and application, add flash lamp management service (Flash Manager Service), The operation of flash lamp is carried out by each application by flash lamp management service, and applies for opening application and the sudden strain of a muscle of flash lamp Light modulation management service interacts formula communication and obtains and apply the mode of flash lamp opened.
A kind of flash lamp deployment method flow chart that Figure 1B provides for the present invention.As shown in Figure 1B, the present embodiment provides Method includes:
Step 101: what flash lamp management service reception current application was initiated opens flash lamp application, and described application includes institute State current application application and open the mode of flash-mode;
The unfolding mode of flash lamp in the present invention, by application application unfolding mode, specifically, can be by user by application The user interface provided selects flash lamp unfolding mode, it is also possible to be the operating system priority thing according to application of smart machine First determine flash lamp unfolding mode.Current application application open the mode of flash-mode can be exclusive formula can also be to be robbed Account for formula.
Step 102: flash lamp management services the current state according to flash lamp and the present mode of flash lamp, it is determined whether Flash lamp is opened for described current application;The present mode of described 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 Time, the state of flash lamp, namely flash lamp is closed or open mode.The pattern of flash lamp includes being preempted Formula and exclusive formula.The present mode of flash lamp is the mode that formerly flash lamp is opened in application.Previous utilization refers to open flash of light The application of lamp.
If the current state of flash lamp is for closing, then flash lamp management service is defined as current application and opens flash of light Lamp.If the current state of flash lamp is for opening, and the present mode of flash lamp is not exclusive formula, then flash lamp management clothes Business is defined as current application and opens flash lamp.Such as, the current state of flash lamp is for opening, and the present mode of flash lamp is Formula can be preempted, then flash lamp management service is defined as current application and opens flash lamp.It is in open mode at flash lamp And the present mode of flash lamp for exclusive formula time, determine and can not open flash lamp for described current application.
Alternatively, invention increases a kind of new flash lamp unfolding mode: allow interim preemptive type.Application is to rob temporarily When the formula of accounting for opens flash lamp, when flash lamp is in open mode, flash lamp can be seized by other application, and other applies use After complete flash lamp, flash lamp management service opens flash lamp for formerly application again, will the flash lamp right to use distribute to formerly Application.Therefore, the current state at flash lamp be open and flash lamp present mode for allow interim contention mode time, then Flash lamp management service is defined as current application and opens flash lamp.
Step 103: when being defined as current application and opening the current state of flash lamp and flash lamp for opening, flash lamp tube Reason service is closed flash lamp for formerly application and notifies formerly to apply;
When being defined as current application and opening the current state of flash lamp and flash lamp for closing, flash lamp management service is straight Connect execution step 104, it is not necessary to perform step 103.
Step 104: flash lamp management service is being defined as in the case of current application opens flash lamp, according to current application Flash lamp is opened in application, and the present mode of flash lamp is updated to described current application application opens the mode of flash lamp, logical That knows described current application flash lamp opens result.
When being defined as current application and opening flash lamp, no matter the current state of flash lamp is opened or closed, it is both needed to Perform step 104, 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 described current application application and opens the mode of flash lamp, and notify described current application flash lamp opens knot Really.
Alternatively, if the present mode of flash lamp for allow interim preemptive type, described be formerly application closedown flash lamp And after notifying formerly application, i.e. also include after step 103: preserve the information before flash lamp is closed;Current by flash lamp After schema update is the mode that flash lamp is opened in described current application application, also include: discharge flash lamp in current application Use after, open flash lamp according to the flashlight information being previously saved, and notify formerly application flash lamp open result.
Specifically, if the current state of flash lamp be open and flash lamp present mode for allow interim preemptive type, Flash lamp management service closes flash lamp for described formerly application, preserves the information before flash lamp is closed simultaneously, and notifies formerly Application has the new application opening flash lamp to arrive, and opens flash lamp according to the application of current application, and flash lamp is worked as front mould Formula is updated to described current application application and opens the mode of flash lamp, and notify current application flash lamp open result, working as After front application release is to the use of flash lamp, opens flash lamp according to the flashlight information being previously saved, and notify formerly to apply Flash lamp open result.
The flash lamp deployment method that the present invention provides, applies when opening flash lamp to flash lamp management service request, Application includes that the mode of flash-mode is opened in application application.Flash lamp management services the current state according to flash lamp and formerly should With opening the mode of flash lamp, it is defined as after application opens flash lamp, the present mode of flash lamp being updated to this application application Open the mode of flash lamp, in order to if according to flash of light when flash lamp is opened in other application application when flash lamp is opened in this application The present mode of lamp, it is determined whether open flash lamp for other application.Answer owing to the present invention take into account when opening flash lamp The mode of flash lamp is opened, it is achieved that the usufructuary purpose of reasonable distribution flash lamp with application.
The another kind of flash lamp deployment method flow chart that Fig. 2 provides for the present invention.As in figure 2 it is shown, what the present embodiment provided Method includes:
Step 201: what flash lamp management service reception current application was initiated opens flash lamp application, and described application includes institute State current application application and open the mode of flash-mode;
Step 202: flash lamp management service judges whether the current state of flash lamp is closedown, if it is, perform step 203, otherwise, perform step 204.
Step 203: flash lamp management service opens flash lamp according to the application of current application, and flash lamp worked as front mould Formula is updated to described current application application and opens the mode of flash lamp, and notify described current application flash lamp opens result.
Step 204: the current state of flash lamp is to open and the present mode of flash lamp is for can be preempted formula, flash lamp Management service is closed flash lamp for formerly application and notifies formerly to apply, and performs step 203 afterwards.
Step 205: the current state of flash lamp be open and flash lamp present mode for allow interim preemptive type, flash of light Fluorescent tube reason service closes flash lamp for described formerly application, preserves the information before flash lamp is closed simultaneously, and notifies formerly to apply There is the new application opening flash lamp to arrive, open flash lamp according to the application of current application, by the present mode of flash lamp more The new mode opening flash lamp for described current application application, and notify the result of opening of current application flash lamp, currently should After the release use to flash lamp, open flash lamp according to the flashlight information being previously saved for formerly application, and notify That first applies flash lamp opens result.
Such as, if pocket lamp application opens flash lamp to allow to be preempted formula application temporarily, camera applications is beaten in application When opening flash lamp, flash lamp management service closes flash lamp for pocket lamp application, and preserves the information before flash lamp is closed, notice Pocket lamp application has the new i.e. camera applications of application arrival to arrive, and then opens flash lamp for camera applications, working as flash lamp Premode is updated to camera applications application and opens the mode of flash lamp, after the camera applications release use to flash lamp, according to The flashlight information being previously saved is that flash lamp is opened in pocket lamp application, and notify pocket lamp application flash lamp open result. Following scene can be realized: user opens pocket lamp application evening, it is seen that reasonable night scene needs to use camera to open flash of light Lamp shoots, and user wishes to be continuing with flashlight lighting after having shot.
Step 206: the present mode of flash lamp is exclusive formula, and flash lamp management Service Notification current application can not open sudden strain of a muscle Light modulation.
For allowing interim preemptive type, can be to take single-stage nested or in the way of multistage nesting.So-called single-stage is nested, refers to Be only to allow to seize once, by seize other application the usufructuary application of flash lamp, even if sudden strain of a muscle is opened in this application application The mode of light modulation is interim contention mode, the most no longer allows other application to open flash lamp.Multistage nesting, refers to allow flash of light Lamp is repeatedly seized, as long as the mode of application application flash lamp is for allowing interim preemptive type, then no matter whether this application is logical Crossing and seize the flash lamp that other application is opened, flash lamp can be seized by other application.Multistage nesting is then complicated many, tool Body can be achieved the goal by stack operation.Whenever an application is with interim preemptive type application flash lamp, as it is shown on figure 3, flash lamp Management service is the data structure of this application one entitled Session of type of distribution, is used for preserving the current data of flash lamp i.e. Information before flash lamp closedown, including job information and the communication interface mutual with application of flash lamp.When there being other should be for When seizing flash lamp, then by stacked, by that analogy for this Session data structure;And when the application release right to use to flash lamp Time, then this 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 associated application flash lamp open result.
The current state of flash lamp be open and flash lamp present mode for allow interim preemptive type time, allow multistage Under nested mode, flash lamp management service closes flash lamp, the information before simultaneously closing flash lamp for described formerly application Carry out stack-incoming operation and be i.e. stored in stack top, and notify that formerly application has the new application opening flash lamp to arrive, according to current application Application open flash lamp, the present mode of flash lamp is updated to described current application application and opens the mode of flash lamp, and Notify current application flash lamp opens result, after the current application release use to flash lamp, carries out Pop operations, according to The information popped opens flash lamp, and notify formerly application flash lamp open result.
Allow under the mode of single-stage nesting, need to identify, by the nesting seized temporarily, the nesting currently temporarily seized Rank, can be set to zero by the initial value of the nested mark seized temporarily, be seized then the most embedding by seize temporarily temporarily Set mark increase by, if the nested mark seized is equal to showing that flash lamp is seized once first temporarily temporarily, now its Its application can not be seized the most temporarily.Current state at flash lamp be open, the present mode of flash lamp be allow interim During preemptive type, it is determined whether the method opening flash lamp for current application is as follows:
Current state at flash lamp be open, the present mode of flash lamp allows interim preemptive type and seizes temporarily When nesting is designated zero, it is defined as described current application and opens flash lamp, and the described nested mark temporarily seized is added One operation;Current state at flash lamp be open, the present mode of flash lamp is to allow interim preemptive type and described rob temporarily The nested mark accounted for, equal to for the moment, determines and does not opens flash lamp for described current application.
The flash lamp deployment method that this enforcement provides, current application can select suitably when applying for the flash lamp right to use Unfolding mode, can select the pattern allowing single-stage or multistage nesting temporarily to seize, when flash of light is opened in rear application, need basis The unfolding mode of current application determines whether to open flash lamp, and opens the process of flashing light.Every relative to prior art Individual application all uses unified unfolding mode to compare, and is reasonably assigned with the right to use of flash lamp so that multiple application can be total to Enjoy flash lamp.
A kind of flash lamp device for opening structural representation that Fig. 4 provides for the present invention.As shown in Figure 4, the present embodiment provides Device include: receiver module 41, determine module 42, close module 43 and open module 44.
Receiver module 41, for receive current application initiate open flash lamp application, described application include described currently The mode of flash-mode is opened in application application;
Determine module 42, for the current state according to flash lamp and the present mode of flash lamp, it is determined whether for described Current application opens flash lamp;The present mode of described flash lamp is the mode that formerly flash lamp is opened in application;Described flash lamp State include open and close;
Further, described determine module particularly as follows: the current state of flash lamp be close or flash lamp work as front mould When formula is not exclusive formula, it is defined as described current application and opens flash lamp;In the current state of flash lamp for opening and flash lamp Present mode for exclusive formula time, determine and can not open flash lamp for described current application.
Close module 43, open sudden strain of a muscle for the current state at described flash lamp for opening and being defined as described current application During light modulation, for formerly applying closedown flash lamp and notifying formerly to apply;
Open module 44, for being defined as in the case of current application opens flash lamp, beat according to the application of current application Opening flash lamp, and the present mode of flash lamp is updated to described current application application opens the mode of flash lamp, notice is described Current application flash lamp open result.
The flash lamp device for opening that the present invention provides, applies when flash lamp is opened in application, includes applying Shen in application Please open the mode of flash-mode.Flash lamp management service opens the side of flash lamp according to current state and the formerly application of flash lamp Formula, is defined as after application opens flash lamp, the present mode of flash lamp being updated to this application application and opening the mode of flash lamp, If so that the present mode according to flash lamp when flash lamp is opened in other application application when flash lamp is opened in this application, determined Whether it is that flash lamp is opened in other application.Flash lamp is opened owing to the present invention take into account application application when opening flash lamp Mode, it is achieved that the usufructuary purpose of reasonable distribution flash lamp.
The present invention adds a kind of new flash lamp unfolding mode on the basis of existing technology and i.e. allows interim preemptive type. When application opens flash lamp with interim preemptive type, when flash lamp is in open mode, flash lamp can be seized by other application, After other application makes to be finished flash lamp, flash lamp management service opens flash lamp for formerly application again, will use by flash lamp Power is distributed to formerly apply.As it is shown in figure 5, the device that the present invention provides also includes recovering module 45.
Recover module 45, if the present mode for flash lamp is the interim contention mode of permission, in described closedown module be After formerly application is closed flash lamp and notified formerly application, preserve the information before flash lamp is closed;Will in described module of opening After the present mode of flash lamp is updated to the mode that flash lamp is opened in described current application application, discharge sudden strain of a muscle in current application After the use of light modulation, open flash lamp according to the flashlight information being previously saved, and notify formerly application flash lamp open knot Really.
For allowing interim preemptive type, can be to take single-stage nested or in the way of multistage nesting.So-called single-stage is nested, refers to Be only to allow to seize once, by seize other application the usufructuary application of flash lamp, even if sudden strain of a muscle is opened in this application application The mode of light modulation is interim contention mode, the most no longer allows other application to open flash lamp.Multistage nesting, refers to allow flash of light Lamp is repeatedly seized, as long as the mode of application application flash lamp is for allowing interim preemptive type, then no matter whether this application is logical Crossing and seize the flash lamp that other application is opened, flash lamp can be seized by other application.
The present mode of flash lamp is for allowing interim preemptive type, under the mode allowing multistage nesting, if flash lamp Current state is for opening, and closing module 43 is that flash lamp is closed in described formerly application, and the information before simultaneously closing flash lamp is entered Row stack-incoming operation is i.e. stored in stack top, and notifies that formerly application has the new application opening flash lamp to arrive, and opens module 44 basis Flash lamp is opened in the application of current application, the present mode of flash lamp is updated to described current application application and opens flash lamp Mode, and notify the result of opening of current application flash lamp, recovers module 45 after the current application release use to flash lamp, Carry out Pop operations, open flash lamp according to the information popped, and notify formerly application flash lamp open result.
When allowing single-stage nesting, need to identify, by the nesting seized temporarily, the nested rank currently temporarily seized, The initial value of the nested mark temporarily seized can be set to zero, be seized the nested mark the most then will temporarily seized temporarily Increase by one, if the nested mark seized is equal to showing that flash lamp is seized once first temporarily temporarily, now other application Can not seize the most temporarily.Therefore, described determine module 42, be additionally operable to: in the current state of flash lamp for opening, flash lamp Present mode when being to allow interim preemptive type and the nesting temporarily seized to be designated zero, be defined as described current application and open sudden strain of a muscle Light modulation, and the described nested mark temporarily seized is added an operation;The initial value of the described nested mark temporarily seized is Zero;Current state at flash lamp be open, the present mode of flash lamp allows interim preemptive type and described seizes temporarily Nested mark, equal to for the moment, determines and does not opens flash lamp for described current application.
The flash lamp device for opening that this enforcement provides, current application can select suitably when applying for the flash lamp right to use Unfolding mode, can select the pattern allowing single-stage or multistage nesting temporarily to seize, when flash of light is opened in rear application, need basis The unfolding mode of current application determines whether to open flash lamp, and opens the process of flashing light.Every relative to prior art Individual application all uses unified unfolding mode to compare, and is reasonably assigned with the right to use of flash lamp so that multiple application can be total to Enjoy flash lamp.
Last it is noted that various embodiments above is only in order to illustrate technical scheme, it is not intended to limit;To the greatest extent The present invention has been described in detail by pipe with reference to foregoing embodiments, it will be understood by those within the art that: it depends on So the technical scheme described in foregoing embodiments can be modified, or the most some or all of technical characteristic is entered Row equivalent;And these amendments or replacement, do not make the essence of appropriate technical solution depart from various embodiments of the present invention technology The scope of scheme.

Claims (8)

1. a flash lamp deployment method, it is characterised in that including:
Receive current application initiation opens flash lamp application, and described application includes that flash-mode is opened in described current application application Mode;
Current state according to flash lamp and the present mode of flash lamp, it is determined whether open flash lamp for described current application; The present mode of described flash lamp is the mode that formerly flash lamp is opened in application;The state of described flash lamp includes beating on an off Close;
Described flash lamp current state for open and be defined as described current application open flash lamp time, for formerly applying pass Close flash lamp and notify formerly to apply;
It is being defined as in the case of current application opens flash lamp, is opening flash lamp according to the application of current application, and by flash lamp Present mode be updated to described current application application and open the mode of flash lamp, notify opening of described current application flash lamp Result.
Method the most according to claim 1, it is characterised in that working as of the described current state according to flash lamp and flash lamp Premode, it is determined whether open flash lamp for described current application, including:
Current state at flash lamp is to close or time the present mode of flash lamp is not exclusive formula, is defined as described current application Open flash lamp;
Current state at flash lamp be open and the present mode of flash lamp for exclusive formula time, determine and can not currently should for described With opening flash lamp.
Method the most according to claim 1 and 2, it is characterised in that if the present mode of flash lamp is for allowing to seize temporarily Formula, described be formerly application close flash lamp and notify formerly apply after, also include:
Preserve the information before flash lamp is closed;
After the present mode of flash lamp is updated to the mode that flash lamp is opened in described current application application, also include:
After the described current application release use to flash lamp, open flash lamp according to the flashlight information being previously saved, and That formerly applies flash lamp described in notice opens result.
Method the most according to claim 3, it is characterised in that working as of the described current state according to flash lamp and flash lamp Premode, it is determined whether open flash lamp for described current application, also include:
Current state at flash lamp be open, the present mode of flash lamp is to allow interim preemptive type and the nesting temporarily seized When being designated zero, it is defined as described current application and opens flash lamp, and the described nested mark temporarily seized is added a behaviour Make;The initial value of the described nested mark temporarily seized is zero;
Current state at flash lamp be open, the present mode of flash lamp allows interim preemptive type and described seizes temporarily Nested mark, equal to for the moment, determines and does not opens flash lamp for described current application.
5. a flash lamp device for opening, it is characterised in that including:
Receiver module, for receive current application initiate open flash lamp application, described application includes described current application Shen Please open the mode of flash-mode;
Determine module, for the current state according to flash lamp and the present mode of flash lamp, it is determined whether currently should for described With opening flash lamp;The present mode of described flash lamp is the mode that formerly flash lamp is opened in application;The state of described flash lamp Including opening and closing;
Close module, for described determine module determine the current state of described flash lamp for open and be defined as described currently When flash lamp is opened in application, for formerly applying closedown flash lamp and notifying formerly to apply;
Open module, for determining that module is defined as in the case of current application opens flash lamp, according to current application described Flash lamp is opened in application, and the present mode of flash lamp is updated to described current application application opens the mode of flash lamp, logical That knows described current application flash lamp opens result.
Device the most according to claim 5, it is characterised in that described determine module particularly as follows: at the current shape of flash lamp State is to close or time the present mode of flash lamp is not exclusive formula, is defined as described current application and opens flash lamp;At flash lamp Current state be open and the present mode of flash lamp for exclusive formula time, determine and can not open flash of light for described current application Lamp.
7. according to the device described in claim 5 or 6, it is characterised in that also include:
Recover module, if the present mode for flash lamp is the interim contention mode of permission, be formerly should in described closedown module After closing flash lamp and notifying formerly application, preserve the information before flash lamp is closed;In described module of opening by flash lamp Present mode be updated to the mode that flash lamp is opened in described current application application after, current application discharge to flash lamp After using, open flash lamp according to the flashlight information being previously saved, and notify formerly application flash lamp open result.
Device the most according to claim 7, it is characterised in that described determine module, is additionally operable to: at the current shape of flash lamp State be open, the present mode of flash lamp is when being to allow interim preemptive type and the nesting temporarily seized to be designated zero, is defined as institute State current application and open flash lamp, and the described nested mark temporarily seized is added an operation;Described seize temporarily embedding The initial value of set mark is zero;Current state at flash lamp be open, the present mode of flash lamp be allow interim preemptive type And the described nested mark seized is equal to for the moment temporarily, determines and do not open flash lamp for described 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 true CN106161938A (en) 2016-11-23
CN106161938B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650411A (en) * 2018-04-23 2018-10-12 Oppo广东移动通信有限公司 A kind of control method of flash lamp, terminal and computer storage media

Citations (6)

* 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
CN103677848A (en) * 2013-12-27 2014-03-26 厦门雅迅网络股份有限公司 Camera control method based on Android
EP2713606A2 (en) * 2012-09-28 2014-04-02 Samsung Electronics Co., Ltd Method for controlling camera and mobile device
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
CN104471587A (en) * 2012-05-16 2015-03-25 诺基亚公司 Method in a processor, an apparatus and a computer program product

Patent Citations (6)

* 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
CN104471587A (en) * 2012-05-16 2015-03-25 诺基亚公司 Method in a processor, an apparatus and a computer program product
EP2713606A2 (en) * 2012-09-28 2014-04-02 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

Cited By (2)

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

Also Published As

Publication number Publication date
CN106161938B (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN103902390B (en) Inter-process communication method based on Android application layer and basis application communication system
JP6004299B2 (en) Method and apparatus for matching flow tables and switch
CN109756430A (en) A kind of processing method and processing device of rule
CN106789152A (en) Processor extended method and device based on many queue network interface cards
CN105930191B (en) The overloaded method and device of system service
CN101355577B (en) Method for preventing thread from rope of multithread communication program
CN107209694A (en) Method for controlling on-demand service to supply
CN105721359B (en) VXLAN message transmitting method and device
CN103995787A (en) Regulation and control method and device for camera applications
CN108377671A (en) Handle the method and computer equipment of message
CN107172187A (en) A kind of SiteServer LBS and method
CN105264869B (en) A kind of system and method for IP address distribution
CN105893320A (en) Remote task function calling method oriented at multi-core processor
CN106161938A (en) A kind of flash lamp deployment method and device
CN104408372B (en) A kind of mimicry application solutions system and method based on system reload
CN103384280B (en) A kind of network address conversion port method for managing resource and system
CN105379221B (en) A kind of link aggregation method and equipment
CN107391275A (en) A kind of message treatment method and electronic equipment
WO2021135792A1 (en) Data forwarding method, forwarding device, system, server, and storage medium
CN109189718A (en) A kind of SOCKET Component that supporting multiple network interface and method
CN104636206B (en) The optimization method and device of a kind of systematic function
US11108637B1 (en) Wireless relay consensus for mesh network architectures
CN104717380B (en) Interchanger, speech ciphering equipment, IP telephony system and speech ciphering equipment dispositions method
CN109347656B (en) Method and system for configuring virtual host uplink network card
CN111866159A (en) Method, system, device and storage medium for calling artificial intelligence service

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