Synthesizer watermark implementation method and device in wayland environment

By setting up the dbus service and creating a watermark tree in the Wayland synthesizer, the problem that the synthesizer does not support watermark effects in the Wayland environment is solved, and the screen watermark display is realized independently controlled by the user.

CN119477654AActive Publication Date: 2025-02-18KYLIN CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510051714.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-02-18
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

In the Wayland environment, existing synthesizers do not support watermark effects, and users cannot directly add watermarks to the screen content by operating the Wayland synthesizer.

Method used

Set up the dbus service in the Wayland synthesizer, control the watermark switch and receive the watermark effect information data. The watermark effect information data is sent to the Wayland synthesizer through the dbus call method, creating a tree belonging to the watermark effect, and creating a buffer for display in the synthesizer, setting and mapping based on the watermark effect information.

Benefits of technology

It realizes that the watermark effect is supported in the synthesizer in the Wayland environment, and users can control and adjust the watermark independently, solving the problem that users cannot display watermarks on the screen content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477654A_ABST
    Figure CN119477654A_ABST
Patent Text Reader

Abstract

The invention provides a synthesizer watermark implementation method and device in a wayland environment, and the method comprises the steps: S1, setting a don service in a wayland synthesizer, and enabling the don service to control a watermark switch and receive watermark effect information data; s2, calling a dbus service provided by a wayland synthesizer through a dbus at the terminal, and sending the watermark effect information data to the wayland synthesizer; s3, the wayland synthesizer creates a tree belonging to the watermark effect according to the received watermark effect information data; s4, creating a buffer for display in the wayland synthesizer, and setting the buffer according to the watermark effect information; and S5, obtaining display content in the watermark picture to map the buffer. According to the method, the watermark picture can be drawn in the corresponding hierarchy according to the provided watermark effect information, and finally the screen content with the watermark effect is displayed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer information technology, and in particular relates to a method and a device for realizing synthesizer watermark in a wayland environment. Background Art

[0002] Wayland is a protocol that defines how Wayland clients communicate with Wayland compositors. Given Wayland's advantages over X11, especially its better support for high resolution and high refresh rate, the open source community has turned to Wayland for development, and major system distributions have also begun to use Wayland as the default graphics display protocol.

[0003] However, the currently popular Wayland synthesizer does not support watermark effects. When a user needs to display a watermark effect on the screen, he cannot directly set the desired result by operating the Wayland synthesizer, that is, he cannot directly add a watermark effect to the screen content through the Wayland synthesizer. Therefore, other means are needed to achieve this effect. The other means are often troublesome, such as taking a screenshot first and then embedding the watermark into the screenshot content. The process is relatively complicated and does not provide a real-time watermark. Summary of the invention

[0004] The purpose of the present invention is to provide a method and device for realizing synthesizer watermark in a wayland environment, which can complete the drawing of watermark pictures in the corresponding layer according to the provided watermark effect information, and finally display the screen content with the watermark effect added.

[0005] In order to achieve the above object, the technical solution of the present invention is as follows: A method for implementing a synthesizer watermark in a wayland environment, comprising: S1. Setting a dus service in the wayland synthesizer, wherein the dus service controls the watermark switch and receives watermark effect information data; S2, calling the dbus service provided by the wayland synthesizer through dbus at the terminal, and sending the watermark effect information data to the wayland synthesizer; S3, the wayland synthesizer creates a tree belonging to the watermark effect according to the received watermark effect information data; S4. Create a buffer for display in the wayland synthesizer and set it according to the watermark effect information; S5. Obtain the display content in the watermark image and map the buffer.

[0006] Furthermore, the method for setting the dus service in step S1 includes: A new watermark function module is added to the wayland synthesizer special effects management, and a watermark master switch controlled by dus is added to the watermark function module; when the watermark master switch is turned on, a dus service that continuously maintains a monitoring state is provided to receive watermark effect information data set by the user or passed in.

[0007] Furthermore, step S3 also includes: Before creating a tree belonging to the watermark effect, the watermark image file is verified according to the received watermark effect information data.

[0008] Furthermore, the method of creating a tree belonging to the watermark effect in step S3 includes: In the wayland synthesizer, a tree belonging to each level is created from the root node. The tree of the level is obtained according to the level information in the received watermark effect information, and then a tree belonging to the watermark effect is created according to the tree of the level.

[0009] Furthermore, step S5 specifically includes: The display content in the watermark image is obtained through the graphics library, and then the display content is assigned to the created buffer. The buffer is mapped according to the mode information in the watermark effect information data.

[0010] Another aspect of the present invention further provides a synthesizer watermark implementation device in a wayland environment, comprising: Setting module: setting the dus service in the wayland synthesizer, the dus service controls the watermark switch and receives the watermark effect information data; Calling module: calling the dbus service provided by the wayland synthesizer through dbus in the terminal, and sending the watermark effect information data to the wayland synthesizer; Tree module: The wayland synthesizer creates a tree belonging to the watermark effect based on the received watermark effect information data; Buffer module: creates a buffer for display in the wayland synthesizer and sets it according to the watermark effect information; Display module: obtains the display content in the watermark image and maps the buffer.

[0011] Furthermore, the setting module includes: A new watermark function module is added to the wayland synthesizer special effects management, and a watermark master switch controlled by dus is added to the watermark function module; when the watermark master switch is turned on, a dus service that continuously maintains a monitoring state is provided to receive watermark effect information data set by the user or passed in.

[0012] Further, the tree module includes a verification unit, and the verification unit includes: Before creating a tree belonging to the watermark effect, the watermark image file is verified according to the received watermark effect information data.

[0013] Further, the tree module includes a creation unit, and the creation unit includes: In the wayland synthesizer, a tree belonging to each level is created from the root node. The tree of the level is obtained according to the level information in the received watermark effect information, and then a tree belonging to the watermark effect is created according to the tree of the level.

[0014] Furthermore, the display module includes: The display content in the watermark image is obtained through the graphics library, and then the display content is assigned to the created buffer. The buffer is mapped according to the mode information in the watermark effect information data.

[0015] Compared with the prior art, the present invention has the following beneficial effects: (1) Originality of implementation: The present invention adds a set of dbus service supports for watermark effects in the wayland synthesizer and adds a watermark layer to the hierarchy of the wayland synthesizer to achieve support for watermark effects, which is original and innovative. (2) Obvious implementation effect: The present invention establishes a watermark layer above the desktop layer to exclusively manage the screen watermark effect, thereby solving the problem that the user cannot find watermark support when the screen content is displayed.

[0016] (3) Autonomous controllability: The watermark effect is fully supported by the Wayland synthesizer, which has complete intellectual property rights and can be autonomously and controllably adjusted according to needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a schematic diagram of the process of Example 1 of the present invention. DETAILED DESCRIPTION

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

[0019] The main design idea of ​​the present invention is that the rendering of the interface in the wayland synthesizer is in different layers, so a watermark layer can be added to the hierarchy, which is specifically used to draw watermarks. This hierarchy is located above the desktop. According to the acquired watermark effect information, a watermark buffer can be created in the watermark layer or the top layer, and the mapping of the buffer is completed according to the input mode information, position and transparency information. Finally, the effect displayed after synthetic rendering is the effect after adding the watermark.

[0020] Based on the above design concept, the present invention is further described in combination with the accompanying drawings and specific embodiments.

[0021] Embodiment 1: In this embodiment, the synthesizer watermarking method in the wayland environment is as follows: Figure 1 As shown, including: Step S201: Add a watermark function module to the special effect management of the wayland synthesizer, add a watermark master switch controlled by dus to the watermark function module, and the user only needs to use dbus to call the special effect enable interface to pass in the special effect name and status (1 to turn on, 0 to turn off) to control the watermark switch. When the watermark switch of the wayland synthesizer is turned on, a dus service that keeps the monitoring state will be provided. This service provides two interfaces, and the user can set the watermark to be displayed on the screen through these two interfaces. The first interface needs to pass in parameters [image path (including absolute path and full name of the image), transparency (display transparency), drawing screen watermark starting position x, drawing screen watermark starting position y, presentation mode (display mode), drawing level] as watermark effect information. The watermark effect support is turned on by default at startup. The wayland synthesizer mainly supports screen watermark drawing, so the watermark data set before shutdown will not be saved. To clear the watermark effect, just pass in an empty image when calling the interface.

