A screen projection display method, device, equipment and computer storage medium

By storing the data to be projected in a preset memory area within the projection device and directly calling the direct rendering manager for display, the SurfaceFlinger mechanism is bypassed, solving the problem of high projection latency, achieving faster display synchronization, and improving the user experience.

CN116339659BActive Publication Date: 2026-01-02CHENGDU XGIMI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111598556.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2026-01-02
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

Existing screen mirroring technologies suffer from significant latency, resulting in a poor screen mirroring experience, especially impacting user experience in large-screen gaming scenarios.

Method used

By receiving a screen mirroring request, storing the data to be mirrored in a preset memory area, and sending the screen mirroring request to the direct rendering manager, the direct rendering manager is directly invoked for display, bypassing the Android system's SurfaceFlinger mechanism and reducing vertical synchronization time.

Benefits of technology

It saves display synchronization time, improves the real-time display effect during the projection process, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116339659B_ABST
    Figure CN116339659B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a screen projection display method, device, equipment and computer storage medium, the method comprises the following steps: after receiving a screen projection request, obtaining to-be-projected data; storing the to-be-projected data to a preset memory area, and sending the screen projection request to a direct rendering manager; calling the direct rendering manager to display the to-be-projected data in the preset memory area according to the screen projection request. In this way, the to-be-projected data in the preset memory area is directly displayed by the direct rendering manager, which can save display synchronization time, thereby meeting the functional requirements of real-time display of users in the screen projection process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of screen projection, and in particular to a screen projection display method and device, an equipment and a computer storage medium. BACKGROUND

[0002] With the continuous development of projector technology, screen projection technology is widely used in business, education and home audio and other fields, bringing convenience to people's life and work. By connecting a projector, the picture on a small screen such as a computer can be enlarged to a larger screen for a more intuitive visual experience.

[0003] In related technologies, the indicators affecting the screen projection experience are mainly resolution and delay time. Among them, large-screen games have strict requirements for the delay of screen projection, and larger delay will bring a very poor experience to the screen projection scene, so optimizing the delay is a current problem to be solved in screen projection technology. SUMMARY

[0004] The present application provides a screen projection display method, device, equipment and computer storage medium, which can save display synchronization time to meet the functional requirements of users for real-time display in the screen projection process.

[0005] To achieve the above purpose, the technical scheme of the present application is as follows:

[0006] In a first aspect, the embodiments of the present application provide a screen projection display method applied to a screen projection device, which comprises:

[0007] After receiving a screen projection request, obtaining to-be-projected data;

[0008] storing the to-be-projected data to a preset memory area, and sending the screen projection request to a direct rendering manager;

[0009] calling the direct rendering manager to display the to-be-projected data in the preset memory area according to the screen projection request.

[0010] In some embodiments, before sending the screen projection request to the direct rendering manager, the method further comprises:

[0011] initializing screen projection information according to the screen projection request;

[0012] calling a registration process after the initialization of the screen projection information is completed to complete the registration of the direct rendering manager.

[0013] In some embodiments, the screen projection information comprises layer configuration information and data memory information; and the initializing the screen projection information according to the screen projection request comprises:

[0014] According to the screen projection request, the layer configuration information is initialized;

[0015] After the initialization of the layer configuration information is completed, the data memory information is initialized;

[0016] When the initialization of the data memory information is completed, it is determined that the screen projection information is initialized;

[0017] The layer configuration information includes at least one of the following: type of hardware layer unit, identification number of display controller, screen type, resolution and data coordinate information of display device;

[0018] The data memory information includes at least one of the following: identification number, data size and data format of frame buffer.

[0019] In some embodiments, the screen projection device includes a display device, and after the registration of the direct rendering manager is completed, the method further includes:

[0020] The display device is initialized;

[0021] The display device is connected to the target hardware layer unit in the direct rendering manager.

[0022] In some embodiments, the direct rendering manager according to the screen projection request, the data to be projected in the preset memory area is displayed, including:

[0023] The data to be projected in the preset memory area is sent to the target hardware layer unit in the direct rendering manager through a memory data copying mode;

[0024] The direct rendering manager according to the screen projection request, the data to be projected in the target hardware layer unit is sent to the display device for display.

[0025] In some embodiments, the screen projection device further includes a display controller, and the data to be projected in the target hardware layer unit is sent to the display device for display, including:

[0026] The data to be projected in the target hardware layer unit is sent to the display controller;

[0027] The display device is controlled to display the data to be projected through the display controller.

[0028] In some embodiments, after receiving the screen projection request, the data to be projected is obtained, including:

[0029] The video stream data is received;

[0030] decode the video stream data to obtain the to-be-cast data;

[0031] Correspondingly, the storing the to-be-cast data to the preset memory area includes storing the to-be-cast data to the preset memory area by a memory data copying manner.

[0032] In a second aspect, an embodiment of the present application provides a screen casting display device, which comprises a receiving unit, a processing unit and a display unit; wherein,

[0033] The receiving unit is configured to obtain to-be-cast data after receiving a screen casting request.

[0034] The rendering unit is configured to store the to-be-cast data to a preset memory area and send the screen casting request to a direct rendering manager.

[0035] The display unit is configured to call the direct rendering manager to display the to-be-cast data in the preset memory area according to the screen casting request.

[0036] In a third aspect, an embodiment of the present application provides a screen casting device, which comprises a memory and a processor; wherein,

[0037] The memory is configured to store a computer program capable of running on the processor.

[0038] The processor is configured to execute the method according to any one of the first aspect when running the computer program.

[0039] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a screen casting program, and the screen casting program is executed by at least one processor to implement the method according to any one of the first aspect.

[0040] The screen casting display method, device, equipment and computer storage medium provided by the embodiment of the present application. After receiving a screen casting request, to-be-cast data is obtained; the to-be-cast data is stored to a preset memory area, and the screen casting request is sent to a direct rendering manager; the direct rendering manager is called to display the to-be-cast data in the preset memory area according to the screen casting request. Thus, compared with the synchronous rendering in the related art, the to-be-cast data in the preset memory area is directly displayed by the direct rendering manager, the display synchronization time is saved, and the functional requirement of real-time display of a user in a screen casting process is met. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 A functional framework diagram of a screen casting device provided by the related art

[0042] Figure 2 A flowchart of a screen projection display method provided by an embodiment of the present application is shown in FIG. 1.

[0043] Figure 3 A detailed flowchart of a screen projection display method provided by an embodiment of the present application is shown in FIG. 2.

[0044] Figure 4 A functional architecture diagram of a screen projection device provided by an embodiment of the present application is shown in FIG. 3.

[0045] Figure 5 A component structure diagram of a screen projection display device provided by an embodiment of the present application is shown in FIG. 4.

[0046] Figure 6 A specific hardware structure diagram of a screen projection device provided by an embodiment of the present application is shown in FIG. 5.

[0047] Figure 7 A component structure diagram of a screen projection device provided by an embodiment of the present application is shown in FIG. 6. DETAILED DESCRIPTION

[0048] In order to be able to understand the features and technical contents of the embodiments of the present application more thoroughly, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings, which are only used for reference and are not intended to limit the embodiments of the present application.

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terminology used in the description herein is for describing the embodiments of the present application only and is not intended to limit the present application.

[0050] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. It should also be noted that the term "first\second\third" involved in the embodiments of the present application is only used to distinguish similar objects, and does not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0051] It can be understood that since the emergence of the projector, the screen projection technology has been widely used in business, education and home audio and other fields, bringing convenience to people's life and work. By connecting the projector, the picture on the small screen of the computer can be enlarged to a larger screen for display, providing a more intuitive visual experience. Currently, the main indicators affecting the screen projection experience are resolution and latency time, and large-screen games are particularly demanding on the latency of screen projection. Larger latency will result in a poor experience in the screen projection scene, so optimizing latency is the most important technical link in the screen projection technology. Low latency can bring a qualitative leap to the product.

[0052] Referring to Figure 1 , a functional framework diagram of a screen projection device provided by the related art is shown. As Figure 1 indicated, the Android system has loaded application programs (APPs), including a user space (Userspace) and a kernel (Kernel); the user space is provided with a SurfaceFlinger image-related server, and internally has a hardware composer (Hardware Composer, HWC) and data channels (Layer_1, Layer_2, Layer_3, Layer_4) to be displayed; the kernel is provided with hardware layer units (Plane_1, Plane_2, Plane_3, Plane_4), a display controller (Visual Output Processor, VOP) and a display device (DispLayer); in this way, the Layer_1, Layer_2, Layer_3, Layer_4 can be sent to the Plane_1, Plane_2, Plane_3, Plane_4 for storage through the SurfaceFlinger image-related server, and then the content in the Plane can be sent to the display device for display through the display controller.

[0053] Specifically, on the display of the Android system, the SurfaceFlinger is responsible for processing all application display requests, and the HWC, as the allocator of the system display strategy, decides the synthesis method of the Layer to be displayed in the current system, and the synthesis method usually has two ways: a graphics processing unit (Graphics Processing Unit, GPU, i.e. GLES) and a display output controller (Visual Output Processor, VOP, i.e. Overlay). A normal frame of image needs to pass through Figure 1The process shown is required to display the data on a display device, such as a Liquid Crystal Display (LCD). HWC allocates the data channels (Layer) sent by SurfaceFlinger to the hardware layer units (Plane) where the display controller exists, and finally the display controller sends the content on the Plane to the display.

[0054] Since Android version 4.1 introduced the Vertical Synchronization (VSync) mechanism for synchronized rendering, allowing the Application User Interface (AppUI) and SurfaceFlinger to work according to the hardware-generated VSync rhythm, the Android system sends a VSync signal every 16ms to trigger the rendering of the User Interface (UI) to reduce VSync display synchronization latency. Currently, the Android system requires at least three VSync synchronization times to display each frame of video, which means that at least three VSync data channels need to be accessed to display the data. This results in a relatively large latency.

[0055] Based on this, this application proposes a screen projection display method. The basic idea of ​​this method is as follows: after receiving a screen projection request, the data to be projected is obtained; the data to be projected is stored in a preset memory area, and the screen projection request is sent to the direct rendering manager; the direct rendering manager is called to display the data to be projected in the preset memory area according to the screen projection request. In this way, the data to be projected in the preset memory area is directly displayed through the direct rendering manager. Compared with the synchronous rendering in related technologies, the display synchronization time is saved, and the user's functional requirements for real-time display during the screen projection process are met.

[0056] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0057] Example 1

[0058] In one embodiment of this application, see [link to embodiment]. Figure 2 This illustrates a flowchart of a screen projection method provided in an embodiment of this application. Figure 2 As shown, the method may include:

[0059] S201: After receiving the screen mirroring request, obtain the screen mirroring data.

[0060] It should be noted that the screen projection display method provided in the embodiments of the present application can be applied to a device requiring screen projection display, or an electronic device integrated with the device. Here, the electronic device can be, for example, a television, a projector, a notebook computer, a palm computer, a personal digital assistant (PDA), a server, and the like, and the embodiments of the present application do not make a specific limitation in this regard.

[0061] It should also be noted that the embodiments of the present application can be applied to any operating system requiring fast screen projection display, and the operating system can include various operating systems, such as an Android system, an iphone operation system (IOS) system, a UNIX system, and the like, and does not make any additional limitation in this regard. In addition, the operating system kernel herein can be various appropriate operating system kernels, such as a single kernel, a dual kernel, a microkernel, and a hybrid kernel, but the embodiments of the present application are not limited thereto.

[0062] It should also be noted that the screen projection request herein can include relevant parameter information required for screen projection, and specifically, the screen projection request can include layer configuration information and data memory information corresponding to the to-be-projected data, and the to-be-projected data can be video stream data, image data, and the like, and the embodiments of the present application do not make any limitation in this regard.

[0063] S202: Store the to-be-projected data to a preset memory area, and send the screen projection request to a direct rendering manager.

[0064] It should be noted that the parameter information of the preset memory area (i.e., a data channel, or referred to as a data layer) is initialized and set according to the relevant parameter information in the screen projection request. Here, an independent storage space is additionally opened for the screen projection request, the to-be-projected data is independently stored, and then the screen projection request is sent to the direct rendering manager, so that the Surface Flinger of the Android system can be bypassed, the screen projection request can be directly received by the display device, and then the to-be-projected data can be directly displayed on the display device, which greatly saves the time of screen projection display, realizes synchronous display in the screen projection process, and significantly improves the user experience.

