CN113347477B - Method, device and system for sharing camera by multiple applications - Google Patents

Method, device and system for sharing camera by multiple applications Download PDF

Info

Publication number
CN113347477B
CN113347477B CN202110383604.9A CN202110383604A CN113347477B CN 113347477 B CN113347477 B CN 113347477B CN 202110383604 A CN202110383604 A CN 202110383604A CN 113347477 B CN113347477 B CN 113347477B
Authority
CN
China
Prior art keywords
camera
application program
request
application programs
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.)
Active
Application number
CN202110383604.9A
Other languages
Chinese (zh)
Other versions
CN113347477A (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.)
Beijing Runxin Hengda Technology Co ltd
Original Assignee
Beijing Runxin Hengda Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Runxin Hengda Technology Co ltd filed Critical Beijing Runxin Hengda Technology Co ltd
Priority to CN202110383604.9A priority Critical patent/CN113347477B/en
Publication of CN113347477A publication Critical patent/CN113347477A/en
Application granted granted Critical
Publication of CN113347477B publication Critical patent/CN113347477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/4223Cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8173End-user applications, e.g. Web browser, game

Abstract

The invention relates to a method, a device and a system for sharing a camera by multiple applications. The method for sharing the camera by multiple applications comprises the following steps: detecting whether a camera abstract device object corresponding to a camera is created or not in response to a camera access request of any one of a plurality of applications; if so, providing the camera abstract equipment object for an application program corresponding to the request to use; and if not, creating a camera abstract device object corresponding to the camera and providing the camera abstract device object for the application program corresponding to the request for use. When a plurality of application programs access the same camera, the same camera abstract equipment object can be provided for the application programs, so that different application programs in a foreground running state can share the same camera, the different application programs can conveniently and timely acquire camera data, the sharing of the camera data is realized, and the camera access efficiency of the different application programs is improved.

Description

