Method and device for rendering video in client interface, equipment and storage medium

By creating rendering controls and communication pipelines in the client interface, the problem of abnormal display area caused by the scrolling of DirectX rendering content in the DirectUI interface is solved, unified scrolling and compatibility of video rendering and interface are achieved, the development process is simplified and the system stability is improved. sex.

CN118540545AInactive Publication Date: 2024-08-23GUANGZHOU HUYA TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410812058.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When displaying DirectX-rendered content in the DirectUI interface, the scrolling operation may cause the floating window display area to be abnormal, and the existing technology is not compatible with DirectUI. Mainly windowless development leads to increased development complexity and compatibility issues between floating windows and the interface.

Method used

By creating a rendering control and communication pipeline in the client interface, the video decoding process transmits the video image to the main process according to the data sharing method determined by the system information. The main process uses the rendering control to render the video image to the user-selected screen position to ensure video rendering. As a DirectUI component, it has a parent-child/sibling relationship with the business controls in the interface, unifying the scrolling interface and floating windows.

Benefits of technology

It avoids exceptions in the floating window display area, simplifies client interface development, reduces development complexity and performance overhead, improves the ease of processing scroll bars, animations and special effects on the interface, and improves the robustness of the client.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540545A
    Figure CN118540545A
Patent Text Reader

Abstract

The invention provides a method and device for rendering a video in a client interface, equipment and a storage medium, and relates to the technical field of video playing. The method comprises the following steps: when a host process is started, creating a rendering control according to system information of the electronic equipment; after the host process is started, creating a communication pipeline, starting a video decoding process, and transmitting video parameters carried by a video playing instruction to the video decoding process through the communication pipeline under the condition that a user inputs the video playing instruction; the video decoding process obtains a video image according to the video parameter, and transmits the video image to the host process according to a data sharing mode determined according to the system information; in the embodiment of the invention, the host process uses the rendering control to render the video image to the screen position selected by the user, so that the video rendering is used as a component of the DirectUI, a father-son / brother relationship exists between the video rendering and each service control in the DirectUI interface, when the user operates a scroll bar, the scroll interface and the floating window can be unified, and the content rendered by DirectX displayed by the floating window is prevented from being abnormal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video playback technology, and in particular to a method, device, equipment and storage medium for rendering a video in a client interface. Background Art

[0002] As live video broadcasting scenarios become more and more complex, there is a need to display content (such as videos) rendered by DirectX (Direct eXtension, DX for short) in DirectUI without a window.

[0003] Currently, the content rendered by DirectX is usually displayed through an independent window sub-window. The window sub-window appears as a floating window in the DirectUI interface. There is no parent-child / sibling relationship between the sub-window and the business controls in the DirectUI interface. When the content of the DirectUI interface scrolls, it may cause abnormalities in the display area of ​​the floating window. Summary of the invention

[0004] The present invention provides a method, device, equipment and storage medium for rendering video in a client interface, which can avoid abnormality in the display area of ​​a floating window displaying content rendered by DirectX when the content of the DirectUI interface scrolls.

[0005] The embodiments of the present invention can be implemented as follows:

[0006] In a first aspect, the present invention provides a method for rendering a video in a client interface, which is applied to an electronic device, wherein the electronic device is deployed with a video decoding process and a main process for the client interface, and the method comprises:

[0007] When the main process is started, the main process creates a rendering control according to the system information of the electronic device;

[0008] After being started, the main process creates a communication pipeline, starts the video decoding process, and when a user inputs a video playback instruction, transmits the video parameters carried by the video playback instruction to the video decoding process through the communication pipeline;

[0009] The video decoding process obtains a video image according to the video parameters, and transmits the video image to the main process in a data sharing manner determined according to the system information;

[0010] The main process uses the rendering control to render the video image to a screen position selected by a user.

[0011] Optionally, the step of creating a rendering control according to the system information of the electronic device includes:

[0012] The main process determines, according to the system information, whether the electronic device supports DX texture sharing;

[0013] If supported, create a DX control as the rendering control;

