Video recording method, device, storage medium and terminal
By responding to control recording commands and using the target canvas to record video of the target control, the problem of unnecessary information in screen recording is solved, improving the clarity of video recording and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2026-03-20
AI Technical Summary
Existing screen recording functions are easily interfered with by notifications from other applications when recording within an application, resulting in too much content being displayed in the video and affecting the viewing experience.
By responding to the recording command of the control, the target control is determined and the target canvas is used for recording, generating the target video and removing unnecessary information.
It enables separate recording of video of target controls, reducing unnecessary information in screen videos and improving the clarity of video recordings and user experience.
Smart Images

Figure CN119135820B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a video recording method and device, a storage medium, and a terminal. BACKGROUND
[0002] With the development of intelligent terminals, the functions on the intelligent terminals are becoming richer and richer. For example, for a mobile phone, a tablet computer, a computer, and the like, since the screenshot function on the intelligent terminal can only capture a certain frame of image displayed on the screen, in view of the limitation of the screenshot function, more and more intelligent terminals now support a screen recording function.
[0003] The screen recording function can not only record the content displayed on the screen in a continuous time period, but also record the sound played by the terminal in the continuous time period. However, in the recorded video of the screen content, the content displayed is often the content in the entire screen of the terminal. In some scenarios, if a user is recording the screen content in a certain application program, a notification message of another application program is displayed on the screen at this time, so that too much content is displayed in the video, which affects the visual effect of the screen content. SUMMARY
[0004] The embodiments of the present application provide a video recording method, device, computer storage medium, and terminal, which can record a video of the content displayed by a certain control alone, and reduce unnecessary information in the recorded screen video. The technical solution is as follows:
[0005] In a first aspect, the embodiments of the present application provide a video recording method, and the method comprises the following steps.
[0006] In response to a control recording instruction for the content displayed by at least one control in a target application, a target control to be recorded is determined from the at least one control of the target application based on the control recording instruction; a display interface of the target application is composed of the at least one control, and the content displayed by the control is displayed in the control.
[0007] The content displayed by the target control is recorded to obtain a target video corresponding to the target control.
[0008] In a second aspect, the embodiments of the present application provide a video recording device, and the device comprises the following modules.
[0009] A control determination module is configured to, in response to a control recording instruction for the content displayed by at least one control in a target application, determine a target control to be recorded from the at least one control of the target application based on the control recording instruction; a display interface of the target application is composed of the at least one control, and the content displayed by the control is displayed in the control.
[0010] A video recording module is configured to record display content of the target control to obtain a target video corresponding to the target control.
[0011] In a third aspect, an embodiment of the present application provides a computer storage medium, which has a plurality of instructions. The instructions are suitable for being loaded by a processor and performing the method steps described above.
[0012] In a fourth aspect, an embodiment of the present application provides a terminal, which can include a memory and a processor. The memory stores a computer program, and the computer program is suitable for being loaded by the memory and performing the method steps described above.
[0013] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects:
[0014] In the embodiments of the present application, in response to a control recording instruction for display content of at least one control in a target application, a target control to be recorded is determined from the at least one control of the target application based on the control recording instruction, wherein a display interface of the target application is composed of the at least one control, and the control display content is displayed in the control; and then display content recording is performed on the target control to obtain a target video corresponding to the target control. In the embodiments of the present application, the target control to be recorded is determined according to the control recording instruction, and then the content displayed by the target control is recorded to obtain the target video. Therefore, the embodiments of the present application can record a video of the content displayed by a certain control, and reduce unnecessary information in the recorded screen video. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0016] Figure 1 is a method schematic diagram of a video recording method provided by an embodiment of the present application;
[0017] Figure 2 is a control schematic diagram in a display interface provided by an embodiment of the present application;
[0018] Figure 3 is a flow schematic diagram of another video recording method provided by an embodiment of the present application;
[0019] Figure 4 is a structural schematic diagram of a video recording device provided by an embodiment of the present application;
[0020] Figure 5 is a structural schematic diagram of a terminal provided by an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0022] In the description of the present application, it should be understood that the terms "first", "second" and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units not listed, or optionally includes other steps or units inherent to the process, method, product or device. Those skilled in the art can understand the specific meaning of the above terms in the present application according to the specific circumstances. In addition, in the description of the present application, "multiple" means two or more, unless otherwise specified. "And / or" describes the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents a "or" relationship between the associated objects.
[0023] Please refer to Figure 1 is a flowchart of a video recording method provided by an embodiment of the present application. As shown in Figure 1 , the method of the present application can include the following steps:
[0024] S101, in response to a control recording instruction for displaying content of at least one control in a target application, determining a target control to be recorded from the at least one control of the target application based on the control recording instruction.
[0025] It is easy to understand that the display interface in the target application is composed of at least one control, and the control display content is displayed in the control. That is, the display interface in the target application can include one or more controls. Different controls can be used to display different control display content. For example, please refer to Figure 2 the schematic diagram of a display interface in a target application, which can be a video playing application.Figure 2 The area indicated by 10 is the area where the control 1 is located, the area indicated by 11 is the area where the control 2 is located, the area indicated by 12 is the area where the control 3 is located, and the area indicated by 13 is the area where the control 4 is located. The control 1, the control 2, the control 3, and the control 4 are different controls, and each control is responsible for displaying different content. For example, the control 1 can be used to display video playing content, the control 2 can be used to display notification messages of other applications / systems at a certain moment, the control 3 can be used to display a toolbar, and the control 4 can be used to display function icons such as a lock screen and screen recording.
[0026] The control display content can refer to the content displayed by each control on the display interface in the target application. For example, referring to the above description, the control display content can include, but is not limited to, video playing content, notification messages of other applications / systems at a certain moment, a toolbar, function icons of a lock screen, and function icons of screen recording.
[0027] The control recording instruction can refer to a recording instruction for instructing the terminal to record the display content of a certain control.
[0028] In some embodiments, the user can perform a control recording operation on one or more control display contents in the target application. For the user, the operation is performed; for the terminal, the control recording instruction of the control recording operation is received when the user performs the control recording operation. That is, the user performs a control recording operation on one or more control display contents in the target application, and the terminal can receive the control recording instruction of the control recording operation. That is, after the terminal receives the control recording instruction of at least one control display content in the target application, the terminal can determine the target control to be recorded from the at least one control in the target application based on the control recording instruction in response to the control recording instruction.
[0029] Optionally, the target control can be a preset recording control, and the preset recording control can have an association relationship with the control recording instruction. Therefore, determining the target control to be recorded from the at least one control in the target application based on the control recording instruction can be understood as determining the preset recording control having the association relationship with the control recording instruction from the at least one control in the target application as the target control.
[0030] Optionally, the target control can also be a control obtained after the control recording instruction is parsed. Therefore, determining the target control to be recorded from the at least one control in the target application based on the control recording instruction can be understood as determining the target control to be recorded from the at least one control in the target application according to the parsing result of the control recording instruction.
[0031] S102, display content recording is performed on the target control, and a target video corresponding to the target control is obtained.
[0032] In some embodiments, a moment when the control recording instruction is received can be regarded as a starting moment, and the display content in the target control can be recorded from the starting moment; a moment when the control recording end instruction is received can be regarded as an ending moment, and the display content in the target control can be stopped recording from the ending moment. Therefore, the display content in the target control between the starting moment and the ending moment is recorded, and a target video corresponding to the target control is obtained. The control recording end instruction can be an end instruction corresponding to the control recording instruction, and the ending moment can be located after the starting moment.
[0033] For example, the target control refers to Figure 2 For example, the target control refers to
[0034] In the embodiments of the present application, in response to a control recording instruction for display content of at least one control in a target application, a target control to be recorded is determined from the at least one control of the target application based on the control recording instruction, display content recording is performed on the target control, and a target video corresponding to the target control is obtained. In the embodiments of the present application, the target control to be recorded is determined according to the control recording instruction, and then the display content of the target control is recorded to obtain a target video. Therefore, the embodiments of the present application can record a video of the display content of a certain control, and reduce unnecessary information in the recorded screen video.
[0035] Please refer to Figure 3 A flowchart of a video recording method provided by the embodiments of the present application is shown. As shown in Figure 3 The method provided by the embodiments of the present application can include the following steps:
[0036] S301, in response to a control recording instruction for display content of at least one control in a target application, a target control to be recorded is determined from the at least one control of the target application based on the control recording instruction.
[0037] It is easy to understand that the control recording instruction can be an instruction for displaying content of one control in the target application, and the target control to be recorded determined based on the control recording instruction can be one control. The control recording instruction can be an instruction for displaying content of multiple controls in the target application, and the target control to be recorded determined based on the control recording instruction can be multiple controls.
[0038] In some embodiments, when the control recording instruction is an instruction for displaying content of one control in the target application, the implementation of the step can be: in response to the control recording instruction for displaying content of at least one control in the target application, determining a specified control having an association relationship with the control recording instruction in the at least one control, and determining the specified control as the target control to be recorded. The specified control can be a control having an association relationship with the control recording instruction previously set.
[0039] In some embodiments, when the control recording instruction is an instruction for displaying content of multiple controls in the target application, the implementation of the step can be: in response to the control recording instruction for displaying content of at least one control in the target application, determining multiple specified controls having an association relationship with the control recording instruction in the at least one control, and determining the multiple specified controls as the target controls to be recorded. The multiple specified controls can be multiple controls having an association relationship with the control recording instruction previously set.
[0040] In some embodiments, when the control recording instruction is an instruction for displaying content of one control in the target application, another implementation of the step can be: in response to the control recording instruction for displaying content of at least one control in the target application, obtaining an instruction operation position corresponding to the control recording instruction, determining a control associated with the instruction operation position in the at least one control in the target application, and determining the control associated with the instruction operation position as the target control to be recorded. The instruction operation position can refer to a position of a region where an operation corresponding to an operation track of a user performing an operation for generating the control recording instruction is located. Specifically, in the target application, one reference region or multiple reference regions can be divided, and for each reference region, one control can be associated with the reference region. When the instruction operation position corresponding to the control recording instruction hits a position where any one of the above reference regions is located, the control associated with the reference region can be taken as the control associated with the instruction operation position corresponding to the control recording instruction. For example, refer to Figure 2The plurality of controls shown include: control 1 shown in 10, control 3 shown in 12, and control 4 shown in 13. A reference region associated with control 1 can be set in the region shown in 10, and another reference region associated with 2 can be set in the region shown in 12. When the specified operation position of the control recording instruction hits the reference region set in the region shown in 10, control 1 can be determined as the target control to be recorded.
[0041] In some embodiments, in the case where the control recording instruction is an instruction for displaying content of a plurality of controls in the target application, another implementation of the present step can be: in response to the control recording instruction for displaying content of at least one control in the target application, obtaining a plurality of instruction operation positions corresponding to the control recording instruction, determining the control associated with each instruction operation position in the at least one control in the target application, and determining the control associated with each instruction operation position as the target control to be recorded. The instruction operation position can refer to the position of the region where the operation trajectory corresponding to each of the plurality of operations performed by the user to generate the control recording instruction is located. For example, in the target application, a plurality of reference regions can be divided, and each reference region can be associated with a different control. When the plurality of instruction operation positions corresponding to the control recording instruction hit the plurality of reference regions in the above-mentioned reference regions, the controls associated with the plurality of reference regions can be determined as the target controls to be recorded. For example, see Figure 2 The plurality of controls shown include: control 1 shown in 10, control 3 shown in 12, and control 4 shown in 13. A reference region associated with control 1 can be set in the region shown in 10, and another reference region associated with 4 can be set in the region shown in 13. When the specified operation position of the control recording instruction hits the reference region set in the region shown in 10 and the reference region set in the region shown in 13, controls 1 and 4 can be determined as the target controls to be recorded.
[0042] S302, obtaining a target canvas, using the target canvas to record the display content of the target control, and obtaining a target video corresponding to the target control.
[0043] As can be easily understood, the target canvas can refer to a data structure for drawing a displayed picture onto a screen. For example, in the Android system, the canvas can refer to a surface. Each window seen on the user interface, including dialog boxes, status bars, application widgets, and floating windows, has a surface corresponding to it. The content displayed by each window can be drawn into the surface corresponding to the window. The rendering process Surface Flinger can render the surfaces to the final display screen according to their order on the Z axis.
[0044] In some embodiments, obtaining the target canvas can be understood as creating the target canvas for the target control, that is, a new canvas can be created for the target control, which is the target canvas.
[0045] In some embodiments, obtaining the target canvas can be understood as obtaining a recording layout control, determining a reference canvas corresponding to the recording layout control, and determining the reference canvas as the target canvas of the target control. The recording layout control can be a preset control in a previous layout, and a canvas is also created for the preset control when the preset control is laid out, which is the reference canvas. In the process of obtaining the target canvas corresponding to the target control, the reference canvas corresponding to the recording layout control in the previous layout can be directly determined as the target canvas. In this way, the time for creating a new canvas for the target control can be saved.
[0046] In some embodiments, using the target canvas to record the display content of the target control to obtain the target video corresponding to the target control can be understood as obtaining at least one frame of target control display content corresponding to the target control, using the target canvas to record and process at least one frame of target control display content, and generating a target video corresponding to the target control.
[0047] The target control display content can refer to each frame of image content corresponding to the screen content displayed by the target control. One implementation of obtaining at least one frame of target control display content corresponding to the target control can be: calling an intercept drawing method based on the source application control corresponding to the target canvas, and obtaining at least one frame of target control display content corresponding to the target control by executing the intercept drawing method. The source application control refers to the control on which the target canvas is created in the stage of creating the target canvas; for example, canvas A is created for control a, and control a can be the source application control of canvas A. The intercept drawing method can be a method for obtaining each frame of image content corresponding to the screen content displayed by the target control. Specifically, the content displayed on the screen is the result of the display content corresponding to different controls being displayed together, so at least one frame of target control display content corresponding to the target control can be obtained by executing the intercept drawing method without obtaining the display content corresponding to other controls in the screen.
[0048] In some embodiments, using the target canvas to record and process at least one frame of target control display content to generate a target video corresponding to the target control can be understood as: based on the frame timing of at least one frame of target control display content, drawing each target control display content on the target canvas, calling a system media encoder to record a video on the target canvas, and obtaining a target video corresponding to the target control.
[0049] It should be noted that the frame timing can refer to the time sequence of the frame image corresponding to the display content of each target control in the video. The system media encoder refers to a kind of underlying audio and video codec. For example, the system media encoder can be an encoder using a non-central processing unit device for encoding, and the non-central processing unit device can be a graphics processing unit, a dedicated digital signal processor, a programmable logic device, etc.
[0050] Specifically, each frame of target control display content can be drawn on the target canvas in the order of time of the frame image corresponding to the display content of each target control, the system media encoder can be called to encode the data drawn in the target canvas, and the target video corresponding to the target control can be obtained. For example, in the Android system, the system media encoder can select MediaCodec. The encoding principle can be as follows: first, the client writes the data to be encoded to the input buffer area of the obtained encoder, and submits the input buffer area after writing the data to the encoder, and the encoder stores the data in the output buffer area after processing, and the encoder recovers the ownership of the input buffer area from the client; then, the client reads the encoded data from the output buffer area of the obtained encoder for processing, and the encoder recovers the ownership of the output buffer area from the client after processing.
[0051] Optionally, after the target video corresponding to the target control is generated, a video processing operation can be performed on the target video, such as adding a preset watermark in the target video, adding a filter to the target video, etc.
[0052] In the embodiment of the application, first, in response to a control recording instruction for at least one control display content in a target application, a target control to be recorded is determined from the at least one control of the target application based on the control recording instruction, then a target canvas is obtained, the target control is displayed and content is recorded by using the target canvas, and a target video corresponding to the target control is obtained. In the embodiment of the application, the target control to be recorded is determined according to the control recording instruction, and then the content displayed by the target control is recorded by using the target canvas to obtain the target video. Therefore, the embodiment of the application can record the video of the content displayed by a certain control, and reduce unnecessary information in the recorded screen video. Since the content displayed by the recorded control is recorded by using an independent target canvas, the content displayed by the control in the target application will not be affected, and the operation performed by the user in the target application will also not be affected.
[0053] Please refer to Figure 4 A structural schematic diagram of a video recording device provided in the embodiment of the application. The video recording device 400 can be realized by software, hardware or a combination of both to become all or part of a terminal. The device 400 includes:
[0054] The control determining module 410 is configured to determine a target control to be recorded from at least one control of a target application based on a control recording instruction for displaying content of the at least one control in the target application in response to the control recording instruction; a display interface in the target application is composed of the at least one control, and the control display content is displayed in the control;
[0055] The video recording module 420 is configured to record the display content of the target control to obtain a target video corresponding to the target control.
[0056] Optionally, the video recording module 420 comprises:
[0057] The video recording unit is configured to obtain a target canvas, and record the display content of the target control by using the target canvas to obtain a target video corresponding to the target control.
[0058] Optionally, the video recording unit comprises:
[0059] The first obtaining sub-unit is configured to create a target canvas for the target control.
[0060] Optionally, the video recording unit comprises:
[0061] The second obtaining sub-unit is configured to obtain a recording layout control, and determine a reference canvas corresponding to the recording layout control.
[0062] The reference canvas is determined as the target canvas of the target control.
[0063] Optionally, the video recording unit comprises:
[0064] The first recording sub-unit is configured to obtain at least one frame of target control display content corresponding to the target control.
[0065] The second recording sub-unit is configured to record the at least one frame of target control display content by using the target canvas to generate a target video corresponding to the target control.
[0066] Optionally, the second recording sub-unit comprises:
[0067] The third recording sub-unit is configured to draw each of the target control display contents on the target canvas based on frame timing of the at least one frame of target control display content.
[0068] The fourth recording sub-unit is configured to call a system media encoder to record a video of the target canvas to obtain a target video corresponding to the target control.
[0069] Optionally, the second recording sub-unit comprises:
[0070] The intercept drawing method is called based on the source application control corresponding to the target canvas, and at least one frame of target control display content corresponding to the target control is obtained by executing the intercept drawing method.
[0071] Optionally, the control determination module comprises:
[0072] An instruction operation position corresponding to the control recording instruction is obtained.
[0073] A control associated with the instruction operation position is determined in the at least one control of the target application, and the control associated with the instruction operation position is determined as a target control to be recorded.
[0074] Please refer to Figure 5 , Figure 5 A structure schematic diagram of a terminal is provided for the embodiments of the present application. As shown in Figure 5 , the terminal 500 can comprise at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, a display screen assembly 506, and at least one communication bus 502.
[0075] The communication bus 502 is used to realize the connection and communication among the components.
[0076] The user interface 503 can comprise a display screen (Display), a camera (Camera), and optionally the user interface 503 can further comprise a standard wired interface and a wireless interface.
[0077] The network interface 504 can optionally comprise a standard wired interface and a wireless interface (such as a WI-FI interface).
[0078] The processor 501 can include one or more processing cores. The processor 501 connects various parts in the terminal 500 through various interfaces and lines, and performs various functions of the terminal 500 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Alternatively, the processor 501 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 501 can be integrated with a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU is mainly used to process an operating system, a user interface, and an application program; the GPU is used to render and draw the content to be displayed on the display screen; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 501, but can be implemented by a separate chip.
[0079] The memory 505 can include a random access memory (RAM) and a read-only memory (ROM). Alternatively, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 can include a program storage area and a data storage area. The program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 505 can alternatively be at least one storage device located away from the above-mentioned processor 501. As shown in the figure, the memory 505 as a computer storage medium can include an operating system, a network communication module, a user interface module, and a video recording method program. Figure 5 As shown in the figure, the memory 505 as a computer storage medium can include an operating system, a network communication module, a user interface module, and a video recording method program.
[0080] In Figure 5In the terminal 500 shown, the user interface 503 is mainly used to provide an interface for user input, and obtain data input by the user; and the processor 501 can be used to call a program of a video recording method stored in the memory 505, and specifically perform the following operations:
[0081] In response to a control recording instruction for displaying content of at least one control in a target application, determining a target control to be recorded from the at least one control of the target application based on the control recording instruction; a display interface in the target application is composed of the at least one control, and the control display content is displayed in the control;
[0082] Recording the display content of the target control to obtain a target video corresponding to the target control.
[0083] In one embodiment, when the processor performs the step of recording the display content of the target control to obtain a target video corresponding to the target control, the processor specifically performs the following operations:
[0084] Obtaining a target canvas, and recording the display content of the target control by using the target canvas to obtain a target video corresponding to the target control.
[0085] In one embodiment, when the processor performs the step of obtaining a target canvas, the processor specifically performs the following operations:
[0086] Creating a target canvas for the target control.
[0087] In one embodiment, when the processor performs the step of obtaining a target canvas, the processor specifically performs the following operations:
[0088] Obtaining a recording layout control, and determining a reference canvas corresponding to the recording layout control;
[0089] Determining the reference canvas as the target canvas of the target control.
[0090] In one embodiment, when the processor performs the step of recording the display content of the target control by using the target canvas to obtain a target video corresponding to the target control, the processor specifically performs the following operations:
[0091] Obtaining at least one frame of target control display content corresponding to the target control;
[0092] Recording and processing the at least one frame of target control display content by using the target canvas to generate a target video corresponding to the target control.
[0093] In an embodiment, the processor, when performing the step of recording the content displayed by the at least one frame of target control on the target canvas to generate a target video corresponding to the target control, specifically performs the following operations:
[0094] Based on the frame timing of the content displayed by the at least one frame of target control, the content displayed by each target control is respectively drawn on the target canvas.
[0095] A system media encoder is called to record a video on the target canvas to obtain a target video corresponding to the target control.
[0096] In an embodiment, the processor, when performing the step of obtaining the content displayed by the at least one frame of target control corresponding to the target control, specifically performs the following operations:
[0097] Based on the source application control corresponding to the target canvas, an intercepted drawing method is called to obtain the content displayed by the at least one frame of target control corresponding to the target control by executing the intercepted drawing method.
[0098] In an embodiment, the processor, when performing the step of determining the target control to be recorded based on the control recording instruction and the at least one control of the target application, specifically performs the following operations:
[0099] An instruction operation position corresponding to the control recording instruction is obtained.
[0100] Among the at least one control of the target application, a control associated with the instruction operation position is determined, and the control associated with the instruction operation position is determined as the target control to be recorded.
[0101] In addition, those skilled in the art can understand that the structure of the terminal 500 shown in the above-described drawings does not constitute a limitation on the terminal 500, and the user terminal can include more or fewer components than the drawings, or combine certain components, or different component arrangements. For example, the terminal 500 also includes radio frequency circuitry, audio circuitry, WiFi components, power supplies, Bluetooth components, and the like, which are not described here.
[0102] The embodiments of the present application also provide a computer readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the video recording method according to the above-described various embodiments.
[0103] The embodiments of the present application also provide a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the video recording method according to the above-described various embodiments.
[0104] Those skilled in the art should be aware that, in the above one or more examples, the functions described in the embodiments of the present application can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or code on the computer readable medium. The computer readable medium includes computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. The storage media can be any available media that can be accessed by a general purpose or special purpose computer.
[0105] The above merely provides the optional embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A video recording method, characterized in that, The method includes: In response to a control recording instruction for displaying content of at least one control within a target application, a target control to be recorded is determined from at least one control of the target application based on the control recording instruction; the display interface of the target application is composed of the at least one control, and the display content of the control is displayed in the control; Record the displayed content of the target control to obtain the target video corresponding to the target control; The step of recording the display content of the target control to obtain the target video corresponding to the target control includes: obtaining a target canvas; calling an intercept drawing method based on the source application control corresponding to the target canvas; obtaining at least one frame of target control display content corresponding to the target control by executing the intercept drawing method; recording the at least one frame of target control display content using the target canvas; and generating the target video corresponding to the target control.
2. The method according to claim 1, characterized in that, The acquisition of the target canvas includes: Create a target canvas for the target control.
3. The method according to claim 1, characterized in that, The acquisition of the target canvas includes: Obtain the recording layout control and determine the reference canvas corresponding to the recording layout control; The reference canvas is determined as the target canvas of the target control.
4. The method according to claim 1, characterized in that, The step of recording the content displayed by at least one frame of the target control using the target canvas to generate the target video corresponding to the target control includes: Based on the frame timing of the display content of the at least one frame of the target control, the display content of each target control is drawn on the target canvas respectively; The system media encoder is invoked to record video on the target canvas, thereby obtaining the target video corresponding to the target control.
5. The method according to claim 1, characterized in that, The step of determining the target control to be recorded from at least one control of the target application based on the control recording instruction includes: Obtain the instruction operation position corresponding to the control recording instruction; In at least one control of the target application, determine the control associated with the instruction operation location, and identify the control associated with the instruction operation location as the target control to be recorded.
6. A video recording device, characterized in that, The device includes: A control determination module is configured to respond to a control recording instruction for displaying content of at least one control within a target application, and determine a target control to be recorded from at least one control in the target application based on the control recording instruction; the display interface of the target application is composed of the at least one control, and the display content of the control is displayed in the control; A video recording module is used to record the display content of the target control to obtain a target video corresponding to the target control; wherein, the step of recording the display content of the target control to obtain a target video corresponding to the target control includes: obtaining a target canvas, calling an intercept drawing method based on the source application control corresponding to the target canvas, obtaining at least one frame of target control display content corresponding to the target control by executing the intercept drawing method, and recording the at least one frame of target control display content using the target canvas to generate a target video corresponding to the target control.
7. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as the method steps of any one of claims 1 to 5.
8. A terminal, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Screen recording method, device and equipment and storage medium
CN112153436A
Screen recording method and device, equipment and medium
CN113840165A