WO2023093715A1 - Camera control method, system and apparatus for achieving compatibility between linux and android, and medium - Google Patents

Camera control method, system and apparatus for achieving compatibility between linux and android, and medium Download PDF

Info

Publication number
WO2023093715A1
WO2023093715A1 PCT/CN2022/133475 CN2022133475W WO2023093715A1 WO 2023093715 A1 WO2023093715 A1 WO 2023093715A1 CN 2022133475 W CN2022133475 W CN 2022133475W WO 2023093715 A1 WO2023093715 A1 WO 2023093715A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
linux
android
camera control
inter
Prior art date
Application number
PCT/CN2022/133475
Other languages
French (fr)
Chinese (zh)
Inventor
张兴涛
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023093715A1 publication Critical patent/WO2023093715A1/en

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

Definitions

  • the present application relates to the field of computer technology, for example, to a Linux-compatible Android camera control method, system, device and medium.
  • the Linux system is often used as an operating system with high security performance.
  • the Android system is currently the operating system with the highest market share in the mobile terminal market, and has an excellent ecological environment in the field of mobile terminals. Therefore, the compatibility of the Android application ecosystem on the Linux operating system has become a recent research hotspot.
  • This application provides a Linux-compatible Android camera control method, system, device, and medium to solve the defect that the Android camera application program cannot control the Linux operating system camera in the related art, and realize that the Android camera application program can control the Linux operating system Camera.
  • This application provides a Linux-compatible Android camera control method, which is applied to the Linux side, and the method includes:
  • the camera is controlled 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 inter-process communication channel.
  • the present application also provides a Linux-compatible Android camera control method, which is applied to the Android side, and the method includes:
  • the present application also provides a Linux-compatible Android camera control system, comprising: a Linux terminal and an Android terminal, wherein the Linux terminal and the Android terminal communicate through an inter-process communication channel;
  • the Android end is configured to generate a camera control instruction, and send the camera control instruction to the Linux end through the inter-process communication channel;
  • the Linux end is configured to receive the camera control instruction, control the camera to perform an operation corresponding to the camera control instruction, and return an execution result of the camera to the Android end through the inter-process communication channel;
  • the Android end is further configured to receive an execution result corresponding to the camera control instruction returned by the Linux end.
  • the application also provides a Linux-compatible Android camera control device, including:
  • the receiving module is configured to receive the camera control command sent by the Android end obtained through the inter-process communication channel;
  • the control module is configured to 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 application also provides a Linux-compatible Android camera control device, including:
  • a generating module configured to generate camera control instructions, and send the camera control instructions to the Linux end through an inter-process communication channel
  • the receiving module is configured to receive the execution result corresponding to the camera control instruction returned by the Linux terminal through the inter-process communication channel.
  • the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the implementation of any one of the above-mentioned Linux-compatible Android camera control methods applied to the Linux side is implemented. Steps, or steps of a Linux-compatible Android camera control method applied to an Android side.
  • Fig. 1 is one of the flow diagrams of the Linux-compatible Android camera control method provided by the present application
  • Fig. 2 is the second schematic flow diagram of the Linux-compatible Android camera control method provided by the present application.
  • Fig. 3 is the third schematic flow diagram of the Linux-compatible Android camera control method provided by the present application.
  • Fig. 4 is the fourth schematic flow diagram of the Linux-compatible Android camera control method provided by the present application.
  • FIG. 5A is the fifth schematic flow diagram of the Linux-compatible Android camera control method provided by the present application.
  • FIG. 5B is the sixth schematic flow diagram of the Linux-compatible Android camera control method provided by the present application.
  • FIG. 5C is the seventh schematic flow diagram of the Linux-compatible Android camera control method provided by the present application.
  • FIG. 5D is the eighth schematic flow diagram of the Linux-compatible Android camera control method provided by the present application.
  • Fig. 6 is the structural representation of the Linux compatible Android camera control system that the application provides;
  • Fig. 7 is one of the structural representations of the Linux-compatible Android camera control device provided by the present application.
  • Fig. 8 is the second structural diagram of the Linux-compatible Android camera control device provided by the present application.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by the present application.
  • the Linux-compatible Android camera control method of the present application is described below with reference to FIG. 1-FIG. 5D.
  • a Linux system is installed in the smart terminal, but an Android application program is installed in the Linux system.
  • the smart terminal may be a mobile smart terminal, such as a laptop computer, a tablet, or a mobile phone, or may be a non-mobile smart terminal, such as a desktop computer.
  • the smart terminal is taken as an example for illustration, but it should be noted that it is only for illustration and is not used to limit the scope of protection of the present application. Some other descriptions in the embodiments of the present application are also examples, and are not used to limit the protection scope of the present application, and will not be described one by one later.
  • the embodiment of the present application provides a Linux-compatible Android camera control method applied on the Linux side, as shown in Figure 1:
  • Step 101 receiving a camera control command sent by an Android terminal obtained through an inter-process communication channel.
  • a proxy service is pre-created on the Linux side, and the pre-created proxy service is used to receive the camera control instruction sent by the Android side obtained through the inter-process communication channel.
  • inter-process communication channel can realize data transmission and information transmission between processes.
  • Inter-Process Communication provides a variety of inter-process communication methods, such as binder, socket (socket), shared memory (shared memory), etc.
  • the Linux end receives the camera control instruction sent by the Android end obtained through the IPC, including: the Linux end receives the camera control instruction sent by the Android end obtained through the binder, or the Linux end receives the camera sent by the Android end obtained through the socket Control command, or, the Linux side receives the camera control command sent by the Android side obtained through shared memory.
  • the application program of Android end in order to realize the compatibility of Linux and Android, and make the application program of Android end can control the camera of Linux end, create the first container at Linux end, the camera application corresponding to Android end is deployed in the first container; Run deployment After the first container, the camera application program on the Android side can run on the Linux side, and then the camera application program on the Android side can control the camera driver on the Linux side.
  • the camera of the mobile phone may be a camera with a Linux camera driver.
  • a first container when the camera of the mobile phone is a camera driven by a Linux system, a first container needs to be created, and the first container includes: camera application program, Android camera service and camera virtual hardware abstraction layer (Hardware Abstract Layer, HAL).
  • the first container can run in real time when the mobile phone is turned on, and can also start running when the user needs to use the camera.
  • the camera control command is generated on the Android side based on the camera application program, communicates with the proxy service on the Linux side through IPC, sends the camera control command to the proxy service on the Linux side, and controls the camera to execute and communicate with the proxy service on the Linux side. Operations corresponding to camera control commands.
  • the application is divided into layers in FIG. 2 , the first container and proxy service belong to the user space layer, the IPC belongs to the kernel layer, and the camera belongs to the hardware layer.
  • a second container is created, and the camera driver corresponding to the Android side is deployed in the second container; the deployed second container is run to make the camera on the Android side
  • the application can control the camera driver running in a second container on the Linux side.
  • the camera of the mobile phone may also be a camera driven by a camera of the Android system.
  • the first container includes: the camera application program, the Android camera service and the camera virtual HAL layer
  • the second container includes the Android System camera driver.
  • the first container can run in real time when the mobile phone is turned on, or can be started and run when the user needs to use the camera, and the second container needs to be run in real time when the mobile phone is turned on.
  • the camera control command is generated on the Android side based on the camera application program, communicates with the proxy service on the Linux side through IPC, sends the camera control command to the proxy service on the Linux side, and sends the camera control command through the proxy service on the Linux side Send to the second container, based on the second container, make the proxy service on the Linux side control the camera to perform the operation corresponding to the camera control instruction.
  • the application is divided into layers in FIG. 3 , the first container, the proxy service, and the second container belong to the user space layer, IPC belongs to the kernel layer, and the camera belongs to the hardware layer.
  • Step 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 inter-process communication channel.
  • the pre-created proxy service is used to 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 camera control instruction includes: a camera opening instruction, a camera closing instruction, a camera preview instruction, a camera shooting instruction, a camera recording instruction, and a camera parameter setting instruction. Based on the camera control command, control the camera to perform the operation corresponding to the camera control command, and return the execution result of the camera to the Android side as follows:
  • the camera control command is a camera preview command
  • the camera control command is a camera shooting command
  • the camera control command is a camera recording command
  • the camera control command is a camera parameter setting command
  • control the camera to configure the camera parameters corresponding to the camera parameter setting command, and return the execution result of whether the camera configuration is successful to the Android side.
  • the camera control instruction is an instruction to turn on the camera
  • an indication of successful opening or an indication of failure to open is returned to the Android side.
  • the camera control command is a camera parameter setting command
  • an indication of a successful setting or an indication of a failed setting is returned to the Android side.
  • the camera preview instruction when the camera control instruction is a camera preview instruction, the camera preview instruction includes: a start preview instruction and a stop preview instruction, and when the camera preview instruction is a start preview instruction, a success or failure identifier is returned to the Android side, and, when When returning the successful identification, the image data to be previewed and the successful identification are returned to the Android side together.
  • the camera preview instruction is a stop preview instruction, return the stop sign to the Android end, and stop returning the image data to be previewed to the Android end.
  • the camera control instruction is a camera shooting instruction
  • return a success indication to the Android end and return the successfully captured image data to the Android end at the same time, or return a failure indication to the Android end.
  • the camera video recording command when the camera control command is a camera video recording command, includes: start video recording command and end video recording command, when the camera control command is a start video recording command, return a success identification or a failure identification to the Android side, and, when When returning the successful identification, return the captured video data and the successful identification to the Android side together.
  • the camera recording command is an end recording command, return a stop sign to the Android end, and stop returning video data to the Android end.
  • the camera control instruction is an instruction to close the camera
  • an indication of successful closing or an indication of closing failure is returned to the Android side.
  • the Linux-compatible Android camera control method, system, device and medium provided by the application is applied to the Linux side, the application receives the camera control command sent by the Android side obtained through the inter-process communication channel; the control camera execution and camera control The operation corresponding to the instruction, and the execution result of the camera is returned to the Android end through the inter-process communication channel.
  • this application uses the inter-process communication channel to realize the communication between the Linux end and the Android end, so as to be able to send the camera control commands generated by the Android end to the Linux side, so that the Linux side controls the camera to perform corresponding operations based on the camera control command, and realizes the purpose that the camera application program of Android can control the camera of the Linux operating system.
  • the embodiment of the present application also provides a Linux-compatible Android camera control method applied on the Android side, as shown in Figure 4:
  • Step 401 generate a camera control command, and send the camera control command to the Linux side through an inter-process communication channel.
  • a camera virtual hardware abstraction layer is created in Android in advance; and on the camera virtual hardware abstraction layer, a communication interface for communicating with the Linux side is configured, and the camera control instructions are sent to the Linux side through the communication interface.
  • a communication interface capable of communicating with the Linux terminal is configured on the camera virtual HAL, and the communication interface includes: a camera opening interface, a camera closing interface, a camera preview interface, a camera shooting interface, a camera recording interface, and a camera parameter setting interface.
  • the interface is opened through the camera, and the command to open the camera is sent to the proxy service on the Linux side;
  • the camera shooting command is sent to the agent service on the Linux side;
  • the camera video command is sent to the proxy service on the Linux side;
  • the camera parameter setting command is sent to the proxy service on the Linux side.
  • Step 402 receiving the execution result corresponding to the camera control command returned by the Linux terminal through the inter-process communication channel.
  • the execution result corresponding to the camera control instruction returned by the proxy service on the Linux side is received.
  • 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 shown in Figure 5A:
  • the camera application program sends a camera start instruction to the camera virtual HAL layer.
  • the virtual HAL layer of the camera sends an instruction to enable the camera to the proxy service.
  • the proxy service sends an instruction to start the camera to the camera driver.
  • the camera driver returns an execution result to the proxy service, wherein the execution result includes: enabling a successful flag or enabling a failed flag. Among them, the execution result is described by taking the successful flag as an example.
  • the proxy service returns an activation success flag to the virtual HAL layer of the camera.
  • the virtual HAL layer of the camera returns an indication of successful activation to the camera application program.
  • the camera application program sends a camera preview instruction to the camera virtual HAL layer.
  • the camera virtual HAL layer sends a camera preview instruction to the proxy service.
  • the proxy service sends a camera preview instruction to the camera driver.
  • the camera driver returns an execution result to the proxy service, wherein the execution result includes: the image data to be previewed and a success mark, or a failure mark.
  • the execution result is the image data to be previewed and the successful identification as an example for illustration.
  • the proxy service returns the image data to be previewed and the success identifier to the virtual HAL layer of the camera.
  • the virtual HAL layer of the camera returns the image data to be previewed and the success identifier to the camera application program.
  • the camera control command is a camera shooting command, a camera recording command, or a camera parameter setting command
  • the camera control instruction is a camera shooting instruction
  • the signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in Figure 5B:
  • the camera application program sends a camera shooting instruction to the camera virtual HAL layer.
  • the camera virtual HAL layer sends a camera shooting instruction to the proxy service.
  • the proxy service sends a camera shooting instruction to the camera driver.
  • the camera driver returns an execution result to the proxy service, wherein the execution result includes: captured image data and a success identifier, or a failure identifier.
  • the execution result is the captured image data and the successful identification as an example for illustration.
  • the proxy service returns the captured image data and the success identifier to the virtual HAL layer of the camera.
  • the virtual HAL layer of the camera returns the captured image data and the success identifier to the camera application program.
  • the camera control instruction is a camera recording instruction
  • the signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in Figure 5C:
  • the camera application program sends a camera video recording instruction to the camera virtual HAL layer.
  • the camera virtual HAL layer sends a camera video recording instruction to the proxy service.
  • the proxy service sends a camera recording command to the camera driver.
  • the camera driver returns an execution result to the proxy service, where the execution result includes: recorded video data or a failure identification.
  • the execution result is recorded video data as an example for illustration.
  • the proxy service returns the recorded video data to the virtual HAL layer of the camera.
  • the camera virtual HAL layer returns the recorded video data to the camera application program.
  • the camera control instruction is a camera recording instruction
  • the signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in Figure 5D:
  • the camera application program sends a camera parameter setting instruction to the camera virtual HAL layer.
  • the camera virtual HAL layer sends a camera parameter setting instruction to the proxy service.
  • the proxy service sends a camera parameter setting instruction to the camera driver.
  • the camera driver returns an execution result to the proxy service, wherein the execution result includes: a setting success flag or a setting failure flag.
  • the execution result is the setting success flag as an example for illustration.
  • the proxy service returns an indication of successful setting to the virtual HAL layer of the camera.
  • the virtual HAL layer of the camera returns an indication of successful setting to the camera application program.
  • the Linux-compatible Android camera control method, system, device and medium provided by the present application the method is applied to the Android terminal, the application generates the camera control command, and sends the camera control command to the Linux terminal through the inter-process communication channel; Receiving the execution result corresponding to the camera control instruction returned by the Linux end through the inter-process communication channel, it can be seen that the application utilizes the inter-process communication channel to realize the communication between the Linux end and the Android end, so that the camera generated by the Android end can The control command is sent to the Linux side, and the execution result returned by the Linux side is received, realizing the purpose that the Android camera application program can control the camera of the Linux operating system.
  • the Linux-compatible Android camera control system provided by this application is described below.
  • the Linux-compatible Android camera control system described below and the Linux-compatible Android camera control method described above can be referred to each other.
  • the system includes: a Linux end 601 and an Android end 602, and the Linux end 601 and the Android end 602 communicate through an inter-process communication channel;
  • the Android end 601 is configured to generate camera control instructions, and send the camera control instructions to the Linux end 602 through an inter-process communication channel;
  • the Linux end 602 is set to receive the camera control instruction, control the camera to perform the operation corresponding to the camera control instruction, and return the execution result of the camera to the Android end 601 through the inter-process communication channel;
  • the Android terminal 601 is also configured to receive the execution result corresponding to the camera control command returned by the Linux terminal 602 .
  • the Android end 601 is also configured to create a camera virtual hardware abstraction layer; on the camera virtual hardware abstraction layer, configure a communication interface communicating with the Linux end 602, and send camera control instructions to the Linux end through the communication interface 602.
  • the Linux terminal 602 is further configured to create a first container, deploy the camera application corresponding to the Android terminal 601 in the first container, and run the deployed first container.
  • the Linux terminal 602 is further configured to create a second container, deploy the camera driver corresponding to the Android terminal 601 in the second container, and run the deployed second container.
  • the Linux terminal 602 is configured to use the pre-created proxy service to receive the camera control command sent by the Android terminal obtained through the inter-process communication channel; to use the pre-created proxy service to control the camera to execute the corresponding camera control command operation.
  • the Linux-compatible Android camera control device provided by this application is described below.
  • the Linux-compatible Android camera control device described below and the Linux-compatible Android camera control method described above can be referred to each other. As shown in Figure 7, the device includes:
  • the receiving module 701 is configured to receive the camera control instruction sent by the Android end obtained through the inter-process communication channel;
  • the control module 702 is configured to 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 following describes another Linux-compatible Android camera control device provided by this application.
  • the Linux-compatible Android camera control device described below and the Linux-compatible Android camera control method described above can be referred to each other, and the repetitions will not be repeated.
  • the device includes:
  • the generating module 801 is configured to generate a camera control command, and send the camera control command to the Linux side through an inter-process communication channel;
  • the receiving module 802 is configured to receive an execution result corresponding to the camera control instruction returned by the Linux terminal through the inter-process communication channel.
  • FIG. 9 illustrates a schematic diagram of the physical structure of an electronic device.
  • 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 communicate with each other through the communication bus 904 .
  • the processor 901 can call the logic instructions in the memory 903 to execute a Linux-compatible Android camera control method applied to the Linux side.
  • the method includes: receiving a camera control command sent by the Android side obtained through an inter-process communication channel; The operation corresponding to the camera control command, and return the execution result of the camera to the Android side through the inter-process communication channel, or execute the Linux-compatible Android camera control method applied to the Android side, the method includes: generating the camera control command, and passing the process The inter-process communication channel sends the camera control command to the Linux side; receives the execution result corresponding to the camera control command returned by the Linux side through the inter-process communication channel.
  • the above logic instructions in the memory 903 may be implemented in the form of software functional units and when sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the computer software product is stored in a storage medium, including several
  • the instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: various media that can store program codes such as U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
  • the present application also provides a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer, the computer A Linux-compatible Android camera control method applied to the Linux terminal provided by the above methods, the method comprising: receiving a camera control command sent by the Android terminal obtained through an inter-process communication channel; controlling the camera to perform operations corresponding to the camera control command , and return the execution result of the camera to the Android side through the inter-process communication channel, or, a Linux-compatible Android camera control method applied to the Android side, the method includes: generating a camera control command, and sending the camera control command through the inter-process communication channel Send to the Linux side; receive the execution result corresponding to the camera control command returned by the Linux side through the inter-process communication channel.
  • the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for controlling a Linux-compatible Android camera applied to a Linux terminal provided by the above-mentioned methods is implemented.
  • the Linux on the end is compatible with the camera control method of Android, the method includes: generating a camera control instruction, and sending the camera control instruction to the Linux end through the inter-process communication channel; receiving the execution corresponding to the camera control instruction returned by the Linux end through the inter-process communication channel result.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative efforts.
  • each implementation can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware.
  • the essence of the above technical solutions or the part that contributes to related technologies can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, disk , CD, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