[0065] In some embodiments, before the screen projection request is sent to the direct rendering manager, the method can further include:

[0066] According to the screen projection request, initializing screen projection information;

[0067] After the screen projection information is initialized, a registration process is called to complete registration of the direct rendering manager.

[0068] It should be noted that the embodiment of the present application can initialize the screen projection information according to the screen projection request; wherein the screen projection information can include layer configuration information and data memory information, i.e. the embodiment of the present application needs to initialize the layer configuration information and the data memory information, and then register the Direct Rendering Manager (DRM).

[0069] It should be further noted that in the process of registering the Direct Rendering Manager, the appropriate interface in the Direct Rendering Manager library is selected according to the identification information of the Frame Buffer (FB) in the screen projection information to complete the registration of the Direct Rendering Manager. The registered Direct Rendering Manager can directly render the to-be-screen-projected data in the specific data channel (Layer_4) and then transmit the data to the target hardware layer unit, thereby realizing the connection between the data channel and the target hardware layer, so that the display hardware can directly display the to-be-screen-projected data in the data memory.

[0070] Specifically, in some embodiments, the screen projection information can include layer configuration information and data memory information. Accordingly, the initialization of the screen projection information according to the screen projection request can include:

[0071] initializing the layer configuration information according to the screen projection request;

[0072] initializing the data memory information after the initialization of the layer configuration information is completed;

[0073] determining that the initialization of the screen projection information is completed when the initialization of the data memory information is completed;

[0074] wherein the layer configuration information includes at least one of the following: the type of the hardware layer unit, the identification number of the display controller, the screen type of the display device, the resolution and the data coordinate information;

[0075] the data memory information includes at least one of the following: the identification number of the Frame Buffer, the data size and the data format.

[0076] It should be noted that in the process of initializing the layer configuration information, the layer configuration information of Layer is initialized first, and then the layer configuration information of Plane is initialized. In the process of initializing the data memory information, the data memory information of Layer is initialized first, and then the data memory information of Plane is initialized.

[0077] It should be noted that in the embodiments of the present application, the screen projection request can mainly include: a type (type) attribute of Plane, an identity number (Identity, ID) of the corresponding display controller, and screen type, resolution, target and source data coordinate information of the display device, and the like. The above information in the screen projection request is set as layer configuration information to realize initialization of the layer configuration information. After the initialization of the layer configuration information is completed, the data memory information is initialized in the same way. Specifically, in the process of initializing the layer configuration information, the layer configuration information of Layer is first initialized, and then the layer configuration information of Plane is initialized. In the process of initializing the data memory information, the data memory information of Layer is first initialized, and then the data memory information of Plane is initialized. In addition, the initialization of the data memory information can mainly include: FB ID, data size, data format, and the like.

[0078] Further, in some embodiments, the screen projection device includes a display device, and after the direct rendering manager is registered, the method further includes:

[0079] initializing the display device;

[0080] enabling the display device to be connected to the target hardware layer unit in the direct rendering manager.

[0081] It should be noted that the initialization of the display device enables the display device to match the related parameters of the to-be-projected data. Specifically, the display device parameters that are initialized can include: screen type, resolution, target and source data coordinate information of the display device, and the like. The display device is connected to the target hardware layer through the display controller, so that the display device performs parameter initialization (i.e., parameter configuration) through the specific parameters of the display device obtained from the target hardware layer. The display controller can control the content of the target hardware layer unit to be displayed on the display device.

[0082] That is, for the initialization of the display device, the parameters of the display device can be initialized (parameter configuration) according to the to-be-projected data in the screen projection request. The source of these parameters is specifically the parameters of the display device in the screen projection request. The parameters of the display device in the screen projection request are transmitted to the display device through the target hardware layer, and then the parameters of the display device are initialized, thereby realizing the parameter initialization of the display device.

[0083] S203: The direct rendering manager displays the to-be-projected data in the preset memory area according to the screen projection request.

[0084] It should be noted that in the embodiments of the present application, the direct rendering manager can obtain the to-be-screened data from the data channel, render the to-be-screened data, write the rendered to-be-screened data into a preset memory area, and the display layer has a target hardware layer unit set for the screen projection process. In specific applications, the display controller can display the target hardware layer (such as Plane_4) preferentially.

[0085] In some embodiments, the direct rendering manager can display the to-be-screened data in the preset memory area according to the screen projection request, which can include:

[0086] The to-be-screened data in the preset memory area is sent to the target hardware layer unit in the direct rendering manager through a memory data copying method;

[0087] The direct rendering manager sends the to-be-screened data in the target hardware layer unit to the display device for display according to the screen projection request.

[0088] It should be noted that the to-be-screened data in the preset memory area is copied and stored into the target hardware layer unit (i.e., the display layer) through the memory copying method, so as to become a separate display layer. Thus, in the case that the display device and the target hardware layer unit in the direct rendering manager are enabled to be connected, the to-be-screened data is sent to the display device for display.

[0089] In some embodiments, the screen projection device further includes a display controller, and the to-be-screened data in the target hardware layer unit can be sent to the display device for display by the display controller, which can include:

[0090] The to-be-screened data in the target hardware layer unit is sent to the display controller;

[0091] The display device displays the to-be-screened data by the display controller.

[0092] It should be noted that in the display controller, all other display layers can be hidden, and the separate display layer storing the to-be-screened data can be displayed preferentially. In this way, the video stream corresponding to the to-be-screened data can be displayed most quickly, and the synchronization degree in the screen projection process is optimized.

[0093] In some embodiments, after receiving the screen projection request, the to-be-screened data can be obtained, which can include:

[0094] The video stream data is received;

[0095] The video stream data is decoded to obtain the to-be-screened data;

[0096] Correspondingly, the storing the to-be-screened data into the preset memory area can include: storing the to-be-screened data into the preset memory area through a memory data copying manner.

[0097] It should be noted that, in the embodiment of the present application, the video stream data is decoded to obtain luminance and chrominance (Luma and Chroma, YUV) data corresponding to the color coding mode, and the YUV data is stored as to-be-screened data in a preset memory area, wherein the storage process adopts a data copying manner, and after rendering by the direct rendering controller, the to-be-screened data is also stored into a target hardware layer unit through a data copying manner.

[0098] It should be further noted that, in the embodiment of the present application, since the technical solution directly operates Layer_4 channel display data, SurfaceFlinger is bypassed; only 1 vsync time is needed to normally display, 32-66 ms time can be reduced, so that display synchronization time can be saved, that is, the real-time display requirement of the screen mirroring receiving end is solved.

[0099] The embodiment provides a screen mirroring display method, after receiving a screen mirroring request, obtaining to-be-screened data; storing the to-be-screened data into a preset memory area, and sending the screen mirroring request to a direct rendering manager; calling the direct rendering manager to display the to-be-screened data in the preset memory area according to the screen mirroring request, so that the direct rendering manager directly displays the to-be-screened data in the preset memory area, compared with synchronous rendering in the related art, display synchronization time is saved, and the functional requirement of real-time display of a user in a screen mirroring process is met.

[0100] Embodiment two

[0101] Based on the same inventive concept as the foregoing embodiments, refer to Figure 3 which shows a detailed flowchart of a screen mirroring display method provided by the embodiment of the present application, as Figure 3 shown, the method can include:

[0102] S301: initializing layer configuration information of a data channel (Layer) and a display layer (Plane);

[0103] It should be noted that, in the embodiment of the present application, the layer configuration information of the data channel (Layer) and the display layer (Plane) needs to be initialized in sequence.

[0104] S302: initializing data memory information of a data layer and a display layer;

[0105] It should be noted that, in the embodiment of the present application, the data memory information of the data layer and the display layer needs to be initialized in sequence.

[0106] S303: register a direct rendering manager (DRM);

[0107] It should be further noted that if the registration is successful, S305 can be performed; if the registration fails, S304 can be performed.

[0108] S304: exit the screen projection;

[0109] S305: initialize the display device and enable the connection of the display device;