Method, device and system for sharing camera by multiple applications
Technical Field
The invention relates to a method, a device and a system for sharing a camera by multiple applications.
Background
In the prior art, only one application program can be limited to use the camera, and when the camera is occupied, other application programs can not open the camera. Even in the multi-window mode, the multiple applications cannot share the same camera. In some specific application scenarios, for example, in a video live broadcast scenario, if a network video live broadcast end wants to implement live broadcast facing multiple different live broadcast platforms by running different network video live broadcast application programs, so that the network video live broadcast end can communicate with users under multiple live broadcast platforms at the same time, it is necessary for multiple network video live broadcast application programs running on the network video live broadcast end to simultaneously and uninterruptedly acquire camera data. The inventor finds that in the multi-window mode in the prior art, only one application program can open the camera at the same time, so that the multi-application program cannot continuously acquire the data of the camera at the same time. Therefore, how to realize that a plurality of application programs can share the same camera becomes a technical problem to be solved urgently.
Disclosure of Invention
In view of the technical drawbacks and technical disadvantages of the prior art, embodiments of the present invention provide a method, apparatus, and system for sharing a camera among multiple applications, which overcome or at least partially solve the above problems.
As a first aspect of an embodiment of the present disclosure, a method for sharing a camera by multiple applications is provided, including:
in response to a camera access request of any one of a plurality of applications, detecting whether a camera abstract device object corresponding to the camera has been created; the plurality of application programs are displayed on the same screen and are in a foreground running state;
if so, providing the camera abstract equipment object for an application program corresponding to the request to use;
and if not, creating a camera abstract device object corresponding to the camera and providing the camera abstract device object for the application program corresponding to the request for use.
In an optional embodiment, the method may further include:
responding to a request of closing a camera of any application program in the plurality of application programs, and detecting whether the camera abstract equipment object is provided for other at least one application program to be used;
if not, sending a closing instruction to the camera, and deleting the abstract equipment object of the camera.
In an optional embodiment, the method may further include:
and if the camera abstract equipment object is detected to be also provided for other at least one application program to use, keeping the camera in a starting state.
In an optional embodiment, the method may further include:
and in response to a request for modifying the camera configuration of any application program using the camera abstract device object, modifying the camera configuration information, and sending the modified camera configuration information from the camera abstract device object to the plurality of application programs.
In an optional embodiment, the method may further include:
and in response to a request for modifying the camera configuration of any application program using the camera abstract device object, modifying the camera configuration information, and sending the modified camera configuration information to the camera abstract device object, so that any application program using the camera abstract device object acquires the modified camera configuration information from the camera abstract device object.
In an optional embodiment, the method may further include:
responding to a request for acquiring camera data by using any application program of the camera abstract device object, sending a corresponding camera data acquisition instruction to a camera driver corresponding to the camera, and sending the acquired camera data to the plurality of application programs from the camera abstract device object.
In an optional embodiment, the method may further include:
responding to a request for acquiring camera data by using any application program of the camera abstract device object, sending a corresponding camera data acquisition instruction to a camera driver corresponding to the camera, and sending the acquired camera data to the camera abstract device object, so that any application program using the camera abstract device object acquires the camera data from the camera abstract device object.
In an optional embodiment, the multiple applications may be displayed on the same screen and in a foreground running state by:
responding to the starting requests of the plurality of application programs with the simultaneous operation labels, displaying foreground interfaces of the plurality of application programs on the same screen, and enabling the foreground interfaces to be in a foreground operation state.
In an alternative embodiment, the plurality of applications may include at least one of the following applications:
a network live video application, a video recording application, a camera application, and a video chat application.
As a second aspect of the embodiments of the present disclosure, an apparatus for sharing a camera by multiple applications is provided, including:
the request receiving module is used for receiving a camera access request of any application program in a plurality of application programs; the plurality of application programs are displayed on the same screen and are in a foreground running state;
the detection module is used for responding to a camera access request of any application program in the plurality of application programs and detecting whether a camera abstract device object corresponding to the camera is created or not; if so, providing the camera abstract equipment object to an application program corresponding to the request;
and the creating module is used for creating the camera abstract equipment object if the detecting module does not detect the camera abstract equipment object.
As a third aspect of the embodiments of the present disclosure, a live broadcast end device using the method for sharing a camera by multiple applications is provided, where the live broadcast end device is configured to upload camera data acquired by any application program in multiple application programs to a corresponding live broadcast server.
As a fourth aspect of the embodiments of the present disclosure, a network video live broadcast system is related to, including: a plurality of live broadcast servers, audience client equipment and the live broadcast end equipment; the live broadcast servers respectively correspond to different network video live broadcast application programs;
the audience client equipment is used for sending a video watching request to the corresponding live broadcast server through the network video live broadcast application program;
and the live broadcast server is used for receiving the camera data uploaded by the live broadcast end equipment, processing the camera data to obtain live broadcast video data, responding to the video watching request, and sending the live broadcast video data to the audience client end equipment.
As a fifth aspect of the embodiments of the present disclosure, a system for implementing multi-application sharing of a camera is provided, including: the camera abstraction equipment comprises an application program interface, a camera abstraction equipment object and a camera service module;
the application program interface is used for forwarding a plurality of application programs to access the camera to the camera service;
the camera service module is used for detecting whether a camera abstract device object corresponding to the camera is created or not when a camera access request of any application program in the plurality of application programs is received; if so, providing the camera abstract equipment object for an application program corresponding to the request for use; and if not, creating a camera abstract device object corresponding to the camera and providing the camera abstract device object for the application program corresponding to the request for use.
In an optional embodiment, the application program interface may include:
the opening interface module is used for receiving the requests of the plurality of application programs for accessing the camera;
and the closing interface module is used for receiving the requests of closing the cameras of the plurality of application programs.
In an optional embodiment, the camera service may be further configured to send a close instruction to the camera when receiving a request for closing the camera by an application in the foreground interface, which is the last application in the plurality of applications.
In an optional embodiment, the application program interface may further include:
the stream configuration interface module is used for receiving the requests of the plurality of application programs for modifying the camera configuration;
and the stream request interface module is used for receiving the requests of the plurality of application programs for acquiring the data of the camera.
As a sixth aspect of the embodiments of the present disclosure, it relates to a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements a method of sharing a camera by multiple applications as described above.
As a seventh aspect of the embodiments of the present disclosure, a computer device is related to, which includes a memory, a processor and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the method for sharing a camera by multiple applications as described above is implemented.
The embodiment of the disclosure at least achieves the following technical effects:
in the method, the device and the system for sharing the camera by multiple applications, provided by the embodiment of the invention, when multiple applications access the same camera, the same camera abstract equipment object can be provided for the multiple applications, so that different applications in a foreground running state can share the same camera, the different applications can conveniently and timely acquire camera data, the camera data sharing is realized, and the camera access efficiency of the different applications is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a method for sharing a camera among multiple applications according to an embodiment of the present invention;
fig. 2 is a system framework diagram of a method for implementing multi-application sharing of a camera according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for implementing foreground operation of multiple applications according to an embodiment of the present invention;
fig. 4 is a system framework diagram of a method for implementing foreground running of multiple applications according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for sharing a camera by multiple applications according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a system for implementing multi-application sharing of a camera according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus for implementing foreground operation of multiple applications according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Referring to fig. 1, an embodiment of the present invention provides a method for sharing a camera by multiple applications, including:
s101: detecting whether a camera abstract device object corresponding to a camera is created or not in response to a camera access request of any one of a plurality of applications; if yes, go to step S102; if not, executing step S103; the plurality of application programs are displayed on the same screen and are in a foreground running state;
s102: providing the camera abstract equipment object for an application program corresponding to the request to use;
s103: and creating a camera abstract device object corresponding to the camera and providing the camera abstract device object for the application program corresponding to the request for use.
In the method for sharing a camera by multiple applications provided by the embodiment of the present invention, the multiple applications may be the same type of application or different types of applications. The plurality of applications may be, for example, at least one of the following applications: a network live video application, a video recording application, a camera application, and a video chat application.
The method for sharing the camera by multiple applications provided by the embodiment of the invention can also be applied to various different application scenes, for example, in a video conference scene, wherein at least one application program in the multiple application programs is a video chat application program and is used for carrying out video connection and sharing the acquired camera data to other video conference terminals, and at least one other application program is a video recording application program and is used for carrying out field recording and storing the acquired camera data; for another example, the method is used in an intelligent rearview mirror scene, wherein at least one application program is a camera application program, the reversing rearview function is realized based on the acquired camera data, and at least one other application program is a video recording application program, and is used for realizing driving video recording and storing the acquired camera data; for another example, in an object recognition scenario, among the plurality of applications, at least one application is a camera application for implementing object recognition, and at least one other application is a video recording application for performing live recording in a recognition process and storing acquired camera data.
In a specific embodiment, if the plurality of application programs are live webcast application programs applied to live webcast end equipment, if the plurality of application programs are displayed on the same screen and are in a foreground running state, live webcasts for a plurality of different live webcast platforms can be realized in a manner that the plurality of application programs share a camera.
In a specific embodiment, referring to fig. 2, the multiple application in-phase cameras may be implemented based on a system framework shared by the cameras, where when a first application requests to open a camera, a request for accessing the camera of the first application is received through an application program interface API of a camera application framework layer, and when the camera service detects that a camera abstract device object has not been created, the camera service accesses a camera driver, creates a new camera abstract device object, and completes a mapping relationship between the first application and the camera abstract device object; when another application program or application programs in the future request to access the camera again, the camera service establishes a mapping relation between the created camera abstract device object and the application program or application programs in the future, so that the application programs are mapped to the same camera abstract device object when accessing the camera, and the camera abstract device object corresponds to one camera hardware device.
In the method for sharing the camera by multiple applications provided by the embodiment of the invention, when multiple applications access the same camera, the same camera abstract device object can be provided for the multiple applications, so that different applications in a foreground running state share the same camera, different applications can acquire the camera data in time conveniently, the camera data can be shared, and the camera access efficiency of different applications can be improved.
In the method for sharing a camera by multiple applications provided in the embodiment of the present invention, in a process of sharing a camera by multiple applications, if a request for modifying a camera configuration of any application using the camera abstraction device object is received, the camera configuration information is modified in response to the request, and the modified camera configuration information is sent to the multiple applications from the camera abstraction device object.
In the embodiment of the present invention, if any application program in the multiple application programs requests modification of the camera configuration, the multiple application programs can acquire modified camera configuration information. For example, if a user needs to switch the resolution of the camera to obtain the video image to adjust the definition of the video image, the user may initiate a request for modifying the configuration information related to the resolution of the camera by interacting with any one of the plurality of application programs, and in a system in which the plurality of application programs operate, the configuration information of the camera hardware device is modified, so that the plurality of application programs can simultaneously obtain the video image of the camera after the resolution adjustment.
In the embodiment of the present invention, in a process of implementing sharing of a camera by multiple application programs, if a request for modifying camera configuration of any application program using the camera abstraction device object is received, the multiple application programs may further acquire modified camera configuration information by:
and in response to a request for modifying the camera configuration of any application program using the camera abstract device object, modifying the camera configuration information, and sending the modified camera configuration information to the camera abstract device object, so that any application program using the camera abstract device object acquires the modified camera configuration information from the camera abstract device object.
In the embodiment of the present invention, in the process of sharing a camera by multiple applications, if a request for acquiring camera data of any application using the camera abstraction device object is received, in response to the request, a corresponding camera data acquisition instruction is sent to a camera driver corresponding to the camera, and the acquired camera data is sent to the multiple applications from the camera abstraction device object.
In the embodiment of the invention, the multiple application programs can simultaneously acquire the same camera data by initiating the request for acquiring the camera data by any one of the multiple application programs, namely the multiple application programs only need to acquire the data once, so that the accuracy and the effectiveness of data acquisition are ensured, the occupation of system data resources in the camera data acquisition process can be reduced, the data transmission rate is higher, and the data carrying efficiency is improved.
In the embodiment of the present invention, in a process of implementing sharing of a camera by multiple application programs, if a request for acquiring camera data by any application program using the camera abstraction device object is received, the multiple application programs may further acquire the camera data by:
responding to a request for acquiring camera data by using any application program of the camera abstract device object, sending a corresponding camera data acquisition instruction to a camera driver corresponding to the camera, and sending the acquired camera data to the camera abstract device object, so that any application program using the camera abstract device object acquires the camera data from the camera abstract device object.
In the embodiment of the invention, in the process of realizing the camera sharing of a plurality of application programs, if a camera closing request of any application program in the plurality of application programs is received, responding to the request, and detecting whether the camera abstract equipment object is provided for at least one other application program for use;
if so, keeping the camera in a starting state;
and if not, sending a closing instruction to the camera, and deleting the abstract equipment object of the camera.
In the embodiment of the present invention, when any application program in the plurality of application programs needs to close the camera and stops acquiring data of the camera, a request may be initiated to close the camera, because there may be other application programs in the plurality of application programs that are using the camera, the camera cannot be directly closed, and only when it is determined that the application program that initiates the request is the last application program that uses the camera, a close instruction may be sent to the camera, the camera is closed, and the camera abstract device object corresponding to the camera is deleted.
In the embodiment of the present invention, the system may implement different camera access processes through different application program interfaces APIs of the camera application framework layer, which specifically includes:
when a plurality of application programs request to access the camera, the requests of the application programs for accessing the camera are received by opening the interface;
when any one of the plurality of application programs requests to modify the camera configuration, the request of the plurality of application programs for modifying the camera configuration is received through the stream configuration interface;
when any one of a plurality of application programs requests to acquire the camera data, the request of the plurality of application programs for acquiring the camera data is received through a stream request interface;
when any one of the plurality of application programs requests to close the camera, the request of the plurality of application programs for closing the camera is received through the closing interface.
In the embodiment of the present invention, based on the requests received by the opening interface, the stream configuration interface, the stream request interface, and the closing interface, the processes of opening the camera, modifying the camera configuration, acquiring the camera data, and finally closing the camera by the multiple application programs can be respectively implemented, and the specific implementation process may refer to the description in the above embodiment and will not be described herein again.
In a specific embodiment, the method for implementing foreground operation of multiple applications can be used to implement display of multiple applications on the same screen and in a foreground operation state, as shown in fig. 3, the specific implementation process includes:
s201: responding to starting requests of a plurality of application programs, and detecting whether the application programs have simultaneous operation labels;
s202: and for the detected target application program with the label, displaying the target application program and the foreground interface of at least one other application program in the plurality of application programs on the same screen, and keeping the target application program in a foreground running state.
It should be noted that, in the embodiment of the present invention, the plurality of application programs may include two or more application programs.
In the embodiment of the invention, for any application program with the simultaneously-running label, when the application program with the label is displayed on the same screen as other application programs, the target application program is always kept in the foreground running state, and whether the target application program acquires a focus in a window is not concerned, so that when the target application program with the simultaneously-running label and at least one other application program in a plurality of application programs are displayed on the same screen in different windows of a device screen, the target application program with the label is kept in the foreground running state on the foreground interface, and the purpose that a user interacts with at least two application programs displayed on the same screen in real time can be achieved.
The inventor of the present invention finds that, in a system in which a terminal device in the prior art operates, generally, only one application program can interact with a user in a foreground, and a foreground interface of the application program is in a foreground operating state at this time.
In addition, although the operating system (for example, the Android system) in the related art can realize the on-screen display of a plurality of applications, the system does not change the lifecycle of an Activity component (Activity) of each application in the multi-window mode, and therefore, in the multi-window mode, only the foreground interface of an application in a window that has interacted with a user recently is in an operating state. The foreground interfaces of the applications in the other windows are visible but are in a suspended state. When the foreground interface of the application program is in a pause state, the video is paused, the microphone stops recording, and the interface stops updating. This application may also be destroyed by the system when the system memory is too low.
In some special scenes, for example, when a network video live broadcast end device wants to start two or more network video live broadcast applications at the same time to perform synchronous video live broadcast on different network video live broadcast platforms, it is necessary that the recording, video recording, interfaces, and the like of the two or more network live broadcast applications are kept normal, and the technical scheme in the prior art cannot meet the requirements of the application scene.
Based on this, in the method for implementing foreground operation of multiple applications according to the embodiment of the present invention, by setting or adding the simultaneous operation tag to the application program, the application program with the simultaneous operation tag can be kept in the foreground operation state when other application programs are displayed on the same screen. Therefore, when two or more application programs with the simultaneously running tags are started, the sound recording, the video recording, the interfaces and the like of the two or more application programs are kept normal, and the two or more application programs can normally realize real-time interaction with the user, so that the requirements of the application scenes are met.
In this embodiment of the present invention, the start requests of the multiple application programs described in step S201 may be start requests sent by the multiple application programs in sequence, or start requests sent by the multiple application programs together.
The starting requests sent by the multiple application programs in sequence can be starting requests sent by the multiple application programs in sequence at different moments, and each application program is respectively allocated with one corresponding window when the multiple application programs are displayed on the same screen, so that if the multiple application programs send the starting requests in sequence, the windows can be reallocated once on the screen of the terminal equipment after the starting request of one application program is received, and the foreground interfaces of the application program sending the starting request later and the other application program or programs which are started are displayed on the same screen.
The starting request sent by the plurality of application programs together comprises the starting request sent by the plurality of application programs simultaneously in the process of one request, and each application program is respectively allocated with one corresponding window when the plurality of application programs are displayed on the same screen, so that the starting process can be started and executed sequentially according to a preset starting sequence if the plurality of application programs send the starting request together. Or the starting request sent by the multiple application programs together comprises the starting requests sent by the multiple application programs in sequence in the process of one request, and each application program is respectively allocated with one corresponding window when the multiple application programs are displayed on the same screen, so that if the multiple application programs send the starting requests together, each application program executes the starting action on the corresponding allocated window simultaneously.
In the embodiment of the present invention, the one-time request may be a start request that is sent by a plurality of applications simultaneously in response to a one-time start instruction initiated by a user or another application in a system of a terminal device.
In the embodiment of the present invention, the simultaneous operation tag of the application program may be obtained by at least one of the following methods:
presetting the label in an application program;
responding to a received starting request of the application program, and setting the label in a starting parameter of the corresponding application program;
and responding to the received request for adding the label, and setting the label in the corresponding application program.
In some embodiments, the simultaneous operation tag may be preset directly in the plurality of applications accessing the camera to obtain the application having the simultaneous operation tag, for example, before the application is downloaded to the terminal device, the provider of the application accessing the camera preset the simultaneous operation tag in the application to obtain a customized application, so as to run the customized application in the system of the terminal device.
In some embodiments, it may also be that the setting of the simultaneous run tag in the application accessing the camera is done by the system installing the application. For example, it may be that one or more applications that can set the simultaneous run tag are predetermined in the system. In the process of starting and running the application program, for the application program which is determined in advance and can access the camera, when a starting request of the application program is received, the system can add the simultaneous running label in the starting parameter of the application program which accesses the camera.
In some embodiments, it may also be that the user selects an application program accessing the camera, to which the simultaneous operation tag may be added, and if a request for adding the simultaneous operation tag is received, the simultaneous operation tag is set in the corresponding application program accessing the camera. For example, a selection box capable of selecting to add the simultaneous operation tag may be provided for the applications in the system setting interface, one or more applications capable of setting the simultaneous operation tag may be selected by the user during the interaction with the user, after the user selects a certain application or certain applications, a request for setting the simultaneous operation tag may be initiated, and the simultaneous operation tag may be added to the start parameter of the corresponding application by the system in response to the request for setting the simultaneous operation tag.
In this embodiment of the present invention, the plurality of application programs described in step S201 may each include an application program having a simultaneous operation tag. If the start request of the plurality of applications described in step S201 is a start request sent by a plurality of applications together, all the applications having the tag in the at least one other application may be in a foreground operating state.
In the embodiment of the present invention, the described target application may be any application in the plurality of applications. When a user initiates a start request sent by two or more application programs together, the two or more application programs can be started according to a preset start sequence for the two or more application programs, and the application program which is started last is enabled to acquire a focus and be in a foreground running state.
In the method for implementing foreground operation of multiple applications provided in the embodiment of the present invention, if a target application is a last started application, the application is in a foreground operation state due to the simultaneous operation tag, and a focus is obtained due to the last start of the target application; if the last started application is one of the at least one other application described in step S202, the last started application, no matter whether having the simultaneous operation tag or not, is in the foreground operation state due to the focus being acquired.
In a specific embodiment, the method for implementing foreground operation of multiple applications further includes:
and if the plurality of application foreground interfaces are displayed on the same screen, the application program which does not have the label acquires the focus, so that the application program acquiring the focus is in a foreground running state.
In the embodiment of the present invention, in the process of displaying the foreground interface on the same screen after the multiple applications are started, a user may interact with any application in the multiple applications, and the application interacting with the user will acquire a focus, so that, for an application not having the tag in the multiple applications, although the application is in a foreground pause state during starting, if the focus is acquired during the running process, the application not having the tag running at the same time that is acquired enters and maintains the foreground running state. Therefore, even if there is an application program that does not have the simultaneous operation tag among the applications for sharing the camera, the technical purpose of sharing the camera can be achieved by making the application program acquire the focus.
In a specific embodiment, if the start request of the multiple applications described in the step S201 is a start request sent by multiple applications together, the displaying the foreground interfaces of the target application and at least one other application in the multiple applications on the same screen described in the step S202 may specifically include:
and carrying out window allocation on the target application program and at least one other application program in the plurality of application programs according to a preset screen allocation format, and displaying foreground interfaces of the target application program and the at least one other application program on the same screen in the allocated window.
In a specific embodiment, the method for implementing foreground operation of multiple applications further includes:
in the process of displaying foreground interfaces of the plurality of application programs on the same screen, if a pause operation request for any application program is received, detecting whether the application program corresponding to the pause operation request comprises the label or not;
if so, keeping the application program corresponding to the pause operation request in a foreground running state;
if not, enabling the application program corresponding to the pause operation request to be in a foreground pause state.
In a specific embodiment, the pause operation request may be triggered by the following processes: and if the focus switching request is received, triggering a pause operation request of the application program losing the focus. For example, in the system running process, if a new operation request is received (for example, a user clicks the pop-up window interaction sub-interface according to the operation request of the pop-up window interaction sub-interface), a pause operation is executed for two or more application programs currently displayed on the same screen, and at this time, for the application programs with the simultaneously running tags, the foreground interface of the application program is kept in a foreground running state; if the application program does not have the simultaneous operation label and is in the foreground operation state, the foreground interface of the application program is changed into the foreground pause state because the application program loses focus; for an application that does not have the simultaneous run tag and is already in the foreground paused state, the foreground paused state is maintained.
Of course, in the system running process, the system may also automatically switch the focuses of two or more application programs displayed on the same screen, so that the application before switching loses the focus of the screen, and at this time, if the application before switching has the simultaneous running tag, the foreground running state is maintained; if the application does not have the simultaneous operation tag before the switching, the application program becomes a foreground temporary state in the on-screen display process because the application program loses focus.
The method for implementing foreground operation of multiple applications provided by the embodiment of the invention can be implemented based on a terminal device system in the prior art, wherein the terminal device system includes but is not limited to an Android system. The specific process for implementing the starting of the plurality of application programs may include:
if a user selects a plurality of application programs to be started, the plurality of application programs initiate starting requests to the system;
responding to the starting requests of the plurality of application programs, carrying out window allocation according to the screen size of the terminal equipment and a preset screen allocation format, allocating a window displayed by the foreground interface of each application program, and further displaying the foreground interface of each application program on the window allocated for the foreground interface.
In one embodiment, the allocation of windows may be achieved by:
when the application programs to be started are two application programs, a user can drag an icon of one application program to the upper side of an icon of the other application program by long-pressing the icon of the application program in the application starter, and then the two application programs can initiate starting requests.
In a specific embodiment, the allocation of windows may also be implemented by:
when the application programs are two or more than two application programs, if a user can press an icon of one application program in the application starter for a long time, the system interface enters a multi-selection mode, the user selects the two or more than two application programs, and then clicks a 'start' button, so that the selected application can initiate a start request.
According to the preset screen allocation scheme, when two or more application programs are started in an application starter mode, the application starter operates in a working mode of realizing Multi-application foreground operation (Multi-Run), and the screen allocation scheme is realized through the working mode, so that corresponding windows are allocated to a plurality of applications respectively. For example, when the number of the applications to be started is two, the screen of the terminal device may be divided into two windows in the height direction; when the number of the application programs to be started is three, the screen of the terminal equipment can be divided into three windows in the height direction; when the number of the applications to be started is two, the screen of the terminal device may be divided into four windows in the height direction, or the screen of the terminal device may be divided into four windows in a grid form.
Of course, in the embodiment of the present invention, the dividing manner of the window in the screen is not limited to the above-mentioned manner, and the dividing manner of the window in the screen may also be other manners provided in the prior art, and thus, the embodiment of the present invention may not be specifically limited.
In this embodiment of the present invention, referring to fig. 4 for each application program, it is assumed that the plurality of application programs include application programs 1 to N, where N is greater than or equal to 2, and a process of displaying a foreground interface of one application program in an allocated window is implemented specifically by:
an Activity Stack monitor (Activity Stack Supervisor) of the system firstly detects whether the application program has a simultaneous operation label;
if so, newly creating an Activity Stack (Activity Stack) of the application program through an Activity Display (Activity Display), and in the process of displaying the foreground interface of the application program, always setting the parameter value of an Activity Record (Activity Record) corresponding to an Activity component (Activity) at the topmost layer in the newly created Activity Stack as a parameter value for identifying that the application program is in a foreground running (On Resume) state, so that the application program keeps the foreground running state when the foreground interface of the application program and the foreground interfaces of other application programs are displayed On the same screen;
if not, newly creating an active stack of the application program through the active display, and only when a foreground interface of the application program acquires a focus in the display process of the foreground interface of the application program, updating a parameter value of an activity record corresponding to an active assembly at the topmost layer in the newly created active stack into a parameter value for identifying that the application program is in a foreground running state, so that the application program is in the foreground running state when the foreground interface of the application program and foreground interfaces of other application programs are displayed on the same screen; if the foreground interface of the application program loses focus, the parameter value of the activity record corresponding to the activity component at the topmost layer in the newly created activity stack is changed into a parameter value for identifying that the application program is in a foreground Pause (On Pause) state, and the application program is in the foreground Pause state.
In the embodiment of the invention, in order to control and realize the change of the foreground interface of each application program in the foreground running process of a plurality of application programs, the sequence of the opening of the active components of each application program is recorded in the Task stack Record (Task Record), and the sequence of the active components stored in the Task stack can be adjusted according to the stack pushing and popping operations of the active components, so that the foreground interface corresponding to which active component is displayed next when one active component is popped.
In a specific embodiment, in the method for implementing foreground operation of multiple applications, the size of the window corresponding to the application program may be adjusted or dragged according to an instruction sent by a user or a system, so as to meet the user requirements of the user on different application programs, and improve the user experience of the user. In the embodiment of the present invention, the size adjustment of the window corresponding to the foreground interface of the application program or the specific implementation process of the window dragging may refer to the description of the related technical solution in the prior art, as long as the size adjustment of the window or the window dragging can be implemented, which may not be specifically limited in the embodiment of the present invention.
In a specific embodiment, the method for implementing foreground operation of multiple applications further includes:
if a closing instruction of any application program or an application program foreground interface closing instruction is received, judging whether the application program which does not receive the closing instruction or the foreground interface closing instruction exists;
and if the current application program does not receive the closing instruction or the foreground interface closing instruction, enabling the application program which loses the focus at the latest to acquire the focus again.
In the embodiment of the invention, in the running process of the system, for two or more application programs displayed On the same screen, if an application program receives a closing instruction, the application program is switched from a foreground running state or a foreground pause state to a Stop (On Stop) state, then enters a Destroy (On Destroy) state, and finally closes the application program. At this time, the application launcher in the system may reallocate the screen display area for the foreground interface of the one or more application programs that have not been closed according to the number of the remaining one or more application programs and the preset screen allocation manner. And because the focus is switched when the application program receives the close instruction, the system records the last application program which acquires the focus when the focus is switched, and if the current application program is closed, whether the application program which loses the focus last exists is checked, so that the application program which loses the focus at the latest in other application programs which do not receive the close instruction or the foreground interface close instruction acquires the focus again.
In a specific embodiment, if the start requests of the multiple application programs described in step S201 are start requests sent by the multiple application programs in sequence, and at least one other application program described in step S202 includes an application program that does not have the tag, the method for implementing foreground operation of multiple applications may further include:
and if the starting request of the other application program without the label is earlier than the starting request of the target application program, enabling the other application program without the label to be in a foreground running state.
In the embodiment of the present invention, since the plurality of applications may include the application having the simultaneous operation tag or the application not having the simultaneous operation tag, for the plurality of applications, since the start request of the other application not having the simultaneous operation tag is earlier than the start request of the target application having the simultaneous operation tag, the other application not having the simultaneous operation tag enters the foreground operating state before the target application, and therefore, when the target application starts, the start request time can be kept earlier than the target application, and the other application not having the simultaneous operation tag keeps the foreground operating state, so that the start request time is earlier than the target application, and the other application not having the simultaneous operation tag can acquire the camera data even if the other application not having the simultaneous operation tag, and sharing of camera data is realized.
In a specific embodiment, if the start requests of the multiple application programs described in step S201 are start requests sequentially sent by the multiple application programs, and if the start requests respectively sent by the multiple application programs are sequentially received and the last started application program does not have the tag, the last started application program obtains the focus and is in the foreground operating state.
In the embodiment of the present invention, since the plurality of application programs may include an application program having a simultaneous operation tag or an application program not having the simultaneous operation tag, for other application programs not having the simultaneous operation tag, although the last started application program does not have the simultaneous operation tag, the last started application program finally acquires the focus, and therefore, the last started application program can keep a foreground operation state, so that the last started application program can realize sharing of camera data even if the last started application program acquires the camera data.
Based on the same inventive concept, an embodiment of the present invention further provides a device for sharing a camera by multiple applications, which is shown in fig. 5 and includes:
a request receiving module 101, configured to receive a camera access request of any application program in a plurality of application programs; the plurality of application programs are displayed on the same screen and are in a foreground running state;
a detection module 102, configured to detect, in response to a request for accessing a camera by any one of the plurality of applications, whether a camera abstract device object corresponding to the camera has been created; if so, providing the camera abstract equipment object to an application program corresponding to the request;
a creating module 103, configured to create the camera abstraction device object if the detecting module 102 does not detect the camera abstraction device object.
In one or some optional embodiments, the apparatus for sharing a camera by multiple applications further includes: closing the module;
the detecting module 102 is further configured to detect, in response to a request for closing a camera of any one of the plurality of application programs, whether the camera abstract device object is provided for at least one other application program to be used;
the closing module is configured to send a closing instruction to the camera and delete the camera abstract device object if the detection module 102 detects that the camera abstract device object is not provided for use by at least one other application program.
In one or some optional embodiments, the apparatus for sharing a camera by multiple applications further includes: and the first configuration modification module is used for responding to a request of any application program using the camera abstract device object for modifying the camera configuration, modifying the camera configuration information and sending the modified camera configuration information to the plurality of application programs from the camera abstract device object.
In one or some optional embodiments, the apparatus for sharing a camera by multiple applications further includes: and the second configuration modification module is used for responding to a request of any application program using the camera abstract equipment object for modifying the camera configuration, modifying the camera configuration information, and sending the modified camera configuration information to the camera abstract equipment object, so that any application program using the camera abstract equipment object can acquire the modified camera configuration information from the camera abstract equipment object.
In one or some optional embodiments, the apparatus for sharing a camera by multiple applications further includes: and the first data acquisition modification module is used for responding to a request for acquiring the camera data by any application program using the camera abstract equipment object, sending a corresponding camera data acquisition instruction to a camera driver corresponding to the camera, and sending the acquired camera data to the application programs from the camera abstract equipment object.
In one or some optional embodiments, the apparatus for sharing a camera by multiple applications further includes: and the second data acquisition modification module is used for responding to a request for acquiring camera data by using any application program of the camera abstract device object, sending a corresponding camera data acquisition instruction to a camera driver corresponding to the camera, and sending the acquired camera data to the camera abstract device object so as to enable any application program of the camera abstract device object to acquire the camera data from the camera abstract device object.
In one or some optional embodiments, the apparatus for sharing a camera by multiple applications further includes: and the on-screen display module is used for responding to the starting requests of the plurality of application programs with the simultaneously running labels, displaying the foreground interfaces of the plurality of application programs on the same screen and keeping the foreground interfaces in a foreground running state.
Based on the same inventive concept, the embodiment of the invention also provides live broadcast end equipment using the method for sharing the camera by multiple applications, which is used for uploading the camera data acquired by any application program in the multiple application programs to a corresponding live broadcast server.
Based on the same inventive concept, the embodiment of the present invention further provides a network video live broadcasting system, including: a plurality of live broadcast servers, audience client equipment and the live broadcast end equipment; the live broadcast servers respectively correspond to different network video live broadcast application programs;
the audience client equipment is used for sending a video watching request to the corresponding live broadcast server through the network video live broadcast application program;
and the live broadcast server is used for receiving the camera data uploaded by the live broadcast end equipment, processing the camera data to obtain live broadcast video data, responding to the video watching request, and sending the live broadcast video data to the audience client end equipment.
Based on the same inventive concept, an embodiment of the present invention further provides a system for implementing camera sharing by multiple applications, and as shown in fig. 6, the system includes: an application program interface 301, a camera abstract device object 302 and a camera service module 303;
the application program interface 301 is configured to forward a request for accessing a camera from a plurality of application programs to the camera service module 303;
the camera service module 303 is configured to detect whether a camera abstract device object 302 corresponding to the camera is created when a camera access request of any one of the plurality of applications is received; if so, providing the camera abstract device object 302 for an application program corresponding to the request to use; if not, a camera abstract device object 302 corresponding to the camera is created and provided to the application program corresponding to the request for use.
In one or some alternative embodiments, the application program interface 301 includes:
the opening interface module is used for receiving the requests of the plurality of application programs for accessing the camera;
and the closing interface module is used for receiving the requests of closing the cameras of the plurality of application programs.
In one or some optional embodiments, the camera service module 303 is further configured to send a close instruction to the camera when receiving a request for closing the camera by a last application in the foreground interface in the multiple applications.
In one or some optional embodiments, the application program interface 301 further includes:
the stream configuration interface module is used for receiving the requests of the plurality of application programs for modifying the camera configuration;
and the stream request interface module is used for receiving the requests of the plurality of application programs for acquiring the data of the camera.
Based on the same inventive concept, embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for sharing a camera among multiple applications.
Based on the same inventive concept, the embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for sharing a camera by multiple applications as described above is implemented.
Based on the same inventive concept, an embodiment of the present invention further provides a device for implementing foreground operation of multiple applications, which is shown in fig. 7 and includes:
a detection module 201, configured to receive start requests of multiple application programs, and detect whether the multiple application programs have tags running simultaneously;
the on-screen display module 202 is configured to, if one of the multiple applications has a tag that is run simultaneously, display foreground interfaces of the application having the tag and other applications in the multiple applications on the same screen, where the application having the tag is in a foreground running state.
In one or some optional embodiments, the on-screen display module 202 is further configured to enable all applications having the tag in the at least one other application to be in a foreground running state.
In one or some optional embodiments, if the start requests of the multiple applications are start requests sent by the multiple applications together, the on-screen display module 202 is further configured to enable all applications that do not have the tag in the at least one other application to be in a foreground suspended state.
In one or some optional embodiments, if the start request of the multiple application programs is a start request sent by the multiple application programs in sequence, and the at least one other application program includes an application program that does not have the tag, the on-screen display module 202 is further configured to enable the other application program that does not have the tag to be in a foreground operating state if the start request of the other application program that does not have the tag is earlier than the start request of the target application program.
In one or some optional embodiments, if the start request of the multiple application programs is a start request sent by the multiple application programs in sequence, and the last started application program does not have the tag, the on-screen display module 202 is further configured to enable the last started application program to acquire a focus and to be in a foreground running state.
In one or some optional embodiments, if the start requests of the multiple application programs are start requests sent by the multiple application programs together, the on-screen display module 202 is further configured to start the multiple application programs according to a preset start order, and enable a last started application program to acquire a focus and be in a foreground running state.
In one or some optional embodiments, if an application program that does not have the tag acquires a focus in the process of displaying the multiple application program foreground interfaces on the same screen, the on-screen display module 202 is further configured to enable the application program that acquires the focus to be in a foreground running state.
In one or some optional embodiments, the on-screen display module 202 is further configured to, in the process of displaying the foreground interfaces of the multiple applications on the same screen, if a pause operation request for any application is received, detect whether the application corresponding to the pause operation request includes the tag;
if so, keeping the application program corresponding to the pause operation request in a foreground running state;
if not, enabling the application program corresponding to the pause operation request to be in a foreground pause state.
In one or some optional embodiments, the on-screen display module 202 is specifically configured to perform window allocation on the target application and at least one other application in the multiple applications according to a preset screen allocation format, and display foreground interfaces of the target application and the at least one other application on the allocated window on the same screen.
In one or some optional embodiments, the on-screen display module 202 is further configured to, if a closing instruction or a foreground interface closing instruction for any application program is received, re-perform window allocation according to a preset screen allocation format, and perform on-screen display on an application program that does not close the foreground interface using the re-allocated window.
In one or some optional embodiments, the on-screen display module 202 is further configured to, if a closing instruction for any application program itself or an application program foreground interface closing instruction is received, determine whether there is an application program that has not received the closing instruction or the foreground interface closing instruction;
and if the current application program does not receive the closing instruction or the foreground interface closing instruction, enabling the application program which loses the focus at the latest to acquire the focus again.
Based on the same inventive concept, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for implementing foreground running of multiple applications as described above is implemented.
Based on the same inventive concept, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for implementing foreground running of multiple applications as described above.
Based on the same inventive concept, the embodiment of the invention also provides a simultaneous operation label of the application program, and the simultaneous operation label enables the application program with the simultaneous operation label to be in a foreground operation state under the condition that foreground interfaces of other application programs are displayed on the same screen.
Based on the same inventive concept, the embodiment of the invention also provides a label identification system, which can identify the label which is run simultaneously with the application program; the simultaneous operation label enables the application program with the simultaneous operation label to be in a foreground operation state under the condition that foreground interfaces of other application programs are displayed on the same screen.
Based on the same inventive concept, the embodiment of the invention also provides a method for displaying multiple applications on the same screen, which comprises the following steps:
displaying foreground interfaces of a plurality of application programs on corresponding windows on the same screen respectively, and enabling the foreground interfaces of at least two application programs in the plurality of application programs to be in a foreground running state.
In the embodiment of the present invention, a specific implementation process of the method for displaying multiple applications on the same screen may refer to related descriptions in the method for implementing foreground operation of multiple applications in the first embodiment, and details are not described here again.
Based on the same inventive concept, the embodiment of the invention also provides an application program, wherein the application program is provided with a simultaneous operation label, so that the application program is in a foreground operation state under the condition that foreground interfaces of the application program and other application programs are displayed on the same screen.
Because the principle of the problems solved by these devices, apparatuses, systems, and applications is similar to the method for implementing foreground operation of multiple applications, the implementation of the device may refer to the implementation of the method, and repeated details are omitted.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A method for sharing a camera by multiple applications is characterized by comprising the following steps:
responding to starting requests of a plurality of application programs, and detecting whether each application program has a simultaneous operation label;
displaying foreground interfaces of a plurality of detected application programs with the tags running simultaneously on the same screen, and enabling the foreground interfaces to be in a foreground running state;
responding to a camera access request of any application program in a plurality of application programs which are displayed on the same screen and in a foreground running state, and detecting whether a camera abstract equipment object corresponding to the camera is created or not;
if so, providing the camera abstract equipment object for an application program corresponding to the request to use;
and if not, creating a camera abstract device object corresponding to the camera and providing the camera abstract device object for the application program corresponding to the request for use.
2. The method of claim 1, further comprising:
responding to a request of closing a camera of any application program in the plurality of application programs, and detecting whether the camera abstract equipment object is provided for other at least one application program to be used;
and if not, sending a closing instruction to the camera, and deleting the abstract equipment object of the camera.
3. The method of claim 1, further comprising:
and in response to a request for modifying the camera configuration of any application program using the camera abstract device object, modifying the camera configuration information, and sending the modified camera configuration information from the camera abstract device object to the plurality of application programs.
4. The method of claim 1, further comprising:
and in response to a request for modifying the camera configuration of any application program using the camera abstract device object, modifying the camera configuration information, and sending the modified camera configuration information to the camera abstract device object, so that any application program using the camera abstract device object acquires the modified camera configuration information from the camera abstract device object.
5. The method of claim 1, further comprising:
responding to a request for acquiring camera data by any application program of the camera abstraction equipment object, sending a corresponding camera data acquisition instruction to a camera driver corresponding to the camera, and sending the acquired camera data to the plurality of application programs from the camera abstraction equipment object.
6. The method of claim 1, further comprising:
responding to a request for acquiring camera data by using any application program of the camera abstract device object, sending a corresponding camera data acquisition instruction to a camera driver corresponding to the camera, and sending the acquired camera data to the camera abstract device object, so that any application program using the camera abstract device object acquires the camera data from the camera abstract device object.
7. An apparatus for sharing a camera among multiple applications, comprising:
the request receiving module is used for responding to starting requests of a plurality of application programs and detecting whether each application program has a simultaneous operation label;
displaying foreground interfaces of a plurality of detected application programs with the tags running simultaneously on the same screen, and enabling the foreground interfaces to be in a foreground running state;
receiving a camera access request of any one of a plurality of application programs which are displayed on the same screen and in a foreground running state;
the detection module is used for responding to a camera access request of any application program in the plurality of application programs and detecting whether a camera abstract device object corresponding to the camera is created or not; if so, providing the camera abstract equipment object to an application program corresponding to the request;
and the creating module is used for creating the camera abstract equipment object if the detecting module does not detect the camera abstract equipment object.
8. A live broadcast end device using the method for sharing the camera by multiple applications as claimed in any one of claims 1 to 6, and configured to upload camera data acquired by any one of multiple applications to a corresponding live broadcast server.
9. A network video live broadcasting system, comprising: a plurality of live servers, viewer client devices and the live device of claim 8; the live broadcast servers respectively correspond to different network video live broadcast application programs;
the audience client equipment is used for sending a video watching request to the corresponding live broadcast server through the network video live broadcast application program;
and the live broadcast server is used for receiving the camera data uploaded by the live broadcast end equipment, processing the camera data to obtain live broadcast video data, responding to the video watching request, and sending the live broadcast video data to the audience client end equipment.
10. A system for implementing multiple applications to share a camera, comprising: the camera abstraction equipment comprises an application program interface, a camera abstraction equipment object and a camera service module;
the application program interface is used for forwarding a request of a plurality of application programs which are displayed on the same screen and in a foreground running state for accessing the camera to the camera service; the plurality of application programs which are displayed on the same screen and in a foreground running state are obtained in the following mode: responding to starting requests of a plurality of application programs, and detecting whether each application program has a simultaneous operation label; displaying foreground interfaces of a plurality of detected application programs with the tags running simultaneously on the same screen, and enabling the foreground interfaces to be in a foreground running state;
the camera service module is used for detecting whether a camera abstract device object corresponding to the camera is created or not when a camera access request of any application program in the multiple application programs which are displayed on the same screen and in a foreground running state is received; if so, providing the camera abstract equipment object for an application program corresponding to the request for use; and if not, creating a camera abstract device object corresponding to the camera and providing the camera abstract device object for the application program corresponding to the request for use.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of sharing a camera by multiple applications according to any one of claims 1 to 6.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of sharing a camera for multiple applications according to any one of claims 1 to 6 when executing the program.
CN202110383604.9A 2021-04-09 2021-04-09 Method, device and system for sharing camera by multiple applications Active CN113347477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110383604.9A CN113347477B (en) 2021-04-09 2021-04-09 Method, device and system for sharing camera by multiple applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110383604.9A CN113347477B (en) 2021-04-09 2021-04-09 Method, device and system for sharing camera by multiple applications

Publications (2)

Publication Number Publication Date
CN113347477A CN113347477A (en) 2021-09-03
CN113347477B true CN113347477B (en) 2022-09-27

Family

ID=77467962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110383604.9A Active CN113347477B (en) 2021-04-09 2021-04-09 Method, device and system for sharing camera by multiple applications

Country Status (1)

Country Link
CN (1) CN113347477B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205529A (en) * 2021-12-20 2022-03-18 北京鸿合爱学教育科技有限公司 Single-camera calling method and device, terminal and readable storage medium
CN114500877A (en) * 2021-12-30 2022-05-13 惠州华阳通用智慧车载系统开发有限公司 Camera sharing method, system and storage medium
CN114422837B (en) * 2022-01-25 2023-08-18 成都鼎桥通信技术有限公司 Method, device, equipment and medium for sharing media data by multiple applications
CN114866686A (en) * 2022-03-25 2022-08-05 惠州华阳通用电子有限公司 Camera video processing method and system
CN115914822B (en) * 2023-01-06 2023-04-25 北京麟卓信息科技有限公司 Camera sharing method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101184195A (en) * 2007-12-25 2008-05-21 腾讯科技(深圳)有限公司 Audio/video living broadcast system and method
WO2008127194A1 (en) * 2007-04-12 2008-10-23 Yu Zhou Network camera monitoring and data sharing system and method
CN101833520A (en) * 2009-03-11 2010-09-15 凹凸电子(武汉)有限公司 Method for simultaneously utilizing one camera by computer system and a plurality of application programs
CN103809852A (en) * 2014-02-14 2014-05-21 北京君正集成电路股份有限公司 Method and device for displaying multiple application programs on same screen at same time
CN107659768A (en) * 2017-08-08 2018-02-02 珠海全志科技股份有限公司 A kind of system and method based on the more Application share cameras of Android
CN111767108A (en) * 2020-06-28 2020-10-13 Oppo广东移动通信有限公司 Application program label generation method, application interface display method and device
CN112118459A (en) * 2020-08-28 2020-12-22 上海商米科技集团股份有限公司 Method for realizing common live broadcast of multiple apps by sharing camera data and readable medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7979858B2 (en) * 2006-10-03 2011-07-12 Sas Institute Inc. Systems and methods for executing a computer program that executes multiple processes in a multi-processor environment
US8667474B2 (en) * 2009-06-19 2014-03-04 Microsoft Corporation Generation of parallel code representations

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008127194A1 (en) * 2007-04-12 2008-10-23 Yu Zhou Network camera monitoring and data sharing system and method
CN101184195A (en) * 2007-12-25 2008-05-21 腾讯科技(深圳)有限公司 Audio/video living broadcast system and method
CN101833520A (en) * 2009-03-11 2010-09-15 凹凸电子(武汉)有限公司 Method for simultaneously utilizing one camera by computer system and a plurality of application programs
CN103809852A (en) * 2014-02-14 2014-05-21 北京君正集成电路股份有限公司 Method and device for displaying multiple application programs on same screen at same time
CN107659768A (en) * 2017-08-08 2018-02-02 珠海全志科技股份有限公司 A kind of system and method based on the more Application share cameras of Android
CN111767108A (en) * 2020-06-28 2020-10-13 Oppo广东移动通信有限公司 Application program label generation method, application interface display method and device
CN112118459A (en) * 2020-08-28 2020-12-22 上海商米科技集团股份有限公司 Method for realizing common live broadcast of multiple apps by sharing camera data and readable medium