[0022] Step S202: prepare the watermark image to be displayed, and then call the dbus service provided by the wayland synthesizer through dbus in the terminal, and send the watermark effect information data of the watermark image [image path (including absolute path and full name of the image), transparency (display transparency), drawing screen watermark starting position x, drawing screen watermark starting position y, presentation mode (display mode), drawing level] to the wayland synthesizer.

[0023] Step S203: The wayland synthesizer obtains the watermark effect information data transmitted by the user through the dbus service. If the synthesizer watermark has been set once before, the original watermark effect needs to be released, including a series of data for saving watermark information and displaying watermarks created in the following steps. After the release, the currently transmitted watermark effect information data is recorded.

[0024] Step S204: The wayland synthesizer verifies the watermark image file through the watermark image path in the acquired watermark effect information data, that is, checks whether the watermark image is available. It determines whether to proceed to the next step by verifying whether the passed-in image path exists and whether the image format is correct. If it fails, it will not continue and repeat step S202.

[0025] Step S205: In the wayland synthesizer, a tree belonging to its own level is created for each level from the root node. When the content created by the watermark belongs to a certain level, the created content is hung under its tree. The watermark function module obtains the tree of the corresponding level according to the drawing level information in the received watermark effect information, and then creates a tree belonging to the watermark effect according to the tree of the level, so that the screen watermark is hung under the corresponding level.

[0026] Step S206: After the watermark tree is successfully created, a buffer for display is created according to the watermark effect information. This buffer is mainly used to display the watermark effect.

[0027] Step S207: setting the transparency of the generated buffer according to the watermark effect information, and setting the node to not process input events to avoid responding to keyboard and mouse events.

[0028] Step S208: Obtain the display content in the watermark image through the graphics library, assign the display content to the created buffer, and map the buffer according to the mode in the watermark effect information.

[0029] By repeating step S202, the watermark can be replaced in real time.

[0030] This embodiment establishes a watermark layer above the desktop layer to exclusively manage the screen watermark effect, thereby solving the problem that the user cannot find watermark support when the screen content is displayed.

[0031] Embodiment 2: This embodiment provides a synthesizer watermark implementation device in a wayland environment, including: Setting module: setting the dus service in the wayland synthesizer, the dus service controls the watermark switch and receives the watermark effect information data; Calling module: calling the dbus service provided by the wayland synthesizer through dbus in the terminal, and sending the watermark effect information data to the wayland synthesizer; Tree module: The wayland synthesizer creates a tree belonging to the watermark effect based on the received watermark effect information data; Buffer module: creates a buffer for display in the wayland synthesizer and sets it according to the watermark effect information; Display module: obtains the display content in the watermark image and maps the buffer.

[0032] The setting module includes: A new watermark function module is added to the wayland synthesizer special effects management, and a watermark master switch controlled by dus is added to the watermark function module; when the watermark master switch is turned on, a dus service that continuously maintains a monitoring state is provided to receive watermark effect information data set by the user or passed in.

[0033] The tree module includes a verification unit, and the verification unit includes: Before creating a tree belonging to the watermark effect, the watermark image file is verified according to the received watermark effect information data.

[0034] The tree module also includes a creation unit, which includes: In the wayland synthesizer, a tree belonging to each level is created from the root node. The tree of the level is obtained according to the level information in the received watermark effect information, and then a tree belonging to the watermark effect is created according to the tree of the level.

[0035] The display module includes: The display content in the watermark image is obtained through the graphics library, and then the display content is assigned to the created buffer. The buffer is mapped according to the mode information in the watermark effect information data.

[0036] The device proposed in this embodiment 2 can implement the synthesizer watermark implementation method in the wayland environment described in embodiment 1, and has the same technical effect as embodiment 1.