[0110] S306: the screen projection device receives a video stream;

[0111] S307: decode the video stream to obtain data to be projected;

[0112] S308: hide other data layers and display only the Layer_4 layer;

[0113] S309: copy the data in the Layer_4 layer.

[0114] In a specific embodiment, the embodiment of the application can be executed by a screen projection device, and the screen projection device loads a screen projection APP. Exemplarily, the execution process of the technical solution can include:

[0115] Step one: after the screen projection APP detects a screen projection request through a screen projection display thread, the screen projection APP initializes the layer configuration information of a data channel (Layer) and a display layer (Plane) through a direct rendering manager library (libdrm) interface operation.

[0116] Specifically, the embodiment initializes the layer configuration information through the screen projection display thread, mainly including the Type attribute of the Plane, the ID number of the corresponding VOP display controller, and the screen type, resolution, target and source data coordinate information of the display device.

[0117] Step two: after the initialization of the layer configuration information is completed, the data memory information of the data layer and the display layer is initialized.

[0118] Specifically, the initialization of the data memory mainly includes the frame buffer identifier (fb id), the data size, the data format, etc.

[0119] Step three: register the direct rendering manager.

[0120] Specifically, the function drm_open is called to obtain the fb id, the dump is established through drmtrol, and the fb is mapped through the drmmodeaddfb2 interface, so as to register the direct rendering manager.

[0121] Step four: initialize the display device and enable the connection display layer (Plane), after completion, the display device can directly display the data in the memory.

[0122] Step five: the screen projection receives the video stream, decodes the video stream, hides other layers, and displays Layer_4 layer.

[0123] That is, the screen projection APP receives the yuv data after the video stream decoding through the screen projection receiving thread, writes the received YUV data into Layer_4 through the memory data copy (Copy) mode, closes the other three Layer channels, and then the YUV data is transmitted to the data memory initialized in step two through the memory Copy mode, and then the display device is controlled by the display controller to display, for example, the projector can control the light machine to display.

[0124] Referring to Figure 4 , a functional architecture diagram of a screen projection device provided by an embodiment of the present application is shown. As Figure 4 indicated, the technical solution of the embodiment of the present application bypasses SurfaceFlinger and directly uses one Layer_4 to receive the video data sent by the sending end through the screen projection APP, obtains YUV data through the color coding mode after decoding, directly writes into Layer_4 layer, and then Plane_4 and other Plane (for example, Plane_1, Plane_2, Plane_3, etc.) of the system are sent to the display controller together, and then displayed through the display device.

[0125] In short, the embodiment of the present application directly operates the data layer (Layer) channel to display data, bypasses SurfaceFlinger, and can normally display in only 1 vsync time, can reduce 32ms-66ms time, can save display synchronization time, and solves the real-time display requirement of the screen projection receiving end.

[0126] The embodiment provides a screen projection display method, and the specific implementation of the foregoing embodiment is described in detail through the foregoing embodiment. As can be seen from the foregoing embodiment, through the technical solution of the foregoing embodiment, the video stream data bypasses the Android display SurfaceFlinger mechanism and directly delivers data to the Drm display, 2 vertical synchronization mechanism (vsync) delays can be saved, the synchronization delay caused by the Android synchronization mechanism is reduced, and the user experience is optimized.

[0127] Embodiment three

[0128] Based on the same inventive concept as the foregoing embodiments, referring toFigure 5 Fig. 1 shows a schematic diagram of a composition structure of a screen projection display device 50 according to an embodiment of the present application. As shown in Fig. 1, the screen projection display device 50 can include a receiving unit 501, a processing unit 502, and a display unit 503. Figure 5

[0129] The receiving unit 501 is configured to acquire to-be-projected data after receiving a screen projection request.

[0130] The processing unit 502 is configured to store the to-be-projected data to a preset memory area and send the screen projection request to a direct rendering manager.

[0131] The display unit 503 is configured to display the to-be-projected data in the preset memory area according to the screen projection request by the direct rendering manager.

[0132] In some embodiments, the processing unit 502 is further configured to initialize screen projection information according to the screen projection request, and call a registration process after the initialization of the screen projection information is completed to complete the registration of the direct rendering manager.

[0133] In some embodiments, the screen projection information includes layer configuration information and data memory information. Accordingly, the processing unit 502 is specifically configured to initialize the layer configuration information according to the screen projection request, initialize the data memory information after the initialization of the layer configuration information is completed, and determine that the initialization of the screen projection information is completed when the initialization of the data memory information is completed. The layer configuration information includes at least one of the following: a type of a hardware layer unit, an identification number of a display controller, a screen type of a display device, a resolution, and data coordinate information. The data memory information includes at least one of the following: an identification number of a frame buffer, a data size, and a data format.

[0134] In some embodiments, the screen projection device includes a display device. Accordingly, the processing unit 502 is further configured to initialize the display device and enable a connection between the display device and a target hardware layer unit in the direct rendering manager.

[0135] In some embodiments, the processing unit 502 is specifically configured to send the to-be-projected data in the preset memory area to a target hardware layer unit in the direct rendering manager by a memory data copying mode, and the direct rendering manager sends the to-be-projected data in the target hardware layer unit to the display device for display according to the screen projection request.

[0136] ​In some embodiments, the screen projection device further comprises a display controller, and the display unit 503 is specifically configured to send the to-be-projected data in the target hardware layer unit to the display controller; and the display device is controlled by the display controller to display the to-be-projected data.

[0137] In some embodiments, the receiving unit 501 is specifically configured to receive video stream data; and decode the video stream data to obtain the to-be-projected data.

[0138] Correspondingly, the processing unit 502 is further configured to store the to-be-projected data to the preset memory area by a memory data copying manner.

[0139] It can be understood that, in the present embodiment, the "unit" can be a part of circuit, a part of processor, a part of program or software, etc., and of course can also be a module, and can also be non-modular. Moreover, the components in the present embodiment can be integrated in a processing unit, or can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.

[0140] The integrated unit, if realized in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present embodiment can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the present embodiment. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.

[0141] Therefore, the present embodiment provides a computer storage medium, which stores a screen projection display program, and the screen projection display program is executed by at least one processor to implement the steps of the method of any one of the foregoing embodiments.

[0142] Based on the composition of the screen projection display device 50 and the computer storage medium, refer to Figure 6 which shows a specific hardware structure schematic diagram of the screen projection device 60 provided by the present embodiment. As shown in Figure 6As shown, it may include: a communication interface 601, a memory 602, and a processor 603; the various components are coupled together through a bus system 604. It is understood that the bus system 604 is used to implement communication between these components. In addition to a data bus, the bus system 604 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 6 The various buses are all labeled as bus system 604. Among them, communication interface 601 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

[0143] Memory 602 is used to store computer programs that can run on processor 603;

[0144] Processor 603, when running the computer program, performs the following:

[0145] After receiving a screen mirroring request, obtain the data to be mirrored;

[0146] The data to be projected is stored in a preset memory area, and the projection request is sent to the direct rendering manager;

[0147] The direct rendering manager is invoked to display the data to be projected from the preset memory area according to the projection request.

[0148] It is to be appreciated that the memory 602 in embodiments of the application can be volatile, nonvolatile, or a combination of both. The non-volatile memory can be, for example, read only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be, for example, random access memory (RAM), which acts as external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), SynchBurst DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The memory 602 of the system and method described herein are intended to include, without being limited to, these and any other suitable types of memory.

[0149] The processor 603 can be an integrated circuit chip logic circuit having a processing capability. In implementation, each step of the above method can be completed by integrated logic circuit of hardware in the processor 603 or instructions in the form of software. The processor 603 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, etc. The storage medium in the art. The storage medium is located in the memory 602, and the processor 603 reads the information in the memory 602, and combines the hardware to complete the steps of the above method.

[0150] It can be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented within one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.

[0151] For software implementation, the techniques described herein can be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes can be stored in the memory and executed by the processor. The memory can be implemented within the processor or external to the processor.

[0152] Optionally, as another embodiment, the processor 603 is further configured to execute the steps of the method of any one of the preceding embodiments when the computer program is run.

