Application Screen Recording via Shared Texture and Bridge Buffer
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing screen recording methods on terminal devices record all displayed content, including unwanted application content, requiring system permissions and causing inefficient data processing and complex operations.
Innovation Solution
A screen recording method utilizing a primary rendering thread, a secondary rendering thread, and an encoding thread within a dedicated recording application process, replicating rendering data to a bridge buffer and encoding it independently without involving system rendering processes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If a system screen rendering process is called to record displayed content, then all displayed content on the screen is recorded, but the recorded content includes unwanted content from other application programs and system operations become complicated due to permission requirements
Solution Approach 1:
The patent divides the screen recording task into separate recording threads (first recording thread and second recording thread) that operate independently within the application process. The first recording thread handles rendering data from the back buffer, while the second recording thread handles other display content, allowing selective recording without requiring system-wide permissions or recording all screen content indiscriminately.
Solution Approach 2:
The patent extracts the screen recording functionality from the system-level screen rendering process and integrates it directly into the application process. By obtaining rendering data directly from the application's back buffer and using shared textures, the system records only the application's displayed content without needing to capture all system-wide display content or obtain separate system permissions.
2Reliability
If a system screen rendering process is called to record displayed content, then screen recording is performed, but system permissions are required and implementation efficiency is reduced
Solution Approach 1:
The patent extracts the screen recording functionality from the system-level screen rendering process and integrates it directly into the application process. By obtaining rendering data directly from the application's back buffer and using shared textures, the system records only the application's displayed content without needing to capture all system-wide display content or obtain separate system permissions.
Solution Approach 2:
The patent introduces a shared texture as an intermediary mechanism to enable efficient data sharing between the application's rendering thread and the recording threads. The shared texture allows the recording threads to access rendering data without direct memory access conflicts, eliminating the need for complex synchronization mechanisms or system permission intermediaries.
3Quantity of substance
If all displayed content on the screen is recorded, then screen recording is achieved, but data processing overhead increases due to processing unwanted content
Solution Approach 1:
The patent divides the screen recording task into separate recording threads (first recording thread and second recording thread) that operate independently within the application process. The first recording thread handles rendering data from the back buffer, while the second recording thread handles other display content, allowing selective recording without requiring system-wide permissions or recording all screen content indiscriminately.
Solution Approach 2:
The patent applies local quality by recording only the specific rendering data generated by the application itself (from its back buffer) rather than all display content on the screen. This targeted approach ensures that only relevant application content is processed and encoded, minimizing data processing overhead while maintaining recording accuracy for the intended purpose.
Data Source
AI summary
In a screen recording method, a recording application process corresponding to an application is executed. The recording application process includes a primary rendering thread, a secondary rendering thread, and an encoding thread. The secondary rendering thread and the encoding thread are enabled based on a screen recording operation. Through the primary rendering thread, rendering data stored in a back buffer of the primary rendering thread is copied to a bridge buffer. A shared texture identifier is bound to the bridge buffer. Through the secondary rendering thread, the rendering data from the bridge buffer is obtained based on the shared texture identifier. The rendering data is drawn onto an input rendering surface provided by the encoding thread to generate an output rendering surface. Through the encoding thread, the output rendering surface is encoded to generate video frame data.