[0037] The above-mentioned embodiments are only preferred implementations of the present invention, and are only used to help understand the method and core ideas of the present application. The protection scope of the present invention is not limited to the above-mentioned embodiments. All technical solutions under the idea of ​​the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A method for implementing synthesizer watermark in a wayland environment, characterized in that: include: S1. Setting a dus service in the wayland synthesizer, wherein the dus service controls the watermark switch and receives watermark effect information data; S2, calling the dbus service provided by the wayland synthesizer through dbus at the terminal, and sending the watermark effect information data to the wayland synthesizer; S3, the wayland synthesizer creates a tree belonging to the watermark effect according to the received watermark effect information data; S4. Create a buffer for display in the wayland synthesizer and set it according to the watermark effect information; S5. Obtain the display content in the watermark image and map the buffer.

2. The synthesizer watermarking method under the wayland environment according to claim 1 is characterized in that: The method for setting the dus service in step S1 includes: A new watermark function module is added to the wayland synthesizer special effects management, and a watermark master switch controlled by dus is added to the watermark function module; when the watermark master switch is turned on, a dus service that continuously maintains a monitoring state is provided to receive watermark effect information data set by the user or passed in.

3. The synthesizer watermarking method under the wayland environment according to claim 1 is characterized in that: Step S3 also includes: Before creating a tree belonging to the watermark effect, the watermark image file is verified according to the received watermark effect information data.

4. The synthesizer watermarking method under the wayland environment according to claim 1 is characterized in that: The method of creating a tree belonging to the watermark effect in step S3 includes: In the wayland synthesizer, a tree belonging to each level is created from the root node. The tree of the level is obtained according to the level information in the received watermark effect information, and then a tree belonging to the watermark effect is created according to the tree of the level.

5. The synthesizer watermarking method in the wayland environment according to claim 1 is characterized in that: Step S5 specifically includes: The display content in the watermark image is obtained through the graphics library, and then the display content is assigned to the created buffer. The buffer is mapped according to the mode information in the watermark effect information data.

6. A synthesizer watermark implementation device in a wayland environment, characterized in that: include: Setting module: setting the dus service in the wayland synthesizer, the dus service controls the watermark switch and receives the watermark effect information data; Calling module: calling the dbus service provided by the wayland synthesizer through dbus in the terminal, and sending the watermark effect information data to the wayland synthesizer; Tree module: The wayland synthesizer creates a tree belonging to the watermark effect based on the received watermark effect information data; Buffer module: creates a buffer for display in the wayland synthesizer and sets it according to the watermark effect information; Display module: obtains the display content in the watermark image and maps the buffer.

7. The synthesizer watermark implementation device under the wayland environment according to claim 6, characterized in that: The setup module includes: A new watermark function module is added to the wayland synthesizer special effects management, and a watermark master switch controlled by dus is added to the watermark function module; when the watermark master switch is turned on, a dus service that continuously maintains a monitoring state is provided to receive watermark effect information data set by the user or passed in.

8. The synthesizer watermark implementation device under the wayland environment according to claim 6, characterized in that: The tree module includes a verification unit, and the verification unit includes: Before creating a tree belonging to the watermark effect, the watermark image file is verified according to the received watermark effect information data.

9. The synthesizer watermark implementation device under the wayland environment according to claim 6, characterized in that: The tree module comprises a creation unit, wherein the creation unit comprises: In the wayland synthesizer, a tree belonging to each level is created from the root node. The tree of the level is obtained according to the level information in the received watermark effect information, and then a tree belonging to the watermark effect is created according to the tree of the level.

10. The synthesizer watermark implementation device in the wayland environment according to claim 6, characterized in that: The display module includes: The display content in the watermark image is obtained through the graphics library, and then the display content is assigned to the created buffer. The buffer is mapped according to the mode information in the watermark effect information data.

Citation Information

Patent Citations

  • Compressed domain video watermark embedding and extracting methods based on moving object

    CN108521613A

  • Page watermark generation method and device, equipment, storage medium and program product

    CN112800396A

  • Screen watermark generation method, system and equipment and storage medium

    CN115205087A

  • Wayland synthesizer

    CN115809047A

  • Information providing system, mounted apparatus, and information processing apparatus

    US20170153117A1