CN113824888B - Linux-compatible Android camera control method, system, device and medium - Google Patents

Linux-compatible Android camera control method, system, device and medium Download PDF

Info

Publication number
CN113824888B
CN113824888B CN202111390647.6A CN202111390647A CN113824888B CN 113824888 B CN113824888 B CN 113824888B CN 202111390647 A CN202111390647 A CN 202111390647A CN 113824888 B CN113824888 B CN 113824888B
Authority
CN
China
Prior art keywords
camera
android
linux
container
camera control
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
CN202111390647.6A
Other languages
Chinese (zh)
Other versions
CN113824888A (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing Jingling Information System 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 Jingling Information System Technology Co Ltd filed Critical Beijing Jingling Information System Technology Co Ltd
Priority to CN202111390647.6A priority Critical patent/CN113824888B/en
Publication of CN113824888A publication Critical patent/CN113824888A/en
Application granted granted Critical
Publication of CN113824888B publication Critical patent/CN113824888B/en
Priority to PCT/CN2022/133475 priority patent/WO2023093715A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • 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/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image

Abstract

The invention provides a Linux-compatible Android camera control method, a Linux-compatible Android camera control system, a Linux-compatible Android camera control device and a Linux-compatible Android camera control medium, wherein the method comprises the steps of receiving a camera control instruction sent by an Android terminal, which is obtained through an interprocess communication channel; and controlling a camera to execute the operation corresponding to the camera control instruction, and returning the execution result of the camera to the Android terminal through the interprocess communication channel. The method and the device are used for solving the defect that the camera of the Linux operating system cannot be controlled by the Android camera application program in the prior art.

Description

Linux-compatible Android camera control method, system, device and medium
Technical Field
The invention relates to the technical field of computers, in particular to a Linux-compatible Android camera control method, system, device and medium.
Background
With the national emphasis on information network security, more and more operating systems are beginning to consider compatibility and security. Due to the security mechanism of the Linux system, the Linux system is often used as an operating system with high security performance, and in addition, the Android system is the operating system with the highest market share in the current mobile terminal market, and has an excellent ecological environment in the field of mobile terminals. Therefore, the compatibility of the Android application ecology on the Linux operating system becomes a recent research hotspot.
How to use the Linux operating system camera by the compatible Android application program on the Linux operating system is an important issue to be solved in the industry at present.
Disclosure of Invention
The invention provides a Linux-compatible Android camera control method, a Linux-compatible Android camera control system, a Linux-compatible Android camera control device and a Linux-compatible Android camera control medium, which are used for solving the defect that an Android camera application program cannot control a Linux operating system camera in the prior art, and realizing that the Android camera application program can control the Linux operating system camera.
The invention provides a Linux-compatible Android camera control method, which is applied to a Linux end and comprises the following steps:
receiving a camera control instruction sent by an Android terminal and obtained through an interprocess communication channel;
and controlling a camera to execute the operation corresponding to the camera control instruction, and returning the execution result of the camera to the Android terminal through the interprocess communication channel.
According to the Linux-compatible Android camera control method provided by the invention, before receiving the camera control instruction sent by the Android terminal and obtained through the inter-process communication channel, the method further comprises the following steps:
creating a first container, and deploying the camera application corresponding to the Android terminal in the first container;
running the first container after deployment.
According to the Linux-compatible Android camera control method provided by the invention, before receiving the camera control instruction sent by the Android terminal and obtained through the inter-process communication channel, the method further comprises the following steps:
creating a second container, and deploying the camera driver corresponding to the Android terminal in the second container;
running the second container after deployment.
According to the Linux-Android-compatible camera control method provided by the invention, the receiving of the camera control instruction sent by the Android terminal, which is obtained through the interprocess communication channel, comprises the following steps:
receiving the camera control instruction sent by the Android terminal through the interprocess communication channel by using a pre-established proxy service;
the control camera performs operations corresponding to the camera control instructions, including:
and controlling the camera to execute the operation corresponding to the camera control instruction by utilizing the pre-established proxy service.
The invention also provides a Linux-compatible Android camera control method, which is applied to an Android terminal and comprises the following steps:
generating a camera control instruction, and sending the camera control instruction to a Linux end through an inter-process communication channel;
and receiving an execution result corresponding to the camera control instruction, which is returned by the Linux end through the interprocess communication channel.
According to the Linux-Android-compatible camera control method provided by the invention, before the camera control instruction is generated and sent to the Linux end through the inter-process communication channel, the method further comprises the following steps:
creating a camera virtual hardware abstraction layer;
and configuring a communication interface for communicating with the Linux end on the camera virtual hardware abstraction layer, and sending the camera control command to the Linux end through the communication interface.
The invention also provides a Linux-compatible Android camera control system, which comprises: the system comprises a Linux end and an Android end, wherein the Linux end and the Android end communicate through an inter-process communication channel;
the Android end is used for generating a camera control instruction and sending the camera control instruction to the Linux end through the interprocess communication channel;
the Linux end is used for receiving the camera control instruction, controlling a camera to execute the operation corresponding to the camera control instruction, and returning the execution result of the camera to the Android end through the interprocess communication channel;
and the Android end is also used for receiving an execution result which is returned by the Linux end and corresponds to the camera control instruction.
The invention also provides a Linux-compatible Android camera control device, which comprises:
the receiving module is used for receiving a camera control instruction sent by the Android terminal and obtained through an interprocess communication channel;
and the control module is used for controlling a camera to execute the operation corresponding to the camera control instruction and returning the execution result of the camera to the Android terminal through the interprocess communication channel.
The invention also provides a Linux-compatible Android camera control device, which comprises:
the generation module is used for generating a camera control instruction and sending the camera control instruction to a Linux end through an interprocess communication channel;
and the receiving module is used for receiving an execution result which is returned by the Linux end through the interprocess communication channel and corresponds to the camera control instruction.
The present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the above-described methods for Linux-compatible Android camera control applied to a Linux terminal, or the steps of the Linux-compatible Android camera control applied to an Android terminal.
The invention provides a Linux-compatible Android camera control method, a Linux-compatible Android camera control system, a Linux-compatible Android camera control device and a Linux-compatible Android camera control medium, wherein the method is applied to a Linux end and used for receiving a camera control instruction sent by the Android end and obtained through an interprocess communication channel; the method and the device control the camera to execute the operation corresponding to the camera control instruction, and return the execution result of the camera to the Android terminal through the inter-process communication channel.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a Linux-compatible Android camera control method according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating a Linux-compatible Android camera control method according to the present invention;
FIG. 3 is a third schematic flowchart of a Linux-compatible Android camera control method provided in the present invention;
fig. 4 is a fourth flowchart illustrating a Linux-compatible Android camera control method according to the present invention;
FIG. 5A is a fifth flowchart illustrating a Linux-compatible Android camera control method provided by the present invention;
FIG. 5B is a sixth schematic flowchart illustrating a Linux-compatible Android camera control method according to the present invention;
fig. 5C is a seventh schematic flowchart of a Linux-compatible Android camera control method according to the present invention;
fig. 5D is an eighth schematic flowchart of the Linux-compatible Android camera control method provided by the present invention;
FIG. 6 is a structural diagram of a Linux-compatible Android camera control system provided by the present invention;
FIG. 7 is a schematic structural diagram of a Linux-compatible Android camera control device according to the present invention;
FIG. 8 is a second schematic structural diagram of the Linux-compatible Android camera control device according to the present invention;
fig. 9 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The Linux-compatible Android camera control method of the present invention is described below with reference to fig. 1 to 5D.
The following exemplifies a usage scenario of the method.
Specifically, a Linux system is installed in the intelligent terminal, but an Android application program is installed in the Linux system. The intelligent terminal can be a mobile intelligent terminal, such as a portable computer, a tablet, a mobile phone and the like, and can also be a non-mobile intelligent terminal, such as a desktop computer and the like. In the following, the smart terminal is taken as an example of a mobile phone, but it should be noted that the description is only an example and is not intended to limit the scope of the present invention. The other descriptions in the embodiments of the present invention are also for illustration purposes, and are not intended to limit the scope of the present invention.
The embodiment of the invention provides a Linux-Android-compatible camera control method applied to a Linux end, which is specifically realized as shown in fig. 1:
step 101, receiving a camera control instruction sent by an Android terminal, which is obtained through an interprocess communication channel.
In a specific embodiment, a proxy service is created in advance at a Linux end, and a camera control instruction sent by an Android end and obtained through an inter-process communication channel is received by using the pre-created proxy service.
The interprocess communication channel can realize data transmission and information transmission among the processes. Inter-Process Communication (IPC) provides various methods for Inter-Process Communication, such as binder, socket, shared memory, etc.
Specifically, the Linux end receives a camera control instruction sent by the Android end, which is obtained through the IPC. The method specifically comprises the following steps: the Linux end receives the camera control command sent by the Android end obtained through the binder, or the Linux end receives the camera control command sent by the Android end obtained through the socket, or the Linux end receives the camera control command sent by the Android end obtained through the shared memory.
In a specific embodiment, in order to realize compatibility between Linux and Android and enable an application program of an Android end to control a camera of the Linux end, a first container is created at the Linux end, and a camera application corresponding to the Android end is deployed in the first container; and running the deployed first container to realize that the camera application program of the Android terminal can run on the Linux terminal, and further enabling the camera application program of the Android terminal to control a camera driver on the Linux terminal.
Specifically, the camera of the mobile phone may be a camera having a Linux camera drive.
Wherein, when the camera of the mobile phone is a camera driven by a camera of a Linux system, a first container needs to be created, and the first container comprises: camera applications, android camera services, and a camera virtual hardware abstraction layer (camera virtual HAL layer). The first container can run in real time in a state that the mobile phone is started, and can also be started to run when a user needs to use the camera.
When a user uses the camera, the Android terminal is based on the camera application program, a camera control instruction is generated, the camera control instruction is communicated with the proxy service of the Linux terminal through IPC, the camera control instruction is sent to the proxy service of the Linux terminal, and the camera is controlled to execute the operation corresponding to the camera control instruction through the proxy service of the Linux terminal. See in particular fig. 2. In fig. 2, the present invention is divided into layers, where the first container and the proxy service belong to a user space layer, the IPC belongs to a kernel layer, and the camera belongs to a hardware layer.
In a specific embodiment, when the Linux end does not have a camera driver of the Linux system, a second container is created, and the camera driver corresponding to the Android end is deployed in the second container; and running the deployed second container so that the camera application program of the Android end can control the camera driver running in the second container on the Linux end.
Specifically, the camera of the mobile phone may also be a camera driven by a camera of an Android system.
Wherein, when the camera of cell-phone is the camera of the camera drive of Android system, need to establish first container and second container, first container includes: a camera application, an Android camera service, and a camera virtual HAL layer, and the second container includes a camera driver of an Android system. The first container can run in real time when the mobile phone is started, or can be started to run when a user needs to use the camera, and the second container needs to run in real time when the mobile phone is started.
When a user uses the camera, the Android terminal is based on the camera application program, a camera control instruction is generated, the camera control instruction is communicated with the proxy service of the Linux terminal through IPC, the camera control instruction is sent to the proxy service of the Linux terminal, the camera control instruction is sent to the second container through the proxy service of the Linux terminal, and the proxy service of the Linux terminal controls the camera to execute the operation corresponding to the camera control instruction based on the second container. Specifically, referring to fig. 3, in fig. 3, the present invention is divided into layers, where a first container, an agent service, and a second container belong to a user space layer, an IPC belongs to a kernel layer, and a camera belongs to a hardware layer.
And 102, controlling the camera to execute the operation corresponding to the camera control instruction, and returning the execution result of the camera to the Android terminal through the interprocess communication channel.
In a specific embodiment, the pre-created proxy service is used for controlling the camera to execute the operation corresponding to the camera control instruction, and the execution result of the camera is returned to the Android terminal through the interprocess communication channel.
In one embodiment, the camera control instructions include: the method comprises the following steps of starting a camera instruction, closing the camera instruction, previewing the camera instruction, shooting the camera instruction, recording the camera instruction and setting the camera parameter. Based on the camera control instruction, controlling the camera to execute the operation corresponding to the camera control instruction, and returning the execution result of the camera to the Android terminal, wherein the specific implementation is as follows:
when the camera control instruction is a camera opening instruction, controlling the camera to be opened, and returning an execution result of whether the camera is successfully opened to the Android terminal;
when the camera control instruction is a camera closing instruction, controlling the camera to be closed, and returning an execution result of whether the camera is successfully closed to the Android terminal;
when the camera control instruction is a camera preview instruction, controlling the camera to execute an operation corresponding to the camera preview instruction, and returning image data to be previewed to the Android terminal;
when the camera control instruction is a camera shooting instruction, controlling the camera to execute an operation corresponding to the camera shooting instruction, and returning image data shot by the camera to the Android terminal;
when the camera control instruction is a camera video recording instruction, controlling the camera to execute the operation corresponding to the camera video recording instruction, and returning video data recorded by the camera to the Android terminal;
and when the camera control instruction is a camera parameter setting instruction, controlling the camera to configure camera parameters corresponding to the camera parameter setting instruction, and returning an execution result of whether the camera is successfully configured to the Android terminal.
Specifically, when the camera control instruction is a camera opening instruction, an opening success identifier or an opening failure identifier is returned to the Android terminal.
Specifically, when the camera control instruction is a camera parameter setting instruction, a setting success identifier or a setting failure identifier is returned to the Android terminal.
Specifically, when the camera control instruction is a camera preview instruction, the camera preview instruction includes: and when the camera preview instruction is the preview starting instruction, a success identifier or a failure identifier is returned to the Android terminal, and when the success identifier is returned, the image data to be previewed and the success identifier are returned to the Android terminal together. And when the camera preview instruction is a preview stopping instruction, returning a stopping identifier to the Android terminal, and stopping returning the image data to be previewed to the Android terminal.
Specifically, when the camera control instruction is a camera shooting instruction, a success identifier is returned to the Android terminal, and image data which is shot successfully is returned to the Android terminal, or a failure identifier is returned to the Android terminal.
Specifically, when the camera control command is a camera recording command, the camera recording command includes: and when the camera control instruction is the video recording starting instruction, a success identifier or a failure identifier is returned to the Android terminal, and when the success identifier is returned, the shot video data and the success identifier are returned to the Android terminal together. And when the camera video recording instruction is a video recording ending instruction, returning a stop identifier to the Android terminal, and stopping returning video data to the Android terminal.
Specifically, when the camera control instruction is a camera closing instruction, a closing success identifier or a closing failure identifier is returned to the Android terminal.
The method is applied to a Linux end, and the method receives a camera control instruction sent by the Android end through an interprocess communication channel; the method and the device control the camera to execute the operation corresponding to the camera control instruction, and return the execution result of the camera to the Android terminal through the inter-process communication channel.
The embodiment of the invention also provides a Linux-compatible Android camera control method applied to an Android terminal, and the specific implementation of the method is as shown in fig. 4:
step 401, generating a camera control instruction, and sending the camera control instruction to a Linux end through an interprocess communication channel.
In a specific embodiment, a camera virtual hardware abstraction layer is created in the Android in advance; and configuring a communication interface for communicating with the Linux end on the camera virtual hardware abstraction layer, and sending the camera control instruction to the Linux end through the communication interface.
Wherein, on the virtual HAL layer of camera, realize the communication interface that can communicate with Linux end, this communication interface includes: the camera system comprises a camera opening interface, a camera closing interface, a camera preview interface, a camera shooting interface, a camera video recording interface, a camera parameter setting interface and the like.
Specifically, a camera opening instruction is sent to the proxy service of the Linux end through a camera opening interface;
sending a camera closing instruction to proxy service of a Linux end through a camera closing interface;
sending a camera preview instruction to proxy service of a Linux terminal through a camera preview interface;
sending a camera shooting instruction to an agent service of a Linux end through a camera shooting interface;
sending a camera video instruction to an agent service of a Linux end through a camera video interface;
and sending the camera parameter setting instruction to the proxy service of the Linux terminal through the camera parameter setting interface.
And 402, receiving an execution result corresponding to the camera control instruction, which is returned by the Linux end through the interprocess communication channel.
Specifically, an execution result corresponding to the camera control index returned by the proxy service of the Linux end is received.
Specifically, a camera opening interface is used for receiving an opening success identifier or an opening failure identifier returned by the proxy service of the Linux end;
receiving a closing success identifier or a closing failure identifier returned by proxy service of a Linux end through a camera closing interface;
receiving a success identifier and image data to be previewed returned by the proxy service of the Linux end through a camera preview interface, or receiving a failure identifier returned by the proxy service of the Linux end;
receiving a success identifier and image data successfully shot returned by the proxy service of the Linux end through a camera shooting interface, or receiving a failure identifier returned by the proxy service of the Linux end;
receiving a success identifier and a recorded video returned by the proxy service of the Linux end through a camera video interface, or receiving a failure identifier returned by the proxy service of the Linux end, or receiving a stop identifier returned by the proxy service of the Linux end;
and receiving a setting success identifier or a setting failure identifier returned by the proxy service of the Linux terminal through a camera parameter setting interface.
Specifically, when the camera control instruction is a camera preview instruction, the signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is as shown in fig. 5A:
s5101, the camera application sends a camera turn-on instruction to the camera virtual HAL layer.
S5102, the camera virtual HAL layer sends a camera turn-on instruction to the proxy service.
S5103, the proxy service sends a camera turn-on instruction to the camera driver.
S5104, the camera driver returns an execution result to the proxy service, where the execution result includes: a successful turn-on flag or a failed turn-on flag. The execution result is described by taking the successful start flag as an example.
S5105, the proxy service returns a successful turn-on identifier to the camera virtual HAL layer.
S5106, the camera virtual HAL layer returns an open success identifier to the camera application.
S5107, the camera application sends a camera preview instruction to the camera virtual HAL layer.
S5108, the camera virtual HAL layer sends a camera preview instruction to the proxy service.
S5109, the proxy service sends a camera preview instruction to the camera driver.
S5110, the camera driver returns an execution result to the proxy service, where the execution result includes: and (3) the image data to be previewed and the successful identifier or the failed identifier. The following description will take the execution result as the image data to be previewed and the successful identifier as examples.
S5111, the proxy service returns the image data to be previewed and the successful identification to the camera virtual HAL layer.
S5112, the camera virtual HAL layer returns the image data to be previewed and the successful identifier to the camera application.
When the camera control instruction is a camera shooting instruction, a camera video recording instruction and a camera parameter setting instruction, a camera opening instruction needs to be sent to the camera driver, and the description is not repeated below.
Specifically, when the camera control instruction is a camera shooting instruction, a signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in fig. 5B:
s5201, the camera application sends a camera shooting instruction to the camera virtual HAL layer.
S5202, the camera virtual HAL layer sends a camera shooting instruction to the proxy service.
S5203, the proxy service sends a camera shooting instruction to the camera driver.
S5204, the camera driver returns an execution result to the proxy service, wherein the execution result includes: the captured image data is associated with a success flag, or a failure flag. The following description will take the image data captured as the execution result and the success flag as an example.
S5205, the proxy service returns the captured image data and the success identification to the camera virtual HAL layer.
S5206, the camera virtual HAL layer returns the captured image data and the successful identification to the camera application.
Specifically, when the camera control instruction is a camera video recording instruction, a signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in fig. 5C:
s5301, the camera application sends a camera recording instruction to the camera virtual HAL layer.
S5302, the camera virtual HAL layer sends a camera recording instruction to the proxy service.
S5303, the proxy service sends a camera record instruction to the camera driver.
S5304, the camera driver returns an execution result to the proxy service, where the execution result includes: recorded video data or a failure indication. The description will be given by taking the video data recorded as the execution result as an example.
S5305, the proxy service returns the recorded video data to the camera virtual HAL layer.
S5306, the camera virtual HAL layer returns the recorded video data to the camera application.
Specifically, when the camera control instruction is a camera video recording instruction, a signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in fig. 5D:
s5401, the camera application sends a camera parameter setting instruction to the camera virtual HAL layer.
S5402, the camera virtual HAL layer sends a camera parameter setting instruction to the proxy service.
S5403, the proxy service sends a camera parameter setting instruction to the camera driver.
S5404, the camera driver returns an execution result to the proxy service, where the execution result includes: setting a success flag or setting a failure flag. The description will be given by taking the execution result as the setting success flag.
S5405, the proxy service returns a set success flag to the camera virtual HAL layer.
S5406, the camera virtual HAL layer returns a setting success flag to the camera application.
The invention provides a Linux-compatible Android camera control method, a Linux-compatible Android camera control system, a Linux-compatible Android camera control device and a Linux-compatible Android camera control medium, wherein the method is applied to an Android terminal; and receiving an execution result corresponding to the camera control instruction, which is returned by the Linux end through the inter-process communication channel, so that the communication between the Linux end and the Android end is realized by using the inter-process communication channel, the camera control instruction generated by the Android end can be sent to the Linux end, the execution result returned by the Linux end is received, and the aim that the camera application program of the Android can control the camera of the Linux operating system is fulfilled.
The Linux-Android-compatible camera control system provided by the present invention is described below, where the Linux-Android-compatible camera control system described below and the Linux-Android-compatible camera control method described above may be referred to in a mutually corresponding manner, and repeated portions are not described again, and specifically as shown in fig. 6, the system includes: the system comprises a Linux end 601 and an Android end 602, wherein the Linux end 601 and the Android end 602 communicate through an inter-process communication channel;
the Android terminal 601 is used for generating a camera control instruction and sending the camera control instruction to the Linux terminal 602 through the interprocess communication channel;
the Linux end 602 is configured to receive the camera control instruction, control the camera to execute an operation corresponding to the camera control instruction, and return an execution result of the camera to the Android end 601 through the inter-process communication channel;
the Android terminal 601 is further configured to receive an execution result corresponding to the camera control instruction, where the execution result is returned by the Linux terminal 602.
In a specific embodiment, the Android terminal 601 is further configured to create a camera virtual hardware abstraction layer; on the camera virtual hardware abstraction layer, a communication interface for communicating with the Linux end 602 is configured, and the camera control instruction is sent to the Linux end 602 through the communication interface.
In a specific embodiment, the Linux end 602 is further configured to create a first container, and deploy a camera application corresponding to the Android end 601 in the first container; the deployed first container is run.
In a specific embodiment, the Linux end 602 is further configured to create a second container, and deploy a camera driver corresponding to the Android end 601 in the second container; the deployed second container is run.
In a specific embodiment, the Linux end 602 is specifically configured to receive, by using a pre-created proxy service, a camera control instruction sent by the Android end and obtained through an inter-process communication channel; and controlling the camera to execute the operation corresponding to the camera control instruction by using the pre-created proxy service.
The Linux-Android-compatible camera control device provided by the present invention is described below, and the Linux-Android-compatible camera control device described below and the Linux-Android-compatible camera control method described above may be referred to in a corresponding manner, and repeated parts are not described again, and specifically as shown in fig. 7, the device includes:
the receiving module 701 is used for receiving a camera control instruction sent by an Android terminal, which is obtained through an interprocess communication channel;
and the control module 702 is configured to control the camera to execute an operation corresponding to the camera control instruction, and return an execution result of the camera to the Android terminal through the inter-process communication channel.
The following describes another Linux-Android-compatible camera control device provided by the present invention, where the Linux-Android-compatible camera control device described below and the Linux-Android-compatible camera control method described above may be referred to in a corresponding manner, and repeated points are not described again, and specifically as shown in fig. 8, the device includes:
the generation module 801 is configured to generate a camera control instruction, and send the camera control instruction to a Linux end through an interprocess communication channel;
a receiving module 802, configured to receive an execution result, corresponding to the camera control instruction, returned by the Linux end through the inter-process communication channel.
Fig. 9 illustrates a physical structure diagram of an electronic device, and as shown in fig. 9, the electronic device may include: a processor (processor)901, a communication Interface (Communications Interface)902, a memory (memory)903 and a communication bus 904, wherein the processor 901, the communication Interface 902 and the memory 903 are in communication with each other via the communication bus 904. The processor 901 may call logic instructions in the memory 903 to execute a Linux-compatible Android camera control method applied to a Linux side, where the method includes: receiving a camera control instruction sent by an Android terminal and obtained through an interprocess communication channel; controlling a camera to execute an operation corresponding to a camera control instruction, and returning an execution result of the camera to an Android terminal through an inter-process communication channel, or executing a Linux-compatible Android camera control method applied to the Android terminal, wherein the method comprises the following steps: generating a camera control instruction, and sending the camera control instruction to a Linux end through an interprocess communication channel; and receiving an execution result corresponding to the camera control instruction, which is returned by the Linux end through the interprocess communication channel.
In addition, the logic instructions in the memory 903 may be implemented in a software functional unit and stored in a computer readable storage medium when the logic instructions are sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to execute the Linux-compatible Android camera control method applied to the Linux side provided by the above methods, the method comprising: receiving a camera control instruction sent by an Android terminal and obtained through an interprocess communication channel; controlling a camera to execute an operation corresponding to a camera control instruction, and returning an execution result of the camera to an Android terminal through an inter-process communication channel, or a Linux-compatible Android camera control method applied to the Android terminal, wherein the method comprises the following steps: generating a camera control instruction, and sending the camera control instruction to a Linux end through an interprocess communication channel; and receiving an execution result corresponding to the camera control instruction, which is returned by the Linux end through the interprocess communication channel.
The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the above-mentioned Linux-compatible Android camera control methods applied to a Linux terminal, the method comprising: receiving a camera control instruction sent by an Android terminal and obtained through an interprocess communication channel; controlling a camera to execute an operation corresponding to a camera control instruction, and returning an execution result of the camera to an Android terminal through an inter-process communication channel, or a Linux-compatible Android camera control method applied to the Android terminal, wherein the method comprises the following steps: generating a camera control instruction, and sending the camera control instruction to a Linux end through an interprocess communication channel; and receiving an execution result corresponding to the camera control instruction, which is returned by the Linux end through the interprocess communication channel.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
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 will 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 (7)

1. A camera control method compatible with Android through Linux is characterized by being applied to a Linux end, and comprises the following steps:
when a camera driver of a Linux system exists, creating a first container, and deploying a camera application, an Android camera service and a camera virtual hardware abstraction layer corresponding to an Android terminal in the first container; running the first container after deployment;
when camera drivers of an Android system exist, creating a first container and a second container, deploying the camera application, the Android camera service and the camera virtual hardware abstraction layer corresponding to the Android terminal in the first container, and deploying the camera drivers corresponding to the Android terminal in the second container; running the first and second containers after deployment;
receiving a camera control instruction sent by an Android terminal and obtained through an interprocess communication channel;
and controlling a camera to execute the operation corresponding to the camera control instruction, and returning the execution result of the camera to the Android terminal through the interprocess communication channel.
2. The Linux-compatible Android camera control method of claim 1, wherein the receiving the camera control command sent by the Android via the interprocess communication channel comprises:
receiving the camera control instruction sent by the Android terminal through the interprocess communication channel by using a pre-established proxy service;
the control camera performs operations corresponding to the camera control instructions, including:
and controlling the camera to execute the operation corresponding to the camera control instruction by utilizing the pre-established proxy service.
3. A camera control method compatible with Android in Linux is applied to an Android terminal and comprises the following steps:
generating a camera control instruction, and sending the camera control instruction to a Linux end through an interprocess communication channel;
receiving an execution result corresponding to the camera control instruction, which is returned by the Linux end through the interprocess communication channel;
before generating the camera control instruction and sending the camera control instruction to the Linux end through the inter-process communication channel, the method further includes:
creating a camera virtual hardware abstraction layer;
configuring a communication interface communicated with the Linux end on the camera virtual hardware abstraction layer, and sending the camera control instruction to the Linux end through the communication interface;
the method comprises the steps that a Linux end is used for creating a first container when a camera driver of a Linux system exists, and deploying camera application, Android camera service and a camera virtual hardware abstraction layer corresponding to the Android end in the first container; the deployed first container is operated, when a camera driver of an Android system exists, the first container and a second container are created, the camera application, the Android camera service and the camera virtual hardware abstraction layer corresponding to the Android end are deployed in the first container, and the camera driver corresponding to the Android end is deployed in the second container; operating the first and second containers after deployment.
4. A Linux-compatible Android camera control system, comprising: the system comprises a Linux end and an Android end, wherein the Linux end and the Android end are communicated through an inter-process communication channel;
the Android end is used for generating a camera control instruction and sending the camera control instruction to the Linux end through the interprocess communication channel;
the Linux end is used for receiving the camera control instruction, controlling a camera to execute the operation corresponding to the camera control instruction, and returning the execution result of the camera to the Android end through the interprocess communication channel;
the Android end is further used for receiving an execution result corresponding to the camera control instruction, and the execution result is returned by the Linux end;
the Linux end is further used for creating a first container when a camera driver of the Linux system exists, and deploying the camera application, the Android camera service and the camera virtual hardware abstraction layer corresponding to the Android end in the first container; running the first container after deployment;
the Linux end is further configured to create the first container and a second container when a camera driver of an Android system exists, deploy the camera application, the Android camera service, and the camera virtual hardware abstraction layer corresponding to the Android end in the first container, and deploy the camera driver corresponding to the Android end in the second container; running the first and second containers after deployment;
the Android end is also used for creating a camera virtual hardware abstraction layer; and configuring a communication interface for communicating with the Linux end on the camera virtual hardware abstraction layer, and sending the camera control instruction to the Linux end through the communication interface.
5. A Linux-compatible Android camera control device is characterized by comprising:
the receiving module is used for receiving a camera control instruction sent by the Android terminal and obtained through the interprocess communication channel;
the control module is used for controlling a camera to execute the operation corresponding to the camera control instruction and returning the execution result of the camera to the Android terminal through the interprocess communication channel;
the receiving module is further configured to create a first container when a camera driver of the Linux system exists, and deploy a camera application, an Android camera service, and a camera virtual hardware abstraction layer corresponding to an Android terminal in the first container; running the first container after deployment;
the receiving module is further configured to create the first container and a second container when a camera driver of an Android system exists, deploy the camera application, the Android camera service, and the camera virtual hardware abstraction layer corresponding to the Android terminal in the first container, and deploy the camera driver corresponding to the Android terminal in the second container; operating the first and second containers after deployment.
6. A Linux-compatible Android camera control device is characterized by comprising:
the generation module is used for generating a camera control instruction and sending the camera control instruction to a Linux end through an interprocess communication channel;
the receiving module is used for receiving an execution result which is returned by the Linux end through the interprocess communication channel and corresponds to the camera control instruction;
the generation module is further used for creating a camera virtual hardware abstraction layer; configuring a communication interface communicated with the Linux end on the camera virtual hardware abstraction layer, and sending the camera control instruction to the Linux end through the communication interface;
the method comprises the steps that a Linux end is used for creating a first container when a camera driver of a Linux system exists, and deploying camera application, Android camera service and a camera virtual hardware abstraction layer corresponding to the Android end in the first container; the deployed first container is operated, when a camera driver of an Android system exists, the first container and a second container are created, the camera application, the Android camera service and the camera virtual hardware abstraction layer corresponding to the Android end are deployed in the first container, and the camera driver corresponding to the Android end is deployed in the second container; running the first container and the second container after deployment.
7. A non-transitory computer readable storage medium, having stored thereon a computer program, wherein the computer program, when being executed by a processor, implements the steps of the Linux-compatible Android camera control method for Linux peer as claimed in any one of claims 1 to 2, or implements the Linux-compatible Android camera control method for Android peer as claimed in claim 3.
CN202111390647.6A 2021-11-23 2021-11-23 Linux-compatible Android camera control method, system, device and medium Active CN113824888B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111390647.6A CN113824888B (en) 2021-11-23 2021-11-23 Linux-compatible Android camera control method, system, device and medium
PCT/CN2022/133475 WO2023093715A1 (en) 2021-11-23 2022-11-22 Camera control method, system and apparatus for achieving compatibility between linux and android, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111390647.6A CN113824888B (en) 2021-11-23 2021-11-23 Linux-compatible Android camera control method, system, device and medium

Publications (2)

Publication Number Publication Date
CN113824888A CN113824888A (en) 2021-12-21
CN113824888B true CN113824888B (en) 2022-06-17

Family

ID=78919673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111390647.6A Active CN113824888B (en) 2021-11-23 2021-11-23 Linux-compatible Android camera control method, system, device and medium

Country Status (2)

Country Link
CN (1) CN113824888B (en)
WO (1) WO2023093715A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113824888B (en) * 2021-11-23 2022-06-17 北京鲸鲮信息系统技术有限公司 Linux-compatible Android camera control method, system, device and medium
CN113986368A (en) * 2021-12-29 2022-01-28 北京鲸鲮信息系统技术有限公司 Linux-based camera control method, device, equipment and storage medium
CN117176705B (en) * 2023-11-03 2024-01-26 成都阿加犀智能科技有限公司 Industrial camera video stream display method, device, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342422A (en) * 2021-06-29 2021-09-03 技德技术研究所(武汉)有限公司 Linux-compatible Android multi-application camera access method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9830176B2 (en) * 2013-04-19 2017-11-28 The Trustees Of Columbia University In The City Of New York Methods, systems, and media for binary compatible graphics support in mobile operating systems
KR101960443B1 (en) * 2014-08-20 2019-03-20 쿠앙치 인텔리전트 포토닉 테크놀로지 리미티드 Method and module in operating system for controlling hardware device
CN108762815B (en) * 2018-05-16 2021-01-01 北京麟卓信息科技有限公司 Method for realizing Android running environment based on non-virtualization system architecture
CN111290827B (en) * 2018-12-07 2023-09-08 华为技术有限公司 Data processing method, device and server
CN110618876B (en) * 2019-03-21 2023-05-23 麒麟软件有限公司 Linux and Android coexistence and interaction method based on Feiteng platform and shared kernel
CN112068968B (en) * 2019-06-11 2022-10-18 成都鼎桥通信技术有限公司 Service access method and device for dual-system terminal
CN112099923B (en) * 2020-11-17 2021-02-05 江苏北弓智能科技有限公司 Android virtualization system running on Linux operating system
CN113590363B (en) * 2021-09-26 2022-02-25 北京鲸鲮信息系统技术有限公司 Data transmission method, device, electronic equipment and storage medium
CN113824888B (en) * 2021-11-23 2022-06-17 北京鲸鲮信息系统技术有限公司 Linux-compatible Android camera control method, system, device and medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342422A (en) * 2021-06-29 2021-09-03 技德技术研究所(武汉)有限公司 Linux-compatible Android multi-application camera access method and device

Also Published As

Publication number Publication date
CN113824888A (en) 2021-12-21
WO2023093715A1 (en) 2023-06-01

Similar Documents

Publication Publication Date Title
CN113824888B (en) Linux-compatible Android camera control method, system, device and medium
EP3016354A1 (en) Cloud-service-based data backup and operation method
EP3902239A1 (en) Camera sharing method and apparatus
CN112612536B (en) Method and device for controlling camera shooting based on Android application program in Linux system
CN113990354B (en) Audio control method, device, equipment and storage medium based on Linux
CN114422618B (en) Cloud-protogenesis-based IOT platform protocol adaptation method, device, equipment and medium
CN112764823B (en) Starting method of NVR (network video recorder) system, host operating system and data communication method
CN110138753B (en) Distributed message service system, method, apparatus, and computer-readable storage medium
CN112313614B (en) Method, device and system for printing file in virtual machine by using terminal equipment
CN105049964A (en) Loss monitoring method of user terminal and user terminal
CN105718302A (en) Docker based method for realizing operation system of redundant exchanger
CN108234174B (en) Management method and device of virtual network function
CN114302055A (en) Linux-based camera control method, device, equipment and storage medium
WO2023124007A1 (en) Linux-based camera control method and apparatus, and device and storage medium
CN115629809A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111045787B (en) Rapid continuous experiment method and system
CN114020457A (en) OpenStack deployment method and device and electronic equipment
CN109756362B (en) Integrated processing method and device for third-party security component
CN113268272A (en) Application delivery method, device and system based on private cloud
CN113504872A (en) Method, system, equipment and medium for mounting virtual disk on cloud physical machine
CN111901902B (en) Mobile base station and corresponding service processing method and storage medium
CN117055880B (en) Document transcoding method, device and storage medium based on containerized deployment
CN115904404A (en) Application management method, device, equipment, medium and computer program product
CN112135052B (en) Desktop cloud-based photographing system and method
CN112181676B (en) Method, device, terminal equipment and readable storage medium for sharing recording data

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220610

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address before: 2005, floor 2, No. 39, West Street, Haidian District, Beijing 100082

Applicant before: Beijing jingling Information System Technology Co.,Ltd.