CN116668763A - Screen recording method and device - Google Patents

Screen recording method and device Download PDF

Info

Publication number
CN116668763A
CN116668763A CN202211405502.3A CN202211405502A CN116668763A CN 116668763 A CN116668763 A CN 116668763A CN 202211405502 A CN202211405502 A CN 202211405502A CN 116668763 A CN116668763 A CN 116668763A
Authority
CN
China
Prior art keywords
video
audio
stream
recording
moment
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.)
Granted
Application number
CN202211405502.3A
Other languages
Chinese (zh)
Other versions
CN116668763B (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211405502.3A priority Critical patent/CN116668763B/en
Publication of CN116668763A publication Critical patent/CN116668763A/en
Application granted granted Critical
Publication of CN116668763B publication Critical patent/CN116668763B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/4302Content synchronisation processes, e.g. decoder synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)

Abstract

The application provides a screen recording method and a screen recording device, wherein the method comprises the following steps: acquiring a video stream and an audio stream corresponding to a video being played by a video application; and synthesizing the video stream and the audio stream acquired at the first moment and later into a recorded video from the first moment, wherein the first moment is the moment when the first frame of video stream is acquired. In the scheme, the recording of the audio and video is started after the first frame of video stream arrives, the recording process comprises the steps of receiving the audio stream and the video stream and synthesizing the audio stream and the video stream into the recorded video, the aim of synchronizing the time of the audio and video can be achieved, the steps are simple, complex operation is not needed, the processing of off-line professional editing software is not needed, and the method is more suitable for an on-line screen recording scene.

Description