Provided in the present application are a camera control method, system and apparatus for achieving compatibility between Linux and Android, and a medium. The method comprises: receiving a camera control instruction, which is sent by an Android terminal and obtained by means of an inter-process communication channel; and controlling a camera to execute an operation corresponding to the camera control instruction, and returning an execution result of the camera to the Android terminal by means of the inter-process communication channel.

Description

Linux兼容Android的相机控制方法、系统、装置及介质Linux compatible Android camera control method, system, device and medium
本申请要求在2021年11月23日提交中国专利局、申请号为202111390647.6的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202111390647.6 filed with the China Patent Office on November 23, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及计算机技术领域,例如涉及一种Linux兼容Android的相机控制方法、系统、装置及介质。The present application relates to the field of computer technology, for example, to a Linux-compatible Android camera control method, system, device and medium.
背景技术Background technique
随着对信息网络安全的重视,越来越多的操作系统开始考虑兼容性和安全性。Linux系统由于其安全机制,常常作为安全性能高的操作系统使用,另外Android系统是目前移动终端市场中市场份额最高的操作系统,在移动终端领域具有极好的生态环境。因此Android应用生态在Linux操作系统上的兼容成为了近期研究热点。With the emphasis on information network security, more and more operating systems begin to consider compatibility and security. Due to its security mechanism, the Linux system is often used as an operating system with high security performance. In addition, the Android system is currently the operating system with the highest market share in the mobile terminal market, and has an excellent ecological environment in the field of mobile terminals. Therefore, the compatibility of the Android application ecosystem on the Linux operating system has become a recent research hotspot.
而在Linux操作系统上兼容的Android应用程序如何使用Linux操作系统的摄像头是目前业界亟需解决的重要课题。How to use the camera of the Linux operating system in the compatible Android application program on the Linux operating system is an important issue that the industry needs to solve urgently.
发明内容Contents of the invention
本申请提供一种Linux兼容Android的相机控制方法、系统、装置及介质,用以解决相关技术中Android的相机应用程序无法控制Linux操作系统摄像头的缺陷,实现Android的相机应用程序能够控制Linux操作系统摄像头。This application provides a Linux-compatible Android camera control method, system, device, and medium to solve the defect that the Android camera application program cannot control the Linux operating system camera in the related art, and realize that the Android camera application program can control the Linux operating system Camera.
本申请提供一种Linux兼容Android的相机控制方法,应用于Linux端,所述方法包括:This application provides a Linux-compatible Android camera control method, which is applied to the Linux side, and the method includes:
接收通过进程间通信通道得到的Android端发送的相机控制指令;Receive the camera control command sent by the Android side obtained through the inter-process communication channel;
控制相机执行与所述相机控制指令对应的操作,并将所述相机的执行结果通过所述进程间通信通道返回给所述Android端。The camera is controlled 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 inter-process communication channel.
本申请还提供一种Linux兼容Android的相机控制方法,应用于Android端,所述方法包括:The present application also provides a Linux-compatible Android camera control method, which is applied to the Android side, and the method includes:
生成相机控制指令,并通过进程间通信通道将所述相机控制指令发送给Linux端;Generate a camera control command, and send the camera control command to the Linux side through an inter-process communication channel;
接收所述Linux端通过所述进程间通信通道返回的与所述相机控制指令对应的执行结果。receiving an execution result corresponding to the camera control instruction returned by the Linux terminal through the inter-process communication channel.
本申请还提供一种Linux兼容Android的相机控制系统,包括:Linux端和Android端,所述Linux端和所述Android端通过进程间通信通道进行通信;The present application also provides a Linux-compatible Android camera control system, comprising: a Linux terminal and an Android terminal, wherein the Linux terminal and the Android terminal communicate through an inter-process communication channel;
所述Android端,设置为生成相机控制指令,并通过所述进程间通信通道将所述相机控制指令发送给Linux端;The Android end is configured to generate a camera control instruction, and send the camera control instruction to the Linux end through the inter-process communication channel;
所述Linux端,设置为接收所述相机控制指令,控制相机执行与所述相机控制指令对应的操作,并将所述相机的执行结果通过所述进程间通信通道返回给所述Android端;The Linux end is configured to receive the camera control instruction, control the camera to perform an operation corresponding to the camera control instruction, and return an execution result of the camera to the Android end through the inter-process communication channel;
所述Android端,还设置为接收所述Linux端返回的与所述相机控制指令对应的执行结果。The Android end is further configured to receive an execution result corresponding to the camera control instruction returned by the Linux end.
本申请还提供一种Linux兼容Android的相机控制装置,包括:The application also provides a Linux-compatible Android camera control device, including:
接收模块,设置为接收通过进程间通信通道得到的Android端发送的相机控制指令;The receiving module is configured to receive the camera control command sent by the Android end obtained through the inter-process communication channel;
控制模块,设置为控制相机执行与所述相机控制指令对应的操作,并将所述相机的执行结果通过所述进程间通信通道返回给所述Android端。The control module is configured to 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.
本申请还提供一种Linux兼容Android的相机控制装置,包括:The application also provides a Linux-compatible Android camera control device, including:
生成模块,设置为生成相机控制指令,并通过进程间通信通道将所述相机控制指令发送给Linux端;A generating module configured to generate camera control instructions, and send the camera control instructions to the Linux end through an inter-process communication channel;
接收模块,设置为接收所述Linux端通过所述进程间通信通道返回的与所述相机控制指令对应的执行结果。The receiving module is configured to receive the execution result corresponding to the camera control instruction returned by the Linux terminal through the inter-process communication channel.
本申请还提供一种非暂态计算机可读存储介质,其上存储有计算机程序, 该计算机程序被处理器执行时实现如上述任一种所述应用于Linux端的Linux兼容Android的相机控制方法的步骤,或,应用于Android端的Linux兼容Android的相机控制方法的步骤。The present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the implementation of any one of the above-mentioned Linux-compatible Android camera control methods applied to the Linux side is implemented. Steps, or steps of a Linux-compatible Android camera control method applied to an Android side.
附图说明Description of drawings
图1是本申请提供的Linux兼容Android的相机控制方法的流程示意图之一;Fig. 1 is one of the flow diagrams of the Linux-compatible Android camera control method provided by the present application;
图2是本申请提供的Linux兼容Android的相机控制方法的流程示意图之二;Fig. 2 is the second schematic flow diagram of the Linux-compatible Android camera control method provided by the present application;
图3是本申请提供的Linux兼容Android的相机控制方法的流程示意图之三;Fig. 3 is the third schematic flow diagram of the Linux-compatible Android camera control method provided by the present application;
图4是本申请提供的Linux兼容Android的相机控制方法的流程示意图之四;Fig. 4 is the fourth schematic flow diagram of the Linux-compatible Android camera control method provided by the present application;
图5A是本申请提供的Linux兼容Android的相机控制方法的流程示意图之五;FIG. 5A is the fifth schematic flow diagram of the Linux-compatible Android camera control method provided by the present application;
图5B是本申请提供的Linux兼容Android的相机控制方法的流程示意图之六;FIG. 5B is the sixth schematic flow diagram of the Linux-compatible Android camera control method provided by the present application;
图5C是本申请提供的Linux兼容Android的相机控制方法的流程示意图之七;FIG. 5C is the seventh schematic flow diagram of the Linux-compatible Android camera control method provided by the present application;
图5D是本申请提供的Linux兼容Android的相机控制方法的流程示意图之八;FIG. 5D is the eighth schematic flow diagram of the Linux-compatible Android camera control method provided by the present application;
图6是本申请提供的Linux兼容Android的相机控制系统的结构意图;Fig. 6 is the structural representation of the Linux compatible Android camera control system that the application provides;
图7是本申请提供的Linux兼容Android的相机控制装置的结构示意图之一;Fig. 7 is one of the structural representations of the Linux-compatible Android camera control device provided by the present application;
图8是本申请提供的Linux兼容Android的相机控制装置的结构示意图之二;Fig. 8 is the second structural diagram of the Linux-compatible Android camera control device provided by the present application;
图9是本申请提供的电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device provided by the present application.
具体实施方式Detailed ways
下面结合图1-图5D描述本申请的Linux兼容Android的相机控制方法。The Linux-compatible Android camera control method of the present application is described below with reference to FIG. 1-FIG. 5D.
下面,对该方法的使用场景做举例说明。Below, an example is given to illustrate the usage scenario of the method.
示例性的,在智能终端中安装了Linux系统,但是在Linux系统中安装了 Android的应用程序。该智能终端可以为移动智能终端,例如,手提电脑,平板、手机等,也可以为非移动智能终端,例如,台式电脑等。下面,以智能终端为手机为例进行说明,但需要说明的是仅为举例说明,并不用于对本申请的保护范围进行限定。本申请实施例中的一些其他说明,也是举例说明,并不用于对本申请的保护范围进行限定,之后便不再一一说明。Exemplarily, a Linux system is installed in the smart terminal, but an Android application program is installed in the Linux system. The smart terminal may be a mobile smart terminal, such as a laptop computer, a tablet, or a mobile phone, or may be a non-mobile smart terminal, such as a desktop computer. In the following, the smart terminal is taken as an example for illustration, but it should be noted that it is only for illustration and is not used to limit the scope of protection of the present application. Some other descriptions in the embodiments of the present application are also examples, and are not used to limit the protection scope of the present application, and will not be described one by one later.
本申请实施例提供了一种应用在Linux端的Linux兼容Android的相机控制方法,该方法如图1所示:The embodiment of the present application provides a Linux-compatible Android camera control method applied on the Linux side, as shown in Figure 1:
步骤101,接收通过进程间通信通道得到的Android端发送的相机控制指令。 Step 101, receiving a camera control command sent by an Android terminal obtained through an inter-process communication channel.
一个具体实施例中,预先在Linux端创建代理服务,利用预先创建的代理服务接收通过进程间通信通道得到的Android端发送的相机控制指令。In a specific embodiment, a proxy service is pre-created on the Linux side, and the pre-created proxy service is used to receive the camera control instruction sent by the Android side obtained through the inter-process communication channel.
其中,进程间通信通道能够实现进程间的数据传递和信息传递。进程间通信(Inter-Process Communication,IPC),提供了多种进程间的通信方法,例如,binder,套接字(socket),共享内存(shared memory)等。Wherein, the inter-process communication channel can realize data transmission and information transmission between processes. Inter-Process Communication (IPC) provides a variety of inter-process communication methods, such as binder, socket (socket), shared memory (shared memory), etc.
示例性的,Linux端接收通过IPC得到的Android端发送的相机控制指令,包括:Linux端接收通过binder得到的Android端发送的相机控制指令,或,Linux端接收通过socket得到的Android端发送的相机控制指令,或,Linux端接收通过shared memory得到的Android端发送的相机控制指令。Exemplarily, the Linux end receives the camera control instruction sent by the Android end obtained through the IPC, including: the Linux end receives the camera control instruction sent by the Android end obtained through the binder, or the Linux end receives the camera sent by the Android end obtained through the socket Control command, or, the Linux side receives the camera control command sent by the Android side obtained through shared memory.
一个具体实施例中,为了实现Linux和Android的兼容,并使得Android端的应用程序能够控制Linux端的相机,在Linux端创建第一容器,将Android端对应的相机应用部署在第一容器内;运行部署后的第一容器,以实现Android端的相机应用程序能够在Linux端上运行,进而,使得Android端的相机应用程序能够控制Linux端上的相机驱动。In a specific embodiment, in order to realize the compatibility of Linux and Android, and make the application program of Android end can control the camera of Linux end, create the first container at Linux end, the camera application corresponding to Android end is deployed in the first container; Run deployment After the first container, the camera application program on the Android side can run on the Linux side, and then the camera application program on the Android side can control the camera driver on the Linux side.
示例性的,手机的相机可以为具有Linux相机驱动的相机。Exemplarily, the camera of the mobile phone may be a camera with a Linux camera driver.
其中,当手机的相机为Linux系统的相机驱动的相机时,需要创建第一容器,第一容器中包括:相机应用程序、安卓相机服务和相机虚拟硬件抽象层(Hardware Abstract Layer,HAL)。其中,第一容器可以在手机开机的状态下实 时运行,也可以在用户需要使用相机时,启动运行。Wherein, when the camera of the mobile phone is a camera driven by a Linux system, a first container needs to be created, and the first container includes: camera application program, Android camera service and camera virtual hardware abstraction layer (Hardware Abstract Layer, HAL). Wherein, the first container can run in real time when the mobile phone is turned on, and can also start running when the user needs to use the camera.
当用户使用相机时,在Android端基于相机应用程序,生成相机控制指令,并通过IPC与Linux端的代理服务进行通信,将相机控制指令发送给Linux端的代理服务,通过Linux端的代理服务控制相机执行与相机控制指令对应的操作。可参见图2,在图2中对本申请进行了层的划分,第一容器、代理服务属于用户空间层,IPC属于内核层,相机属于硬件层。When the user uses the camera, the camera control command is generated on the Android side based on the camera application program, communicates with the proxy service on the Linux side through IPC, sends the camera control command to the proxy service on the Linux side, and controls the camera to execute and communicate with the proxy service on the Linux side. Operations corresponding to camera control commands. Referring to FIG. 2 , the application is divided into layers in FIG. 2 , the first container and proxy service belong to the user space layer, the IPC belongs to the kernel layer, and the camera belongs to the hardware layer.
一个具体实施例中,当Linux端不存在Linux系统的相机驱动时,创建第二容器,将Android端对应的相机驱动部署在第二容器内;运行部署后的第二容器,以使Android端的相机应用程序能够控制在Linux端上的第二容器内运行的相机驱动。In a specific embodiment, when the camera driver of the Linux system does not exist on the Linux side, a second container is created, and the camera driver corresponding to the Android side is deployed in the second container; the deployed second container is run to make the camera on the Android side The application can control the camera driver running in a second container on the Linux side.
示例性的,手机的相机也可以为Android系统的相机驱动的相机。Exemplarily, the camera of the mobile phone may also be a camera driven by a camera of the Android system.
其中,当手机的相机为Android系统的相机驱动的相机时,需要创建第一容器和第二容器,第一容器中包括:相机应用程序、安卓相机服务和相机虚拟HAL层,第二容器包括Android系统的相机驱动。其中,第一容器可以在手机开机的状态下实时运行,也可以在用户需要使用相机时,启动运行,第二容器则需要在手机开机的状态下实时运行。Wherein, when the camera of the mobile phone is a camera driven by the camera of the Android system, a first container and a second container need to be created. The first container includes: the camera application program, the Android camera service and the camera virtual HAL layer, and the second container includes the Android System camera driver. Among them, the first container can run in real time when the mobile phone is turned on, or can be started and run when the user needs to use the camera, and the second container needs to be run in real time when the mobile phone is turned on.
当用户使用相机时,在Android端基于相机应用程序,生成相机控制指令,并通过IPC与Linux端的代理服务进行通信,将相机控制指令发送给Linux端的代理服务,通过Linux端的代理服务将相机控制指令发送给第二容器,基于第二容器使得Linux端的代理服务控制相机执行与相机控制指令对应的操作。可参见图3,在图3中对本申请进行了层的划分,第一容器、代理服务、第二容器属于用户空间层,IPC属于内核层,相机属于硬件层。When the user uses the camera, the camera control command is generated on the Android side based on the camera application program, communicates with the proxy service on the Linux side through IPC, sends the camera control command to the proxy service on the Linux side, and sends the camera control command through the proxy service on the Linux side Send to the second container, based on the second container, make the proxy service on the Linux side control the camera to perform the operation corresponding to the camera control instruction. Referring to FIG. 3 , the application is divided into layers in FIG. 3 , the first container, the proxy service, and the second container belong to the user space layer, IPC belongs to the kernel layer, and the camera belongs to the hardware layer.
步骤102,控制相机执行与相机控制指令对应的操作,并将相机的执行结果通过进程间通信通道返回给Android端。 Step 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 inter-process communication channel.
一个具体实施例中,利用预先创建的代理服务,控制相机执行与相机控制指令对应的操作,并将相机的执行结果通过进程间通信通道返回给Android端。In a specific embodiment, the pre-created proxy service is used to 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.
一个具体实施例中,相机控制指令包括:开启相机指令、关闭相机指令、相机预览指令、相机拍摄指令、相机录像指令和相机参数设置指令。基于相机控制指令,控制相机执行与相机控制指令对应的操作,并将相机的执行结果返回给Android端如下所示:In a specific embodiment, the camera control instruction includes: a camera opening instruction, a camera closing instruction, a camera preview instruction, a camera shooting instruction, a camera recording instruction, and a camera parameter setting instruction. Based on the camera control command, control the camera to perform the operation corresponding to the camera control command, and return the execution result of the camera to the Android side as follows:
当相机控制指令为开启相机指令时,控制相机开启,并将相机是否开启成功的执行结果返回给Android端;When the camera control command is the command to open the camera, control the camera to open, and return the execution result of whether the camera is successfully opened to the Android side;
当相机控制指令为关闭相机指令时,控制相机关闭,并将相机是否关闭成功的执行结果返回给Android端;When the camera control command is a camera close command, control the camera to close, and return the execution result of whether the camera is closed successfully to the Android side;
当相机控制指令为相机预览指令时,控制相机执行与相机预览指令对应的操作,并将待预览图像数据返回给Android端;When the camera control command is a camera preview command, control the camera to perform the operation corresponding to the camera preview command, and return the image data to be previewed to the Android side;
当相机控制指令为相机拍摄指令时,控制相机执行与相机拍摄指令对应的操作,并将相机拍摄的图像数据返回给Android端;When the camera control command is a camera shooting command, control the camera to perform the operation corresponding to the camera shooting command, and return the image data captured by the camera to the Android side;
当相机控制指令为相机录像指令时,控制相机执行与相机录像指令对应的操作,并将相机录制的视频数据返回给Android端;When the camera control command is a camera recording command, control the camera to perform the operation corresponding to the camera recording command, and return the video data recorded by the camera to the Android side;
当相机控制指令为相机参数设置指令时,控制相机配置与相机参数设置指令对应的相机参数,并将相机是否配置成功的执行结果返回给Android端。When the camera control command is a camera parameter setting command, control the camera to configure the camera parameters corresponding to the camera parameter setting command, and return the execution result of whether the camera configuration is successful to the Android side.
示例性的,当相机控制指令为开启相机指令时,向Android端返回开启成功标识或开启失败标识。Exemplarily, when the camera control instruction is an instruction to turn on the camera, an indication of successful opening or an indication of failure to open is returned to the Android side.
示例性的,当相机控制指令为相机参数设置指令时,向Android端返回设置成功标识或设置失败标识。Exemplarily, when the camera control command is a camera parameter setting command, an indication of a successful setting or an indication of a failed setting is returned to the Android side.
示例性的,当相机控制指令为相机预览指令时,相机预览指令包括:开始预览指令和停止预览指令,当相机预览指令为开始预览指令时,向Android端返回成功标识或失败标识,并且,当返回成功标识时,将待预览图像数据和成功标识一同返回给Android端。当相机预览指令为停止预览指令时,向Android端返回停止标识,并停止向Android端返回待预览图像数据。Exemplarily, when the camera control instruction is a camera preview instruction, the camera preview instruction includes: a start preview instruction and a stop preview instruction, and when the camera preview instruction is a start preview instruction, a success or failure identifier is returned to the Android side, and, when When returning the successful identification, the image data to be previewed and the successful identification are returned to the Android side together. When the camera preview instruction is a stop preview instruction, return the stop sign to the Android end, and stop returning the image data to be previewed to the Android end.
示例性的,当相机控制指令为相机拍摄指令时,向Android端返回成功标识, 并同时将拍摄成功的图像数据返回给Android端,或,向Android端返回失败标识。Exemplarily, when the camera control instruction is a camera shooting instruction, return a success indication to the Android end, and return the successfully captured image data to the Android end at the same time, or return a failure indication to the Android end.
示例性的,当相机控制指令为相机录像指令时,相机录像指令包括:开始录像指令和结束录像指令,当相机控制指令为开始录像指令时,向Android端返回成功标识或失败标识,并且,当返回成功标识时,将拍摄的视频数据和成功标识一同返回给Android端。当相机录像指令为结束录像指令时,向Android端返回停止标识,并停止向Android端返回视频数据。Exemplarily, when the camera control command is a camera video recording command, the camera video recording command includes: start video recording command and end video recording command, when the camera control command is a start video recording command, return a success identification or a failure identification to the Android side, and, when When returning the successful identification, return the captured video data and the successful identification to the Android side together. When the camera recording command is an end recording command, return a stop sign to the Android end, and stop returning video data to the Android end.
示例性的,当相机控制指令为关闭相机指令时,向Android端返回关闭成功标识或关闭失败标识。Exemplarily, when the camera control instruction is an instruction to close the camera, an indication of successful closing or an indication of closing failure is returned to the Android side.
本申请提供的Linux兼容Android的相机控制方法、系统、装置及介质,该方法应用于Linux端,本申请通过接收通过进程间通信通道得到的Android端发送的相机控制指令;控制相机执行与相机控制指令对应的操作,并将相机的执行结果通过进程间通信通道返回给Android端,可见,本申请利用进程间通信通道实现Linux端和Android端的通信,以能够将Android端生成的相机控制指令发送给Linux端,以使Linux端基于相机控制指令控制相机执行对应的操作,实现了Android的相机应用程序能够控制Linux操作系统摄像头的目的。The Linux-compatible Android camera control method, system, device and medium provided by the application, the method is applied to the Linux side, the application receives the camera control command sent by the Android side obtained through the inter-process communication channel; the control camera execution and camera control The operation corresponding to the instruction, and the execution result of the camera is returned to the Android end through the inter-process communication channel. It can be seen that this application uses the inter-process communication channel to realize the communication between the Linux end and the Android end, so as to be able to send the camera control commands generated by the Android end to the Linux side, so that the Linux side controls the camera to perform corresponding operations based on the camera control command, and realizes the purpose that the camera application program of Android can control the camera of the Linux operating system.
本申请实施例还提供了一种应用在Android端的Linux兼容Android的相机控制方法,该方法如图4所示:The embodiment of the present application also provides a Linux-compatible Android camera control method applied on the Android side, as shown in Figure 4:
步骤401,生成相机控制指令,并通过进程间通信通道将相机控制指令发送给Linux端。 Step 401, generate a camera control command, and send the camera control command to the Linux side through an inter-process communication channel.
一个具体实施例中,预先在Android创建相机虚拟硬件抽象层;并在相机虚拟硬件抽象层上,配置与Linux端通信的通信接口,并通过通信接口将相机控制指令发送给Linux端。In a specific embodiment, a camera virtual hardware abstraction layer is created in Android in advance; and on the camera virtual hardware abstraction layer, a communication interface for communicating with the Linux side is configured, and the camera control instructions are sent to the Linux side through the communication interface.
其中,在相机虚拟HAL上配置能够和Linux端进行通信的通信接口,该通信接口包括:相机开启接口、相机关闭接口、相机预览接口、相机拍摄接口、相机录像接口、相机参数设置接口等。Among them, a communication interface capable of communicating with the Linux terminal is configured on the camera virtual HAL, and the communication interface includes: a camera opening interface, a camera closing interface, a camera preview interface, a camera shooting interface, a camera recording interface, and a camera parameter setting interface.
示例性的,通过相机开启接口,将开启相机指令发送给Linux端的代理服务;Exemplarily, the interface is opened through the camera, and the command to open the camera is sent to the proxy service on the Linux side;
通过相机关闭接口,将关闭相机指令发送给Linux端的代理服务;Send the camera shutdown command to the proxy service on the Linux side through the camera shutdown interface;
通过相机预览接口,将相机预览指令发送给Linux端的代理服务;Send the camera preview command to the proxy service on the Linux side through the camera preview interface;
通过相机拍摄接口,将相机拍摄指令发送给Linux端的代理服务;Through the camera shooting interface, the camera shooting command is sent to the agent service on the Linux side;
通过相机录像接口,将相机录像指令发送给Linux端的代理服务;Through the camera video interface, the camera video command is sent to the proxy service on the Linux side;
通过相机参数设置接口,将相机参数设置指令发送给Linux端的代理服务。Through the camera parameter setting interface, the camera parameter setting command is sent to the proxy service on the Linux side.
步骤402,接收Linux端通过进程间通信通道返回的与相机控制指令对应的执行结果。 Step 402, receiving the execution result corresponding to the camera control command returned by the Linux terminal through the inter-process communication channel.
示例性的,接收Linux端的代理服务返回的与相机控制指令对应的执行结果。Exemplarily, the execution result corresponding to the camera control instruction returned by the proxy service on the Linux side is received.
示例性的,通过相机开启接口,接收Linux端的代理服务返回的开启成功标识或开启失败标识;Exemplarily, open the interface through the camera, and receive the open success mark or the open failure mark returned by the proxy service on the Linux side;
通过相机关闭接口,接收Linux端的代理服务返回的关闭成功标识或关闭失败标识;Close the interface through the camera, and receive the close-off success mark or the close-off failure mark returned by the proxy service on the Linux side;
通过相机预览接口,接收Linux端的代理服务返回的成功标识和待预览图像数据,或,接收Linux端的代理服务返回的失败标识;Through the camera preview interface, receive the success identifier returned by the proxy service on the Linux side and the image data to be previewed, or receive the failure identifier returned by the proxy service on the Linux side;
通过相机拍摄接口,接收Linux端的代理服务返回的成功标识和拍摄成功的图像数据,或,接收Linux端的代理服务返回的失败标识;Through the camera shooting interface, receive the successful identification returned by the proxy service on the Linux side and the image data of the successful shooting, or receive the failure identification returned by the proxy service on the Linux side;
通过相机录像接口,接收Linux端的代理服务返回的成功标识和录制的视频,或,接收Linux端的代理服务返回的失败标识,或,接收Linux端的代理服务返回的停止标识;Through the camera video interface, receive the success logo and recorded video returned by the proxy service on the Linux side, or receive the failure logo returned by the proxy service on the Linux side, or receive the stop logo returned by the proxy service on the Linux side;
通过相机参数设置接口,接收Linux端的代理服务返回的设置成功标识或设置失败标识。Through the camera parameter setting interface, receive the setting success flag or the setting failure flag returned by the proxy service on the Linux side.
示例性的,相机控制指令为相机预览指令时,相机应用程序、相机虚拟HAL层、代理服务、相机驱动的信令交互图如图5A所示:Exemplarily, 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 shown in Figure 5A:
S5101,相机应用程序向相机虚拟HAL层发送开启相机指令。S5101. The camera application program sends a camera start instruction to the camera virtual HAL layer.
S5102,相机虚拟HAL层向代理服务发送开启相机指令。S5102. The virtual HAL layer of the camera sends an instruction to enable the camera to the proxy service.
S5103,代理服务向相机驱动发送开启相机指令。S5103, the proxy service sends an instruction to start the camera to the camera driver.
S5104,相机驱动向代理服务返回执行结果,其中,执行结果包括:开启成功标识或开启失败标识。其中,执行结果以开启成功标识为例进行说明。S5104. The camera driver returns an execution result to the proxy service, wherein the execution result includes: enabling a successful flag or enabling a failed flag. Among them, the execution result is described by taking the successful flag as an example.
S5105,代理服务向相机虚拟HAL层返回开启成功标识。S5105. The proxy service returns an activation success flag to the virtual HAL layer of the camera.
S5106,相机虚拟HAL层向相机应用程序返回开启成功标识。S5106. The virtual HAL layer of the camera returns an indication of successful activation to the camera application program.
S5107,相机应用程序向相机虚拟HAL层发送相机预览指令。S5107. The camera application program sends a camera preview instruction to the camera virtual HAL layer.
S5108,相机虚拟HAL层向代理服务发送相机预览指令。S5108. The camera virtual HAL layer sends a camera preview instruction to the proxy service.
S5109,代理服务向相机驱动发送相机预览指令。S5109, the proxy service sends a camera preview instruction to the camera driver.
S5110,相机驱动向代理服务返回执行结果,其中,执行结果包括:待预览图像数据与成功标识,或,失败标识。其中,以执行结果为待预览图像数据与成功标识为例进行说明。S5110, the camera driver returns an execution result to the proxy service, wherein the execution result includes: the image data to be previewed and a success mark, or a failure mark. Wherein, the execution result is the image data to be previewed and the successful identification as an example for illustration.
S5111,代理服务向相机虚拟HAL层返回待预览图像数据与成功标识。S5111, the proxy service returns the image data to be previewed and the success identifier to the virtual HAL layer of the camera.
S5112,相机虚拟HAL层向相机应用程序返回待预览图像数据与成功标识。S5112. The virtual HAL layer of the camera returns the image data to be previewed and the success identifier to the camera application program.
其中,相机控制指令为相机拍摄指令、相机录像指令、相机参数设置指令时均需要向相机驱动发送开启相机指令,下面,便不再重复说明。Among them, when the camera control command is a camera shooting command, a camera recording command, or a camera parameter setting command, it is necessary to send a camera start command to the camera driver, and the description will not be repeated below.
示例性的,相机控制指令为相机拍摄指令时,相机应用程序、相机虚拟HAL层、代理服务、相机驱动的信令交互图如图5B所示:Exemplarily, when the camera control instruction is a camera shooting instruction, the signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in Figure 5B:
S5201,相机应用程序向相机虚拟HAL层发送相机拍摄指令。S5201. The camera application program sends a camera shooting instruction to the camera virtual HAL layer.
S5202,相机虚拟HAL层向代理服务发送相机拍摄指令。S5202. The camera virtual HAL layer sends a camera shooting instruction to the proxy service.
S5203,代理服务向相机驱动发送相机拍摄指令。S5203, the proxy service sends a camera shooting instruction to the camera driver.
S5204,相机驱动向代理服务返回执行结果,其中,执行结果包括:拍摄的图像数据与成功标识,或,失败标识。其中,以执行结果为拍摄的图像数据与成功标识为例进行说明。S5204. The camera driver returns an execution result to the proxy service, wherein the execution result includes: captured image data and a success identifier, or a failure identifier. Wherein, the execution result is the captured image data and the successful identification as an example for illustration.
S5205,代理服务向相机虚拟HAL层返回拍摄的图像数据与成功标识。S5205. The proxy service returns the captured image data and the success identifier to the virtual HAL layer of the camera.
S5206,相机虚拟HAL层向相机应用程序返回拍摄的图像数据与成功标识。S5206. The virtual HAL layer of the camera returns the captured image data and the success identifier to the camera application program.
示例性的,相机控制指令为相机录像指令时,相机应用程序、相机虚拟HAL 层、代理服务、相机驱动的信令交互图如图5C所示:Exemplarily, when the camera control instruction is a camera recording instruction, the signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in Figure 5C:
S5301,相机应用程序向相机虚拟HAL层发送相机录像指令。S5301. The camera application program sends a camera video recording instruction to the camera virtual HAL layer.
S5302,相机虚拟HAL层向代理服务发送相机录像指令。S5302. The camera virtual HAL layer sends a camera video recording instruction to the proxy service.
S5303,代理服务向相机驱动发送相机录像指令。S5303, the proxy service sends a camera recording command to the camera driver.
S5304,相机驱动向代理服务返回执行结果,其中,执行结果包括:录制的视频数据或失败标识。其中,以执行结果为录制的视频数据为例进行说明。S5304. The camera driver returns an execution result to the proxy service, where the execution result includes: recorded video data or a failure identification. Wherein, the execution result is recorded video data as an example for illustration.
S5305,代理服务向相机虚拟HAL层返回录制的视频数据。S5305. The proxy service returns the recorded video data to the virtual HAL layer of the camera.
S5306,相机虚拟HAL层向相机应用程序返回录制的视频数据。S5306. The camera virtual HAL layer returns the recorded video data to the camera application program.
示例性的,相机控制指令为相机录像指令时,相机应用程序、相机虚拟HAL层、代理服务、相机驱动的信令交互图如图5D所示:Exemplarily, when the camera control instruction is a camera recording instruction, the signaling interaction diagram of the camera application, the camera virtual HAL layer, the proxy service, and the camera driver is shown in Figure 5D:
S5401,相机应用程序向相机虚拟HAL层发送相机参数设置指令。S5401. The camera application program sends a camera parameter setting instruction to the camera virtual HAL layer.
S5402,相机虚拟HAL层向代理服务发送相机参数设置指令。S5402. The camera virtual HAL layer sends a camera parameter setting instruction to the proxy service.
S5403,代理服务向相机驱动发送相机参数设置指令。S5403. The proxy service sends a camera parameter setting instruction to the camera driver.
S5404,相机驱动向代理服务返回执行结果,其中,执行结果包括:设置成功标识或设置失败标识。其中,以执行结果为设置成功标识为例进行说明。S5404. The camera driver returns an execution result to the proxy service, wherein the execution result includes: a setting success flag or a setting failure flag. Wherein, the execution result is the setting success flag as an example for illustration.
S5405,代理服务向相机虚拟HAL层返回设置成功标识。S5405. The proxy service returns an indication of successful setting to the virtual HAL layer of the camera.
S5406,相机虚拟HAL层向相机应用程序返回设置成功标识。S5406. The virtual HAL layer of the camera returns an indication of successful setting to the camera application program.
本申请提供的Linux兼容Android的相机控制方法、系统、装置及介质,该方法应用于Android端,本申请通过生成相机控制指令,并通过进程间通信通道将所述相机控制指令发送给Linux端;接收所述Linux端通过所述进程间通信通道返回的与所述相机控制指令对应的执行结果,可见,本申请利用进程间通信通道实现Linux端和Android端的通信,以能够将Android端生成的相机控制指令发送给Linux端,并接收Linux端返回的执行结果,实现了Android的相机应用程序能够控制Linux操作系统摄像头的目的。The Linux-compatible Android camera control method, system, device and medium provided by the present application, the method is applied to the Android terminal, the application generates the camera control command, and sends the camera control command to the Linux terminal through the inter-process communication channel; Receiving the execution result corresponding to the camera control instruction returned by the Linux end through the inter-process communication channel, it can be seen that the application utilizes the inter-process communication channel to realize the communication between the Linux end and the Android end, so that the camera generated by the Android end can The control command is sent to the Linux side, and the execution result returned by the Linux side is received, realizing the purpose that the Android camera application program can control the camera of the Linux operating system.
下面对本申请提供的Linux兼容Android的相机控制系统进行描述,下文描述的Linux兼容Android的相机控制系统与上文描述的Linux兼容Android的相 机控制方法可相互对应参照,重复之处不再赘述,如图6所示,该系统包括:Linux端601和Android端602,Linux端601和Android端602通过进程间通信通道进行通信;The Linux-compatible Android camera control system provided by this application is described below. The Linux-compatible Android camera control system described below and the Linux-compatible Android camera control method described above can be referred to each other. As shown in Figure 6, the system includes: a Linux end 601 and an Android end 602, and the Linux end 601 and the Android end 602 communicate through an inter-process communication channel;
Android端601,设置为生成相机控制指令,并通过进程间通信通道将相机控制指令发送给Linux端602;The Android end 601 is configured to generate camera control instructions, and send the camera control instructions to the Linux end 602 through an inter-process communication channel;
Linux端602,设置为接收相机控制指令,控制相机执行与相机控制指令对应的操作,并将相机的执行结果通过进程间通信通道返回给Android端601;The Linux end 602 is set to receive the camera control instruction, control the camera to perform the operation corresponding to the camera control instruction, and return the execution result of the camera to the Android end 601 through the inter-process communication channel;
Android端601,还设置为接收Linux端602返回的与相机控制指令对应的执行结果。The Android terminal 601 is also configured to receive the execution result corresponding to the camera control command returned by the Linux terminal 602 .
一个具体实施例中,Android端601,还设置为创建相机虚拟硬件抽象层;在相机虚拟硬件抽象层上,配置与Linux端602通信的通信接口,并通过通信接口将相机控制指令发送给Linux端602。In a specific embodiment, the Android end 601 is also configured to create a camera virtual hardware abstraction layer; on the camera virtual hardware abstraction layer, configure a communication interface communicating with the Linux end 602, and send camera control instructions to the Linux end through the communication interface 602.
一个具体实施例中,Linux端602,还设置为创建第一容器,将Android端601对应的相机应用部署在第一容器内;运行部署后的第一容器。In a specific embodiment, the Linux terminal 602 is further configured to create a first container, deploy the camera application corresponding to the Android terminal 601 in the first container, and run the deployed first container.
一个具体实施例中,Linux端602,还设置为创建第二容器,将Android端601对应的相机驱动部署在第二容器内;运行部署后的第二容器。In a specific embodiment, the Linux terminal 602 is further configured to create a second container, deploy the camera driver corresponding to the Android terminal 601 in the second container, and run the deployed second container.
一个具体实施例中,Linux端602,设置为利用预先创建的代理服务,接收通过进程间通信通道得到的Android端发送的相机控制指令;利用预先创建的代理服务,控制相机执行与相机控制指令对应的操作。In a specific embodiment, the Linux terminal 602 is configured to use the pre-created proxy service to receive the camera control command sent by the Android terminal obtained through the inter-process communication channel; to use the pre-created proxy service to control the camera to execute the corresponding camera control command operation.
下面对本申请提供的Linux兼容Android的相机控制装置进行描述,下文描述的Linux兼容Android的相机控制装置与上文描述的Linux兼容Android的相机控制方法可相互对应参照,重复之处不再赘述,如图7所示,该装置包括:The Linux-compatible Android camera control device provided by this application is described below. The Linux-compatible Android camera control device described below and the Linux-compatible Android camera control method described above can be referred to each other. As shown in Figure 7, the device includes:
接收模块701,设置为接收通过进程间通信通道得到的Android端发送的相机控制指令;The receiving module 701 is configured to receive the camera control instruction sent by the Android end obtained through the inter-process communication channel;
控制模块702,设置为控制相机执行与所述相机控制指令对应的操作,并将所述相机的执行结果通过所述进程间通信通道返回给所述Android端。The control module 702 is configured to 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.
下面对本申请提供的另一Linux兼容Android的相机控制装置进行描述,下文描述的Linux兼容Android的相机控制装置与上文描述的Linux兼容Android的相机控制方法可相互对应参照,重复之处不再赘述,如图8所示,该装置包括:The following describes another Linux-compatible Android camera control device provided by this application. The Linux-compatible Android camera control device described below and the Linux-compatible Android camera control method described above can be referred to each other, and the repetitions will not be repeated. , as shown in Figure 8, the device includes:
生成模块801,设置为生成相机控制指令,并通过进程间通信通道将所述相机控制指令发送给Linux端;The generating module 801 is configured to generate a camera control command, and send the camera control command to the Linux side through an inter-process communication channel;
接收模块802,设置为接收所述Linux端通过所述进程间通信通道返回的与所述相机控制指令对应的执行结果。The receiving module 802 is configured to receive an execution result corresponding to the camera control instruction returned by the Linux terminal through the inter-process communication channel.
图9示例了一种电子设备的实体结构示意图,如图9所示,该电子设备可以包括:处理器(processor)901、通信接口(Communications Interface)902、存储器(memory)903和通信总线904,其中,处理器901,通信接口902,存储器903通过通信总线904完成相互间的通信。处理器901可以调用存储器903中的逻辑指令,以执行应用于Linux端的Linux兼容Android的相机控制方法,该方法包括:接收通过进程间通信通道得到的Android端发送的相机控制指令;控制相机执行与相机控制指令对应的操作,并将相机的执行结果通过进程间通信通道返回给Android端,或,执行应用于Android端的Linux兼容Android的相机控制方法,该方法包括:生成相机控制指令,并通过进程间通信通道将相机控制指令发送给Linux端;接收Linux端通过进程间通信通道返回的与相机控制指令对应的执行结果。FIG. 9 illustrates a schematic diagram of the physical structure of an electronic device. 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 communicate with each other through the communication bus 904 . The processor 901 can call the logic instructions in the memory 903 to execute a Linux-compatible Android camera control method applied to the Linux side. The method includes: receiving a camera control command sent by the Android side obtained through an inter-process communication channel; The operation corresponding to the camera control command, and return the execution result of the camera to the Android side through the inter-process communication channel, or execute the Linux-compatible Android camera control method applied to the Android side, the method includes: generating the camera control command, and passing the process The inter-process communication channel sends the camera control command to the Linux side; receives the execution result corresponding to the camera control command returned by the Linux side through the inter-process communication channel.
此外,上述的存储器903中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only  Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above logic instructions in the memory 903 may be implemented in the form of software functional units and when sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present application or the part that contributes to the related technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several The instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes such as U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc. .
本申请还提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法所提供的应用于Linux端的Linux兼容Android的相机控制方法,该方法包括:接收通过进程间通信通道得到的Android端发送的相机控制指令;控制相机执行与相机控制指令对应的操作,并将相机的执行结果通过进程间通信通道返回给Android端,或,应用于Android端的Linux兼容Android的相机控制方法,该方法包括:生成相机控制指令,并通过进程间通信通道将相机控制指令发送给Linux端;接收Linux端通过进程间通信通道返回的与相机控制指令对应的执行结果。The present application also provides a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer, the computer A Linux-compatible Android camera control method applied to the Linux terminal provided by the above methods, the method comprising: receiving a camera control command sent by the Android terminal obtained through an inter-process communication channel; controlling the camera to perform operations corresponding to the camera control command , and return the execution result of the camera to the Android side through the inter-process communication channel, or, a Linux-compatible Android camera control method applied to the Android side, the method includes: generating a camera control command, and sending the camera control command through the inter-process communication channel Send to the Linux side; receive the execution result corresponding to the camera control command returned by the Linux side through the inter-process communication channel.
本申请还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述各方法提供的应用于Linux端的Linux兼容Android的相机控制方法,该方法包括:接收通过进程间通信通道得到的Android端发送的相机控制指令;控制相机执行与相机控制指令对应的操作,并将相机的执行结果通过进程间通信通道返回给Android端,或,应用于Android端的Linux兼容Android的相机控制方法,该方法包括:生成相机控制指令,并通过进程间通信通道将相机控制指令发送给Linux端;接收Linux端通过进程间通信通道返回的与相机控制指令对应的执行结果。The present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for controlling a Linux-compatible Android camera applied to a Linux terminal provided by the above-mentioned methods is implemented. Including: receiving the camera control command sent by the Android side through the inter-process communication channel; controlling the camera to perform the operation corresponding to the camera control command, and returning the execution result of the camera to the Android side through the inter-process communication channel, or applied to the Android side The Linux on the end is compatible with the camera control method of Android, the method includes: generating a camera control instruction, and sending the camera control instruction to the Linux end through the inter-process communication channel; receiving the execution corresponding to the camera control instruction returned by the Linux end through the inter-process communication channel result.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative efforts.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。 基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the implementations, those skilled in the art can clearly understand that each implementation can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solutions or the part that contributes to related technologies can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, disk , CD, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