[0153] In some embodiments, referring to Figure 7 , a constituent structure schematic diagram of a screen projection device 60 is shown. As Figure 7 shown, the screen projection device 60 at least includes the screen projection display apparatus 50 of any one of the preceding embodiments.

[0154] In the embodiments of the present application, for the screen projection device 60, after receiving a screen projection request, the screen projection device 60 acquires to-be-projected data, stores the to-be-projected data to a preset memory area, and sends the screen projection request to a direct rendering manager; the screen projection device 60 calls the direct rendering manager to display the to-be-projected data in the preset memory area according to the screen projection request. In this way, the to-be-projected data in the preset memory area is directly displayed by the direct rendering manager, compared with the synchronous rendering in the related art, the display synchronization time is saved, and the functional requirement of real-time display of the user in the screen projection process is met.

[0155] It should be noted that in the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.

[0156] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0157] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.

[0158] The features disclosed in the several product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.

[0159] The features disclosed in the several method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.

[0160] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A screen projection display method, characterized by, The method applied to a screen projection device comprises: After receiving a screen projection request, obtaining to-be-projected data; storing the to-be-projected data to a preset memory area, and sending the screen projection request to a direct rendering manager; the preset memory area is a data channel Layer_4; sending the to-be-projected data in the preset memory area to a target hardware layer unit in the direct rendering manager by a memory data copying mode; the target hardware layer unit is a hardware layer unit Plane_4; the direct rendering manager sends the to-be-projected data in the target hardware layer unit to a display device for display according to the screen projection request.

2. The method of claim 1, wherein, Before sending the screen projection request to the direct rendering manager, the method further comprises: initializing screen projection information according to the screen projection request; calling a registration process after the screen projection information is initialized to complete registration of the direct rendering manager.

3. The method of claim 2, wherein, The screen projection information comprises layer configuration information and data memory information; initializing the screen projection information according to the screen projection request comprises: initializing the layer configuration information according to the screen projection request; initializing the data memory information after the layer configuration information is initialized; determining that the screen projection information is initialized when the data memory information is initialized; The layer configuration information comprises at least one of the following: a type of a hardware layer unit, an identification number of a display controller, a screen type, a resolution and data coordinate information of a display device; The data memory information comprises at least one of the following: an identification number of a frame buffer, a data size and a data format.

4. The method of claim 2, wherein, The screen projection device comprises a display device, and after completing registration of the direct rendering manager, the method further comprises: initializing the display device; enabling connection between the display device and the target hardware layer unit in the direct rendering manager.

5. The method of claim 1, wherein, The screen projection device further comprises a display controller, and sending the to-be-projected data in the target hardware layer unit to the display device for display comprises: sending the to-be-projected data in the target hardware layer unit to the display controller; controlling the display device to display the to-be-projected data by the display controller.

6. The method according to any one of claims 1 to 5, characterized in that, After receiving a screen projection request, the obtaining to-be-projected data comprises: receiving video stream data; decoding the video stream data to obtain the to-be-projected data; Correspondingly, the storing the to-be-projected data to a preset memory area comprises storing the to-be-projected data to the preset memory area by a memory data copying mode.

7. A screen projection display device, characterized by comprising: The screen projection display device comprises a receiving unit, a processing unit and a display unit; wherein, the receiving unit is configured to obtain to-be-projected data after receiving a screen projection request; the processing unit is configured to store the to-be-projected data to a preset memory area, and send the screen projection request to a direct rendering manager; the preset memory area is a data channel Layer_4; The display unit is configured to send the to-be-screened data in the preset memory area to a target hardware layer unit in the direct rendering manager through a memory data copy mode; the target hardware layer unit is a hardware layer unit Plane_4; and the direct rendering manager sends the to-be-screened data in the target hardware layer unit to the display device for display according to the screen projection request.

8. A screen projection device, characterized by, The screen projection device comprises a memory and a processor; wherein, The memory is configured to store a computer program capable of running on the processor; The processor is configured to execute the method according to any one of claims 1 to 6 when running the computer program.

9. A computer storage medium, characterized in that The computer storage medium stores a screen projection program, and the screen projection program is executed by at least one processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for directly displaying drm of video and UI based on Wayland protocol

    CN113050899A