CN116033157B - Screen projection method and electronic equipment - Google Patents
Screen projection method and electronic equipment Download PDFInfo
- Publication number
- CN116033157B CN116033157B CN202210889836.6A CN202210889836A CN116033157B CN 116033157 B CN116033157 B CN 116033157B CN 202210889836 A CN202210889836 A CN 202210889836A CN 116033157 B CN116033157 B CN 116033157B
- Authority
- CN
- China
- Prior art keywords
- electronic device
- screen
- resolution
- pixels
- display
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 98
- 230000015654 memory Effects 0.000 claims description 31
- 238000004590 computer program Methods 0.000 claims description 8
- 238000012216 screening Methods 0.000 claims 2
- 230000000694 effects Effects 0.000 abstract description 18
- 230000008569 process Effects 0.000 description 34
- 230000006870 function Effects 0.000 description 31
- 239000010410 layer Substances 0.000 description 30
- 238000004891 communication Methods 0.000 description 25
- 238000012545 processing Methods 0.000 description 20
- 238000010586 diagram Methods 0.000 description 18
- 230000005540 biological transmission Effects 0.000 description 16
- 238000005266 casting Methods 0.000 description 14
- 230000003993 interaction Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 229920001621 AMOLED Polymers 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 239000012792 core layer Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1454—Digital 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
- H04M1/724092—Interfacing with an external cover providing additional functionalities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
- H04M1/72412—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The embodiment of the application provides a screen projection method and electronic equipment, wherein the method is executed by first electronic equipment and comprises the following steps: acquiring target resolution, wherein the target resolution is the resolution adopted when the first electronic equipment performs screen projection to the second electronic equipment and the image data to be projected is coded, and the target resolution is determined according to the display resolution of the first electronic equipment and the display resolution of the second electronic equipment; coding image data of a screen to be projected by adopting a target resolution to obtain coded data; the encoded data is transmitted to the second electronic device. The method can improve the screen throwing effect when the first electronic equipment throws the screen to the second electronic equipment.
Description
The present application claims priority from the national intellectual property agency, application number 202210598752.7, chinese patent application entitled "screen projection method and electronic device," filed 30 months 2022, the entire contents of which are incorporated herein by reference.
Technical Field
The application relates to the technical field of screen projection, in particular to a screen projection method and electronic equipment.
Background
Currently, more electronic devices support a wireless screen-casting technology, that is, a display interface of an electronic device a is screen-cast and displayed on a screen of another electronic device B, and a user can watch display content through the electronic device B. For example, the mobile phone may throw the display interface onto a tablet computer for display.
In the process of screen projection from a mobile phone to a tablet computer, the mobile phone is usually required to encode screen projection data according to screen projection resolution, then the encoded data is sent to the tablet computer, so that the tablet computer decodes the encoded data, and then a screen projection interface is displayed.
However, as the types of mobile phones and tablet computers are more and more, the applicable resolutions are different, so that a proper screen-throwing resolution needs to be negotiated in the screen-throwing process to improve the screen-throwing effect.
Disclosure of Invention
The application provides a screen projection method and electronic equipment, which can improve the screen projection effect between the electronic equipment.
In a first aspect, the present application provides a screen projection method, which is executed by a first electronic device, including: acquiring target resolution, wherein the target resolution is the resolution adopted when the first electronic equipment performs screen projection to the second electronic equipment and the image data to be projected is coded, and the target resolution is determined according to the display resolution of the first electronic equipment and the display resolution of the second electronic equipment; coding image data of a screen to be projected by adopting a target resolution to obtain coded data; the encoded data is transmitted to the second electronic device.
The first electronic device can be a mobile phone, the second electronic device can be a tablet computer, in the process of screen projection of the mobile phone to the tablet computer, screen projection resolution (namely target resolution) is needed to be adopted to encode screen projection data, and the target resolution is determined according to the display resolution of the mobile phone and the display resolution of the tablet computer. Meanwhile, the target resolution is usually smaller than the display resolution of the mobile phone, so that the mobile phone can reduce the performance waste when in coding at the mobile phone side by coding according to the target resolution. In some implementations, the target resolution may also be referred to as an optimal screen throw resolution.
It may be appreciated that, in one implementation manner, the target resolution may be determined by the first electronic device according to the display resolution of the first electronic device and the display resolution of the second electronic device, where the first electronic device needs to obtain the display resolution of the second electronic device from the second electronic device, and after determining the target resolution, the first electronic device may directly use the target resolution to perform encoding. In another implementation manner, the target resolution may be determined by the second electronic device according to the display resolution of the first electronic device and the display resolution of the second electronic device, where the second electronic device needs to obtain the display resolution of the first electronic device from the first electronic device, and after determining the target resolution, needs to return the target resolution to the first electronic device, so that the first electronic device uses the target resolution to perform encoding.
In the implementation manner, the first electronic device encodes the data to be projected according to the target resolution determined by the display resolution of the first electronic device and the display resolution of the second electronic device, and the target resolution can enable the obtained encoded data to be adapted to the second electronic device to a greater extent, so that the projection effect is improved; and the target resolution is usually smaller than the display resolution of the first electronic device, so that the first electronic device does not need to de-encode according to the display resolution of the first electronic device, and the encoding performance waste is reduced.
With reference to the first aspect, in some implementations of the first aspect, in a case where the target resolution may be determined by the first electronic device according to a display resolution of the first electronic device and a display resolution of the second electronic device, the acquiring the target resolution includes: acquiring the display resolution of the first electronic device and the display resolution of the second electronic device; and determining the target resolution according to the display resolution of the first electronic device and the display resolution of the second electronic device.
In this implementation, the display resolution of the first electronic device may be high×wide (i.e., the number of vertical pixels×the number of horizontal pixels), and the display resolution of the second electronic device may also be high×wide (i.e., the number of vertical pixels×the number of horizontal pixels). When the screen-throwing window is displayed on the second electronic equipment, the maximum value of the height of the screen-throwing window is the height of the second electronic equipment, and when the ratio of the height to the width of the screen-throwing window is equal to or similar to the ratio of the height to the width of the first electronic equipment, the display effect of the screen-throwing interface displayed in the screen-throwing window is closest to that of the source interface. Therefore, the first electronic device can determine the width of the screen-throwing window according to the height and the width of the first electronic device and the height of the screen-throwing window, and take the height multiplied by the width of the screen-throwing window as the target resolution.
In some implementations, determining the target resolution according to the display resolution of the first electronic device and the display resolution of the second electronic device includes: determining the number of vertical pixels and the number of horizontal pixels of a first area on the second electronic device according to the display resolution of the first electronic device and the display resolution of the second electronic device, wherein the first area comprises a screen throwing area; the target resolution is determined based on the display resolution of the first electronic device, the number of vertical pixels and the number of horizontal pixels of the first area.
The first area may be located in the above-mentioned screen-throwing window, and after determining the size of the first area (i.e., the number of vertical pixels and the number of horizontal pixels) according to the display resolution of the first electronic device and the display resolution of the second electronic device, in order to make the screen-throwing effect better, the first electronic device may determine the target resolution according to the size of the first area and the display resolution of the first electronic device.
In one implementation, the display screen of the second electronic device generally includes a status bar, and the screen-throwing area does not generally occupy an area of the status bar, so that the area of the status bar may be excluded when the size of the first area is determined.
The display resolution of the second electronic device may include a first number of vertical pixels and a first number of horizontal pixels of the display screen of the second electronic device, and the display resolution of the first electronic device may include a second number of vertical pixels and a second number of horizontal pixels of the display screen of the first electronic device; determining the number of vertical pixels and the number of horizontal pixels of the first area on the second electronic device based on the display resolution of the first electronic device and the display resolution of the second electronic device, comprising: acquiring a third vertical pixel number from the second electronic equipment, wherein the third vertical pixel number comprises the vertical pixel number corresponding to the status bar of the second electronic equipment; and determining the number of vertical pixels and the number of horizontal pixels of the first area according to the display resolution of the first electronic device, the first number of vertical pixels and the third number of vertical pixels.
Wherein determining the number of vertical pixels and the number of horizontal pixels of the first region according to the display resolution of the first electronic device, the first number of vertical pixels, and the third number of vertical pixels, comprises: determining a difference value between the first vertical pixel number and the third vertical pixel number as the vertical pixel number of the first area; the product of the number of vertical pixels of the first region and a first ratio, which is the ratio between the number of second horizontal pixels and the number of second vertical pixels, is determined as the number of horizontal pixels of the first region.
That is, the height of the status bar is subtracted from the height of the second electronic device to obtain the height of the first region. And then determining the width of the first area according to the ratio of the height to the width of the first electronic equipment and the height of the first area. The obtained first area can not occupy the area of the status bar, and the screen throwing effect is further improved.
Further, in the case where the screen-throwing area is located in the screen-throwing window, since the upper end and the lower end of the screen-throwing window are provided with the navigation bars, the area of the navigation bars will not normally display the screen-throwing interface, and therefore, when the height of the first area is determined, the area of the navigation bars can be eliminated. That is, the third number of vertical pixels further includes a number of vertical pixels corresponding to a navigation area of the projection window.
With reference to the first aspect, in some implementations of the first aspect, determining the target resolution according to the display resolution of the first electronic device, the number of vertical pixels of the first area, and the number of horizontal pixels includes: and determining the target resolution according to the greatest common divisor of the second vertical pixel number and the second horizontal pixel number, the vertical pixel number and the horizontal pixel number of the first area.
In one implementation manner, determining the target resolution according to the greatest common divisor of the second vertical pixel number and the second horizontal pixel number, the vertical pixel number and the horizontal pixel number of the first area includes: determining a quotient of the second vertical pixel number and the greatest common divisor as a first factor, and determining a quotient of the second horizontal pixel number and the greatest common divisor as a second factor; the target resolution is determined based on the first factor, the second factor, and the number of vertical pixels and the number of horizontal pixels of the first region.
In one implementation, determining the target resolution according to the first factor, the second factor, and the number of vertical pixels and the number of horizontal pixels of the first region includes: performing first operation on the first factors to obtain a first result, and performing second operation on the second factors to obtain a second result, wherein the first result is obtained by accumulating the first factors n times, or multiplying the first factors by a coefficient n, the second result is obtained by accumulating the second factors n times, or multiplying the second factors by the coefficient n, and n is a positive integer; and if the number of pixels corresponding to the first result is greater than or equal to the number of vertical pixels of the first area, or the number of pixels corresponding to the second result is greater than or equal to the number of horizontal pixels of the first area, taking the number of pixels corresponding to the first result and the number of pixels corresponding to the second result as target resolution.
The first electronic device may determine a greatest common divisor of the second vertical pixel number and the second horizontal pixel number, and divide the greatest common divisor by the second vertical pixel number to obtain a first factor, and divide the greatest common divisor by the second horizontal pixel number to obtain a second factor.
Next, the first factor and the second factor are accumulated the same number of times, respectively, or the products of the same coefficients are performed, respectively. When the number of pixels corresponding to the first result obtained according to the first factor is greater than or equal to the number of vertical pixels of the first area, that is, the number of pixels corresponding to the first result at this time is exactly adapted to the first area, the number of pixels corresponding to the first result at this time is taken as the number of vertical pixels of the target resolution, and the number of pixels corresponding to the second result obtained through the same operation and corresponding to the first result is taken as the number of horizontal pixels of the target resolution. Therefore, the obtained target resolution is better resolution in encoding, and the obtained encoded data can be adapted to the screen projection window of the second electronic equipment to a greater extent.
In one implementation manner, in a case where the target resolution is determined by the second electronic device according to the display resolution of the first electronic device and the display resolution of the second electronic device, the second electronic device may execute the following technical solution of the second aspect.
In a second aspect, the present application provides a screen projection method, which is executed by a second electronic device, including: the method comprises the steps that target resolution is sent to first electronic equipment, the target resolution is the resolution adopted when image data to be projected is encoded in the process that the first electronic equipment projects a screen to second electronic equipment, and the target resolution is determined by the second electronic equipment according to the display resolution of the first electronic equipment and the display resolution of the second electronic equipment; and receiving coded data sent by the first electronic equipment, and displaying an image corresponding to the coded data, wherein the coded data is obtained by coding the image data to be projected on the screen by the first electronic equipment by adopting the target resolution.
With reference to the second aspect, in some implementations of the second aspect, the method further includes: and acquiring the display resolution of the first electronic equipment, and determining the target resolution according to the display resolution of the first electronic equipment and the display resolution of the second electronic equipment.
In one implementation manner, determining the target resolution according to the display resolution of the first electronic device and the display resolution of the second electronic device includes: determining the number of vertical pixels and the number of horizontal pixels of a first area on the second electronic device according to the display resolution of the first electronic device and the display resolution of the second electronic device, wherein the first area comprises a screen throwing area; the target resolution is determined based on the display resolution of the first electronic device, the number of vertical pixels and the number of horizontal pixels of the first area.
In one implementation, the status bar is included on a display screen of the second electronic device, the display resolution of the second electronic device includes a first number of vertical pixels and a first number of horizontal pixels of the display screen of the second electronic device, and determining the number of vertical pixels and the number of horizontal pixels of the first area on the second electronic device based on the display resolution of the first electronic device and the display resolution of the second electronic device includes: and determining the vertical pixel number and the horizontal pixel number of the first area according to the display resolution of the first electronic device, the first vertical pixel number and the third vertical pixel number, wherein the third vertical pixel number comprises the vertical pixel number corresponding to the status bar of the second electronic device.
In one implementation, the display resolution of the first electronic device includes a second number of vertical pixels and a second number of horizontal pixels of a display screen of the first electronic device; the determining the number of vertical pixels and the number of horizontal pixels of the first area according to the display resolution of the first electronic device, the first number of vertical pixels and the third number of vertical pixels includes: determining a difference value between the first vertical pixel number and the third vertical pixel number as the vertical pixel number of the first area; the product of the number of vertical pixels of the first region and a first ratio, which is the ratio between the number of second horizontal pixels and the number of second vertical pixels, is determined as the number of horizontal pixels of the first region.
In one implementation, the screen-drop region is located within a screen-drop window displayed on the second electronic device, and the third number of vertical pixels further includes a number of vertical pixels corresponding to a navigation region of the screen-drop window.
In one implementation manner, determining the target resolution according to the display resolution of the first electronic device, the number of vertical pixels and the number of horizontal pixels of the first area includes: and determining the target resolution according to the greatest common divisor of the second vertical pixel number and the second horizontal pixel number, the vertical pixel number and the horizontal pixel number of the first area.
In one implementation, determining the target resolution based on a greatest common divisor of the second number of vertical pixels and the second number of horizontal pixels, the number of vertical pixels and the number of horizontal pixels of the first region, includes: determining a quotient of the second vertical pixel number and the greatest common divisor as a first factor, and determining a quotient of the second horizontal pixel number and the greatest common divisor as a second factor; the target resolution is determined based on the first factor, the second factor, and the number of vertical pixels and the number of horizontal pixels of the first region.
In one implementation, determining the target resolution according to the first factor, the second factor, and the number of vertical pixels and the number of horizontal pixels of the first region includes: performing first operation on the first factors to obtain a first result, and performing second operation on the second factors to obtain a second result, wherein the first result is obtained by accumulating the first factors n times, or multiplying the first factors by a coefficient n, the second result is obtained by accumulating the second factors n times, or multiplying the second factors by the coefficient n, and n is a positive integer; and if the number of pixels corresponding to the first result is greater than or equal to the number of vertical pixels of the first area, or the number of pixels corresponding to the second result is greater than or equal to the number of horizontal pixels of the first area, taking the number of pixels corresponding to the first result and the number of pixels corresponding to the second result as target resolution.
For implementation principles and technical effects of the second aspect and implementation manners of the second aspect, refer to the description of the first aspect, and are not repeated herein.
In a third aspect, the present application provides a screen projection system, including a first electronic device and a second electronic device, where the first electronic device executes any one of the methods in the first aspect and the second electronic device executes any one of the methods in the second aspect.
In a fourth aspect, the present application provides an apparatus, which is included in an electronic device, and has a function of implementing the electronic device behavior in the first aspect and the possible implementation manner of the first aspect, or implementing the electronic device behavior in the second aspect and the possible implementation manner of the second aspect. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a receiving module or unit, a processing module or unit, etc.
In a fifth aspect, the present application provides an electronic device, including: a processor, a memory, and an interface; the processor, the memory and the interface cooperate with each other to enable the electronic device to execute any one of the methods in the technical solutions of the first aspect, or execute any one of the methods in the technical solutions of the second aspect.
In a sixth aspect, the present application provides a chip comprising a processor. The processor is configured to read and execute a computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof, or to perform the method of the second aspect and any possible implementation thereof.
Optionally, the chip further comprises a memory, and the memory is connected with the processor through a circuit or a wire.
Further optionally, the chip further comprises a communication interface.
In a seventh aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, which when executed by a processor causes the processor to perform any one of the methods of the first aspect or to perform any one of the methods of the second aspect.
In an eighth aspect, the present application provides a computer program product comprising: computer program code which, when run on an electronic device, causes the electronic device to perform any one of the methods of the first aspect or to perform any one of the methods of the second aspect.
Drawings
Fig. 1 is a schematic diagram of a comparative display of an example of a mobile phone screen to a tablet computer according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an example of an electronic device according to an embodiment of the present application;
FIG. 3 is a block diagram of a software architecture of an example electronic device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a desktop interface of a mobile phone according to an embodiment of the present application;
fig. 5 is a schematic diagram of an opening interface of a mobile phone assistant APP according to an embodiment of the present application;
fig. 6 (a) is a schematic diagram of a connection interface of a mobile phone assistant APP according to an embodiment of the present application;
fig. 6 (b) is a schematic diagram of a connection interface of a tablet computer according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an example of a wireless screen-throwing interface of a mobile phone according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a system architecture of a mobile phone and a tablet computer according to an embodiment of the present application;
fig. 9 is a schematic diagram of a process of performing data interaction between each module in a mobile phone and each module in a tablet computer in a process of transmitting data between the mobile phone and the tablet computer according to an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating resolution indication of a mobile phone and a tablet computer according to an embodiment of the present application;
Fig. 11 is a schematic diagram of a process of performing data interaction between each module in a mobile phone and each module in a tablet computer in a process of establishing connection between the mobile phone and the tablet computer according to an embodiment of the present application;
FIG. 12 is a flowchart of an exemplary screen projection method according to an embodiment of the present application;
fig. 13 is a schematic diagram of a disconnection interface of a mobile phone assistant APP according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
The terms "first," "second," "third," and the like, are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", or a third "may explicitly or implicitly include one or more such feature.
In the embodiment of the application, the "screen projection" refers to transmitting the data of the display interface on one electronic device to another electronic device, so that the other electronic device displays the same display interface. For ease of understanding, the above-described "another electronic apparatus" is referred to as a projection apparatus. The embodiment of the application can realize the processes of casting the screen of the mobile phone to the tablet personal computer, casting the screen of the tablet personal computer to the personal computer (personal computer, PC), casting the screen of the mobile phone to the PC and the like, and the electronic equipment is taken as the mobile phone and the screen casting equipment is taken as the tablet personal computer for illustration.
Currently, in the process of screen projection from a mobile phone to a tablet computer, the mobile phone is generally required to encode screen projection data according to screen projection resolution, then transmit the encoded data to the tablet computer, and the tablet computer can display a corresponding interface after decoding the encoded data. In some homologous screen projection scenes, for example, mirror screen projection scenes, as shown in fig. 1, the mobile phone projects a display interface on a partial area of the tablet computer (may be referred to as a screen projection window), where the display interface in the screen projection window is the same as the display interface of the mobile phone. In this scenario, before the mobile phone encodes the data to be projected, the mobile phone typically first negotiates the resolution of projection with the tablet pc, and then encodes the data to be projected according to the resolution of projection. In the conventional technology, the screen-projection resolution is usually negotiated according to the resolution of the mobile phone, for example, the resolution of the display screen of the mobile phone is selected as the screen-projection resolution, and then two situations may occur: in the case that the resolution of the mobile phone display screen is larger than that of the screen-throwing window, after the tablet computer decodes the coded data, if an image with larger resolution is to be displayed in a window with smaller resolution, the image needs to be compressed, and the image distortion can be caused; in addition, the mobile phone does not need to encode the image with larger resolution, but actually encodes the image with larger resolution, which also causes the waste of the encoding performance of the mobile phone side. Another is that when the resolution of the mobile phone display screen is smaller than the resolution of the above-mentioned screen-throwing window, after the tablet computer decodes the encoded data, if an image with a smaller resolution is displayed in a window with a larger resolution, the image may be stretched, that is, both cases may affect the screen-throwing effect. More serious, if the resolution of the encoded data is too large and the decoding performance of the tablet computer is low, decoding failure at the tablet computer side may be caused, resulting in a screen dropping failure.
In view of the above, the embodiment of the application provides a screen projection method, in which a tablet computer can calculate the resolution supported by a screen projection window and the screen projection resolution corresponding to the screen projection data to be projected when encoding according to the resolution of the tablet computer and the resolution of a mobile phone, so that the tablet computer can calculate the screen projection resolution suitable for the current scene according to different types of tablet computers or mobile phones, thereby improving the screen projection effect and the screen projection success rate. It should be noted that, the screen projection method provided by the embodiment of the application can be applied to electronic devices with screen projection functions, such as tablet computers, PCs, ultra-mobile personal computer (UMPC), vehicle-mounted devices, netbooks, personal digital assistants (personal digital assistant, PDA) and the like, and the embodiment of the application does not limit the specific types of the electronic devices.
Fig. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application. Taking the example of the electronic device 100 being a mobile phone, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
It should be understood that the structure of the electronic device 100 is not particularly limited by the embodiments of the present application, except for the various components or modules listed in fig. 2. In other embodiments of the application, electronic device 100 may also include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 3 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present application. Taking the example of the electronic device 100 being a mobile phone, the layered architecture divides the software into several layers, each of which has a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively. The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, phone assistants, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android runtimes include core libraries and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media library (media library), three-dimensional graphics processing library (e.g., openGL ES), 2D graphics engine (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises display drive, camera drive, audio drive, sensor drive and the like.
It should be understood that the software architecture of the electronic device 100 is not particularly limited in the embodiments of the present application, except for the various layers and modules included in the layers listed in fig. 3. In other embodiments of the application, electronic device 100 may also include more or fewer layers than shown, or some layers may be combined, some layers may be split, or a different arrangement of modules.
First, describing a process of screen-casting a mobile phone to a tablet computer, in one implementation manner, an Application (APP) for a user to perform a screen-casting operation may be installed on the mobile phone, for example, the mobile phone APP may be a mobile phone assistant APP, and as shown in fig. 4, the mobile phone assistant APP may be displayed on a desktop of the mobile phone in a form of a desktop icon. The user can start the mobile phone assistant APP by clicking the desktop icon, and the starting interface of the mobile phone assistant APP can be seen in fig. 4. In the interface shown in fig. 4, the starting interface of the mobile phone assistant APP includes an "immediate connection" control and a description of a screen-throwing mode supported by the mobile phone, for example, a mirror mode is currently supported by the mobile phone. On the interface, after clicking the "connect immediately" control, the user jumps to the display interface shown in fig. 5, and the mobile phone starts searching for available screen-throwing devices nearby, and these available screen-throwing devices can perform short-distance communication with the mobile phone, such as bluetooth communication (it should be noted that at this time, both the mobile phone and the searched available screen-throwing device have turned on the bluetooth switch). Assuming that the currently available screen-casting devices have device 1 and device 2, the mobile phone may display basic information (e.g., device names) of device 1 and device 2 in the available device list shown in fig. 5. Then, the user may click to select one device in the available device list (assuming that device 2, i.e., tablet computer, is selected), and the connection interface shown in fig. 6 (a) is displayed on the mobile phone; at the same time, the handset sends a connection request to the device 2, and the device 2 displays a confirmation interface as shown in fig. 6 (b). After clicking the "agree" control on the interface shown in the diagram (b) in fig. 6, the user can complete the screen-throwing connection process of the mobile phone and the tablet computer, and then the mobile phone can send the data of the current display interface to the tablet computer, and the current display interface of the mobile phone is displayed on the tablet computer. When the mobile phone and the tablet personal computer are connected in a screen throwing way, the interface displayed by the mobile phone at present is still the interface of the mobile phone assistant APP, and then the interface is displayed on the tablet personal computer; after the video playing interface is opened on the mobile phone, the video playing interface is displayed on the tablet personal computer. For example, the schematic effect of the mobile phone screen-casting to the tablet pc can be shown in fig. 1.
It can be understood that an APP for the user to perform the screen-throwing operation can also be installed in the tablet computer, for example, the tablet computer APP, through which the user can throw the tablet computer to the electronic device such as the PC, and specific operation steps are similar to those of the mobile phone screen throwing, and will not be described herein.
In another implementation manner, the mobile phone may have a wireless screen-throwing function, for example, as shown in fig. 7, a user may click on a "wireless screen-throwing" control through a pull-down system menu of the mobile phone, and the mobile phone starts searching for available screen-throwing devices nearby in response to a clicking operation of the user, and displays a list of available devices in a blank area of a screen-throwing interface of the mobile phone. When the available screen-casting device is searched, the mobile phone can display the basic information (such as the device name) of the device 1 and the device 2 in the available device list. Then, the user clicks and selects one device (assuming that the device 2 and the tablet computer are selected) in the available device list, the mobile phone sends a connection request to the device 2, and after the user confirms connection on the tablet computer, the screen-throwing connection process of the mobile phone and the tablet computer can be completed.
Based on the above process of executing the screen projection operation by the user, the screen projection method provided by the embodiment of the application is described below with reference to the system architecture of the mobile phone and the tablet computer and the data interaction process between the modules in the system architecture. Fig. 8 is a schematic diagram of a system architecture of a mobile phone and a tablet computer, and fig. 9 is a schematic diagram of a process of performing data interaction between each module in the mobile phone and each module in the tablet computer in the screen projection method provided by the embodiment of the application.
As shown in fig. 8, the mobile phone at least includes: the mobile phone assistant APP of the application program layer comprises a first screen projection module, a first transmission module and a first basic capability module of the capability layer, a multimedia framework of the framework layer, a first Bluetooth driver, a first Wi-Fi driver and a first USB driver of the kernel layer, and a CPU, a graphics card (GPU), an encoder, a first Bluetooth chip and a first Wi-Fi chip of the hardware layer. The tablet computer at least comprises: the tablet personal assistant APP of the application program layer, a second transmission module, a second screen projection module and a second basic capability module of the capability layer, a second Bluetooth driver, a second Wi-Fi driver, a second USB driver and a display driver of the kernel layer, a Graphics Processing Unit (GPU) of the hardware layer, a decoder, a second Bluetooth chip, a second Wi-Fi chip and a display screen.
Wherein the mobile phone assistant APP and the tablet assistant APP may be used to interact with a user, on which the user may perform various operations. Optionally, the mobile phone assistant APP and the tablet computer APP may further include a service management module and a service setting module, which are configured to manage and set the APP. The first screen projection module of the mobile phone and the second screen projection module of the tablet computer can negotiate the screen projection resolution. The first screen projection module of the mobile phone can also comprise a screen capturing module, a coding logic module and a virtualization service module; the screen capturing module can be used for capturing image data of a display interface on the mobile phone, the coding logic module can call the coder to code the image data, and the first transmission module can be used for sending the coded data to the second transmission module of the tablet personal computer. The first basic capability module may provide corresponding capabilities for the first screen projection module in implementing various functions. The first Bluetooth driver can call the capability of the first Bluetooth chip, and the first Wi-Fi driver can call the capability of the first Wi-Fi chip, so that the mobile phone and the tablet computer are connected in a Bluetooth mode or a Wi-Fi mode. The second screen projection module of the tablet computer can also comprise a decoding logic module, a display module and a virtualization service module; the decoding logic module can call the decoder to decode the received coded data, and the display module can call the display driver to display the decoded image data on the display screen; the virtualization service module can provide service instructions, such as instructing the tablet assistant APP to calculate an optimal screen-drop resolution. It should be noted that the functions of other modules on the tablet computer are similar to the functions of corresponding modules in the mobile phone, and are not described herein.
On the basis of the system architecture shown in fig. 8, as shown in fig. 9, a process of the screen projection method provided by the embodiment of the application may include:
s1, connection between the mobile phone and the tablet personal computer is established.
The process of establishing connection between the mobile phone and the tablet pc can be described in the following embodiment shown in fig. 11.
S2, the tablet personal assistant APP sends a message of successful connection establishment to the second screen projection module.
S3, the second screen projection module sends a first message to the tablet assistant APP.
In S2, the tablet assistant APP sends a message that the connection is established successfully to the second screen projection module, that is, feeds back to the second screen projection module that the tablet assistant APP has made data preparation, and can execute the next operation. Then the second screen shot module may send a first message to the tablet assistant APP instructing the tablet assistant APP to perform the next operation. Optionally, the tablet assistant APP may send a message that the connection is established successfully to the virtualization service module in the second screen-throwing module, and correspondingly, the virtualization service module sends the first message to the tablet assistant APP.
S4, the tablet personal assistant APP sends a second message to the second screen projection module, wherein the second message is used for requesting to acquire the resolution of the mobile phone display screen.
S5, the second screen projection module sends a second message to the first screen projection module of the mobile phone.
Alternatively, the messages sent between the modules in the handset may be inter-process communication (IPC) messages.
S6, the first screen projection module of the mobile phone acquires the resolution of the display screen of the mobile phone from the display card.
Optionally, the first screen projection module of the mobile phone may store the resolution of the display screen in a data file in advance, and then acquire the resolution of the display screen from the data file.
S7, the first screen projection module sends the resolution of the mobile phone display screen to the second screen projection module of the tablet personal computer.
S8, the second screen projection module sends the resolution of the mobile phone display screen to the tablet personal assistant APP.
S9, the flat assistant APP obtains the resolution of the display screen of the flat computer from the display card.
S10, the flat assistant APP calculates the optimal screen-throwing resolution according to the resolution of the mobile phone display screen and the resolution of the flat computer display screen.
It can be understood that the above-mentioned projection resolution may be the resolution of one frame of image, that is, the number of pixels of one frame of image.
In one implementation manner, according to the resolution of the mobile phone display screen and the resolution of the tablet computer display screen, the process of calculating the optimal screen-throwing resolution may be:
as shown in fig. 10, assume that the resolution of the mobile phone display screen is high×width=a×b, the resolution of the tablet computer display screen is high×width=c×d, and the height of the status bar on the display screen of the tablet computer is status height. Considering that a tablet computer generally does not occupy space of a status bar when displaying a screen-throwing window, the maximum height maxheight=c-status height of the screen-throwing window.
For the screen projection window, the upper end and the lower end of the screen projection window are provided with navigation areas, the height of the upper end navigation area is LabelLayout, the height of the lower end navigation area is BottomView, and when the screen projection window displays a screen projection interface, the maximum height of the screen projection area actually available in the screen projection window is equal to or less than maxHeight-LabelLayout-BottomView, wherein the space of the upper end navigation area and the lower end navigation area is not occupied generally.
Because the display interface of the screen-throwing window of the tablet computer is the same as the display interface of the mobile phone in the mirror image screen-throwing scene, in order to display the same display effect as the display interface of the mobile phone on the screen-throwing window, the aspect ratio of the actually available screen-throwing area in the screen-throwing window should be the same as or similar to the aspect ratio of the display screen of the mobile phone, namelyTherefore, the maximum width +.about.of the actually available screen throwing area can be calculated according to the resolution of the mobile phone display screen and the maximum height of the screen throwing area>Here, if the obtained winWidth is not an integer, it is usually rounded down.
On the basis of the obtained winHeight and winWidth, starting to calculate the optimal screen-throwing resolution:
firstly, obtaining the greatest common divisor of the resolution ratio height and width of a mobile phone display screen, namely the greatest common divisor X of A and B, and obtaining two factors according to the greatest common divisor X: maxfactor=a/X, minfactor=b/X.
Then, circularly accumulating the maxFactor to obtain a video height, namely, video height=maxFactor+maxFactor+ … … +maxFactor; the minFactor is circularly accumulated to obtain video width, i.e., video width=minfactor+minfactor+ … … +minfactor. Note that the number of times of the cyclic accumulation for maxFactor is the same as the number of times of the cyclic accumulation for minFactor.
In the accumulating process, in one possible manner, the obtained width may be used as a lower limit threshold, and when the accumulated video width is greater than the width, the width and the video height corresponding to the accumulated times at this time are used as the width and the height of the optimal screen-throwing resolution. In another implementation manner, the obtained winHeight may be used as a lower limit threshold, and when the obtained winHeight is accumulated to be greater than or equal to the winHeight, the width and height of the video height and the video width corresponding to the accumulated times at this time are used as the width and height of the optimal screen-throwing resolution. It can be understood that, because the optimal screen-throwing resolution obtained in the step is calculated based on the resolution of the display screen of the mobile phone and the resolution of the display screen of the tablet computer, the corresponding optimal screen-throwing resolution is different for different mobile phones and tablet computers, and the method can be well adapted to the mobile phones and tablet computers which are currently used. It can be further understood that the obtained optimal screen-throwing resolution is usually not greater than the resolution of the display screen of the mobile phone, so that when the mobile phone codes the data to be thrown, the optimal screen-throwing resolution is adopted to code the data, the coding data volume can be reduced, and the coding efficiency is improved, so that the transmission performance is improved.
For the above calculation process, it should be noted that, if the set lower threshold is too large, when encoding the screen-projection data, the resolution of the obtained encoded data may be too large, which exceeds the size of the actually available screen-projection area, which may result in poor screen-projection effect. If the lower limit threshold is set to be too small, when the screen data is to be coded, the resolution of the obtained coded data is too small, and the obtained coded data is insufficient to fill the practically available screen-throwing area, so that the phenomena of image stretching and blurring can be caused. Therefore, by adopting the calculation method provided by the embodiment of the application, the resolution of the encoded data can be adapted to the practically available screen projection area, and the display effect is improved.
Illustratively, for the above calculation process, the following is described with one example:
assuming that the resolution of the mobile phone display screen is a×b=2340×1080, the resolution of the tablet computer display screen is c×d=1600×2560, the height of the status bar on the tablet computer display screen is status height=60, the height of the upper end navigation area of the projection window is labelayout=60, and the height of the lower end navigation area is bottom view=40.
Then, a maxhight=c-status height=1600-60=1540 is calculated.
winHeight=maxHeight-LabelLayout-BottomView=1540-60-40=1440。
Rounding down with=664. I.e. the size of the actually available drop screen area is 1440 x 664.
Then find the greatest common divisor x=180 for a and B (i.e., 2340 and 1080), then maxfactor=a/x=13, minfactor=b/x=6.
Taking the width as the lower threshold, i.e., 664 as the lower threshold, the video width=minfactor+minfactor+ … … +minfactor=6+6+6+ … … +6, when the video width is accumulated to be greater than 664 for the first time, 112 times are accumulated, the video width=672, and the corresponding video height=maxfactor×112=13×112=1456.
That is, the obtained optimal screen resolution is 1456×672, and then the mobile phone encodes the data to be screen-projected by adopting the resolution.
S11, the flat assistant APP sends the optimal screen projection resolution to the second screen projection module.
S12, the second screen projection module sends the optimal screen projection resolution to the first screen projection module of the mobile phone.
Optionally, the second screen projection module may send the optimal screen projection resolution to the virtualized service module in the first screen projection module, and then the virtualized service module stores the optimal screen projection resolution.
S13, the first screen projection module sets encoder parameters according to the optimal screen projection resolution.
Optionally, in the case that the above-mentioned virtualization service module stores the optimal coding frame rate, the coding logic module in the first screen projection module may set the encoder parameters, and this process may be: the virtualization service module initializes the coding logic module, and sends the optimal screen-throwing resolution to the coding logic module, and the coding logic module sets the encoder parameters according to the optimal screen-throwing resolution. That is, by setting the encoder parameters, the encoder can be made to encode at the optimal screen projection resolution at the time of encoding.
When the mobile phone sets the parameters of the encoder, the tablet personal computer also needs to set the decoder, specifically:
s14, initializing a decoder by the second screen projection module.
Alternatively, the decoder may be initialized by a decode logic module in the second projection module.
The mobile phone can then acquire the image data of the current display interface for screen projection, and the process can include:
s15, the first screen projection module acquires image data.
Alternatively, the image data may be acquired by a screen capture module in the first projection module, e.g., the screen capture module acquires the image data from a graphics card (GPU) through an API interface.
The display card (GPU) can store an image queue, the image queue comprises image data to be displayed on a mobile phone display screen, and the image data can be sent to be displayed after the GPU draws and renders the data to be displayed on the mobile phone display screen.
S16, the first screen projection module calls an encoder, and the acquired image data is encoded according to the optimal screen projection resolution.
The first screen projection module can call the encoder through the video encoding capability in the first basic capability module to encode the image data. Optionally, the screen capturing module may send the image data to an encoding logic module in the first screen projection module, and then the encoding logic module invokes an encoder to encode the acquired image data.
S17, the first screen projection module sends the encoded image data to a second transmission module of the tablet personal computer through the first transmission module.
Because the mobile phone and the tablet computer in S1 have established a connection, the first transmission module may send the image data to the second transmission module of the tablet computer along a data channel (e.g., socket channel) corresponding to the connection.
S18, the second transmission module of the tablet personal computer sends the encoded image data to the second screen projection module.
S19, the second screen projection module calls a decoder to decode the image data.
The second screen projection module can call the decoder through the video decoding capability in the second basic capability module to decode the image data. Optionally, the second transmission module may send the encoded image data to a decoding logic module in the second projection module, and the decoding logic module invokes a decoder to decode the image data.
S20, the second screen projection module sends the decoded image data to a display driver, and then the display screen is used for displaying images.
Alternatively, the decoded image data may be sent to the display module by the decoding logic module, and then sent to the display driver by the display module. It will be appreciated that the tablet computer displays images within the determined drop window, such that an adapted size image is displayed within the adapted drop window.
After the screen is successfully projected, the second screen projection module can also send a message of the successful screen projection to the second transmission module, then the second transmission module sends the message to the first screen projection module of the mobile phone through the first transmission module of the mobile phone, and then the first screen projection module sends the message to the mobile phone assistant APP. Optionally, the mobile phone assistant APP can also display a message of successful screen projection to prompt the user that the screen projection is successful currently.
It should be noted that, the format of encoding by the encoder and the format of decoding by the decoder in the embodiment of the present application are not limited, so long as the encoding/decoding and displaying process can be implemented. For example, the NV12 format image data may be encoded into the H264 format image data, or may be encoded into another data format.
It should be noted that, because the above tablet computer is the optimal screen-throwing resolution calculated according to the resolution of the mobile phone, for a mobile phone with a changeable mobile phone screen state, for example, a folding screen mobile phone, the resolution of the mobile phone display screen in the folded state is different from the resolution of the mobile phone display screen in the unfolded state, so if the mobile phone detects that the screen state changes, the latest display screen resolution can be transmitted to the tablet computer, so that the tablet computer can calculate the optimal screen-throwing resolution again according to the latest display screen resolution. Therefore, the tablet personal computer can dynamically adjust the optimal screen-throwing resolution according to the state of the mobile phone display screen, and the screen-throwing effect is further improved.
It should be noted that, the method can also be adapted to other screen-throwing scenes, such as a screen-throwing scene of a video call, and the tablet computer can calculate the optimal screen-throwing resolution according to the size of the side-view area of the mobile phone so as to finish the screen-throwing of the video call.
In the above embodiment, when the mobile phone performs screen projection on the tablet personal computer, the tablet personal computer can calculate the resolution supported by the screen projection window and the optimal screen projection resolution corresponding to the encoding of the data to be screen projected according to the resolution of the tablet personal computer and the resolution of the mobile phone, so that the tablet personal computer can calculate the optimal screen projection resolution suitable for the current scene according to different types of tablet personal computers or mobile phones, thereby improving the screen projection effect and the screen projection success rate.
For the process of establishing connection between the mobile phone and the tablet pc in S1, as shown in fig. 11, the process of performing data interaction between each module in the mobile phone and each module in the tablet pc may include:
s30, the user clicks an 'immediate connection' control in the mobile phone assistant APP.
S31, the mobile phone assistant APP sends a message indicating searching of the screen throwing device to the first screen throwing module.
After receiving the "immediate connection" operation input by the user, the mobile phone assistant APP may send an IPC message to the first screen-throwing module, where optionally, the IPC message may carry a search instruction, where the search instruction is used to instruct the first screen-throwing module to invoke the capability search of the first bluetooth chip to find available screen-throwing devices nearby.
S32, the first screen projection module calls the capability search of the first Bluetooth chip to find available screen projection equipment nearby.
In this step, the first screen-throwing module invokes the capability of the first bluetooth chip, that is, searches for bluetooth signals of available screen-throwing devices by using the first bluetooth chip.
S33, the Bluetooth chip of the available screen throwing device receives a search signal of the mobile phone and sends the search signal to the second screen throwing module.
Only one available screen-throwing device of the tablet computer is shown in fig. 11, and the principle of the corresponding bluetooth chip, namely the second bluetooth chip, and the other available screen-throwing devices are similar, which is not shown in fig. 11.
S34, the second screen projection module of the tablet personal computer feeds back the basic information of the second screen projection module to the first screen projection module of the mobile phone.
Wherein the basic information of the device includes a device identifier, such as a device name, a media access control address (media access control address, MAC address), etc., and the second screen projection module may store the basic information of the device.
S35, the first screen projection module of the mobile phone sends the received basic information (such as the equipment name and the MAC address) of the screen projection equipment to the mobile phone assistant APP.
S36, the mobile phone assistant APP displays basic information of the available screen-throwing devices in an available device list.
S37, the user selects the device 2 (i.e. tablet computer) in the available device list.
S38, the mobile phone assistant APP receives the selected operation of the user and sends a message indicating connection establishment to the first screen projection module.
The message may also be an IPC message, configured to instruct the first screen-throwing module to invoke the first bluetooth chip to establish bluetooth connection (BLE connection) with the tablet computer; optionally, the IPC message may carry an identification of the tablet.
S39, the first screen projection module invokes the capability of the first Bluetooth chip to be connected with the second Bluetooth chip of the tablet personal computer in a Bluetooth mode.
S40, the first Bluetooth chip and the second Bluetooth chip establish Bluetooth connection.
S41, after the Bluetooth connection is established between the mobile phone and the tablet personal computer (namely the device 2), the first Bluetooth chip sends a message of successful establishment of the Bluetooth connection to the first screen projection module.
S42, the first screen projection module generates an SSID and a password.
S43, the first screen projection module calls the first Wi-Fi chip to establish a softAP.
S44, the first Wi-Fi chip creates a softAP.
The SoftAP corresponds to the SSID and the password created above.
S45, the first screen projection module sends the SSID and the password to a second screen projection module of the tablet personal computer through the established Bluetooth connection channel.
S46, the second screen projection module calls a second Wi-Fi chip to establish Wi-Fi P2P connection with the mobile phone according to the received SSID and the password. Meanwhile, a socket data channel is also established between the mobile phone and the tablet computer so as to enable the subsequent mobile phone and the tablet computer to mutually transmit data. It should be noted that, the connection type established between the mobile phone and the tablet computer is not limited to bluetooth connection and Wi-Fi P2P connection, and may be other connection modes, as long as data transmission between the two can be realized.
S47, the first Wi-Fi chip sends a message of successful connection establishment to the first screen projection module, and the second Wi-Fi chip sends a message of successful connection establishment to the second screen projection module.
S48, the first screen projection module sends a message of successful connection establishment to the mobile phone assistant APP, and the second screen projection module sends a message of successful connection establishment to the tablet phone assistant APP.
Alternatively, the process of establishing connection between the mobile phone and the tablet computer in S30 to S47 may be performed by interaction between the first connection discovery module in the first screen projection module and the second connection discovery module in the second screen projection module, which are not shown in fig. 8.
Thus, the mobile phone and the tablet computer complete the connection process.
The screen projection method according to the present application will be described below by way of an embodiment. The following embodiments may be combined with the above embodiments, and the same or similar concepts or processes will not be described in detail in the following embodiments.
Fig. 12 is a schematic flow chart of a screen projection method according to an embodiment of the present application, and the method can be applied to a mobile phone and a tablet computer as shown in fig. 8. As shown in fig. 12, a process of the screen projection method provided by the embodiment of the present application may include:
s101, the mobile phone receives screen operation input by a user.
The screen-throwing operation input by the user may be input through the mobile phone assistant APP on the mobile phone, for example, by clicking the "immediate connection" control in fig. 4, or by clicking the "wireless screen-throwing" control in fig. 7. It should be noted that, the embodiment of the present application is shown by taking the name of "mobile phone assistant APP" as an example, but other APPs having the same or similar functions are also suitable for the embodiment of the present application, such as "mobile phone screen-throwing APP", "device interconnection APP", etc.; in addition, the embodiment of the present application is shown by using the name of "immediate connection", but other names having the same or similar functions are also applicable to the embodiment of the present application, such as "one-touch screen", "open screen", etc.
S102, the mobile phone responds to the screen-throwing operation to search and display available screen-throwing equipment.
After receiving the screen-throwing operation input by the user, the mobile phone assistant APP can call the capability of the Bluetooth chip to search available screen-throwing equipment nearby. In the embodiment of the application, after searching for available screen-throwing equipment, the first screen-throwing module can acquire information such as an internet protocol address (internet protocol address, IP address), an MAC address, a universal unique identification code (universally unique identifier, uuid), an equipment identifier, an equipment name and the like of the screen-throwing equipment. Optionally, the first screen projection module may send the above information of the screen projection device to the mobile phone assistant APP for display to the user for viewing.
In some embodiments, the mobile phone assistant APP may not be able to display all of the above information of available screen-casting devices on the list of available devices in view of the size of the display size of the mobile phone display. Thus, only the device identification (e.g., device name) of the available screen-casting device may be displayed on the list of available devices. If the user wants to view other information of a certain screen device, the user can perform long-press operation or double-click operation on the device name, and after receiving the long-press operation or the double-click operation, the mobile phone assistant APP can display other information of the screen device.
In some embodiments, the list of available devices displayed by the mobile phone assistant APP includes all devices in the vicinity of the mobile phone that have bluetooth enabled, such as a tablet, a mobile phone, or a wearable device. In other embodiments, after receiving the information of all the devices with the bluetooth function turned on, the mobile phone assistant APP can screen out the devices supporting the screen to display, for example, the wearable device does not support the screen, and then the mobile phone assistant APP does not display the wearable device in the available device list.
S103, the mobile phone receives the selected operation of the user on the tablet personal computer in the available screen throwing equipment.
The user can determine the equipment which the user wants to screen the mobile phone through the available equipment list displayed by the mobile phone assistant APP. As shown in fig. 5, the available screen-throwing devices include device 1 and device 2, and if the user wants to throw the mobile phone onto device 2 (i.e. the tablet computer), the user can click on the area where the name of the device is located. The mobile phone assistant APP can receive the selected operation of the tablet personal computer by the user.
In some embodiments, the user may also perform a selection operation on the tablet computer through voice input, for example, the user inputs "device 2" through the microphone of the mobile phone, and after receiving the sound signal through the microphone, the microphone may convert the sound signal into an electrical signal and send the electrical signal to the mobile phone assistant APP.
S104, the mobile phone responds to the selected operation to establish communication connection with the tablet personal computer.
S105, the panel computer obtains the resolution of the mobile phone display screen and the resolution of the panel computer display screen.
And S106, calculating the optimal screen-throwing resolution by the tablet personal computer according to the resolution of the mobile phone display screen and the resolution of the tablet personal computer display screen.
The process of calculating the optimal screen resolution may be referred to the description of the above embodiments, and will not be repeated here.
And S107, the tablet personal computer sends the optimal screen-throwing resolution ratio to the mobile phone.
S108, the mobile phone encodes the image data of the display interface by adopting the optimal screen-throwing resolution, and sends the encoded image data to the tablet personal computer so that the tablet personal computer displays an image corresponding to the image data.
In some scenarios, if the user no longer needs to screen the mobile phone to the tablet computer, as shown in fig. 13, the user may click on the "disconnect" control on the interface of the mobile phone assistant APP, and after receiving the disconnect operation, the mobile phone assistant APP sends a disconnect message to the first screen-casting module, where the first screen-casting module invokes the capability of the Wi-Fi chip to disconnect from the Wi-Fi P2P of the tablet computer.
As can be seen from the above description, the optimal screen projection resolution is calculated by the tablet pc, and in other embodiments, the optimal screen projection resolution may be calculated by the mobile phone, and the process may include the steps of:
A: and the mobile phone receives the screen throwing operation input by the user.
B: and the mobile phone responds to the screen-throwing operation to search and display available screen-throwing equipment.
C: and the mobile phone receives the selected operation of the user on the tablet personal computer in the available screen throwing equipment.
D: and the mobile phone responds to the selected operation to establish communication connection with the tablet personal computer.
E: the mobile phone obtains the resolution of the mobile phone display screen and the resolution of the tablet computer display screen.
F: and the mobile phone calculates the optimal screen-throwing resolution according to the resolution of the mobile phone display screen and the resolution of the tablet computer display screen.
G: the mobile phone adopts the optimal screen-throwing resolution ratio to encode the image data of the display interface, and sends the encoded image data to the tablet personal computer so that the tablet personal computer displays the image corresponding to the image data.
The process is different from the above embodiment in that after the optimal screen-throwing resolution is determined, the mobile phone can directly adopt the optimal screen-throwing resolution to perform coding, and does not need to receive the screen-throwing resolution sent by other electronic equipment, thereby reducing transmission power consumption.
In the screen projection method, when the mobile phone projects the screen to the flat panel, the flat panel computer can calculate the resolution supported by the screen projection window and the optimal screen projection resolution corresponding to the screen projection data to be projected according to the resolution of the mobile phone and the resolution of the flat panel computer, so that the flat panel computer can calculate the optimal screen projection resolution suitable for the current scene according to different types of flat panel computers or mobile phones, thereby improving the screen projection effect and the screen projection success rate.
The above describes in detail an example of the screen projection method provided by the embodiment of the present application. It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application can divide the functional modules of the electronic device according to the method example, for example, each function can be divided into each functional module, for example, a detection unit, a processing unit, a display unit, and the like, and two or more functions can be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The electronic device provided in this embodiment is configured to execute the screen projection method, so that the same effect as that of the implementation method can be achieved.
In case an integrated unit is employed, the electronic device may further comprise a processing module, a storage module and a communication module. The processing module can be used for controlling and managing the actions of the electronic equipment. The memory module may be used to support the electronic device to execute stored program code, data, etc. And the communication module can be used for supporting the communication between the electronic device and other devices.
Wherein the processing module may be a processor or a controller. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, and the like. The memory module may be a memory. The communication module can be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other equipment which interact with other electronic equipment.
In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to this embodiment may be a device having the structure shown in fig. 2.
The embodiment of the application also provides a computer readable storage medium, in which a computer program is stored, which when executed by a processor, causes the processor to execute the screen projection method of any of the above embodiments.
The embodiment of the application also provides a computer program product, which when run on a computer, causes the computer to execute the relevant steps so as to realize the screen projection method in the embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is used for storing computer-executed instructions, and when the device is operated, the processor can execute the computer-executed instructions stored in the memory, so that the chip executes the screen projection method in each method embodiment.
The electronic device, the computer readable storage medium, the computer program product or the chip provided in this embodiment are used to execute the corresponding method provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding method provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
Claims (10)
1. A method of screening, the method performed by a first electronic device, comprising:
acquiring display resolution of the first electronic device and display resolution of the second electronic device, wherein the display resolution of the first electronic device comprises a second number of vertical pixels and a second number of horizontal pixels of a display screen of the first electronic device;
determining the number of vertical pixels and the number of horizontal pixels of a first area on the second electronic device according to the display resolution of the first electronic device and the display resolution of the second electronic device, wherein the first area comprises a screen throwing area;
determining a quotient of the second vertical pixel number and a greatest common divisor as a first factor, and determining a quotient of the second horizontal pixel number and the greatest common divisor as a second factor, wherein the greatest common divisor is the greatest common divisor between the second vertical pixel number and the second horizontal pixel number;
Determining a target resolution according to the first factor, the second factor, and the number of vertical pixels and the number of horizontal pixels of the first region;
encoding image data to be projected on a screen in the first electronic equipment by adopting the target resolution to obtain encoded data;
and sending the encoded data to the second electronic equipment so that the second electronic equipment performs screen projection in the screen projection area according to the encoded data.
2. The method of claim 1, wherein the display screen of the second electronic device includes a status bar thereon, wherein the display resolution of the second electronic device includes a first number of vertical pixels and a first number of horizontal pixels of the display screen of the second electronic device, wherein the determining the first area of the vertical pixels and the horizontal pixels on the second electronic device based on the display resolution of the first electronic device and the display resolution of the second electronic device includes:
acquiring a third vertical pixel number from the second electronic device, wherein the third vertical pixel number comprises the vertical pixel number corresponding to the status bar of the second electronic device;
And determining the number of vertical pixels and the number of horizontal pixels of the first area according to the display resolution of the first electronic device, the first number of vertical pixels and the third number of vertical pixels.
3. The method of claim 2, wherein determining the number of vertical pixels and the number of horizontal pixels of the first region based on the display resolution of the first electronic device, the first number of vertical pixels, and a third number of vertical pixels comprises:
determining the difference value between the first vertical pixel number and the third vertical pixel number as the vertical pixel number of the first area;
and determining the product of the number of vertical pixels of the first area and a first ratio as the number of horizontal pixels of the first area, wherein the first ratio is the ratio between the number of second horizontal pixels and the number of second vertical pixels.
4. The method of claim 3, wherein the drop region is located within a drop window displayed on the second electronic device, and wherein the third number of vertical pixels further comprises a number of vertical pixels corresponding to a navigation region of the drop window.
5. The method of any of claims 1-4, wherein the determining a target resolution from the first factor, the second factor, and a number of vertical pixels and a number of horizontal pixels of the first region comprises:
performing first operation on the first factor to obtain a first result, and performing second operation on the second factor to obtain a second result, wherein the first result is obtained by accumulating the first factor n times or multiplying the first factor by a coefficient n, the second result is obtained by accumulating the second factor n times or multiplying the second factor by a coefficient n, and n is a positive integer;
and if the number of pixels corresponding to the first result is greater than or equal to the number of vertical pixels of the first area, or the number of pixels corresponding to the second result is greater than or equal to the number of horizontal pixels of the first area, taking the number of pixels corresponding to the first result and the number of pixels corresponding to the second result as the target resolution.
6. The method of any of claims 1-4, wherein the target resolution is less than a display resolution of the first electronic device.
7. A method of screening, the method performed by a second electronic device, comprising:
acquiring display resolution of a first electronic device and display resolution of a second electronic device, wherein the display resolution of the first electronic device comprises a second number of vertical pixels and a second number of horizontal pixels of a display screen of the first electronic device;
determining the number of vertical pixels and the number of horizontal pixels of a first area on the second electronic device according to the display resolution of the first electronic device and the display resolution of the second electronic device, wherein the first area comprises a screen throwing area;
determining a quotient of the second vertical pixel number and a greatest common divisor as a first factor, and determining a quotient of the second horizontal pixel number and the greatest common divisor as a second factor, wherein the greatest common divisor is the greatest common divisor between the second vertical pixel number and the second horizontal pixel number;
determining a target resolution according to the first factor, the second factor, and the number of vertical pixels and the number of horizontal pixels of the first region;
transmitting the target resolution to the first electronic device;
And receiving the coded data sent by the first electronic equipment, and displaying an image corresponding to the coded data, wherein the coded data is obtained by coding the image data to be projected by the first electronic equipment by adopting the target resolution.
8. A screen projection system comprising a first electronic device and a second electronic device, the first electronic device performing the method of any one of claims 1 to 6 or the second electronic device performing the method of claim 7.
9. An electronic device, comprising:
one or more processors;
one or more memories;
the memory stores one or more programs that, when executed by the processor, cause the electronic device to perform the method of any of claims 1-6 or the method of claim 7.
10. A computer readable storage medium, in which a computer program is stored which, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 6 or to perform the method of claim 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311365883.1A CN117499654A (en) | 2022-05-30 | 2022-07-25 | Screen projection method and electronic equipment |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210598752 | 2022-05-30 | ||
CN2022105987527 | 2022-05-30 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311365883.1A Division CN117499654A (en) | 2022-05-30 | 2022-07-25 | Screen projection method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116033157A CN116033157A (en) | 2023-04-28 |
CN116033157B true CN116033157B (en) | 2023-10-20 |
Family
ID=86073565
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311365883.1A Pending CN117499654A (en) | 2022-05-30 | 2022-07-25 | Screen projection method and electronic equipment |
CN202210889836.6A Active CN116033157B (en) | 2022-05-30 | 2022-07-25 | Screen projection method and electronic equipment |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311365883.1A Pending CN117499654A (en) | 2022-05-30 | 2022-07-25 | Screen projection method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN117499654A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106204700A (en) * | 2014-09-01 | 2016-12-07 | 三星电子株式会社 | Rendering apparatus and method |
CN111327769A (en) * | 2020-02-25 | 2020-06-23 | 北京小米移动软件有限公司 | Multi-screen interaction method and device and storage medium |
CN113284472A (en) * | 2021-05-13 | 2021-08-20 | 深圳乐播科技有限公司 | Screen projection resolution conversion method, device, equipment and storage medium |
CN113613072A (en) * | 2021-08-02 | 2021-11-05 | 海信视像科技股份有限公司 | Multi-path screen projection display method and display equipment |
CN113691850A (en) * | 2021-08-25 | 2021-11-23 | 深圳康佳电子科技有限公司 | Screen projection control method and device, intelligent terminal and computer readable storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107357404A (en) * | 2016-05-10 | 2017-11-17 | 联发科技(新加坡)私人有限公司 | Method for displaying image and its electronic installation |
-
2022
- 2022-07-25 CN CN202311365883.1A patent/CN117499654A/en active Pending
- 2022-07-25 CN CN202210889836.6A patent/CN116033157B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106204700A (en) * | 2014-09-01 | 2016-12-07 | 三星电子株式会社 | Rendering apparatus and method |
CN111327769A (en) * | 2020-02-25 | 2020-06-23 | 北京小米移动软件有限公司 | Multi-screen interaction method and device and storage medium |
CN113284472A (en) * | 2021-05-13 | 2021-08-20 | 深圳乐播科技有限公司 | Screen projection resolution conversion method, device, equipment and storage medium |
CN113613072A (en) * | 2021-08-02 | 2021-11-05 | 海信视像科技股份有限公司 | Multi-path screen projection display method and display equipment |
CN113691850A (en) * | 2021-08-25 | 2021-11-23 | 深圳康佳电子科技有限公司 | Screen projection control method and device, intelligent terminal and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN117499654A (en) | 2024-02-02 |
CN116033157A (en) | 2023-04-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112286477B (en) | Screen projection display method and related product | |
WO2022052773A1 (en) | Multi-window screen projection method and electronic device | |
CN112394895B (en) | Picture cross-device display method and device and electronic device | |
WO2022083465A1 (en) | Electronic device screen projection method, medium thereof, and electronic device | |
CN116360725B (en) | Display interaction system, display method and device | |
CN114025410A (en) | Method and device for establishing network connection and electronic equipment | |
CN112328941A (en) | Application screen projection method based on browser and related device | |
WO2022222924A1 (en) | Method for adjusting screen projection display parameters | |
WO2023005900A1 (en) | Screen projection method, electronic device, and system | |
CN116033158B (en) | Screen projection method and electronic equipment | |
CN115119048B (en) | Video stream processing method and electronic equipment | |
CN112911337A (en) | Method and device for configuring video cover pictures of terminal equipment | |
CN116033157B (en) | Screen projection method and electronic equipment | |
CN113760191B (en) | Data reading method, data reading apparatus, storage medium, and program product | |
CN117348894A (en) | Software upgrading method, terminal equipment and system | |
CN116744106B (en) | Control method of camera application and terminal equipment | |
WO2022206600A1 (en) | Screen projection method and system, and related apparatus | |
WO2024109443A1 (en) | Device connection method, device and system | |
CN116661584B (en) | Resource scheduling method and related equipment | |
EP4283464A1 (en) | Distributed device capability virtualization method, medium, and electronic device | |
CN116382896B (en) | Calling method of image processing algorithm, terminal equipment, medium and product | |
CN117135729B (en) | Multi-device cooperation method, system and terminal device | |
CN116055715B (en) | Scheduling method of coder and decoder and electronic equipment | |
CN115460445B (en) | Screen projection method of electronic equipment and electronic equipment | |
CN117472606A (en) | Method and device for calling system service |
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 |