Also Published As

Publication number Publication date
CN113347477A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN113347477B (en) Method, device and system for sharing camera by multiple applications
USRE48494E1 (en) Network accessible projectors that display multiple client screens at once
CN113497945B (en) Live broadcast and configuration method based on cloud mobile phone and related device and system
WO2021185302A1 (en) Live streaming and configuration method based on cloud phones, and related apparatus and system
CN107483812B (en) Multi-platform parallel live broadcast method and device
CN107734286B (en) Video window display method and device
CN114296670A (en) Display equipment and control method for multi-equipment screen projection on same screen display
CN110035294B (en) Processing method and device for live broadcast room, computer readable storage medium and computer equipment
CN113535292A (en) Interface information control method and device, electronic equipment and storage medium
CN112379963A (en) Remote application window control method and device and computer equipment
CN113326075A (en) Method, device and system for running multiple application foreground
US20240100415A1 (en) Game control method and apparatus, and storage medium
CN115904567A (en) Interaction, processing and control method of application service in cloud desktop
CN109195021A (en) Screenshot sharing method and device
CN114445131A (en) Startup advertisement delivery method, startup advertisement playing method, display device and server
CN114915810A (en) Media asset pushing method and intelligent terminal
CN110662082A (en) Data processing method, device, system, mobile terminal and storage medium
JP7331132B2 (en) Application program installation method, operation method, electronic device, computer readable medium
CN114079741B (en) Configuration method and device of video output port, network video recorder and storage medium
CN114173195B (en) Display equipment and method for counting effective playing time of media assets
CN114245191B (en) Split screen social method and related device based on window dynamic information
CN114915818B (en) Media resource pushing method and intelligent terminal
CN117857861A (en) Display equipment and loading method of starting page
WO2022033153A1 (en) Display method and display device
CN111752699B (en) Page switching method, device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant