CN112866804B - 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
CN112866804B
CN112866804B CN202011638740.XA CN202011638740A CN112866804B CN 112866804 B CN112866804 B CN 112866804B CN 202011638740 A CN202011638740 A CN 202011638740A CN 112866804 B CN112866804 B CN 112866804B
Authority
CN
China
Prior art keywords
screen
decoding
terminal
throwing
time consumption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011638740.XA
Other languages
Chinese (zh)
Other versions
CN112866804A (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

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, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 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, rendering scenes according to MPEG-4 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, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 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, rendering scenes according to MPEG-4 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

Abstract

The embodiment of the invention discloses a screen-throwing self-adaption method which is applied to a mobile terminal and comprises the following steps: establishing connection with a screen throwing terminal; sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal; stopping decoding when the decoding time of a certain MP4 file is smaller than a preset value; determining the decoding capability of the screen projection terminal according to the picture quality level of the MP4 file; drawing the decoded image frame of the MP4 file; counting the drawing time consumption, and determining the display card computing capacity of the screen-throwing 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 a mobile terminal and a readable storage medium, which can automatically identify the performance of the screen-throwing terminal when the mobile terminal is connected with the screen-throwing terminal to throw the screen, adjust the performance to be suitable for the image quality code rate of the screen-throwing terminal and improve the user experience.

Description

Screen projection self-adaption method, mobile terminal and readable storage medium
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a screen projection adaptive method, a mobile terminal, and a readable storage medium.
Background
At present, the screen projection function is widely applied to the daily life of users. For example, a user can install screen projection software in a mobile terminal, such as a mobile phone, and project a display interface in the mobile phone (i.e. source device) to other terminal devices (e.g. smart televisions and computers) supporting the screen projection function for display, so that the user can conveniently view display contents in the same device on different devices. In the use process, users mainly care about the image quality of screen projection and the fluency of screen projection without blocking low delay and the like, but because the terminal equipment is configured differently and has high configuration, low configuration and the like, different image quality and code rate adjustment are needed for the terminal equipment with different configurations, otherwise, the terminal equipment with high configuration has insufficient image quality, clearer image quality and higher code rate are needed, the cpu decoding efficiency is too low for the terminal equipment with low configuration, the decoding time and the image drawing time are too long, so that the terminal equipment with low configuration is not Chang Kadu and cannot be used.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a screen-projection adaptive method, a mobile terminal, and a readable storage medium, which can automatically identify performance of a screen-projection terminal, adjust to an image quality code rate suitable for the screen-projection terminal, and improve user experience.
In order to solve the above problems, the present invention provides a screen-projection adaptive method, which is applied to a terminal, and the method includes: establishing connection with a screen throwing terminal; sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal; stopping decoding when the decoding time of a certain MP4 file is smaller than a preset value; determining the decoding capability of the screen projection terminal according to the picture quality level of the MP4 file; drawing the decoded image frame of the MP4 file; counting the drawing time consumption, and determining the display card computing capacity of the screen-throwing 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 with 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 with the plurality of different image quality levels on the screen projection terminal according to the image quality levels.
Optionally, when the decoding time of a certain MP4 file is less than a preset value, the step of stopping decoding specifically includes: pre-storing the minimum code rate time for smoothly playing each MP4 file; acquiring decoding average time of a preset number of image frames of a current decoded MP4 file; comparing the code rate minimum time with the decoding average time; and stopping decoding when the decoding average time is smaller 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: and when the decoding average time is greater than the minimum code rate time, continuing to decode the MP4 file at the low level.
Optionally, the step of counting and drawing time consumption and determining the display card computing capability of the screen-throwing terminal according to the time consumption specifically includes: performing filter processing on the frame image; counting average time consumption of a preset number of frames when the filter is started; comparing the average time consumption of the frames with preset time consumption; and determining the display card computing capability of the screen-throwing terminal according to the comparison result.
Optionally, the step of determining the display card computing capability of the screen-throwing terminal according to the comparison result specifically includes: when the average time consumption of the frames is smaller than the preset time consumption, starting a filter at a higher level; and determining the display card computing capability of the screen-throwing terminal until the average frame time consumption is greater than the preset time consumption.
Optionally, the step of determining the graphics card computing capability of the screen-throwing terminal until the frame average time consumption is greater than the preset time consumption specifically includes: presetting a mapping relation between a filter level and display card computing capacity; and determining the display card computing capability of the screen-throwing terminal according to the frame average time consumption and the mapping relation.
Optionally, the frame image is drawn using OpenGL.
The invention further provides a mobile terminal, which comprises a processor, a memory and a communication bus; the memory is used for storing a screen throwing 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-shot adaptation method as described above.
Further, the present invention also provides a readable storage medium storing one or more programs executable by one or more processors to implement the steps of the screen-drop adaptation method as described in any one of the above.
Through implementing the scheme, when the mobile terminal and the screen throwing terminal are connected, the performance of the screen throwing terminal can be automatically identified, the image quality code rate suitable for the screen throwing terminal is adjusted, and the user experience is improved.
Drawings
In the drawings (which are not necessarily drawn to scale), like numerals may describe similar components in different views. Like reference numerals having different letter suffixes may represent different instances of similar components. The drawings illustrate generally, by way of example and 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 schematic diagram of a communication network system according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a screen-projection adaptive method according to an embodiment of the present invention;
FIG. 4 is a schematic block diagram of a mobile terminal according to the present invention;
fig. 5 is a schematic diagram of a mobile terminal according to the present invention.
Detailed Description
The technical solutions 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" for representing elements are used only for facilitating the description of the present invention, and are not of specific significance per se. Thus, "module" and "component" may be used in combination.
Mobile terminals may be implemented in a variety of forms. For example, the terminals described in the present invention may include mobile terminals such as mobile phones, smart phones, notebook computers, digital broadcast receivers, personal Digital Assistants (PDAs), tablet computers (PADs), portable Multimedia Players (PMPs), navigation devices, and the like, and fixed terminals such as digital TVs, desktop computers, and the like. 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 a moving purpose.
Fig. 1 is a hardware architecture diagram of a mobile terminal implementing various embodiments of the present invention.
Referring to fig. 1, which is a schematic 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 source 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 2 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the 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 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wide band Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 2 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of the mobile terminal, and can be omitted entirely as required within the scope of 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 talk 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 (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (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 graphics 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 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone 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 the audio signal.
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 and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
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 (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 to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, 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 touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the 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 azimuth 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 detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. 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, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 2, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The terminal unit 108 serves as a terminal through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (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.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, 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, and 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 performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily 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 source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through 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, air interfaces used by communication systems include, for example, frequency Division Multiple Access (FDMA), time Division Multiple Access (TDMA), code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (particularly, long Term Evolution (LTE)), global system for mobile communications (GSM), and the like. As a 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 a schematic 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 general mobile communication 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, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above-mentioned mobile terminal hardware structure and communication system, various embodiments of the present invention are presented.
The embodiment of the invention provides a screen-throwing self-adaption method, which is applied to a mobile terminal. Referring to fig. 3, the method comprises 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), an iPad, etc. The screen projection terminal can be terminal equipment such as a computer, a television and the like. When the mobile terminal is connected with the screen throwing terminal, a user can view the display content of the mobile terminal in the screen throwing 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 bitstream file, and the mobile terminal performs ffmepg decoding on the MP4 file of the H264 bitstream at 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 method comprises the following steps: pre-storing a plurality of MP4 files with different image quality levels; and sequentially decoding the MP4 files with the plurality of different image quality levels on the screen projection terminal according to the image quality levels. For example, the picture quality levels of the prestored MP4 files are set as follows: high, medium, low. When the mobile terminal establishes connection with the screen projection terminal, MP4 files with extremely high image quality levels are decoded firstly according to the order from high image quality levels to low image quality levels.
Step S303: and stopping decoding when the decoding time of a certain MP4 file is smaller than a preset value.
In this embodiment, when the decoding time of a certain MP4 file is less than a preset value, the step of stopping decoding specifically includes: pre-storing the minimum code rate time for smoothly playing each MP4 file; acquiring decoding average time of a preset number of image frames of a current decoded MP4 file; comparing the code rate minimum time with the decoding average time; and stopping decoding when the decoding average time is smaller than the code rate minimum time. Specifically, the decoding average time of 100 frame images of the MP4 file currently decoded is obtained, and since the minimum code rate time for smoothly playing each MP4 file is pre-stored, it is determined whether the CPU of the screen-throwing terminal can smoothly decode the level code stream by comparing the minimum code rate time with the decoding average time. If the decoding average time is longer than the code rate minimum time, the CPU of the screen throwing terminal cannot decode the code stream of the level, the next MP4 file of a lower level needs to be decoded, and the steps are repeated until the MP4 file with the decoding average time smaller than the code rate minimum time is decoded, namely, when the decoding average time is longer than the code rate minimum time, the MP4 file of the lower level is continuously decoded.
Step S304: and determining the decoding capability of the screen projection terminal according to the picture quality level of the MP4 file.
Specifically, MP4 with different image quality levels correspond to decoding capabilities with different levels, and when the screen projection terminal determines the highest-level MP4 file that can be decoded, the decoding capability of the screen projection terminal can be determined.
Step S305: and drawing the decoded image frame of the MP4 file.
In the present embodiment, the frame image is drawn using OpenGL.
Step S306: and counting the drawing time consumption, and determining the display card computing capacity of the screen-throwing terminal according to the time consumption.
In the present embodiment, step S306: counting and drawing time consumption, and determining the display card computing capability of the screen-throwing terminal according to the time consumption, wherein the method specifically comprises the following steps of: performing filter processing on the frame image; counting average time consumption of a preset number of frames when the filter is started; comparing the average time consumption of the frames with preset time consumption; and determining the display card computing capability of the screen-throwing terminal according to the comparison result.
In particular, the original frame image looks monotonous with respect to image quality, and is particularly not friendly to game scenes and the like. Therefore, the data of the frame image needs to be processed by a corresponding filter, and the filter generally has the image quality enhancement compared with the saturation level and the like, but the processing of the image by the filter consumes GPU, so that the performance of the GPU, namely the computing capability of a display card of a screen projection terminal, needs to be tested. In one embodiment of the invention, the average time consumption of 100 frames when the filter is opened is counted, the preset time consumption is a pre-tested threshold value, the two values are compared, and whether the filter with higher level is opened 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 average time consumption of the frames is smaller than the preset time consumption, starting a filter at a higher level; and determining the display card computing capability of the screen-throwing terminal until the average frame time consumption is greater than the preset time consumption.
In this embodiment, the step of determining the graphics card computing capability of the screen-throwing terminal until the frame average time consumption is greater than the preset time consumption specifically includes: presetting a mapping relation between a filter level and display card computing capacity; and determining the display card computing capability of the screen-throwing 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 decoding capability and the display card computing capability of the screen projection terminal determine the image quality level, and when the decoding capability and the display card computing capability are determined, the image quality level which can be adapted to the screen projection terminal can be estimated.
The screen-throwing self-adaption method provided by the embodiment of the invention can automatically identify the performance of the screen-throwing terminal when the mobile terminal is connected with the screen-throwing terminal to throw the screen, adjust the performance to be suitable for the image quality code rate of the screen-throwing terminal and improve the user experience.
Fig. 4 is a schematic diagram of a mobile terminal according to the present invention, where the mobile terminal includes a connection module 401, a decoding module 402, a determining module 403, a drawing module 404, an adjusting module 405, a memory 406, and a processor 407, and all the above functional modules are stored in the memory 406 in the form of program codes, and are executed by the processor 407 to implement the steps or methods in the above embodiments.
The connection module 401 is used for establishing connection with the screen projection terminal.
Specifically, the mobile terminal may be an electronic device such as a mobile phone (mobile phone), an iPad, etc. The screen projection terminal can be terminal equipment such as a computer, a television and the like. When the mobile terminal establishes 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 configured to sequentially decode a plurality of MP4 files with different image quality levels on the screen terminal.
Specifically, the MP4 file is an H264 bitstream file, and the mobile terminal performs ffmepg decoding on the MP4 file of the H264 bitstream at the screen-projection terminal.
In this embodiment, the decoding module 402 decodes, in sequence, a plurality of MP4 files with different image quality levels on the screen terminal, including: pre-storing a plurality of MP4 files with different image quality levels; and sequentially decoding the MP4 files with the plurality of different image quality levels on the screen projection terminal according to the image quality levels. For example, the picture quality levels of the prestored MP4 files are set as follows: high, medium, low. When the mobile terminal establishes connection with the screen projection terminal, MP4 files with extremely high image quality levels are decoded firstly according to the order from high image quality levels to low image quality levels.
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 performs the step of stopping decoding when the decoding time of a certain MP4 file is less than a preset value, and specifically includes: pre-storing the minimum code rate time for smoothly playing each MP4 file; acquiring decoding average time of a preset number of image frames of a current decoded MP4 file; comparing the code rate minimum time with the decoding average time; and stopping decoding when the decoding average time is smaller than the code rate minimum time. Specifically, the decoding average time of 100 frame images of the MP4 file currently decoded is obtained, and since the minimum code rate time for smoothly playing each MP4 file is pre-stored, it is determined whether the CPU of the screen-throwing terminal can smoothly decode the level code stream by comparing the minimum code rate time with the decoding average time. If the decoding average time is longer than the code rate minimum time, the CPU of the screen throwing terminal cannot decode the code stream of the level, the next MP4 file of a lower level needs to be decoded, and the steps are repeated until the MP4 file with the decoding average time smaller than the code rate minimum time is decoded, namely, when the decoding average time is longer than the code rate minimum time, the MP4 file of the lower level is continuously decoded.
The determining module 403 is configured to determine a decoding capability of the screen-projection terminal according to the picture quality level of the certain MP4 file.
Specifically, MP4 with different image quality levels correspond to decoding capabilities with different levels, and when the screen projection terminal determines the highest-level MP4 file that can be decoded, the decoding capability of the screen projection terminal can be determined.
The drawing module 404 draws the decoded image frame of the certain MP4 file.
In the present embodiment, the frame image is drawn using OpenGL.
The determining module 403 is further configured to count drawing time consumption, and determine a display card computing capability of the screen-projection terminal according to the time consumption.
In this embodiment, the step of determining module 403 counts drawing time consumption, and determines the display card computing capability of the screen-projection terminal according to the time consumption specifically includes: performing filter processing on the frame image; counting average time consumption of a preset number of frames when the filter is started; comparing the average time consumption of the frames with preset time consumption; and determining the display card computing capability of the screen-throwing terminal according to the comparison result.
In particular, the original frame image looks monotonous with respect to image quality, and is particularly not friendly to game scenes and the like. Therefore, the data of the frame image needs to be processed by a corresponding filter, and the filter generally has the image quality enhancement compared with the saturation level and the like, but the processing of the image by the filter consumes GPU, so that the performance of the GPU, namely the computing capability of a display card of a screen projection terminal, needs to be tested. In one embodiment of the invention, the average time consumption of 100 frames when the filter is opened is counted, the preset time consumption is a pre-tested threshold value, the two values are compared, and whether the filter with higher level is opened 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 average time consumption of the frames is smaller than the preset time consumption, starting a filter at a higher level; and determining the display card computing capability of the screen-throwing terminal until the average frame time consumption is greater than the preset time consumption.
In this embodiment, the step of determining the graphics card computing capability of the screen-throwing terminal until the frame average time consumption is greater than the preset time consumption specifically includes: presetting a mapping relation between a filter level and display card computing capacity; and determining the display card computing capability of the screen-throwing terminal according to the frame average time consumption and the mapping relation.
The adjusting module 405 is configured to adjust an image quality level adapted to the screen projection terminal according to the decoding capability and the graphics card computing capability.
Specifically, the decoding capability and the display card computing capability of the screen projection terminal determine the image quality level, and when the decoding capability and the display card computing capability are determined, the image quality level which can be adapted to the screen projection terminal can be estimated.
The mobile terminal provided by the embodiment of the invention can automatically identify the performance of the screen throwing terminal when the mobile terminal is connected with the screen throwing terminal to throw the screen, adjust the performance to be suitable for the image quality code rate of the screen throwing terminal and improve the user experience.
Fig. 5 is a schematic diagram of the composition structure of the mobile terminal according to the present invention, as shown in fig. 5, where the terminal at least includes: memory 501, communication bus 502, and processor 503, wherein:
the memory 501 is configured to store a screen-throwing 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-drop adaptive program stored in the memory, so as 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-drop adaptive program which when executed by a processor implements the steps as described above.
It should be noted that the description of the terminal embodiment above is similar to the description of the method embodiment above, and has similar advantageous effects as the method embodiment. For technical details not disclosed in the terminal embodiments of the present invention, please refer 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 above-mentioned screen-projection adaptive method is implemented in the form of a software function module, and is sold or used as a separate product, the screen-projection adaptive 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 embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computing device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A screen-throwing self-adaption method is applied to a mobile terminal, and comprises the following steps:
establishing connection with a screen throwing terminal;
sequentially decoding a plurality of MP4 files with different image quality levels on the screen projection terminal;
stopping decoding when the decoding time of a certain MP4 file is smaller than a preset value;
determining the decoding capability of the screen projection terminal according to the picture quality level of the MP4 file;
drawing the decoded image frame of the MP4 file;
counting the drawing time consumption, and determining the display card computing capacity of the screen-throwing 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 self-adaptation method according to claim 1, wherein the step of sequentially decoding a plurality of MP4 files with different image quality levels on the screen terminal comprises the following steps:
pre-storing a plurality of MP4 files with different image quality levels;
and sequentially decoding the MP4 files with the plurality of different image quality levels on the screen projection terminal according to the image quality levels.
3. The screen projection self-adaptation method according to claim 1, wherein the step of stopping decoding when the decoding time of a certain MP4 file is smaller than a preset value comprises the following steps:
pre-storing the minimum code rate time for smoothly playing each MP4 file;
acquiring decoding average time of a preset number of image frames of a current decoded MP4 file;
comparing the code rate minimum time with the decoding average time;
and stopping decoding when the decoding average time is smaller than the code rate minimum time.
4. The screen-shot adaptation method according to claim 3, wherein after the step of stopping decoding when the decoding average time is smaller than the decoding average time, further comprising:
and when the decoding average time is greater than the minimum code rate time, continuing to decode the MP4 file at the low level.
5. The screen projection self-adaption method according to claim 1, wherein the step of counting and drawing time consumption and determining the display card computing capability of the screen projection terminal according to the time consumption comprises the following steps:
performing filter processing on the image frame;
counting average time consumption of a preset number of frames when the filter is started;
comparing the average time consumption of the frames with preset time consumption;
and determining the display card computing capability of the screen-throwing terminal according to the comparison result.
6. The method of screen projection self-adaptation 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 average time consumption of the frames is smaller than the preset time consumption, starting a filter at a higher level;
and determining the display card computing capability of the screen-throwing terminal until the average frame time consumption is greater than the preset time consumption.
7. The method of screen projection adaptation according to claim 6, wherein the step of determining the graphics card computing capability of the screen projection terminal until the frame average time is greater than the preset time consumption specifically comprises:
presetting a mapping relation between a filter level and display card computing capacity;
and determining the display card computing capability of the screen-throwing terminal according to the frame average time consumption and the mapping relation.
8. The screen-shot adaptation method of claim 1, wherein the image frames are rendered using OpenGL.
9. A mobile terminal, the mobile terminal comprising at least: memory, communication bus, and processor, wherein:
the memory is used for storing a screen throwing 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-shot adaptation program stored in the memory, so as to implement the steps of the screen-shot adaptation method according to claims 1 to 8.
10. A readable storage medium having stored thereon a screen-drop adaptation program which, when executed by a processor, implements the steps of the screen-drop 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 CN112866804A (en) 2021-05-28
CN112866804B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113316013B (en) * 2021-05-31 2022-04-26 烽火通信科技股份有限公司 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

Also Published As

Publication number Publication date
CN112866804A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN110784898B (en) Network switching method, mobile terminal and computer readable storage medium
CN110175062B (en) Screen refreshing frame rate method of mobile terminal, mobile terminal and storage medium
CN111708503B (en) Screen projection control method, device and computer readable storage medium
CN109529343B (en) Game parameter automatic adjustment method and device, mobile terminal and readable storage medium
CN112822538A (en) Screen projection display method, screen projection device, terminal and storage medium
CN112637410B (en) Method, terminal and storage medium for displaying message notification
CN112399215A (en) Screen projection parameter regulation and control method and device and computer readable storage medium
CN112866804B (en) Screen projection self-adaption method, mobile terminal and readable storage medium
CN107682541B (en) Audio control method for screen projection, mobile terminal and storage medium
CN109889651B (en) Notification message processing method, terminal and computer readable storage medium
CN109711830B (en) Quick display method and device for two-dimension code payment, mobile terminal and storage medium
CN112437472B (en) Network switching method, equipment and computer readable storage medium
CN108536383B (en) Game control method, game control equipment and computer readable storage medium
CN111970738B (en) Network switching control method, device and computer readable storage medium
CN112689191B (en) Screen projection control method, terminal and computer readable storage medium
CN112102780B (en) Display frame rate regulation and control method, device and computer readable storage medium
CN109889660B (en) Temporary information recording method, storage medium and mobile terminal
CN109561221B (en) Call control method, device and computer readable storage medium
CN109151201B (en) Anti-addiction method, mobile terminal and computer storage medium
CN109388947B (en) Background management method, device and computer readable storage medium
CN108897451B (en) Main and auxiliary display screen identification method, mobile terminal and computer readable storage medium
CN108897417B (en) Working mode adjusting method, mobile terminal and computer readable storage medium
CN108805559B (en) Two-dimensional code pushing method, mobile terminal and computer readable storage medium
CN111970668B (en) Bluetooth audio control method, device and computer readable storage medium
CN114307136A (en) Game screen-throwing power consumption control method and device 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