Screen recording method and device
Technical Field
The present application relates to the field of electronic information technologies, and in particular, to a screen recording method and apparatus.
Background
For the traditional screen recording application, the screen recording is realized through a screen picture recording function, but interference factors appearing on a screen during recording can be recorded, so that the quality of a screen recording video is affected. To solve this problem, it is desirable to realize recording by intercepting the video stream and audio stream when the video application plays the video and synthesizing them.
However, it has been found through analysis that if the video stream and the audio stream are recorded in a synthesized manner, there is a problem that the time of the video stream and the audio stream is not synchronized. At present, although processing methods for the problem of asynchronous audio and video have been developed, most of these methods align pictures and sounds through offline processing on professional editing software, and are not applicable to the above-mentioned online screen recording scene.
Disclosure of Invention
The application provides a screen recording method and device, which can solve the problem of asynchronous time of video streams and audio streams in an online screen recording scene.
In a first aspect, a screen recording method is provided, including: acquiring a video stream and an audio stream corresponding to a video being played by a video application; and synthesizing the video stream and the audio stream acquired at the first moment and later into a recorded video from the first moment, wherein the first moment is the moment when the first frame of video stream is acquired.
In the technical scheme of the application, the recording of the audio and video is started after the first frame of video stream arrives, the recording process comprises the steps of receiving the audio stream and the video stream and synthesizing the audio stream and the video stream into the recorded video, the aim of synchronizing the time of the audio and video can be achieved, the steps are simple, complex operation is not needed, the processing of off-line professional editing software is not needed, and the method is more suitable for an on-line screen recording scene. That is, one application is used to record video that is played online by another application, and the recording mode is that video streams and audio streams are respectively acquired from the applications and then synthesized.
It should be noted that in the on-line recording scene, the recording of the video stream is mainly achieved by starting more processes to cooperate, but the recording of the audio stream is achieved only by relying on the original recording process, so that the actual recording starting time of the video is later than the actual recording starting time of the audio. In the present electronic device, for safety, different applications cannot directly acquire source video stream data from each other, so in the screen recording process according to the embodiment of the present application, the screen recording application cannot directly acquire video stream data from the video application, which results in the problem that the audio stream and the video stream are not synchronized (i.e. the audio and video are not synchronized). For example, suppose that the user clicks on the "start recording" option icon at time T0, which initiates the task of online recording video. The progress of the audio recording is quickly ready almost at time T0 and the acquisition of the video stream begins. The video recording process is ready at time T1 after a few seconds, so the audio stream is acquired from time T1. Under the condition, if the time synchronization is not carried out, the audio and the video of the synthesized video are not synchronized, and if the processing is carried out by utilizing the technical scheme of the application, the formal recording is started from the moment T1, namely, the audio stream and the video stream are acquired and then synthesized, thereby effectively avoiding the problem of the asynchronous audio and the video.
With reference to the first aspect, in some implementation manners of the first aspect, when the video stream and the audio stream acquired from the first moment and later are synthesized into the recorded video from the first moment, the method may include: and sequentially synthesizing the audio stream and the video stream which are acquired at the first moment and later according to the acquired sequence to obtain the recorded video. The synthesis may be performed each time the audio stream and the video stream are acquired after the first time, or the video stream and the audio stream acquired from the first time to the time may be synthesized at a time after the start of the first time.
With reference to the first aspect, in some implementations of the first aspect, when acquiring a video stream and an audio stream corresponding to a video being played by a video application, the method may include: acquiring a video stream corresponding to a video being played from a video application, which is forwarded by a MediaServer, from the MediaServer; the audio stream corresponding to the video being played from the video application and sent by the AudioHAL is obtained from the AudioHAL. The scheme of the application is realized by adding the media server on the basis of the original software structure of the electronic equipment, and the scheme of the application can be realized on the premise of minimum change, thereby being simpler and more convenient.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes: at a first time instant, the audio stream acquired before the first time instant is discarded. The video stream is stored before it is received to begin discarding in order to align the start time of the audio stream with the start time of the video stream. Because the audio stream before the first moment is unnecessary without the corresponding video stream, the processing mode can save the processing of the data of the part of the redundant audio stream in the subsequent processing flow and can eliminate the influence of the part of the redundant audio stream on the synthesis result. It should be noted that, because the present application is a scene of an online video recording, the audio-visual integrity of the finally synthesized recorded video is not affected under the condition that the audio stream before the first moment of a few frames is discarded.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes: and discarding all the acquired video streams and audio streams after finishing recording. This implementation enables the release of memory space.
In a second aspect, a screen recording apparatus is provided, the apparatus comprising means for performing any one of the methods of the first aspect, comprised of software and/or hardware.
In a third aspect, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor being capable of implementing any one of the methods of the first aspect when the computer program is executed.
In a fourth aspect, there is provided a chip comprising a processor for reading and executing a computer program stored in a memory, the computer program being capable of implementing any one of the methods of the first aspect when executed by the processor.
Optionally, the chip further comprises a memory, the memory being electrically connected to the processor.
Optionally, the chip may further comprise a communication interface.
In a fifth aspect, there is provided a computer readable storage medium storing a computer program capable of implementing any one of the methods of the first aspect when the computer program is executed by a processor.
In a sixth aspect, there is provided a computer program product comprising a computer program capable of implementing any one of the methods of the first aspect when the computer program is executed by a processor.
Drawings
FIG. 1 is a schematic diagram of a recording process according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a screen recording method according to an embodiment of the application.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 4 is a software architecture block diagram of an electronic device according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a screen recording process according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a recording device according to an embodiment of the application.
Detailed Description
Embodiments of the present application will be described below with reference to the accompanying drawings. The screen recording method provided by the application can be applied to scenes of playing videos of video recording applications of various electronic equipment. The electronic device may be, for example, a mobile phone, a tablet computer, a notebook computer, an XR terminal, a vehicle-mounted terminal, an intelligent wearable device, etc. XR terminals may also include Virtual Reality (VR) terminals, augmented reality (augmented reality, AR) terminals, and Mixed Reality (MR) terminals.
FIG. 1 is a schematic diagram of a recording process according to an embodiment of the present application. As shown in fig. 1, the scene is an example of a recording process of recording video being played by a video application using a recording application. The video stream of the video application is processed by some of the video stream processing modules and then sent to a recording service framework (MediaCodec), which forwards the video stream to a corresponding module of the video applications, such as a video encoder. The audio stream of the video application is sent to a corresponding module of the video recording application, such as an AudioRecorder, after being processed by the original audio stream such as AudioTrack and AudioHal. The video stream and the video stream can be synthesized into an audio-video stream by the synthesis module of the screen recording application, namely, the video stream is synthesized into the recorded video with sound and pictures.
However, due to the requirement of forwarding the video stream, the corresponding background service, i.e. the MediaCodec here, is started only after the screen recording application is started in the electronic device. The actual start recording time of the audio is caused to be earlier than the actual start recording time of the video.
Therefore, in order to solve the above problems, the embodiment of the application starts to acquire and synthesize the audio stream and the video stream after the arrival of the first frame video stream, that is, starts to record formally, thereby achieving the purpose of synchronizing the time of the audio and video.
It should be understood that, fig. 1 shows a scene of online video recording, while there are methods for synchronizing audio and video for other scenes, most of these methods need to be implemented by editing with editing software, or need to be implemented in an offline state, or need complex operations, which results in a scene of video that cannot be suitable for online playing. In addition, the term recording video played online as used herein refers to recording video played by one application instead of downloading video from an application. In the case of recording video played by one application, the conventional scheme is implemented by recording screen images, for example, in fig. 1, the audio stream input to the corresponding module of the screen recording application is still the audio stream, but the video stream is no longer forwarded from MediaCodec, but the cached data in the cache area of the screen display module is actually the cached data of the screen displayed on the screen, so that the cached data may include interference factors appearing on the screen, and in this case, since the screen data may be directly read from the storage module of the screen image, and the operations such as forwarding of a background service are not needed, which is not an application scenario of the scheme of the present application. It can be seen that, in the application scenario of the embodiment of the present application, when one application plays a video, another application is used for recording, and the recording mode is a mode of obtaining a video stream and an audio stream from the application playing the video and re-synthesizing the video stream and the audio stream. But because the processing of the video stream is more special, the video stream starts recording later than the audio stream.
Fig. 2 is a schematic flow chart of a screen recording method according to an embodiment of the application.
201. And acquiring a video stream and an audio stream corresponding to the video being played by the video application.
Step S201 may be performed using the corresponding modules of the screen recording application shown in fig. 1. For example, here a video encoder may receive a video stream and an audio recoder may receive an audio stream.
In one implementation, step S201 may include: acquiring a video stream corresponding to a video being played from a video application, which is forwarded by a MediaServer, from the MediaServer; the audio stream corresponding to the video being played from the video application and sent by the AudioHAL is obtained from the AudioHAL. The scheme of the application is realized by adding the media server on the basis of the original software structure of the electronic equipment, and the scheme of the application can be realized on the premise of minimum change, thereby being simpler and more convenient.
Step S201 may be understood as continuously acquiring the video stream and the audio stream, or periodically acquiring the video stream and the audio stream, but it is not necessarily required to acquire the video stream and/or the audio stream. Especially for a period of time just beginning with recording, since the actual recording of audio is earlier than the actual recording of video, each time step S201 may acquire only an audio stream and no video stream. After a period of time, for example, each time after the first moment, there is both a video stream and an audio stream acquired in step S201. And when the recording is finished, step S201 obtains neither a video stream nor an audio stream.
Alternatively, step S201 may start to be executed when the recording task is started, and stop to be executed when the recording task is ended.
In one example, step S201 may also be performed after the progress of the audio recording is ready.
It should also be appreciated that since the present application is directed to recording the scenes of an online video recording of a video being played on one application with another application, step S201 obtains the audio stream and the video stream of the video being played by the video application that is playing the video.
202. And synthesizing the video stream and the audio stream acquired at the first moment and later into a recorded video from the first moment, wherein the first moment is the moment when the first frame of video stream is acquired.
Step S202 may be performed using the composition module shown in fig. 1.
In one implementation, step S202 may include: and sequentially synthesizing the audio stream and the video stream which are acquired at the first moment and later according to the acquired sequence to obtain the recorded video. The synthesis may be performed each time an audio stream and a video stream are acquired after the first time, for example, it is assumed that T0, T1, T2, and T3 are 4 different times, and T0 is earlier than T1, T1 is earlier than T2, and T2 is earlier than T3. The recording task is started at time T0, and step S201 is performed to acquire the first frame audio stream, but no video stream is acquired, and then step S202 is not performed. When the step S201 is executed at the time T1 to obtain the first frame video stream, the time T1 is the first time, and the step S202 includes: the video stream and the audio stream acquired at the time T1 are synthesized into an audio-video stream (which may be referred to as a synthesized stream of audio and video) at the time T1. Step S201 and step S202 are performed at time T2 to acquire a video stream and an audio stream and synthesize the video stream and the audio stream into an audio-video stream at time T2, and step S201 and step S202 are performed at time T3 to acquire a video stream and an audio stream and synthesize the audio-video stream into an audio-video stream at time T3. Again, assuming that the recording is ended at time T4, the execution of the above steps S201 and S202 is stopped from time T4. It should be understood that it is also possible to combine the video stream and the audio stream acquired from the first time to a time point between the first time point and the time point at a time point after the start of the first time point. It should also be understood that the above examples are for the purpose of facilitating understanding of the present application and are not limited to specific values.
In one implementation, the method further includes: at a first time instant, the audio stream acquired before the first time instant is discarded. The video stream is stored before it is received to begin discarding in order to align the start time of the audio stream with the start time of the video stream. Because the audio stream before the first moment is unnecessary without the corresponding video stream, the processing mode can save the processing of the data of the part of the redundant audio stream in the subsequent processing flow and can eliminate the influence of the part of the redundant audio stream on the synthesis result.
It should be noted that, because the present application is a scene of an online video recording, the audio-visual integrity of the finally synthesized recorded video is not affected under the condition that the audio stream before the first moment of a few frames is discarded.
If the above-described implementation is not employed, it is also necessary to increase the discrimination of the acquisition instants of the stored (acquired) audio streams. To ensure that the synthesis is performed using the audio stream at and after the first time, without synthesizing using the audio stream before the first time.
In one implementation, the method further includes: and discarding all the acquired video streams and audio streams after finishing recording. This implementation enables the release of memory space.
In the technical scheme shown in fig. 2, the recording of the audio and video is started after the first frame of video stream arrives, and the recording process includes receiving the audio stream and the video stream and synthesizing the audio stream and the video stream into the recorded video, so that the aim of synchronizing the time of the audio and video can be achieved, and the method has the advantages of simple steps, no need of complex operation, no need of processing of off-line professional editing software, and suitability for on-line screen recording scenes. That is, one application is used to record video that is played online by another application, and the recording mode is that video streams and audio streams are respectively acquired from the applications and then synthesized.
It should be noted that in the on-line recording scene, the recording of the video stream is mainly achieved by starting more processes to cooperate, but the recording of the audio stream is achieved only by relying on the original recording process, so that the actual recording starting time of the video is later than the actual recording starting time of the audio. In the present electronic device, for safety, different applications cannot directly acquire source video stream data from each other, so in the screen recording process according to the embodiment of the present application, the screen recording application cannot directly acquire video stream data from the video application, which results in the problem that the audio stream and the video stream are not synchronized (i.e. the audio and video are not synchronized). For example, suppose that the user clicks on the "start recording" option icon at time T0, which initiates the task of online recording video. The progress of the audio recording is quickly ready almost at time T0 and the acquisition of the video stream begins. The video recording process is ready at time T1 after a few seconds, so the audio stream is acquired from time T1. Under the condition, if the time synchronization is not carried out, the audio and the video of the synthesized video are not synchronized, and if the processing is carried out by utilizing the technical scheme of the application, the formal recording is started from the moment T1, namely, the audio stream and the video stream are acquired and then synthesized, thereby effectively avoiding the problem of the asynchronous audio and the video.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 3, the electronic device 300 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (universal serial bus, USB) interface 330, a charge management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, keys 390, a motor 391, an indicator 392, a camera 393, a display 394, a user identification module (subscriber identification module, SIM) card interface 395, and the like. The sensor module 380 may include, among other things, a pressure sensor 380A, a gyroscope sensor 380B, a barometric pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, an ambient light sensor 380L, a bone conduction sensor 380M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 300. In other embodiments of the application, electronic device 300 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Illustratively, the processor 310 shown in fig. 3 may include one or more processing units, such as: the processor 310 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 300, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may hold instructions or data that the processor 310 has just used or recycled. If the processor 310 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 310 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 310 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
In some embodiments, the I2C interface is a bi-directional synchronous serial bus including a serial data line (SDA) and a serial clock line (derail clock line, SCL). The processor 310 may contain multiple sets of I2C buses. The processor 310 may be coupled to the touch sensor 380K, charger, flash, camera 393, etc., respectively, via different I2C bus interfaces. For example, the processor 310 may couple the touch sensor 380K through an I2C interface, causing the processor 310 to communicate with the touch sensor 380K through an I2C bus interface, implementing the touch functionality of the electronic device 300.
In some embodiments, the I2S interface may be used for audio communication. The processor 310 may contain multiple sets of I2S buses. The processor 310 may be coupled to the audio module 370 via an I2S bus to enable communication between the processor 310 and the audio module 370.
In some embodiments, the audio module 370 may communicate audio signals to the wireless communication module 360 via the I2S interface to enable answering calls via the bluetooth headset.
In some embodiments, the PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. The audio module 370 and the wireless communication module 360 may be coupled through a PCM bus interface.
In some embodiments, the audio module 370 may also transmit audio signals to the wireless communication module 360 via the PCM interface to enable phone answering via the bluetooth headset. It should be appreciated that both the I2S interface and the PCM interface may be used for audio communication.
In some embodiments, the UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. UART interfaces are typically used to connect the processor 310 with the wireless communication module 360. For example, the processor 310 communicates with a bluetooth module in the wireless communication module 360 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 370 may transmit audio signals to the wireless communication module 360 through a UART interface to implement a function of playing music through a bluetooth headset.
In some embodiments, a MIPI interface may be used to connect processor 310 with peripheral devices such as display screen 394, camera 393, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. The processor 310 and the camera 393 communicate through the CSI interface to implement the photographing function of the electronic device 300. The processor 310 and the display screen 394 communicate via a DSI interface to implement the display functions of the electronic device 300.
In some embodiments, the GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. GPIO interfaces may be used to connect processor 310 with camera 393, display screen 394, wireless communication module 360, audio module 370, sensor module 380, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
Illustratively, the USB interface 330 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 300, or may be used to transfer data between the electronic device 300 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 300. In other embodiments of the present application, the electronic device 300 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 340 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 340 may receive a charging input of a wired charger through the USB interface 330. In some wireless charging embodiments, the charge management module 340 may receive wireless charging input through a wireless charging coil of the electronic device 300. The battery 342 is charged by the charge management module 340, and the electronic device may be powered by the power management module 341.
The power management module 341 is configured to connect the battery 342, the charge management module 340 and the processor 310. The power management module 341 receives input from the battery 342 and/or the charge management module 340 to power the processor 310, the internal memory 321, the external memory, the display screen 394, the camera 393, the wireless communication module 360, and the like. The power management module 341 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance), and other parameters. In other embodiments, the power management module 341 may also be disposed in the processor 310. In other embodiments, the power management module 341 and the charging management module 340 may also be disposed in the same device.
The wireless communication function of the electronic device 300 may be implemented by the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 300 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 350 may provide a solution for wireless communication applied on the electronic device 300, such as at least one of the following: second generation (2th generation,2G) mobile communications solutions, third generation (3 g) mobile communications solutions, fourth generation (4th generation,5G) mobile communications solutions, fifth generation (5th generation,5G) mobile communications solutions. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 350 may receive electromagnetic waves from the antenna 1, perform processes such as filtering and amplifying the received electromagnetic waves, and then transmit the electromagnetic waves to a modem processor for demodulation. The mobile communication module 350 may further amplify the signal modulated by the modem processor, and the amplified signal is converted into electromagnetic waves by the antenna 1 and radiated. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 310. In some embodiments, at least some of the functional modules of the mobile communication module 350 may be provided in the same device as at least some of the modules of the processor 310.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 370A, receiver 370B, etc.), or displays images or video through display screen 394. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 350 or other functional module, independent of the processor 310.
The wireless communication module 360 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the electronic device 300. The wireless communication module 360 may be one or more devices that integrate at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 310. The wireless communication module 360 may also receive a signal to be transmitted from the processor 310, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 of electronic device 300 is coupled to mobile communication module 350 and antenna 2 of electronic device 300 is coupled to wireless communication module 360 such that electronic device 300 may communicate with networks and other electronic devices via wireless communication techniques. The wireless communication technology may include at least one of the following communication technologies: global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, IR technologies. The GNSS may include at least one of the following positioning techniques: global satellite positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), beidou satellite navigation system (beidou navigation satellite system, BDS), quasi zenith satellite system (quasi-zenith satellite system, QZSS), satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 300 implements display functions through a GPU, a display screen 394, an application processor, and the like. The GPU is a microprocessor for image processing, connected to the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 310 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 394 is used for displaying images, videos, and the like. The display screen 394 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (flex-emitting diode), mini-Led, micro-OLED, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 300 may include 1 or N display screens 394, N being a positive integer greater than 1.
Electronic device 300 may implement capture functionality through an ISP, camera 393, video codec, GPU, display 394, and application processor, among others.
The ISP is used to process the data fed back by camera 393. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 393.
Camera 393 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 300 may include 1 or N cameras 393, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 300 is selecting a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 300 may support one or more video codecs. Thus, the electronic device 300 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of the electronic device 300 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 320 may be used to connect an external memory card, such as a Secure Digital (SD) card, to enable expanding the memory capabilities of the electronic device 300. The external memory card communicates with the processor 310 through the external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 321 may be used to store computer executable program code comprising instructions. The processor 310 executes various functional applications of the electronic device 300 and data processing by executing instructions stored in the internal memory 321. The internal memory 321 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 300 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 300 may implement audio functionality through an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an ear-headphone interface 370D, and an application processor, among others. Such as music playing, recording, etc.
The audio module 370 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 370 may also be used to encode and decode audio signals. In some embodiments, the audio module 370 may be disposed in the processor 310, or some of the functional modules of the audio module 370 may be disposed in the processor 310.
Speaker 370A, also known as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 300 may listen to music, or to hands-free conversations, through the speaker 370A.
A receiver 370B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 300 is answering a telephone call or voice message, voice may be received by placing receiver 370B close to the human ear.
Microphone 370C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 370C through the mouth, inputting a sound signal to the microphone 370C. The electronic device 300 may be provided with at least one microphone 370C. In other embodiments, the electronic device 300 may be provided with two microphones 370C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 300 may also be provided with three, four, or more microphones 370C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 370D is for connecting a wired earphone. The headset interface 370D may be a USB interface 330 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 380A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 380A may be disposed on the display screen 394. The pressure sensor 380A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. When a force is applied to the pressure sensor 380A, the capacitance between the electrodes changes. The electronic device 300 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 394, the electronic apparatus 300 detects the touch operation intensity according to the pressure sensor 380A. The electronic device 300 may also calculate the location of the touch based on the detection signal of the pressure sensor 380A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity smaller than a first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyroscope sensor 380B may be used to determine a motion gesture of the electronic device 300. In some embodiments, the angular velocity of electronic device 300 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 380B. The gyro sensor 380B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 380B detects the shake angle of the electronic device 300, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 300 through the reverse motion, thereby realizing anti-shake. The gyro sensor 380B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 380C is used to measure air pressure. In some embodiments, the electronic device 300 calculates altitude from barometric pressure values measured by the barometric pressure sensor 380C, aiding in positioning and navigation.
The magnetic sensor 380D includes a hall sensor. The electronic device 300 may detect the opening and closing of the flip holster using the magnetic sensor 380D. In some embodiments, when the electronic device 300 is a flip machine, the electronic device 300 may detect the opening and closing of the flip according to the magnetic sensor 380D; and setting the characteristics of automatic unlocking of the flip cover and the like according to the detected opening and closing state of the leather sheath or the detected opening and closing state of the flip cover.
The acceleration sensor 380E may detect the magnitude of acceleration of the electronic device 300 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 300 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
The distance sensor 380F is used to measure distance. The electronic device 300 may measure the distance by infrared or laser. In some embodiments, the electronic device 300 may range using the distance sensor 380F to achieve fast focus.
The proximity light sensor 380G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 300 emits infrared light outward through the light emitting diode. The electronic device 300 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that an object is in the vicinity of the electronic device 300. When insufficient reflected light is detected, the electronic device 300 may determine that there is no object in the vicinity of the electronic device 300. The electronic device 300 can detect that the user holds the electronic device 300 close to the ear by using the proximity light sensor 380G, so as to automatically extinguish the screen to achieve the purpose of saving power. The proximity light sensor 380G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 380L is used to sense ambient light level. The electronic device 300 may adaptively adjust the brightness of the display screen 394 based on the perceived ambient light level. The ambient light sensor 380L may also be used to automatically adjust white balance during photographing. The ambient light sensor 380L may also cooperate with the proximity light sensor 380G to detect if the electronic device 300 is in a pocket to prevent false touches.
The fingerprint sensor 380H is used to collect a fingerprint. The electronic device 300 can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access an application lock, fingerprint photographing, fingerprint incoming call answering and the like.
The temperature sensor 380J is used to detect temperature. In some embodiments, the electronic device 300 performs a temperature processing strategy using the temperature detected by the temperature sensor 380J. For example, when the temperature reported by temperature sensor 380J exceeds a threshold, electronic device 300 performs a reduction in performance of a processor located in the vicinity of temperature sensor 380J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 300 heats the battery 342 to avoid the low temperature causing the electronic device 300 to shut down abnormally. In other embodiments, when the temperature is below a further threshold, the electronic device 300 performs boosting of the output voltage of the battery 342 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 380K, also referred to as a "touch panel". The touch sensor 380K may be disposed on the display screen 394, and the touch sensor 380K and the display screen 394 form a touch screen, which is also referred to as a "touch screen". The touch sensor 380K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display screen 394. In other embodiments, touch sensor 380K may also be located on a surface of electronic device 300 other than at display 394.
The bone conduction sensor 380M may acquire a vibration signal. In some embodiments, bone conduction sensor 380M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 380M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 380M may also be provided in the headset, in combination with an osteoinductive headset. The audio module 370 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 380M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beat signals acquired by the bone conduction sensor 380M, so as to realize a heart rate detection function.
The keys 390 include a power on key, a volume key, etc. Key 390 may be a mechanical key. Or may be a touch key. The electronic device 300 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 300.
The motor 391 may generate a vibration alert. The motor 391 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 391 may also correspond to different vibration feedback effects by touch operations applied to different areas of the display screen 394. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 392 may be an indicator light, which may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 395 is for interfacing with a SIM card. The SIM card may be inserted into the SIM card interface 395 or removed from the SIM card interface 395 to enable contact and separation with the electronic device 300. The electronic device 300 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 395 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 395 can be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 395 may also be compatible with different types of SIM cards. The SIM card interface 395 may also be compatible with external memory cards. The electronic device 300 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 300 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 300 and cannot be separated from the electronic device 300.
The software system of the electronic device 300 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the application takes an Android (Android) system with a layered architecture as an example, and illustrates the software structure of electronic equipment. The software structure of an electronic device is exemplarily described below with reference to fig. 4 by taking the electronic device with a hierarchical Android (Android) system as an example.
Fig. 4 is a software architecture block diagram of an electronic device according to an embodiment of the present application. The electronic device in fig. 4 may be the electronic device 300 shown in fig. 3, and as shown in fig. 4, the layered architecture divides the software into several layers, each layer having a distinct role and division of labor; the layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, namely an application layer, an application framework layer, a system layer and a kernel layer from top to bottom. The application layer may include a series of application packages.
As shown in fig. 4, the application package may include Applications (APP) such as short messages, notes, cameras, video, navigation, conversation, gallery, etc. For convenience, in the embodiment of the present application, the application program is simply referred to as an application.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 4, the application framework layer may include a window manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager may obtain the size of the display screen, determine if there is a status bar, lock the screen, obtain the screen, etc.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The system layer may include Android runtime (Android run) including core libraries and virtual machines, and system libraries. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. Such as surface manager (surface manager), media library (media library), three-dimensional graphics processing library (e.g., openGL ES), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
The media library supports playback and recording of multiple audio formats, playback and recording of multiple video formats, and still image files. The media library may support a variety of audio video coding formats such as MPEG4, h.264, moving picture experts group audio layer 3 (moving picture experts group audio layer III, MP 3), advanced audio coding (advanced audio coding, AAC), adaptive multi-rate (AMR), joint picture experts group (joint photo graphic experts group, JPG), and portable network graphics (portable network graphics, PNG).
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The kernel layer refers to a layer between hardware and software; the inner core layer at least comprises a sensor driver, a camera driver, a display driver and the like.
It should be noted that fig. 3 listed above is a block diagram of one possible electronic device, and fig. 4 is a software architecture diagram of one possible electronic device. The electronic device as shown in fig. 1 may have the structure described in fig. 3 and the software structure shown in fig. 4. The scheme of the embodiment of the application can be applied to the electronic device 300 shown in fig. 3 and 4.
In order to facilitate understanding of the scheme of the embodiment of the present application, the process of recording video according to the embodiment of the present application will be described with reference to fig. 5.
Fig. 5 is a schematic diagram of a recording process according to an embodiment of the present application. As shown in fig. 5, assuming that the user clicks the recording icon to start the recording task at the time T0, at the time T1, a first frame of audio stream is obtained, at the time T2, a second frame of video stream is obtained, and at the time T2, which is an example of the first time, the recording is formally started from the time T2, and then the video stream and the audio stream are obtained and the obtained video stream and audio stream are synthesized.
The duration of the relevant process of audio recording is between time T0 and time T1, which is very small, but is separately labeled here for clarity of illustration. The starting time of the related process of video recording is between the time T1 and the time T2. Described in connection with fig. 1. At the time T0, the recording starting instruction is sent to the recording screen application. At time T1, the process of the screen recording application is started, a recording service starting instruction is sent to the MediaCodec, and the first frame of audio stream reaches the AudioRecorder from the video application through the audioTrack and the audioHal. At time T2, the process of the MediaCodec is started, the first frame of video stream reaches the video recorder after passing through the video stream processing module and the MediaCodec from the video application, the N frame of audio stream reaches the audio recorder after passing through the audioTrack and the audioHal from the video application, and N is a positive integer. The execution of step S201 starts from time T0 or time T1, and the execution of step S202 starts from time T2.
The method of the embodiment of the present application is mainly described above with reference to the drawings. It should be understood that, although the steps in the flowcharts related to the embodiments described above are shown in order, these steps are not necessarily performed in the order shown in the figures. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages. The following describes an apparatus according to an embodiment of the present application with reference to the accompanying drawings.
Fig. 6 is a schematic diagram of a recording device according to an embodiment of the application. As shown in fig. 6, the apparatus 2000 includes an acquisition unit 2001 and a processing unit 2002. The apparatus 2000 may be any of the electronic devices described above, such as electronic device a, or electronic device 300.
The apparatus 2000 can be used to perform any of the above screen recording methods. For example, the acquisition unit 2001 may be used to perform step S201, and the processing unit 2002 may be used to perform step S202. For another example, the processing unit 2002 may be further configured to perform, at a first time, discarding an audio stream acquired before the first time. For another example, the processing unit 2002 may be further configured to discard all acquired video and audio streams when recording is completed.
In one implementation, the apparatus 2000 may further include a storage unit for storing data such as a video stream and an audio stream. The storage unit may be integrated in the processing unit 2002 or may be a unit independent of the acquisition unit 2001 and the processing unit 2002.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides electronic equipment, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing steps of any of the methods described above when the computer program is executed.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that enable the implementation of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/electronic apparatus, recording medium, computer memory, read-only memory (ROM), random access memory (random access memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (12)

1. A method of recording a screen, comprising:
acquiring a video stream and an audio stream corresponding to a video being played by a video application;
and synthesizing the video stream and the audio stream acquired at the first moment and later into a recorded video from the first moment, wherein the first moment is the moment when the first frame video stream is acquired.
2. The method of claim 1, wherein the synthesizing the video stream and the audio stream acquired from the first time and later into the recorded video from the first time comprises:
and sequentially synthesizing the audio stream and the video stream which are acquired at the first moment and later according to the acquired sequence to obtain the recorded video.
3. The method according to claim 1 or 2, wherein the obtaining a video stream and an audio stream corresponding to a video being played from a video application comprises:
acquiring a video stream corresponding to a video being played from the video application, which is forwarded by the MediaServer, from a recording service MediaServer;
and acquiring an audio stream corresponding to the video being played from the video application, which is sent by the AudioHAL, from an audio framework AudioHAL.
4. A method according to any one of claims 1 to 3, further comprising:
and discarding the audio stream acquired before the first moment at the first moment.
5. The method according to any one of claims 1 to 4, further comprising:
and discarding all the acquired video streams and audio streams after finishing recording.
6. A screen recording apparatus, comprising:
the acquisition unit is used for acquiring a video stream and an audio stream corresponding to the video being played by the video application;
and the processing unit is used for synthesizing the video stream and the audio stream acquired at the first moment and later into a recorded video from the first moment, wherein the first moment is the moment when the first frame of video stream is acquired.
7. The apparatus according to claim 6, wherein the processing unit is specifically configured to:
and sequentially synthesizing the audio stream and the video stream which are acquired at the first moment and later according to the acquired sequence to obtain the recorded video.
8. The apparatus according to claim 6 or 7, wherein the acquisition unit is specifically configured to:
acquiring a video stream corresponding to a video being played from the video application, which is forwarded by the MediaServer, from a recording service MediaServer;
And acquiring an audio stream corresponding to the video being played from the video application, which is sent by the AudioHAL, from an audio framework AudioHAL.
9. The apparatus according to any one of claims 6 to 8, wherein the processing unit is further configured to: and discarding the audio stream acquired before the first moment at the first moment.
10. The apparatus according to any one of claims 6 to 9, wherein the processing unit is further configured to: and discarding all the acquired video streams and audio streams after finishing recording.
11. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 5 when executing the computer program.
12. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of claims 1 to 5.
CN202211405502.3A 2022-11-10 2022-11-10 Screen recording method and device Active CN116668763B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211405502.3A CN116668763B (en) 2022-11-10 2022-11-10 Screen recording method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211405502.3A CN116668763B (en) 2022-11-10 2022-11-10 Screen recording method and device

Publications (2)

Publication Number Publication Date
CN116668763A true CN116668763A (en) 2023-08-29
CN116668763B CN116668763B (en) 2024-04-19

Family

ID=87721195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211405502.3A Active CN116668763B (en) 2022-11-10 2022-11-10 Screen recording method and device

Country Status (1)

Country Link
CN (1) CN116668763B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007049329A (en) * 2005-08-09 2007-02-22 Seiko Epson Corp Image recording apparatus, image recording method, image display apparatus, image display method, and image display system
WO2013038636A1 (en) * 2011-09-14 2013-03-21 シャープ株式会社 Display device and recording/playback device
WO2016177296A1 (en) * 2015-05-04 2016-11-10 腾讯科技(深圳)有限公司 Video generation method and apparatus
US20180176636A1 (en) * 2016-12-15 2018-06-21 Guangzhou Ucweb Computer Technology Co., Ltd Method, device, and electronic terminal for video recording
WO2018133309A1 (en) * 2017-01-17 2018-07-26 中兴通讯股份有限公司 Video recording method and device
CN108769784A (en) * 2018-06-28 2018-11-06 努比亚技术有限公司 screen recording method, mobile terminal and storage medium
WO2020034227A1 (en) * 2018-08-17 2020-02-20 华为技术有限公司 Multimedia content synchronization method and electronic device
CN111031177A (en) * 2019-12-09 2020-04-17 上海传英信息技术有限公司 Screen recording method, device and readable storage medium
US20210337248A1 (en) * 2018-03-05 2021-10-28 Wangsu Science & Technology Co., Ltd. Method and system for synthesizing audio/video
CN113727140A (en) * 2021-08-31 2021-11-30 维沃移动通信(杭州)有限公司 Audio and video processing method and device and electronic equipment
CN114173150A (en) * 2021-12-22 2022-03-11 Oppo广东移动通信有限公司 Live video recording method, device and system and terminal equipment
CN115002340A (en) * 2021-10-22 2022-09-02 荣耀终端有限公司 Video processing method and electronic equipment
CN115134640A (en) * 2021-03-25 2022-09-30 华为技术有限公司 Synchronous playing method and device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007049329A (en) * 2005-08-09 2007-02-22 Seiko Epson Corp Image recording apparatus, image recording method, image display apparatus, image display method, and image display system
WO2013038636A1 (en) * 2011-09-14 2013-03-21 シャープ株式会社 Display device and recording/playback device
WO2016177296A1 (en) * 2015-05-04 2016-11-10 腾讯科技(深圳)有限公司 Video generation method and apparatus
US20180176636A1 (en) * 2016-12-15 2018-06-21 Guangzhou Ucweb Computer Technology Co., Ltd Method, device, and electronic terminal for video recording
WO2018133309A1 (en) * 2017-01-17 2018-07-26 中兴通讯股份有限公司 Video recording method and device
US20210337248A1 (en) * 2018-03-05 2021-10-28 Wangsu Science & Technology Co., Ltd. Method and system for synthesizing audio/video
CN108769784A (en) * 2018-06-28 2018-11-06 努比亚技术有限公司 screen recording method, mobile terminal and storage medium
WO2020034227A1 (en) * 2018-08-17 2020-02-20 华为技术有限公司 Multimedia content synchronization method and electronic device
CN111031177A (en) * 2019-12-09 2020-04-17 上海传英信息技术有限公司 Screen recording method, device and readable storage medium
CN115134640A (en) * 2021-03-25 2022-09-30 华为技术有限公司 Synchronous playing method and device
CN113727140A (en) * 2021-08-31 2021-11-30 维沃移动通信(杭州)有限公司 Audio and video processing method and device and electronic equipment
CN115002340A (en) * 2021-10-22 2022-09-02 荣耀终端有限公司 Video processing method and electronic equipment
CN114173150A (en) * 2021-12-22 2022-03-11 Oppo广东移动通信有限公司 Live video recording method, device and system and terminal equipment

Also Published As

Publication number Publication date
CN116668763B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
WO2020253719A1 (en) Screen recording method and electronic device
US11669242B2 (en) Screenshot method and electronic device
CN113542839B (en) Screen projection method of electronic equipment and electronic equipment
CN114650363B (en) Image display method and electronic equipment
CN113838490B (en) Video synthesis method and device, electronic equipment and storage medium
CN114040242B (en) Screen projection method, electronic equipment and storage medium
CN113938720B (en) Multi-device cooperation method, electronic device and multi-device cooperation system
CN114089932B (en) Multi-screen display method, device, terminal equipment and storage medium
CN114827581A (en) Synchronization delay measuring method, content synchronization method, terminal device, and storage medium
CN113593567B (en) Method for converting video and sound into text and related equipment
CN115914461B (en) Position relation identification method and electronic equipment
CN115686182B (en) Processing method of augmented reality video and electronic equipment
CN114500728B (en) Incoming call bell setting method, incoming call prompting method and electronic equipment
CN114915747B (en) Video call method, electronic device and readable storage medium
CN116668763B (en) Screen recording method and device
CN114079725B (en) Video anti-shake method, terminal device, and computer-readable storage medium
CN116668764B (en) Method and device for processing video
CN116668762B (en) Screen recording method and device
CN116095224B (en) Notification display method and terminal device
CN116051351B (en) Special effect processing method and electronic equipment
CN115460445B (en) Screen projection method of electronic equipment and electronic equipment
CN116719569B (en) Method and device for starting application
CN114205318B (en) Head portrait display method and electronic equipment
CN116233599B (en) Video mode recommendation method and electronic equipment
CN116700578B (en) Layer synthesis method, electronic device and storage medium

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