Claims (10)

  1. 一种Linux兼容Android的相机控制方法,应用于Linux端,所述方法包括:A Linux-compatible Android camera control method applied to a Linux terminal, the method comprising:
    接收通过进程间通信通道得到的Android端发送的相机控制指令;Receive the camera control command sent by the Android side obtained through the inter-process communication channel;
    控制相机执行与所述相机控制指令对应的操作,并将所述相机的执行结果通过所述进程间通信通道返回给所述Android端。The camera is controlled 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 inter-process communication channel.
  2. 根据权利要求1所述的Linux兼容Android的相机控制方法,所述接收通过进程间通信通道得到的Android端发送的相机控制指令之前,还包括:According to the camera control method of Linux compatible Android according to claim 1, before the camera control command sent by the Android end obtained through the inter-process communication channel, it also includes:
    创建第一容器,将所述Android端对应的相机应用部署在所述第一容器内;Create a first container, and deploy the camera application corresponding to the Android terminal in the first container;
    运行部署后的所述第一容器。Run the first container after deployment.
  3. 根据权利要求1或2所述的Linux兼容Android的相机控制方法,所述接收通过进程间通信通道得到的Android端发送的相机控制指令之前,还包括:According to the camera control method of Linux compatible Android described in claim 1 or 2, before said receiving the camera control command sent by the Android end obtained through the inter-process communication channel, it also includes:
    创建第二容器,将所述Android端对应的相机驱动部署在所述第二容器内;Create a second container, and deploy the camera driver corresponding to the Android terminal in the second container;
    运行部署后的所述第二容器。Run the deployed second container.
  4. 根据权利要求1或2所述的Linux兼容Android的相机控制方法,其中,所述接收通过进程间通信通道得到的Android端发送的相机控制指令,包括:The Linux-compatible Android camera control method according to claim 1 or 2, wherein said receiving the camera control command sent by the Android end obtained through the inter-process communication channel includes:
    利用预先创建的代理服务,接收通过所述进程间通信通道得到的所述Android端发送的所述相机控制指令;Using a pre-created proxy service to receive the camera control instruction sent by the Android terminal obtained through the inter-process communication channel;
    所述控制相机执行与所述相机控制指令对应的操作,包括:The controlling the camera to perform operations corresponding to the camera control instruction includes:
    利用所述预先创建的代理服务,控制所述相机执行与所述相机控制指令对应的操作。Using the pre-created proxy service, the camera is controlled to perform an operation corresponding to the camera control instruction.
  5. 一种Linux兼容Android的相机控制方法,应用于Android端,所述方法包括:A Linux-compatible Android camera control method applied to an Android terminal, the method comprising:
    生成相机控制指令,并通过进程间通信通道将所述相机控制指令发送给Linux端;Generate a camera control command, and send the camera control command to the Linux side through an inter-process communication channel;
    接收所述Linux端通过所述进程间通信通道返回的与所述相机控制指令对应的执行结果。receiving an execution result corresponding to the camera control instruction returned by the Linux terminal through the inter-process communication channel.
  6. 根据权利要求5所述的Linux兼容Android的相机控制方法,所述生成相机控制指令,并通过进程间通信通道将所述相机控制指令发送给Linux端之前,还包括:According to the Linux-compatible Android camera control method according to claim 5, before said generating the camera control command and sending the camera control command to the Linux side through an inter-process communication channel, it also includes:
    创建相机虚拟硬件抽象层;Create a camera virtual hardware abstraction layer;
    在所述相机虚拟硬件抽象层上,配置与所述Linux端通信的通信接口,并通过所述通信接口将所述相机控制指令发送给所述Linux端。On the virtual hardware abstraction layer of the camera, a communication interface for communicating with the Linux side is configured, and the camera control instruction is sent to the Linux side through the communication interface.
  7. 一种Linux兼容Android的相机控制系统,包括:Linux端和Android端,所述Linux端和所述Android端通过进程间通信通道进行通信;A Linux-compatible camera control system for Android, comprising: a Linux end and an Android end, wherein the Linux end and the Android end communicate through an inter-process communication channel;
    所述Android端,设置为生成相机控制指令,并通过所述进程间通信通道将所述相机控制指令发送给Linux端;The Android end is configured to generate a camera control instruction, and send the camera control instruction to the Linux end through the inter-process communication channel;
    所述Linux端,设置为接收所述相机控制指令,控制相机执行与所述相机控制指令对应的操作,并将所述相机的执行结果通过所述进程间通信通道返回给所述Android端;The Linux end is configured to receive the camera control instruction, control the camera to perform an operation corresponding to the camera control instruction, and return an execution result of the camera to the Android end through the inter-process communication channel;
    所述Android端,还设置为接收所述Linux端返回的与所述相机控制指令对应的执行结果。The Android end is further configured to receive an execution result corresponding to the camera control instruction returned by the Linux end.
  8. 一种Linux兼容Android的相机控制装置,包括:A Linux-compatible Android camera control device consisting of:
    接收模块,设置为接收通过进程间通信通道得到的Android端发送的相机控制指令;The receiving module is configured to receive the camera control command sent by the Android end obtained through the inter-process communication channel;
    控制模块,设置为控制相机执行与所述相机控制指令对应的操作,并将所述相机的执行结果通过所述进程间通信通道返回给所述Android端。The control module is configured to 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.
  9. 一种Linux兼容Android的相机控制装置,包括:A Linux-compatible Android camera control device consisting of:
    生成模块,设置为生成相机控制指令,并通过进程间通信通道将所述相机控制指令发送给Linux端;A generating module configured to generate camera control instructions, and send the camera control instructions to the Linux end through an inter-process communication channel;
    接收模块,设置为接收所述Linux端通过所述进程间通信通道返回的与所述相机控制指令对应的执行结果。The receiving module is configured to receive the execution result corresponding to the camera control instruction returned by the Linux terminal through the inter-process communication channel.
  10. 一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质上存 储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至4任一项所述应用于Linux端的Linux兼容Android的相机控制方法,或,实现如权利要求5至6任一项所述应用于Android端的Linux兼容Android的相机控制方法。A non-transitory computer-readable storage medium, a computer program is stored on the non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the application as described in any one of claims 1 to 4 is implemented. The Linux-compatible Android camera control method on the Linux side, or implement the Linux-compatible Android camera control method applied to the Android side as described in any one of claims 5 to 6.
