CN112738574B - Screen recording data processing method and device, computer equipment and storage medium - Google Patents

Screen recording data processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112738574B
CN112738574B CN201911030237.3A CN201911030237A CN112738574B CN 112738574 B CN112738574 B CN 112738574B CN 201911030237 A CN201911030237 A CN 201911030237A CN 112738574 B CN112738574 B CN 112738574B
Authority
CN
China
Prior art keywords
screen recording
data
recording data
starting
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911030237.3A
Other languages
Chinese (zh)
Other versions
CN112738574A (en
Inventor
龚慧学
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN201911030237.3A priority Critical patent/CN112738574B/en
Publication of CN112738574A publication Critical patent/CN112738574A/en
Application granted granted Critical
Publication of CN112738574B publication Critical patent/CN112738574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4126The peripheral being portable, e.g. PDAs or mobile phones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions

Abstract

The present application relates to the field of video processing technologies, and in particular, to a method and an apparatus for processing screen recording data, a computer device, and a storage medium. The method in one embodiment comprises: receiving a screen recording starting instruction sent by a control terminal; responding to a screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space; starting a data reading thread, and sequentially reading stored screen recording data from a preset storage space in a mode of presetting the size of a file once to obtain a screen recording data block; and sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a composite video stream.

Description

Screen recording data processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of video processing technologies, and in particular, to a method and an apparatus for processing screen recording data, a computer device, and a storage medium.
Background
With the development of communication technology, mobile terminals such as mobile phones, flat panels and televisions are more and more popular, and the types of the mobile terminals are more and more abundant, so that the life style of people is greatly changed. In application scenarios such as remote control and television program recording, a mobile terminal is often required to record a screen.
Taking the example of controlling the television screen recording by a mobile phone, in the traditional screen recording mode, a user triggers the screen recording action of the television through the mobile phone, and after the screen recording is finished, the recorded video is sent to the mobile phone through a network. Therefore, the transmission time of the screen recording data is too long, namely, the transmission efficiency of the screen recording data is low in the traditional screen recording mode.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a screen recording data processing method, device, computer device, and storage medium that can improve the transmission efficiency of screen recording data.
A screen recording data processing method comprises the following steps:
receiving a screen recording starting instruction sent by a control terminal;
responding to the screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space;
starting a data reading thread, and sequentially reading stored screen recording data from the preset storage space in a mode of presetting the size of a file once to obtain a screen recording data block;
and sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a synthesized video stream.
In one embodiment, after the storing the real-time screen recording data in a preset storage space, the method includes:
carrying out position marking on the screen recording data stored in the preset storage space according to a first-in first-out principle;
according to the mode that the file size is preset to the single time, follow preset storage space reads the record screen data that has stored in proper order, include:
reading the stored screen recording data from the preset storage space through the data reading thread;
and recording the starting position and the ending position of data read from the preset storage space every time, and taking the ending position of the data read for the next time as the starting position of the data read for the next time, wherein the data size between the starting position and the ending position of the data read for one time is the size of a preset file for one time.
In an embodiment, before receiving a screen recording start instruction sent by a control terminal, the method further includes:
establishing Socket connection with a control terminal;
the screen recording starting instruction sent by the receiving control terminal comprises the following steps:
receiving a screen recording starting instruction sent by a control terminal through the Socket connection;
the will record screen data block sends to in proper order control terminal includes:
and sequentially sending the screen recording data blocks read each time to a data receiving thread of the control terminal through the Socket connection.
In one embodiment, the performing screen recording processing to obtain real-time screen recording data includes:
calling a preset screen recording interface;
and starting a corresponding screen recording function through the screen recording interface to perform screen recording processing, so as to obtain real-time screen recording data.
A screen recording data processing method comprises the following steps:
sending a screen recording starting instruction to a controlled terminal, so that the controlled terminal carries out screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space;
starting a data receiving thread, receiving screen recording data blocks through the data receiving thread, starting a data reading thread by the controlled terminal for the screen recording data blocks, and sequentially reading stored screen recording data from the preset storage space in a single preset file size mode to obtain the screen recording data blocks;
and sequentially combining the received screen recording data blocks to obtain a composite video stream.
In one embodiment, the method further comprises:
and sending a screen recording stopping instruction to the controlled terminal, so that the controlled terminal stops screen recording processing according to the screen recording stopping instruction.
A screen recording data processing apparatus, the apparatus comprising:
the instruction receiving module is used for receiving a screen recording starting instruction sent by the control terminal;
the data storage module is used for responding to the screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space;
the data reading module is used for starting a data reading thread, sequentially reading stored screen recording data from the preset storage space in a mode of presetting the size of a file once, and obtaining screen recording data blocks;
and the data sending module is used for sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a synthesized video stream.
A screen recording data processing apparatus, the apparatus comprising:
the instruction sending module is used for sending a screen recording starting instruction to a controlled terminal so that the controlled terminal can perform screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data and store the real-time screen recording data in a preset storage space;
the data receiving module is used for starting a data receiving thread, receiving screen recording data blocks through the data receiving thread, starting a data reading thread by the controlled terminal for the screen recording data blocks, and sequentially reading the stored screen recording data from the preset storage space according to a mode of presetting the size of a file once to obtain the screen recording data blocks;
and the data combination module is used for sequentially combining the received screen recording data blocks to obtain a composite video stream.
A computer device comprising a memory storing a computer program and a processor implementing the steps in the screen recording data processing method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps in a screen-recording data processing method.
According to the screen recording data processing method, the screen recording data processing device, the computer equipment and the storage medium, the control terminal sends a screen recording starting instruction to the controlled terminal, the controlled terminal performs screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data, the real-time screen recording data are stored in the preset storage space, the controlled terminal starts a data reading thread, the stored screen recording data are sequentially read from the preset storage space through the data reading thread according to a single preset file size mode to obtain screen recording data blocks, the screen recording data blocks are sequentially sent to the data receiving thread of the control terminal, the data receiving thread receives the screen recording data blocks, the received screen recording data blocks are sequentially combined to obtain a composite video stream, transmission of the screen recording data is achieved through sequential transmission of the screen recording data blocks, recording and transmission while transmission can be achieved, transmission time of the screen recording data is shortened, and transmission efficiency of the screen recording data is improved.
Drawings
FIG. 1 is a diagram of an application environment of a method for processing screen-recorded data in one embodiment;
FIG. 2 is a flowchart illustrating a screen recording data processing method according to an embodiment;
FIG. 3 is a flowchart illustrating a screen recording data processing method according to another embodiment;
FIG. 4 is a block diagram showing the construction of a screen recording data processing apparatus according to an embodiment;
fig. 5 is a block diagram showing the configuration of a screen recording data processing apparatus according to another embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The screen recording data processing method provided by the application can be applied to the application environment shown in fig. 1. Take a television terminal as a controlled terminal and a mobile phone terminal as a control terminal as an example. The method comprises the steps that Socket connection is established between a mobile phone terminal and a television terminal, the mobile phone terminal sends a screen recording starting instruction to the television terminal through the Socket, the television terminal performs screen recording processing through a MediaRecorder according to the screen recording starting instruction to obtain real-time screen recording data, and the real-time screen recording data are stored in a local preset storage space, for example, a video file tvrecord. And the television terminal starts a data reading thread, sequentially reads the stored screen recording data from tvrecord.mp4 through the data reading thread in a mode of presetting the size of a file once, obtains a screen recording data block, and sequentially sends the screen recording data block to the mobile phone terminal through a Socket. And a data receiving thread of the mobile phone terminal receives the screen recording data blocks, and sequentially combines the received screen recording data blocks to obtain a composite video stream. And when the mobile phone terminal sends a screen recording ending instruction to the television terminal, the television terminal stops recording the screen. The television terminal can also create a virtual screen mediaproject createvirtualdisplay by mediaproject, create an encoder by MediaCodec, and perform related initialization processing. And after the screen recording is started, acquiring data in the Buffer through an encoder. After receiving the data, the mobile phone terminal locally synthesizes the received data into a video stream through the Mediamuxer.
Therefore, after the screen recording is finished, the mobile phone terminal can completely receive the screen recording data stream of the television terminal and write the screen recording data stream into the video stream file. Regardless of the length of the video time and the size of the video for recording the screen, after the screen recording is finished, the mobile phone terminal can receive the screen recording video stream in a very short time, so that the time for waiting for transmission is reduced, and the user experience is improved. The control terminal can be, but is not limited to, various smart phones and tablet computers, and the controlled terminal includes, but is not limited to, a television, a desktop computer, a projection display terminal and other devices.
In an embodiment, as shown in fig. 2, a method for processing screen recording data is provided, which is described by taking the method as an example for being applied to the controlled terminal in fig. 1, and includes the following steps:
step 202, receiving a screen recording starting instruction sent by the control terminal.
The screen recording starting instruction is an instruction for instructing the controlled terminal to start screen recording. Taking a mobile phone as a control terminal and a television as a controlled terminal as an example, the mobile phone is provided with a television application program and is matched with the television through the installed application program. When not paired, the two devices do not need to be in the same network environment, but network connection needs to be maintained between the two devices when the user selects screen recording control.
And step 204, responding to a screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space.
And when the controlled terminal receives the screen recording starting instruction, responding to the instruction, calling a screen recording interface to execute screen recording operation so as to realize screen recording of the controlled terminal, and storing screen recording data to obtain a corresponding video file. Specifically, the screen recording processing is performed to obtain real-time screen recording data, and the method includes: calling a preset screen recording interface; and starting a corresponding screen recording function through a screen recording interface to perform screen recording processing, so as to obtain real-time screen recording data. For example, when a television receives a screen recording start instruction of a mobile phone, a MediaRecorder is called to perform screen recording processing to obtain real-time screen recording data, and the real-time screen recording data is stored locally to obtain a video file.
And step 206, starting a data reading thread, and sequentially reading the stored screen recording data from the preset storage space in a mode of presetting the size of the file once to obtain a screen recording data block.
And continuously writing screen recording data into the video file by the controlled terminal in the screen recording process, and continuously reading the video file through the data reading thread. The data read by the data reading thread at a time is a screen recording data block with a preset file size, for example, a screen recording data block with a size of 10K at a time.
And step 208, sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a synthesized video stream.
And the data reading thread sends the read screen recording data block to a data receiving thread of the control terminal, the screen recording data block is sent to the control terminal when one screen recording data block is read, the data receiving thread is started by the control terminal to receive data, the screen recording data is sent to the control terminal when the next screen recording data block is read, the data receiving thread is started by the control terminal to receive data, and the steps are repeated until all screen recording data are transmitted.
According to the screen recording data processing method, the control terminal sends a screen recording opening instruction to the controlled terminal, the controlled terminal performs screen recording processing according to the screen recording opening instruction to obtain real-time screen recording data, the real-time screen recording data are stored in the preset storage space, the controlled terminal starts a data reading thread, the stored screen recording data are sequentially read from the preset storage space through the data reading thread according to the mode of single preset file size, screen recording data blocks are obtained, the screen recording data blocks are sequentially sent to the data receiving thread of the control terminal, the data receiving thread receives the screen recording data blocks, the received screen recording data blocks are sequentially combined to obtain a composite video stream, transmission of the screen recording data is achieved through the mode of sequentially transmitting the screen recording data blocks, transmission while recording is achieved, transmission time of the screen recording data is shortened, and transmission efficiency of the screen recording data is improved.
In one embodiment, after the real-time screen recording data is stored in the preset storage space, the method includes: carrying out position marking on screen recording data stored in a preset storage space according to a first-in first-out principle; according to the mode that the file size was preset to the single time, read the record screen data that have been stored in proper order from presetting storage space, include: reading stored screen recording data from a preset storage space through a data reading thread, recording a starting position and an ending position of reading data from the preset storage space every time, and taking the ending position of reading data at the time as the starting position of reading data at the next time, wherein the data size between the starting position and the ending position of reading data at a single time is the size of a preset file at a single time. And the controlled terminal carries out screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data, and stores the real-time screen recording data in a local preset storage space to obtain a video file. The method comprises the steps of marking the position of data in a video file according to a first-in first-out principle, reading the data from the video file through a data reading thread, recording the initial position and the end position of each reading of the data, reading the data with the preset file size once by taking the end position of the current reading of the data as the initial position of the next reading of the data, and determining the initial position and the end position of each reading of the data according to the preset file size.
In one embodiment, before receiving a screen recording start instruction sent by a control terminal, the method further includes: establishing Socket connection with a control terminal, receiving a screen recording opening instruction sent by the control terminal, and including: through Socket connection, receive the record screen opening instruction that control terminal sent, will record the screen data block and send to control terminal in proper order, include: and sequentially sending the screen recording data blocks read each time to the control terminal through Socket connection. Socket is an intermediate software abstraction layer for communication between an application layer and a TCP/IP (Transmission Control Protocol/Internet Protocol ) Protocol family, and is a group of interfaces. Socket hides a complex TCP/IP protocol family behind the Socket interface, for a user, a group of simple interfaces, namely all interfaces, organizes data through Socket to accord with a specified protocol. Taking the example of establishing Socket connection between the mobile phone terminal and the television terminal, the mobile phone terminal initializes the Socket, then binds with the port, monitors the port, calls accept blocking, and waits for the connection of the television terminal. At this time, if the television terminal initializes a Socket and then connects to the mobile phone terminal, if the connection is successful, the connection between the mobile phone terminal and the client terminal is successfully established. The physical connection between the control terminal and the controlled terminal is realized through the Socket, and the Socket is positioned in a transmission layer of a network protocol, so that the transmission speed is high and stable.
In an embodiment, as shown in fig. 3, a method for processing screen recording data is provided, which is described by taking the method as an example for being applied to the control terminal in fig. 1, and includes the following steps:
step 302, sending a screen recording starting instruction to the controlled terminal, so that the controlled terminal performs screen recording processing according to the screen recording starting instruction, obtains real-time screen recording data, and stores the real-time screen recording data in a preset storage space.
The screen recording starting instruction is an instruction for instructing the controlled terminal to start screen recording. Taking a mobile phone as a control terminal and a television as a controlled terminal as an example, the mobile phone is provided with a television application program and is matched with the television through the installed application program. When not paired, the two devices do not need to be in the same network environment, but network connection needs to be maintained between the two devices when the user selects screen recording control.
And when the controlled terminal receives the screen recording starting instruction, responding to the instruction, calling a screen recording interface to execute screen recording operation so as to realize screen recording of the controlled terminal, and storing screen recording data to obtain a corresponding video file. Specifically, the screen recording processing is performed to obtain real-time screen recording data, and the method includes: calling a preset screen recording interface; and calling the corresponding screen recording function through the screen recording interface to perform screen recording processing, so as to obtain real-time screen recording data. For example, when a television receives a screen recording starting instruction of a mobile phone, a MediaRecorder is called to perform screen recording processing to obtain real-time screen recording data, and the real-time screen recording data is stored locally to obtain a video file.
And step 304, starting a data receiving thread, receiving screen recording data blocks through the data receiving thread, starting a data reading thread by the controlled terminal for the screen recording data blocks, and sequentially reading the stored screen recording data from a preset storage space according to a mode of single preset file size to obtain the screen recording data blocks.
And in the screen recording process of the controlled terminal, continuously writing screen recording data into the video file, and continuously reading the video file through the data reading thread. The data read by the data reading thread at a time is a screen recording data block with a preset file size, for example, a screen recording data block with a size of 1M at a time.
And the data reading thread sends the read screen recording data block to the control terminal, the screen recording data block is sent to the control terminal when one screen recording data block is read, the control terminal starts a data receiving thread to receive data, the screen recording data is sent to the control terminal when the next screen recording data block is read, the control terminal starts a data receiving thread to receive data, and the steps are repeated until all screen recording data are transmitted.
And step 306, sequentially combining the received screen recording data blocks to obtain a composite video stream.
For example, the received screen recording data blocks include a screen recording data block 1, a screen recording data block 2, and a screen recording data block 3, where 1, 2, and 3 are sequential identifiers of each screen recording data block, and all screen recording data blocks are sequentially combined according to the sequential identifiers to obtain a composite video stream, that is, a video file is synthesized at the mobile phone.
According to the screen recording data processing method, a control terminal sends a screen recording opening instruction to a controlled terminal, the controlled terminal carries out screen recording processing according to the screen recording opening instruction to obtain real-time screen recording data, the real-time screen recording data are stored in a preset storage space, a data reading thread is started by the controlled terminal, the stored screen recording data are sequentially read from the preset storage space through the data reading thread according to a single preset file size mode to obtain screen recording data blocks, the screen recording data blocks are sequentially sent to a data receiving thread of the control terminal, the data receiving thread receives the screen recording data blocks, the received screen recording data blocks are sequentially combined to obtain a composite video stream, transmission of the screen recording data is achieved through sequential transmission of the screen recording data blocks, transmission while recording is achieved, transmission time of the screen recording data is shortened, and transmission efficiency of the screen recording data is improved.
In one embodiment, the screen recording data processing method further includes: and sending a screen recording stop instruction to the controlled terminal so that the controlled terminal stops screen recording processing according to the screen recording stop instruction. And the control terminal sends a screen recording stop instruction to the controlled terminal, and the controlled terminal stops screen recording processing when receiving the screen recording stop instruction.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided a screen recording data processing apparatus including: an instruction receiving module 402, a data storing module 404, a data reading module 406, and a data sending module 408. And the instruction receiving module is used for receiving a screen recording starting instruction sent by the control terminal. And the data storage module is used for responding to a screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space. And the data reading module is used for starting a data reading thread, sequentially reading the stored screen recording data from the preset storage space according to a mode of presetting the size of the file once, and obtaining a screen recording data block. And the data sending module is used for sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a synthesized video stream.
In one embodiment, the data storage module further comprises: the position marking module is used for marking the position of the screen recording data stored in the preset storage space according to a first-in first-out principle; the data reading module is further used for reading the stored screen recording data from the preset storage space through the data reading thread, recording the initial position and the end position of reading the data from the preset storage space each time, and taking the end position of reading the data at the current time as the initial position of reading the data next time, wherein the data size between the initial position and the end position of reading the data once is the size of a preset file at the single time.
In one embodiment, the instruction receiving module further comprises a connection establishing module used for establishing Socket connection with the control terminal; the command receiving module is used for receiving a screen recording starting command sent by the control terminal through Socket connection, and the data sending module is used for sequentially sending the screen recording data blocks read each time to the control terminal.
In one embodiment, the data storage module is further configured to call a preset screen recording interface, and start a corresponding screen recording function through the screen recording interface to perform screen recording processing, so as to obtain real-time screen recording data.
In one embodiment, as shown in fig. 5, a screen recording data processing apparatus includes: an instruction sending module 502, a data receiving module 504, and a data combining module 506. And the instruction sending module is used for sending a screen recording starting instruction to the controlled terminal so that the controlled terminal carries out screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data and stores the real-time screen recording data in a preset storage space. And the data receiving module is used for starting a data receiving thread, receiving the screen recording data block through the data receiving thread, starting a data reading thread by the controlled terminal for the screen recording data block, and sequentially reading the stored screen recording data from the preset storage space according to a mode of singly presetting the size of the file to obtain the screen recording data block. And the data combination module is used for sequentially combining the received screen recording data blocks to obtain a composite video stream.
In one embodiment, the screen recording data processing apparatus further includes a screen recording stopping module, configured to send a screen recording stopping instruction to the controlled terminal, so that the controlled terminal stops screen recording processing according to the screen recording stopping instruction.
For specific limitations of the screen recording data processing device, reference may be made to the above limitations of the screen recording data processing method, which are not described herein again. All or part of each module in the screen recording data processing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in FIG. 6. The computer device includes a processor, a memory, and a display screen connected by a system bus. Wherein the processor is configured to provide computational and control capabilities. The memory comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The computer program is executed by a processor to implement a screen recording data processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a screen recording starting instruction sent by a control terminal; responding to a screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space; starting a data reading thread, and sequentially reading stored screen recording data from a preset storage space in a mode of presetting the size of a file once to obtain a screen recording data block; and sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a composite video stream.
In one embodiment, the processor, when executing the computer program, further performs the steps of: position marking is carried out on screen recording data stored in a preset storage space according to a first-in first-out principle; reading the stored screen recording data from the preset storage space through the data reading thread, and recording the initial position and the end position of reading the data from the preset storage space every time so as to take the end position of reading the data at the current time as the initial position of reading the data next time, wherein the data size between the initial position and the end position of reading the data once is the size of a preset file once.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and establishing Socket connection with the control terminal, receiving a screen recording starting instruction sent by the control terminal through the Socket connection, and sequentially sending the screen recording data blocks read each time to the control terminal.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and calling a preset screen recording interface, starting a corresponding screen recording function through the screen recording interface to perform screen recording processing, and obtaining real-time screen recording data.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: sending a screen recording starting instruction to a controlled terminal so that the controlled terminal carries out screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space; starting a data receiving thread, receiving screen recording data blocks through the data receiving thread, starting a data reading thread for the screen recording data blocks through a controlled terminal, and sequentially reading stored screen recording data from a preset storage space in a mode of presetting the size of a file once to obtain the screen recording data blocks; and sequentially combining the received screen recording data blocks to obtain a composite video stream.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and sending a screen recording stop instruction to the controlled terminal so that the controlled terminal stops screen recording processing according to the screen recording stop instruction.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a screen recording starting instruction sent by a control terminal; responding to a screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space; starting a data reading thread, and sequentially reading stored screen recording data from a preset storage space in a mode of presetting the size of a file once to obtain a screen recording data block; and sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a composite video stream.
In one embodiment, the computer program when executed by the processor further performs the steps of: carrying out position marking on screen recording data stored in a preset storage space according to a first-in first-out principle; reading stored screen recording data from a preset storage space through a data reading thread, recording a starting position and an ending position of reading data from the preset storage space every time, and taking the ending position of reading data at the time as the starting position of reading data at the next time, wherein the data size between the starting position and the ending position of reading data at a single time is the size of a preset file at a single time.
In one embodiment, the computer program when executed by the processor further performs the steps of: and establishing Socket connection with the control terminal, receiving a screen recording starting instruction sent by the control terminal through the Socket connection, and sequentially sending the screen recording data blocks read each time to the control terminal.
In one embodiment, the computer program when executed by the processor further performs the steps of: and calling a preset screen recording interface, starting a corresponding screen recording function through the screen recording interface to perform screen recording processing, and obtaining real-time screen recording data.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: sending a screen recording starting instruction to a controlled terminal so that the controlled terminal carries out screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data, and storing the real-time screen recording data in a preset storage space; starting a data receiving thread, receiving a screen recording data block through the data receiving thread, starting a data reading thread by a controlled terminal for the screen recording data block, and sequentially reading stored screen recording data from a preset storage space according to a mode of presetting the size of a file once to obtain the screen recording data block; and sequentially combining the received screen recording data blocks to obtain a composite video stream.
In one embodiment, the computer program when executed by the processor further performs the steps of: and sending a screen recording stop instruction to the controlled terminal so that the controlled terminal stops screen recording processing according to the screen recording stop instruction.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A screen recording data processing method comprises the following steps:
receiving a screen recording starting instruction sent by a control terminal;
responding to the screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, storing the real-time screen recording data in a preset storage space, and performing position marking on the screen recording data stored in the preset storage space according to a first-in first-out principle;
starting a data reading thread, sequentially reading stored screen recording data from the preset storage space through the data reading thread in a single preset file size mode, recording the initial position and the end position of the data read from the preset storage space each time, and taking the end position of the data read at the current time as the initial position of the data read at the next time to obtain a screen recording data block; the data size between the starting position and the ending position of the single reading data is the size of a single preset file;
and sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a composite video stream.
2. The method of claim 1, further comprising:
receiving a screen recording stop instruction sent by a control terminal;
and stopping screen recording processing according to the screen recording stopping instruction.
3. The method according to claim 1, wherein before receiving the screen recording start instruction sent by the control terminal, the method further comprises:
establishing Socket connection with a control terminal;
the receiving of the screen recording opening instruction sent by the control terminal comprises the following steps:
receiving a screen recording starting instruction sent by a control terminal through the Socket connection;
the will record screen data block sends to in proper order control terminal includes:
and sequentially sending the screen recording data blocks read each time to the control terminal through the Socket connection.
4. The method of claim 1, wherein the performing screen recording to obtain real-time screen recording data comprises:
calling a preset screen recording interface;
and starting a corresponding screen recording function through the screen recording interface to perform screen recording processing, so as to obtain real-time screen recording data.
5. A screen recording data processing method comprises the following steps:
sending a screen recording starting instruction to a controlled terminal so that the controlled terminal performs screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data, storing the real-time screen recording data in a preset storage space, and performing position marking on the screen recording data stored in the preset storage space according to a first-in first-out principle;
starting a data receiving thread, receiving a screen recording data block through the data receiving thread, starting a data reading thread by the screen recording data block through the controlled terminal, sequentially reading stored screen recording data from the preset storage space through the data reading thread according to a single preset file size mode, recording the initial position and the end position of the data read from the preset storage space each time, and taking the end position of the data read at the current time as the initial position of the data read at the next time; the data size between the starting position and the ending position of the single reading data is the size of a single preset file;
and sequentially combining the received screen recording data blocks to obtain a composite video stream.
6. The method of claim 5, further comprising:
and sending a screen recording stopping instruction to the controlled terminal so that the controlled terminal stops screen recording processing according to the screen recording stopping instruction.
7. A screen recording data processing apparatus, characterized in that the apparatus comprises:
the instruction receiving module is used for receiving a screen recording starting instruction sent by the control terminal;
the data storage module is used for responding to the screen recording starting instruction, performing screen recording processing to obtain real-time screen recording data, storing the real-time screen recording data in a preset storage space, and performing position marking on the screen recording data stored in the preset storage space according to a first-in first-out principle;
the data reading module is used for starting a data reading thread, sequentially reading stored screen recording data from the preset storage space through the data reading thread in a single preset file size mode, recording the initial position and the end position of the data read from the preset storage space each time, and taking the end position of the data read at the current time as the initial position of the data read at the next time to obtain a screen recording data block; the data size between the starting position and the ending position of the single reading data is the size of a single preset file;
and the data sending module is used for sequentially sending the screen recording data blocks to the control terminal, starting a data receiving thread by the control terminal to receive the screen recording data blocks, and sequentially combining the screen recording data blocks to obtain a synthesized video stream.
8. A screen recording data processing apparatus, characterized in that the apparatus comprises:
the instruction sending module is used for sending a screen recording starting instruction to a controlled terminal so that the controlled terminal can perform screen recording processing according to the screen recording starting instruction to obtain real-time screen recording data, store the real-time screen recording data in a preset storage space, and perform position marking on the screen recording data stored in the preset storage space according to a first-in first-out principle;
the data receiving module is used for starting a data receiving thread, receiving screen recording data blocks through the data receiving thread, starting a data reading thread by the controlled terminal for the screen recording data blocks, sequentially reading the stored screen recording data from the preset storage space through the data reading thread according to a single preset file size mode, recording the initial position and the end position of the data read from the preset storage space each time, and obtaining the end position of the data read at the current time as the initial position of the data read at the next time; the data size between the starting position and the ending position of the single reading data is the size of a single preset file;
and the data combination module is used for sequentially combining the received screen recording data blocks to obtain a composite video stream.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201911030237.3A 2019-10-28 2019-10-28 Screen recording data processing method and device, computer equipment and storage medium Active CN112738574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911030237.3A CN112738574B (en) 2019-10-28 2019-10-28 Screen recording data processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911030237.3A CN112738574B (en) 2019-10-28 2019-10-28 Screen recording data processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112738574A CN112738574A (en) 2021-04-30
CN112738574B true CN112738574B (en) 2023-04-07

Family

ID=75589111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911030237.3A Active CN112738574B (en) 2019-10-28 2019-10-28 Screen recording data processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112738574B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988633A (en) * 2005-12-20 2007-06-27 乐金电子(中国)研究开发中心有限公司 Mobile communication terminal capable of recording TV program and recording method
CN103227934A (en) * 2013-04-19 2013-07-31 深圳Tcl新技术有限公司 Method and server for videorecording television programs
WO2017092670A1 (en) * 2015-12-03 2017-06-08 深圳市光峰光电技术有限公司 Method for synchronously playing recorded multimedia at different places and relevant apparatus
CN107749964A (en) * 2017-11-23 2018-03-02 兰州乐智教育科技有限责任公司 A kind of record device system for teaching skill art in record based on audio frequency and video
CN108965961A (en) * 2018-09-05 2018-12-07 北京奇艺世纪科技有限公司 A kind of multimedia data processing method, device and throw screen equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001217878A (en) * 2000-01-31 2001-08-10 Sony Corp Data transmitter and method, and data receiver and method
AU2001245575A1 (en) * 2000-03-09 2001-09-17 Videoshare, Inc. Sharing a streaming video
JP6173085B2 (en) * 2013-07-18 2017-08-02 キヤノン株式会社 Information processing apparatus, control method therefor, program, and storage medium
CN105704539A (en) * 2016-02-15 2016-06-22 努比亚技术有限公司 Video sharing device and video sharing method
CN105872736A (en) * 2016-04-25 2016-08-17 乐视控股(北京)有限公司 Method and device for resource sharing of television
CN106792108A (en) * 2016-12-02 2017-05-31 腾讯科技(深圳)有限公司 Screen recording method and device
US10375447B1 (en) * 2018-03-28 2019-08-06 Carl Carpenter Asynchronous video conversation systems and methods
CN109413490A (en) * 2018-11-08 2019-03-01 四川长虹电器股份有限公司 Method based on mobile terminal interception television image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988633A (en) * 2005-12-20 2007-06-27 乐金电子(中国)研究开发中心有限公司 Mobile communication terminal capable of recording TV program and recording method
CN103227934A (en) * 2013-04-19 2013-07-31 深圳Tcl新技术有限公司 Method and server for videorecording television programs
WO2017092670A1 (en) * 2015-12-03 2017-06-08 深圳市光峰光电技术有限公司 Method for synchronously playing recorded multimedia at different places and relevant apparatus
CN107749964A (en) * 2017-11-23 2018-03-02 兰州乐智教育科技有限责任公司 A kind of record device system for teaching skill art in record based on audio frequency and video
CN108965961A (en) * 2018-09-05 2018-12-07 北京奇艺世纪科技有限公司 A kind of multimedia data processing method, device and throw screen equipment

Also Published As

Publication number Publication date
CN112738574A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN109525990B (en) Wireless screen projection method and device, computer equipment and storage medium
WO2020224109A1 (en) Real-time object recognition method and apparatus, and computer device
WO2020125572A1 (en) Camera sharing method and apparatus
CN104780338A (en) Method and electronic equipment for loading expression effect animation in instant video
CN110475086B (en) Video recording method and system, server and terminal
CN110602445B (en) Video monitoring data acquisition method and device, computer equipment and storage medium
CN109933439A (en) Method for message transmission, device, computer equipment and storage medium
CN111182065A (en) Message processing method and device based on MQTT protocol and computer equipment
CN110909629A (en) Face recognition data processing method and device, computer equipment and storage medium
CN111338780B (en) Transmission method and device for concurrent files
EP3399713B1 (en) Device, system, and method to perform real-time communication
CN110024395A (en) Image real time transfer, transmission method and controlling terminal
CN109743757B (en) Data processing method and device, wireless module and Internet of things equipment
CN112738574B (en) Screen recording data processing method and device, computer equipment and storage medium
US20050165983A1 (en) System and method for processing data in kernel area by a user command
CN110401845B (en) First screen playing method and device, computer equipment and storage medium
CN113411503B (en) Cloud mobile phone camera preview method and device, computer equipment and storage medium
CN115695388A (en) Control method and device for multimedia conference
US20190364134A1 (en) Data processing method and apparatus for client
US11438448B2 (en) Network application program product and method for processing application layer protocol
US10992901B2 (en) Method, apparatus, device and storage medium for controlling video playback speed
CN112292660B (en) Method for scheduling data in memory, data scheduling equipment and system
CN109618207B (en) Video frame processing method and device, storage medium and electronic device
CN108965426B (en) Data processing method and device for audio system, computer equipment and storage medium
CN111541745A (en) Remote mobile phone video data batch acquisition method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant