WO2022252928A1 - Screen projection method and apparatus, wireless terminal, screen projection device and storage medium - Google Patents
Screen projection method and apparatus, wireless terminal, screen projection device and storage medium Download PDFInfo
- Publication number
- WO2022252928A1 WO2022252928A1 PCT/CN2022/091770 CN2022091770W WO2022252928A1 WO 2022252928 A1 WO2022252928 A1 WO 2022252928A1 CN 2022091770 W CN2022091770 W CN 2022091770W WO 2022252928 A1 WO2022252928 A1 WO 2022252928A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- screen projection
- data
- audio output
- bluetooth
- audio
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 108
- 238000004891 communication Methods 0.000 claims abstract description 65
- 230000004044 response Effects 0.000 claims abstract description 46
- 230000005540 biological transmission Effects 0.000 claims description 32
- 238000012790 confirmation Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 6
- 238000005266 casting Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 abstract description 40
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 11
- 238000012545 processing Methods 0.000 description 9
- 238000005259 measurement Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/4104—Peripherals receiving signals from specially adapted client devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/422—Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/422—Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
- H04N21/42204—User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/4302—Content synchronisation processes, e.g. decoder synchronisation
- H04N21/4307—Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/436—Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
- H04N21/4363—Adapting the video stream to a specific local network, e.g. a Bluetooth® network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/436—Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
- H04N21/4363—Adapting the video stream to a specific local network, e.g. a Bluetooth® network
- H04N21/43637—Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
Definitions
- the embodiments of the present application relate to the technical field of screen projection, and in particular, to a screen projection method, device, wireless terminal, screen projection device, and storage medium.
- Screen projection is a technology that transmits the audio and video data on the terminal side to the screen projection device, so as to display the terminal screen and play the terminal sound through the screen projection device.
- the user can turn on the screen projection function of the mobile phone, and the mobile phone transmits the audio and video data to the TV through the wireless network, so that the screen of the mobile phone is displayed on the TV side, and the sound of the mobile phone is played.
- Embodiments of the present application provide a screen projection method and device, a wireless terminal, a screen projection device, and a storage medium. Described technical scheme is as follows:
- an embodiment of the present application provides a screen projection method in a wireless terminal, the method comprising:
- a data communication link is established with the screen projection device, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
- the wireless terminal When the wireless terminal establishes a first Bluetooth link with the audio output device, send a Bluetooth link establishment request to the screen projection device, so that the screen projection device can communicate with the audio output based on the Bluetooth link establishment request and the audio output device. the device establishes a second Bluetooth link; and,
- an embodiment of the present application provides a screen projection method in a screen projection device, the method comprising:
- the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
- an embodiment of the present application provides a screen projection device, and the device includes:
- a data link establishment module configured to establish a data communication link with the screen projection device in response to a screen projection instruction, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
- a request sending module configured to send a bluetooth link establishment request to the screen projection device when the first bluetooth link is established between the wireless terminal and the audio output device, so that the screen projection device establishes a bluetooth link based on the bluetooth link requesting to establish a second Bluetooth link with the audio output device;
- a first transmission module configured to transmit the screen projection data to the screen projection device through the data communication link, so that the screen projection device outputs a picture based on the image data
- a second transmission module configured to transmit the audio data to the audio output device through the second Bluetooth link.
- an embodiment of the present application provides a screen projection device, and the device includes:
- a data link establishment module configured to establish a data communication link with the wireless terminal, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
- a Bluetooth link establishment module configured to establish a second Bluetooth link with an audio output device in response to the Bluetooth link establishment request sent by the wireless terminal, and the audio output device establishes a first Bluetooth link with the wireless terminal ;
- a data receiving module configured to receive the screen projection data transmitted by the wireless terminal through the data communication link
- a display module for outputting a picture based on the image data
- a third transmission module configured to transmit the audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
- an embodiment of the present application provides a wireless terminal, the wireless terminal includes a processor and a memory, at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement The method for projecting a screen in a wireless terminal according to the above aspects.
- an embodiment of the present application provides a screen projection device, the screen projection device includes a processor and a memory, at least one program is stored in the memory, and the at least one program is loaded and executed by the processor In order to realize the screen projection method in the screen projection device as described in the above aspects.
- an embodiment of the present application provides a computer-readable storage medium, where at least one program is stored in the computer-readable storage medium, and the at least one program is loaded and executed by a processor to implement the above-mentioned screencasting method.
- an embodiment of the present application provides a computer program product, the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; the Bluetooth chip of the electronic device reads the computer-readable storage medium from the computer-readable storage medium.
- FIG. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application
- FIG. 2 shows a flow chart of a screen projection method provided by an exemplary embodiment of the present application
- Fig. 3 is an implementation schematic diagram of a screen projection process shown in an exemplary embodiment of the present application.
- FIG. 4 is a flowchart of a second Bluetooth link establishment process provided by an exemplary embodiment of the present application.
- Fig. 5 is an implementation schematic diagram of a screen projection process shown in another exemplary embodiment of the present application.
- FIG. 6 is a schematic diagram of an implementation of an audio path switching process shown in an exemplary embodiment of the present application.
- Fig. 7 is a flow chart of the screen casting end process shown in an exemplary embodiment of the present application.
- FIG. 8 shows a structural block diagram of a screen projection device provided by an embodiment of the present application.
- FIG. 9 shows a structural block diagram of a screen projection device provided by another embodiment of the present application.
- Fig. 10 shows a structural block diagram of an electronic device provided by an exemplary embodiment of the present application.
- FIG. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application.
- the implementation environment includes a wireless terminal 110 , an audio output device 120 and a screen projection device 130 .
- the wireless terminal 110 is an electronic device with bluetooth and screen projection functions.
- the electronic device may be a smart phone, a tablet computer, a personal computer, etc. In FIG. limited.
- the audio output device 120 is an electronic device with Bluetooth and audio output functions.
- the electronic device can be a Bluetooth headset, a Bluetooth speaker, etc.
- the audio output device 120 is a Bluetooth headset as an example for illustration. .
- the wireless terminal 110 After the wireless terminal 110 establishes the first Bluetooth link with the audio output device 120, the wireless terminal 110 transmits audio data to the audio output device 120 through the first Bluetooth link, and the audio output device 120 plays terminal sound based on the audio data.
- the screen projection device 130 is an electronic device with bluetooth and display functions.
- the electronic device may be a smart TV, a monitor, a personal computer, or a projector, etc.
- the screen projection device 130 is a smart TV as an example for illustration.
- the wireless terminal 110 and the screen projection device 130 are located in the same wireless network.
- the wireless terminal 110 and the screen projection device 130 establish a data communication link through the wireless network, and the screen projection During the process, the wireless terminal 110 transmits screen projection data (picture data and audio data) to the screen projection device 130 through the data communication link, and the screen projection device 130 displays the terminal screen and plays the terminal audio through its own speaker.
- the wireless terminal 110 and the screen projection device 130 may also establish a data communication link based on a wired connection.
- the wireless terminal 110 and the screen projection device 130 are connected through a data cable.
- the wireless terminal 110 and the screen projection device 130 establish a data communication link through the data cable, which is not limited in this embodiment.
- the wireless terminal 110 actively triggers the screen projection device 130 to establish a second Bluetooth link with the audio output device 120 , in the follow-up process, after the screen projection device 130 receives the screen projection data through the data communication link, on the one hand, it displays the terminal screen based on the image data in the screen projection data;
- the audio data is transmitted to the audio output device 120, and the audio output device 120 plays terminal sound based on the audio data.
- the wireless terminal 110 also provides an audio channel switching function. Through this function, the user can switch the audio channel from the audio output device 120 to the screen projection device 130 as required, so that the terminal can be played through the screen projection device 130. sound, or switch the audio path from the screen projection device 130 to the audio output terminal 120 , and then output the sound through the audio output terminal 120 .
- the wireless terminal sends the screen projection data (including image data and audio data) to the screen projection device, and the screen projection device performs screen display and sound playback, even if the wireless terminal and the audio output device at this time There is a Bluetooth connection between them, and the terminal sound will not be played through the audio output device.
- the wireless terminal instructs the screen projection device to establish a Bluetooth connection with the audio output device, so that during the screen projection process
- the screen device can play sound through the audio output device to avoid the impact caused by switching the audio playback source from the audio output device to the screen projection device.
- a Bluetooth connection is established between a smartphone and a Bluetooth headset.
- the smartphone transmits audio data to the Bluetooth headset, and the Bluetooth headset plays the audio to avoid causing interference to others.
- the smart phone can establish a data communication link with the smart TV by triggering the screen projection function of the smart phone.
- the sound of the smart phone will be played through the smart TV, and the sound played by the smart TV will cause interference to others.
- the smart phone when establishing a data communication link, triggers the smart TV to establish a Bluetooth connection with the Bluetooth headset.
- the smart TV displays the screen of the mobile phone based on the received image data, and synchronously transmits the audio data to the Bluetooth headset through the Bluetooth connection, and the Bluetooth headset plays the sound of the mobile phone, so as to avoid the interference of the external sound of the smart TV when casting the screen. .
- FIG. 2 shows a flow chart of a screen projection method provided by an exemplary embodiment of the present application.
- This embodiment uses the implementation environment shown in FIG. 1 as an example for illustration.
- the method includes:
- Step 201 in response to the screen projection instruction, the wireless terminal establishes a data communication link with the screen projection device, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data.
- the wireless terminal and the screen projection device in response to the screen projection instruction, establish a wireless data communication link through a wireless network, or, the wireless terminal and the screen projection device establish a wired data communication link through a wired connection.
- the wireless terminal and the screen projection device establish a wireless data communication link through a wireless network, or, the wireless terminal and the screen projection device establish a wired data communication link through a wired connection.
- the following embodiments are described by taking a wireless data communication link as an example.
- the wireless terminal when there are multiple candidate screen projection devices in the wireless network, when receiving a screen projection instruction, displays the device identification of each candidate screen projection device, and when receiving a device selection operation, communicates with the selected The projection device establishes a data communication link.
- the wireless terminal uses the image data of its own display screen and the audio data of its own voice as the screen projection data, and sends the screen projection data to the screen projection device through the data communication link.
- step 202 the screen projection device establishes a data communication link with the wireless terminal.
- Step 203 in the case that the wireless terminal establishes a first Bluetooth link with the audio output device, the wireless terminal sends a Bluetooth link establishment request to the screen projection device.
- the wireless terminal When a data communication link is established between the wireless terminal and the screen projection device, and a first Bluetooth link is established between the wireless terminal and the audio output device, the wireless terminal sends a Bluetooth link establishment request to the screen projection device, Instruct the screen projection device to establish a second Bluetooth link with the audio output device.
- the first Bluetooth link between the wireless terminal and the audio output device can be established before the screen projection, or can be established during the screen projection process (if the first Bluetooth link is not established during the screen projection process, the screen projection device will display terminal screen and play terminal sound).
- the Bluetooth link establishment request is transmitted through a data communication link, or, the Bluetooth link establishment request is transmitted through a Bluetooth link with the screen projection device, which is not limited in this embodiment.
- Step 204 in response to the Bluetooth link establishment request sent by the wireless terminal, the screen projection device establishes a second Bluetooth link with the audio output device.
- the screen projection device After receiving the bluetooth link establishment request, the screen projection device establishes a second bluetooth link with the audio output device based on the information contained in the bluetooth link establishment request.
- a bluetooth link is established between the mobile phone 31 and the bluetooth headset 32 before screen projection, and the audio data is transmitted to the bluetooth headset 32 through the bluetooth link; 31 sends a Bluetooth link establishment request to the TV 33 , and the TV 33 establishes a Bluetooth link with the Bluetooth headset 32 after receiving the request.
- Step 205 the wireless terminal transmits the screen projection data to the screen projection device through the data communication link.
- the wireless terminal After the establishment of the second Bluetooth link is completed, the wireless terminal transmits the image data and audio data to the screen projection device synchronously through the data communication link. As shown in FIG. 3 , the mobile phone 31 transmits screen projection data including image data and audio data to the TV 33 .
- Step 206 the screen projection device receives the screen projection data transmitted by the wireless terminal through the data communication link.
- step 207 the screen projection device outputs a picture based on the image data.
- Step 208 the screen projection device transmits audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
- the screen projection device While displaying the terminal screen, the screen projection device synchronously transmits the audio data to the audio output device through the second Bluetooth link. is displayed, and the terminal sound is played on the audio output device.
- TV 33 analyzes image data, and shows the picture identical with mobile phone 31; Make no sound during screencasting).
- the terminal sound is played through the audio output device before and after screen projection (the audio path between the wireless terminal and the audio output device is switched to the audio path between the screen projection device and the audio output device), avoiding During the screen projection process, the terminal sound is directly released through the screen projection device, causing interference to others.
- the screen projection device during the process of projecting the screen from the wireless terminal to the screen projection device, if the wireless terminal establishes a Bluetooth link with the audio output device, the screen projection device will establish the Bluetooth link based on the request sent by the wireless terminal. , establish a Bluetooth link with the audio output device, and when the subsequent screen projection device receives the projection data transmitted by the wireless terminal, it can display the terminal screen based on the image data in the projection data and transmit the image data in the projection data to the audio output device.
- Audio data so that the audio output device can play the terminal sound; using the solution provided by the embodiment of this application, the audio output device other than the screen projection device can continue to be used for audio playback during the screen projection process, for example, the screen projection process can continue to be played through the screen projection process.
- the Bluetooth headset connected to the wireless terminal can play audio, which improves the freedom of audio playback during the screen projection process and avoids the impact caused by switching audio playback sources during the screen projection process.
- the method before establishing a data communication link with the screen projection device in response to the screen projection instruction, the method includes:
- a Bluetooth link establishment request is sent to the screen projection device, including:
- send a bluetooth link establishment request including the bluetooth information of the audio device to the screen projection device including:
- sending a Bluetooth link establishment request to the screen projection device includes:
- the link establishment prompt is used to confirm whether to establish a second bluetooth link between the screen projection device and the audio output device;
- the method further includes:
- a switching request is sent to the screen projection device, so that the screen projection device stops transmitting audio data to the audio output device through the second Bluetooth link, and outputs sound based on the audio data.
- the method includes:
- the audio output device supports multiple bluetooth links, maintain the first bluetooth link
- the method further includes:
- the method further includes:
- a screen projection end request is sent to the screen projection device, so that the screen projection device disconnects the data communication link and the second Bluetooth link based on the screen projection end request.
- the method further includes:
- Sound is output based on the audio data.
- the method further includes:
- the data communication link and the second Bluetooth link are disconnected.
- the audio output device supports a single Bluetooth link
- the method After outputting the picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further includes:
- the audio device Bluetooth information of the audio output device is sent to the wireless terminal, so that the wireless terminal re-establishes the first Bluetooth link with the audio output device based on the audio device Bluetooth information.
- the method before outputting the picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further includes:
- the image data and the audio data are transmitted synchronously based on the transmission delay.
- the wireless terminal before performing screen projection, has established a first Bluetooth link with the audio output device, and transmits audio data to the audio output device through the first Bluetooth link.
- the wireless terminal obtains the audio device Bluetooth information of the audio output device, and sends a Bluetooth link establishment message containing the audio device Bluetooth information to the screen projection device.
- the Bluetooth information of the audio device may be a Bluetooth address or a Bluetooth name of the audio output device.
- the screen projection device after receiving the Bluetooth link establishment request, the screen projection device initiates a Bluetooth connection request to the audio output device based on the Bluetooth information of the audio device, thereby establishing a second Bluetooth link with the audio output device.
- the embodiment of the present application does not limit the specific process of establishing the Bluetooth link.
- the wireless terminal establishes a Bluetooth connection with the audio output device
- the user may not use the audio output device.
- the wireless terminal acquires the Output the device status of the device, and when the audio output device is in use, send a Bluetooth link establishment request including the Bluetooth information of the audio device to the projection device.
- the device status is detected by the audio output device through its own sensor, and reported to the wireless terminal through the first Bluetooth link.
- the audio output device is a bluetooth earphone
- the bluetooth earphone determines the attitude of the earphone through the built-in sensor, and determines that it is in the use state when the attitude of the earphone is in the ear state.
- the wireless terminal will not send a Bluetooth link establishment request to the screen projection device; or, if the audio output device is in an unused state, the wireless terminal will still send a Bluetooth link to the screen projection device path establishment request, and instruct the screen projection device to play the terminal sound through its own speaker during the screen projection process (that is, not to transmit audio data to the audio output device through the second Bluetooth link).
- the wireless terminal determines whether to send a Bluetooth link establishment request to the screen projection device, so as to avoid playing the terminal sound through the audio output device when the audio output device is not in use, resulting in the need to manually The problem of switching the audio path (switching to the screen mirroring device for playback).
- the wireless terminal before the screen projection, the wireless terminal has not established the first Bluetooth link with the audio output device. If the screen projection is performed at this time, the screen projection device will display the terminal screen and play the terminal sound. If the wireless terminal establishes a connection with the audio output device during the screen projection process, the wireless terminal can determine whether to switch the audio path (from the screen projection device to the audio output device) according to user needs. As shown in FIG. 4 , the above step 203 may include the following steps.
- Step 203A establishing a first Bluetooth link with the audio output device.
- the wireless terminal when receiving a Bluetooth connection instruction, the wireless terminal establishes a first Bluetooth link with the audio output device.
- the audio output device may be a Bluetooth device paired with the wireless terminal for the first time, or a Bluetooth device previously paired with the wireless terminal.
- step 203B a link establishment prompt is displayed, and the link establishment prompt is used to confirm whether to establish a second Bluetooth link between the screen projection device and the audio output device.
- the wireless terminal displays a link establishment prompt to prompt the user to confirm whether the audio output device is connected to the screen projection device.
- a second Bluetooth link is established with the audio output device, and the audio path is switched to the audio output device.
- the wireless terminal determines that it needs to switch to the audio channel, and executes step 203C; if a cancel instruction is received, the wireless terminal determines to maintain the audio channel, and continues to play the terminal sound through the screen projection device.
- the mobile phone 31 transmits screen projection data to the TV 33 , and the TV displays the screen of the mobile phone according to the image data therein, and plays the sound of the mobile phone according to the audio data therein.
- the mobile phone 31 establishes a Bluetooth connection with the Bluetooth headset 32
- the mobile phone 31 displays a link establishment prompt 311, prompting whether to establish a Bluetooth link between the TV 33 and the Bluetooth headset 32, and plays the sound of the mobile phone through the Bluetooth headset 32.
- Step 203C in response to the confirmation instruction, acquire the Bluetooth information of the audio device of the audio output device, and send a Bluetooth link establishment request including the Bluetooth information of the audio device to the screen projection device.
- the wireless terminal obtains the audio device Bluetooth information of the audio output device, and then sends a Bluetooth link establishment request including the audio device Bluetooth information to the screen projection device, and the screen projection device communicates with the audio output device based on the audio device Bluetooth information.
- a second Bluetooth link is established, and the audio data is sent to the audio output device through the second Bluetooth link for playback by the audio output device.
- the confirmation instruction is triggered by a confirmation operation, and the confirmation operation is received through a wireless terminal (such as clicking on a confirmation option), or received through an audio output device (such as tapping a Bluetooth headset).
- the TV 33 and the Bluetooth earphone 32 promptly establish a Bluetooth link, and send audio data to the Bluetooth earphone 32 through the Bluetooth link, thereby playing the mobile phone through the Bluetooth earphone 32. sound.
- the user can switch the audio playback source of the phone's voice as needed during the screen projection process.
- the wireless terminal in response to the switching instruction, sends a switching request to the screen projection device, so that the screen projection device stops transmitting audio data to the audio output device through the second Bluetooth link, and plays the terminal sound based on the audio data .
- a switching control is displayed on the interface of the wireless terminal during the screen projection process, and when a trigger operation on the switching control is received, the wireless terminal receives a switching instruction, thereby sending a switching request to the screen projection device.
- the switching request may be sent through a data path link, or may be sent through a Bluetooth link between the wireless terminal and the screen projection device.
- the screen projection device After receiving the switching request, the screen projection device stops sending audio data to the audio output device through the second Bluetooth link, that is, the audio path is switched from the audio output device to the screen projection device.
- the second Bluetooth link between the screen projection device and the audio output device is maintained, so that the audio channel can be switched again later.
- the TV 33 first displays the screen of the mobile phone, and plays the sound of the mobile phone through the Bluetooth headset 32; According to the switching request, the transmission of audio data to the Bluetooth earphone 32 is stopped, thereby playing the sound of the mobile phone through its own speaker.
- the wireless terminal when receiving the switching instruction again, sends a switching request to the screen projection device, so that the screen projection device transmits audio data to the audio output device again through the second Bluetooth link.
- the wireless terminal when receiving the switching instruction, instructs the screen projection device to switch the audio channel, thereby realizing the switching of sound playback between the screen projection device and the audio output device, which further improves the screen projection process.
- the freedom of sound playback when receiving the switching instruction, the wireless terminal instructs the screen projection device to switch the audio channel, thereby realizing the switching of sound playback between the screen projection device and the audio output device, which further improves the screen projection process.
- the wireless terminal when the wireless terminal instructs the projection device to establish a Bluetooth link with the audio output device, it needs to determine whether to maintain the first connection with the audio output device according to the Bluetooth link support status of the audio output device.
- a Bluetooth link wherein, when the audio output device supports multiple Bluetooth links, the wireless terminal maintains the first Bluetooth link with the audio output device; when the audio output device supports a single Bluetooth link, the wireless terminal needs to disconnect from the audio output device.
- the wireless terminal when the first bluetooth link is disconnected, in order for the wireless terminal to continue to play the terminal sound through the audio output device after the screen projection ends, in a possible implementation manner, as shown in FIG. 7 , the method The following steps may also be included.
- Step 701 in response to the screen projection end instruction, the wireless terminal sends a screen projection end request to the screen projection device.
- the wireless terminal when the screen projection end operation is received and the first Bluetooth link with the audio output device is disconnected during the screen projection process, the wireless terminal obtains the audio output device from the screen projection device Bluetooth information of the audio device, so that the terminal sound can continue to be played through the audio output device after the screen casting ends.
- the wireless terminal obtains the Bluetooth information of the audio device by sending a screen projection end request.
- the screen projection end request may be sent through a data communication link, or may be sent through a Bluetooth link between the wireless terminal and the screen projection device.
- Step 702 in response to the screen projection end request sent by the wireless terminal, the screen projection device sends the audio device Bluetooth information of the audio output device to the wireless terminal.
- the screen projection device can obtain the Bluetooth information of the audio device of the audio output device, and then send the Bluetooth information to the wireless terminal for wireless The terminal re-establishes the first Bluetooth link.
- the Bluetooth information of the audio device may be sent through a data communication link, or may be sent through a Bluetooth link between the wireless terminal and the screen projection device.
- Step 703 in response to the screen projection end request sent by the wireless terminal, the screen projection device disconnects the data communication link and the second Bluetooth link.
- the screen projection device disconnects the second Bluetooth link with the audio output device while disconnecting the data communication link based on the screen projection end request, so that the wireless terminal Re-establish the Bluetooth connection with the audio output device.
- Step 704 the wireless terminal re-establishes the first Bluetooth link with the audio output device based on the Bluetooth information of the audio device.
- the wireless terminal After the wireless terminal acquires the Bluetooth information of the audio device, it re-establishes the first Bluetooth link with the audio output device, and then plays the terminal sound through the audio output device, without the need for the user to manually trigger the Bluetooth link reconstruction.
- the wireless terminal when the audio output device only supports single link, when the screen projection ends, the wireless terminal obtains the Bluetooth information of the audio output device from the screen projection device, so as to re-establish a Bluetooth link with the audio output device based on the Bluetooth information , so that the audio output device can continue to play the terminal sound after the screen projection ends, and the user does not need to manually trigger link reconstruction, which ensures the continuity of audio playback before and after the screen projection ends.
- the screen projection device when the screen projection device receives the screen projection data and needs to play the terminal sound through the audio output device, the screen projection device first determines the second The transmission delay of the Bluetooth link.
- the screen projection device sends a delay measurement instruction to the audio output device through the second Bluetooth link, and the audio output device receives the delay measurement After the command, send a response command through the second bluetooth link.
- the screen projection device determines the transmission delay of the second Bluetooth link based on the time interval between the delay measurement instruction and the response instruction.
- the transmission delay of the second Bluetooth link is (t2-t1)/2.
- the screen projection device synchronizes the transmission of the image data and the audio data based on the determined transmission delay, so as to ensure that in the screen projection data under the same time stamp, the display time of the image data is synchronized with the playback time of the audio data.
- the screen projection device can perform delayed transmission processing on the image data based on the transmission delay, so as to use the delay to offset the transmission delay of the audio data, and ensure that the image decoding in the screen projection device and the audio in the audio output device Synchronization of decoding. For example, when the transmission delay of the second Bluetooth link is 20ms, the screen projection device decodes and displays the received image data with a delay of 20ms.
- the wireless terminal needs to determine the current display content. If the current display content has high real-time requirements, no synchronization will be performed; if the current display content has low real-time requirements, then Synchronization is performed, wherein the real-time requirement can be determined based on the application type of the application currently running on the terminal.
- the wireless terminal does not perform synchronization; if the currently displayed content is an application screen of a video screen application, the wireless terminal performs synchronization to ensure the synchronization of audio and video.
- the screen projection device synchronizes the transmission of image data and audio data based on the transmission delay of the second Bluetooth link, which improves the projection efficiency.
- the synchronization of audio and video during the screen process is improved.
- the steps with the wireless terminal as the execution subject can be independently implemented as a screen projection method on the wireless terminal side, and the steps with the screen projection device as the execution subject can be independently implemented as a projection method on the screen projection device side. screen method, this embodiment will not repeat it here.
- FIG. 8 shows a structural block diagram of a screen projection device provided by an embodiment of the present application.
- the device can include:
- the data link establishing module 801 is configured to establish a data communication link with the screen projection device in response to the screen projection instruction, the data communication link is used to transmit the screen projection data, and the screen projection data includes image data and audio data;
- the request sending module 802 is configured to send a bluetooth link establishment request to the screen projection device when the wireless terminal has established a first bluetooth link with the audio output device, so that the screen projection device can Establishing a request to establish a second Bluetooth link with the audio output device;
- the first transmission module 803 is configured to transmit the screen projection data to the screen projection device through the data communication link, so that the screen projection device outputs a picture based on the image data;
- the second transmission module 804 is configured to transmit the audio data to the audio output device through the second Bluetooth link.
- the device also includes:
- a first Bluetooth link establishing module configured to establish the first Bluetooth link with the audio output device
- the request sending module 802 is configured to:
- the request sending module 802 is specifically used for:
- the request sending module 802 includes:
- a link establishing unit configured to establish the first Bluetooth link with the audio output device
- a display unit configured to display a link establishment prompt, where the link establishment prompt is used to confirm whether the second Bluetooth link is established between the screen projection device and the audio output device;
- the request sending unit is configured to, in response to the confirmation instruction, acquire the audio device Bluetooth information of the audio output device, and send the Bluetooth link establishment request including the audio device Bluetooth information to the screen projection device.
- the device also includes:
- a switching module configured to send a switching request to the screen projection device in response to a switching instruction, so that the screen projection device stops transmitting the audio data to the audio output device through the second Bluetooth link, and based on the The above audio data is output as sound.
- the device also includes:
- a Bluetooth link maintaining module configured to maintain the first Bluetooth link when the audio output device supports multiple Bluetooth links
- the Bluetooth link disconnection module is configured to disconnect the first Bluetooth link when the audio output device supports a single Bluetooth link.
- the device also includes:
- the Bluetooth information acquisition module is configured to send a screen projection end request to the screen projection device in response to the screen projection end instruction, and the first Bluetooth link is disconnected, and the screen projection end request is used to request from the screen projection device Obtain the Bluetooth information of the audio output device of the audio output device;
- a link reestablishment module configured to re-establish the first Bluetooth link with the audio output device based on the Bluetooth information of the audio output device.
- the device also includes:
- the screen projection end module is configured to send a screen projection end request to the screen projection device in response to the screen projection end instruction, so that the screen projection device disconnects the data communication link and the screen projection end request based on the screen projection end request.
- Second Bluetooth link is configured to send a screen projection end request to the screen projection device in response to the screen projection end instruction, so that the screen projection device disconnects the data communication link and the screen projection end request based on the screen projection end request.
- FIG. 9 shows a structural block diagram of a screen projection device provided by another embodiment of the present application.
- the device can include:
- a data link establishment module 901 configured to establish a data communication link with the wireless terminal, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
- the Bluetooth link establishment module 902 is configured to establish a second Bluetooth link with the audio output device in response to the Bluetooth link establishment request sent by the wireless terminal, and the audio output device has established a first Bluetooth link with the wireless terminal road;
- a data receiving module 903, configured to receive the screen projection data transmitted by the wireless terminal through the data communication link;
- a display module 904 configured to output a picture based on the image data
- the third transmission module 905 is configured to transmit the audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
- the device also includes:
- a stop module configured to stop transmitting the audio data to the audio output device through the second Bluetooth link in response to the switching request sent by the wireless terminal;
- the playing module is used for outputting sound based on the audio data.
- the device also includes:
- a disconnection module configured to disconnect the data communication link and the second Bluetooth link in response to the wireless terminal sending a screen projection end request.
- the audio output device supports a single Bluetooth link
- the device also includes:
- the bluetooth information sending module is configured to send the audio device bluetooth information of the audio output device to the wireless terminal in response to the screen projection end request sent by the wireless terminal, so that the wireless terminal can communicate with the audio device based on the bluetooth information of the audio device
- the audio output device re-establishes the first Bluetooth link.
- the device also includes:
- a delay determination module configured to determine the transmission delay of the second Bluetooth link
- a synchronization module configured to synchronize the transmission of the image data and the audio data based on the transmission delay.
- FIG. 10 shows a structural block diagram of an electronic device provided by an exemplary embodiment of the present application.
- the electronic device 1000 can be realized as the wireless terminal or the screen projection device in the foregoing embodiments.
- the electronic device may be a smartphone, a tablet, a personal computer, a smart TV, a projector, and the like.
- the electronic device 1000 in this application may include one or more of the following components: a processor 1010 , a memory 1020 and a Bluetooth chip 1030 .
- Processor 1010 may include one or more processing cores.
- the processor 1010 uses various interfaces and lines to connect various parts in the entire electronic device 1000, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 1020, and calling data stored in the memory 1020.
- the processor 1010 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
- DSP Digital Signal Processing
- FPGA Field-Programmable Gate Array
- PLA Programmable Logic Array
- the processor 1010 may integrate one or more of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU) and a modem, etc.
- a central processing unit Central Processing Unit, CPU
- an image processor Graphics Processing Unit, GPU
- a neural network processor Neural-network Processing Unit, NPU
- the CPU mainly handles the operating system, user interface and application programs, etc.
- the GPU is used to render and draw the content that needs to be displayed on the display screen
- the NPU is used to realize artificial intelligence (Artificial Intelligence, AI) functions
- the modem is used to process wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 1010, but may be realized by a single chip.
- the memory 1020 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM).
- the memory 1020 includes a non-transitory computer-readable storage medium.
- the memory 1020 may be used to store instructions, programs, codes, sets of codes or sets of instructions.
- the memory 1020 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the following method embodiments; the storage data area can store data created according to the use of the electronic device 1000 (such as audio data, phonebook) and the like.
- the Bluetooth chip 1030 is a component for realizing the Bluetooth function.
- the Bluetooth chip 1030 includes two parts, Host and Controller (corresponding to different Bluetooth protocol stacks), and the Host and Controller can run on the same chip (single-chip architecture), or can run on different chips (dual-chip architecture).
- the Host runs on the processor
- the Controller runs on the Bluetooth module; or, both the Host and the Controller run on the Bluetooth chip 1030 .
- the structure of the electronic device 1000 shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or less components than those shown in the illustration, or combine certain components, or a different arrangement of components.
- the electronic device 1000 also includes components such as a display screen, a sensor, a speaker, a microphone, a power supply, and a WiFi component, which will not be repeated here.
- An embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the screen projection method described in each of the above embodiments .
- the embodiment of the present application also provides a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
- the Bluetooth chip of the electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the screen projection method provided in various optional implementation manners of the above aspects.
- the "plurality” mentioned herein refers to two or more than two.
- “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently.
- the character "/” generally indicates that the contextual objects are an "or” relationship.
- the numbering of the steps described herein only exemplarily shows a possible sequence of execution among the steps. In some other embodiments, the above-mentioned steps may not be executed according to the order of the numbers, such as two different numbers The steps are executed at the same time, or two steps with different numbers are executed in the reverse order as shown in the illustration, which is not limited in this embodiment of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Human Computer Interaction (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
A screen projection method and apparatus, a wireless terminal, a screen projection device and a storage medium, which belong to the technical field of screen projection. The method comprises: establishing a data communication link with a screen projection device in response to a screen projection instruction; when a first Bluetooth link is established between a wireless terminal and an audio output device, sending a Bluetooth link establishment request to the screen projection device, so that the screen projection device establishes a second Bluetooth link with the audio output device on the basis of the Bluetooth link establishment request; and transmitting screen projection data to the screen projection device by means of the data communication link, so that the screen projection device outputs a picture on the basis of image data, and transmitting audio data to the audio output device by means of the second Bluetooth link. In the embodiments of the present application, during the screen projection process, audio output devices other than the screen projection device may continue to be used for audio playback so as to avoid the impact caused by the switching between audio playback sources during the screen projection process.
Description
本申请要求于2021年6月3日提交的申请号为202110620731.6、发明名称为“投屏方法、装置、无线终端、投屏设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110620731.6 and the title of the invention "screen projection method, device, wireless terminal, screen projection equipment and storage medium" filed on June 3, 2021, the entire contents of which are incorporated by reference incorporated in this application.
本申请实施例涉及投屏技术领域,特别涉及一种投屏方法、装置、无线终端、投屏设备及存储介质。The embodiments of the present application relate to the technical field of screen projection, and in particular, to a screen projection method, device, wireless terminal, screen projection device, and storage medium.
投屏是一种将终端侧音画数据传输至投屏设备,以此通过投屏设备展示终端画面并播放终端声音的技术。Screen projection is a technology that transmits the audio and video data on the terminal side to the screen projection device, so as to display the terminal screen and play the terminal sound through the screen projection device.
比如,当手机与电视接入同一无线网络时,用户可以开启手机的投屏功能,由手机通过无线网络将音画数据传输至电视,从而在电视侧显示手机侧画面,并播放手机侧声音。For example, when the mobile phone and the TV are connected to the same wireless network, the user can turn on the screen projection function of the mobile phone, and the mobile phone transmits the audio and video data to the TV through the wireless network, so that the screen of the mobile phone is displayed on the TV side, and the sound of the mobile phone is played.
发明内容Contents of the invention
本申请实施例提供了一种投屏方法、装置、无线终端、投屏设备及存储介质。所述技术方案如下:Embodiments of the present application provide a screen projection method and device, a wireless terminal, a screen projection device, and a storage medium. Described technical scheme is as follows:
一方面,本申请实施例提供了一种无线终端中的投屏方法,所述方法包括:On the one hand, an embodiment of the present application provides a screen projection method in a wireless terminal, the method comprising:
响应于投屏指令,与投屏设备建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;In response to the screen projection instruction, a data communication link is established with the screen projection device, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向所述投屏设备发送蓝牙链路建立请求,以便所述投屏设备基于所述蓝牙链路建立请求与所述音频输出设备建立第二蓝牙链路;以及,When the wireless terminal establishes a first Bluetooth link with the audio output device, send a Bluetooth link establishment request to the screen projection device, so that the screen projection device can communicate with the audio output based on the Bluetooth link establishment request and the audio output device. the device establishes a second Bluetooth link; and,
通过所述数据通信链路向所述投屏设备传输所述投屏数据,以便所述投屏设备基于所述图像数据输出画面,并通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据。Transmitting the screen projection data to the screen projection device through the data communication link, so that the screen projection device outputs a picture based on the image data, and transmits the screen projection data to the audio output device through the second Bluetooth link the audio data.
另一方面,本申请实施例提供了一种投屏设备中的投屏方法,所述方法包括:On the other hand, an embodiment of the present application provides a screen projection method in a screen projection device, the method comprising:
与无线终端建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;Establish a data communication link with the wireless terminal, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
响应于所述无线终端发送的蓝牙链路建立请求,与音频输出设备建立第二蓝牙链路,所述音频输出设备与所述无线终端建立有第一蓝牙链路;In response to the Bluetooth link establishment request sent by the wireless terminal, establish a second Bluetooth link with an audio output device, and the audio output device has a first Bluetooth link established with the wireless terminal;
通过所述数据通信链路接收所述无线终端传输的所述投屏数据;以及,receiving the screen projection data transmitted by the wireless terminal through the data communication link; and,
基于所述图像数据输出画面,并通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据,以便所述音频输出设备基于所述音频数据输出声音。outputting a picture based on the image data, and transmitting the audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
另一方面,本申请实施例提供了一种投屏装置,所述装置包括:On the other hand, an embodiment of the present application provides a screen projection device, and the device includes:
数据链路建立模块,用于响应于投屏指令,与投屏设备建立数据通信链路, 所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;A data link establishment module, configured to establish a data communication link with the screen projection device in response to a screen projection instruction, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
请求发送模块,用于在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向所述投屏设备发送蓝牙链路建立请求,以便所述投屏设备基于所述蓝牙链路建立请求与所述音频输出设备建立第二蓝牙链路;A request sending module, configured to send a bluetooth link establishment request to the screen projection device when the first bluetooth link is established between the wireless terminal and the audio output device, so that the screen projection device establishes a bluetooth link based on the bluetooth link requesting to establish a second Bluetooth link with the audio output device;
第一传输模块,用于通过所述数据通信链路向所述投屏设备传输所述投屏数据,以便所述投屏设备基于所述图像数据输出画面;以及,A first transmission module, configured to transmit the screen projection data to the screen projection device through the data communication link, so that the screen projection device outputs a picture based on the image data; and,
第二传输模块,用于通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据。A second transmission module, configured to transmit the audio data to the audio output device through the second Bluetooth link.
另一方面,本申请实施例提供了一种投屏装置,所述装置包括:On the other hand, an embodiment of the present application provides a screen projection device, and the device includes:
数据链路建立模块,用于与无线终端建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;A data link establishment module, configured to establish a data communication link with the wireless terminal, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
蓝牙链路建立模块,用于响应于所述无线终端发送的蓝牙链路建立请求,与音频输出设备建立第二蓝牙链路,所述音频输出设备与所述无线终端建立有第一蓝牙链路;A Bluetooth link establishment module, configured to establish a second Bluetooth link with an audio output device in response to the Bluetooth link establishment request sent by the wireless terminal, and the audio output device establishes a first Bluetooth link with the wireless terminal ;
数据接收模块,用于通过所述数据通信链路接收所述无线终端传输的所述投屏数据;A data receiving module, configured to receive the screen projection data transmitted by the wireless terminal through the data communication link;
显示模块,用于基于所述图像数据输出画面;以及,a display module for outputting a picture based on the image data; and,
第三传输模块,用于通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据,以便所述音频输出设备基于所述音频数据输出声音。A third transmission module, configured to transmit the audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
另一方面,本申请实施例提供了一种无线终端,所述无线终端包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如上述方面所述的无线终端中的投屏方法。On the other hand, an embodiment of the present application provides a wireless terminal, the wireless terminal includes a processor and a memory, at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement The method for projecting a screen in a wireless terminal according to the above aspects.
另一方面,本申请实施例提供了一种投屏设备,所述投屏设备包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如上述方面所述的投屏设备中的投屏方法。On the other hand, an embodiment of the present application provides a screen projection device, the screen projection device includes a processor and a memory, at least one program is stored in the memory, and the at least one program is loaded and executed by the processor In order to realize the screen projection method in the screen projection device as described in the above aspects.
另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如上述方面所述的投屏方法。On the other hand, an embodiment of the present application provides a computer-readable storage medium, where at least one program is stored in the computer-readable storage medium, and the at least one program is loaded and executed by a processor to implement the above-mentioned screencasting method.
另一方面,本申请实施例提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中;电子设备的蓝牙芯片从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该电子设备执行上述方面的各种可选实现方式中提供的投屏方法。On the other hand, an embodiment of the present application provides a computer program product, the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; the Bluetooth chip of the electronic device reads the computer-readable storage medium from the computer-readable storage medium. A computer instruction, the processor executes the computer instruction, so that the electronic device executes the screen projection method provided in various optional implementation manners of the foregoing aspects.
图1示出了本申请一个示例性实施例提供的实施环境的示意图;FIG. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
图2示出了本申请一个示例性实施例提供的投屏方法的流程图;FIG. 2 shows a flow chart of a screen projection method provided by an exemplary embodiment of the present application;
图3是本申请一个示例性实施例示出的投屏过程的实施示意图;Fig. 3 is an implementation schematic diagram of a screen projection process shown in an exemplary embodiment of the present application;
图4是本申请一个示例性实施例提供的第二蓝牙链路建立过程的流程图;FIG. 4 is a flowchart of a second Bluetooth link establishment process provided by an exemplary embodiment of the present application;
图5是本申请另一个示例性实施例示出的投屏过程的实施示意图;Fig. 5 is an implementation schematic diagram of a screen projection process shown in another exemplary embodiment of the present application;
图6是本申请一个示例性实施例示出的音频通路切换过程的实施示意图;FIG. 6 is a schematic diagram of an implementation of an audio path switching process shown in an exemplary embodiment of the present application;
图7是本申请一个示例性实施例示出的投屏结束过程的流程图;Fig. 7 is a flow chart of the screen casting end process shown in an exemplary embodiment of the present application;
图8示出了本申请一个实施例提供的投屏装置的结构框图;FIG. 8 shows a structural block diagram of a screen projection device provided by an embodiment of the present application;
图9示出了本申请另一个实施例提供的投屏装置的结构框图;FIG. 9 shows a structural block diagram of a screen projection device provided by another embodiment of the present application;
图10示出了本申请一个示例性实施例提供的电子设备的结构方框图。Fig. 10 shows a structural block diagram of an electronic device provided by an exemplary embodiment of the present application.
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solution and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below in conjunction with the accompanying drawings.
请参考图1,其示出了本申请一个示例性实施例提供的实施环境的示意图,该实施环境中包括无线终端110、音频输出设备120以及投屏设备130。Please refer to FIG. 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application. The implementation environment includes a wireless terminal 110 , an audio output device 120 and a screen projection device 130 .
无线终端110是具有蓝牙以及投屏功能的电子设备,该电子设备可以是智能手机、平板电脑、个人计算机等等,图1中以无线终端110为智能手机为例进行说明,但并不对此构成限定。The wireless terminal 110 is an electronic device with bluetooth and screen projection functions. The electronic device may be a smart phone, a tablet computer, a personal computer, etc. In FIG. limited.
音频输出设备120是具有蓝牙以及音频输出功能的电子设备,该电子设备可以是蓝牙耳机、蓝牙音箱等等,图1中以音频输出设备120为蓝牙耳机为例进行说明,单并不对此构成限定。The audio output device 120 is an electronic device with Bluetooth and audio output functions. The electronic device can be a Bluetooth headset, a Bluetooth speaker, etc. In FIG. 1, the audio output device 120 is a Bluetooth headset as an example for illustration. .
当无线终端110与音频输出设备120建立第一蓝牙链路后,无线终端110即通过第一蓝牙链路将音频数据传输至音频输出设备120,由音频输出设备120基于音频数据播放终端声音。After the wireless terminal 110 establishes the first Bluetooth link with the audio output device 120, the wireless terminal 110 transmits audio data to the audio output device 120 through the first Bluetooth link, and the audio output device 120 plays terminal sound based on the audio data.
投屏设备130是具有蓝牙以及显示功能的电子设备,该电子设备可以是智能电视、显示器、个人计算机或投影仪等等,图1中以投屏设备130为智能电视为例进行说明。The screen projection device 130 is an electronic device with bluetooth and display functions. The electronic device may be a smart TV, a monitor, a personal computer, or a projector, etc. In FIG. 1 , the screen projection device 130 is a smart TV as an example for illustration.
在一种可能的实施方式中,无线终端110与投屏设备130位于同一无线网络中,当接收到投屏指令时,无线终端110和投屏设备130通过无线网络建立数据通信链路,投屏过程中,无线终端110即通过该数据通信链路向投屏设备130传输投屏数据(画面数据和音频数据),由投屏设备130显示终端画面,并通过自身的扬声器播放终端音频。In a possible implementation manner, the wireless terminal 110 and the screen projection device 130 are located in the same wireless network. When receiving the screen projection instruction, the wireless terminal 110 and the screen projection device 130 establish a data communication link through the wireless network, and the screen projection During the process, the wireless terminal 110 transmits screen projection data (picture data and audio data) to the screen projection device 130 through the data communication link, and the screen projection device 130 displays the terminal screen and plays the terminal audio through its own speaker.
当然,在其他可能的实施方式中,无线终端110和投屏设备130也可以基于有线连接建立数据通信链路,比如,无线终端110与投屏设备130之间通过数据线相连,当接收到投屏指令时,无线终端110和投屏设备130即通过数据线建立数据通信链路,本实施例对此不作限定。Of course, in other possible implementation manners, the wireless terminal 110 and the screen projection device 130 may also establish a data communication link based on a wired connection. For example, the wireless terminal 110 and the screen projection device 130 are connected through a data cable. When the screen command is issued, the wireless terminal 110 and the screen projection device 130 establish a data communication link through the data cable, which is not limited in this embodiment.
本申请实施例中,投屏过程中,若无线终端110与音频输出设备120之间建立有第一蓝牙链路,无线终端110主动触发投屏设备130与音频输出设备120建立第二蓝牙链路,后续过程中,投屏设备130通过数据通信链路接收到投屏数据后,一方面基于投屏数据中的图像数据显示终端画面,另一方面通过第二蓝牙链路将投屏数据中的音频数据传输至音频输出设备120,由音频输出设备120基于音频数据播放终端声音。In the embodiment of the present application, during the screen projection process, if a first Bluetooth link is established between the wireless terminal 110 and the audio output device 120, the wireless terminal 110 actively triggers the screen projection device 130 to establish a second Bluetooth link with the audio output device 120 , in the follow-up process, after the screen projection device 130 receives the screen projection data through the data communication link, on the one hand, it displays the terminal screen based on the image data in the screen projection data; The audio data is transmitted to the audio output device 120, and the audio output device 120 plays terminal sound based on the audio data.
可选的,投屏过程中,无线终端110还提供音频通路切换功能,通过该功能,用户可以根据需求将音频通路由音频输出设备120切换至投屏设备130,从而通过投屏设备130播放终端声音,或者,将音频通路由投屏设备130切换至音频输出终端120,进而通过音频输出终端120输出声音。Optionally, during the screen projection process, the wireless terminal 110 also provides an audio channel switching function. Through this function, the user can switch the audio channel from the audio output device 120 to the screen projection device 130 as required, so that the terminal can be played through the screen projection device 130. sound, or switch the audio path from the screen projection device 130 to the audio output terminal 120 , and then output the sound through the audio output terminal 120 .
相关技术中,投屏过程中,无线终端将投屏数据(包括图像数据和音频数据)发送至投屏设备,由投屏设备进行画面显示以及声音播放,即便此时无线终端与音频输出设备之间存在蓝牙连接,也不会通过音频输出设备播放终端声音。In the related technology, during the screen projection process, the wireless terminal sends the screen projection data (including image data and audio data) to the screen projection device, and the screen projection device performs screen display and sound playback, even if the wireless terminal and the audio output device at this time There is a Bluetooth connection between them, and the terminal sound will not be played through the audio output device.
而本申请实施例提供的方案中,若在无线终端与音频输出设备间存在蓝牙连接的情况下进行投屏,无线终端通过指示投屏设备与音频输出设备建立蓝牙连接,使投屏过程中投屏设备能够通过音频输出设备播放声音,避免音频播放源由音频输出设备切换为投屏设备所造成的影响。However, in the solution provided by the embodiment of the present application, if there is a Bluetooth connection between the wireless terminal and the audio output device to perform screen projection, the wireless terminal instructs the screen projection device to establish a Bluetooth connection with the audio output device, so that during the screen projection process The screen device can play sound through the audio output device to avoid the impact caused by switching the audio playback source from the audio output device to the screen projection device.
在一种可能的应用场景下,智能手机与蓝牙耳机建立有蓝牙连接,用户使用智能手机观看视频时,智能手机将音频数据传输至蓝牙耳机,由蓝牙耳机进行音频播放,避免对他人造成干扰。当用户要通过智能电视继续观看视频时,可以通过触发智能手机的投屏功能,使智能手机与智能电视建立数据通信链路。In a possible application scenario, a Bluetooth connection is established between a smartphone and a Bluetooth headset. When a user uses the smartphone to watch a video, the smartphone transmits audio data to the Bluetooth headset, and the Bluetooth headset plays the audio to avoid causing interference to others. When the user wants to continue watching videos through the smart TV, the smart phone can establish a data communication link with the smart TV by triggering the screen projection function of the smart phone.
采用相关技术提供的方案,投屏过程中,智能手机的声音将通过智能电视进行播放,而智能电视外放声音会对他人造成干扰。Using the solution provided by related technologies, during the screen projection process, the sound of the smart phone will be played through the smart TV, and the sound played by the smart TV will cause interference to others.
而采用本申请实施例提供的方案,在建立数据通信链路时,智能手机触发智能电视与蓝牙耳机建立蓝牙连接。投屏过程中,智能电视基于接收到的图像数据显示手机画面,并通过蓝牙连接将音频数据同步传输至蓝牙耳机,由蓝牙耳机播放手机声音,避免投屏时智能电视外放声音对他人造成干扰。However, using the solution provided by the embodiment of the present application, when establishing a data communication link, the smart phone triggers the smart TV to establish a Bluetooth connection with the Bluetooth headset. During the screen projection process, the smart TV displays the screen of the mobile phone based on the received image data, and synchronously transmits the audio data to the Bluetooth headset through the Bluetooth connection, and the Bluetooth headset plays the sound of the mobile phone, so as to avoid the interference of the external sound of the smart TV when casting the screen. .
请参考图2,其示出了本申请一个示例性实施例提供的投屏方法的流程图,本实施例以该方法用于图1所示的实施环境为例进行说明,该方法包括:Please refer to FIG. 2 , which shows a flow chart of a screen projection method provided by an exemplary embodiment of the present application. This embodiment uses the implementation environment shown in FIG. 1 as an example for illustration. The method includes:
步骤201,响应于投屏指令,无线终端与投屏设备建立数据通信链路,数据通信链路用于传输投屏数据,投屏数据包括图像数据和音频数据。Step 201, in response to the screen projection instruction, the wireless terminal establishes a data communication link with the screen projection device, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data.
可选的,响应于投屏指令,无线终端与投屏设备通过无线网络建立无线数据通信链路,或者,无线终端与投屏设备通过有线连接建立有线数据通信链路。为了方便表述,下述各个实施例以无线数据通信链路为例进行说明。Optionally, in response to the screen projection instruction, the wireless terminal and the screen projection device establish a wireless data communication link through a wireless network, or, the wireless terminal and the screen projection device establish a wired data communication link through a wired connection. For the convenience of description, the following embodiments are described by taking a wireless data communication link as an example.
在一些实施例中,当无线网络中存在多个候选投屏设备时,接收到投屏指令时,无线终端显示各个候选投屏设备的设备标识,并在接收到设备选择操作时,与选中的投屏设备建立数据通信链路。In some embodiments, when there are multiple candidate screen projection devices in the wireless network, when receiving a screen projection instruction, the wireless terminal displays the device identification of each candidate screen projection device, and when receiving a device selection operation, communicates with the selected The projection device establishes a data communication link.
投屏过程中,无线终端将自身显示画面的图像数据以及自身声音的音频数据作为投屏数据,并通过数据通信链路将投屏数据发送至投屏设备。During the screen projection process, the wireless terminal uses the image data of its own display screen and the audio data of its own voice as the screen projection data, and sends the screen projection data to the screen projection device through the data communication link.
步骤202,投屏设备与无线终端建立数据通信链路。In step 202, the screen projection device establishes a data communication link with the wireless terminal.
步骤203,在无线终端与音频输出设备建立有第一蓝牙链路的情况下,无线终端向投屏设备发送蓝牙链路建立请求。Step 203, in the case that the wireless terminal establishes a first Bluetooth link with the audio output device, the wireless terminal sends a Bluetooth link establishment request to the screen projection device.
当无线终端与投屏设备之间建立有数据通信链路,且无线终端与音频输出 设备之间建立有第一蓝牙链路的情况下,无线终端即向投屏设备发送蓝牙链路建立请求,指示投屏设备与音频输出设备建立第二蓝牙链路。When a data communication link is established between the wireless terminal and the screen projection device, and a first Bluetooth link is established between the wireless terminal and the audio output device, the wireless terminal sends a Bluetooth link establishment request to the screen projection device, Instruct the screen projection device to establish a second Bluetooth link with the audio output device.
其中,无线终端与音频输出设备之间的第一蓝牙链路可以在投屏之前建立,也可以在投屏过程中建立(投屏过程中若未建立第一蓝牙链路,投屏设备则显示终端画面并播放终端声音)。Wherein, the first Bluetooth link between the wireless terminal and the audio output device can be established before the screen projection, or can be established during the screen projection process (if the first Bluetooth link is not established during the screen projection process, the screen projection device will display terminal screen and play terminal sound).
可选的,该蓝牙链路建立请求通过数据通信链路传输,或者,该蓝牙链路建立请求通过与投屏设备之间的蓝牙链路传输,本实施例对此不作限定。Optionally, the Bluetooth link establishment request is transmitted through a data communication link, or, the Bluetooth link establishment request is transmitted through a Bluetooth link with the screen projection device, which is not limited in this embodiment.
步骤204,响应于无线终端发送的蓝牙链路建立请求,投屏设备与音频输出设备建立第二蓝牙链路。Step 204, in response to the Bluetooth link establishment request sent by the wireless terminal, the screen projection device establishes a second Bluetooth link with the audio output device.
投屏设备接收到蓝牙链路建立请求后,基于该蓝牙链路建立请求中包含的信息与音频输出设备建立第二蓝牙链路。After receiving the bluetooth link establishment request, the screen projection device establishes a second bluetooth link with the audio output device based on the information contained in the bluetooth link establishment request.
示意性的,如图3所示,投屏前手机31与蓝牙耳机32之间建立有蓝牙链路,并通过蓝牙链路将音频数据传输至蓝牙耳机32;当接收到投屏指令时,手机31向电视33发送蓝牙链路建立请求,电视33接收到该请求后,即与蓝牙耳机32建立蓝牙链路。Schematically, as shown in Figure 3, a bluetooth link is established between the mobile phone 31 and the bluetooth headset 32 before screen projection, and the audio data is transmitted to the bluetooth headset 32 through the bluetooth link; 31 sends a Bluetooth link establishment request to the TV 33 , and the TV 33 establishes a Bluetooth link with the Bluetooth headset 32 after receiving the request.
步骤205,无线终端通过数据通信链路向投屏设备传输投屏数据。Step 205, the wireless terminal transmits the screen projection data to the screen projection device through the data communication link.
完成第二蓝牙链路建立后,无线终端即通过数据通信链路将图像数据和音频数据同步传输至投屏设备。如图3所示,手机31将包含图像数据和音频数据的投屏数据传输至电视33。After the establishment of the second Bluetooth link is completed, the wireless terminal transmits the image data and audio data to the screen projection device synchronously through the data communication link. As shown in FIG. 3 , the mobile phone 31 transmits screen projection data including image data and audio data to the TV 33 .
步骤206,投屏设备通过数据通信链路接收无线终端传输的投屏数据。Step 206, the screen projection device receives the screen projection data transmitted by the wireless terminal through the data communication link.
步骤207,投屏设备基于图像数据输出画面。In step 207, the screen projection device outputs a picture based on the image data.
由于投屏设备与音频输出设备之间建立有第二蓝牙链路,因此投屏设备在实现投屏功能时,仅对图像数据进行解析,并显示终端画面,而不对音频数据进行解析。Since a second Bluetooth link is established between the screen projection device and the audio output device, when the screen projection device implements the screen projection function, it only analyzes the image data and displays the terminal screen, but does not analyze the audio data.
步骤208,投屏设备通过第二蓝牙链路向音频输出设备传输音频数据,以便音频输出设备基于音频数据输出声音。Step 208, the screen projection device transmits audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
投屏设备在显示终端画面的同时,通过第二蓝牙链路将音频数据同步传输至音频输出设备,音频输出设备接收到音频数据后,基于该音频数据播放终端声音,实现终端画面在投屏设备处显示,而终端声音在音频输出设备处播放的效果。While displaying the terminal screen, the screen projection device synchronously transmits the audio data to the audio output device through the second Bluetooth link. is displayed, and the terminal sound is played on the audio output device.
示意性的,如图3所示,电视33对图像数据进行解析,显示与手机31相同的画面;同时,电视33将音频数据传输至蓝牙耳机32,从而通过蓝牙耳机32播放手机声音(手机31在投屏过程中不发声)。Schematically, as shown in Figure 3, TV 33 analyzes image data, and shows the picture identical with mobile phone 31; Make no sound during screencasting).
可见,采用本申请实施例提供的方案,投屏前后终端声音均通过音频输出设备播放(由无线终端与音频输出设备之间的音频通路切换为投屏设备与音频输出设备的音频通路),避免投屏过程中因直接通过投屏设备外放终端声音,导致对他人造成干扰。It can be seen that, using the solution provided by the embodiment of the present application, the terminal sound is played through the audio output device before and after screen projection (the audio path between the wireless terminal and the audio output device is switched to the audio path between the screen projection device and the audio output device), avoiding During the screen projection process, the terminal sound is directly released through the screen projection device, causing interference to others.
综上所述,本申请实施例中,无线终端向投屏设备进行投屏过程中,若无线终端与音频输出设备建立有蓝牙链路,投屏设备则基于无线终端发送的蓝牙 链路建立请求,与音频输出设备建立蓝牙链路,后续投屏设备接收到无线终端传输的投屏数据时,即可基于投屏数据中的图像数据显示终端画面,并向音频输出设备传输投屏数据中的音频数据,以便音频输出设备播放终端声音;采用本申请实施例提供的方案,投屏过程中可以继续使用投屏设备以外的音频输出设备进行音频播放,比如,投屏过程中可以继续通过投屏前与无线终端连接的蓝牙耳机进行音频播放,提高了投屏过程中音频播放的自由度,避免投屏过程中因音频播放源切换造成的影响。To sum up, in the embodiment of this application, during the process of projecting the screen from the wireless terminal to the screen projection device, if the wireless terminal establishes a Bluetooth link with the audio output device, the screen projection device will establish the Bluetooth link based on the request sent by the wireless terminal. , establish a Bluetooth link with the audio output device, and when the subsequent screen projection device receives the projection data transmitted by the wireless terminal, it can display the terminal screen based on the image data in the projection data and transmit the image data in the projection data to the audio output device. Audio data, so that the audio output device can play the terminal sound; using the solution provided by the embodiment of this application, the audio output device other than the screen projection device can continue to be used for audio playback during the screen projection process, for example, the screen projection process can continue to be played through the screen projection process. The Bluetooth headset connected to the wireless terminal can play audio, which improves the freedom of audio playback during the screen projection process and avoids the impact caused by switching audio playback sources during the screen projection process.
可选的,响应于投屏指令,与投屏设备建立数据通信链路之前,方法包括:Optionally, before establishing a data communication link with the screen projection device in response to the screen projection instruction, the method includes:
与音频输出设备建立第一蓝牙链路;Establish a first bluetooth link with the audio output device;
在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向投屏设备发送蓝牙链路建立请求,包括:In the case that the wireless terminal establishes a first Bluetooth link with the audio output device, a Bluetooth link establishment request is sent to the screen projection device, including:
获取音频输出设备的音频设备蓝牙信息,并向投屏设备发送包含音频设备蓝牙信息的蓝牙链路建立请求。Obtain the audio device Bluetooth information of the audio output device, and send a Bluetooth link establishment request including the audio device Bluetooth information to the projection device.
可选的,向投屏设备发送包含音频设备蓝牙信息的蓝牙链路建立请求,包括:Optionally, send a bluetooth link establishment request including the bluetooth information of the audio device to the screen projection device, including:
获取音频输出设备的设备状态;以及,Get the device state of the audio output device; and,
在音频输出设备处于使用状态的情况下,向投屏设备发送包含音频设备蓝牙信息的蓝牙链路建立请求。When the audio output device is in use, send a Bluetooth link establishment request including the Bluetooth information of the audio device to the screen projection device.
可选的,在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向投屏设备发送蓝牙链路建立请求,包括:Optionally, when the wireless terminal establishes a first Bluetooth link with the audio output device, sending a Bluetooth link establishment request to the screen projection device includes:
与音频输出设备建立第一蓝牙链路;Establish a first bluetooth link with the audio output device;
显示链路建立提示,链路建立提示用于确认是否在投屏设备和音频输出设备之间建立第二蓝牙链路;以及,displaying a link establishment prompt, the link establishment prompt is used to confirm whether to establish a second bluetooth link between the screen projection device and the audio output device; and,
响应于确认指令,获取音频输出设备的音频设备蓝牙信息,并向投屏设备发送包含音频设备蓝牙信息的蓝牙链路建立请求。In response to the confirmation instruction, acquire the Bluetooth information of the audio device of the audio output device, and send a Bluetooth link establishment request including the Bluetooth information of the audio device to the screen projection device.
可选的,向投屏设备传输投屏数据之后,方法还包括:Optionally, after transmitting the screen projection data to the screen projection device, the method further includes:
响应于切换指令,向投屏设备发送切换请求,以便投屏设备停止通过第二蓝牙链路向音频输出设备传输音频数据,并基于音频数据输出声音。In response to the switching instruction, a switching request is sent to the screen projection device, so that the screen projection device stops transmitting audio data to the audio output device through the second Bluetooth link, and outputs sound based on the audio data.
可选的,向投屏设备发送蓝牙链路建立请求之后,方法包括:Optionally, after sending the bluetooth link establishment request to the screen projection device, the method includes:
在音频输出设备支持多蓝牙链路的情况下,保持第一蓝牙链路;In the case that the audio output device supports multiple bluetooth links, maintain the first bluetooth link;
或,or,
在音频输出设备支持单蓝牙链路的情况下,断开第一蓝牙链路。If the audio output device supports a single Bluetooth link, disconnect the first Bluetooth link.
可选的,向投屏设备传输投屏数据之后,方法还包括:Optionally, after transmitting the screen projection data to the screen projection device, the method further includes:
响应于投屏结束指令,且第一蓝牙链路断开,从投屏设备处获取音频输出设备的音频设备蓝牙信息;以及,In response to the screen projection end instruction, and the first Bluetooth link is disconnected, obtain the audio device Bluetooth information of the audio output device from the screen projection device; and,
基于音频设备蓝牙信息与音频输出设备重新建立第一蓝牙链路。Re-establish the first Bluetooth link with the audio output device based on the Bluetooth information of the audio device.
可选的,向投屏设备传输投屏数据之后,方法还包括:Optionally, after transmitting the screen projection data to the screen projection device, the method further includes:
响应于投屏结束指令,向投屏设备发送投屏结束请求,以便投屏设备基于投屏结束请求断开数据通信链路和第二蓝牙链路。In response to the screen projection end instruction, a screen projection end request is sent to the screen projection device, so that the screen projection device disconnects the data communication link and the second Bluetooth link based on the screen projection end request.
可选的,基于图像数据输出画面,并通过第二蓝牙链路向音频输出设备传输音频数据之后,方法还包括:Optionally, after outputting the picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further includes:
响应于无线终端发送的切换请求,停止通过第二蓝牙链路向音频输出设备传输音频数据;以及,In response to the switching request sent by the wireless terminal, stop transmitting audio data to the audio output device through the second Bluetooth link; and,
基于音频数据输出声音。Sound is output based on the audio data.
可选的,基于图像数据输出画面,并通过第二蓝牙链路向音频输出设备传输音频数据之后,方法还包括:Optionally, after outputting the picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further includes:
响应于无线终端发送投屏结束请求,断开数据通信链路和第二蓝牙链路。In response to the wireless terminal sending a screen projection end request, the data communication link and the second Bluetooth link are disconnected.
可选的,音频输出设备支持单蓝牙链路;Optionally, the audio output device supports a single Bluetooth link;
基于图像数据输出画面,并通过第二蓝牙链路向音频输出设备传输音频数据之后,方法还包括:After outputting the picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further includes:
响应于无线终端发送的投屏结束请求,向无线终端发送音频输出设备的音频设备蓝牙信息,以便无线终端基于音频设备蓝牙信息与音频输出设备重新建立第一蓝牙链路。In response to the screen projection end request sent by the wireless terminal, the audio device Bluetooth information of the audio output device is sent to the wireless terminal, so that the wireless terminal re-establishes the first Bluetooth link with the audio output device based on the audio device Bluetooth information.
可选的,基于图像数据输出画面,并通过第二蓝牙链路向音频输出设备传输音频数据之前,方法还包括:Optionally, before outputting the picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further includes:
确定第二蓝牙链路的传输时延;以及,determining a transmission delay of the second bluetooth link; and,
基于传输时延对图像数据和音频数据进行传输同步。The image data and the audio data are transmitted synchronously based on the transmission delay.
在一种可能的应用场景中,在进行投屏前,无线终端已经与音频输出设备建立第一蓝牙链路,并通过第一蓝牙链路向音频输出设备传输音频数据。当用户在这种情况下触发无线终端进行投屏时,响应于投屏指令,无线终端获取音频输出设备的音频设备蓝牙信息,并向投屏设备发送包含该音频设备蓝牙信息的蓝牙链路建立请求。其中,音频设备蓝牙信息可以是音频输出设备的蓝牙地址或蓝牙名称。In a possible application scenario, before performing screen projection, the wireless terminal has established a first Bluetooth link with the audio output device, and transmits audio data to the audio output device through the first Bluetooth link. When the user triggers the wireless terminal to perform screen projection in this situation, in response to the screen projection command, the wireless terminal obtains the audio device Bluetooth information of the audio output device, and sends a Bluetooth link establishment message containing the audio device Bluetooth information to the screen projection device. ask. Wherein, the Bluetooth information of the audio device may be a Bluetooth address or a Bluetooth name of the audio output device.
相应的,投屏设备接收到蓝牙链路建立请求后,基于该音频设备蓝牙信息向音频输出设备发起蓝牙连接请求,从而与音频输出设备建立第二蓝牙链路。本申请实施例并不对建立蓝牙链路的具体过程进行限定。Correspondingly, after receiving the Bluetooth link establishment request, the screen projection device initiates a Bluetooth connection request to the audio output device based on the Bluetooth information of the audio device, thereby establishing a second Bluetooth link with the audio output device. The embodiment of the present application does not limit the specific process of establishing the Bluetooth link.
在一种可能的实施方式中,虽然无线终端与音频输出设备建立蓝牙连接,但用户可能并未使用音频输出设备,为了避免在这种情况下继续通过音频输出设备播放终端声音,无线终端获取音频输出设备的设备状态,并在音频输出设备处于使用状态时,向投屏设备发送包含音频设备蓝牙信息的蓝牙链路建立请求。In a possible implementation, although the wireless terminal establishes a Bluetooth connection with the audio output device, the user may not use the audio output device. In order to avoid continuing to play the terminal sound through the audio output device in this case, the wireless terminal acquires the Output the device status of the device, and when the audio output device is in use, send a Bluetooth link establishment request including the Bluetooth information of the audio device to the projection device.
可选的,该设备状态由音频输出设备通过自身的传感器进行检测,并通过第一蓝牙链路上报至无线终端。比如,当音频输出设备为蓝牙耳机时,蓝牙耳机通过内置传感器确定耳机姿态,并在耳机姿态为入耳状态时,确定处于使用状态。Optionally, the device status is detected by the audio output device through its own sensor, and reported to the wireless terminal through the first Bluetooth link. For example, when the audio output device is a bluetooth earphone, the bluetooth earphone determines the attitude of the earphone through the built-in sensor, and determines that it is in the use state when the attitude of the earphone is in the ear state.
可选的,若音频输出设备处于未使用状态,无线终端则不会向投屏设备发送蓝牙链路建立请求;或者,若音频输出设备处于未使用状态,无线终端仍旧向投屏设备发送蓝牙链路建立请求,并指示投屏设备在投屏过程中通过自身扬 声器播放终端声音(即不通过第二蓝牙链路向音频输出设备传输音频数据)。Optionally, if the audio output device is not in use, the wireless terminal will not send a Bluetooth link establishment request to the screen projection device; or, if the audio output device is in an unused state, the wireless terminal will still send a Bluetooth link to the screen projection device path establishment request, and instruct the screen projection device to play the terminal sound through its own speaker during the screen projection process (that is, not to transmit audio data to the audio output device through the second Bluetooth link).
本实施例中,无线终端基于音频输出设备的设备状态,确定是否向投屏设备发送蓝牙链路建立请求,避免在音频输出设备处于未使用状态时通过音频输出设备播放终端声音,导致需要再次手动切换音频通路(切换至投屏设备播放)的问题。In this embodiment, based on the device state of the audio output device, the wireless terminal determines whether to send a Bluetooth link establishment request to the screen projection device, so as to avoid playing the terminal sound through the audio output device when the audio output device is not in use, resulting in the need to manually The problem of switching the audio path (switching to the screen mirroring device for playback).
在另一种可能的应用场景下,在进行投屏前,无线终端并未与音频输出设备建立第一蓝牙链路,若在此时进行投屏,投屏设备将会显示终端画面并播放终端声音。若无线终端在投屏过程中音频输出设备建立连接,无线终端可以根据用户需求,确定是否进行音频通路切换(由投屏设备切换至音频输出设备)。如图4所示,上述步骤203可以包括如下步骤。In another possible application scenario, before the screen projection, the wireless terminal has not established the first Bluetooth link with the audio output device. If the screen projection is performed at this time, the screen projection device will display the terminal screen and play the terminal sound. If the wireless terminal establishes a connection with the audio output device during the screen projection process, the wireless terminal can determine whether to switch the audio path (from the screen projection device to the audio output device) according to user needs. As shown in FIG. 4 , the above step 203 may include the following steps.
步骤203A,与音频输出设备建立第一蓝牙链路。 Step 203A, establishing a first Bluetooth link with the audio output device.
可选的,投屏过程中,当接收到蓝牙连接指令时,无线终端与音频输出设备建立第一蓝牙链路。其中,该音频输出设备可以是与无线终端首次配对的蓝牙设备,或者,是与无线终端进行过历史配对的蓝牙设备。Optionally, during the screen projection process, when receiving a Bluetooth connection instruction, the wireless terminal establishes a first Bluetooth link with the audio output device. Wherein, the audio output device may be a Bluetooth device paired with the wireless terminal for the first time, or a Bluetooth device previously paired with the wireless terminal.
步骤203B,显示链路建立提示,链路建立提示用于确认是否在投屏设备和音频输出设备之间建立第二蓝牙链路。In step 203B, a link establishment prompt is displayed, and the link establishment prompt is used to confirm whether to establish a second Bluetooth link between the screen projection device and the audio output device.
当检测到在投屏过程中与音频输出设备建立蓝牙连接,为了确定是否需要将音频通路由投屏设备切换至音频输出设备,无线终端显示链路建立提示,以提示用户确认是否在投屏设备与音频输出设备之间建立第二蓝牙链路,并将音频通路切换至音频输出设备。When it is detected that a Bluetooth connection is established with the audio output device during screen projection, in order to determine whether the audio path needs to be switched from the screen projection device to the audio output device, the wireless terminal displays a link establishment prompt to prompt the user to confirm whether the audio output device is connected to the screen projection device. A second Bluetooth link is established with the audio output device, and the audio path is switched to the audio output device.
若接收到确认指令,无线终端确定需要切换至音频通路,并执行步骤203C;若接收到取消指令,无线终端确定保持音频通路,继续通过投屏设备播放终端声音。If a confirmation instruction is received, the wireless terminal determines that it needs to switch to the audio channel, and executes step 203C; if a cancel instruction is received, the wireless terminal determines to maintain the audio channel, and continues to play the terminal sound through the screen projection device.
示意性的,如图5所示,投屏过程中,手机31向电视33传输投屏数据,电视即根据其中的图像数据显示手机画面,根据其中的音频数据播放手机声音。当手机31与蓝牙耳机32建立蓝牙连接时,手机31显示链路建立提示311,提示是否需要在电视33与蓝牙耳机32之间建立蓝牙链路,并通过蓝牙耳机32播放手机声音。Schematically, as shown in FIG. 5 , during the screen projection process, the mobile phone 31 transmits screen projection data to the TV 33 , and the TV displays the screen of the mobile phone according to the image data therein, and plays the sound of the mobile phone according to the audio data therein. When the mobile phone 31 establishes a Bluetooth connection with the Bluetooth headset 32, the mobile phone 31 displays a link establishment prompt 311, prompting whether to establish a Bluetooth link between the TV 33 and the Bluetooth headset 32, and plays the sound of the mobile phone through the Bluetooth headset 32.
步骤203C,响应于确认指令,获取音频输出设备的音频设备蓝牙信息,并向投屏设备发送包含音频设备蓝牙信息的蓝牙链路建立请求。 Step 203C, in response to the confirmation instruction, acquire the Bluetooth information of the audio device of the audio output device, and send a Bluetooth link establishment request including the Bluetooth information of the audio device to the screen projection device.
响应于确认指令,无线终端即获取音频输出设备的音频设备蓝牙信息,从而向投屏设备发送包含音频设备蓝牙信息的蓝牙链路建立请求,由投屏设备基于该音频设备蓝牙信息与音频输出设备建立第二蓝牙链路,并通过第二蓝牙链路将音频数据发送音频输出设备,供音频输出设备进行播放。其中,该确认指令由确认操作触发,该确认操作通过无线终端(比如点击确认选项)接收,或者,通过音频输出设备(比如敲击蓝牙耳机)接收。In response to the confirmation instruction, the wireless terminal obtains the audio device Bluetooth information of the audio output device, and then sends a Bluetooth link establishment request including the audio device Bluetooth information to the screen projection device, and the screen projection device communicates with the audio output device based on the audio device Bluetooth information. A second Bluetooth link is established, and the audio data is sent to the audio output device through the second Bluetooth link for playback by the audio output device. Wherein, the confirmation instruction is triggered by a confirmation operation, and the confirmation operation is received through a wireless terminal (such as clicking on a confirmation option), or received through an audio output device (such as tapping a Bluetooth headset).
示意性的,如图5所示,用户点击确认选项后,电视33与蓝牙耳机32即建立蓝牙链路,并通过该蓝牙链路将音频数据发送至蓝牙耳机32,从而通过蓝 牙耳机32播放手机声音。Schematically, as shown in Figure 5, after the user clicks the confirmation option, the TV 33 and the Bluetooth earphone 32 promptly establish a Bluetooth link, and send audio data to the Bluetooth earphone 32 through the Bluetooth link, thereby playing the mobile phone through the Bluetooth earphone 32. sound.
为了进一步提高投屏过程中音频播放的自由度,投屏过程中用户可以根据需要切换手机声音的音频播放源。在一种可能的实施方式中,响应于切换指令,无线终端向投屏设备发送切换请求,以便投屏设备停止通过第二蓝牙链路向音频输出设备传输音频数据,并基于音频数据播放终端声音。In order to further improve the freedom of audio playback during the screen projection process, the user can switch the audio playback source of the phone's voice as needed during the screen projection process. In a possible implementation manner, in response to the switching instruction, the wireless terminal sends a switching request to the screen projection device, so that the screen projection device stops transmitting audio data to the audio output device through the second Bluetooth link, and plays the terminal sound based on the audio data .
可选的,投屏过程中无线终端的界面上显示有切换控件,当接收到对切换控件的触发操作时,无线终端接收到切换指令,从而向投屏设备发送切换请求。其中,该切换请求可以通过数据通路链路发送,也可以通过无线终端与投屏设备之间的蓝牙链路发送。Optionally, a switching control is displayed on the interface of the wireless terminal during the screen projection process, and when a trigger operation on the switching control is received, the wireless terminal receives a switching instruction, thereby sending a switching request to the screen projection device. Wherein, the switching request may be sent through a data path link, or may be sent through a Bluetooth link between the wireless terminal and the screen projection device.
接收到切换请求后,投屏设备停止通过第二蓝牙链路向音频输出设备发送音频数据,即将音频通路由音频输出设备切换至投屏设备。可选的,接收到切换请求后,投屏设备与音频输出设备之间的第二蓝牙链路保持,以便后续再次进行音频通路切换。After receiving the switching request, the screen projection device stops sending audio data to the audio output device through the second Bluetooth link, that is, the audio path is switched from the audio output device to the screen projection device. Optionally, after receiving the switch request, the second Bluetooth link between the screen projection device and the audio output device is maintained, so that the audio channel can be switched again later.
示意性的,如图6所示,投屏过程中,电视33首先显示手机画面,并通过蓝牙耳机32播放手机声音;当接收到切换指令时,手机31向电视33发送切换请求,电视33即根据该切换请求,停止向蓝牙耳机32传输音频数据,从而通过自身扬声器播放手机声音。Schematically, as shown in Figure 6, during the screen projection process, the TV 33 first displays the screen of the mobile phone, and plays the sound of the mobile phone through the Bluetooth headset 32; According to the switching request, the transmission of audio data to the Bluetooth earphone 32 is stopped, thereby playing the sound of the mobile phone through its own speaker.
可选的,当再次接收到切换指令时,无线终端向投屏设备发送切换请求,以便投屏设备重新通过第二蓝牙链路向音频输出设备传输音频数据。Optionally, when receiving the switching instruction again, the wireless terminal sends a switching request to the screen projection device, so that the screen projection device transmits audio data to the audio output device again through the second Bluetooth link.
本实施例中,投屏过程中,当接收到切换指令时,无线终端指示投屏设备切换音频通路,从而在投屏设备以及音频输出设备之间实现声音播放切换,进一步提高了投屏过程中声音播放的自由度。In this embodiment, during the screen projection process, when receiving the switching instruction, the wireless terminal instructs the screen projection device to switch the audio channel, thereby realizing the switching of sound playback between the screen projection device and the audio output device, which further improves the screen projection process. The freedom of sound playback.
在一种可能的实施方式中,无线终端指示投屏设备与音频输出设备建立蓝牙链路的过程中,需要根据音频输出设备的蓝牙链路支持情况,确定是否保持与音频输出设备之间的第一蓝牙链路。其中,当音频输出设备支持多蓝牙链路时,无线终端保持与音频输出设备之间的第一蓝牙链路;当音频输出设备支持单蓝牙链路时,无线终端则需要断开与音频输出设备之间的第一蓝牙链路,以便投屏设备与音频输出设备建立第二蓝牙链路。In a possible implementation manner, when the wireless terminal instructs the projection device to establish a Bluetooth link with the audio output device, it needs to determine whether to maintain the first connection with the audio output device according to the Bluetooth link support status of the audio output device. A Bluetooth link. Wherein, when the audio output device supports multiple Bluetooth links, the wireless terminal maintains the first Bluetooth link with the audio output device; when the audio output device supports a single Bluetooth link, the wireless terminal needs to disconnect from the audio output device. The first Bluetooth link between the screen mirroring device and the audio output device to establish a second Bluetooth link.
并且,在第一蓝牙链路断开的情况下,为了在投屏结束后,无线终端能够继续通过音频输出设备播放终端声音,在一种可能的实施方式中,如图7所示,该方法还可以包括如下步骤。Moreover, when the first bluetooth link is disconnected, in order for the wireless terminal to continue to play the terminal sound through the audio output device after the screen projection ends, in a possible implementation manner, as shown in FIG. 7 , the method The following steps may also be included.
步骤701,响应于投屏结束指令,无线终端向投屏设备发送投屏结束请求。Step 701, in response to the screen projection end instruction, the wireless terminal sends a screen projection end request to the screen projection device.
在一种可能的实施方式中,当接收到投屏结束操作,且在投屏过程中断开与音频输出设备之间的第一蓝牙链路时,无线终端从投屏设备处获取音频输出设备的音频设备蓝牙信息,以便在投屏结束后继续通过音频输出设备播放终端声音。可选的,无线终端通过发送投屏结束请求获取音频设备蓝牙信息。In a possible implementation manner, when the screen projection end operation is received and the first Bluetooth link with the audio output device is disconnected during the screen projection process, the wireless terminal obtains the audio output device from the screen projection device Bluetooth information of the audio device, so that the terminal sound can continue to be played through the audio output device after the screen casting ends. Optionally, the wireless terminal obtains the Bluetooth information of the audio device by sending a screen projection end request.
其中,该投屏结束请求可以通过数据通信链路发送,也可以通过无线终端与投屏设备之间的蓝牙链路发送。Wherein, the screen projection end request may be sent through a data communication link, or may be sent through a Bluetooth link between the wireless terminal and the screen projection device.
步骤702,响应于无线终端发送的投屏结束请求,投屏设备向无线终端发送音频输出设备的音频设备蓝牙信息。Step 702, in response to the screen projection end request sent by the wireless terminal, the screen projection device sends the audio device Bluetooth information of the audio output device to the wireless terminal.
由于投屏设备与音频输出设备之间建立有蓝牙链路,因此投屏设备接收到该请求后,能够获取到音频输出设备的音频设备蓝牙信息,从而将该蓝牙信息发送至无线终端,以便无线终端重新建立第一蓝牙链路。其中,该音频设备蓝牙信息可以通过数据通信链路发送,也可以通过无线终端与投屏设备之间的蓝牙链路发送。Since a Bluetooth link is established between the screen projection device and the audio output device, after receiving the request, the screen projection device can obtain the Bluetooth information of the audio device of the audio output device, and then send the Bluetooth information to the wireless terminal for wireless The terminal re-establishes the first Bluetooth link. Wherein, the Bluetooth information of the audio device may be sent through a data communication link, or may be sent through a Bluetooth link between the wireless terminal and the screen projection device.
步骤703,响应于无线终端发送投屏结束请求,投屏设备断开数据通信链路和第二蓝牙链路。Step 703, in response to the screen projection end request sent by the wireless terminal, the screen projection device disconnects the data communication link and the second Bluetooth link.
由于投屏结束后无需通过投屏设备播放终端声音,因此投屏设备基于投屏结束请求断开数据通信链路的同时,断开与音频输出设备之间的第二蓝牙链路,以便无线终端与音频输出设备重新建立蓝牙连接。Since the terminal sound does not need to be played through the screen projection device after the screen projection ends, the screen projection device disconnects the second Bluetooth link with the audio output device while disconnecting the data communication link based on the screen projection end request, so that the wireless terminal Re-establish the Bluetooth connection with the audio output device.
步骤704,无线终端基于音频设备蓝牙信息与音频输出设备重新建立第一蓝牙链路。Step 704, the wireless terminal re-establishes the first Bluetooth link with the audio output device based on the Bluetooth information of the audio device.
无线终端获取到音频设备蓝牙信息后,即重新与音频输出设备建立第一蓝牙链路,进而通过音频输出设备播放终端声音,无需用户手动触发蓝牙链路重建。After the wireless terminal acquires the Bluetooth information of the audio device, it re-establishes the first Bluetooth link with the audio output device, and then plays the terminal sound through the audio output device, without the need for the user to manually trigger the Bluetooth link reconstruction.
本实施例中,当音频输出设备仅支持单链路时,在结束投屏时,无线终端从投屏设备处获取音频输出设备的蓝牙信息,从而基于蓝牙信息重新与音频输出设备建立蓝牙链路,使投屏结束后音频输出设备能够继续播放终端声音,且无需用户手动触发链路重建,保证了投屏结束前后音频播放的连续性。In this embodiment, when the audio output device only supports single link, when the screen projection ends, the wireless terminal obtains the Bluetooth information of the audio output device from the screen projection device, so as to re-establish a Bluetooth link with the audio output device based on the Bluetooth information , so that the audio output device can continue to play the terminal sound after the screen projection ends, and the user does not need to manually trigger link reconstruction, which ensures the continuity of audio playback before and after the screen projection ends.
当终端画面和终端声音均通过投屏设备显示和播放时,终端画面与终端声音保持同步;而当终端画面由投屏设备显示,终端声音由音频输出设备播放时,由于投屏设备向音频输出设备传输音频数据时存在传输延时,因此可能会出现音画不同步的问题(表现为声音存在滞后性)。When both the terminal screen and the terminal sound are displayed and played through the screen projection device, the terminal screen and the terminal sound are kept in sync; and when the terminal screen is displayed by the screen projection device and the terminal sound is played by the audio output device, the audio output from the screen projection device There is a transmission delay when the device transmits audio data, so there may be a problem of out-of-sync audio and picture (expressed as sound lag).
因此,为了提高投屏过程中的音画同步性,在一种可能的实施方式中,投屏设备接收到投屏数据,且需要通过音频输出设备播放终端声音时,投屏设备首先确定第二蓝牙链路的传输时延。Therefore, in order to improve the synchronization of audio and video during the screen projection process, in a possible implementation manner, when the screen projection device receives the screen projection data and needs to play the terminal sound through the audio output device, the screen projection device first determines the second The transmission delay of the Bluetooth link.
关于确定第二蓝牙链路传输时延的具体方式,在一种可能的实施方式中,投屏设备通过第二蓝牙链路向音频输出设备发送时延测量指令,音频输出设备接收到时延测量指令后,通过第二蓝牙链路发送响应指令。投屏设备基于时延测量指令以及响应指令之间的时间间隔,确定第二蓝牙链路的传输时延。Regarding the specific method of determining the transmission delay of the second Bluetooth link, in a possible implementation manner, the screen projection device sends a delay measurement instruction to the audio output device through the second Bluetooth link, and the audio output device receives the delay measurement After the command, send a response command through the second bluetooth link. The screen projection device determines the transmission delay of the second Bluetooth link based on the time interval between the delay measurement instruction and the response instruction.
示意性的,当时延测量指令的发送时刻为t1,响应指令的接收时刻为t2时,第二蓝牙链路的传输时延即为(t2-t1)/2。Schematically, when the delay measurement command is sent at t1 and the response command is received at t2, the transmission delay of the second Bluetooth link is (t2-t1)/2.
进一步的,投屏设备基于确定出的传输时延对图像数据和音频数据进行传输同步,保证同一时间戳下的投屏数据中,图像数据的显示时刻与音频数据的播放时刻同步。Further, the screen projection device synchronizes the transmission of the image data and the audio data based on the determined transmission delay, so as to ensure that in the screen projection data under the same time stamp, the display time of the image data is synchronized with the playback time of the audio data.
在一种可能的实施方式中,投屏设备可以基于传输时延对图像数据进行延 迟传输处理,从而利用该延迟抵消音频数据的传输延时,保证投屏设备中图像解码与音频输出设备中音频解码的同步性。比如,当第二蓝牙链路的传输时延为20ms时,投屏设备即延后20ms对接收到的图像数据进行解码显示。In a possible implementation, the screen projection device can perform delayed transmission processing on the image data based on the transmission delay, so as to use the delay to offset the transmission delay of the audio data, and ensure that the image decoding in the screen projection device and the audio in the audio output device Synchronization of decoding. For example, when the transmission delay of the second Bluetooth link is 20ms, the screen projection device decodes and displays the received image data with a delay of 20ms.
可选的,在对图像数据和音频数据进行传输同步前,无线终端需要确定当前显示内容,若当前显示内容具有高实时性需求,则不进行同步,若当前显示内容具有低实时性需求,则进行同步,其中,该实时性需求可以基于终端当前运行应用程序的应用类型确定。Optionally, before synchronizing the transmission of image data and audio data, the wireless terminal needs to determine the current display content. If the current display content has high real-time requirements, no synchronization will be performed; if the current display content has low real-time requirements, then Synchronization is performed, wherein the real-time requirement can be determined based on the application type of the application currently running on the terminal.
比如,若当前显示内容为游戏应用的应用画面时,为了降低画面显示延迟,无线终端不进行同步;若当前显示内容为视屏应用的应用画面时,无线终端则进行同步,保证音画同步性。For example, if the currently displayed content is an application screen of a game application, in order to reduce the screen display delay, the wireless terminal does not perform synchronization; if the currently displayed content is an application screen of a video screen application, the wireless terminal performs synchronization to ensure the synchronization of audio and video.
本实施例中,当通过投屏设备显示终端画面,通过音频输出设备播放终端声音时,投屏设备基于第二蓝牙链路的传输时延,对图像数据和音频数据进行传输同步,提高了投屏过程中音画的同步性。In this embodiment, when the terminal screen is displayed through the screen projection device and the terminal sound is played through the audio output device, the screen projection device synchronizes the transmission of image data and audio data based on the transmission delay of the second Bluetooth link, which improves the projection efficiency. The synchronization of audio and video during the screen process.
需要说明的是,上述各个实施例中,以无线终端为执行主体的步骤可以单独实现成为无线终端侧的投屏方法,以投屏设备为执行主体的步骤可以单独实现成为投屏设备侧的投屏方法,本实施例在此不做赘述。It should be noted that, in each of the above-mentioned embodiments, the steps with the wireless terminal as the execution subject can be independently implemented as a screen projection method on the wireless terminal side, and the steps with the screen projection device as the execution subject can be independently implemented as a projection method on the screen projection device side. screen method, this embodiment will not repeat it here.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
请参考图8,其示出了本申请一个实施例提供的投屏装置的结构框图。该装置可以包括:Please refer to FIG. 8 , which shows a structural block diagram of a screen projection device provided by an embodiment of the present application. The device can include:
数据链路建立模块801,用于响应于投屏指令,与投屏设备建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;The data link establishing module 801 is configured to establish a data communication link with the screen projection device in response to the screen projection instruction, the data communication link is used to transmit the screen projection data, and the screen projection data includes image data and audio data;
请求发送模块802,用于在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向所述投屏设备发送蓝牙链路建立请求,以便所述投屏设备基于所述蓝牙链路建立请求与所述音频输出设备建立第二蓝牙链路;The request sending module 802 is configured to send a bluetooth link establishment request to the screen projection device when the wireless terminal has established a first bluetooth link with the audio output device, so that the screen projection device can Establishing a request to establish a second Bluetooth link with the audio output device;
第一传输模块803,用于通过所述数据通信链路向所述投屏设备传输所述投屏数据,以便所述投屏设备基于所述图像数据输出画面;The first transmission module 803 is configured to transmit the screen projection data to the screen projection device through the data communication link, so that the screen projection device outputs a picture based on the image data;
第二传输模块804,用于通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据。The second transmission module 804 is configured to transmit the audio data to the audio output device through the second Bluetooth link.
可选的,所述装置还包括:Optionally, the device also includes:
第一蓝牙链路建立模块,用于与所述音频输出设备建立所述第一蓝牙链路;A first Bluetooth link establishing module, configured to establish the first Bluetooth link with the audio output device;
所述请求发送模块802,用于:The request sending module 802 is configured to:
获取所述音频输出设备的音频设备蓝牙信息,并向所述投屏设备发送包含所述音频设备蓝牙信息的所述蓝牙链路建立请求。Acquire the audio device Bluetooth information of the audio output device, and send the Bluetooth link establishment request including the audio device Bluetooth information to the screen projection device.
可选的,所述请求发送模块802,具体用于:Optionally, the request sending module 802 is specifically used for:
获取所述音频输出设备的设备状态;Obtain the device status of the audio output device;
在所述音频输出设备处于使用状态的情况下,向所述投屏设备发送包含所 述音频设备蓝牙信息的所述蓝牙链路建立请求。When the audio output device is in use, send the bluetooth link establishment request including the bluetooth information of the audio device to the screen projection device.
可选的,所述请求发送模块802,包括:Optionally, the request sending module 802 includes:
链路建立单元,用于与所述音频输出设备建立所述第一蓝牙链路;a link establishing unit, configured to establish the first Bluetooth link with the audio output device;
显示单元,用于显示链路建立提示,所述链路建立提示用于确认是否在所述投屏设备和所述音频输出设备之间建立所述第二蓝牙链路;A display unit, configured to display a link establishment prompt, where the link establishment prompt is used to confirm whether the second Bluetooth link is established between the screen projection device and the audio output device;
请求发送单元,用于响应于确认指令,获取所述音频输出设备的音频设备蓝牙信息,并向所述投屏设备发送包含所述音频设备蓝牙信息的所述蓝牙链路建立请求。The request sending unit is configured to, in response to the confirmation instruction, acquire the audio device Bluetooth information of the audio output device, and send the Bluetooth link establishment request including the audio device Bluetooth information to the screen projection device.
可选的,所述装置还包括:Optionally, the device also includes:
切换模块,用于响应于切换指令,向所述投屏设备发送切换请求,以便所述投屏设备停止通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据,并基于所述音频数据输出声音。A switching module, configured to send a switching request to the screen projection device in response to a switching instruction, so that the screen projection device stops transmitting the audio data to the audio output device through the second Bluetooth link, and based on the The above audio data is output as sound.
可选的,所述装置还包括:Optionally, the device also includes:
蓝牙链路保持模块,用于在所述音频输出设备支持多蓝牙链路的情况下,保持所述第一蓝牙链路;A Bluetooth link maintaining module, configured to maintain the first Bluetooth link when the audio output device supports multiple Bluetooth links;
或,or,
蓝牙链路断开模块,用于在所述音频输出设备支持单蓝牙链路的情况下,断开所述第一蓝牙链路。The Bluetooth link disconnection module is configured to disconnect the first Bluetooth link when the audio output device supports a single Bluetooth link.
可选的,所述装置还包括:Optionally, the device also includes:
蓝牙信息获取模块,用于响应于投屏结束指令,且所述第一蓝牙链路断开,向投屏设备发送投屏结束请求,所述投屏结束请求用于请求从所述投屏设备处获取所述音频输出设备的音频输出设备蓝牙信息;The Bluetooth information acquisition module is configured to send a screen projection end request to the screen projection device in response to the screen projection end instruction, and the first Bluetooth link is disconnected, and the screen projection end request is used to request from the screen projection device Obtain the Bluetooth information of the audio output device of the audio output device;
链路重建模块,用于基于所述音频输出设备蓝牙信息与所述音频输出设备重新建立所述第一蓝牙链路。A link reestablishment module, configured to re-establish the first Bluetooth link with the audio output device based on the Bluetooth information of the audio output device.
可选的,所述装置还包括:Optionally, the device also includes:
投屏结束模块,用于响应于投屏结束指令,向所述投屏设备发送投屏结束请求,以便所述投屏设备基于所述投屏结束请求断开所述数据通信链路和所述第二蓝牙链路。The screen projection end module is configured to send a screen projection end request to the screen projection device in response to the screen projection end instruction, so that the screen projection device disconnects the data communication link and the screen projection end request based on the screen projection end request. Second Bluetooth link.
请参考图9,其示出了本申请另一个实施例提供的投屏装置的结构框图。该装置可以包括:Please refer to FIG. 9 , which shows a structural block diagram of a screen projection device provided by another embodiment of the present application. The device can include:
数据链路建立模块901,用于与无线终端建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;A data link establishment module 901, configured to establish a data communication link with the wireless terminal, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;
蓝牙链路建立模块902,用于响应于所述无线终端发送的蓝牙链路建立请求,与音频输出设备建立第二蓝牙链路,所述音频输出设备与所述无线终端建立有第一蓝牙链路;The Bluetooth link establishment module 902 is configured to establish a second Bluetooth link with the audio output device in response to the Bluetooth link establishment request sent by the wireless terminal, and the audio output device has established a first Bluetooth link with the wireless terminal road;
数据接收模块903,用于通过所述数据通信链路接收所述无线终端传输的所述投屏数据;A data receiving module 903, configured to receive the screen projection data transmitted by the wireless terminal through the data communication link;
显示模块904,用于基于所述图像数据输出画面;a display module 904, configured to output a picture based on the image data;
第三传输模块905,用于通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据,以便所述音频输出设备基于所述音频数据输出声音。The third transmission module 905 is configured to transmit the audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
可选的,所述装置还包括:Optionally, the device also includes:
停止模块,用于响应于所述无线终端发送的切换请求,停止通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据;A stop module, configured to stop transmitting the audio data to the audio output device through the second Bluetooth link in response to the switching request sent by the wireless terminal;
播放模块,用于基于所述音频数据输出声音。The playing module is used for outputting sound based on the audio data.
可选的,所述装置还包括:Optionally, the device also includes:
断开模块,用于响应于所述无线终端发送投屏结束请求,断开所述数据通信链路和所述第二蓝牙链路。A disconnection module, configured to disconnect the data communication link and the second Bluetooth link in response to the wireless terminal sending a screen projection end request.
可选的,所述音频输出设备支持单蓝牙链路;Optionally, the audio output device supports a single Bluetooth link;
所述装置还包括:The device also includes:
蓝牙信息发送模块,用于响应于所述无线终端发送的投屏结束请求,向所述无线终端发送所述音频输出设备的音频设备蓝牙信息,以便所述无线终端基于所述音频设备蓝牙信息与所述音频输出设备重新建立所述第一蓝牙链路。The bluetooth information sending module is configured to send the audio device bluetooth information of the audio output device to the wireless terminal in response to the screen projection end request sent by the wireless terminal, so that the wireless terminal can communicate with the audio device based on the bluetooth information of the audio device The audio output device re-establishes the first Bluetooth link.
可选的,所述装置还包括:Optionally, the device also includes:
时延确定模块,用于确定所述第二蓝牙链路的传输时延;A delay determination module, configured to determine the transmission delay of the second Bluetooth link;
同步模块,用于基于所述传输时延对所述图像数据和所述音频数据进行传输同步。A synchronization module, configured to synchronize the transmission of the image data and the audio data based on the transmission delay.
请参考图10,其示出了本申请一个示例性实施例提供的电子设备的结构方框图。该电子设备1000可以实现成为上述实施例中的无线终端或投屏设备。该电子设备可以是智能手机、平板电脑、个人计算机、智能电视、投影仪等。本申请中的电子设备1000可以包括一个或多个如下部件:处理器1010、存储器1020和蓝牙芯片1030。Please refer to FIG. 10 , which shows a structural block diagram of an electronic device provided by an exemplary embodiment of the present application. The electronic device 1000 can be realized as the wireless terminal or the screen projection device in the foregoing embodiments. The electronic device may be a smartphone, a tablet, a personal computer, a smart TV, a projector, and the like. The electronic device 1000 in this application may include one or more of the following components: a processor 1010 , a memory 1020 and a Bluetooth chip 1030 .
处理器1010可以包括一个或者多个处理核心。处理器1010利用各种接口和线路连接整个电子设备1000内的各个部分,通过运行或执行存储在存储器1020内的指令、程序、代码集或指令集,以及调用存储在存储器1020内的数据,执行电子设备1000的各种功能和处理数据。可选地,处理器1010可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1010可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)、神经网络处理器(Neural-network Processing Unit,NPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;NPU用于实现人工智能(Artificial Intelligence,AI)功能;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1010中,单独通过一块芯片进行实现。 Processor 1010 may include one or more processing cores. The processor 1010 uses various interfaces and lines to connect various parts in the entire electronic device 1000, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 1020, and calling data stored in the memory 1020. Various functions of the electronic device 1000 and processing data. Optionally, the processor 1010 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware. The processor 1010 may integrate one or more of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU) and a modem, etc. The combination. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the content that needs to be displayed on the display screen; the NPU is used to realize artificial intelligence (Artificial Intelligence, AI) functions; the modem is used to process wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 1010, but may be realized by a single chip.
存储器1020可以包括随机存储器(Random Access Memory,RAM),也可 以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1020包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1020可用于存储指令、程序、代码、代码集或指令集。存储器1020可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储根据电子设备1000的使用所创建的数据(比如音频数据、电话本)等。The memory 1020 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM). Optionally, the memory 1020 includes a non-transitory computer-readable storage medium. The memory 1020 may be used to store instructions, programs, codes, sets of codes or sets of instructions. The memory 1020 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the following method embodiments; the storage data area can store data created according to the use of the electronic device 1000 (such as audio data, phonebook) and the like.
蓝牙芯片1030是用于实现蓝牙功能的组件。其中,蓝牙芯片1030包含Host和Controller两部分(对应不同蓝牙协议栈),Host和Controller可以运行在同一芯片上(单芯片架构),也可以运行在不同芯片上(双芯片架构)。比如,Host运行在处理器上,而Controller运行在蓝牙模块上;或者,Host和Controller均运行在蓝牙芯片1030上。The Bluetooth chip 1030 is a component for realizing the Bluetooth function. Wherein, the Bluetooth chip 1030 includes two parts, Host and Controller (corresponding to different Bluetooth protocol stacks), and the Host and Controller can run on the same chip (single-chip architecture), or can run on different chips (dual-chip architecture). For example, the Host runs on the processor, and the Controller runs on the Bluetooth module; or, both the Host and the Controller run on the Bluetooth chip 1030 .
除此之外,本领域技术人员可以理解,上述附图所示出的电子设备1000的结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,电子设备1000中还包括显示屏、传感器、扬声器、麦克风、电源、WiFi组件等部件,在此不再赘述。In addition, those skilled in the art can understand that the structure of the electronic device 1000 shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or less components than those shown in the illustration, or combine certain components, or a different arrangement of components. For example, the electronic device 1000 also includes components such as a display screen, a sensor, a speaker, a microphone, a power supply, and a WiFi component, which will not be repeated here.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如上各个实施例所述的投屏方法。An embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the screen projection method described in each of the above embodiments .
本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。电子设备的蓝牙芯片从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该电子设备执行上述方面的各种可选实现方式中提供的投屏方法。The embodiment of the present application also provides a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The Bluetooth chip of the electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the screen projection method provided in various optional implementation manners of the above aspects.
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。It should be understood that the "plurality" mentioned herein refers to two or more than two. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship. In addition, the numbering of the steps described herein only exemplarily shows a possible sequence of execution among the steps. In some other embodiments, the above-mentioned steps may not be executed according to the order of the numbers, such as two different numbers The steps are executed at the same time, or two steps with different numbers are executed in the reverse order as shown in the illustration, which is not limited in this embodiment of the present application.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only optional embodiments of the application, and are not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application shall be included in the protection of the application. within range.
Claims (19)
- 一种无线终端中的投屏方法,所述方法包括:A screen projection method in a wireless terminal, the method comprising:响应于投屏指令,与投屏设备建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;In response to the screen projection instruction, a data communication link is established with the screen projection device, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向所述投屏设备发送蓝牙链路建立请求,以便所述投屏设备基于所述蓝牙链路建立请求与所述音频输出设备建立第二蓝牙链路;以及,When the wireless terminal establishes a first Bluetooth link with the audio output device, send a Bluetooth link establishment request to the screen projection device, so that the screen projection device can communicate with the audio output based on the Bluetooth link establishment request and the audio output device. the device establishes a second Bluetooth link; and,通过所述数据通信链路向所述投屏设备传输所述投屏数据,以便所述投屏设备基于所述图像数据输出画面,并通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据。Transmitting the screen projection data to the screen projection device through the data communication link, so that the screen projection device outputs a picture based on the image data, and transmits the screen projection data to the audio output device through the second Bluetooth link the audio data.
- 根据权利要求1所述的方法,其中,所述响应于投屏指令,与投屏设备建立数据通信链路之前,所述方法包括:The method according to claim 1, wherein, before establishing a data communication link with the screen projection device in response to the screen projection instruction, the method comprises:与所述音频输出设备建立所述第一蓝牙链路;establishing the first bluetooth link with the audio output device;所述在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向所述投屏设备发送蓝牙链路建立请求,包括:In the case where the wireless terminal and the audio output device have established a first Bluetooth link, sending a Bluetooth link establishment request to the screen projection device includes:获取所述音频输出设备的音频设备蓝牙信息,并向所述投屏设备发送包含所述音频设备蓝牙信息的所述蓝牙链路建立请求。Acquire the audio device Bluetooth information of the audio output device, and send the Bluetooth link establishment request including the audio device Bluetooth information to the screen projection device.
- 根据权利要求2所述的方法,其中,所述向所述投屏设备发送包含所述音频设备蓝牙信息的所述蓝牙链路建立请求,包括:The method according to claim 2, wherein the sending the bluetooth link establishment request including the bluetooth information of the audio device to the screen projection device comprises:获取所述音频输出设备的设备状态;以及,obtaining a device state of the audio output device; and,在所述音频输出设备处于使用状态的情况下,向所述投屏设备发送包含所述音频设备蓝牙信息的所述蓝牙链路建立请求。When the audio output device is in use, send the Bluetooth link establishment request including the Bluetooth information of the audio device to the screen projection device.
- 根据权利要求1所述的方法,其中,所述在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向所述投屏设备发送蓝牙链路建立请求,包括:The method according to claim 1, wherein when the wireless terminal and the audio output device have established a first Bluetooth link, sending a Bluetooth link establishment request to the screen projection device includes:与所述音频输出设备建立所述第一蓝牙链路;establishing the first bluetooth link with the audio output device;显示链路建立提示,所述链路建立提示用于确认是否在所述投屏设备和所述音频输出设备之间建立所述第二蓝牙链路;以及,displaying a link establishment prompt, where the link establishment prompt is used to confirm whether to establish the second Bluetooth link between the screen projection device and the audio output device; and,响应于确认指令,获取所述音频输出设备的音频设备蓝牙信息,并向所述投屏设备发送包含所述音频设备蓝牙信息的所述蓝牙链路建立请求。Responding to the confirmation instruction, acquire the audio device Bluetooth information of the audio output device, and send the Bluetooth link establishment request including the audio device Bluetooth information to the screen projection device.
- 根据权利要求1至4任一所述的方法,其中,所述向所述投屏设备传输所述投屏数据之后,所述方法还包括:The method according to any one of claims 1 to 4, wherein, after transmitting the screen projection data to the screen projection device, the method further comprises:响应于切换指令,向所述投屏设备发送切换请求,以便所述投屏设备停止通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据,并基于所述音频数据输出声音。In response to a switching instruction, sending a switching request to the screen projection device, so that the screen projection device stops transmitting the audio data to the audio output device through the second Bluetooth link, and outputs sound based on the audio data .
- 根据权利要求1至4任一所述的方法,其中,所述向所述投屏设备发送蓝牙链路建立请求之后,所述方法包括:The method according to any one of claims 1 to 4, wherein, after sending the Bluetooth link establishment request to the screen projection device, the method includes:在所述音频输出设备支持多蓝牙链路的情况下,保持所述第一蓝牙链路;In the case that the audio output device supports multiple Bluetooth links, maintaining the first Bluetooth link;或,or,在所述音频输出设备支持单蓝牙链路的情况下,断开所述第一蓝牙链路。If the audio output device supports a single Bluetooth link, disconnect the first Bluetooth link.
- 根据权利要求6所述的方法,其中,所述向所述投屏设备传输所述投屏数据之后,所述方法还包括:The method according to claim 6, wherein, after transmitting the screen projection data to the screen projection device, the method further comprises:响应于投屏结束指令,且所述第一蓝牙链路断开,从所述投屏设备处获取所述音频输出设备的音频设备蓝牙信息;以及,In response to the screen projection end instruction and the first Bluetooth link is disconnected, acquire the audio device Bluetooth information of the audio output device from the screen projection device; and,基于所述音频设备蓝牙信息与所述音频输出设备重新建立所述第一蓝牙链路。Re-establish the first Bluetooth link with the audio output device based on the Bluetooth information of the audio device.
- 根据权利要求1至4任一所述的方法,其中,所述向所述投屏设备传输所述投屏数据之后,所述方法还包括:The method according to any one of claims 1 to 4, wherein, after transmitting the screen projection data to the screen projection device, the method further comprises:响应于投屏结束指令,向所述投屏设备发送投屏结束请求,以便所述投屏设备基于所述投屏结束请求断开所述数据通信链路和所述第二蓝牙链路。In response to the screen projection end instruction, sending a screen projection end request to the screen projection device, so that the screen projection device disconnects the data communication link and the second Bluetooth link based on the screen projection end request.
- 一种投屏设备中的投屏方法,所述方法包括:A screen projection method in a screen projection device, the method comprising:与无线终端建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;Establish a data communication link with the wireless terminal, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;响应于所述无线终端发送的蓝牙链路建立请求,与音频输出设备建立第二蓝牙链路,所述音频输出设备与所述无线终端建立有第一蓝牙链路;In response to the Bluetooth link establishment request sent by the wireless terminal, establish a second Bluetooth link with an audio output device, and the audio output device has a first Bluetooth link established with the wireless terminal;通过所述数据通信链路接收所述无线终端传输的所述投屏数据;以及,receiving the screen projection data transmitted by the wireless terminal through the data communication link; and,基于所述图像数据输出画面,并通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据,以便所述音频输出设备基于所述音频数据输出声音。outputting a picture based on the image data, and transmitting the audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
- 根据权利要求9所述的方法,其中,所述基于所述图像数据输出画面,并通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据之后,所述方法还包括:The method according to claim 9, wherein, after outputting a picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further comprises:响应于所述无线终端发送的切换请求,停止通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据;以及,Stop transmitting the audio data to the audio output device via the second Bluetooth link in response to a switching request sent by the wireless terminal; and,基于所述音频数据输出声音。Sound is output based on the audio data.
- 根据权利要求9所述的方法,其中,所述基于所述图像数据输出画面,并通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据之后,所述方法还包括:The method according to claim 9, wherein, after outputting a picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further comprises:响应于所述无线终端发送投屏结束请求,断开所述数据通信链路和所述第二蓝牙链路。Disconnecting the data communication link and the second Bluetooth link in response to the wireless terminal sending a screen projection end request.
- 根据权利要求9所述的方法,其中,所述音频输出设备支持单蓝牙链路;The method according to claim 9, wherein the audio output device supports a single Bluetooth link;所述基于所述图像数据输出画面,并通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据之后,所述方法还包括:After outputting the picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method further includes:响应于所述无线终端发送的投屏结束请求,向所述无线终端发送所述音频输出设备的音频设备蓝牙信息,以便所述无线终端基于所述音频设备蓝牙信息与所述音频输出设备重新建立所述第一蓝牙链路。In response to the screen projection end request sent by the wireless terminal, sending the audio device Bluetooth information of the audio output device to the wireless terminal, so that the wireless terminal re-establishes with the audio output device based on the audio device Bluetooth information The first Bluetooth link.
- 根据权利要求9至12任一所述的方法,其中,所述基于所述图像数据 输出画面,并通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据之前,所述方法还包括:The method according to any one of claims 9 to 12, wherein, before outputting a picture based on the image data and transmitting the audio data to the audio output device through the second Bluetooth link, the method Also includes:确定所述第二蓝牙链路的传输时延;以及,determining a transmission delay of the second Bluetooth link; and,基于所述传输时延对所述图像数据和所述音频数据进行传输同步。The transmission synchronization of the image data and the audio data is performed based on the transmission delay.
- 一种投屏装置,所述装置包括:A screen projection device, the device comprising:数据链路建立模块,用于响应于投屏指令,与投屏设备建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;A data link establishment module, configured to establish a data communication link with the screen projection device in response to a screen projection instruction, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;请求发送模块,用于在无线终端与音频输出设备建立有第一蓝牙链路的情况下,向所述投屏设备发送蓝牙链路建立请求,以便所述投屏设备基于所述蓝牙链路建立请求与所述音频输出设备建立第二蓝牙链路;A request sending module, configured to send a bluetooth link establishment request to the screen projection device when the wireless terminal has established a first bluetooth link with the audio output device, so that the screen projection device establishes a bluetooth link based on the bluetooth link requesting to establish a second Bluetooth link with the audio output device;第一传输模块,用于通过所述数据通信链路向所述投屏设备传输所述投屏数据,以便所述投屏设备基于所述图像数据输出画面;以及,A first transmission module, configured to transmit the screen projection data to the screen projection device through the data communication link, so that the screen projection device outputs a picture based on the image data; and,第二传输模块,用于通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据。A second transmission module, configured to transmit the audio data to the audio output device through the second Bluetooth link.
- 一种投屏装置,所述装置包括:A screen projection device, the device comprising:数据链路建立模块,用于与无线终端建立数据通信链路,所述数据通信链路用于传输投屏数据,所述投屏数据包括图像数据和音频数据;A data link establishment module, configured to establish a data communication link with the wireless terminal, the data communication link is used to transmit screen projection data, and the screen projection data includes image data and audio data;蓝牙链路建立模块,用于响应于所述无线终端发送的蓝牙链路建立请求,与音频输出设备建立第二蓝牙链路,所述音频输出设备与所述无线终端建立有第一蓝牙链路;A Bluetooth link establishment module, configured to establish a second Bluetooth link with an audio output device in response to the Bluetooth link establishment request sent by the wireless terminal, and the audio output device establishes a first Bluetooth link with the wireless terminal ;数据接收模块,用于通过所述数据通信链路接收所述无线终端传输的所述投屏数据;A data receiving module, configured to receive the screen projection data transmitted by the wireless terminal through the data communication link;显示模块,用于基于所述图像数据输出画面;以及,a display module for outputting a picture based on the image data; and,第三传输模块,用于通过所述第二蓝牙链路向所述音频输出设备传输所述音频数据,以便所述音频输出设备基于所述音频数据输出声音。A third transmission module, configured to transmit the audio data to the audio output device through the second Bluetooth link, so that the audio output device outputs sound based on the audio data.
- 一种无线终端,所述无线终端包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如权利要求1至8任一所述的无线终端中的投屏方法。A wireless terminal, the wireless terminal includes a processor and a memory, at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement any one of claims 1 to 8 The screen projection method in the wireless terminal.
- 一种投屏设备,所述投屏设备包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如权利要求9至13任一所述的投屏设备中的投屏方法。A screen projection device, the screen projection device includes a processor and a memory, at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement any one of claims 9 to 13. The screen projection method in the screen projection device.
- 一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如权利要求1至8任一所述的无线终端中的投屏方法,或,实现如权利要求9至13任一所述的投屏设备中的投屏方法。A computer-readable storage medium, at least one program is stored in the computer-readable storage medium, and the at least one program is loaded and executed by a processor to implement the wireless terminal according to any one of claims 1 to 8. A screen projection method, or, realize the screen projection method in the screen projection device according to any one of claims 9 to 13.
- 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中;电子设备的蓝牙芯片从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令,使得所述电子设备执行以实现如权利要求1至8任一所述的无线终端中的投屏方法,或, 实现如权利要求9至13任一所述的投屏设备中的投屏方法。A computer program product, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium; the bluetooth chip of the electronic device reads the computer instructions from the computer-readable storage medium, the The processor executes the computer instructions, so that the electronic device executes to realize the screen projection method in the wireless terminal according to any one of claims 1 to 8, or, to realize the projection method according to any one of claims 9 to 13 The screen casting method in the screen device.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110620731.6 | 2021-06-03 | ||
CN202110620731.6A CN115442643A (en) | 2021-06-03 | 2021-06-03 | Screen projection method and device, wireless terminal, screen projection equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022252928A1 true WO2022252928A1 (en) | 2022-12-08 |
Family
ID=84239767
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/091770 WO2022252928A1 (en) | 2021-06-03 | 2022-05-09 | Screen projection method and apparatus, wireless terminal, screen projection device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115442643A (en) |
WO (1) | WO2022252928A1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108337667A (en) * | 2018-02-12 | 2018-07-27 | 武汉卡比特信息有限公司 | Mobile phone is throwing the device and method for shielding connection status bluetooth automatic matching and connecting with vehicle-mounted display terminal |
CN109275130A (en) * | 2018-09-13 | 2019-01-25 | 锐捷网络股份有限公司 | A kind of throwing screen method, apparatus and storage medium |
WO2020103326A1 (en) * | 2018-11-23 | 2020-05-28 | 深圳市鹰硕技术有限公司 | One-to-many screen mirroring method, apparatus, and system, screen mirroring device, and storage medium |
CN112423076A (en) * | 2020-11-18 | 2021-02-26 | 努比亚技术有限公司 | Audio screen projection synchronous control method and device and computer readable storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111031368B (en) * | 2019-11-25 | 2021-03-16 | 腾讯科技(深圳)有限公司 | Multimedia playing method, device, equipment and storage medium |
CN111447602B (en) * | 2020-06-17 | 2020-09-29 | 成都极米科技股份有限公司 | Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium |
CN111984215A (en) * | 2020-08-19 | 2020-11-24 | Oppo广东移动通信有限公司 | Multimedia data playing method, terminal and storage medium |
CN112492442A (en) * | 2020-11-24 | 2021-03-12 | 江苏紫米电子技术有限公司 | Connection switching method, device, equipment and storage medium of Bluetooth headset |
CN113766305A (en) * | 2021-09-27 | 2021-12-07 | 海信视像科技股份有限公司 | Display device and mirror image screen projection audio output control method |
-
2021
- 2021-06-03 CN CN202110620731.6A patent/CN115442643A/en active Pending
-
2022
- 2022-05-09 WO PCT/CN2022/091770 patent/WO2022252928A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108337667A (en) * | 2018-02-12 | 2018-07-27 | 武汉卡比特信息有限公司 | Mobile phone is throwing the device and method for shielding connection status bluetooth automatic matching and connecting with vehicle-mounted display terminal |
CN109275130A (en) * | 2018-09-13 | 2019-01-25 | 锐捷网络股份有限公司 | A kind of throwing screen method, apparatus and storage medium |
WO2020103326A1 (en) * | 2018-11-23 | 2020-05-28 | 深圳市鹰硕技术有限公司 | One-to-many screen mirroring method, apparatus, and system, screen mirroring device, and storage medium |
CN112423076A (en) * | 2020-11-18 | 2021-02-26 | 努比亚技术有限公司 | Audio screen projection synchronous control method and device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115442643A (en) | 2022-12-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109089330B (en) | Audio data transmission method and terminal | |
CN112988102A (en) | Screen projection method and device | |
CN107534812B (en) | Ring network of Bluetooth loudspeaker | |
WO2019019032A1 (en) | Method and apparatus for configuring downlink data packet | |
CN106303679B (en) | Media playing control method and media playing client | |
WO2024055494A1 (en) | Call method and apparatus based on bluetooth earphone, and storage medium | |
TW200847750A (en) | System with incoming call display indication and the method for using he same | |
EP4104459A1 (en) | Switching between multiple earbud architectures | |
WO2022206270A1 (en) | Device addition method and apparatus, bluetooth chip, and device | |
KR20170043319A (en) | Electronic device and audio ouputting method thereof | |
CN111182597B (en) | Processing method and device | |
US20220269475A1 (en) | Bluetooth communication system capable of avoiding voice interruption, and related bluetooth device set | |
CN115623278A (en) | Audio processing method, apparatus, device and medium | |
WO2024119947A1 (en) | Bluetooth communication method and apparatus, electronic device, and computer-readable medium | |
WO2022252928A1 (en) | Screen projection method and apparatus, wireless terminal, screen projection device and storage medium | |
CN111182518A (en) | Processing method and device | |
WO2023116311A1 (en) | Data interaction method and apparatus, and device and storage medium | |
US20230006711A1 (en) | Audio transmission method and electronic device | |
JP6970578B2 (en) | Communication equipment and its control method, program | |
WO2022252909A1 (en) | Screen casting method and apparatus in wireless terminal, wireless terminal, and storage medium | |
US10122896B2 (en) | System and method of managing transmission of data between two devices | |
US20210281963A1 (en) | Audio Data Processing Method, Terminal Device, and Storage Medium | |
KR20220024034A (en) | Audio routing method, apparatus, computer program and recording medium thereof in wireless communication system | |
WO2024060750A1 (en) | Bluetooth switching method and apparatus, bluetooth connection method and apparatus, and electronic device | |
WO2023065881A1 (en) | Bluetooth connection method and apparatus, electronic device, and storage medium |
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: 22814975 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22814975 Country of ref document: EP Kind code of ref document: A1 |