[0014] If not supported, a default control is created as the rendering control;

[0015] Optionally, the step of creating a communication pipeline includes:

[0016] The main process sets the pipe name based on the process ID to create a named pipe;

[0017] After the video decoding process is started, the named pipeline is linked to by the pipeline name;

[0018] The master process uses the named pipe linked to the video decoding process as the communication pipe.

[0019] Optionally, the method further includes a step of determining a data sharing mode according to the system information, comprising:

[0020] The video decoding process determines whether the electronic device supports DX texture sharing according to the system information;

[0021] If supported, determining that the data sharing mode is the first mode, wherein the first mode is implemented based on a shared texture pointer;

[0022] If not supported, the data sharing mode is determined to be the second mode, and the second mode is implemented based on shared memory.

[0023] Optionally, the video image includes a DX texture at each moment, and the step of transmitting the video image to the main process in a data sharing manner determined according to the system information includes:

[0024] When the data sharing mode is the first mode, the video decoding process creates a shared texture, and transmits a pointer of the shared texture to the main process through the communication pipe;

[0025] At each moment, the video decoding process copies the DX texture at that moment to the shared texture, and sends an update message to the main process through the communication pipe;

[0026] After receiving the update message, the main process obtains the DX texture at that moment according to the pointer of the shared texture.

[0027] Optionally, the step of the main process using the rendering control to render the video image to a screen position selected by the user includes:

[0028] The main process uses the DX control to render the DX texture at each moment to the screen position selected by the user, wherein when the data sharing mode is the first mode, the rendering control created by the main process is the DX control.

[0029] Optionally, the step of transmitting the video image to the main process in a data sharing manner determined according to the system information further includes:

[0030] When the data sharing mode is the second mode, the video decoding process creates a shared memory, and transmits information of the shared memory to the main process through the communication pipe;

[0031] At each moment, the video decoding process converts the DX texture at that moment and copies the obtained conversion bitmap to the shared memory;

[0032] The video decoding process sends an update message to the main process through the communication pipe;

[0033] After receiving the update message, the main process reads the conversion bitmap at that moment from the shared memory.

[0034] Optionally, the step of the main process using the rendering control to render the video image to a screen position selected by the user includes:

[0035] The main process uses a default control to render the conversion bitmap at each moment to a screen position selected by the user, wherein when the data sharing mode is the second mode, the rendering control created by the main process is the default control.

[0036] In a second aspect, the present invention provides a device for rendering video in a client interface, which is applied to an electronic device, and the device includes a video decoding process and a main process for the client interface;

[0037] The main process is used to create a rendering control according to the system information of the electronic device when starting;

[0038] The main process is also used to create a communication pipeline after startup, start the video decoding process, and when a user inputs a video playback instruction, transmit the video parameters carried by the video playback instruction to the video decoding process through the communication pipeline;

[0039] The video decoding process is used to obtain a video image according to the video parameters, and transmit the video image to the main process according to a data sharing method determined according to the system information;

[0040] The main process is also used to render the video image to a screen position selected by a user using the rendering control.

[0041] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the method for rendering a video in a client interface as described in the first aspect above is implemented.

[0042] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for rendering a video in a client interface as described in the first aspect above is implemented.

[0043] Compared with the prior art, the present invention provides a method for rendering video in a client interface: when the main process is started, a rendering control is created according to the system information of the electronic device; after the main process is started, a communication pipeline is created to start the video decoding process, and when the user inputs a video playback instruction, the video parameters carried by the video playback instruction are transmitted to the video decoding process through the communication pipeline; the video decoding process obtains a video image according to the video parameters, and transmits the video image to the main process in a data sharing method determined according to the system information; the main process uses a rendering control to render the video image to a screen position selected by the user. Since the present invention uses a rendering control created by the main process to render the video image synchronized by the video decoding process, the video rendering, as a component of DirectUI, has a parent-child / brother relationship with each business control in the DirectUI interface. When the user operates the scroll bar, the scrolling interface and the floating window can be unified to avoid abnormalities in the content rendered by DirectX displayed in the floating window. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 An example of a client interface scrolling scene provided by an embodiment of the present invention Figure 1 ;

[0046] Figure 2 A schematic diagram of a flow chart of a method for rendering a video in a client interface provided by an embodiment of the present invention;

[0047] Figure 3 An example of rendering video in a client interface provided by an embodiment of the present invention Figure 1 ;

[0048] Figure 4 An example of rendering video in a client interface provided by an embodiment of the present invention Figure 2 ;

[0049] Figure 5 An example of a client interface scrolling scene provided by an embodiment of the present invention Figure 2 ;

[0050] Figure 6 A functional unit block diagram of a device for rendering video in a client interface provided by an embodiment of the present invention;

[0051] Figure 7 A schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0052] Icons: 100 - device for rendering video in client interface; 101 - main process; 102 - video decoding process; 200 - electronic device; 210 - memory; 220 - processor. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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 part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0054] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0056] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.

[0057] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0058] As the live video business scenarios become more and more complex, there is a need to display DirectX rendered content (such as videos) in DirectUI without a window. However, DirectX must occupy an exclusive window and is not compatible with windowless services developed mainly based on DirectUI, resulting in a geometric increase in development complexity and the following problems:

[0059] 1. Traditional video rendering is an independent window sub-window, such as Figure 1 As shown in the figure, in the interface dominated by DirectUI, it exists as a floating window or child window, and there is no parent-child / sibling relationship with other business controls in the interface. As a result, when the user operates the scroll bar, the interface and the floating window cannot be scrolled uniformly, resulting in abnormalities in the DirectX rendering content displayed in the floating window, such as the display area of ​​the floating window exceeds the original display area, etc.

[0060] 2. For scenes that require animation or special effects, the interface and floating window cannot be processed consistently, and a separate control system is required for the content rendered by DirectX, which complicates the logic;

[0061] 3. There are compatibility issues between the floating window and the interface. For example, when the floating window is a transparent window, the interface may flicker.

[0062] In order to overcome the above-mentioned deficiencies of the prior art, an embodiment of the present invention provides a method for rendering video in a client interface, which will be described in detail below.

[0063] Please refer to Figure 2 The method for rendering video in the client interface includes steps S101 to S104.

[0064] S101, when the main process is started, a rendering control is created according to the system information of the electronic device.

[0065] Among them, the main process is deployed on the electronic device, and the main process is for the client interface with DirectUI as the core concept, that is, when the main process is started, the client interface is displayed on the screen of the electronic device.

[0066] When the main process is started, it is necessary to determine the compatibility of the hardware system of the electronic device, such as whether the hardware system of the electronic device supports DX texture sharing, and create a corresponding rendering control according to the determination result.

[0067] In a possible implementation, the implementation process of step S101 may be as follows:

[0068] S101-1, the main process determines whether the electronic device supports DX texture sharing based on system information.

[0069] Among them, the system information includes relevant parameters of various hardware of the electronic device including CPU, memory and graphics card. The main process determines whether the electronic device supports DX texture sharing based on the relevant parameters of various hardware of the electronic device. If it does, the main process executes step S101-2; if not, the main process executes step S101-3.

[0070] S101-2, create a DX control as a rendering control.

[0071] Among them, the DX control can render the DX texture.

[0072] S101-3, creating a default control as a rendering control.

[0073] Among them, the default control renders the bitmap obtained by DX texture conversion.

[0074] Next, continue Figure 2 Steps S102 to S104 in FIG.

[0075] S102, after the main process is started, a communication pipe is created, a video decoding process is started, and when a user inputs a video playing instruction, video parameters carried in the video playing instruction are transmitted to the video decoding process through the communication pipe.

[0076] It can be understood that after the main thread is started, the client interface will be displayed on the screen of the electronic device. In order to meet the video playback needs of the user when browsing the client interface, the main thread needs to establish a communication channel to communicate with the video decoding process. The implementation process can be as follows:

[0077] The main process sets the pipe name PIPE Name based on the process ID and creates a named pipe (IPC pipe);

[0078] After the video decoding process is started, the IPC pipe is connected through the PIPE Name;

[0079] The main process uses the IPC pipe linked to the video decoding process as a communication pipe.

[0080] Among them, the main process uses the system information of the electronic device and the set PIPE Name as startup parameters to start the video decoding process. After the video decoding process is started, it is initialized according to the startup parameters and links the IPC pipeline through the PIPE NAME to establish communication with the main process.

[0081] The video parameters include the network video stream address and related basic information. The main process transmits the video parameters to the video decoding process through the communication pipeline.

[0082] S103, the video decoding process obtains a video image according to the video parameters, and transmits the video image to the main process in a data sharing manner determined according to the system information.

[0083] The video decoding process attempts to pull, decode and render the stream through the network video stream address, obtains the DX texture, and then transmits it to the main process according to the data sharing method determined by the system information.

[0084] In a possible implementation, the process of the video decoding process determining the data sharing mode according to the system information is: the video decoding process determines whether the electronic device supports DX texture sharing according to the system information; if supported, the data sharing mode is determined to be the first mode; if not supported, the data sharing mode is determined to be the second mode.

[0085] Among them, the first method is implemented based on a shared texture pointer, and the second method is implemented based on a shared memory.

[0086] Furthermore, the implementation process of the video decoding process transmitting the video image to the main process according to the data sharing method determined according to the system information may be as follows:

[0087] Scenario 1: When the data sharing method is the first method, the video decoding process creates a shared texture and transmits the pointer of the shared texture to the main process through the communication pipe; at each moment, the video decoding process copies the DX texture of that moment to the shared texture and sends an update message to the main process through the communication pipe; after receiving the update message, the main process obtains the DX texture of that moment according to the pointer of the shared texture.

[0088] For example, Figure 3 As shown, after the video decoding process is initialized, it creates synchronization tools (such as events, and the synchronization tool can also be an established communication channel) and D3D devices. After the D3D device is created, the description of the shared texture is set and the shared texture is created according to the description of the shared texture. The pointer of the shared texture is transmitted to the main process through the synchronization tool. At this time, the main process has completed the initialization and D3D device creation. The video decoding process pulls the stream, decodes and renders, and the DX texture obtained is the D3D11 texture. The D3D11 texture is copied to the created shared texture, and then the synchronization tool is used to notify the main process to refresh the texture.

[0089] Scenario 2: When the data sharing mode is the second mode, the video decoding process creates a shared memory and transmits the information of the shared memory to the main process through the communication pipe; at each moment, the video decoding process converts the DX texture of that moment and copies the obtained conversion bitmap to the shared memory; the video decoding process sends an update message to the main process through the communication pipe; after receiving the update message, the main process reads the conversion bitmap of that moment from the shared memory.

[0090] For example, Figure 4 As shown, after the video decoding process is initialized, it creates synchronization tools (such as events, and the synchronization tool can also be an established communication pipe) and shared memory. After creating the shared memory, the size of the shared memory is set, and an event is created to notify the main process through the synchronization tool that the video decoding process has been initialized.

[0091] After the main process is initialized, the shared memory is opened. The video decoding process obtains the DX texture by pulling the stream, decoding and rendering, and converts the DX texture into a bitmap and copies it to the shared content. Then, the main process is notified to read the shared memory through the synchronization tool.

[0092] S104, the main process uses the rendering control to render the video image to the screen position selected by the user.

[0093] As a possible implementation method, the main process uses the DX control to render the DX texture at each moment to the screen position selected by the user.

[0094] It can be understood that when the electronic device supports DX texture sharing, the rendering control created by the main process is a DX control, the video decoding process transmits the DX texture at each moment to the main process in the first way, and the main process uses the DX control to render the DX texture at each moment to the screen position selected by the user.

[0095] For example, Figure 3 As shown, the main process receives notification from the video decoding process, refreshes the texture, and after refreshing the texture, determines whether the pointer of the shared texture has changed. If it has changed, the created D3D device opens the shared texture pointer, converts the D3D11 texture to a D3D9 texture, and then controls the D3DImage control (ie, the DX control) to perform rendering updates based on the D3D9 texture.

[0096] As another possible implementation, the main process uses the default control to render the conversion bitmap at each moment to the screen position selected by the user.

[0097] It can be understood that when the electronic device does not support DX texture sharing, the rendering control created by the main process is the default control, the video decoding process transmits the position of the DX texture converted at each moment to the main process according to the second method, and the main process uses the default control to render the bitmap converted from the DX texture at each moment to the screen position selected by the user.

[0098] For example, Figure 4As shown, the main process receives notification from the video decoding process, reads the shared memory, determines whether the size of the bitmap in the shared memory has changed, and if so, creates a bitmap according to the size and reads the shared memory data to convert the bitmap, and uses the obtained bitmap to refresh the UI.

[0099] like Figure 5 As shown, when the user operates the scroll control to scroll the content of the client interface, the floating window will scroll along with the user interface content, and the invisible area of ​​the floating window will be clipped. When the floating window is completely invisible due to scrolling with the client interface, rendering will be suspended to reduce performance overhead.

[0100] Compared with the prior art, the embodiment of the present invention renders the video image synchronized by the video decoding process through the rendering control created by the main process, so that the video rendering is used as a component of DirectUI, thereby reducing the development complexity of the client interface and making it easier to implement scroll bars, animations, and special effects without considering the performance overhead of visual clipping, animation synchronization, and multiple special effects of multiple windows.

[0101] In scrolling scenarios, the viewport is more sensitive to the visibility of the floating window, and rendering is stopped when the floating window is completely invisible, thereby optimizing performance.

[0102] Since the embodiment of the present invention separates the decoding and rendering of the video, the decoding is completed by the video decoding process, and the rendering is completed by the main process for the client interface, thereby releasing the coupling between the player and the rendering, reducing the possibility of display crashes due to hardware decoding and rendering, and improving the robustness of the client.

[0103] In order to execute the corresponding steps in the above method embodiment and various possible implementation modes, an implementation method of a device 100 for rendering a video in a client interface is provided below.

[0104] Please refer to Figure 6 The device 100 for rendering video in the client interface includes a main process 101 and a video decoding process 102.

[0105] The main process 101 is used to create a rendering control according to the system information of the electronic device when it is started.

[0106] The main process 101 is also used to create a communication pipe after startup, start the video decoding process 102, and when the user inputs a video playback instruction, transmit the system information and the video parameters carried by the video playback instruction to the video decoding process 102 through the communication pipe.

[0107] The video decoding process 102 is used to obtain a video image according to the video parameters, and transmit the video image to the main process 101 according to the data sharing method determined according to the system information.

[0108] The main process 101 is also used to render the video image to the screen position selected by the user using the rendering control.

[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device 100 for rendering video in the client interface described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0110] Furthermore, the embodiment of the present invention also provides an electronic device 200, please refer to Figure 7 , the electronic device 200 may include a memory 210 and a processor 220 .

[0111] Among them, the processor 220 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the program execution of the method for rendering video in the client interface provided by the above method embodiment.

[0112] The memory 210 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 210 may exist independently and be connected to the processor 220 via a communication bus. The memory 210 may also be integrated with the processor 220. Among them, the memory 210 is used to store machine executable instructions for executing the scheme of the present invention. The processor 220 is used to execute the machine executable instructions stored in the memory 210 to implement the above-mentioned method embodiment.

[0113] An embodiment of the present invention further provides a computer-readable storage medium containing a computer program. When the computer program is executed, it can be used to perform relevant operations in the method for rendering a video in a client interface provided by the above method embodiment.

