CN112866804A - Screen projection self-adaption method, mobile terminal and readable storage medium - Google Patents

Screen projection self-adaption method, mobile terminal and readable storage medium Download PDF

Info

Publication number
CN112866804A
CN112866804A CN202011638740.XA CN202011638740A CN112866804A CN 112866804 A CN112866804 A CN 112866804A CN 202011638740 A CN202011638740 A CN 202011638740A CN 112866804 A CN112866804 A CN 112866804A
Authority
CN
China
Prior art keywords
screen projection
decoding
time
screen
terminal
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
CN202011638740.XA
Other languages
Chinese (zh)
Other versions
CN112866804B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN202011638740.XA priority Critical patent/CN112866804B/en
Publication of CN112866804A publication Critical patent/CN112866804A/en
Application granted granted Critical
Publication of CN112866804B publication Critical patent/CN112866804B/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/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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • 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/4122Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/4508Management of client data or end-user data
    • H04N21/4516Management of client data or end-user data involving client characteristics, e.g. Set-Top-Box type, software version or amount of memory available
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a screen projection self-adaption method which is applied to a mobile terminal and comprises the following steps: establishing connection with a screen projection terminal; sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal; when the decoding time of a certain MP4 file is less than a preset value, stopping decoding; determining the decoding capability of the screen projection terminal according to the image quality level of the MP4 file; drawing the decoded image frame of the certain MP4 file; counting drawing time consumption, and determining the display card computing capacity of the screen projection terminal according to the time consumption; and adjusting the image quality level adapted to the screen projection terminal according to the decoding capability and the display card computing capability. The invention also provides the mobile terminal and the readable storage medium, so that when the mobile terminal and the screen projection terminal are connected and screen projection is carried out, the performance of the screen projection terminal can be automatically identified, the image quality code rate suitable for the screen projection terminal is adjusted, and the user experience is improved.

Description

Screen projection self-adaption method, mobile terminal and readable storage medium
Technical Field
The invention relates to the technical field of electronics, in particular to a screen projection self-adaption method, a mobile terminal and a readable storage medium.
Background
At present, the screen projection function is widely applied to daily life of users. For example, a user may install screen projection software in a mobile terminal, such as a mobile phone, and project a display interface in the mobile phone (i.e., a source device) to other terminal devices (e.g., a smart television, a computer) supporting a screen projection function for display, so that the user can view display contents in the same device on different devices conveniently. In the using process, a user mainly cares about the quality of the image projected on the screen and the fluency of the screen projection, such as no pause, low delay and the like, but because the configuration of the terminal equipment is different, the terminal equipment with high configuration, low configuration and the like is provided, different image quality and code rate adjustment are required for the terminal equipment with different configurations, otherwise, the image quality of the terminal equipment with high configuration is not good enough, clearer image quality and higher code rate are required, the cpu decoding efficiency of the terminal equipment with low configuration is too low, the decoding time and the image drawing time are too long, and the terminal equipment is very stuck and cannot be used.
Disclosure of Invention
In view of this, embodiments of the present invention provide a screen projection adaptive method, a mobile terminal, and a readable storage medium, which can automatically identify the performance of a screen projection terminal, adjust the image quality code rate to be suitable for the screen projection terminal, and improve user experience.
In order to solve the above problem, the present invention provides a screen projection adaptive method, which is applied to a terminal, and the method includes: establishing connection with a screen projection terminal; sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal; when the decoding time of a certain MP4 file is less than a preset value, stopping decoding; determining the decoding capability of the screen projection terminal according to the image quality level of the MP4 file; drawing the decoded image frame of the certain MP4 file; counting drawing time consumption, and determining the display card computing capacity of the screen projection terminal according to the time consumption; and adjusting the image quality level adapted to the screen projection terminal according to the decoding capability and the display card computing capability.
Optionally, the step of sequentially decoding a plurality of MP4 files of different image quality levels on the screen projection terminal specifically includes: pre-storing a plurality of MP4 files with different image quality levels; and sequentially decoding the MP4 files of the plurality of different image quality levels according to the image quality levels on the screen projection terminal.
Optionally, the step of stopping decoding when the decoding time of a certain MP4 file is less than a preset value specifically includes: prestoring minimum code rate time for smoothly playing each MP4 file; acquiring the decoding average time of a preset number of image frames of the currently decoded MP4 file; comparing the code rate minimum time with the decoding average time; and stopping decoding when the decoding average time is less than the code rate minimum time.
Optionally, after the step of stopping decoding when the decoding average time is less than the decoding average time, the method further includes: when the decoding average time is more than the code rate minimum time, the low-level MP4 files are decoded continuously.
Optionally, the step of counting drawing time and determining the display card computing capability of the screen projection terminal according to the time specifically includes: performing filter processing on the frame image; counting average time consumption of a preset number of frames when a filter is opened; comparing the frame average time consumption with a preset time consumption; and determining the display card computing capacity of the screen projection terminal according to the comparison result.
Optionally, the step of determining the display card computing capability of the screen projection terminal according to the comparison result specifically includes: when the frame average consumed time is less than the preset consumed time, a filter at a higher level is started; and determining the display card computing capacity of the screen projection terminal until the frame average consumed time is greater than the preset consumed time.
Optionally, the step of determining the display card computing capability of the screen projection terminal until the frame average consumed time is greater than the preset consumed time specifically includes: presetting a mapping relation between the filter level and the display card computing capacity; and determining the display card computing capacity of the screen projection terminal according to the frame average time consumption and the mapping relation.
Optionally, the frame image is drawn by using OpenGL.
Furthermore, the invention also provides a mobile terminal, which comprises a processor, a memory and a communication bus; the memory is used for storing a screen projection self-adaptive program; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to perform the steps of the screen-projection adaptive method as described above.
Further, the present invention also provides a readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of the screen projection adaptive method as described in any one of the above.
By implementing the scheme, when the mobile terminal is connected with the screen projection terminal and the screen is projected, the performance of the screen projection terminal is automatically identified, the image quality code rate suitable for the screen projection terminal is adjusted, and the user experience is improved.
Drawings
In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views. Like reference numerals having different letter suffixes may represent different examples of similar components. The drawings illustrate generally, by way of example, but not by way of limitation, various embodiments discussed herein.
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a diagram of a communication network system architecture according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a screen projection adaptive method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a mobile terminal according to the present invention;
fig. 5 is a schematic view of a mobile terminal assembly according to the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to fig. 1. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The mobile terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a navigation device, etc., and a stationary terminal such as a digital TV, a desktop computer, etc. In the following, it is assumed that the terminal is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
Fig. 1 is a schematic hardware configuration of a mobile terminal implementing various embodiments of the present invention.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing an embodiment of the present invention, the mobile terminal 100 may include: RF (radio frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, terminal unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 2 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access2000 ), WCDMA (Wide band Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 2 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 2 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The terminal unit 108 serves as a terminal through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The terminal unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various terminals and lines, performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby monitoring the mobile terminal as a whole. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
The mobile terminal 100 as shown in fig. 1 may be configured to operate with communication systems such as wired and wireless communication systems and satellite-based communication systems that transmit data via frames or packets.
A communication system in which a mobile terminal according to the present invention is operable will now be described with reference to fig. 2.
Such communication systems may use different air interfaces and/or physical layers. For example, the air interface used by the communication system includes, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)), global system for mobile communications (GSM), and the like. By way of non-limiting example, the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication system, various embodiments of the present invention are proposed.
The embodiment of the invention provides a screen projection self-adaption method which is applied to a mobile terminal. Referring to fig. 3, the method includes the steps of:
step S301: and establishing connection with the screen projection terminal.
Specifically, the mobile terminal may be an electronic device such as a mobile phone (mobile phone) and an iPad. The screen projection terminal can be terminal equipment such as a computer and a television. When the mobile terminal is connected with the screen projection terminal, a user can check the display content of the mobile terminal in the screen projection terminal.
Step S302: and sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal.
Specifically, the MP4 file is an H264 code stream file, and the mobile terminal performs ffmepg decoding on the MP4 file of the H264 code stream on the screen projection terminal.
In the present embodiment, step S302: sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal, wherein the steps comprise: pre-storing a plurality of MP4 files with different image quality levels; and sequentially decoding the MP4 files of the plurality of different image quality levels according to the image quality levels on the screen projection terminal. For example, the picture quality levels of the plurality of pre-stored MP4 files are set as: four levels of extreme high, medium and low. When the mobile terminal establishes connection with the screen projection terminal, the MP4 file with the image quality level being extremely high is decoded firstly according to the sequence of the image quality level from high to low.
Step S303: and when the decoding time of a certain MP4 file is less than a preset value, stopping decoding.
In this embodiment, the step of stopping decoding when the decoding time of a certain MP4 file is less than a preset value specifically includes: prestoring minimum code rate time for smoothly playing each MP4 file; acquiring the decoding average time of a preset number of image frames of the currently decoded MP4 file; comparing the code rate minimum time with the decoding average time; and stopping decoding when the decoding average time is less than the code rate minimum time. Specifically, the average decoding time of 100 frame images of the currently decoded MP4 file is obtained, and since the time with the minimum code rate for smoothly playing each MP4 file is pre-stored, it can be determined whether the CPU of the screen projection terminal can smoothly decode the code stream at the level by comparing the time with the average decoding time. If the decoding average time is greater than the code rate minimum time, the CPU of the screen projection terminal cannot decode the code stream of the level, the next lower-level MP4 file needs to be decoded, and the process is repeated until the MP4 file with the decoding average time less than the code rate minimum time is decoded, namely when the decoding average time is greater than the code rate minimum time, the lower-level MP4 file continues to be decoded.
Step S304: and determining the decoding capability of the screen projection terminal according to the image quality level of the certain MP4 file.
Specifically, the MPs 4 of different image quality levels correspond to decoding capabilities of different levels, and when the screen projection terminal determines the highest MP4 file capable of decoding, the decoding capability of the screen projection terminal can be determined.
Step S305: the decoded image frame of the certain MP4 file is rendered.
In this embodiment, the frame image is rendered using OpenGL.
Step S306: and counting drawing time consumption, and determining the display card computing capacity of the screen projection terminal according to the time consumption.
In the present embodiment, step S306: counting drawing time consumption, and determining the display card computing capacity of the screen projection terminal according to the time consumption, wherein the steps specifically comprise: performing filter processing on the frame image; counting average time consumption of a preset number of frames when a filter is opened; comparing the frame average time consumption with a preset time consumption; and determining the display card computing capacity of the screen projection terminal according to the comparison result.
In particular, the original frame image looks monotonous with respect to the image quality, and is not particularly friendly to a game scene or the like. Therefore, it is necessary to perform corresponding filter processing on the data of the frame image, the filter generally enhances the image quality such as contrast to saturation, but performing filter processing on the image is relatively costly to the GPU, so it is necessary to test the performance of the GPU, i.e. the graphics card computing capability of the screen projection terminal. In a specific embodiment of the present invention, the average consumed time of 100 frames when the filter is turned on is counted, the preset consumed time is a pre-tested threshold, the two values are compared, and whether the filter with a higher level is turned on is determined according to the comparison result.
In this embodiment, the step of determining the display card computing capability of the screen projection terminal according to the comparison result specifically includes: when the frame average consumed time is less than the preset consumed time, a filter at a higher level is started; and determining the display card computing capacity of the screen projection terminal until the frame average consumed time is greater than the preset consumed time.
In this embodiment, the step of determining the display card computing capability of the screen projection terminal until the frame average consumed time is greater than the preset consumed time specifically includes: presetting a mapping relation between the filter level and the display card computing capacity; and determining the display card computing capacity of the screen projection terminal according to the frame average time consumption and the mapping relation.
Step S307: and adjusting the image quality level adapted to the screen projection terminal according to the decoding capability and the display card computing capability.
Specifically, the image quality level of the screen projection terminal is determined by the decoding capability and the display card computing capability of the screen projection terminal, and when the decoding capability and the display card computing capability are determined, the image quality level which can be adapted by the screen projection terminal can be evaluated.
The screen projection self-adaption method provided by the embodiment of the invention can automatically identify the performance of the screen projection terminal when the mobile terminal and the screen projection terminal establish connection and screen projection, adjust the image quality code rate suitable for the screen projection terminal and improve the user experience.
Fig. 4 is a schematic block diagram of a mobile terminal according to the present invention, where the terminal includes a connection module 401, a decoding module 402, a determination module 403, a drawing module 404, an adjustment module 405, a memory 406, and a processor 407, and all of the functional modules are stored in the memory 406 as program codes and executed by the processor 407, so as to implement the steps or methods in the embodiments.
The connection module 401 is configured to establish a connection with a screen projection terminal.
Specifically, the mobile terminal may be an electronic device such as a mobile phone (mobile phone) and an iPad. The screen projection terminal can be terminal equipment such as a computer and a television. When the mobile terminal establishes a connection with the screen projection terminal through the connection module 401, a user can view the display content of the mobile terminal in the screen projection terminal.
The decoding module 402 is used for sequentially decoding a plurality of MP4 files of different image quality levels on the screen projection terminal.
Specifically, the MP4 file is an H264 code stream file, and the mobile terminal performs ffmepg decoding on the MP4 file of the H264 code stream on the screen projection terminal.
In this embodiment, the step of the decoding module 402 sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal includes: pre-storing a plurality of MP4 files with different image quality levels; and sequentially decoding the MP4 files of the plurality of different image quality levels according to the image quality levels on the screen projection terminal. For example, the picture quality levels of the plurality of pre-stored MP4 files are set as: four levels of extreme high, medium and low. When the mobile terminal establishes connection with the screen projection terminal, the MP4 file with the image quality level being extremely high is decoded firstly according to the sequence of the image quality level from high to low.
The decoding module 402 is further configured to stop decoding when the decoding time of a certain MP4 file is less than a preset value.
In this embodiment, the decoding module 402 executes the step of stopping decoding when the decoding time of a certain MP4 file is less than a preset value, and specifically includes: prestoring minimum code rate time for smoothly playing each MP4 file; acquiring the decoding average time of a preset number of image frames of the currently decoded MP4 file; comparing the code rate minimum time with the decoding average time; and stopping decoding when the decoding average time is less than the code rate minimum time. Specifically, the average decoding time of 100 frame images of the currently decoded MP4 file is obtained, and since the time with the minimum code rate for smoothly playing each MP4 file is pre-stored, it can be determined whether the CPU of the screen projection terminal can smoothly decode the code stream at the level by comparing the time with the average decoding time. If the decoding average time is greater than the code rate minimum time, the CPU of the screen projection terminal cannot decode the code stream of the level, the next lower-level MP4 file needs to be decoded, and the process is repeated until the MP4 file with the decoding average time less than the code rate minimum time is decoded, namely when the decoding average time is greater than the code rate minimum time, the lower-level MP4 file continues to be decoded.
The determining module 403 is configured to determine the decoding capability of the screen projection terminal according to the image quality level of the certain MP4 file.
Specifically, the MPs 4 of different image quality levels correspond to decoding capabilities of different levels, and when the screen projection terminal determines the highest MP4 file capable of decoding, the decoding capability of the screen projection terminal can be determined.
The rendering module 404 renders the decoded image frame of the certain MP4 file.
In this embodiment, the frame image is rendered using OpenGL.
The determining module 403 is further configured to count drawing time, and determine the display card computing capability of the screen projection terminal according to the drawing time.
In this embodiment, the step of counting drawing consumed time by the determining module 403 and determining the display card computing capability of the screen projection terminal according to the consumed time specifically includes: performing filter processing on the frame image; counting average time consumption of a preset number of frames when a filter is opened; comparing the frame average time consumption with a preset time consumption; and determining the display card computing capacity of the screen projection terminal according to the comparison result.
In particular, the original frame image looks monotonous with respect to the image quality, and is not particularly friendly to a game scene or the like. Therefore, it is necessary to perform corresponding filter processing on the data of the frame image, the filter generally enhances the image quality such as contrast to saturation, but performing filter processing on the image is relatively costly to the GPU, so it is necessary to test the performance of the GPU, i.e. the graphics card computing capability of the screen projection terminal. In a specific embodiment of the present invention, the average consumed time of 100 frames when the filter is turned on is counted, the preset consumed time is a pre-tested threshold, the two values are compared, and whether the filter with a higher level is turned on is determined according to the comparison result.
In this embodiment, the step of determining the display card computing capability of the screen projection terminal according to the comparison result specifically includes: when the frame average consumed time is less than the preset consumed time, a filter at a higher level is started; and determining the display card computing capacity of the screen projection terminal until the frame average consumed time is greater than the preset consumed time.
In this embodiment, the step of determining the display card computing capability of the screen projection terminal until the frame average consumed time is greater than the preset consumed time specifically includes: presetting a mapping relation between the filter level and the display card computing capacity; and determining the display card computing capacity of the screen projection terminal according to the frame average time consumption and the mapping relation.
The adjusting module 405 is configured to adjust the image quality level adapted to the screen projection terminal according to the decoding capability and the display card computing capability.
Specifically, the image quality level of the screen projection terminal is determined by the decoding capability and the display card computing capability of the screen projection terminal, and when the decoding capability and the display card computing capability are determined, the image quality level which can be adapted by the screen projection terminal can be evaluated.
The mobile terminal provided by the embodiment of the invention can automatically identify the performance of the screen projection terminal when the mobile terminal is connected with the screen projection terminal for screen projection, adjust the image quality code rate suitable for the screen projection terminal and improve the user experience.
Fig. 5 is a schematic diagram of a composition structure of the mobile terminal of the present invention, as shown in fig. 5, the terminal at least includes: memory 501, communication bus 502, and processor 503, wherein:
the memory 501 is used for storing a screen projection self-adaptive program;
the communication bus 502 is used for realizing connection communication between the processor and the memory;
the processor 503 is configured to execute the screen-projection adaptive program stored in the memory to implement the steps described in fig. 3.
The invention also provides a readable storage medium, in particular a computer readable storage medium. The computer readable storage medium has stored thereon a screen projection adaptation program which, when executed by a processor, implements the steps described above.
It should be noted that the above description of the terminal embodiment is similar to the description of the method embodiment, and has similar beneficial effects to the method embodiment. For technical details not disclosed in the terminal embodiments of the present invention, reference is made to the description of the method embodiments of the present invention for understanding.
It should be noted that, in the embodiment of the present invention, if the screen projection adaptive method is implemented in the form of a software functional module and is sold or used as a standalone product, the method may also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computing device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in the embodiments of the present invention.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A screen projection self-adaption method is applied to a mobile terminal and comprises the following steps:
establishing connection with a screen projection terminal;
sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal;
when the decoding time of a certain MP4 file is less than a preset value, stopping decoding;
determining the decoding capability of the screen projection terminal according to the image quality level of the MP4 file;
drawing the decoded image frame of the certain MP4 file;
counting drawing time consumption, and determining the display card computing capacity of the screen projection terminal according to the time consumption;
and adjusting the image quality level adapted to the screen projection terminal according to the decoding capability and the display card computing capability.
2. The screen-projection adaptive method of claim 1, wherein the step of sequentially decoding a plurality of MP4 files of different picture quality levels on the screen-projection terminal comprises:
pre-storing a plurality of MP4 files with different image quality levels;
and sequentially decoding the MP4 files of the plurality of different image quality levels according to the image quality levels on the screen projection terminal.
3. The screen-projection adaptive method of claim 1, wherein the step of stopping decoding when the decoding time of a certain MP4 file is less than a preset value specifically comprises:
prestoring minimum code rate time for smoothly playing each MP4 file;
acquiring the decoding average time of a preset number of image frames of the currently decoded MP4 file;
comparing the code rate minimum time with the decoding average time;
and stopping decoding when the decoding average time is less than the code rate minimum time.
4. The screen-projection adaptive method of claim 3, wherein the step of stopping decoding when the decoding average time is less than the decoding average time further comprises, after the step of stopping decoding:
when the decoding average time is more than the code rate minimum time, the low-level MP4 files are decoded continuously.
5. The screen projection adaptive method according to claim 1, wherein the step of counting drawing time and determining the display card computing capacity of the screen projection terminal according to the time specifically comprises:
performing filter processing on the frame image;
counting average time consumption of a preset number of frames when a filter is opened;
comparing the frame average time consumption with a preset time consumption;
and determining the display card computing capacity of the screen projection terminal according to the comparison result.
6. The screen projection adaptive method according to claim 5, wherein the step of determining the display card computing capability of the screen projection terminal according to the comparison result specifically comprises:
when the frame average consumed time is less than the preset consumed time, a filter at a higher level is started;
and determining the display card computing capacity of the screen projection terminal until the frame average consumed time is greater than the preset consumed time.
7. The screen-projection adaptive method of claim 6, wherein the step of determining the display card computing capability of the screen projection terminal until the frame average elapsed time is greater than the preset elapsed time specifically comprises:
presetting a mapping relation between the filter level and the display card computing capacity;
and determining the display card computing capacity of the screen projection terminal according to the frame average time consumption and the mapping relation.
8. The screen-projection adaptive method of claim 1, wherein the frame image is rendered using OpenGL.
9. A mobile terminal, characterized in that the mobile terminal comprises at least: a memory, a communication bus, and a processor, wherein:
the memory is used for storing a screen projection self-adaptive program;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute a screen projection adaptation program stored in the memory to implement the steps of the screen projection adaptation method according to claims 1 to 8.
10. A readable storage medium having stored thereon a screen projection adaptation program which, when executed by a processor, implements the steps of the screen projection adaptation method as claimed in claims 1 to 8.
CN202011638740.XA 2020-12-31 2020-12-31 Screen projection self-adaption method, mobile terminal and readable storage medium Active CN112866804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011638740.XA CN112866804B (en) 2020-12-31 2020-12-31 Screen projection self-adaption method, mobile terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011638740.XA CN112866804B (en) 2020-12-31 2020-12-31 Screen projection self-adaption method, mobile terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN112866804A true CN112866804A (en) 2021-05-28
CN112866804B CN112866804B (en) 2023-08-11

Family

ID=76000530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011638740.XA Active CN112866804B (en) 2020-12-31 2020-12-31 Screen projection self-adaption method, mobile terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN112866804B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113316013A (en) * 2021-05-31 2021-08-27 烽火通信科技股份有限公司 Video screen projection method and system
CN113727181A (en) * 2021-08-30 2021-11-30 努比亚技术有限公司 Screen projection time delay dynamic configuration method and device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218731A (en) * 2017-06-30 2019-01-15 腾讯科技(深圳)有限公司 The throwing screen method, apparatus and system of mobile device
CN110460889A (en) * 2019-09-16 2019-11-15 深圳市迅雷网络技术有限公司 A kind of video throws screen method, apparatus, system and storage medium
CN111258526A (en) * 2020-05-06 2020-06-09 上海幻电信息科技有限公司 Screen projection method and system
CN111541934A (en) * 2020-07-08 2020-08-14 成都极米科技股份有限公司 Screen projection equipment, method and system and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218731A (en) * 2017-06-30 2019-01-15 腾讯科技(深圳)有限公司 The throwing screen method, apparatus and system of mobile device
CN110460889A (en) * 2019-09-16 2019-11-15 深圳市迅雷网络技术有限公司 A kind of video throws screen method, apparatus, system and storage medium
CN111258526A (en) * 2020-05-06 2020-06-09 上海幻电信息科技有限公司 Screen projection method and system
CN111541934A (en) * 2020-07-08 2020-08-14 成都极米科技股份有限公司 Screen projection equipment, method and system and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113316013A (en) * 2021-05-31 2021-08-27 烽火通信科技股份有限公司 Video screen projection method and system
CN113727181A (en) * 2021-08-30 2021-11-30 努比亚技术有限公司 Screen projection time delay dynamic configuration method and device and computer readable storage medium
CN113727181B (en) * 2021-08-30 2024-05-17 努比亚技术有限公司 Screen-throwing time delay dynamic configuration method, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112866804B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN111708503B (en) Screen projection control method, device and computer readable storage medium
CN110175062B (en) Screen refreshing frame rate method of mobile terminal, mobile terminal and storage medium
CN108494964B (en) Mobile terminal status bar display method, terminal and computer readable storage medium
CN112394896B (en) Reverse screen-throwing frame rate control method, device and computer readable storage medium
CN107635070B (en) Message reminding method, terminal and storage medium
CN107506163B (en) Method for adjusting screen display, terminal and computer readable storage medium
CN112667181A (en) Screen projection method, screen projection equipment, screen projection control system and storage medium
CN109144441B (en) Screen adjusting method, terminal and computer readable storage medium
CN112102780B (en) Display frame rate regulation and control method, device and computer readable storage medium
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN110401870B (en) Method for adjusting screen recording frame rate, terminal and computer readable storage medium
CN112822538A (en) Screen projection display method, screen projection device, terminal and storage medium
CN112689191A (en) Screen projection control method, terminal and computer readable storage medium
CN110069122B (en) Screen control method, terminal and computer readable storage medium
CN112399215A (en) Screen projection parameter regulation and control method and device and computer readable storage medium
CN108563388B (en) Screen operation method, mobile terminal and computer-readable storage medium
CN112433690A (en) Data processing method, terminal and computer readable storage medium
CN112600815A (en) Video display method, terminal and computer readable storage medium
CN112866804B (en) Screen projection self-adaption method, mobile terminal and readable storage medium
CN112437472B (en) Network switching method, equipment and computer readable storage medium
CN112965680A (en) Screen projection method, screen projection initiating device and storage medium
CN112667339A (en) Method for setting screen refresh rate, terminal and computer readable medium
CN109561221B (en) Call control method, device and computer readable storage medium
CN108543306B (en) Game brightness control method and device and computer readable storage medium
CN108897451B (en) Main and auxiliary display screen identification method, mobile terminal and computer readable 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