HDMI input display method based on OpenHarmony
Through system-side services, the signal source input event is analyzed and the playback application is activated, the signal source preprocessing and display interface is called, and the HDMI audio and video signals are provided to the playback application, which solves the problem of the narrow application range of high-definition video acquisition cards and insufficient computer performance, and realizes HDMI audio and video display on OpenHarmony devices, expanding the use scenarios and compatibility of the device.
Patent Information
- Application Number
- CN202510107515.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, when HDMI audio and video signals are transmitted to OpenHarmony devices by relying on high-definition video acquisition cards, the scope of application is narrow, and the computer performance is insufficient may affect the stable operation and playback effect.
The signal source input event is analyzed through the system-side service, external access information is determined, and application activation instructions are sent to the playback application when the conditions are met. Through the playback application, the signal source preprocessing interface and signal source display interface encapsulated in the system-side service are called, and the driver enables the driver to provide the audio and video signals received by HDMI to the playback application to play.
It realizes that HDMI audio and video content is displayed on OpenHarmony devices without using a high-definition video acquisition card, which expands the device's usage scenarios and compatibility and improves the user experience.
Smart Images

Figure CN119946346A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of audio and video display technology, and in particular to a High Definition Multimedia Interface (HDMI) input display method based on open source Hongmeng (Open Atom Open Harmony, OpenHarmony). Background Art
[0002] As a distributed operating system for all scenarios, the OpenHarmony system often needs to receive and display audio and video information from external HDMI.
[0003] In the prior art, it is usually necessary to rely on a high-definition video capture card to transmit the audio and video signals from HDMI to the OpenHarmony device for display. Among them, the OpenHarmony device is an electronic device using the OpenHarmony system. Specifically, the video source to be played (such as a camera, a game console, and a DVD player, etc.) can be connected to the high-definition video capture card through the HDMI interface. Then, the high-definition video capture card can be connected to a computer with the OpenHarmony system installed through a universal serial bus (USB) interface or a high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIe) slot. Finally, you can open the software that supports video capture and playback on the computer, and find and select the high-definition video capture card as the video input device in the playback software to play the audio and video content of the video source.
[0004] However, since the HD video capture card must be connected to a computer, the method of relying on the HD video capture card to transmit the audio and video signals from HDMI to the OpenHarmony device for display is only effective when the OpenHarmony device is a computer, and its application scope is relatively narrow. Secondly, since the HD video capture card needs to be equipped with high-performance computer hardware and software to support its high-speed data processing and transmission, when the computer performance is insufficient, it may affect the stable operation and effect of the HD video capture card, resulting in poor playback effect of the audio and video content. Summary of the invention
[0005] The present invention provides an HDMI input display method based on OpenHarmony, which can display audio and video content from HDMI on an OpenHarmony device without using a high-definition video capture card, thereby expanding the use scenarios and compatibility of the OpenHarmony device.
[0006] In a first aspect, an embodiment of the present invention provides an HDMI input display method based on OpenHarmony, comprising:
[0007] After receiving the signal source input event reported by the driver, the system side service parses the signal source input event to obtain the external access information corresponding to the signal source input event;
[0008] When the system-side service determines, based on the external access information, that the conditions for using the playback application to play the audio and video signals inputted via HDMI are met, an application invocation instruction is sent to the playback application;
[0009] After the playback application is started according to the application call instruction, an interface call enable instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service is generated and sent to the system side service;
[0010] The system-side service calls the enable instruction according to the received interface, enabling the driver to call the signal source preprocessing interface and the signal source display interface, so that the driver can provide the audio and video signals received based on HDMI to the playback application for playback according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface.
[0011] Optionally, the signal source input event is parsed through the system side service to obtain external access information corresponding to the signal source input event, including: parsing the signal source input event through the system side service to obtain the event type of the signal source input event, the code of the external access device of the input signal source input event, and the connection status of the external access device.
[0012] Optionally, the system-side service determines, based on the external access information, whether conditions for using a playback application to play the audio and video signals input via HDMI are met, including: if the system-side service determines that the event type of the signal source input event is a preset event type, the encoding of the external access device is a preset HDMI encoding, and the connection status of the external access device is connected, then it is determined that the conditions for using a playback application to play the audio and video signals input via HDMI are met.
[0013] Optionally, the implementation method encapsulated in the signal source preprocessing interface is used to adjust the display parameters of the playback application to obtain an adjusted playback application, and to adjust the audio and video signals input by HDMI to audio and video signals to be played suitable for playback by the playback application; the implementation method encapsulated in the signal source display interface is used to send the audio and video signals to be played to the frame buffer of the playback application, so that the adjusted playback application can periodically obtain the audio and video signals to be played from the frame buffer for playback.
[0014] Optionally, when adjusting the display parameters of the playback application to obtain the adjusted playback application, the implementation method encapsulated in the signal source preprocessing interface is specifically used to: parse the extended display identification data of the external access device to obtain the display capability information of the external access device, and adjust the display parameters of the playback application according to the display capability information of the external access device to obtain the adjusted playback application.
[0015] Optionally, system-side services, playback applications, and drivers are constructed through a cross-process communication framework; wherein, after the OpenHarmony system is started, the system-side services are called up by the OpenHarmony system and reside in the OpenHarmony system.
[0016] In a second aspect, an embodiment of the present invention further provides an OpenHarmony-based HDMI input display device, comprising:
[0017] The access information acquisition module is used to parse the signal source input event after receiving the signal source input event reported by the driver through the system side service, and obtain the external access information corresponding to the signal source input event;
[0018] The playback application invocation module is used to send an application invocation instruction to the playback application when the system side service determines that the conditions for using the playback application to play the audio and video signals input by HDMI are met according to the external access information;
[0019] The interface calling module is used to generate an interface calling enabling instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service after the playback application completes the startup according to the application calling instruction, and send it to the system side service;
[0020] The audio and video playback module is used to enable the driver to call the signal source preprocessing interface and the signal source display interface through the system side service according to the received interface call enable instruction, so that the driver can provide the audio and video signals received based on HDMI to the playback application for playback according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface.
[0021] Optionally, the access information acquisition module is specifically used to: parse the signal source input event through the system side service to obtain the event type of the signal source input event, the code of the external access device of the input signal source input event, and the connection status of the external access device.
[0022] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0023] at least one processor; and
[0024] a memory communicatively connected to at least one processor; wherein,
[0025] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the HDMI input display method based on OpenHarmony provided in any embodiment of the present invention.
[0026] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a processor to implement the OpenHarmony-based HDMI input display method provided by any embodiment of the present invention when executed.
[0027] The technical solution of the embodiment of the present invention is a technical means for automatically launching a playback application when the system-side service determines that the conditions for using a playback application to play the audio and video signals input via HDMI are met, calling the signal source preprocessing interface and the signal source display interface encapsulated in the system-side service through the playback application, and providing the audio and video signals received based on HDMI to the playback application for playback through a driver according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface, without using a high-definition video capture card, thereby enabling external access devices that only support HDMI to be connected to non-computer OpenHarmony devices, thereby expanding the use scenarios and compatibility of OpenHarmony devices and improving user satisfaction with the usage experience.
[0028] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 is a flow chart of an HDMI input display method based on OpenHarmony provided according to Embodiment 1 of the present invention;
[0031] Figure 2 is a flow chart of another HDMI input display method based on OpenHarmony provided according to Embodiment 2 of the present invention;
[0032] Figure 3is a timing diagram of a method for implementing an HDMI input display based on OpenHarmony provided according to an embodiment of the present invention;
[0033] Figure 4 is a structural schematic diagram of an OpenHarmony-based HDMI input display device provided according to Embodiment 3 of the present invention;
[0034] Figure 5 It is a schematic diagram of the structure of an electronic device provided by Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] Embodiment 1
[0038] Figure 1 This is a flowchart of an HDMI input display method based on OpenHarmony provided according to Embodiment 1 of the present invention. This embodiment is applicable to the case of playing audio and video signals input through HDMI. The method can be executed by an HDMI input display device based on OpenHarmony. The HDMI input display device based on OpenHarmony can be implemented in the form of hardware and / or software. The HDMI input display device based on OpenHarmony can be configured in an electronic device.
[0039] like Figure 1As shown, the present embodiment discloses an HDMI input display method based on OpenHarmony, including:
[0040] S110 . After receiving the signal source input event reported by the driver, the system-side service parses the signal source input event to obtain external access information corresponding to the signal source input event.
[0041] In this embodiment, the system-side service may be a service that is called up by the OpenHarmony system and resides in the OpenHarmony system after the OpenHarmony system is started. The external access information includes, but is not limited to, the event type of the signal source input event, the code of the external access device of the input signal source input event, and the connection status of the external access device. The external access device may be a device that supports HDMI and can output audio and video signals, such as a TV box, a game console, and a DVD player.
[0042] In this step, specifically, the driver can determine that there is an external access device sending audio and video signals to the OpenHarmony device through HDMI based on the high and low voltage changes of HDMI, and then capture the audio and video signals input to HDMI, encapsulate the captured audio and video signals into signal source input events, and report them to the system-side service. Among them, the OpenHarmony device can be an electronic device that uses the OpenHarmony system. Then, the input information structure corresponding to the signal source input event can be obtained through the system-side service, and the external access information corresponding to the signal source input event can be obtained by parsing the input information structure. Among them, the input information structure includes at least the event type of the signal source input event, the code of the external access device of the input signal source input event, and the connection status of the external access device.
[0043] S120. When the system-side service determines, based on the external access information, that a condition for using the playback application to play the audio and video signals input via HDMI is met, an application invocation instruction is sent to the playback application.
[0044] Among them, system-side services, playback applications and drivers can be constructed through a cross-process communication framework, and system-side services, playback applications and drivers can be pre-installed in OpenHarmony devices.
[0045] In this step, specifically, it can be determined whether the conditions for using the playback application to play the audio and video signals input by HDMI are met based on the comparison result of the event type of the signal source input event and the preset event type, the comparison result of the encoding of the external access device and the preset HDMI encoding, and the connection status of the external access device. Exemplarily, if it is determined that the event type of the signal source input event is the preset event type, the encoding of the external access device is the preset HDMI encoding, and the connection status of the external access device is connected, it is determined that the conditions for using the playback application to play the audio and video signals input by HDMI are met. If it is determined that the event type of the signal source input event is not the preset event type, the encoding of the external access device is not the preset HDMI encoding, or the connection status of the external access device is unplugged, it is determined that the conditions for using the playback application to play the audio and video signals input by HDMI are not met.
[0046] S130: After the playback application is started according to the application call-up instruction, an interface call enabling instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service is generated and sent to the system side service.
[0047] In this step, specifically, an interface call enabling instruction for the signal source preprocessing interface and the signal source display interface may be generated by the playback application, and the interface call enabling instruction may be sent to the system side service.
[0048] S140. Calling an enable instruction based on the received interface through the system-side service enables the driver to call the signal source preprocessing interface and the signal source display interface, so that the driver can provide the audio and video signals received based on HDMI to the playback application for playback according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface.
[0049] In this step, specifically, after receiving the interface call enable instruction, the system side service can call the driver to execute the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface, and provide the audio and video signals received based on HDMI to the playback application for playback.
[0050] Optionally, the implementation method encapsulated in the signal source preprocessing interface is used to adjust the display parameters of the playback application to obtain the adjusted playback application, and adjust the audio and video signals input by HDMI to be played audio and video signals suitable for playback by the playback application; the implementation method encapsulated in the signal source display interface is used to send the audio and video signals to be played to the frame buffer of the playback application, so that the adjusted playback application can periodically obtain the audio and video signals to be played from the frame buffer for playback. Among them, the frame buffer can be used to store audio and video signals to be played from different input interfaces. There can be multiple input interfaces, such as HDMI, digital video interface standard interface (DisplayPort, DP), digital video interface (Digital VisualInterface, DVI) and video graphics array (Video Graphic Array, VGA) interface, etc.
[0051] Specifically, the extended display identification data of the external access device can be parsed to obtain the display capability information of the external access device, and the display parameters of the playback application can be adjusted according to the display capability information of the external access device and user needs to obtain the adjusted playback application. Among them, the display capability information can include the resolution and refresh rate of the external access device, and the display parameters can include the resolution and refresh rate of the playback application. The audio and video signals input by HDMI can be decoded, and color space conversion and resolution adjustment and other operations can be performed on the decoded audio and video signals to obtain the audio and video signals to be played suitable for the playback application.
[0052] The advantage of this setting is that by adjusting the audio and video signals input by HDMI to be played audio and video signals suitable for playback by the playback application, it can ensure that the audio and video signals to be played are compatible with the playback application, thereby improving the user experience and satisfaction.
[0053] Optionally, since the frame buffer can be used to store audio and video signals to be played from different input interfaces, the adjusted playback application can select different audio and video signals to be played from different input interfaces for playback in response to the user's selection operation.
[0054] The technical solution of this embodiment is that after receiving the signal source input event reported by the driver, the system side service parses the signal source input event to obtain external access information corresponding to the signal source input event; when the system side service determines that the conditions for using the playback application to play the audio and video signals input by HDMI are met according to the external access information, the application call instruction is sent to the playback application; after the playback application completes the startup according to the application call instruction, an interface call enable instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service is generated and sent to the system side service; the system side service enables the driver to call the signal source preprocessing interface and the signal source display interface according to the received interface call enable instruction, so that the driver can provide the audio and video signals received based on HDMI to the playback application for playback according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface. This solves the problem that the high-definition video capture card must be connected to the computer, resulting in the difficulty of relying on the high-definition video capture card to transmit the audio and video signals from HDMI to the OpenHarmony device for display to OpenHarmony devices other than computers. It can solve the problem of OpenHarmony devices, display the audio and video content from HDMI on OpenHarmony devices without using a high-definition video capture card, expanding the usage scenarios and compatibility of OpenHarmony devices.
[0055] Embodiment 2
[0056] Figure 2 It is a flowchart of another HDMI input display method based on OpenHarmony provided according to the second embodiment of the present invention. This embodiment is a further optimization and expansion based on the above embodiments, and can be combined with various optional technical solutions in the above implementation methods.
[0057] like Figure 2 As shown, the present embodiment discloses an HDMI input display method based on OpenHarmony, including:
[0058] S210. After receiving the signal source input event reported by the driver, the system-side service parses the signal source input event to obtain the event type of the signal source input event, the code of the external access device of the input signal source input event, and the connection status of the external access device.
[0059] Among them, the event type of the signal source input event can be used to reflect the specific operation performed by the external access device, such as inputting audio and video signals to the OpenHarmony device. The encoding of the external access device can be used to reflect whether the external access device is a device that supports HDMI. The connection status of the external access device can include connected and disconnected.
[0060] S220. If it is determined through the system side service that the event type of the signal source input event is a preset event type, the encoding of the external access device is a preset HDMI encoding, and the connection status of the external access device is connected, it is determined that the conditions for using the playback application to play the audio and video signals input by HDMI are met.
[0061] In this embodiment, the playback application can be developed based on the custom rendering component (ie, XComponent component) in the OpenHarmony system. The preset event type can be inputting audio and video signals to the OpenHarmony device. The preset HDMI encoding can be the encoding of any device that supports HDMI.
[0062] In this step, specifically, the system side service can be used to determine whether the event type of the signal source input event is a preset event type. If the event type of the signal source input event is a preset event type, it is determined whether the encoding of the external access device is a preset HDMI encoding. If the event type of the signal source input event is not a preset event type, it is determined that the condition for using the playback application to play the audio and video signal input by HDMI is not met. Further, when the event type of the signal source input event is a preset event type, if the encoding of the external access device is a preset HDMI encoding, it is determined whether the connection state of the external access device is connected; if the encoding of the external access device is not a preset HDMI encoding, it is determined that the condition for using the playback application to play the audio and video signal input by HDMI is not met. Further, when the event type of the signal source input event is a preset event type and the encoding of the external access device is a preset HDMI encoding, if the connection state of the external access device is connected, it is determined that the condition for using the playback application to play the audio and video signal input by HDMI is met; if the connection state of the external access device is unplugged, it is determined that the condition for using the playback application to play the audio and video signal input by HDMI is not met.
[0063] S230: When it is determined through the system-side service that the conditions for using the playback application to play the audio and video signals input via HDMI are met, an application invocation instruction is sent to the playback application.
[0064] S240: After the playback application is started according to the application call-up instruction, an interface call enabling instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service is generated and sent to the system side service.
[0065] In this step, specifically, after the playback application completes the startup according to the application call instruction, a display window can be created through the XComponent component, and the number of the display window can be used as the parameter of the signal source display interface. Then, the interface call enable instruction and the parameters of the signal source display interface can be sent to the system side service through the playback application. Finally, the display object of the display window can be created by the system side service according to the signal source display interface parameters, and the display object can be passed to the driver.
[0066] S250. Calling the enable instruction according to the received interface through the system side service enables the driver to call the signal source preprocessing interface and the signal source display interface, so that the driver can provide the audio and video signals received based on HDMI to the playback application for playback according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface.
[0067] In this step, specifically, after the audio and video signal to be played is sent to the frame buffer of the playback application through the driver according to the implementation method encapsulated in the signal source display interface, the audio and video signal received based on HDMI can be provided to the above display window for playback through the driver according to the channel handle interface in the display object. The channel handle interface is used to specify the display window based on the audio and video signal received based on HDMI.
[0068] The technical solution of this embodiment determines that the conditions for using a playback application to play the audio and video signals input via HDMI are met when the event type of the signal source input event is a preset event type, the encoding of the external access device is a preset HDMI encoding, and the connection status of the external access device is connected. This can accurately send an application call-up instruction to the playback application, thereby reducing the time the playback application is occupied and further improving the playback efficiency of the audio and video signals.
[0069] To explain the technical solution of the present invention in detail, the following is an example of a cross-process communication framework for implementing the technical solution of the present invention: the cross-process communication framework includes system-side services, playback applications, and drivers. Figure 3As shown, step 1, report the signal source input event to the system side service through the driver. Step 2, after receiving the signal source input event reported by the driver, the system side service parses the signal source input event to obtain the external access information corresponding to the signal source input event, and when it is determined according to the external access information that the conditions for using the playback application to play the audio and video signals input by HDMI are met, the application call instruction is sent to the playback application. Step 3, after the playback application completes the startup according to the application call instruction, an interface call enable instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service is generated and sent to the system side service. Step 4, through the system side service, according to the received interface call enable instruction, call the driver to execute the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface. Step 5, return the execution result to the system side service through the driver. Step 6, pass the execution result to the playback application through the system side service, so that the audio and video signals received based on HDMI can be played through the playback application.
[0070] Embodiment 3
[0071] Figure 4 This is a structural diagram of an HDMI input display device based on OpenHarmony provided according to Example 3 of the present invention. This embodiment can be applied to the situation of playing audio and video signals input through HDMI. The HDMI input display device based on OpenHarmony can be implemented in the form of hardware and / or software and can be configured in an electronic device.
[0072] like Figure 4 As shown, the HDMI input display device based on OpenHarmony disclosed in this embodiment includes: an access information acquisition module 41, a playback application calling module 42, an interface calling module 43 and an audio and video playback module 44, wherein:
[0073] The access information acquisition module 41 is used to parse the signal source input event after receiving the signal source input event reported by the driver through the system side service, and obtain the external access information corresponding to the signal source input event;
[0074] The playback application initiation module 42 is used to send an application initiation instruction to the playback application when the system side service determines that the conditions for using the playback application to play the audio and video signals input by HDMI are met according to the external access information;
[0075] The interface calling module 43 is used to generate an interface calling enabling instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service after the playback application completes the startup according to the application calling instruction, and send it to the system side service;
[0076] The audio and video playback module 44 is used to enable the driver to call the signal source preprocessing interface and the signal source display interface through the system side service according to the received interface call enable instruction, so that the driver can provide the audio and video signals received based on HDMI to the playback application for playback according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface.
[0077] The technical solution in this embodiment, through the cooperation of the access information acquisition module, the playback application calling module, the interface calling module and the audio and video playback module, can display the audio and video content from HDMI on the OpenHarmony device without using a high-definition video capture card, thereby expanding the use scenarios and compatibility of the OpenHarmony device.
[0078] Optionally, the access information acquisition module 41 is specifically used to: parse the signal source input event through the system side service to obtain the event type of the signal source input event, the code of the external access device of the input signal source input event, and the connection status of the external access device.
[0079] Optionally, the playback application calling module 42 is specifically used to: if it is determined through the system side service that the event type of the signal source input event is a preset event type, the encoding of the external access device is a preset HDMI encoding, and the connection status of the external access device is connected, then it is determined that the conditions for using the playback application to play the audio and video signals input by HDMI are met.
[0080] Optionally, the implementation method encapsulated in the signal source preprocessing interface is used to adjust the display parameters of the playback application to obtain an adjusted playback application, and to adjust the audio and video signals input by HDMI to audio and video signals to be played suitable for playback by the playback application; the implementation method encapsulated in the signal source display interface is used to send the audio and video signals to be played to the frame buffer of the playback application, so that the adjusted playback application can periodically obtain the audio and video signals to be played from the frame buffer for playback.
[0081] Optionally, when adjusting the display parameters of the playback application to obtain the adjusted playback application, the implementation method encapsulated in the signal source preprocessing interface is specifically used to: parse the extended display identification data of the external access device to obtain the display capability information of the external access device, and adjust the display parameters of the playback application according to the display capability information of the external access device to obtain the adjusted playback application.
[0082] Optionally, system-side services, playback applications, and drivers are constructed through a cross-process communication framework; wherein, after the OpenHarmony system is started, the system-side services are called up by the OpenHarmony system and reside in the OpenHarmony system.
[0083] The HDMI input display device based on the OpenHarmony system provided in the embodiment of the present invention can execute the HDMI input display method based on the OpenHarmony system provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in this embodiment, please refer to the description in any method embodiment of this application.
[0084] Embodiment 4
[0085] Figure 5 FIG. 1 is a schematic diagram showing the structure of an electronic device 10 that can be used to implement an embodiment of the present invention. Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0086] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0087] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the HDMI input display method based on OpenHarmony.
[0088] In some embodiments, the HDMI input display method based on OpenHarmony may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the HDMI input display method based on OpenHarmony described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the HDMI input display method based on OpenHarmony in any other appropriate manner (e.g., by means of firmware).
[0089] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0090] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0091] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0092] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0093] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0094] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0095] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0096] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An HDMI input display method based on OpenHarmony, characterized in that: The method comprises: After receiving the signal source input event reported by the driver, the system side service parses the signal source input event to obtain the external access information corresponding to the signal source input event; When the system-side service determines, according to the external access information, that a condition for using the playback application to play the audio and video signals input via HDMI is met, sending an application invocation instruction to the playback application; After the playback application is started according to the application call instruction, an interface call enable instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service is generated and sent to the system side service; The system-side service calls the enable instruction according to the received interface, enabling the driver to call the signal source preprocessing interface and the signal source display interface, so that the driver can provide the audio and video signals received based on HDMI to the playback application for playback according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface.
2. The method according to claim 1, characterized in that The signal source input event is parsed through the system side service to obtain the external access information corresponding to the signal source input event, including: The signal source input event is parsed through the system side service to obtain the event type of the signal source input event, the code of the external access device of the input signal source input event, and the connection status of the external access device.
3. The method according to claim 2, characterized in that The system-side service determines, according to the external access information, a condition for using a playback application to play the audio and video signal input by HDMI, including: If the system-side service determines that the event type of the signal source input event is the preset event type, the encoding of the external access device is the preset HDMI encoding, and the connection status of the external access device is connected, it is determined that the conditions for using the playback application to play the HDMI input audio and video signal are met.
4. The method according to claim 1, characterized in that: The implementation method encapsulated in the signal source preprocessing interface is used to adjust the display parameters of the playback application to obtain an adjusted playback application, and to adjust the audio and video signals input by HDMI to be played audio and video signals suitable for playback by the playback application; The implementation method encapsulated in the signal source display interface is used to send the audio and video signal to be played to the frame buffer of the playback application, so that the adjusted playback application can periodically obtain the audio and video signal to be played from the frame buffer for playback.
5. The method according to claim 4, characterized in that When the display parameters of the playback application are adjusted to obtain the adjusted playback application, the implementation method encapsulated in the signal source preprocessing interface is specifically used to: The extended display identification data of the external access device is parsed to obtain the display capability information of the external access device, and the display parameters of the playback application are adjusted according to the display capability information of the external access device to obtain the adjusted playback application.
6. The method according to any one of claims 1 to 5, characterized in that: The system-side service, the playback application and the driver are constructed through a cross-process communication framework; Among them, after the OpenHarmony system is started, the system-side service is called up by the OpenHarmony system and resides in the OpenHarmony system.
7. An HDMI input display device based on OpenHarmony, characterized in that: The device comprises: The access information acquisition module is used to parse the signal source input event after receiving the signal source input event reported by the driver through the system side service, and obtain the external access information corresponding to the signal source input event; A playback application invocation module, configured to send an application invocation instruction to the playback application when the system side service determines, based on the external access information, that a condition for using the playback application to play the audio and video signals input via HDMI is met; The interface calling module is used to generate an interface calling enabling instruction for the signal source preprocessing interface and the signal source display interface encapsulated in the system side service after the playback application completes the startup according to the application calling instruction, and send it to the system side service; The audio and video playback module is used to enable the driver to call the signal source preprocessing interface and the signal source display interface through the system side service according to the received interface call enable instruction, so that the driver can provide the audio and video signals received based on HDMI to the playback application for playback according to the implementation method encapsulated in the signal source preprocessing interface and the signal source display interface.
8. The device according to claim 7, characterized in that The access information acquisition module is specifically used to: parse the signal source input event through the system side service to obtain the event type of the signal source input event, the code of the external access device of the input signal source input event, and the connection status of the external access device.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the HDMI input display method based on OpenHarmony according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the HDMI input display method based on OpenHarmony as described in any one of claims 1 to 6 when executed.