PCT/CN2022/133475 2021-11-23 2022-11-22 Camera control method, system and apparatus for achieving compatibility between linux and android, and medium WO2023093715A1 (en)

Applications Claiming Priority (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
CN202111390647.6 2021-11-23

Publications (1)

Publication Number Publication Date
WO2023093715A1 true WO2023093715A1 (en) 2023-06-01

Family

ID=78919673

Family Applications (1)

Application Number Title Priority Date Filing Date
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

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117176705A (en) * 2023-11-03 2023-12-05 成都阿加犀智能科技有限公司 Industrial camera video stream display method, device, equipment and medium

Families Citing this family (2)

* 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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150339137A1 (en) * 2013-04-19 2015-11-26 Jeremy Andrus Methods, systems, and media for binary compatible graphics support in mobile operating systems
CN108762815A (en) * 2018-05-16 2018-11-06 北京麟卓信息科技有限公司 A kind of Android running environment implementation methods based on non-virtualized architectural framework
CN110618876A (en) * 2019-03-21 2019-12-27 天津麒麟信息技术有限公司 Linux and Android coexistence and interaction method based on Feiteng platform and shared kernel
CN112099923A (en) * 2020-11-17 2020-12-18 江苏北弓智能科技有限公司 Android virtualization system running on Linux operating system
CN113342422A (en) * 2021-06-29 2021-09-03 技德技术研究所(武汉)有限公司 Linux-compatible Android multi-application camera access method and device
CN113824888A (en) * 2021-11-23 2021-12-21 北京鲸鲮信息系统技术有限公司 Linux-compatible Android camera control method, system, device and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3196759A4 (en) * 2014-08-20 2018-07-25 Kuang-Chi Intelligent Photonic Technology Ltd. Method and module in operating system for controlling hardware device
CN111290827B (en) * 2018-12-07 2023-09-08 华为技术有限公司 Data processing method, device and server
CN112068968B (en) * 2019-06-11 2022-10-18 成都鼎桥通信技术有限公司 Service access method and device for dual-system terminal
CN113590363B (en) * 2021-09-26 2022-02-25 北京鲸鲮信息系统技术有限公司 Data transmission method, device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150339137A1 (en) * 2013-04-19 2015-11-26 Jeremy Andrus Methods, systems, and media for binary compatible graphics support in mobile operating systems
CN108762815A (en) * 2018-05-16 2018-11-06 北京麟卓信息科技有限公司 A kind of Android running environment implementation methods based on non-virtualized architectural framework
CN110618876A (en) * 2019-03-21 2019-12-27 天津麒麟信息技术有限公司 Linux and Android coexistence and interaction method based on Feiteng platform and shared kernel
CN112099923A (en) * 2020-11-17 2020-12-18 江苏北弓智能科技有限公司 Android virtualization system running on Linux operating system
CN113342422A (en) * 2021-06-29 2021-09-03 技德技术研究所(武汉)有限公司 Linux-compatible Android multi-application camera access method and device
CN113824888A (en) * 2021-11-23 2021-12-21 北京鲸鲮信息系统技术有限公司 Linux-compatible Android camera control method, system, device and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117176705A (en) * 2023-11-03 2023-12-05 成都阿加犀智能科技有限公司 Industrial camera video stream display method, device, equipment and medium
CN117176705B (en) * 2023-11-03 2024-01-26 成都阿加犀智能科技有限公司 Industrial camera video stream display method, device, equipment and medium

Also Published As

Publication number Publication date
CN113824888A (en) 2021-12-21
CN113824888B (en) 2022-06-17

Similar Documents

Publication Publication Date Title
WO2023093715A1 (en) Camera control method, system and apparatus for achieving compatibility between linux and android, and medium
CN109669782A (en) Hardware abstraction layer multiplexing method, device, operating system and equipment
EP3425501B1 (en) Mirror image file conversion method and apparatus
CN113127150B (en) Rapid deployment method and device of cloud primary system, electronic equipment and storage medium
EP3016354A1 (en) Cloud-service-based data backup and operation method
CN110781528A (en) Collaborative secure operating system architecture, operating system and electronic device
CN108804938B (en) Authority detection method and device, electronic equipment and readable storage medium
EP3444722B1 (en) Installation of operating system
CN115525453B (en) Multi-screen collaborative interrupt processing method and electronic equipment
CA3017375C (en) Secured multi-process architecture
EP3531696A1 (en) Video switching method, device and video patrol system
WO2022170946A1 (en) Access control method and related apparatus
US10416891B2 (en) Systems and methods for transitioning and updating/tailoring machine instructions from a first system with an older or initial one or set of components to a second system or platform with one or more different components and new or modified operations or functions along with additional potential applications including use in network security and intrusion detection
CN105049964A (en) Loss monitoring method of user terminal and user terminal
CN114691153A (en) Kubernetes cluster deployment method and device
CN105141837A (en) Loss tracking method and user terminal
WO2023124007A1 (en) Linux-based camera control method and apparatus, and device and storage medium
WO2022143087A1 (en) Screen projection method and electronic device
US10681746B2 (en) Wireless enabled hard drive management
US20170060612A1 (en) Terminal device, system for controlling virtual machine and method employing the same
CN113220477A (en) Shear plate reading control method and device, electronic equipment and storage medium
CN104995635A (en) Image transmission method, device and terminal device
CN108984614B (en) Visual image rapid identification method based on big data environment
US10824748B2 (en) Method and system for low overhead control/status handshake for remote shared file server
WO2020057351A1 (en) Secured data uploading method and device, and client

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22897798

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE