Video rendering method, device and equipment, computer storage medium and product

By expanding the audio and video communication library and custom rendering engine, it solves the problem that browser rendering technology cannot provide an immersive experience, and achieves more efficient video rendering and immersive experience.

CN118828086APending Publication Date: 2024-10-22CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410302242.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

The existing VR live stream rendering technology through the browser has poor rendering results and is difficult to provide users with an immersive experience.

Method used

By expanding the audio and video communication library, it supports custom rendering surfaces, uses a custom rendering engine for 3D rendering, and combines client hardware resources to achieve more efficient video decoding and rendering.

Benefits of technology

The rendering effect is improved, providing users with a more immersive VR live broadcast experience, avoiding the limitations of browser rendering, and optimizing the utilization of local hardware resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118828086A_ABST
    Figure CN118828086A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video rendering method and device, equipment, a computer storage medium and a product, and the method comprises the steps: carrying out the extension processing of a playing assembly based on an audio and video communication library in an application program according to the audio and video communication library, and obtaining a first application program, the audio and video communication library is used for constructing audio and video communication capability for the application program, and the playing component is used for realizing session logic of the application program based on the audio and video communication library; a rendering surface is configured in the first application program to obtain a target application program, and the rendering surface is created by the application program through a rendering engine and used for displaying rendered video stream data; receiving video stream data to be rendered through the target application program; and rendering the video stream data to the rendering surface, so that the rendering engine performs three-dimensional rendering on the video stream data. According to the embodiment of the invention, immersive video watching experience can be provided for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of video rendering, and in particular relates to a video rendering method, device, equipment, computer storage medium and product. Background Art

[0002] With the popularization of 5G technology, the demand for live streaming is very strong, which has driven the development of live streaming business. On the other hand, with the introduction of the concept of the metaverse, virtual reality technology (VR) has once again become the focus of attention. The combination of live streaming and VR can provide users with an immersive experience, and VR live streaming will be a mainstream in the future.

[0003] Existing VR live streaming rendering technologies generally use browsers to decode and render VR live video stream data. However, the rendering results of rendering video stream data through browsers are poor, making it difficult to provide users with an immersive experience. Summary of the invention

[0004] The embodiments of the present application provide a video rendering method, apparatus, device, computer storage medium and product to solve the problem that the existing video rendering method renders video stream data through a browser with poor rendering results and is difficult to provide an immersive experience for users.

[0005] In a first aspect, an embodiment of the present application provides a video rendering method, comprising:

[0006] According to the audio and video communication library, in the application, an extension process based on the audio and video communication library is performed on the playback component to obtain a first application, wherein the audio and video communication library is used to build audio and video communication capabilities for the application, and the playback component is used to implement the session logic of the application based on the audio and video communication library;

[0007] Configuring a rendering surface in the first application to obtain a target application, wherein the rendering surface is created by the application through a rendering engine and is used to display rendered video stream data;

[0008] Receiving the video stream data to be rendered through the target application;

[0009] The video stream data is rendered to the rendering surface, so that the rendering engine performs three-dimensional rendering on the video stream data.

[0010] In a second aspect, an embodiment of the present application provides a video rendering device, the device comprising:

[0011] A processing module, configured to perform extension processing based on the audio and video communication library on the playback component in the application program to obtain a first application program, wherein the audio and video communication library is used to construct audio and video communication capabilities for the application program, and the playback component is used to implement the session logic of the application program based on the audio and video communication library;

[0012] A configuration module, configured to configure a rendering surface in the first application to obtain a target application, wherein the rendering surface is created by the application through a rendering engine and is used to display rendered video stream data;

[0013] A receiving module, used for receiving the video stream data to be rendered through the target application;

[0014] The rendering module is used to render the video stream data to the rendering surface so that the rendering engine performs three-dimensional rendering on the video stream data.

[0015] In a third aspect, an embodiment of the present application provides a terminal device, the device comprising: a processor and a memory storing computer program instructions;

[0016] When the processor executes the computer program instructions, the video rendering method of the first aspect is implemented.

[0017] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the video rendering method of the first aspect is implemented.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the video rendering method of the first aspect.

[0019] The video rendering method, device, equipment, computer storage medium and product of the embodiments of the present invention, wherein the method includes: according to the audio and video communication library, performing extension processing on the playback component in the client based on the audio and video communication library to obtain a first client, and configuring a rendering surface in the first client to obtain a target client. Through the above steps, the method of extending the audio and video communication library can be adopted to enable the audio and video communication library to support the setting of a custom rendering surface, and then the decoded video stream can be rendered to the custom rendering surface, and finally it is three-dimensionally rendered through a custom rendering engine, avoiding the disadvantage of the prior art that video rendering can only be performed through a browser, and through the custom rendering engine and the client jointly performing three-dimensional video rendering, it can better utilize local hardware resources, achieve more efficient video decoding and rendering, provide users with an immersive experience, and improve rendering effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0021] Figure 1 is a flow chart of a video rendering method applied to an electronic device provided in an embodiment of the present application;

[0022] Figure 2 is a structural diagram of a video rendering device provided in an embodiment of the present application;

[0023] Figure 3 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0025] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0026] In order to solve the problems of the prior art, the embodiments of the present application provide a video rendering method, device, equipment, computer storage medium and product. The following first describes an example of the video rendering method provided by the embodiments of the present application.

[0027] Figure 1FIG. 1 is a flow chart of a video rendering method provided by an embodiment of the present application. The video rendering method can be applied to electronic devices, such as Figure 1 As shown, the method includes:

[0028] Step 101, according to the audio and video communication library, in the application, the playback component is extended based on the audio and video communication library to obtain a first application, wherein the audio and video communication library is used to build audio and video communication capabilities for the application, and the playback component is used to implement the session logic of the application based on the audio and video communication library;

[0029] Step 102, configuring a rendering surface in the first application to obtain a target application, wherein the rendering surface is created by the application through a rendering engine and is used to display rendered video stream data;

[0030] Step 103, receiving the video stream data to be rendered through the target application;

[0031] Step 104: Render the video stream data to the rendering surface, so that the rendering engine performs three-dimensional rendering on the video stream data.

[0032] As shown above, the electronic device may be a mobile terminal, a personal computer, a wearable device, etc., which is not specifically limited here.

[0033] In step 101, the audio and video communication library may be a WebRTC (Web Real-Time Communication) library, which is an audio and video engine for real-time data transmission between browsers. It is an open source library for audio and video processing and instant messaging, providing an excellent cross-platform multimedia framework. The WebRTC library provides a set of protocols and tools for establishing, managing, and maintaining real-time audio and video communication connections, enabling developers to build applications with audio and video communication capabilities.

[0034] Since the WebRTC library can only use its own rendering component to render the video stream data, it does not support rendering the video stream data to a custom rendering surface, which results in the inability to render to the rendering surface defined by the U3D engine, and ultimately results in the inability to complete 3D rendering. Therefore, in this embodiment, the webrtc library is extended to support setting a custom rendering surface, and the decoded content is rendered to the custom rendering surface, thereby completing 3D rendering.

[0035] Specifically, in this embodiment, the video stream data can be processed by a custom playback component instead of a rendering component of the WebRTC library, so that it can be rendered to a custom rendering surface. Therefore, it is necessary to extend the webrtc library so that the playback component can establish a connection with the WebRTC library to process the video stream data.

[0036] It should be noted that there are two ways to extend the webrtc library. Solution 1: The package name of the extended class is consistent with the package name in the webrtc library, so that the protected and default permission fields defined in the webrtc library can be accessed; Solution 2: The package name of the extended class is consistent with the package name in the custom library. In this case, the default permission field defined in the webrtc library needs to be accessed through reflection, and the protected permission field is accessed through inheritance. The classes are the video decoding factory, connection factory, and point-to-point connection object in the following embodiments. Please refer to the following embodiments for specific descriptions, which will not be repeated here.