[0114] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for rendering video in a client interface, It is characterized in that Applied to an electronic device, the electronic device is deployed with a video decoding process and a main process for a client interface, the method comprises: When the main process is started, the main process creates a rendering control according to the system information of the electronic device; After being started, the main process creates a communication pipeline, starts the video decoding process, and when a user inputs a video playback instruction, transmits the video parameters carried by the video playback instruction to the video decoding process through the communication pipeline; The video decoding process obtains a video image according to the video parameters, and transmits the video image to the main process in a data sharing manner determined according to the system information; The main process uses the rendering control to render the video image to a screen position selected by a user.

2. The method according to claim 1, It is characterized in that The step of creating a rendering control according to the system information of the electronic device comprises: The main process determines, according to the system information, whether the electronic device supports DX texture sharing; If supported, create a DX control as the rendering control; If not supported, a default widget is created as the rendering widget.

3. The method according to claim 1, It is characterized in that The steps of creating a communication channel include: The main process sets the pipe name based on the process ID to create a named pipe; After the video decoding process is started, the named pipeline is linked to by the pipeline name; The master process uses the named pipe linked to the video decoding process as the communication pipe.

4. The method according to claim 1, It is characterized in that The method further comprises the step of determining a data sharing method according to the system information, which comprises: The video decoding process determines whether the electronic device supports DX texture sharing according to the system information; If supported, determining that the data sharing mode is the first mode, wherein the first mode is implemented based on a shared texture pointer; If not supported, the data sharing mode is determined to be the second mode, and the second mode is implemented based on shared memory.

5. The method according to claim 4, It is characterized in that The video image includes DX textures at each moment, and the step of transmitting the video image to the main process in a data sharing manner determined according to the system information includes: When the data sharing mode is the first mode, the video decoding process creates a shared texture, and transmits a pointer of the shared texture to the main process through the communication pipe; At each moment, the video decoding process copies the DX texture at that moment to the shared texture, and sends an update message to the main process through the communication pipe; After receiving the update message, the main process obtains the DX texture at that moment according to the pointer of the shared texture.

6. The method according to claim 5, It is characterized in that The step of the main process using the rendering control to render the video image to a screen position selected by the user comprises: The main process uses the DX control to render the DX texture at each moment to the screen position selected by the user, wherein when the data sharing mode is the first mode, the rendering control created by the main process is the DX control.

7. The method according to claim 5, It is characterized in that The step of transmitting the video image to the main process in a data sharing manner determined according to the system information further includes: When the data sharing mode is the second mode, the video decoding process creates a shared memory, and transmits information of the shared memory to the main process through the communication pipe; At each moment, the video decoding process converts the DX texture at that moment and copies the obtained conversion bitmap to the shared memory; The video decoding process sends an update message to the main process through the communication pipe; After receiving the update message, the main process reads the conversion bitmap at that moment from the shared memory.

8. The method according to claim 7, It is characterized in that The step of the main process using the rendering control to render the video image to a screen position selected by the user comprises: The main process uses a default control to render the conversion bitmap at each moment to a screen position selected by the user, wherein when the data sharing mode is the second mode, the rendering control created by the main process is the default control.

9. A device for rendering video in a client interface, It is characterized in that Applied to electronic devices, the device includes a video decoding process and a main process for a client interface; The main process is used to create a rendering control according to the system information of the electronic device when starting; The main process is further used to create a communication pipeline after startup, start the video decoding process, and transmit the system information and the video parameters carried by the video playback instruction to the video decoding process through the communication pipeline when the user inputs a video playback instruction; The video decoding process is used to obtain a video image according to the video parameters, and transmit the video image to the main process according to a data sharing method determined according to the system information; The main process is also used to render the video image to a screen position selected by a user using the rendering control.

10. An electronic device, It is characterized in that It comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the method for rendering video in a client interface as described in any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, It is characterized in that It stores a computer program, which, when executed by a processor, implements the method for rendering video in a client interface as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Texture sharing method, computer equipment and storage medium

    CN108733356A

  • Video layer superposition method and device, electronic equipment and storage medium

    CN110996151A

  • Image rendering method and device

    CN111163345A

  • Interface rendering method and device

    CN111696186A

  • Video processing method and device and storage medium

    CN115695888A