WO2024046024A1 - 投屏方法及设备 - Google Patents

投屏方法及设备 Download PDF

Info

Publication number
WO2024046024A1
WO2024046024A1 PCT/CN2023/110846 CN2023110846W WO2024046024A1 WO 2024046024 A1 WO2024046024 A1 WO 2024046024A1 CN 2023110846 W CN2023110846 W CN 2023110846W WO 2024046024 A1 WO2024046024 A1 WO 2024046024A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
screen
terminal
projection
resolution
Prior art date
Application number
PCT/CN2023/110846
Other languages
English (en)
French (fr)
Inventor
程晓博
胡诗尧
张莹莹
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024046024A1 publication Critical patent/WO2024046024A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Definitions

  • This application relates to the field of terminal technology, and in particular to screen projection methods and equipment.
  • terminals used to play videos in home scenarios can include but are not limited to TVs, computers, mobile phones, tablets, etc.
  • Small-screen terminals such as mobile phones (hereinafter referred to as screen projection sources) can project video screens to large screens such as TVs.
  • Display on the terminal (hereinafter referred to as the screen casting destination) to improve the user's viewing experience.
  • the screencasting source first adds a black border to the screencasting image and sends the screencasting image to the screencasting destination, and the screencasting destination processes and displays the received screencasting image. During this process, the transmission efficiency of the screen projection is low.
  • This application provides a screen projection method and equipment, which can improve the transmission efficiency of screen projection images.
  • this application provides a screen casting method.
  • the method includes: a first terminal receiving a first image sent by a second terminal after starting screen casting, where the first image is an image displayed on the second terminal; the first terminal obtains The screen resolution of the second terminal; the first terminal displays the second image according to the first image and the screen resolution of the second terminal, and the second image is a projected screen image of the first image.
  • the first terminal can receive the first image displayed on the second terminal, and can also obtain the screen resolution of the second terminal, and then based on the first image and the second terminal
  • the second image can be displayed according to the screen resolution of the second terminal.
  • the ratio of the resolution of the first image is different from the ratio of the screen resolution of the first terminal; the first terminal displays the second image according to the first image and the screen resolution of the second terminal, including: One terminal determines the resolution of the first image based on the screen resolution of the second terminal (or determines the ratio of the resolution of the first image based on the ratio of the screen resolution of the second terminal); the first terminal adjusts the resolution of the first image
  • the ratio of the resolution of the adjusted first image is the same as the ratio of the screen resolution of the first terminal; the first terminal displays the second image according to the adjusted first image. Two images.
  • the first terminal can first determine the resolution of the first image based on the obtained screen resolution of the second terminal.
  • the screen resolution of the second terminal may be the same as the resolution of the first image.
  • the first terminal can adjust the ratio of the resolution of the first image so that the ratio of the resolution of the first image is the same as the ratio of the screen resolution of the first terminal, so that the first image can occupy more space on the first terminal. More display areas make the screen projection clearer and the screen projection effect better.
  • the first terminal adjusts the proportion of the resolution of the first image, including: the first terminal fills the first image with black borders, and the proportion of the resolution of the first image after filling the black borders is the same as that of the first terminal.
  • the ratio of the screen resolution is the same.
  • the first terminal can adjust the ratio of the resolution of the first image by adding a black border to the first image, so that the first terminal can be adjusted without affecting the display ratio of the content in the first image.
  • the resolution of the image is proportional to the purpose.
  • the method before the first terminal displays the second image according to the first image and the screen resolution of the second terminal, the method further includes: the first terminal performs black borders on the first image according to the resolution of the first image. detection.
  • the first terminal can determine which areas in the first image are valid areas, that is, areas where data is displayed, and which areas are black border areas, that is, areas where data may not be displayed.
  • the first terminal performs black border detection
  • the second terminal does not perform the operation of adding black borders to the first image
  • the number of pixels in the first image is relative to the number of pixels in the first image after adding black borders.
  • the number of points is much smaller. Therefore, the number of pixel points to be detected by the first terminal is smaller, thereby improving the efficiency of black border detection.
  • high-configuration first terminals such as 4K TVs
  • the efficiency of black border detection is improved, the time-consuming requirement for black border detection can be met.
  • the efficiency of black border detection is improved, it can also support the requirements of real-time black border detection.
  • the result of black border detection is that the first image includes black borders; the method also includes: the black borders included in the first image are used to display data, and the first terminal does not detect the first image used to display data. The included black borders are cropped.
  • the first terminal will not crop these black borders used to display data, which can avoid screen projection due to different frames. Including the problem of screen jitter and jump caused by different black borders.
  • the first terminal can crop other black borders except these black borders, so as to solve the problem of picture jitter and jump caused by the different black borders included in the projection screen of different frames.
  • the effective area (or area for displaying data) in the first image can be made to occupy more display area on the first terminal, thereby making the screen projection clearer.
  • the result of black border detection is that the first image includes black borders; the method also includes: the black borders included in the first image are not used to display data, and the first terminal fills the first image with black borders The black edges included in the image are cropped, wherein the ratio of the resolution of the cropped first image is the same as the ratio of the screen resolution of the first terminal.
  • the first terminal can crop these black borders so that the effective area (or area for displaying data) in the first image occupies the first terminal increase the display area, making the projection screen clearer.
  • the first terminal may crop the black borders included in the first image after filling the black borders. That is to say, the first terminal may first perform the operation of adding black borders and then perform the operation of cropping the black borders.
  • the resolutions of the projection images transmitted to the first terminal are the same, and may all be the screen resolution of the second terminal.
  • the screen resolution of the first terminal is also fixed. In this way, when the first terminal adds black borders to the projection images transmitted by the same second terminal, since these projection images are not cropped, their resolutions are all are the same, therefore, the first terminal can determine that the size of the black borders to be added to these projected images is also the same.
  • the first terminal does not need to separately calculate the size of the black border that needs to be added based on the resolution of each screen projection, which can save the power consumption of the first terminal when adding black borders to the screen projection, that is, it can save the first terminal on each screen projection.
  • the ratio of the resolution of the projected screen is adjusted to suit the power consumption of the ratio of the own screen resolution.
  • the data includes subtitles and/or barrages.
  • the first terminal displays the second image in a split-screen manner; the first terminal displays the second image according to the first image and the screen resolution of the second terminal, including: the first terminal displays the second image according to the screen resolution of the second terminal.
  • the screen resolution determines the resolution of the first image; the first terminal performs black border detection on the first image according to the resolution of the first image; the first terminal determines that the first image includes black borders according to the result of the black border detection, and the first terminal
  • the terminal crops the black edges included in the first image, and the first terminal displays the second image according to the cropped first image.
  • the first terminal uses a split-screen mode to display the projected screen image
  • the first terminal can directly Crop the black borders in the projected screen. Since the projection screen received by the first terminal is the interface originally displayed by the second terminal, the second terminal does not add black borders to it.
  • the first terminal performs black border cropping, it only needs to cut off the original black borders of the screen projection, which can reduce the number of black borders added by the second terminal to the screen projection in a split-screen display scenario where the first terminal adopts split-screen display. , and the first terminal performs a redundant operation of cutting off the added black border.
  • the first terminal displays the second image in a split-screen manner; the first terminal displays the second image according to the first image and the screen resolution of the second terminal, including: the first terminal displays the second image according to the screen resolution of the second terminal.
  • the screen resolution determines the resolution of the first image; the first terminal performs black border detection on the first image according to the resolution of the first image; the first terminal determines that the first image does not include black borders according to the result of the black border detection, and the first terminal determines the resolution of the first image.
  • a terminal displays a second image based on the first image.
  • the first terminal uses a split-screen mode to display the projection screen, if the first terminal performs black border detection on the projection screen and determines that the projection screen does not include black borders, the first terminal can directly The corresponding interface is displayed according to the screen projection screen.
  • the method further includes: the first terminal also displays a third image, and the third image and the second image are displayed on a split screen; wherein the third image is a screen projection image of the image displayed on the third terminal; Alternatively, the third image is an image originally output on the first terminal; or the third image is a screen projection image of an image displayed on the second terminal.
  • this application provides a screen casting method.
  • the method includes: a second terminal displays a first image; after the second terminal starts screen casting, it sends the first image and the screen resolution of the second terminal to the first terminal.
  • An image and the screen resolution of the second terminal are used for the first terminal to display a second image, and the second image is a projected screen image of the first image.
  • the present application provides a screen projection device that implements the above first or second aspect and its function of any of the methods described in the design.
  • This function can be implemented by hardware, or it can be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • this application provides a screen projection device, including: a processor, a memory, a communication interface, and a display screen.
  • the memory, display screen, and communication interface are coupled to the processor.
  • the communication interface is used to communicate with other devices, and the memory is used to communicate with other devices.
  • the computer program code is stored, and the computer program code includes computer instructions.
  • the processor reads the computer instructions from the memory, so that the screen projection device performs the method described in the above-mentioned first aspect or second aspect and any one of the designs.
  • the memory may be coupled to the processor, or may be independent of the processor.
  • the communication interface may be a transceiver, an input/output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit, etc.
  • the present application provides a computer-readable storage medium.
  • the computer-readable storage medium includes a computer program or instructions. When the computer program or instructions are run on a screen projection device, the computer program or instructions cause the screen projection device to execute the above-mentioned first step. aspect or the second aspect and the method described in any one of the designs.
  • the present application provides a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer can execute the method described in the above first or second aspect and any one of the designs.
  • the present application provides a chip system, including at least one processor and at least one interface circuit.
  • the at least one interface circuit is used to perform transceiver functions and send instructions to at least one processor.
  • at least one processor executes the instructions
  • at least one processor executes the method described in the first aspect or the second aspect and any one of the above designs.
  • the present application provides a screen projection system, including a first terminal and a second terminal.
  • the first terminal is used to perform the method described in the above first aspect and any one of the designs
  • the second terminal is used to perform the method as described in any one of the designs.
  • Figure 1 is a schematic flow chart of an existing screen projection method
  • FIG. 2 is a schematic diagram of the interface provided by the embodiment of the present application.
  • Figure 3 is a second schematic diagram of the interface provided by the embodiment of the present application.
  • Figure 4 is a schematic diagram three of the interface provided by the embodiment of the present application.
  • Figure 5 is an architectural schematic diagram of a communication system provided by an embodiment of the present application.
  • Figure 6 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • Figure 7a is a schematic structural diagram of another terminal provided by an embodiment of the present application.
  • Figure 7b is a software structure block diagram of a terminal provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram 4 of the interface provided by the embodiment of the present application.
  • Figure 9 is a schematic diagram 5 of the interface provided by the embodiment of the present application.
  • Figure 10 is a schematic diagram 6 of the interface provided by the embodiment of this application.
  • FIG 11 is a schematic diagram 7 of the interface provided by the embodiment of this application.
  • Figure 12 is a schematic flowchart of a screen projection method provided by an embodiment of the present application.
  • Figure 13 is a schematic diagram 8 of the interface provided by the embodiment of the present application.
  • Figure 14 is a schematic diagram 9 of the interface provided by the embodiment of the present application.
  • Figure 15 is a schematic diagram of pixels of a screen projection provided by an embodiment of the present application.
  • Figure 16 is a schematic diagram 10 of the interface provided by the embodiment of this application.
  • Figure 17 is a schematic diagram 11 of the interface provided by the embodiment of the present application.
  • Figure 18 is a schematic diagram of the interface provided by the embodiment of the present application.
  • Figure 19 is a schematic diagram 13 of the interface provided by the embodiment of this application.
  • Figure 20 is a schematic diagram of the interface provided by the embodiment of this application.
  • Figure 21 is a schematic structural diagram of a screen projection device provided by an embodiment of the present application.
  • Figure 22 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
  • Multi-screen collaboration can be used to realize the coordinated use of the two terminals.
  • Multi-screen collaboration can use mirror projection to project the interface displayed on one terminal to the display screen of another terminal.
  • the terminal that projects its display interface can be called the screen casting source
  • the terminal that receives the projection from the screen casting source and displays the screen casting source display interface is called the screen casting destination.
  • the interface projected by the screen casting source displayed on the screen casting destination is called a screen casting screen (or called a screen casting interface).
  • the screencasting source will add black borders to the screencasting image according to the screen resolution of the screencasting destination, so as to send the screencasting screen adapted to its screen resolution to the screencasting destination.
  • Figure 1 shows a schematic flowchart of an existing screen projection method.
  • the screencasting method includes the following steps:
  • the mobile phone and the TV negotiate the screen resolution of the TV.
  • the mobile phone can obtain the screen resolution of the TV through this step.
  • the mobile phone obtains the screen projection.
  • the mobile phone can obtain the currently displayed interface as the screen projection screen.
  • the screen projection image obtained by the mobile phone can be the screen projection image 210 as shown in (2) in Figure 2 .
  • the mobile phone adds black borders to the projected screen according to the screen resolution of the TV.
  • the screen resolution of the mobile phone shown in (1) in Figure 2 is 1920*1080 pixels (pix, P), that is, the length (or height) of the mobile phone is 1920P and the width is 1080P.
  • the screen resolution of the TV shown in ) is 2160*3840P, that is, the height of the TV is 2160P and the width is 3840P.
  • the projection screen shown in (2) in Figure 2 The resolution of the screen 210 is also 1920*1080P.
  • the mobile phone can add black borders to the left and right sides of the projection screen 210 as shown in (2) in Figure 2 according to the screen resolution of the television (the screen resolution of the television as shown in (3) in Figure 3).
  • the screen projection image after adding black borders may be as shown in the screen projection image 300 shown in (1) in Figure 3 .
  • the ratio of the resolution of the projection screen 300 shown in (1) in FIG. 3 is the same as the ratio of the screen resolution of the TV shown in (3) in FIG. 3, and the aspect ratio is 2160:3840. It can be understood that the ratio of resolutions involved in the embodiments of this application is the ratio of height to width.
  • the mobile phone sends the screen projection image with black borders added to the TV.
  • the TV receives the screencast image from the mobile phone with black borders added.
  • the TV performs black border detection, black border cropping and displays the projected screen image.
  • the mobile phone can perform black border detection on the screen projection 300 shown in (1) in FIG. 3 , that is, determine which areas of the screen projection 300 have black borders. Then, when it is determined that there are black borders on at least three sides of the projection screen 300 shown in (1) in Figure 3, the TV can perform black border cropping on the projection screen 300 shown in (1) in Figure 3, such as : The TV can crop the upper and lower black borders of the projection screen 300 shown in (1) in Figure 3, and then correspondingly crop the left and right black borders of the projection screen 300. Crop appropriately so that the resolution ratio of the cropped screen projection image is the same as the screen resolution ratio of the TV. For example, the cropped screen projection image may be as shown in the screen projection image 310 shown in (2) in Figure 3 . Finally, the TV can display the projected screen image after black borders are cropped. For example, the television may present the projection screen 320 shown in (3) in FIG. 3 .
  • the mobile phone i.e., the screencasting source
  • the screencasting source adds black borders to the screencasting image and then transmits it to the TV (screencasting destination).
  • the screencasting efficiency will be reduced.
  • Picture transmission efficiency As the screen resolution of the screen casting destination becomes higher and higher, the screen casting source needs to add more black borders. This will make the transmission efficiency of the screen casting screen more efficient due to the larger amount of data being transmitted. low.
  • the projection destination receives the projection screen with black borders added from the projection source, if it performs black border detection on it, as the black borders in the projection screen increase, the pixels of the projection screen will also increase. , In this way, when the screen projection destination performs black border detection, more pixels need to be detected, which will also reduce the efficiency of the screen projection destination's black border detection. Moreover, the number of black border pixels added by the projection source may even be greater than the number of pixels of the original projection image obtained. This will greatly increase the power consumption of black border detection at the projection destination, and This makes the efficiency of black edge detection even lower. Moreover, for high-configuration screen projection destinations, such as 4K TVs, there are requirements for the time-consuming black border detection, and this solution cannot meet this requirement. For low-configuration screen projection destinations, due to their limited computing power, if this solution is used for black border detection, it cannot support the requirements for real-time black border detection.
  • the screencasting destination end displays the screencasting images transmitted from one or more screencasting sources at the same time ( Figure 4). Only one is shown in Figure 4, such as the screencasting screen 410) and one or more interfaces (only one is shown in Figure 4, such as the video interface 400), or multiple screencasting destinations are displayed at the same time. Screen projection images transmitted from different screen projection sources (not shown in the figure).
  • the projection source will also add black borders to the projection screen (such as the projection screen 410) according to the method described in step S103 above, but the projection destination will perform black border detection and black border cropping. During the process, the black borders added at the source end of the projection screen will be re-cropped.
  • the screen projection screen after the mobile phone adds left and right black borders to the screen projection 210 shown in (2) in Figure 2 is as shown in Figure 3
  • the screen projection screen 300 shown in (1) is shown in the figure.
  • the TV will crop off the upper and lower black borders as well as the left and right black borders of the projected image 300. That is, the black borders added by the mobile phone for the projected image are re-cropped. Therefore, the The solution has redundant processing.
  • embodiments of the present application provide a screen projection method.
  • This method can be applied to when multiple terminals are used together, and the screen projection source projects the screen projection screen to the scene displayed by the screen projection destination.
  • This screen projection method can improve the transmission efficiency of screen projection data. It can also improve the efficiency of black border detection at the screen projection destination. It can also reduce redundant operation processing in scenarios where the screen projection destination uses split-screen display.
  • the screen casting method provided by the embodiments of the present application can be applied to various screen casting scenarios such as full-screen display scenarios, split-screen display scenarios, multi-channel screen casting scenarios, and subtitle and/or barrage screen casting scenarios.
  • FIG. 5 shows a schematic diagram of a system architecture using the screen projection method provided by the embodiment of the present application.
  • the system includes at least one first terminal 501 (only three are shown in Figure 5) and a second terminal 502.
  • the first terminal 501 and the second terminal 502 may establish a connection through wired communication technology and/or wireless communication technology. Based on the established connection, the first terminal 501 and the second terminal 502 can be used together.
  • the wireless communication technology includes but is not limited to at least one of the following: near field communication (NFC), Bluetooth (bluetooth, BT) (for example, traditional Bluetooth or low power (bluetooth low energy, BLE) ) Bluetooth), wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Zigbee, frequency modulation (FM), infrared (IR) wait.
  • both the first terminal 501 and the second terminal 502 support the proximity discovery function. For example, after the first terminal 501 approaches the second terminal 502, the first terminal 501 and the second terminal 502 can discover each other, and then establish a Wi-Fi peer to peer (P2P) connection, a Bluetooth connection, etc. Wireless communication connection. After the wireless communication connection is established, the first terminal 501 and the second terminal 502 can implement signal interaction through the wireless communication connection.
  • P2P Wi-Fi peer to peer
  • Bluetooth connection etc.
  • Wireless communication connection After the wireless communication connection is established, the first terminal 501 and the second terminal 502 can implement signal interaction through the wireless communication connection.
  • the first terminal 501 and the second terminal 502 establish a wireless communication connection through a local area network.
  • the first terminal 501 and the second terminal 502 are both connected to the same router.
  • the first terminal 501 and the second terminal 502 establish a wireless communication connection through a cellular network, the Internet, etc. catch.
  • the second terminal 502 accesses the Internet through a router
  • the first terminal 501 accesses the Internet through a cellular network
  • the first terminal 501 and the second terminal 502 establish a wireless communication connection.
  • the screen projection sources in the first terminal 501 and the second terminal 502 can project the screen projection screen to the display screen of the screen projection destination for display.
  • the screen projection sources in the first terminal 501 and the second terminal 502 can project the screen projection screen to the display screen of the screen projection destination for display.
  • the first terminal 501 can project the interface displayed on its display screen to the display screen of the second terminal 502 for display.
  • the terminal in the embodiment of the present application may be a mobile phone, a tablet computer, a handheld computer, a PC, a television, a cellular phone, or a personal digital assistant (personal digital assistant).
  • digital assistant digital assistant
  • wearable devices such as smart watches
  • in-vehicle computers such as smart watches
  • game consoles such as augmented reality (AR)/virtual reality (VR) devices
  • smart home devices smart city devices, etc.
  • the terminal may be a fixed device or a portable device. This application places no restrictions on the specific type of terminal or the operating system installed.
  • the first terminal 501 is a mobile phone or a tablet computer
  • the second terminal 502 is a television.
  • the terminal is a mobile phone as an example.
  • FIG. 6 is a schematic structural diagram of a mobile phone 600 provided by an embodiment of the present application.
  • the mobile phone 600 may include a processor 610, an external memory interface 620, an internal memory 621, a universal serial bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, an antenna 1, an antenna 2, Mobile communication module 650, wireless communication module 660, audio module 670, sensor module 680, button 690, motor 691, indicator 692, camera 693, display screen 694, and subscriber identification module (subscriber identification module, SIM) card interface 695, etc.
  • a processor 610 an external memory interface 620, an internal memory 621, a universal serial bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, an antenna 1, an antenna 2, Mobile communication module 650, wireless communication module 660, audio module 670, sensor module 680, button 690, motor 691, indicator 692, camera 693, display screen 694, and subscriber identification module (subscriber identification module, SIM) card interface 695, etc.
  • the processor 610 may include one or more processing units.
  • the processor 610 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • application processor application processor, AP
  • modem processor a graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 610 may also be provided with a memory for storing instructions and data.
  • the memory in processor 610 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 610 . If processor 610 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 610 is reduced, thus improving the efficiency of the system.
  • processor 610 may include one or more interfaces.
  • the charge management module 640 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the power management module 641 is used to connect the battery 642, the charging management module 640 and the processor 610.
  • the power management module 641 receives input from the battery 642 and/or the charging management module 640, and supplies power to the processor 610, internal memory 621, display screen 694, camera 693, wireless communication module 660, etc.
  • the wireless communication function of the mobile phone 600 can be realized through the antenna 1, the antenna 2, the mobile communication module 650, the wireless communication module 660, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in mobile phone 600 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
  • the mobile communication module 650 can provide wireless communication solutions including 2G/3G/4G/5G applied on the mobile phone 600.
  • the mobile communication module 650 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • at least part of the functional modules of the mobile communication module 650 may be disposed in the processor 610 .
  • at least part of the functional modules of the mobile communication module 650 and at least part of the modules of the processor 610 may be provided in the same device.
  • the wireless communication module 660 can provide applications on the mobile phone 600 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellite systems. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • Wi-Fi wireless fidelity
  • Bluetooth bluetooth, BT
  • global navigation satellite systems global navigation satellite system, GNSS
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 660 may be one or more devices integrating at least one communication processing module.
  • the antenna 1 of the mobile phone 600 is coupled to the mobile communication module 650, and the antenna 2 is coupled to the wireless communication module 660, so that the mobile phone 600 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the mobile phone 600 implements display functions through the GPU, the display screen 694, and the application processor.
  • the GPU is an image processing microprocessor and is connected to the display screen 694 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 610 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display 694 is used to display images, videos, etc.
  • Display 694 includes a display panel.
  • the mobile phone 600 may include 1 or N display screens 694, where N is a positive integer greater than 1.
  • the mobile phone 600 can realize the shooting function through the ISP, camera 693, video codec, GPU, display screen 694 and application processor.
  • Camera 693 is used to capture still images or video.
  • the mobile phone 600 may include 1 or N cameras 693, where N is a positive integer greater than 1.
  • the external memory interface 620 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 600.
  • the external memory card communicates with the processor 610 through the external memory interface 620 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
  • Internal memory 621 may be used to store computer executable program code, which includes instructions.
  • the internal memory 621 may include a program storage area and a data storage area.
  • the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.).
  • the storage data area can store data created during the use of the mobile phone 600 (such as audio data, phone book, etc.).
  • the internal memory 621 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the processor 610 executes various functional applications and data processing of the mobile phone 600 by executing instructions stored in the internal memory 621 and/or instructions stored in a memory provided in the processor.
  • the mobile phone 600 can implement audio functions through the audio module 670 and application processor. Such as music playback, recording, etc.
  • the audio module 670 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 670 may also be used to encode and decode audio signals. In some embodiments, the audio module 670 may be disposed in the processor 610, or some functional modules of the audio module 670 may be disposed in the processor 610.
  • the sensor module 680 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc. of one or more.
  • the buttons 690 include a power button, a volume button, etc.
  • Key 690 may be a mechanical key. It can also be a touch button.
  • the mobile phone 600 can receive key input and generate key signal input related to user settings and function control of the mobile phone 600 .
  • Motor 691 can produce vibration prompts. Motor 691 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback.
  • the indicator 692 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 695 is used to connect a SIM card.
  • FIG. 7a shows another exemplary structure of a terminal provided by an embodiment of the present application.
  • the terminal includes: a processor 701, a memory 702, a transceiver 703, Display 704.
  • the processor 701, memory 702, and display screen 704 please refer to the implementation of the processor, memory, and display screen of the mobile phone 600.
  • Transceiver 703 is used for the terminal to interact with other devices (such as electronic devices).
  • Transceiver 703 may be a device based on a communication protocol such as Wi-Fi, Bluetooth, or other communication protocols.
  • the terminal may include more or fewer components than those shown in Figures 6 and 7a, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the terminal software architecture can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc.
  • Figure 7b shows a software structure block diagram of a terminal provided by an embodiment of the present application.
  • the screen projection source includes a negotiation module 711, a transmission module 712, an encoding module 713, etc.
  • the screen projection destination includes a negotiation module 714, a transmission module 715, a decoding simulation 716, a black border processing module 717, etc.
  • the negotiation module 711 of the screen casting source is used to interact with the negotiation module 714 of the screen casting destination to negotiate the screen resolution of the screen casting source.
  • the screen casting destination can obtain the screen of the screen casting source. resolution.
  • the encoding module 713 of the screen casting source is used to encode the screen projection image of the screen casting source, and then sends it to the transmission module 715 of the screen casting destination through the transmission module 712 .
  • the screen projection destination receives the encoded screen projection image from the screen projection source end through the transmission module 715, it decodes it through the decoding module 716 to obtain the screen projection image.
  • the black border processing module 717 is used to perform black border detection on the obtained projection screen, add black borders to the projection screen according to the screen resolution of the projection source, perform black border cropping, etc.
  • the first terminal and/or the second terminal may perform some or all of the steps in the embodiment of the present application. These steps or operations are only examples. The embodiment of the present application may also perform other operations or Variations of various operations. In addition, various steps may be performed in a different order than those presented in the embodiments of the present application, and it may not be necessary to perform all operations in the embodiments of the present application.
  • the following takes the first terminal as a mobile phone, the second terminal as a television, the mobile phone as the screen projection source, and the television as the screen projection destination as an example to introduce the screen projection method provided by the embodiment of the present application in detail.
  • the TV can display the screen projection image in full screen.
  • FIG. 8 shows a schematic diagram of a full-screen display scene provided by an embodiment of the present application.
  • the mobile phone displays a picture interface 800, in which the top and bottom of the picture interface 800 include black borders.
  • the mobile phone can project the picture interface 800 to the TV for display.
  • the TV receives the picture interface 800 projected from the mobile phone, it can display the picture interface 800 in full screen mode, that is, only one projected screen image is displayed on the TV.
  • the TV may not crop the black borders included in the projected screen image (such as the black borders included above and below the picture interface 800), and only add black borders to the projected screen image according to the screen resolution of the mobile phone. This makes the ratio of the resolution of the projected screen image after adding black borders the same as the ratio of the screen resolution of the TV.
  • the television may present a screen projection 810 such as shown in (2) in FIG. 8 . Among them, in the projection screen 810, the upper, lower, left and right sides of the picture interface 800 include black borders.
  • the TV can crop the black borders included in the projected image (such as the black borders included above and below the picture interface 800).
  • the TV can add black borders to the screen projection according to the screen resolution of the mobile phone. After the addition is completed, some of the black borders included in the screen projection (such as the black borders above and below the picture interface 800) are cropped and The ratio of the resolution of the projected screen image after cropping the black borders is the same as the ratio of the screen resolution of the TV.
  • the television may present a screen projection 820 such as shown in (3) in FIG. 8 . Among them, in the projection screen 820, only the left and right sides of the picture interface 800 include black borders.
  • the TV can display the screen projection image in split screen.
  • FIG. 9 shows a schematic diagram of a split-screen display scenario provided by an embodiment of the present application.
  • the split-screen display scenario may refer to the TV using a split-screen method to display one or more of its own interfaces and one or more projection images.
  • the one or more projected images can be projected from the same terminal or from different terminals.
  • the mobile phone displays a picture interface 900.
  • the TV shows Video interface 910.
  • the mobile phone can project the picture interface 900 to the TV for display.
  • the TV receives the picture interface 900 projected from the mobile phone, it no longer adds black borders to the picture interface 900 according to the screen resolution of the mobile phone, but directly adds black borders to the picture interface 900 (for example: the top and bottom (black border) is cropped.
  • the picture interface 900 and the video interface 910 are displayed in a split-screen manner.
  • the TV can present a split-screen interface 920 (that is, the second image) such as shown in (3) in FIG. 9 .
  • the video interface 910 originally displayed on the TV and the mobile phone projection
  • the picture interface that comes over the screen is displayed in 900 split screens.
  • Figure 9 is an example in which the TV only displays its own interface and a projection screen.
  • the split-screen display scenario may also refer to the TV using a split-screen method to display multiple projection images projected from the same projection source.
  • the multiple screen projection images may be different interfaces displayed by the screen projection source at different times.
  • the multiple screen projection images may belong to the same application or different applications.
  • the screen projection source is a mobile phone
  • the mobile phone first displays the running interface of the social application, and then the mobile phone can project the running interface of the social application to the TV for display. Subsequently, the mobile phone switches the social application to run in the background and displays the running interface of the game application. Then the mobile phone projects the running interface of the game application to the TV for display.
  • the TV receives the running interface of the social application and the running interface of the game application, and the TV displays the running interfaces of these two applications in split screens.
  • FIG. 10 shows a schematic diagram of a multi-channel screen projection scenario provided by an embodiment of the present application.
  • the multi-channel projection scenario refers to that multiple different projection sources can project multiple projection images to the same projection destination for display.
  • the screen projection destination Take multiple different screen projection sources as mobile phone 1000 and mobile phone 1010, and the screen projection destination as a TV set as an example.
  • the screen resolutions of mobile phone 1000 and mobile phone 1010 may be the same or different.
  • the mobile phone 1000 displays a picture interface 1001, where the top and bottom of the picture interface 1001 include black borders.
  • the mobile phone 1010 displays the chat interface 1011, where the chat interface 1011 does not include black borders.
  • Both mobile phone 1000 and mobile phone 1010 can project the currently displayed interface to the TV for display.
  • the TV receives the projected images from mobile phone 1000 and mobile phone 1010, it no longer adds black borders to these projected images according to the screen resolution of the mobile phones, but directly adds black edges to the projected images.
  • Cropping for example: since the top and bottom of the picture interface 1001 include black borders, but the chat interface 1011 does not include black borders, therefore, the TV can only crop the top and bottom black borders of the picture interface 1001.
  • the television displays the picture interface 1001 and the chat interface 1011 in a split-screen manner.
  • the TV can present a split-screen interface 1020 (that is, the second image) such as shown in (3) in FIG.
  • the chat interface shown on the screen is displayed in 1011 split screen.
  • the specific area on the TV screen where the projected image is displayed can be random, preset, or fixed. , can also change dynamically, and this application does not impose any limitation on this.
  • the TV can also use other methods to display the projection screen, such as partial overlap.
  • the screencasting process is the same as when the TV uses split-screen display.
  • the screen projection image displayed on the TV may include subtitles and/or barrages, etc.
  • FIG. 11 shows a schematic diagram of a barrage scene provided by an embodiment of the present application.
  • the mobile phone displays a video interface 1100.
  • the video interface 1100 includes one or more barrages, such as “Get moving”, “First day of check-in”, “Hold on!”, “Take a risk” Bubble” etc.
  • the content in one or more barrages may be displayed on the black border included in the video interface 1100. For example: the three words "make a bubble" in the barrage are all displayed on the right black border included in the video interface 1100. Side top.
  • the mobile phone can project the video interface 1100 to the TV for display. Since the left and right black borders included in the video interface 1100 are used to display barrages, after the TV receives the video interface 1100 projected from the mobile phone, it may not perform a cropping operation on the black borders included in the video interface 1100 and directly follow the screen of the mobile phone. Resolution adds black borders to the video interface 1100, so that the ratio of the resolution of the video interface 1100 after the black borders are added is the same as the ratio of the screen resolution of the television.
  • the television may present a projection image 1110 (ie, the second image) such as shown in (2) in FIG. 11 . Among them, in the projection screen 1110, the upper, lower, left and right sides of the video interface 1100 include black borders.
  • the black borders included in the projection screen received by the TV are used to display data (such as bullet screens). Some or all of the black borders included in the projection screen received by the TV are It may not be used to display any data.
  • the data includes but is not limited to one or more of subtitles and barrages.
  • the video interface 1100 includes neither left nor right black borders. Used to display subtitles and/or barrages.
  • the right black border is used to display subtitles and/or barrages.
  • the projection image received by the TV includes black borders
  • all the black borders are not used to display any data, that is, subtitles and/or bullet screens are displayed on the TV
  • part of the black borders are not used to display any data, that is, subtitles and/or barrage are only displayed on part of the black borders included in the projection screen received by the television.
  • the TV can also crop the black borders included in the projection screen, such as cropping part or all of the black borders included in the projection screen that are not used to display any data, that is, performing a black border cropping operation. .
  • the black border cropping operation on the TV in this example please refer to the following.
  • FIG. 12 shows a schematic flowchart of a screen casting method provided by an embodiment of the present application.
  • This screencasting method can be applied to, but is not limited to, the screencasting scenarios described above.
  • the method includes the following steps:
  • the mobile phone and the TV can establish a connection using wired communication technology.
  • a mobile phone and a TV can be connected through a data cable.
  • the mobile phone and the television may use wireless communication technology to establish a connection.
  • wireless communication technology there are two possible ways to establish a connection between terminals using wireless communication. One way is that the terminals know each other's connection information of the other end, and the other way is that each terminal has transmission capabilities.
  • connection information can be the device representation of the terminal, such as: Internet protocol (internet protocol, IP) address, port number or terminal login account, etc.
  • IP Internet protocol
  • the account used to log in to the terminal can be an account provided by the operator, such as a Huawei account, etc.
  • the account used for terminal login can also be an application account, such as a social application account, a video application account, etc.
  • the transmission capability of the terminal may be near field communication capability or long distance communication capability. That is to say, the wireless communication protocol used to establish a connection between terminals, such as a mobile phone and a television, may be a near-field communication protocol such as Wi-Fi protocol, Bluetooth protocol, or NFC protocol, or it may be a cellular network protocol.
  • the user can use the mobile phone to touch the NFC tag of the TV.
  • the mobile phone reads the connection information saved in the NFC tag.
  • the connection information includes the IP address of the TV.
  • the mobile phone can use other protocols, such as Bluetooth protocol, to establish a connection with the TV based on the IP address of the TV.
  • both the mobile phone and the TV have the Bluetooth and Wi-Fi functions turned on.
  • the mobile phone can broadcast Bluetooth signals to discover surrounding terminals.
  • the mobile phone can display a list of discovered devices.
  • the discovered device list can include the identification of the devices discovered by the mobile phone, such as the identification of a television.
  • connection information such as IP addresses, can also be exchanged with the discovered devices.
  • the mobile phone can use the Wi-Fi protocol to establish a connection with the TV based on the IP address of the TV.
  • both the mobile phone and the TV are connected to the cellular network, and the mobile phone and the TV are logged into the same Huawei account. The mobile phone and TV can establish a connection based on the cellular network according to the Huawei account.
  • this application does not place any restrictions on the method used to establish a connection between the mobile phone and the TV.
  • the mobile phone and the TV negotiate the screen resolution of the mobile phone.
  • the TV can obtain the screen resolution of the mobile phone.
  • the screen resolution of the mobile phone is determined. Therefore, the meaning of "negotiation" means that the mobile phone and the TV can interact.
  • the TV sends a request message to the mobile phone to request the mobile phone. screen resolution.
  • the mobile phone sends a response message to the TV, and the response message carries the screen resolution of the mobile phone, so that the TV can obtain the screen resolution of the mobile phone.
  • the purpose of the TV obtaining the screen resolution of the mobile phone is to determine the screen projection transmitted from the mobile phone. resolution.
  • the screen resolutions of different projection sources can be the same or different, and the projection destination can negotiate the corresponding projection sources with different projection sources respectively. end screen resolution.
  • the mobile phone and the TV can use the negotiation process used by the existing screen casting protocol, such as the real time stream protocol (RTSP)-based negotiation process used by the Miracast protocol, to negotiate the screen resolution of the mobile phone. Rate. Since the RTSP negotiation process is an existing technology, this article will not describe it in detail.
  • the messages exchanged between the mobile phone and the TV can be reused in the existing RTSP negotiation process.
  • Messages such as the screen resolution of the mobile phone sent by the mobile phone to the TV, can be carried in the SETUP message of the RTSP negotiation process, or can also be carried in other messages of the RTSP negotiation process.
  • the messages exchanged between the mobile phone and the TV do not need to reuse the messages in the existing RTSP negotiation process, for example: the mobile phone sends a message to the TV
  • the screen resolution of the sending phone can be carried in a newly created message.
  • mobile phones and televisions may also adopt other negotiation processes, which are not limited in this application.
  • the negotiation process between the mobile phone and the TV can be implemented based on the transmission control protocol (TCP) protocol.
  • TCP transmission control protocol
  • it can also be based on other protocol implementation.
  • the mobile phone obtains the screen projection screen.
  • the mobile phone can obtain the content currently displayed on the display screen, such as: video pictures, picture-in-picture, floating windows (such as video chat windows), pictures, PPT and other various contents as screen projections.
  • This application does not limit the casting the specific content of the screen.
  • the projected screen image obtained by the mobile phone does not include black borders.
  • the screen projection image obtained by the mobile phone is the screen projection screen 1310 as shown in (2) in Figure 13.
  • This screen projection image 1310 does not include black borders.
  • the screen projection obtained by the mobile phone can be the screen projection 1410 as shown in (2) in Figure 14.
  • the screen size 1410 also does not include black borders.
  • the screencast image obtained by the mobile phone includes black borders.
  • the screen projection image obtained by the mobile phone is the screen projection screen 1330 as shown in (4) in Figure 13.
  • This screen projection image 1330 includes black borders.
  • the screen projection image obtained by the mobile phone is the screen projection image 1430 as shown in (4) in Figure 14.
  • the projected screen image obtained by the mobile phone may not include black borders.
  • the projected screen image obtained by the mobile phone may also include black borders.
  • one or more positions at the top, bottom, left, right, etc. of the projected screen may include black borders.
  • steps S1202 and step S1203 can be executed at the same time or one after another.
  • Step S1202 can be executed first, or step S1203 can be executed first. This application does not limit this.
  • the black borders included in the screen projection image obtained by the mobile phone may be used to display data, such as subtitles and/or barrage scenes, etc., or may not be used to display data, such as full-screen display scenes, etc.
  • the mobile phone transmits the screen projection image (ie, the first image) to the TV.
  • the TV receives the screen projection from the mobile phone.
  • the mobile phone can obtain the screen projection screen (the screen projection screen 1310 shown in (2) in Figure 13, the screen projection screen 1330 shown in (4) in Figure 13, the screen projection screen shown in (2) in Figure 14
  • the projection screen 1410 shown in the figure, the projection screen 1430 shown in (4) in Figure 14, etc.) are directly transmitted to the TV.
  • the mobile phone can encode the acquired screen projection image and then send it to the TV.
  • the TV receives it, it first decodes it and then obtains the projection screen image.
  • the TV can transmit the screen projection based on the User Datagram Protocol (UDP) protocol, or can transmit the screen projection based on other protocols, which is not limited in this application.
  • UDP User Datagram Protocol
  • the mobile phone directly transmits the acquired screen projection image to the TV, and the mobile phone no longer performs the operation of adding black borders to the projected screen image.
  • the amount of data transmitted between the mobile phone and the TV screen projection screen is reduced. It can increase the transmission efficiency of screen projection.
  • the TV performs black border detection on the projected screen.
  • the TV can perform black border detection on the projected screen.
  • the TV may not perform black border detection on the screen projection screen.
  • the TV can also perform black border detection on the projected screen.
  • the television may not perform the operation of black border detection when it is determined that the received projected image belongs to a preset type of projected image.
  • the operation of black border detection is then performed.
  • the TV when the TV receives a frame of screen projection, it can determine whether the screen projection picture is a preset type of screen projection picture according to the identification of the screen projection picture.
  • the TV when the TV receives a frame of screen projection, it can determine whether the screen projection picture is a preset type of screen projection picture according to the instruction message of the mobile phone. This application does not place any restrictions on the way the TV determines whether a frame of screen projection is a preset type of screen projection.
  • the preset type of screen projection may include, but is not limited to, a screen projection including subtitles and/or barrages.
  • this preset type of screen projection can be set by the developer according to actual needs, and this application does not limit this.
  • the TV when the TV performs black border detection on the projected screen, the TV can perform black border detection on each received frame of the projected screen, or it can perform black border detection every m frames of the projected screen.
  • Detection m is a positive integer, m can be a fixed value or can change dynamically. There is no limit on the timing of black border detection on the TV set in this application.
  • the operation of performing black border detection can also be performed by the mobile phone side, and the television side no longer needs to perform the operation of black border detection.
  • the TV can learn from the mobile phone whether the projected image includes black borders, specifically where the black borders are included, the size of the included black borders, and one or more of the following. For example: after the mobile phone detects black edges on the projected screen, it sends the black edge detection results to the TV. Correspondingly, the TV can learn one or more of the aforementioned situations after receiving the black border detection result of the projected image sent from the mobile phone.
  • the following takes the TV to perform black border detection on the projected screen as an example to explain the method of performing black border detection on the TV.
  • the resolution of the projected image transmitted by the mobile phone to the TV is also 1920*1080P.
  • the resolution of the projected image received by the TV is also 1920 *1080P.
  • the screen projection screen (the screen projection screen 1310 shown in (2) in Figure 13, the screen projection screen shown in (4) in Figure 13
  • the screen (1330 etc.) has a height of 1920 pixels and a width of 1080 pixels.
  • the TV can detect the pixels starting from the outside and working inward. In some examples, the TV can detect each pixel. For example, taking the detection of whether there is a black border at the top of the projection screen, the TV first detects the first row of pixels above. If it determines that the first row of pixels If all the points are black, then it is determined that the first row of pixels is a black border, and then the second row of pixels will continue to be detected downward.
  • n is a positive integer. If it is determined that there are some pixels in the nth row of pixels that are not black, then it is determined that the nth row of pixels is not black, then the TV can determine that the pixels in the first row to the n-1th row above are black. side.
  • the TV can sample and detect pixels. For example: a TV first detects the first row of pixels above. If it is determined that the first row of pixels is a black border, it will continue to detect the kth row of pixels downwards, where k is a positive integer. If it is determined that the pixels in the kth row are all black edges, continue to detect the pixels in the 2k-1th row downward. If it is determined that the pixels in the 2k-1th row are not black edges, then the pixels between the kth row of pixels and the 2k-1th row of pixels are detected. For these pixels, the TV can detect all of them or sample them. Detect until it is determined which pixels are black edges. Based on this solution, the number of pixels detected by the TV can be reduced and the efficiency of black edge detection can be improved.
  • the TV can also use other methods to detect black edges, such as detecting from the inner pixels outward.
  • the TV can detect upwards starting from the pixels in the middle row. This application does not place any restrictions on the method of black border detection on TVs.
  • the process of the TV detecting whether there is a black border in other positions of the projection screen (such as the bottom, left, right, etc.) and the size of the black border can be referred to the above example.
  • the projection screen received by the TV (the projection screen 1410 shown in (2) in Figure 14, the projection screen 1430 shown in (4) in Figure 14, etc.) is displayed on the mobile phone in landscape mode.
  • the TV can also use the method described above to detect whether there are black edges in the projected image.
  • the TV performs black border detection on the projected image
  • the mobile phone since the projected image is the interface originally displayed by the mobile phone, the mobile phone does not perform the operation of adding black borders to it.
  • the number of pixels in the projected image is relatively small.
  • the number of pixels is much smaller. Therefore, when the TV (that is, the screen projection destination) performs black border detection, the number of pixels to be detected is smaller, thereby improving the efficiency of black border detection.
  • the time-consuming requirements for black border detection can be met because the efficiency of black border detection is improved.
  • For low-configuration screen projection destinations even if their computing power is limited, due to the improved efficiency of black border detection, they can also support real-time black border detection requirements.
  • the TV adds black borders to the projected screen according to the resolution of the mobile phone.
  • the TV may not perform this step. If it is determined according to the above step S1206 that there are black edges in the projection screen, the TV may directly perform the Step S1207.
  • the TV can perform this step.
  • the resolution of the projection screen received by the TV is also 1920*1080P.
  • the screen projection screen (The screen projection screen 1310 shown in (2) in Figure 13, the screen projection screen 1330 shown in (4) in Figure 13, etc.) has an aspect ratio of 1920:1080.
  • the height-to-width ratio of the projected screen (the projected screen 1410 shown in (2) in Figure 14, the projected screen 1430 shown in (4) in Figure 14, etc.) is 1080:1920.
  • the TV can add black borders to the projected image.
  • the TV can add black borders to any position of the projected screen (such as one or more positions above, below, left, right, etc.).
  • the size of the black bars added by the TV to each position of the projected image can be the same or different.
  • the projection screen 1310 shown in (2) in FIG. 13 the projection screen after the TV adds black borders to the projection screen 1310 can be the projection screen 1600 as shown in (1) in FIG. 16 .
  • the projection image 1330 shown in (4) in Figure 13 the projection image after the TV adds black borders to the projection image 1330 can be the projection image 1610 as shown in (2) in Figure 16 .
  • the projection image after the TV adds black borders to the projection image 1410 can be the projection image 1620 as shown in (3) in Figure 16 .
  • the projection screen 1430 shown in (4) in FIG. 14 as an example the projection screen after the TV adds black borders to the projection screen 1430 can be the projection screen 1630 as shown in (4) in FIG. 16 .
  • the TV can add black borders to fixed positions of the projected screen image.
  • the vertical screen shape of a mobile phone is usually the shape shown in (1) in Figure 13, that is, the height length of the mobile phone is greater than the width length.
  • the horizontal screen display form of a mobile phone is usually the form shown in (1) in Figure 14, that is, the height of the mobile phone is greater than the width.
  • the shape of a TV is usually similar to the horizontal screen display of a mobile phone, that is, the height of the TV is smaller than the width. Therefore, when the mobile phone displays the screen projection screen vertically (the screen projection screen 1310 shown in (2) in Figure 13, the screen projection screen 1330 shown in (4) in Figure 13, etc.), the height of the screen projection screen The length is greater than the width.
  • the TV can add black borders to the left and/or right of the projection image in a manner such as (1) or (2) in Figure 16 .
  • the mobile phone displays the screen projection screen horizontally (the screen projection screen 1410 shown in (2) in Figure 14, the screen projection screen 1430 shown in (4) in Figure 14, etc.)
  • the height of the screen projection screen The length is less than the width. Therefore, the TV can add black borders to the top and/or bottom of the projection screen in a manner such as (3) or (4) in Figure 16 .
  • (1) and (2) in Figure 16 take the example of the TV adding black borders to the left and right sides of the projected screen, and the added black borders are of the same size.
  • the TV adds black borders to the top and bottom of the projected screen, and the sizes of the added black borders are also the same.
  • this application does not limit the specific location where the TV adds black borders to the projected image, nor does it limit the size of the added black borders.
  • the ratio of the resolution of the projection screen after adding black borders is the same as the screen resolution of the TV, for example, the aspect ratio is 2160:3840.
  • the TV may not perform this step, but directly perform step S1207.
  • black border cropping can be used to make the resolution ratio of the cropped projected screen image to that of the TV screen. rates are the same.
  • the TV can directly perform step S1207 to crop part or all of the black borders included in the received projection image, so that the ratio of the resolution of the cropped projection image is the ratio of the screen resolution of the TV same.
  • this step is based on the example that the ratio of the resolution of the projected image received by the TV is different from the ratio of the screen resolution of the TV.
  • the ratio of the resolution of the projected image received by the TV is the same as the ratio of the screen resolution of the TV, the TV does not need to perform this step.
  • the TV performs black border cropping on the projected screen image.
  • the screen projection image may be the screen projection image after step S1206 is performed, that is, the screen projection image after black borders are added. It may also be the screen projection image described in step S1204, that is, the screen projection image before the TV performs the black border adding operation.
  • the TV may not perform this step when displaying scenes, subtitles and/or barrage scenes in full screen as described above.
  • Step S1208 is executed directly.
  • the subtitles and/or barrage may be displayed on the black border included in the projection screen received by the television, or may not be displayed on the projection screen received by the television.
  • the screen includes a black border.
  • the TV will also add black borders to the screen projection image according to the method described in step S105 in Figure 1. Perform black border cropping operation.
  • the subtitles and/or barrage content included in the projected screen may be displayed in the black borders included in the projected screen, and for different frames of the screen included in the projected screen
  • the display area of the subtitles and/or barrage content in the black border may also be different.
  • the positions of each barrage are as shown in (1) in Figure 11.
  • the three words "make a bubble" in the barrage are all displayed in the video Among the right black borders included in the interface 1100, since the entire right black border of the video interface 1100 after adding black borders at the top and bottom will be occupied by the barrage "bubbles", if the TV Cropping the black borders on the left and right sides of the video interface 1100 will crop out the text in the barrage "Bubble", so the TV does not perform the black border cropping operation. Then, the TV can display images such as in Figure 11 The projection screen 1110 shown in (2).
  • the next frame of video interface displayed by the mobile phone can be the video interface 1700 as shown in (1) in Figure 17.
  • the barrage "make a bubble” only has "a bubble”
  • Two words are displayed in the right black border of the video interface 1700, and the two words “get up” in the barrage “Move” are displayed in the left black border of the video interface 1700. Since the video interface 1700 after adding black borders at the top and bottom, the left black border part is occupied by the barrage word "move", and the right black border part is occupied by the barrage word "gepao". Therefore, the TV can crop the left and right black borders of the video interface 1700 after the black borders are added, such as cutting out the width of a word.
  • the television will also crop the upper and lower black borders. Trim off part of the screen so that the resolution ratio of the cropped projected image is the same as the screen resolution ratio of the TV. Then, the television may present a screen projection 1710 such as shown in (2) in FIG. 17 .
  • the width of the black border included in the screen projection picture shown in (2) in FIG. 11 is different from the width of the black border included in the screen projection picture shown in (2) in FIG. 17 .
  • the size of the black borders of different projection images cropped by the TV is different. Therefore, the size of the black borders included in the projection image finally displayed by the TV is also If the screen is different, the projected image displayed on the TV will jitter and jump, affecting the user's viewing experience.
  • the TV no longer performs the black border cropping operation, and directly adds black borders to the projected screen including subtitles and/or barrage according to the screen resolution of the mobile phone. , so that the ratio of the resolution of the projected screen image is the same as the ratio of the screen resolution of the TV, and then the projected screen image with black borders added is directly displayed. It can avoid the problems of picture jitter and jump caused by the different black borders included in the projection screen of different frames.
  • the projected image received by the TV does not include black borders, and the TV adds black borders above and/or below the projected image. Or the TV adds black borders to the left and/or right of the projected image.
  • the TV adds black borders to the left and right sides of the projection screen 1310 shown in (2) in FIG. 13 .
  • the TV adds black borders to the top and bottom of the screen projection 1410 shown in (2) in Figure 14. That is to say, if the projected screen after adding black borders only has black borders at the top and/or bottom, or only has black borders at the left and/or right, the TV does not need to perform the black border cropping operation. .
  • the projected screen image received by the TV includes black borders, and the TV screen matches the black border in the projected screen image.
  • Black borders are added to positions adjacent to the side positions.
  • the projection screen 1030 shown in (4) in Figure 13 includes black borders at the top and bottom.
  • the screen projection 1610 shown in (2) in Figure 16 TV The machine adds black borders to the left and right sides of the projection screen 1030, as shown in (4) in Figure 14.
  • the left and right sides of the projection screen 1430 include black borders, as shown in (4) in Figure 16.
  • the TV adds black borders at the top and bottom of the projection screen. In this example, the TV does not need to perform this operation.
  • the TV set can also perform this step.
  • the TV can perform black border cropping on the projected screen image after adding black borders.
  • the ratio of the resolution of the cropped screen projection image is the same as the ratio of the screen resolution of the TV.
  • the TV can add the black border Crop one or more black borders included in the projected screen. If subtitles and/or bullet chats are displayed on the black border included in the projection screen received by the TV, the TV will not crop the black border used to display the subtitles and/or barrages, and may trim the black border other than the black border. Other black edges are cropped.
  • the black borders included in the projection screen received by the TV are used to display data (such as subtitles, barrage, etc.), the TV will not use them for that purpose.
  • the black border cropping operation of the displayed data can also avoid the problem of picture jitter and jump caused by the different black borders included in the projection screen of different frames.
  • the TV can directly
  • the screen projection screen is cropped with black borders.
  • the ratio of the resolution of the cropped screen projection image and the ratio of the screen resolution of the TV may be the same or different.
  • the top and bottom of the picture interface 900 shown in (1) in Figure 9 include black borders. After the TV receives the picture interface 900, it can directly display the picture interface 900. Some or all of the included black borders are cropped.
  • the picture interface 1001 shown in (1) in Figure 10 includes black borders at the top and bottom. After the TV receives the picture interface 1001, it can also directly display the picture interface Some or all of the black borders included in 1001 are cropped off.
  • the TV uses a split-screen mode to display the projected image
  • the mobile phone since the projected image received by the TV is the interface originally displayed by the mobile phone, the mobile phone does not add black borders to it.
  • the TV determines that there are black edges in the received projection image, the TV will directly crop the black edges. It only needs to cut off the original black edges of the projection image, which can reduce the need for the TV to use split-screen display.
  • the mobile phone adds black borders to the screencast, and the TV cuts off the added black borders. This is a redundant operation.
  • the TV can perform this step.
  • the TV can crop part or all of the smaller black borders so that the effective content of the projected screen (that is, content other than the black borders) can occupy more of the TV screen.
  • Display area for example: make the largest number of any two adjacent black-bordered positions (for example: top and left, top and right, bottom and left, bottom and right, etc.) of the cropped screen projection.
  • One of the positions includes a black border, which makes the projection effect better and the projection screen clearer.
  • the TV can crop the black borders.
  • the TV can crop the black edges above and below the projection screen 1610.
  • the projection screen 1610 is displayed on the TV, its The top and bottom do not include black borders.
  • part of the black borders on the left and right sides of the projection screen are cropped, so that the ratio of the resolution of the projection screen with the black borders cut off is still the same as the ratio of the screen resolution of the TV, for example , the cropped screen projection image may be as shown in the screen projection image 1800 shown in (1) in Figure 18 .
  • the TV can cut off the blackboards on the left and right sides of the projection screen 1630.
  • the projection screen 1630 when the projection screen 1630 is displayed on the TV, its The left and right sides also do not include black borders.
  • part of the black borders at the top and bottom of the projection screen are cropped, so that the ratio of the resolution of the projection screen with the black borders cut off is still the same as the ratio of the screen resolution of the TV.
  • the cropped screen projection image may be the screen projection image 1810 shown in (2) in Figure 18 as an example.
  • (1) and (2) in Figure 18 both use the TV to add smaller black borders (the black borders at the top and bottom of the projection screen as shown in (2) in Figure 16, and in (2) in Figure 16 4)
  • the black borders on the left and right sides of the projection screen shown are all cropped out as an example.
  • the TV can perform this step.
  • the TV can crop part or all of the black borders that are not used to display any data, so that the effective content of the projected screen can occupy more display area on the TV screen.
  • the TV may first perform step S1206 and then perform step S1207.
  • the resolution of the projection images transmitted to the TV by the same mobile phone that is, the same projection source
  • they can all be the screen resolution of the mobile phone.
  • the screen resolution of the TV is also fixed.
  • the TV can determine that the size of the black borders to be added to these projected images is also the same.
  • the TV does not need to calculate the size of the black borders that need to be added based on the resolution of each projected image. This can save the power consumption of the TV when adding black borders to the projected images. In other words, it can save the TV from adding black borders to each projected image.
  • the power consumption is adjusted according to the proportion of the resolution to adapt to the proportion of its own screen resolution.
  • the TV may also perform step S1207 first and then perform step S1206, which is not limited in this application.
  • step S1207 when the TV first performs step S1207, that is, when the TV first crops the black borders (the black borders are not added by the TV) included in the received projection image, the cropped projection image
  • the resolution and/or the ratio of the resolutions may be the same or different.
  • the TV first crops the black edges of each projection image transmitted from the mobile phone. Since the resolution and/or resolution ratio of the cropped projection images may be different, the TV may need to The resolution and/or ratio of the resolution of each cropped screen projection image is used to calculate the corresponding size of the black border that needs to be added.
  • the TV displays the projection screen.
  • the TV does not perform black border cropping on the projected screen image 1610 such as (2) in Figure 16
  • the projected screen image displayed on the TV set is (1) in Figure 19
  • the screen projection image displayed by the TV is the screen projection image 1920 shown in (3) in Figure 19 .
  • the projection image displayed by the TV can be as shown in (2) in Figure 19.
  • Screen 1910 is shown.
  • the projection image displayed by the TV can be as shown in (4) in Figure 19.
  • the screen projection screen 1930 As shown in the screen projection screen 1930.
  • the projected image displayed on the TV may be as shown in (3) in 9.
  • the TV can obtain the projection screen 2000 shown in FIG. 20 .
  • the TV can display the projection screen 2000 and the video interface 910 shown in (2) in Figure 9 in a split-screen manner.
  • the TV can adopt a left-right split screen method.
  • the TV can display the projected screen 2000 according to the resolution of the projected screen 2000 and the resolution of the video interface 910 shown in (2) in Figure 9 .
  • the height of the video interface 910 shown in (2) in FIG. 9 is adjusted to the same value. It can be understood that since the TV can determine the resolution of the picture interface 900 according to the screen resolution of the mobile phone, and then crop the black border of the picture interface 900, the resolution of the cropped screen projection picture 2000 can also be calculated. It can also be understood that the resolution of the video interface 910 shown in (2) in Figure 9 is the screen resolution of the television.
  • the TV can also add black borders to make the projected image 2000 and the video
  • the resolution ratio of the combined interface 910 is the same as the display ratio of the television.
  • the TV can add black borders to the projection screen 2000 and the video interface 910 respectively, or can add black borders to the entire interface combining the projection screen 2000 and the video interface 910. This application does not limit this.
  • the TV can also use other split-screen methods, such as split-screen up and down to display the projection screen and its own screen. This application does not impose restrictions on this.
  • the projection screen displayed on the TV may be such as the split-screen interface 1020 shown in (3) in Figure 10 .
  • the relevant implementation in the split-screen scenario please refer to the relevant implementation in the split-screen scenario, which will not be described again here.
  • the screen projection image displayed on the TV may be as shown in (2) in Figure 11 .
  • each interface provided by the embodiment of the present application is only a schematic diagram and does not constitute a limitation of the present application. In practical applications, each interface may include more or less content, and may also include more or less content. interface.
  • the screen projection device includes corresponding hardware structures and/or software modules to perform each function.
  • the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is performed in hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solutions of the embodiments of the present application.
  • This application is an embodiment that can divide the screen projection device into functional modules according to the above method examples. For example, it can correspond to each Each function is divided into functional modules, and two or more functions can also be integrated into one processing unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or software function modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.
  • FIG. 21 it is a schematic structural diagram of a screen projection device 2100 provided by an embodiment of the present application.
  • the screen projection device 2100 can be used to implement the methods described in each of the above method embodiments.
  • the screen projection device 2100 may specifically include: a processing unit 2101, a display unit 2102, and a communication unit 2103.
  • the processing unit 2101 is configured to support the screen projection device 2100 in performing steps S1205 to S1207 in FIG. 12 . And/or, the processing unit 2101 is also used to support the screen projection device 2100 to perform other steps performed by the first terminal in the embodiment of the present application.
  • the display unit 2102 is used to support the screen projection device 2100 to perform step S1208 in FIG. 12 . And/or, the display unit 2102 is also used to support the screen projection device 2100 to perform other steps performed by the first terminal in the embodiment of the present application.
  • the communication unit 2103 is used to support the screen projection device 2100 to perform steps S1201 and S1202 in Figure 12 . And/or, the communication unit 2103 is also used to support the screen projection device 2100 to perform other steps performed by the first terminal in the embodiment of the present application.
  • the processing unit 2101 is configured to support the screen projection device 2100 in performing step S1203 in FIG. 12 . And/or, the processing unit 2101 is also used to support the screen projection device 2100 to perform other steps performed by the second terminal in the embodiment of the present application.
  • the display unit 2102 is used to support the screen projection device 2100 to perform display operations. And/or, the display unit 2102 is also used to support the screen projection device 2100 to perform other steps performed by the second terminal in the embodiment of the present application.
  • the communication unit 2103 is used to support the screen projection device 2100 to perform steps S1201 and S1202 in Figure 12 . And/or, the communication unit 2103 is also used to support the screen projection device 2100 to perform other steps performed by the second terminal in the embodiment of the present application.
  • the screen projection device 2100 shown in Figure 21 may also include a storage unit (not shown in Figure 21), which stores programs or instructions.
  • a storage unit not shown in Figure 21
  • the processing unit 2101 executes the program or instruction
  • the screen projection device 2100 shown in FIG. 21 can perform the method shown in FIG. 12 .
  • the processing unit 2101 involved in the screen projection device 2100 shown in Figure 21 can be implemented by a processor or processor-related circuit components, and can be a processor or a processing module.
  • the communication unit 2103 can be implemented by a transceiver or a transceiver-related circuit component, and can be a transceiver or a transceiver module.
  • the display unit 2102 may be implemented by display screen related components.
  • the chip system includes at least one processor 2201 and at least one interface circuit 2202.
  • the processor 2201 and the interface circuit 2202 may be interconnected via wires.
  • interface circuitry 2202 may be used to receive signals from other devices.
  • interface circuit 2202 may be used to send signals to other devices (eg, processor 2201).
  • the interface circuit 2202 can read instructions stored in the memory and send the instructions to the processor 2201.
  • the screen projection device can be caused to perform various steps performed by the first terminal or the second terminal in the above embodiment.
  • the chip system may also include other discrete devices, which are not specifically limited in the embodiments of this application.
  • processors in the chip system there may be one or more processors in the chip system.
  • the processor can be implemented in hardware or software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software code stored in memory.
  • the memory may be integrated with the processor or may be provided separately from the processor, which is not limited by this application.
  • the memory can be a non-transient processor, such as a read-only memory ROM, which can be integrated on the same chip as the processor, or can be separately provided on different chips.
  • This application describes the type of memory, and the relationship between the memory and the processor. There is no specific limitation on how the processor is configured.
  • the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC). It can also be a central processor (central processor unit, CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), or a microcontroller (micro controller unit (MCU), or a programmable logic device (PLD) or other integrated chip.
  • FPGA field programmable gate array
  • ASIC application specific integrated circuit
  • SoC system on chip
  • CPU central processor unit
  • NP network processor
  • DSP digital signal processing circuit
  • MCU microcontroller
  • PLD programmable logic device
  • each step in the above method embodiment can be implemented in the form of integrated logic circuits of hardware in the processor or in the form of software.
  • the instruction is completed.
  • the method steps disclosed in conjunction with the embodiments of this application can be directly implemented by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • Embodiments of the present application also provide a computer storage medium.
  • Computer instructions are stored in the computer storage medium.
  • the screen projection device executes the method described in the above method embodiment.
  • Embodiments of the present application provide a computer program product.
  • the computer program product includes: a computer program or instructions. When the computer program or instructions are run on a computer, the computer is caused to execute the method described in the above method embodiment.
  • the embodiment of the present application also provides a device.
  • This device may be a chip, a component or a module.
  • the device may include a connected processor and a memory.
  • the memory is used to store computer execution instructions. When the device is running, the processing The device can execute computer execution instructions stored in the memory, so that the device executes the methods in each of the above method embodiments.
  • Embodiments of the present application also provide a screen projection system, including a first terminal and a second terminal.
  • the first terminal is used to perform the method performed by the first terminal in the above method embodiment.
  • the second terminal is used to perform the method performed in the above method embodiment. The method executed by the second terminal.
  • the screen projection device, computer storage medium, screen projection system, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the above. The beneficial effects of the corresponding methods provided will not be described again here.
  • a unit described as a separate component may or may not be physically separate.
  • a component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • Integrated units may be stored in a readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
  • the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium , including several instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Transforming Electric Information Into Light Information (AREA)

Abstract

本申请提供一种投屏方法及设备,涉及终端技术领域,能够提高投屏画面的传输效率。方法包括:第一终端接收第二终端启动投屏后发送的第一图像,第一图像为显示在第二终端上的图像;第一终端获取第二终端的屏幕分辨率;第一终端根据第一图像以及第二终端的屏幕分辨率显示第二图像,第二图像为第一图像的投屏图像。

Description

投屏方法及设备
本申请要求于2022年08月29日提交国家知识产权局、申请号为202211042423.0、申请名称为“投屏方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及投屏方法及设备。
背景技术
随着设备协同技术的发展,全场景设备的应用愈加广泛。例如:家庭场景中用于播放视频的终端可以包括但不限于电视、电脑、手机、平板等,手机等小屏终端(以下称为投屏源端)可以将视频画面投屏到电视等大屏终端(以下称为投屏目的端)上显示,以提高用户的观看体验。
现有的投屏方案中,投屏源端先对投屏画面添加黑边,并向投屏目的端发送该投屏画面,投屏目的端对接收到的投屏画面进行处理并显示。该过程中,投屏画面的传输效率低下。
发明内容
本申请提供一种投屏方法及设备,能够提高投屏画面的传输效率。
为达到上述目的,本申请采用如下技术方案:
第一方面,本申请提供一种投屏方法,方法包括:第一终端接收第二终端启动投屏后发送的第一图像,第一图像为显示在第二终端上的图像;第一终端获取第二终端的屏幕分辨率;第一终端根据第一图像以及第二终端的屏幕分辨率显示第二图像,第二图像为第一图像的投屏图像。
基于上述技术方案,在第二终端启动投屏后,第一终端可以接收来自显示在第二终端上的第一图像,还可以获取到第二终端的屏幕分辨率,然后根据第一图像以及第二终端的屏幕分辨率即可显示第二图像。这样,由于第二终端未对第一图像执行添加黑边的操作,第一终端与第二终端之间传输的图像的数据量,相对于执行添加黑边后的图像的数据量减少,因此,能够提高该图像的传输效率,而该图像是第二终端要投屏到第一终端的,因此,能够提高投屏画面的传输效率。
一种可能的设计中,第一图像的分辨率的比例与第一终端的屏幕分辨率的比例不同;第一终端根据第一图像以及第二终端的屏幕分辨率显示第二图像,包括:第一终端根据第二终端的屏幕分辨率确定第一图像的分辨率(或称根据第二终端的屏幕分辨率的比例确定第一图像的分辨率的比例);第一终端调整第一图像的分辨率的比例(或称调整第一图像的分辨率),调整后的第一图像的分辨率的比例与第一终端的屏幕分辨率的比例相同;第一终端根据调整后的第一图像显示第二图像。
基于该设计,在第一图像的分辨率的比例与第一终端的屏幕分辨率的比例不同的情况下,第一终端可以先根据获取到的第二终端的屏幕分辨率确定第一图像的分辨率,如第二终端的屏幕分辨率可以与第一图像的分辨率相同。进而第一终端可以对第一图像的分辨率的比例进行调整,以使得第一图像的分辨率的比例与第一终端的屏幕分辨率的比例相同,使得第一图像能够占据第一终端上更多的显示区域,进而使得投屏画面更加清晰,投屏效果更佳。
一种可能的设计中,第一终端调整第一图像的分辨率的比例,包括:第一终端对第一图像填充黑边,填充黑边后的第一图像的分辨率的比例与第一终端的屏幕分辨率的比例相同。基于该设计,第一终端可以通过为第一图像添加黑边的方式调整第一图像的分辨率的比例,这样可以在不影响第一图像中的内容的显示比例的情况下,达到调整第一图像的分辨率的比例的目的。
一种可能的设计中,在第一终端根据第一图像以及第二终端的屏幕分辨率显示第二图像之前,方法还包括:第一终端根据第一图像的分辨率对第一图像进行黑边检测。
基于该设计,第一终端可以确定第一图像中的哪些区域为有效区域,也即显示有数据的区域,哪些区域为黑边区域,也即可能未显示数据的区域。并且,第一终端进行黑边检测时,由于第二终端未对第一图像执行添加黑边的操作,这样,第一图像的像素点的数目相对于执行添加黑边后的第一图像的像素点的数目要少的多。因此,第一终端要检测的像素点的数目要少,由此可以提高黑边检测的效率。并且,对于高配置的第一终端,比如4K电视机,由于提高了黑边检测的效率,因此,能够满足其对黑边检测的耗时要求。对于低配置的第一终端,即使其计算能力有限, 由于提高了黑边检测的效率,也能够支持实时进行黑边检测的要求等。
一种可能的设计中,黑边检测的结果为第一图像中包括黑边;方法还包括:第一图像中包括的黑边用于显示数据,第一终端不对用于显示数据的第一图像中包括的黑边进行裁剪。
基于该设计,若第一图像中的黑边用于显示数据,比如:字幕、弹幕场景,则第一终端不对这些用于显示数据的黑边进行裁剪,可以避免由于不同帧的投屏画面包括的黑边不同而带来的画面抖动以及跳变的问题。但是,第一终端可以对除这些黑边以外的其他黑边进行裁剪,这样,在解决由于不同帧的投屏画面包括的黑边不同而带来的画面抖动以及跳变的问题的情况下,可以使得第一图像中的有效区域(或称显示数据的区域)占据第一终端上更多的显示区域,进而使得投屏画面更加清晰。
一种可能的设计中,黑边检测的结果为第一图像中包括黑边;方法还包括:第一图像中包括的黑边不用于显示数据,第一终端对填充黑边后的第一图像中包括的黑边进行裁剪,其中,裁剪后的第一图像的分辨率的比例与第一终端的屏幕分辨率的比例相同。基于该设计,若第一图像中包括的黑边不用于显示数据,第一终端可以对这些黑边进行裁剪,可以使得第一图像中的有效区域(或称显示数据的区域)占据第一终端上更多的显示区域,进而使得投屏画面更加清晰。
并且,第一终端可以对填充黑边后的第一图像中包括的黑边进行裁剪,也就是说,第一终端可以先执行添加黑边的操作,再执行黑边裁剪的操作。对于同一个第二终端传输给第一终端的投屏画面的分辨率是相同的,可以均为第二终端的屏幕分辨率。并且,第一终端的屏幕分辨率也是固定的,这样,第一终端在对同一个第二终端传输的投屏画面添加黑边时,由于这些投屏画面均未进行裁剪,其分辨率均是相同的,因此,第一终端可以确定这些投屏画面要添加的黑边大小也是相同的。第一终端无需根据每一个投屏画面的分辨率分别计算需要添加的黑边的大小,可以节省第一终端为投屏画面添加黑边时的功耗,也即可以节省第一终端对每一个投屏画面的分辨率的比例进行调整以适配自身屏幕分辨率的比例的功耗。
一种可能的设计中,数据包括字幕和/或弹幕。
一种可能的设计中,第一终端采用分屏的方式显示第二图像;第一终端根据第一图像以及第二终端的屏幕分辨率显示第二图像,包括:第一终端根据第二终端的屏幕分辨率确定第一图像的分辨率;第一终端根据第一图像的分辨率对第一图像进行黑边检测;第一终端根据黑边检测的结果确定第一图像中包括黑边,第一终端对第一图像中包括的黑边进行裁剪,第一终端根据裁剪后的第一图像显示第二图像。
基于该设计,在第一终端采用分屏的方式显示投屏画面时,若第一终端对该投屏画面进行黑边检测后,确定该投屏画面中包括黑边,则第一终端可以直接对该投屏画面中的黑边进行裁剪。而由于第一终端接收到的投屏画面是第二终端原来显示的界面,第二终端未对其进行添加黑边的操作。这样,第一终端进行黑边裁剪时,仅需要裁减掉投屏画面原有的黑边,可以减少第一终端采用分屏显示的投屏场景下,第二终端为投屏画面添加了黑边,而第一终端又将该添加的黑边裁剪掉的冗余操作。
一种可能的设计中,第一终端采用分屏的方式显示第二图像;第一终端根据第一图像以及第二终端的屏幕分辨率显示第二图像,包括:第一终端根据第二终端的屏幕分辨率确定第一图像的分辨率;第一终端根据第一图像的分辨率对第一图像进行黑边检测;第一终端根据黑边检测的结果确定第一图像中不包括黑边,第一终端根据第一图像显示第二图像。基于该设计,在第一终端采用分屏的方式显示投屏时,若第一终端对该投屏画面进行黑边检测后,确定该投屏画面中不包括黑边,则第一终端可以直接根据该投屏画面显示对应的界面。
一种可能的设计中,方法还包括:第一终端还显示第三图像,第三图像与第二图像分屏显示;其中,第三图像为显示在第三终端上的图像的投屏图像;或者,第三图像为第一终端上原始输出的图像;或者,第三图像为显示在第二终端上的图像的投屏图像。
第二方面,本申请提供一种投屏方法,方法包括:第二终端显示第一图像;第二终端启动投屏后,向第一终端发送第一图像以及第二终端的屏幕分辨率,第一图像以及第二终端的屏幕分辨率用于第一终端显示第二图像,第二图像为第一图像的投屏图像。
第三方面,本申请提供一种投屏设备,该投屏设备具有实现如上述第一方面或第二方面及其 中任一设计所述的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第四方面,本申请提供一种投屏设备,包括:处理器、存储器、通信接口和显示屏,存储器、显示屏、通信接口与处理器耦合,通信接口用于与其他设备通信,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,处理器从存储器中读取计算机指令,以使得投屏设备执行如上述第一方面或第二方面及其中任一设计所述的方法。
可选的,该存储器可以与处理器耦合,或者,也可以独立于该处理器。示例性的,该通信接口可以为收发器、输入/输出接口、接口电路、输出电路、输入电路、管脚或相关电路等。
第五方面,本申请提供一种计算机可读存储介质,计算机可读存储介质包括计算机程序或指令,当计算机程序或指令在投屏设备上运行的情况下,使得投屏设备执行如上述第一方面或第二方面及其中任一设计所述的方法。
第六方面,本申请提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机可以执行如上述第一方面或第二方面及其中任一设计所述的方法。
第七方面,本申请提供一种芯片系统,包括至少一个处理器和至少一个接口电路,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,当至少一个处理器执行指令时,至少一个处理器执行如上述第一方面或第二方面及其中任一设计所述的方法。
第八方面,本申请提供一种投屏系统,包括第一终端以及第二终端,第一终端用于执行如上述第一方面及其中任一设计所述的方法,第二终端用于执行如上述第二方面及其中任一设计所述的方法。
需要说明的是,上述第二方面至第八方面中任一设计所带来的技术效果可以参见第一方面中对应设计所带来的技术效果,此处不再赘述。
附图说明
图1为现有的一种投屏方法的流程示意图;
图2为本申请实施例提供的界面示意图一;
图3为本申请实施例提供的界面示意图二;
图4为本申请实施例提供的界面示意图三;
图5为本申请实施例提供的一种通信系统的架构示意图;
图6为本申请实施例提供的一种终端的结构示意图;
图7a为本申请实施例提供的另一种终端的结构示意图;
图7b为本申请实施例提供的一种终端的软件结构框图;
图8为本申请实施例提供的界面示意图四;
图9为本申请实施例提供的界面示意图五;
图10为本申请实施例提供的界面示意图六;
图11为本申请实施例提供的界面示意图七;
图12为本申请实施例提供的一种投屏方法的流程示意图;
图13为本申请实施例提供的界面示意图八;
图14为本申请实施例提供的界面示意图九;
图15为本申请实施例提供的一种投屏画面的像素点的示意图;
图16为本申请实施例提供的界面示意图十;
图17为本申请实施例提供的界面示意图十一;
图18为本申请实施例提供的界面示意图十二;
图19为本申请实施例提供的界面示意图十三;
图20为本申请实施例提供的界面示意图十四;
图21为本申请实施例提供的一种投屏设备的结构示意图;
图22为本申请实施例提供的一种芯片系统的结构示意图。
具体实施方式
下面结合附图对本申请实施例提供的投屏方法及设备进行详尽的描述。
本申请的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括其他没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请的描述中,除非另有说明,“多个”的含义是指两个或两个以上。本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
目前,为提高用户体验,多个终端可以连接在一起配合使用。比如:在两个终端建立连接后,利用多屏协同可实现这两个终端间的配合使用。多屏协同可利用镜像投屏方式,将一个终端显示的界面投射到另一个终端的显示屏上显示。如,在本申请实施例中,可以将投射其显示界面的终端称为投屏源端,接收投屏源端的投射并显示投屏源端显示界面的终端称为投屏目的端。将投屏目的端上显示的投屏源端投射的界面称为投屏画面(或称投屏界面)。
通常情况下,投屏源端与投屏目的端的屏幕分辨率是不同的。因此,目前的投屏方案中,投屏源端会按照投屏目的端的屏幕分辨率对投屏画面添加黑边,以向投屏目的端发送与其屏幕分辨率适配的投屏画面。
示例性的,以投屏源端为手机,投屏目的端为电视机为例,图1示出了现有的一种投屏方法的流程示意图。如图1所示,该投屏方法包括以下步骤:
S101、手机与电视机协商电视机的屏幕分辨率。
其中,手机通过该步骤可获取电视机的屏幕分辨率。
S102、手机获取投屏画面。
其中,手机可以获取当前显示的界面作为投屏画面。示例性的,以手机显示图2中(1)所示的图片界面200为例,手机获取到的投屏画面可以如图2中的(2)所示的投屏画面210。
S103、手机根据电视机的屏幕分辨率对投屏画面添加黑边。
示例性,以图2中(1)所示的手机的屏幕分辨率为1920*1080像素(pix,P),即手机的长(或称高)为1920P,宽为1080P,图3中(3)所示的电视机的屏幕分辨率为2160*3840P,即电视机的高为2160P,宽为3840P为例。
由于图2中(1)所示的手机的屏幕分辨率为1920*1080P,而手机的屏幕分辨率与手机获取到的投屏画面的分辨率相同,因此图2中(2)所示的投屏画面210的分辨率也为1920*1080P。手机可以根据电视机的屏幕分辨率(如图3中(3)所示的电视机的屏幕分辨率)对诸如图2中(2)所示的投屏画面210的左右两侧添加黑边,示例性的,添加黑边后的投屏画面可以如图3中(1)所示的投屏画面300所示。其中,图3中(1)所示的投屏画面300的分辨率的比例与图3中(3)所示的电视机的屏幕分辨率的比例相同,高宽比均为2160:3840。可以理解,本申请实施例中所涉及的分辨率的比例,均为高和宽的比值。
可选的,关于后文所述的方位的介绍,均可参考图3中(1)所示的方位的介绍,以下不再示出。
S104、手机向电视机发送添加黑边后的投屏画面。相应的,电视机接收来自手机的添加黑边后的投屏画面。
S105、电视机进行黑边检测、黑边裁剪并显示投屏画面。
例如,手机可以对诸如图3中(1)所示的投屏画面300进行黑边检测,也即判断该投屏画面300的哪些区域为黑边。然后,在确定图3中(1)所示的投屏画面300至少三方存在黑边的情况下,电视机可以对诸如图3中(1)所示的投屏画面300进行黑边裁剪,比如:电视机可以对图3中(1)所示的投屏画面300的上下黑边进行裁剪,然后相应的对投屏画面300的左右黑边也进行 适量裁剪,以使得裁剪后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。示例性的,裁剪后的投屏画面可以如图3中(2)所示的投屏画面310所示。最后,电视机可以显示进行黑边裁剪后的投屏画面。示例性的,电视机可以呈现图3中(3)所示的投屏画面320。
上述投屏方案中,手机(即投屏源端)对投屏画面添加黑边后传输给电视机(投屏目的端),这样,由于传输的投屏画面的数据量增加,会降低投屏画面的传输效率。并且,随着投屏目的端的屏幕分辨率越来越高,投屏源端需要添加更多的黑边,这样由于传输的投屏画面的数据量更多,会使得投屏画面的传输效率更加低下。
另外,投屏目的端接收到来自投屏源端的添加有黑边的投屏画面之后,若对其进行黑边检测,由于投屏画面中的黑边增加,投屏画面的像素点也会增加,这样,投屏目的端在进行黑边检测时,要检测的像素点增多,也会降低投屏目的端进行黑边检测的效率。并且投屏源端添加的黑边像素点的数目甚至可能多于其获取到的原有投屏画面的像素点的数目,这样,会大大增加投屏目的端进行黑边检测的功耗,且使得黑边检测的效率更加低下。并且,对于高配置的投屏目的端,比如4K电视机,对于其进行黑边检测的耗时是有要求的,该方案并不能满足该要求。对于低配置的投屏目的端,由于其计算能力有限,若采用该方案进行黑边检测,并不能支持实时进行黑边检测的要求等。
此外,在投屏目的端采用分屏的方式显示投屏画面的场景下,如图4所示,投屏目的端上同时显示有一个或多个投屏源端传输过来的投屏画面(图4中仅示出了一个,如投屏画面410)以及自身的一个或多个界面(图4中仅示出了一个,如视频界面400),或者,投屏目的端上同时显示有多个不同投屏源端传输过来的投屏画面(图中未示出)。上述投屏方案中,投屏源端也会按照上述步骤S103所述的方法对投屏画面(如投屏画面410)添加黑边,但是投屏目的端在进行黑边检测以及黑边裁剪的过程中,会将该投屏源端添加的黑边重新裁剪掉。
以投屏画面410通过图2中(2)所示的投屏画面210得到为例,手机对图2中(2)所示的投屏画面210添加左右黑边后的投屏画面如图3中(1)所示的投屏画面300所示。电视机在接收到该投屏画面300之后,会将投屏画面300的上下黑边以及左右黑边均裁剪掉,也即手机为投屏画面添加的黑边又被重新裁剪掉,因此,该方案存在冗余处理。
基于此,本申请实施例提供一种投屏方法,该方法可以应用于多个终端协同使用时,投屏源端将投屏画面投射至投屏目的端显示的场景中。该投屏方法能够提高投屏数据的传输效率。还能提高投屏目的端进行黑边检测的效率。还可以减少投屏目的端采用分屏显示的场景下的冗余操作处理。
示例性的,本申请实施例提供的投屏方法可以应用于全屏显示场景、分屏显示场景、多路投屏场景以及字幕和/或弹幕投屏场景等各种投屏场景。
示例性的,图5示出了本申请实施例提供的一种应用本申请实施例提供的投屏方法的系统架构的示意图。如图5所示,该系统包括至少一个第一终端501(图5中仅示出了3个)以及第二终端502。
其中,第一终端501与第二终端502可通过有线通信技术和/或无线通信技术建立连接。基于建立的连接,第一终端501与第二终端502可配合一起使用。其中,其中,无线通信技术包括但不限于以下的至少一种:近距离无线通信(near field communication,NFC),蓝牙(bluetooth,BT)(例如,传统蓝牙或者低功耗(bluetooth low energy,BLE)蓝牙),无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),紫蜂(Zigbee),调频(frequency modulation,FM),红外(infrared,IR)等。
在一些实施例中,第一终端501与第二终端502都支持靠近发现功能。示例性地,第一终端501靠近第二终端502后,第一终端501和第二终端502能够互相发现对方,之后建立诸如Wi-Fi端到端(peer to peer,P2P)连接、蓝牙连接等无线通信连接。在建立无线通信连接后,第一终端501与第二终端502可通过该无线通信连接实现信号交互。
在一些实施例中,第一终端501与第二终端502通过局域网,建立无线通信连接。比如,第一终端501与第二终端502都连接至同一路由器。
在一些实施例中,第一终端501与第二终端502通过蜂窝网络、因特网等,建立无线通信连 接。比如,第二终端502通过路由器接入因特网,第一终端501通过蜂窝网络接入因特网;进而,第一终端501与第二终端502建立无线通信连接。
在第一终端501与第二终端502连接后,第一终端501和第二终端502中的投屏源端可将投屏画面投射到投屏目的端的显示屏上显示。如,以第一终端501作为投屏源端,第二终端502作为投屏目的端为例。第一终端501可将其显示屏上显示的界面投射到第二终端502的显示屏上显示。
可选的,本申请实施例中的终端,如上述第一终端501,又如上述第二终端502,可以为手机,平板电脑,手持计算机,PC,电视机,蜂窝电话,个人数字助理(personal digital assistant,PDA),可穿戴式设备(如智能手表),车载电脑,游戏机,以及增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备,智能家居设备、智慧城市设备等,本实施例对终端的具体形式不做特殊限制。终端安装的操作系统包括但不限于 或者其它操作系统。在一些实施例中,终端可以为固定式设备,也可以为便携式设备。本申请对终端的具体类型、所安装的操作系统均不作限制。
其中,图5中以第一终端501为手机、平板电脑,第二终端502为电视机示出。
在本申请实施例中,以终端为手机为例。请参考图6,为本申请实施例提供的一种手机600的结构示意图。
手机600可以包括处理器610,外部存储器接口620,内部存储器621,通用串行总线(universal serial bus,USB)接口630,充电管理模块640,电源管理模块641,电池642,天线1,天线2,移动通信模块650,无线通信模块660,音频模块670,传感器模块680,按键690,马达691,指示器692,摄像头693,显示屏694,以及用户标识模块(subscriber identification module,SIM)卡接口695等。
处理器610可以包括一个或多个处理单元,例如:处理器610可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器610中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器610中的存储器为高速缓冲存储器。该存储器可以保存处理器610刚用过或循环使用的指令或数据。如果处理器610需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器610的等待时间,因而提高了系统的效率。
在一些实施例中,处理器610可以包括一个或多个接口。
充电管理模块640用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。
电源管理模块641用于连接电池642,充电管理模块640与处理器610。电源管理模块641接收电池642和/或充电管理模块640的输入,为处理器610,内部存储器621,显示屏694,摄像头693,和无线通信模块660等供电。
手机600的无线通信功能可以通过天线1,天线2,移动通信模块650,无线通信模块660,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。手机600中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块650可以提供应用在手机600上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块650可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。在一些实施例中,移动通信模块650的至少部分功能模块可以被设置于处理器610中。在一些实施例中,移动通信模块650的至少部分功能模块可以与处理器610的至少部分模块被设置在同一个器件中。
无线通信模块660可以提供应用在手机600上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块660可以是集成至少一个通信处理模块的一个或多个器件。
在一些实施例中,手机600的天线1和移动通信模块650耦合,天线2和无线通信模块660耦合,使得手机600可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。
手机600通过GPU,显示屏694,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏694和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器610可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏694用于显示图像,视频等。显示屏694包括显示面板。在一些实施例中,手机600可以包括1个或N个显示屏694,N为大于1的正整数。
手机600可以通过ISP,摄像头693,视频编解码器,GPU,显示屏694以及应用处理器等实现拍摄功能。
摄像头693用于捕获静态图像或视频。在一些实施例中,手机600可以包括1个或N个摄像头693,N为大于1的正整数。
外部存储器接口620可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机600的存储能力。外部存储卡通过外部存储器接口620与处理器610通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器621可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器621可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机600使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器621可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器610通过运行存储在内部存储器621的指令,和/或存储在设置于处理器中的存储器的指令,执行手机600的各种功能应用以及数据处理。
手机600可以通过音频模块670,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块670用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块670还可以用于对音频信号编码和解码。在一些实施例中,音频模块670可以设置于处理器610中,或将音频模块670的部分功能模块设置于处理器610中。
可选的,传感器模块680可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等中的一种或多种。
按键690包括开机键,音量键等。按键690可以是机械按键。也可以是触摸式按键。手机600可以接收按键输入,产生与手机600的用户设置以及功能控制有关的键信号输入。
马达691可以产生振动提示。马达691可以用于来电振动提示,也可以用于触摸振动反馈。
指示器692可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口695用于连接SIM卡。
可以理解的是,上述仅以手机举例说明本申请实施例中终端的结构,但并不构成对终端结构、形态的限制。本申请实施例对终端的结构、形态不做限制。示例性的,图7a示出了本申请实施例提供的终端的另一种示例性结构。如图7a所示,终端包括:处理器701、存储器702、收发器703、 显示屏704。处理器701、存储器702、显示屏704的实现可参见手机600的处理器、存储器、显示屏的实现。收发器703,用于终端与其他设备(比如电子设备)交互。收发器703可以是基于诸如Wi-Fi、蓝牙或其他通信协议的器件。
在本申请另一些实施例中,终端可以包括比图6、图7a所示的更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
示例性的,终端的软件架构可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构等等。图7b示出了本申请实施例提供的一种终端的软件结构框图。如图7b所示,投屏源端包括协商模块711、传输模块712、编码模块713等。投屏目的端包括协商模块714,传输模块715,解码模拟716,黑边处理模块717等。
其中,投屏源端的协商模块711用于与投屏目的端的协商模块714进行交互,以协商投屏源端的屏幕分辨率,通过该协商过程,投屏目的端即可获取到投屏源端的屏幕分辨率。投屏源端的编码模块713用于将投屏源端的投屏画面进行编码,然后通过传输模块712发送给投屏目的端的传输模块715。相应的,投屏目的端通过传输模块715接收到来自投屏源端的经过编码的投屏画面之后,通过解码模块716进行解码,以获得投屏画面。然后,通过黑边处理模块717对获得的投屏画面进行黑边检测、按照投屏源端的屏幕分辨率为投屏画面添加黑边、进行黑边裁剪等中的一个或多个操作,关于这些操作的具体介绍请参考后文所述。
可以理解,图7b所示的投屏源端以及投屏目的端包括的软件模块仅作为一种可能的划分方式,其也可以包括更多或者更少的模块,也可以有其他的划分方式,本申请对此不做限制。
以下实施例所涉及的技术方案均可以在具有如图6、图7a、图7b所示结构的装置中实现。
可以理解的,本申请实施例中,第一终端和/或第二终端可以执行本申请实施例中的部分或全部步骤,这些步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照本申请实施例呈现的不同的顺序来执行,并且有可能并非要执行本申请实施例中的全部操作。
以下均以第一终端为手机,第二终端为电视机,手机作为投屏源端,电视机作为投屏目的端为例,对本申请实施例提供的投屏方法进行详细的介绍。
在一些投屏场景中,电视机可以采用全屏的方式显示投屏画面。示例性的,图8示出了本申请实施例提供的一种全屏显示场景的示意图。示例性的,如图8中(1)所示,手机显示图片界面800,其中图片界面800的上方以及下方均包括黑边。手机可以将图片界面800投屏到电视机上显示。相应的,电视机接收到手机投屏过来的图片界面800之后,可以以全屏的方式的显示该图片界面800,也即电视机上仅显示一个投屏画面。
在一些实施例中,电视机可以不对投屏画面包括的黑边(如图片界面800上方以及下方包括的黑边)进行裁剪,仅按照手机的屏幕分辨率对该投屏画面添加黑边,以使得添加黑边后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。示例性的,电视机可以呈现诸如图8中(2)所示的投屏画面810。其中,在投屏画面810中,图片界面800的上方、下方、左方以及右方均包括黑边。
在另一些实施例中,电视机可以对投屏画面包括的黑边(如图片界面800上方以及下方包括的黑边)进行裁剪。比如:电视机可以按照手机的屏幕分辨率对投屏画面添加黑边,添加完成之后,将投屏画面包括的某些黑边(如图片界面800上方以及下方包括的黑边)进行裁剪,并使得裁剪黑边后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。示例性的,电视机可以呈现诸如图8中(3)所示的投屏画面820。其中,在投屏画面820中,图片界面800仅左方以及右方包括黑边。
在另一些投屏场景中,电视机可以采用分屏的方式显示投屏画面。
具体的,在一些示例中,图9示出了本申请实施例提供的一种分屏显示场景的示意图。其中,分屏显示场景可以指,电视机采用分屏的方式显示一个或多个自身的界面以及一个或多个投屏画面。可选的,这一个或多个投屏画面可以为同一个终端投屏过来的,也可以为不同终端投屏过来的。示例性的,如图9中(1)所示,手机显示图片界面900。如图9中(2)所示,电视机显示 视频界面910。手机可以将图片界面900投屏到电视机上显示。相应的,电视机接收到手机投屏过来的图片界面900之后,不再按照手机的屏幕分辨率对图片界面900添加黑边,而是直接对图片界面900的黑边(比如:上方以及下方的黑边)进行裁剪,裁剪完成之后,以分屏的方式显示该图片界面900与视频界面910。示例性的,电视机可以呈现诸如图9中(3)所示的分屏界面920(也即第二图像),其中,在分屏界面920中,电视机上原来显示的视频界面910以及手机投屏过来的图片界面900分屏显示。其中,图9是以电视机仅显示一个自身的界面以及一个投屏画面为例的。
在另一些示例中,分屏显示场景还可以指,电视机采用分屏的方式显示多个由同一个投屏源端投屏过来的投屏画面。可选的,这多个投屏画面可以是该投屏源端在不同时刻显示的不同界面,这多个投屏画面可以属于同一应用,也可以属于不同应用。比如:以投屏源端为手机为例,手机先显示社交应用的运行界面,然后手机可以将该社交应用的运行界面投屏到电视机显示。随后,手机将社交应用切换到后台运行,并显示游戏应用的运行界面,然后手机又将该游戏应用的运行界面投屏到电视机显示。相应的,电视机接收到社交应用的运行界面以及游戏应用的运行界面,电视机将这两个应用的运行界面分屏显示。
在又一些示例中,图10示出了本申请实施例提供的一种多路投屏场景的示意图。其中,多路投屏场景指的是,多个不同的投屏源端可以将多个投屏画面投屏到同一个投屏目的端显示。以多个不同的投屏源端为手机1000以及手机1010,投屏目的端为电视机为例。可选的,手机1000与手机1010的屏幕分辨率可以相同也可以不同。
示例性的,如图10中(1)所示,手机1000显示图片界面1001,其中,图片界面1001的上方以及下方包括黑边。如图10中(2)所示,手机1010显示聊天界面1011,其中,聊天界面1011中不包括黑边。手机1000以及手机1010均可将当前显示的界面投屏到电视机上显示。相应的,电视机接收到手机1000以及手机1010投屏过来的投屏画面之后,也不再对这些投屏画面按照手机的屏幕分辨率添加黑边,而是直接对投屏画面的黑边进行裁剪,比如:由于图片界面1001的上方以及下方包括黑边,而聊天界面1011中不包括黑边,因此,电视机可以仅对图片界面1001的上方以及下方的黑边进行裁剪,裁剪完成之后,电视机以分屏的方式显示该图片界面1001以及聊天界面1011。示例性,电视机可以呈现诸如图10中(3)所示的分屏界面1020(也即第二图像),其中在分屏界面1020中,手机1000投屏过来的图片界面1001与手机1010投屏过来的聊天界面1011分屏显示。
可选的,在电视机采用分屏的方式显示投屏画面的场景中,投屏画面具体显示在电视机屏幕的哪个区域,可以是随机的,也可以是预先设定的,可以是固定的,也可以动态变化,本申请对此不做任何限定。
可选的,电视机也可以采用其他的方式显示投屏画面,比如:部分重叠的方式。其投屏过程与电视机采用分屏显示时的投屏过程相同。
在又一些投屏场景中,电视机显示的投屏画面中可能包括字幕和/或弹幕等。以弹幕场景为例,示例性的,图11示出了本申请实施例提供的一种弹幕场景的示意图。如图11中(1)所示,手机显示视频界面1100,其中在视频界面1100包括一个或多个弹幕,如“动起来”、“打卡第一天”、“坚持!”、“冒个泡”等。可选的,这一个或多个弹幕中的内容可能显示在视频界面1100包括的黑边上面,比如:弹幕“冒个泡”中三个字均显示于视频界面1100包括的右侧黑边上面。手机可以将视频界面1100投屏到电视机上显示。由于视频界面1100包括的左右黑边均用于显示弹幕,因此电视机接收到手机投屏过来的视频界面1100之后,可以不对视频界面1100中包括的黑边执行裁剪操作,直接按照手机的屏幕分辨率对视频界面1100添加黑边,以使得添加黑边后的视频界面1100的分辨率的比例与电视机的屏幕分辨率的比例相同。示例性的,电视机可以呈现诸如图11中(2)所示的投屏画面1110(也即第二图像)。其中,在投屏画面1110中,视频界面1100的上方、下方、左方以及右方均包括黑边。
可以理解,上述示例是以电视机接收到的投屏画面包括的黑边均用于显示数据(如弹幕)为例的,电视机接收到的投屏画面包括的黑边中的部分或全部也可能不用于显示任何数据,示例性的,该数据包括但不限于字幕、弹幕中的一种或多种。比如:视频界面1100包括的左右黑边均不 用于显示字幕和/或弹幕。再比如:视频界面1100包括的左右黑边中,仅右侧黑边用于显示字幕和/或弹幕。
可选的,该投屏场景中,电视机接收到的投屏画面包括黑边的情况下,若全部黑边均未用于显示任何数据,也就是说,字幕和/或弹幕显示于电视机接收到的投屏画面中包括的除黑边以外的区域。或者,部分黑边未用于显示任何数据,也就是说,字幕和/或弹幕仅显示于电视机接收到的投屏画面中包括的黑边中的部分黑边上。则电视机也可对该投屏画面中包括的黑边进行裁剪,如对投屏画面中包括的不用于显示任何数据的黑边中的部分或全部进行裁剪,也即执行黑边裁剪的操作。关于该示例下,电视机执行黑边裁剪操作的具体实现请参考后文所述。
示例性,图12示出了本申请实施例提供的一种投屏方法的流程示意图。该投屏方法可以适用于但不限于上文所述的投屏场景中。如图12所示,该方法包括以下步骤:
S1201、手机与电视机建立连接。
其中,手机与电视机建立连接的方式有多种,在一些实施例中,手机与电视机可以采用有线通信技术建立连接。例如:手机和电视机可以通过数据线建立连接。
在其他的一些实施例中,手机与电视机可以采用无线通信技术建立连接。在一些示例中,终端之间采用无线通信方式建立连接有两种可能的方式,一种方式是终端之间互相知晓对端的连接信息,另一种方式是各终端具有传输能力。
其中,连接信息可以是终端的设备表示,如:互联网协议(internet protocol,IP)地址,端口号或终端登录的账号等。终端登录的账号可以是运营商为用户提供的账号,如华为账号等。终端登录的账号还可以为应用的账号,如社交应用的账号,视频应用的账号等。
终端具有传输能力可以是近场通信能力,也可以是长距离通信能力。也就是说,终端间,如手机与电视机建立连接采用的无线通信协议可以是如Wi-Fi协议或蓝牙协议或NFC协议等近场通信协议,也可以是蜂窝网协议。例如:用户可使用手机触碰电视机的NFC标签。手机读取该NFC标签中保存的连接信息,如该连接信息中包括电视机的IP地址。之后,手机可根据电视机的IP地址采用其他协议,如蓝牙协议与电视机建立连接。
又例如,手机与电视机均打开了蓝牙功能和Wi-Fi功能。手机可广播蓝牙信号,以发现周围的终端,如手机可显示发现的设备列表,该发现设备列表中可包括手机发现的设备的标识,如包括电视机的标识。在手机进行设备发现的过程中也可与发现的设备互相交换连接信息,如IP地址。之后,在手机接收到用户在显示的设备列表中选择电视机的标识的操作后,手机根据电视机的IP地址,可采用Wi-Fi协议与电视机建立连接。再例如,手机和电视机均接入了蜂窝网,手机与电视机登录了同一华为账号。手机与电视机可根据该华为账号基于蜂窝网建立连接。
可选地,本申请对手机与电视机建立连接所采用的方式不做任何限制。
S1202、手机与电视机协商手机的屏幕分辨率。
基于该步骤,电视机可以获取到手机的屏幕分辨率。可以理解,本申请实施例中,手机的屏幕分辨率是确定的,因此,“协商”的含义指的是手机和电视机可以通过交互,比如:电视机向手机发送请求消息,用于请求手机的屏幕分辨率。相应的,手机向电视机发送响应消息,该响应消息中携带有手机的屏幕分辨率,由此电视机可以获取到手机的屏幕分辨率。可以理解,由于手机的屏幕分辨率与该手机投屏到电视机的投屏画面的分辨率是相同的,因此,电视机获取手机的屏幕分辨率的目的在于确定该手机传输过来的投屏画面的分辨率。
可选的,在上述分屏显示场景以及多路投屏场景下,不同投屏源端的屏幕分辨率可以相同也可以不同,投屏目的端可以分别与不同投屏源端协商对应的投屏源端的屏幕分辨率。
在一些示例中,手机和电视机可以采用现有的投屏协议采用的协商流程,如Miracast协议采用的基于实时流传输协议(real time stream protocol,RTSP)的协商流程,以协商手机的屏幕分辨率。鉴于RTSP的协商流程为现有技术,本文不再详细赘述。示例性的,该步骤中,手机与电视机之间交互的消息(如:电视机向手机发送的请求消息、手机向电视机发送的响应消息等)可以复用现有的RTSP协商流程中的消息,比如:手机向电视机发送的手机的屏幕分辨率可以携带在RTSP协商流程的SETUP消息中,或者,也可以携带在RTSP协商流程的其他消息中。当然,手机与电视机之间交互的消息也可以不复用现有的RTSP协商流程中的消息,比如:手机向电视机 发送的手机的屏幕分辨率可以携带在一条新创建的消息中。
在其他的示例中,手机和电视机也可以采用其他的协商流程,本申请对此不做限定。
可选的,该步骤中,由于手机和电视机之间需要进行交互,因此手机和电视机之间的协商过程可以基于传输控制协议(transmission control protocol,TCP)协议实现,当然,也可以基于其他的协议实现。
S1203、手机获取投屏画面。
其中,手机可以获取当前显示屏上显示的内容,例如:视频画面、画中画、悬浮窗(如视频聊天窗),图片,PPT等各种内容作为投屏画面,本申请并不限定该投屏画面的具体内容。
在一些场景中,手机获取到的投屏画面中是不包括黑边的。例如:在手机竖屏显示诸如图13中(1)所示的聊天界面1300的情况下,手机获取到的投屏画面如图13中(2)所示的投屏画面1310,该投屏画面1310是不包括黑边的。又例如,在手机横屏显示诸如图14中(1)所示的聊天界面1400的情况下,手机获取到的投屏画面可以如图14中(2)所示的投屏画面1410,该投屏画面1410也是不包括黑边的。
在另一些场景中,手机获取到的投屏画面中是包括黑边的。例如:在手机竖屏显示诸如图13中(3)所示的图片界面1320的情况下,手机获取到的投屏画面如图13中(4)所示的投屏画面1330,该投屏画面1330是包括黑边的,如投屏画面1330的上方以及下方存在黑边。又例如,在手机横屏显示诸如图14中(3)所示的图片界面1420的情况下,手机获取到的投屏画面如图14中(4)所示的投屏画面1430,该投屏画面1430的左方以及右方存在黑边。
也就是说,在手机上显示的界面不包括黑边的情况下,手机获取到的投屏画面也可能不包括黑边。在手机上显示的界面包括黑边的情况下,手机获取到的投屏画面也可能包括黑边。可选的,投屏画面的上方、下方、左方以及右方等中的一个或多个位置都可能包括黑边。
可选的,上述步骤S1202以及步骤S1203可以同时执行也可以先后执行,可以先执行步骤S1202,也可以先执行步骤S1203,本申请对此不做限定。
可选的,该场景中,手机获取到的投屏画面中包括的黑边可能用于显示数据,如字幕和/或弹幕场景等,也可能不用于显示数据,如全屏显示场景等。
S1204、手机向电视机传输投屏画面(即第一图像)。相应的,电视机接收来自手机的投屏画面。
其中,手机可以将获取到的投屏画面(如图13中(2)所示的投屏画面1310、如图13中(4)所示的投屏画面1330、如图14中(2)所示的投屏画面1410、如图14中(4)所示的投屏画面1430等)直接传输给电视机。
可选的,手机可以将获取到的投屏画面进行编码后,再发送给电视机,相应的,电视机接收到之后,先进行解码,再获取到投屏画面。可选的,电视机可以基于用户数据包协议(user datagram protocol,UDP)协议传输该投屏画面,也可以基于其他的协议传输该投屏画面,本申请对此不做限定。
这样,手机将获取到的投屏画面直接传输给电视机,手机不再对投屏画面执行添加黑边的操作,由此,手机与电视机之间的传输的投屏画面的数据量减少,能够增加投屏画面的传输效率。
S1205、电视机对投屏画面进行黑边检测。
在一些投屏场景中,比如:上文所述的全屏显示场景、分屏显示场景、多路投屏场景中,电视机可以执行对投屏画面进行黑边检测的操作。
在另一些投屏场景中,比如:上文所述的字幕和/或弹幕场景中,电视可以不执行对投屏画面进行黑边检测的操作。可选的,在该场景中,电视机也可以执行对投屏画面进行黑边检测的操作。
在一些实施例中,电视机可以在确定接收到投屏画面属于预设类型的投屏画面时,不执行黑边检测的操作。在确定接收到投屏画面不属于预设类型的投屏画面时,再执行黑边检测的操作。作为一种可能的实现,电视机在接收到一帧投屏画面时,可以根据该投屏画面的标识确定该投屏画面是否为预设类型的投屏画面。作为又一种可能的实现,电视机在接收到一帧投屏画面时,可以根据手机的指示消息确定投屏画面是否为预设类型的投屏画面。本申请对电视机确定一帧投屏画面是否为预设类型的投屏画面的方式不做任何限制。
示例性的,预设类型的投屏画面可以包括但不限于包括字幕和/或弹幕的投屏画面。可选的,该预设类型的投屏画面可以由开发人员根据实际需求设定,本申请对此不做限定。
可选的,在电视机对投屏画面执行黑边检测的操作时,电视机可以对接收到的每一帧投屏画面均进行黑边检测,也可以间隔m帧投屏画面进行一次黑边检测,m为正整数,m可以为固定值,也可以动态变化,本申请电视机进行黑边检测的时机不做任何限定。
在一些实施例中,执行黑边检测的操作还可以由手机侧执行,而电视机侧无需再执行黑边检测的操作。可选的,电视机可以从手机侧获知该投屏画面是否是包括黑边的,具体在哪些位置包括黑边,包括的黑边的大小等中的一种或多种情况。比如:手机在对投屏画面进行黑边检测结束之后,将黑边检测的结果发送给电视机。相应的,电视机在接收到手机发送过来的该投屏画面的黑边检测的结果即可获知前述一种或多种情况。
下面以电视机对投屏画面执行黑边检测为例,对电视机执行黑边检测的方法进行说明。
以手机的屏幕分辨率为1920*1080P为例,则该手机向电视机传输的投屏画面的分辨率也为1920*1080P,相应的,电视机接收到的投屏画面的分辨率也为1920*1080P。
以手机采用竖屏显示的方式为例,则如图15所示,该投屏画面(如图13中(2)所示的投屏画面1310,如图13中(4)所示的投屏画面1330等)高包括1920个像素点,宽包括1080个像素点。对于该投屏画面,电视机可以从外侧像素点开始向内进行检测。在一些示例中,电视机对于每个像素点可以均进行检测,比如:以检测投屏画面的上方是否存在黑边为例,电视机先检测上方第一排像素点,若确定第一排像素点均为黑色,则确定第一排像素点为黑边,则继续向下检测第二排像素点。若确定第二排像素点也为黑边,则继续向下检测第三排像素点,直至第n排像素点,n为正整数。若确定第n排像素点中存在一些像素点不为黑色,则确定第n排像素点不为黑边,则电视机可以确定该上方第一排像素点至第n-1排像素点为黑边。
在另一些示例中,电视机可以对像素点进行采样检测。比如:电视机先检测上方第一排像素点,若确定第一排像素点为黑边,则继续向下检测第k排像素点,k为正整数。若确定第k排像素点均为黑边,则继续向下检测第2k-1排像素点。若确定第2k-1排像素点不为黑边,则检测第k排像素点与第2k-1排像素点之间的像素点,对于这些像素点,电视机可以均进行检测,也可以采样检测,直至确定哪些像素点为黑边为止。基于该方案,可以减少电视机检测的像素个数,能够提高黑边检测的效率。
可选的,电视机也可以采用其他的方式进行黑边检测,比如:从内侧像素点向外检测等,如电视机可以从中间一排的像素点开始向上检测。本申请对电视机进行黑边检测的方式不做任何限制。
同样的,电视检测投屏画面其他位置(如下方、左方、右方等)是否存在黑边、以及黑边的大小等的过程均可参考上述示例的介绍。同样的,在电视机接收到的投屏画面(如图14中(2)所示的投屏画面1410、如图14中(4)所示的投屏画面1430等)为手机采用横屏显示的界面时,电视机检测投屏画面是否存在黑边的方法也可参加上文所述。
这样,在电视机对投屏画面进行黑边检测时,由于该投屏画面为手机原来显示的界面,手机未对其执行添加黑边的操作,这样,该投屏画面的像素点的数目相比较于添加了黑边的投屏画面的像素点的数目要少的多。因此,电视机(即投屏目的端)在执行黑边检测时,要检测的像素点的数目要少,由此可以提高黑边检测的效率。并且,对于高配置的投屏目的端,比如4K电视机,由于提高了黑边检测的效率,因此,能够满足其对黑边检测的耗时要求。对于低配置的投屏目的端,即使其计算能力有限,由于提高了黑边检测的效率,也能够支持实时进行黑边检测的要求等。
S1206、电视机根据手机的分辨率对投屏画面添加黑边。
在一些投屏场景中,如上文所述的分屏显示场景,多路投屏场景等,电视机可以不执行该步骤,在根据上述步骤S1206确定投屏画面存在黑边的情况下,直接执行步骤S1207。
在另一些投屏场景中,如上文所述的全屏显示场景、字幕和/或弹幕场景等,电视机可以执行该步骤。
还是以手机的屏幕分辨率为1920*1080P,电视机的屏幕分辨率为2160*3840P为例,则电视机接收到的投屏画面的分辨率也为1920*1080P。其中,在手机采用竖屏显示的情况下,投屏画面 (如图13中(2)所示的投屏画面1310、如图13中(4)所示的投屏画面1330等)的高宽比例为1920:1080。在手机采用横屏显示的情况下,投屏画面(如图14中(2)所示的投屏画面1410、如图14中(4)所示的投屏画面1430等)的高宽比例为1080:1920。
电视机可以对该投屏画面添加黑边。在一些示例中,电视机可以对投屏画面的任意位置(如上方、下方、左方、右方等中的一种或多种位置)添加黑边。可选的,电视机对投屏画面的各位置添加的黑边的大小可以相同也可以不同。以图13中(2)所示的投屏画面1310为例,电视机对该投屏画面1310添加黑边后的投屏画面可以如图16中(1)所示的投屏画面1600。以图13中(4)所示的投屏画面1330为例,电视机对该投屏画面1330添加黑边后的投屏画面可以如图16中(2)所示的投屏画面1610。以图14中(2)所示的投屏画面1410为例,电视机对该投屏画面1410添加黑边后的投屏画面可以如图16中(3)所示的投屏画面1620。以图14中(4)所示的投屏画面1430为例,电视机对该投屏画面1430添加黑边后的投屏画面可以如图16中(4)所示的投屏画面1630。
在另一些示例中,电视机可以对投屏画面的固定位置添加黑边。一般而言,由于手机竖屏的形态通常为图13中(1)所示的形态,也即手机的高的长度是大于宽的长度的。手机横屏显示的形态通常为图14中(1)所示的形态,也即手机的高的长度是大于宽的长度的。而电视机的形态通常与手机横屏显示的形态类似,也即电视机的高的长度是小于宽的长度的。因此,在手机竖屏显示投屏画面(如图13中(2)所示的投屏画面1310、图13中(4)所示的投屏画面1330等)的情况下,投屏画面的高的长度是大于宽的长度的。因此,电视机可以采用诸如图16中(1)或(2)的方式对该投屏画面的左方和/或右方添加黑边。在手机横屏显示投屏画面(如图14中(2)所示的投屏画面1410、图14中(4)所示的投屏画面1430等)的情况下,投屏画面的高的长度是小于宽的长度的。因此,电视机可以采用诸如图16中(3)或(4)的方式对该投屏画面的上方和/或下方添加黑边。
其中,图16中(1)、(2)是以电视机对投屏画面的左方以及右方添加黑边,且添加的黑边的大小相同为例的。图16中(3)、(4)是以电视机对投屏画面的上方以及下方添加黑边,且添加的黑边的大小也相同为例的。
可选的,本申请并不限定电视机对投屏画面添加黑边的具体位置,也不限制添加的黑边的大小等。
其中,添加黑边后的投屏画面(如图16中的各投屏画面)的分辨率的比例与电视机的屏幕分辨率的比例相同,如高宽比均为2160:3840。
当然,在这些投屏场景中,如上文所述的全屏显示场景、字幕和/或弹幕场景等,电视机也可以不执行该步骤,而是直接执行步骤S1207。比如:全屏显示场景中,在电视机接收到的投屏画面包括黑边的情况下,若通过黑边裁剪的方式即可使得裁剪后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。则电视机可以直接执行步骤S1207,对接收到的投屏画面中包括的黑边中的部分或全部进行裁剪,使得裁剪后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。
再比如:字幕和/或弹幕场景中,在电视机接收到的投屏画面包括黑边,这些黑边中的部分或全部未用于显示任何数据的情况下,若通过黑边裁剪的方式即可使得裁剪后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。则电视机也可以执行步骤S1207,对接收到的投屏画面中包括的未用于显示任何数据的黑边中的部分或全部进行裁剪,使得裁剪后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。
可以理解,该步骤是以电视机接收到的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例不同为例的。当然,在电视机接收到的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同时,电视机也可以不执行该步骤。
S1207、电视机对投屏画面进行黑边裁剪。
可选的,该投屏画面可以是执行步骤S1206后的投屏画面,也即添加黑边后的投屏画面。也可以是步骤S1204所述的投屏画面,也即电视机执行添加黑边操作之前的投屏画面。
在一些实施例中,如上文所述的全屏显示场景、字幕和/或弹幕场景,电视机可以不执行该步 骤,直接执行步骤S1208。其中,该实施例下,字幕和/或弹幕场景中,字幕和/或弹幕可以显示在电视机接收到的投屏画面包括的黑边上,也可以未显示在电视机接收到的投屏画面包括的黑边上。
其中,在字幕和/或弹幕场景下,在图1所示的现有的投屏方案中,电视机也会对按照图1中步骤S105所述的方法对添加黑边后的投屏画面执行黑边裁剪的操作。而在字幕和/或弹幕场景下,由于投屏画面包括的字幕和/或弹幕等的内容可能显示在投屏画面包括的黑边中,并且,对于不同帧的投屏画面中包括的字幕和/或弹幕的内容在黑边中的显示区域也可能不相同。
比如:以图11中(1)所示的视频界面1100为例,各弹幕的位置如图11中(1)所示,其中,弹幕“冒个泡”的三个字均显示于视频界面1100包括的右方黑边中,由于在上方以及下方添加黑边后的视频界面1100的右方黑边的全部会被弹幕“冒个泡”占用,若电视机对添加黑边后的视频界面1100的左方以及右方的黑边进行裁剪,会裁剪掉弹幕“冒个泡”中的文字,因此电视机不执行黑边裁剪的操作,然后,电视机可以呈现诸如图11中(2)所示的投屏画面1110。
随着弹幕从右向左滑动,手机显示的下一帧视频界面可以如图17中(1)所示的视频界面1700,此时,弹幕“冒个泡”中仅有“个泡”两个字显示在视频界面1700包括的右方黑边中,弹幕“动起来”中“起来”两个字显示在视频界面1700包括的左方黑边中。由于在上方以及下方添加黑边后的视频界面1700的左方黑边的部分被弹幕“动起”两字占用,右方黑边的部分被弹幕“个泡”两字占用。因此,电视机可对添加黑边后的视频界面1700的左方以及右方的黑边进行裁剪,如:裁剪掉一个字的宽度,相应的,电视机也会将上方以及下方的黑边裁减掉一部分,以使得裁剪后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。然后,电视机可以呈现诸如图17中(2)所示的投屏画面1710。
可以看出,图11中(2)所示的投屏画面中包括的黑边的宽度与图17中(2)所示的投屏画面中包括的黑边的宽度是不同的。这样,由于字幕和/或弹幕的不断滑动,使得电视机裁剪掉的不同投屏画面的黑边的大小是不同的,因此,电视机最终显示的投屏画面中包括的黑边的大小也是不同的,那么电视机显示的投屏画面会出现抖动以及跳变的情况,影响用户的观看体验。
而本申请该实施例中,对于字幕和/或弹幕场景,电视机不再执行黑边裁剪的操作,直接根据手机的屏幕分辨率对包括字幕和/或弹幕的投屏画面添加黑边,以使得该投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同,然后直接显示添加黑边后的投屏画面。可以避免由于不同帧的投屏画面包括的黑边不同而带来的画面抖动以及跳变的问题。
具体的,在一种可能的示例中,对于上述全屏显示场景,电视机接收到的投屏画面是不包括黑边的,电视机在该投屏画面的上方和/或下方添加了黑边,或者电视机在该投屏画面的左方和/或右方添加了黑边。如图16中(1)所示的投屏画面1600,电视机对图13中(2)所示的投屏画面1310的左方以及右方添加了黑边。如图16中(3)所示的投屏画面1620,电视机对图14中(2)所示的投屏画面1410的上方以及下方添加了黑边。也就是说,在添加黑边后的投屏画面仅上方和/或下方存在黑边,或者,仅左方和/或右方存在黑边的情况下,电视机可以不执行黑边裁剪的操作。
在另一种可能的示例中,对于上述全屏显示场景、字幕和/或弹幕显示场景等,电视机接收到的投屏画面是包括黑边的,而电视机在投屏画面中与该黑边位置相邻的位置添加了黑边,如图13中(4)中所示的投屏画面1030的上方以及下方包括黑边,如图16中(2)所示的投屏画面1610,电视机对该投屏画面1030的左方以及右方添加了黑边,如图14中(4)所示的投屏画面1430的左方以及右方包括黑边,如图16中(4)所示的投屏画面1630,电视机对该投屏画面的上方以及下方添加了黑边。该示例中,电视机也可以不执行该操作。
在另一些实施例中,如上文所述的全屏显示场景、字幕和/或弹幕场景、分屏显示场景、多路投屏场景等,电视机也可以执行该步骤。具体的,在诸如上文所述的全屏显示场景、字幕和/或弹幕等场景中,电视机可以对添加黑边后的投屏画面进行黑边裁剪。可选的,该示例中,裁剪后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例相同。
其中,对于字幕和/或弹幕场景,若字幕和/或弹幕未显示在电视机接收到的投屏画面包括的黑边上,则与全屏显示场景类似,电视机可以对添加黑边后的投屏画面中包括的一个或多个黑边进行裁剪。若字幕和/或弹幕显示在电视机接收到的投屏画面包括的黑边上,则电视机不对用于显示字幕和/或弹幕的黑边进行裁剪,可以对除该黑边以外的其他黑边进行裁剪。
该实现方式中,对于字幕和/或弹幕场景,若电视机接收到的投屏画面中包括的黑边用于显示数据(如字幕、弹幕等),则电视机不会对该用于显示数据的黑边进行黑边裁剪的操作,同样可以避免由于不同帧的投屏画面包括的黑边不同而带来的画面抖动以及跳变的问题。
在诸如上文所述的分屏显示场景、多路投屏场景等中,若原有的投屏画面(也即电视机未执行添加黑边的操作)存在黑边,电视机可以直接对原有的投屏画面进行黑边裁剪。可选的,该示例中,裁剪后的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例可以相同也可以不同。
以图9所示的分屏显示场景为例,图9中(1)所示的图片界面900的上方以及下方包括黑边,电视机接收到该图片界面900之后,可以直接将图片界面900中包括的黑边中的部分或全部裁剪掉。以图10所示的多路投屏场景为例,图10中(1)所示的图片界面1001的上方以及下方包括黑边,电视机接收到该图片界面1001之后,也可以直接将图片界面1001中包括的黑边中的部分或全部裁剪掉。
这样,在电视机采用分屏的方式显示投屏画面的场景下,由于电视机接收到的投屏画面为手机原来显示的界面,手机未对其进行添加黑边的操作。这样,电视机在确定接收到的投屏画面存在黑边的情况下,电视机直接对其进行黑边裁剪,仅需要裁减掉投屏画面原有的黑边,可以减少电视机采用分屏显示的投屏场景下,手机为投屏画面添加了黑边,而电视机又将该添加的黑边裁剪掉的冗余操作。
该实施例下,作为一种可能的示例,对于全屏显示场景,在添加黑边后的投屏画面的至少三方(比如:上方、下方、左方、右方等中的任意三方)包括黑边的情况下,电视机可以执行该步骤。可选的,电视机可以将宽度较小的黑边的部分或全部黑边裁减掉,以使得投屏画面的有效内容(即除黑边以外的内容)可以占用更多的电视机屏幕上的显示区域,例如:使得裁剪后的投屏画面的任意两个相邻的显示黑边的位置(比如:上方和左方、上方和右方、下方和左方、下方和右方等)中最多其中一个位置包括黑边,进而使得投屏效果更佳,投屏画面更加清晰。
例如:对于如图16中(2)、(4)所示的投屏画面,电视机可以对其进行黑边裁剪。以图16中(2)所示的投屏画面为例,电视机可以将投屏画面1610的上方以及下方的黑边均裁剪掉,这样,投屏画面1610在显示在电视机上的时候,其上方以及下方是不包括黑边的。然后相应的,将投屏画面的左方以及右方的部分黑边裁剪掉,以使得裁剪掉黑边的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例仍然相同,示例性的,裁剪后的投屏画面可以如图18中(1)所示的投屏画面1800所示。以图16中(4)所示的投屏画面为例,电视机可以将投屏画面1630的左方以及右方的黑板均裁剪掉,这样,投屏画面1630显示在电视机上的时候,其左方以及右方也是不包括黑边的。然后相应的,将投屏画面的上方以及下方的部分黑边裁剪掉,以使得裁剪掉黑边的投屏画面的分辨率的比例与电视机的屏幕分辨率的比例仍然相同,示例性的,裁剪后的投屏画面可以如图18中(2)所示的投屏画面1810为例。
其中,图18中(1)、(2)均是以电视机将宽度较小的黑边(如图16中(2)所示的投屏画面的上方以及下方的黑边,图16中(4)所示的投屏画面的左方以及右方的黑边)的全部裁剪掉为例的。
作为一种可能的示例,对于字幕和/或弹幕场景,若添加黑边后的投屏画面除了包括用于显示字幕和/或弹幕的黑边,还包括不用于显示任何数据的黑边,则电视机可以执行该步骤。可选的,电视机可以将不用于显示任何数据的黑边的部分或全部裁剪掉,以使得投屏画面的有效内容可以占用更多的电视机屏幕上的显示区域。
可选的,在诸如全屏显示场景、字幕和/或弹幕场景等场景下,电视机可以先执行步骤S1206,再执行步骤S1207。可以理解,对于同一个手机(即同一个投屏源端)传输给电视机的投屏画面的分辨率是相同的,可以均为手机的屏幕分辨率。并且,电视机的屏幕分辨率也是固定的,这样,电视机在对同一个手机传输的投屏画面添加黑边时,由于这些投屏画面均未进行裁剪,其分辨率均是相同的,因此,电视机可以确定这些投屏画面要添加的黑边大小也是相同的。电视机无需根据每一个投屏画面的分辨率分别计算需要添加的黑边的大小,可以节省电视机为投屏画面添加黑边时的功耗,也即可以节省电视机对每一个投屏画面的分辨率的比例进行调整以适配自身屏幕分辨率的比例的功耗。
当然,电视机也可以先执行步骤S1207,再执行步骤S1206,本申请对此不做限制。可选的,电视机先执行步骤S1207时,也即电视机对接收到的投屏画面包括的黑边(该黑边并不是由电视机添加的)先进行裁剪时,裁剪后的投屏画面的分辨率和/或分辨率的比例可以相同也可以不同。这样,电视机先对手机传输过来的每个投屏画面的黑边进行裁剪,由于裁剪后的投屏画面的分辨率和/或分辨率的比例可能是不同的,因此,电视机可能需要根据每一个裁剪后的投屏画面的分辨率和/或分辨率的比例计算对应的需要添加的黑边的大小。
可选的,本申请实施例所述的黑边替换成其他颜色时,本申请实施例提供的技术方案同样使用。
S1208、电视机显示投屏画面。
示例性的,在全屏显示场景下,在电视机不对诸如图16中(2)所示的投屏画面1610的进行黑边裁剪的情况下,电视机显示的投屏画面如图19中(1)所示投屏画面1900所示。同样的,在电视机不对诸如图16中(4)所示的投屏画面1630进行黑边裁剪的情况下,电视机显示的投屏画面如图19中(3)所示的投屏画面1920。
在电视机将诸如图16中(2)所示的投屏画面1610的上下黑边的全部均裁剪掉的情况下,电视机显示的投屏画面可以如图19中(2)所示的投屏画面1910所示。同样的,在电视机将诸如图16中(4)所示的投屏画面1630的左右黑边的全部均裁剪掉的情况下,电视机显示的投屏画面可以如图19中(4)所示的投屏画面1930所示。
示例性的,在分屏显示场景下,电视机显示的投屏画面可以诸如9中(3)所示。其中,在电视机对图9中(1)所示的图片界面900的上下黑边均进行裁剪后,电视机可以获得图20所示的投屏画面2000。电视机可以采用分屏的方式显示投屏画面2000以及图9中(2)所示的视频界面910。
在一些示例中,电视机可以采用左右分屏的方式,此时电视机可以根据投屏画面2000的分辨率以及图9中(2)所示的视频界面910的分辨率,将投屏画面2000以及图9中(2)所示的视频界面910的高调整至相同。可以理解,由于电视机可以根据手机的屏幕分辨率确定图片界面900的分辨率,然后对该图片界面900进行黑边裁剪之后,也可计算得到裁剪后的投屏画面2000的分辨率。还可以理解,图9中(2)所示的视频界面910的分辨率即为电视机的屏幕分辨率。
可选的,在电视机将投屏画面2000以及图9中(2)所示的视频界面910的高调整至相同之后,电视机还可以通过添加黑边的方式以使得投屏画面2000与视频界面910组合后的界面的分辨率的比例与电视机的显示比例相同。可选的,电视机可以对投屏画面2000以及视频界面910分别添加黑边,也可以对投屏画面2000与视频界面910组合的整体界面添加黑边,本申请对此不做限制。
当然,电视机也可以采用其他分屏的方式,比如:上下分屏的方式显示投屏画面以及自身的画面,本申请对此不做限制。
同样的,在多路投屏场景下,电视机显示的投屏画面可以诸如图10中(3)所示的分屏界面1020。关于该场景下的具体实现,可参考分屏场景下的相关实现,此处不再赘述。
可以理解,本申请实施例对分屏显示场景以及多路投屏场景下,电视机最终呈现的投屏画面的效果不做任何限定。
示例性的,在字幕和/或弹幕场景下,电视机显示的投屏画面可以诸如图11中(2)所示。
可以理解,本申请实施例提供的各界面仅仅为示意图,并不构成本申请的限定,在实际应用中,各界面中可以包括更多或者更少的内容,也可以包括更多或者更少的界面。
上述主要是从方法的角度对本申请实施例提供的方案进行了介绍。可以理解的是,投屏设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本申请中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超过本申请实施例的技术方案的范围。
本申请是实施例可以根据上述方法示例对投屏设备进行功能模块的划分,例如,可以对应各 个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
如图21所示,为本申请实施例提供的一种投屏设备2100的结构示意图,该投屏设备2100可用于实现以上各个方法实施例中记载的方法。示例性的,该投屏设备2100具体可以包括:处理单元2101、显示单元2102、通信单元2103。
一种可能的示例中,以该投屏设备2100为第一终端(如电视机)为例,处理单元2101用于执行支持投屏设备2100执行图12中的步骤S1205至S1207。和/或,处理单元2101还用于支持投屏设备2100执行本申请实施例中第一终端执行的其他步骤。
显示单元2102用于支持投屏设备2100执行图12中的步骤S1208。和/或,显示单元2102还用于支持投屏设备2100执行本申请实施例中第一终端执行的其他步骤。
通信单元2103用于支持投屏设备2100执行图12中的步骤S1201、S1202。和/或,通信单元2103还用于支持投屏设备2100执行本申请实施例中第一终端执行的其他步骤。
另一种可能的示例中,以该投屏设备2100为第二终端(如手机)为例,处理单元2101用于执行支持投屏设备2100执行图12中的步骤S1203。和/或,处理单元2101还用于支持投屏设备2100执行本申请实施例中第二终端执行的其他步骤。
显示单元2102用于支持投屏设备2100执行显示操作。和/或,显示单元2102还用于支持投屏设备2100执行本申请实施例中第二终端执行的其他步骤。
通信单元2103用于支持投屏设备2100执行图12中的步骤S1201、S1202。和/或,通信单元2103还用于支持投屏设备2100执行本申请实施例中第二终端执行的其他步骤。
可选的,图21所示的投屏设备2100还可以包括存储单元(图21中未示出),该存储单元存储有程序或指令。当处理单元2101执行该程序或指令时,使得图21所示的投屏设备2100可以执行图12中所示的方法。
图21所示的投屏设备2100的技术效果可以参考图12所示的方法的技术效果,此处不再赘述。图21所示的投屏设备2100中涉及的处理单元2101可以由处理器或处理器相关电路组件实现,可以为处理器或处理模块。通信单元2103可以由收发器或收发器相关电路组件实现,可以为收发器或收发模块。显示单元2102可以由显示屏相关组件实现。
本申请实施例还提供一种芯片系统,如图22所示,该芯片系统包括至少一个处理器2201和至少一个接口电路2202。处理器2201和接口电路2202可通过线路互联。例如,接口电路2202可用于从其它装置接收信号。又例如,接口电路2202可用于向其它装置(例如处理器2201)发送信号。示例性的,接口电路2202可读取存储器中存储的指令,并将该指令发送给处理器2201。当所述指令被处理器2201执行时,可使得投屏设备执行上述实施例中的第一终端或者第二终端执行的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式 的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在投屏设备上运行时,使得投屏设备执行上述方法实施例所述的方法。
本申请实施例提供一种计算机程序产品,该计算机程序产品包括:计算机程序或指令,当计算机程序或指令在计算机上运行时,使得该计算机执行上述方法实施例所述的方法。
另外,本申请实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使装置执行上述各方法实施例中的方法。
本申请实施例还提供一种投屏系统,包括第一终端以及第二终端,第一终端用于执行上述方法实施例中第一终端执行的方法,第二终端用于执行上述方法实施例中第二终端执行的方法。
其中,本实施例提供的投屏设备、计算机存储介质、投屏系统、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。各实施例在不冲突的情况下可以相互结合或相互参考。以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (15)

  1. 一种投屏方法,其特征在于,所述方法包括:
    第一终端接收第二终端启动投屏后发送的第一图像,所述第一图像为显示在所述第二终端上的图像;
    所述第一终端获取所述第二终端的屏幕分辨率;
    所述第一终端根据所述第一图像以及所述第二终端的屏幕分辨率显示第二图像,所述第二图像为所述第一图像的投屏图像。
  2. 根据权利要求1所述的方法,其特征在于,所述第一图像的分辨率的比例与所述第一终端的屏幕分辨率的比例不同;
    所述第一终端根据所述第一图像以及所述第二终端的屏幕分辨率显示所述第二图像,包括:
    所述第一终端根据所述第二终端的屏幕分辨率确定所述第一图像的分辨率;
    所述第一终端调整所述第一图像的分辨率的比例,调整后的第一图像的分辨率的比例与所述第一终端的屏幕分辨率的比例相同;
    所述第一终端根据所述调整后的第一图像显示所述第二图像。
  3. 根据权利要求2所述的方法,其特征在于,所述第一终端调整所述第一图像的分辨率的比例,包括:
    所述第一终端对所述第一图像填充黑边,填充黑边后的第一图像的分辨率的比例与所述第一终端的屏幕分辨率的比例相同。
  4. 根据权利要求3所述的方法,其特征在于,在所述第一终端根据所述第一图像以及所述第二终端的屏幕分辨率显示所述第二图像之前,所述方法还包括:
    所述第一终端根据所述第一图像的分辨率对所述第一图像进行黑边检测。
  5. 根据权利要求4所述的方法,其特征在于,所述黑边检测的结果为所述第一图像中包括黑边;所述方法还包括:
    所述第一图像中包括的所述黑边用于显示数据,所述第一终端不对用于显示所述数据的所述第一图像中包括的所述黑边进行裁剪。
  6. 根据权利要求4所述的方法,其特征在于,所述黑边检测的结果为所述第一图像中包括黑边;所述方法还包括:
    所述第一图像中包括的所述黑边不用于显示数据,所述第一终端对所述填充黑边后的第一图像中包括的黑边进行裁剪,其中,裁剪后的第一图像的分辨率的比例与所述第一终端的屏幕分辨率的比例相同。
  7. 根据权利要求5或6所述的方法,其特征在于,所述数据包括字幕和/或弹幕。
  8. 根据权利要求1所述的方法,其特征在于,所述第一终端采用分屏的方式显示所述第二图像;
    所述第一终端根据所述第一图像以及所述第二终端的屏幕分辨率显示所述第二图像,包括:
    所述第一终端根据所述第二终端的屏幕分辨率确定所述第一图像的分辨率;
    所述第一终端根据所述第一图像的分辨率对所述第一图像进行黑边检测;
    所述第一终端根据所述黑边检测的结果确定所述第一图像中包括黑边,所述第一终端对所述第一图像中包括的所述黑边进行裁剪,所述第一终端根据裁剪后的第一图像显示所述第二图像。
  9. 根据权利要求1所述的方法,其特征在于,所述第一终端采用分屏的方式显示所述第二图像;
    所述第一终端根据所述第一图像以及所述第二终端的屏幕分辨率显示所述第二图像,包括:
    所述第一终端根据所述第二终端的屏幕分辨率确定所述第一图像的分辨率;
    所述第一终端根据所述第一图像的分辨率对所述第一图像进行黑边检测;
    所述第一终端根据所述黑边检测的结果确定第一图像中不包括黑边,所述第一终端根据所述第一图像显示所述第二图像。
  10. 根据权利要求8或9所述的方法,其特征在于,所述方法还包括:
    所述第一终端还显示第三图像,所述第三图像与所述第二图像分屏显示;
    其中,所述第三图像为显示在第三终端上的图像的投屏图像;或者,所述第三图像为所述第一终端上原始输出的图像;或者,所述第三图像为显示在所述第二终端上的图像的投屏图像。
  11. 一种投屏方法,其特征在于,所述方法包括:
    第二终端显示第一图像;
    所述第二终端启动投屏后,向第一终端发送所述第一图像以及所述第二终端的屏幕分辨率,所述第一图像以及所述第二终端的屏幕分辨率用于所述第一终端显示第二图像,所述第二图像为所述第一图像的投屏图像。
  12. 一种终端设备,其特征在于,包括:处理器、存储器、通信接口和显示屏,所述存储器、所述通信接口、所述显示屏与所述处理器耦合,所述通信接口用于与其他设备通信,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述处理器从所述存储器中读取所述计算机指令,以使得所述终端设备执行如权利要求1-10中任一项所述的方法,或者,使得所述终端设备执行如权利要求11中所述的方法。
  13. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序或指令,当所述计算机程序或指令在终端设备上运行的情况下,使得所述终端设备执行如权利要求1-10中任一项所述的方法,或者,使得所述终端设备执行如权利要求11中所述的方法。
  14. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机可以执行如权利要求1-10中任一项所述的方法,或者,使得所述计算机可以执行如权利要求11中所述的方法。
  15. 一种投屏系统,其特征在于,包括第一终端以及第二终端,所述第一终端用于执行如权利要求1-10中任一项所述的方法,所述第二终端用于执行如权利要求11中所述的方法。
PCT/CN2023/110846 2022-08-29 2023-08-02 投屏方法及设备 WO2024046024A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211042423.0 2022-08-29
CN202211042423.0A CN117676237A (zh) 2022-08-29 2022-08-29 投屏方法及设备

Publications (1)

Publication Number Publication Date
WO2024046024A1 true WO2024046024A1 (zh) 2024-03-07

Family

ID=90073768

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/110846 WO2024046024A1 (zh) 2022-08-29 2023-08-02 投屏方法及设备

Country Status (2)

Country Link
CN (1) CN117676237A (zh)
WO (1) WO2024046024A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049368A (zh) * 2019-04-26 2019-07-23 北京奇艺世纪科技有限公司 一种显示方法及相关设备
CN112527222A (zh) * 2019-09-19 2021-03-19 华为技术有限公司 一种信息处理方法及电子设备
CN113542841A (zh) * 2021-06-16 2021-10-22 杭州当贝网络科技有限公司 投屏方法和投屏系统
CN113891167A (zh) * 2021-08-27 2022-01-04 荣耀终端有限公司 投屏方法和电子设备
CN114489529A (zh) * 2020-10-23 2022-05-13 华为技术有限公司 电子设备的投屏方法及其介质和电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049368A (zh) * 2019-04-26 2019-07-23 北京奇艺世纪科技有限公司 一种显示方法及相关设备
CN112527222A (zh) * 2019-09-19 2021-03-19 华为技术有限公司 一种信息处理方法及电子设备
CN114489529A (zh) * 2020-10-23 2022-05-13 华为技术有限公司 电子设备的投屏方法及其介质和电子设备
CN113542841A (zh) * 2021-06-16 2021-10-22 杭州当贝网络科技有限公司 投屏方法和投屏系统
CN113891167A (zh) * 2021-08-27 2022-01-04 荣耀终端有限公司 投屏方法和电子设备

Also Published As

Publication number Publication date
CN117676237A (zh) 2024-03-08

Similar Documents

Publication Publication Date Title
US20210227151A1 (en) Photographing Method, Apparatus, And Device
US10383098B2 (en) Information processing device and information processing method
US10198986B2 (en) Information processing device and information processing method
WO2022111672A1 (zh) 数据处理方法、装置及电子设备
US11106421B2 (en) Display method and system for wireless intelligent multi-screen display
US20050104909A1 (en) Communications system and method
WO2022121775A1 (zh) 一种投屏方法及设备
US20230162324A1 (en) Projection data processing method and apparatus
EP3780634A1 (en) Lending of local processing capability of interconnected terminals
WO2018205878A1 (zh) 一种传输视频信息的方法、终端、服务器及存储介质
EP2885920B1 (en) Consumption and capture of media content sensed from remote perspectives
US10085068B2 (en) Information processing apparatus and information processing method
US20170026505A1 (en) Information processing apparatus, information processing system and information processing method
US20170332210A1 (en) Information processing device, information processing method, and program
CN112328941A (zh) 基于浏览器的应用投屏方法及相关装置
WO2021208723A1 (zh) 全屏显示方法、装置和电子设备
EP4310663A1 (en) Method for adjusting screen projection display parameters
US20220294844A1 (en) Information Transmission Method And Electronic Device
CN114363678A (zh) 一种投屏方法及设备
WO2024046024A1 (zh) 投屏方法及设备
WO2023207445A1 (zh) 图像去噪方法、装置、系统及电子设备
EP4250074A1 (en) Screen projection display method and electronic device
WO2023011215A1 (zh) 一种显示方法及电子设备
CN117082295B (zh) 图像流处理方法、设备及存储介质
CN116723587B (zh) 一种会话管理方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23859059

Country of ref document: EP

Kind code of ref document: A1