[0037] The above-mentioned session logic refers to a series of rules and configurations used by the playback component to implement a communication session with the audio and video communication library.

[0038] In one embodiment, after step 102 and before step 102, the method further includes:

[0039] A listener and a preset video stream address are added to the playback component through the first application, wherein the listener is used to monitor the connection status between the playback component and the audio and video communication library, and the video stream address is used to provide video stream data to be rendered.

[0040] In this embodiment, the connection state may include disconnection, start connection, and pause connection between the playback component and the audio and video communication library. The video stream address may be a website address, etc., and in this embodiment, the video stream data may be VR video stream data, which is not limited in this embodiment.

[0041] In step 102, in order to achieve the best rendering effect, the rendering engine may adopt the U3D engine.

[0042] In one embodiment, the step 102 further includes:

[0043] The rendering surface is configured to the playback component, so that the playback component configures the rendering surface to the video decoding factory.

[0044] Specifically, the first application can configure the rendering surface to the playback component in a setSurface manner, so that the subsequent playback component can configure the rendering surface to the video decoding factory.

[0045] In step 103, the video stream data to be rendered is received through the target application;

[0046] In this embodiment, the above-mentioned video stream data can be obtained through the video stream address of the target application in the above-mentioned embodiment.

[0047] In step 104, the video stream data is rendered to the rendering surface, so that the rendering engine performs three-dimensional rendering on the video stream data.

[0048] In this embodiment, the video stream data can be rendered to the rendering surface through a custom video decoder in the playback component, so that the U3D engine can perform three-dimensional rendering on the video stream data.

[0049] In this embodiment, a method of extending the audio and video communication library can be adopted to enable the audio and video communication library to support the setting of a custom rendering surface, and then the decoded video stream can be rendered to the custom rendering surface, and finally three-dimensionally rendered through a custom rendering engine, thereby avoiding the shortcoming of the prior art that video rendering can only be performed through a browser. In addition, by jointly performing three-dimensional video rendering through a custom rendering engine and an application, better utilization of local hardware resources can be achieved, more efficient video decoding and rendering can be achieved, an immersive experience can be provided to users, and rendering effects can be improved.

[0050] In an embodiment of the present application, the step of performing an extension process based on the audio and video communication library on the playback component in the application to obtain the first application includes:

[0051] According to the audio and video communication library, a video decoding factory is created in the playback component, wherein the video decoding factory is used to create a custom decoder for decoding the video stream data;

[0052] According to the video decoding factory and the audio and video communication library, a connection factory is created in the playback component, wherein the connection factory is used to create an object for connecting to the audio and video communication library;

[0053] Using the connection factory to create a point-to-point connection object, the point-to-point connection object is used to establish a communication connection between the playback component and the audio and video communication library;

[0054] The communication connection parameters of the point-to-point connection object are configured so that the point-to-point connection object can connect to the audio and video communication library and obtain the first application.

[0055] In this embodiment, it is necessary to create a video decoding factory in the playback component according to the package name in the audio and video communication library, that is, the above-mentioned webrtc library. Specifically, the package name of the extended video decoding factory can be made consistent with the package name in the webrtc library, thereby achieving the purpose of extending the webrtc library. In addition, the connection factory and the point-to-point connection object in this embodiment are both created in this way.

[0056] In one embodiment, creating a connection factory in the playback component according to the video decoding factory and the audio and video communication library includes:

[0057] According to the audio and video communication library, creating a connection factory builder in the playback component;

[0058] Configuring the video decoding factory and the preset video encoding factory into the connection factory builder;

[0059] The connection factory is created using the configured connection factory builder.

[0060] In this embodiment, a connection factory builder PeerConnectionFactory.Builder can be created in the playback component according to the package name of the audio and video communication library, wherein PeerConnectionFact ory.Builder is a builder class in the WebRTC library, which is used to configure and create a connection factory PeerConnectionFactory.

[0061] After PeerConnectionFactory.Builder is constructed, the video decoding factory CustomVideoDecoderFactory constructed in the above embodiment and the default video encoding factory DefaultVideoEncoderFactory in the WebRTC library need to be set to PeerConnectionFactory.Builder.

[0062] Finally, call the createPeerConnectionFactory.Builder's createPeerConnectionFactory method to create the PeerConnectionFactory.

[0063] In this embodiment, the connection factory is created through the above steps to ensure that the WebRTC connection uses the correct codec factory, so that the audio and video data can be encoded and decoded according to the developer's needs. By customizing the decoder factory and using the default encoder factory, developers can achieve specific performance optimization or meet specific rendering requirements while ensuring basic functions.

[0064] In the step of using the connection factory to create a peer-to-peer connection object in this embodiment, the createPeerConnection method of PeerConnectionFactory may be called to create the peer-to-peer connection object PeerConnection.

[0065] In one embodiment, configuring the communication connection parameters of the point-to-point connection object includes:

[0066] Adding an audio and video receiver in the point-to-point connection object, the audio and video receiver is used to receive audio and video data sent from the audio and video communication library to the application;

[0067] A session description protocol is created in the point-to-point connection object, where the session description protocol is used to specify media session configuration information of the point-to-point connection object.

[0068] In this embodiment, after creating a point-to-point connection object, an audio and video receiver needs to be added so that audio and video data from the remote end can be received. This can be achieved by calling the addTransceiver method of the point-to-point connection object. The addTransceiver method allows adding a transceiver, which can both send and receive audio and video data. Through this method, the ability to process audio and video data is added to the point-to-point connection object.

[0069] Next, you need to start establishing a WebRTC connection so that the playback component can establish a connection with the WebRTC library. Specifically, you can create a Session Description Protocol (SDP) offer in the peer-to-peer connection object, which contains information about how to establish the connection and media configuration. You can create an SDP offer by calling the createOffer method of the peer-to-peer connection object. When the offer is created, set the SDP offer to the peer-to-peer connection object using setLocalDescription.

[0070] In this embodiment, by creating an audio and video receiver and a session description protocol, the basic parameters and configurations required for the connection are set, so that the playback component can establish a connection with the WebRTC library to prepare for subsequent audio and video data transmission.

[0071] In this embodiment, by customizing the video decoder, configuring the connection factory, and creating a point-to-point connection object, a flexible and efficient WebRTC communication capability is provided for the application, which helps to optimize the video quality and user experience of the application. At the same time, the method of extending the audio and video communication library can be adopted to enable the audio and video communication library to support the setting of a custom rendering surface, and then the decoded video stream can be rendered to the custom rendering surface to ensure the correct execution of the subsequent three-dimensional rendering process.

[0072] In one embodiment of the present application, after receiving the video stream data to be rendered through the target application, the method further includes:

[0073] Parsing the video stream data by the target application to obtain the video size of the video stream data;

[0074] Using the video decode factory to create a custom video decoder according to the video size;

[0075] Decoding the video stream data using the custom video decoder to obtain a decoded video;

[0076] The rendering of the video stream data to the rendering surface comprises:

[0077] The decoded video is rendered to the rendering surface.

[0078] In this embodiment, the target application parses the video stream data to obtain the video size, and then the target application sends the video size to the video decoding factory, so that the video decoding factory creates a custom decoder according to the video size.

[0079] After obtaining the custom decoder, the video stream data is decoded to obtain the decoded video, and then the decoded video is rendered to the created rendering surface, so that the U3D engine can obtain the decoded video from the rendering surface for three-dimensional rendering.

[0080] In this embodiment, the video stream data is three-dimensionally rendered by using an application and a rendering engine, thereby improving the rendering effect and the user interaction experience.

[0081] like Figure 2 As shown, the embodiment of the present application further provides a video rendering device 200, and the video rendering device 200 includes:

[0082] The processing module 201 is used to perform extension processing based on the audio and video communication library on the playback component in the application program to obtain a first application program, wherein the audio and video communication library is used to build audio and video communication capabilities for the application program, and the playback component is used to implement the session logic of the application program based on the audio and video communication library;

[0083] A configuration module 202, configured to configure a rendering surface in the first application to obtain a target application, wherein the rendering surface is created by the application through a rendering engine and is used to display rendered video stream data;

[0084] The receiving module 203 is used to receive the video stream data to be rendered through the target application;

[0085] The rendering module 204 is used to render the video stream data to the rendering surface, so that the rendering engine performs three-dimensional rendering on the video stream data.

[0086] Optionally, the processing module 201 includes:

[0087] A first creation submodule, used for creating a video decoding factory in the playback component according to the audio and video communication library, wherein the video decoding factory is used for creating a custom video decoder for decoding the video stream data;

[0088] A second creation submodule is used to create a connection factory in the playback component according to the video decoding factory and the audio and video communication library, wherein the connection factory is used to create an object for connecting to the audio and video communication library;

[0089] A third creation submodule is used to use the connection factory to create a point-to-point connection object, and the point-to-point connection object is used to establish a communication connection between the playback component and the audio and video communication library;

[0090] The configuration submodule is used to configure the communication connection parameters of the point-to-point connection object so that the point-to-point connection object can connect to the audio and video communication library and obtain the first application.

[0091] Optionally, the second creation submodule includes:

[0092] A first creation unit, configured to create a connection factory builder in the playback component according to the audio and video communication library;

[0093] A configuration unit, configured to configure the video decoding factory and the preset video encoding factory into the connection factory builder;

[0094] The second creation unit is used to create the connection factory using the configured connection factory builder.

[0095] Optionally, the configuration submodule includes:

[0096] An adding unit, used for adding an audio and video receiver in the point-to-point connection object, wherein the audio and video receiver is used for receiving audio and video data sent from the audio and video communication library to the application;

[0097] The third creation unit is used to create a session description protocol in the point-to-point connection object, where the session description protocol is used to specify media session configuration information of the point-to-point connection object.

[0098] Optionally, the configuration module 202 is specifically configured to:

[0099] The rendering surface is configured to the playback component, so that the playback component configures the rendering surface to the video decoding factory.

[0100] Optionally, the video rendering device 200 is specifically used for:

[0101] A listener and a preset video stream address are added to the playback component through the first application, wherein the listener is used to monitor the connection status between the playback component and the audio and video communication library, and the video stream address is used to provide video stream data to be rendered.

[0102] Optionally, the video rendering device 200 further includes:

[0103] A parsing module, used for parsing the video stream data through the target application to obtain the video size of the video stream data;

[0104] A fourth creation module, configured to create a custom video decoder according to the video size using the video decoding factory;

[0105] A decoding module, used to decode the video stream data using the custom video decoder to obtain a decoded video;

[0106] Optionally, the rendering module 204 is specifically configured to:

[0107] The decoded video is rendered to the rendering surface.

[0108] It should be noted that the video rendering device 200 is a device corresponding to the above-mentioned video rendering method, and all implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0109] Figure 3 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application is shown.

[0110] The terminal device may include a processor 301 and a memory 302 storing computer program instructions.

[0111] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0112] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.

[0113] In certain embodiments, the memory 302 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0114] The processor 301 implements any one of the video rendering methods in the above embodiments by reading and executing computer program instructions stored in the memory 302 .

[0115] In one example, the terminal device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.

[0116] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0117] Bus 310 includes hardware, software or both, and the components of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, first video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0118] In addition, in combination with the video rendering method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the video rendering methods in the above embodiment is implemented.

[0119] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0120] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0121] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0122] Aspects of the present disclosure are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable video rendering device to produce a machine so that these instructions executed by the processor of the computer or other programmable video rendering device enable the implementation of the functions / actions specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0123] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A video rendering method, characterized in that: The method comprises: According to the audio and video communication library, in the application, an extension process based on the audio and video communication library is performed on the playback component to obtain a first application, wherein the audio and video communication library is used to build audio and video communication capabilities for the application, and the playback component is used to implement the session logic of the application based on the audio and video communication library; Configuring a rendering surface in the first application to obtain a target application, wherein the rendering surface is created by the application through a rendering engine and is used to display rendered video stream data; Receiving the video stream data to be rendered through the target application; The video stream data is rendered to the rendering surface, so that the rendering engine performs three-dimensional rendering on the video stream data.

2. The video rendering method according to claim 1, characterized in that: The step of performing an extension process based on the audio and video communication library on the playback component in the application to obtain a first application includes: According to the audio and video communication library, a video decoding factory is created in the playback component, wherein the video decoding factory is used to create a custom video decoder for decoding the video stream data; According to the video decoding factory and the audio and video communication library, a connection factory is created in the playback component, wherein the connection factory is used to create an object for connecting to the audio and video communication library; Using the connection factory to create a point-to-point connection object, the point-to-point connection object is used to establish a communication connection between the playback component and the audio and video communication library; The communication connection parameters of the point-to-point connection object are configured so that the point-to-point connection object can connect to the audio and video communication library and obtain the first application.

3. The video rendering method according to claim 2, characterized in that: The step of creating a connection factory in the playback component according to the video decoding factory and the audio and video communication library includes: According to the audio and video communication library, creating a connection factory builder in the playback component; Configuring the video decoding factory and the preset video encoding factory into the connection factory builder; The connection factory is created using the configured connection factory builder.

4. The video rendering method according to claim 2, characterized in that: The communication connection parameters include an audio and video receiver and a session description protocol; The configuring the communication connection parameters of the point-to-point connection object includes: Adding an audio and video receiver in the point-to-point connection object, the audio and video receiver is used to receive audio and video data sent from the audio and video communication library to the application; A session description protocol is created in the point-to-point connection object, where the session description protocol is used to specify media session configuration information of the point-to-point connection object.

5. The video rendering method according to claim 2, characterized in that: The configuring a rendering surface in the first application to obtain a target application comprises: The rendering surface is configured to the playback component, so that the playback component configures the rendering surface to the video decoding factory.

6. The video rendering method according to claim 2, characterized in that: Before configuring the rendering surface in the first application to obtain the target application, the method further includes: A listener and a preset video stream address are added to the playback component through the first application, wherein the listener is used to monitor the connection status between the playback component and the audio and video communication library, and the video stream address is used to provide video stream data to be rendered.

7. The video rendering method according to claim 6, characterized in that: After receiving the video stream data to be rendered through the target application, the method further includes: Parsing the video stream data by the target application to obtain the video size of the video stream data; Using the video decode factory to create a custom video decoder according to the video size; Decoding the video stream data using the custom video decoder to obtain a decoded video; The rendering of the video stream data to the rendering surface comprises: The decoded video is rendered to the rendering surface.

8. A video rendering device, characterized in that: The device comprises: A processing module, configured to perform extension processing based on the audio and video communication library on the playback component in the application program to obtain a first application program, wherein the audio and video communication library is used to construct audio and video communication capabilities for the application program, and the playback component is used to implement the session logic of the application program based on the audio and video communication library; A configuration module, configured to configure a rendering surface in the first application to obtain a target application, wherein the rendering surface is created by the application through a rendering engine and is used to display rendered video stream data; A receiving module, used for receiving the video stream data to be rendered through the target application; The rendering module is used to render the video stream data to the rendering surface so that the rendering engine performs three-dimensional rendering on the video stream data.

9. A terminal device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the video rendering method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the video rendering method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device implements the video rendering method as described in any one of claims 1 to 7.