WO2023109156A1 - 投屏方法、设备及存储介质 - Google Patents

投屏方法、设备及存储介质 Download PDF

Info

Publication number
WO2023109156A1
WO2023109156A1 PCT/CN2022/112847 CN2022112847W WO2023109156A1 WO 2023109156 A1 WO2023109156 A1 WO 2023109156A1 CN 2022112847 W CN2022112847 W CN 2022112847W WO 2023109156 A1 WO2023109156 A1 WO 2023109156A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
screen projection
state
audio data
screen
Prior art date
Application number
PCT/CN2022/112847
Other languages
English (en)
French (fr)
Inventor
张兰
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to EP22854497.9A priority Critical patent/EP4224865A4/en
Publication of WO2023109156A1 publication Critical patent/WO2023109156A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8106Monomedia components thereof involving special audio data, e.g. different tracks for different languages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4113PC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4122Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/414Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance
    • H04N21/4143Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance embedded in a Personal Computer [PC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • H04N21/4396Processing of audio elementary streams by muting the audio signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/4508Management of client data or end-user data
    • H04N21/4518Management of client data or end-user data involving characteristics of one or more peripherals, e.g. peripheral type, software version, amount of memory available or display capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R5/00Stereophonic arrangements
    • H04R5/04Circuit arrangements, e.g. for selective connection of amplifier inputs/outputs to loudspeakers, for loudspeaker detection, or for adaptation of settings to personal preferences or hearing impairments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2499/00Aspects covered by H04R or H04S not otherwise provided for in their subgroups
    • H04R2499/10General applications
    • H04R2499/15Transducers incorporated in visual displaying devices, e.g. televisions, computer displays, laptops

Definitions

  • the present application relates to the technical field of screen projection, and in particular to a screen projection method, device and storage medium.
  • terminals With the development of terminal technology, more and more terminals have screen projection functions. For example, in family, work, teaching, and game competition scenarios, terminals can greatly facilitate people to watch by projecting the currently displayed screen onto a large screen. screen content.
  • the terminal that sends the screencasting information is a personal computer (PC device) screencasting scene.
  • PC device personal computer
  • the content is projected to the projection receiving end, such as TV and other large-screen devices (subsequently referred to as large-screen devices).
  • PC devices can use the screen-casting application to realize the screen-casting function, there are some problems that cannot be ignored. Facing the problem that large-screen devices cannot produce sound.
  • the present application provides a screen projection method, device and storage medium, aiming to realize that in the screen projection scene, regardless of whether the PC device is connected to other audio devices, when the large screen device is selected as the sound output device, the large screen device Can make a sound normally.
  • the present application provides a screen projection method, which is applied to a screen projection sending end, and the screen projection sending end is installed with a screen projection application, and the method includes: playing audio from a built-in speaker at the screen projection sending end data, after receiving the screen projection connection request, the screen projection sender responds to the screen projection connection request, establishes a screen projection connection with the screen projection receiver, and obtains the audio data from the channel corresponding to the speaker , and send the audio data to the screen projection receiving end, and the screen projection receiving end plays the audio data; Acquire the audio data, and send the audio data to the screen projection receiving end, and the screen projection receiving end plays the audio data.
  • the screen projection sender can obtain the required information from the audio channel corresponding to the audio device identified by the recorded identification number.
  • the played audio data is sent to the screen projection receiver, so that in the screen projection scene, no matter whether the screen projection sender switches the audio device or not, the screen projection receiver can receive the audio data that can be played, that is, it can make sound normally.
  • a first audio state switch control and a first volume bar control corresponding to the speaker are displayed on the display interface of the screen projection sending end; the method further includes: at the screen projection sending end by When the built-in speaker plays the audio data at the volume value corresponding to the first volume bar control, after receiving a click operation on the first audio state switching control, the screen projection sending end responds to the click Operate and control the speaker to stop sounding. It can be seen from this that before the screen projection sender establishes a screen projection connection with the screen projection receiver, whether the speaker of the screen projection sender makes a sound is closely related to the user's click operation on the first audio state switching control. Click to modify the audio status of the speaker.
  • the audio data is obtained from the channel corresponding to the speaker, and the audio data is sent to the screen projection receiving end, by After the screen projection receiving end plays the audio data, the method further includes: after receiving a click operation for switching the sound output device from the screen projection receiving end to the screen projection sending end, the screen projection sending In response to the click operation, the terminal stops acquiring the audio data from the channel corresponding to the speaker, and keeps the speaker silent. Therefore, during the screen projection process, when the sound output device is switched to the screen projection sender, and the audio device currently used by the screen projection sender is a built-in speaker, whether the speaker of the screen projection sender makes sound depends on the corresponding speaker. The first audio state switches the current state of the control, thereby ensuring that in the screen projection scene, whether the sound from the speaker at the screen projection sending end is consistent with the user's expectations.
  • the method further includes : After receiving the click operation on the first audio state switch control, the screen projection sending end controls the speaker to play the audio at the volume value corresponding to the first volume bar control in response to the click operation. audio data.
  • the audio data is obtained from the channel corresponding to the speaker, and the audio data is sent to the screen projection receiving end, by After the screen projection receiving end plays the audio data, the method further includes: after receiving disconnection of the screen projection connection between the screen projection sending end and the screen projection receiving end, the screen projection sending In response to the click operation, the terminal stops acquiring the audio data from the channel corresponding to the speaker, and keeps the speaker silent.
  • a second audio state switching control and a second volume bar control corresponding to the earphone are displayed on the display interface of the screen projection sending end;
  • the audio data is acquired from the channel corresponding to the earphone, and the audio data is sent to the screen projection receiving end, and after the screen projection receiving end plays the audio data, the method further includes: After receiving a click operation on the second audio state switching control, the screen projection sending end sets the earphone to a mute state in response to the click operation.
  • the method further includes: switching the sound output device from the screen projection receiving end after receiving After the click operation of the screen projection sending end, the screen projection sending end stops acquiring the audio data from the channel corresponding to the earphone in response to the click operation, and controls the earphone to stop sounding. Therefore, during the screen projection process, when the sound output device is switched to the screen projection sender, and the audio device currently used by the screen projection sender is an external earphone, whether the earphone of the screen projection sender makes sound depends on the corresponding earphone.
  • the second audio state switches the current state of the control, thereby ensuring that in the screen projection scene, whether the sound of the earphone at the screen projection sending end is consistent with the user's expectations.
  • the method further includes : After receiving a click operation on the second audio state switching control, the screen projection sending end controls the earphone to make sound in response to the click operation.
  • the method further includes: disconnecting the screen projection sending end from the After the screen projection connection between the screen projection receivers, the screen projection sender stops acquiring the audio data from the channel corresponding to the earphone in response to the click operation, and controls the earphone to stop sounding.
  • an audio device selection list is also displayed on the display interface of the screen projection sending end, and the audio device selection list includes the first audio device option and the second audio device option.
  • Audio device options the first audio device option corresponds to the speaker, and the second audio device option corresponds to the earphone; after an earphone is connected to the screen-casting sending end, the audio corresponding to the earphone obtain the audio data by means of a channel, and send the audio data to the screen projection receiving end, and after the screen projection receiving end plays the audio data
  • the method further includes: when receiving the first After the click operation of the audio device option, the screen projection sending end acquires the audio data from the channel corresponding to the speaker in response to the click operation, and sends the audio data to the screen projection receiving end, The audio data is played by the screen projection receiver.
  • the present application provides a screen projection method, which is applied to a screen projection sending end, and the screen projection sending end is installed with a screen projection application, and the method includes: after receiving a screen projection connection request, obtaining the projection The identification number of the audio device currently used by the screen sending end is used as the target identification number, and is recorded in the audio device table; the sound output device selected by the user is determined; when the sound output device is the sending end of the screen projection, the audio The audio device identified by the target identification number recorded in the device table plays audio data; when the sound output device is a projection receiving end, set the audio device identified by the target identification number recorded in the audio device table to It is in a mute state, and the audio data is obtained from the channel corresponding to the audio device identified by the target identification number recorded in the audio device table, and the audio data is sent to the screen projection receiving end for playback.
  • the screen projection sending end is a PC device
  • the screen projection receiving end is a large-screen device such as a TV.
  • the screen projection solution provided by this application obtains the audio device currently used by the screen projection sender in the screen projection scenario, and records the identification number corresponding to the audio device in the audio state table, so that the audio selected by the user can be determined.
  • the output device is the screen projection receiver
  • the audio data is obtained from the audio device identified by the identification number and sent to the screen projection receiver for playback, instead of the default audio device, such as a speaker, so as to ensure that during the screen projection process, the audio data at the screen projection receiver When it is a sound device, the receiving end of the projection screen can always obtain the audio data and play it out.
  • the method further includes: calling the audio device monitoring module to monitor the Whether the audio device currently used by the screen projection sending end changes; when the audio device currently used by the screen projection sending end is monitored to change, obtain the corresponding identification number of the changed audio device; according to the changed audio device corresponding update the target identification number recorded in the audio device table.
  • the screen projection solution provided by this application continuously monitors the audio device selected by the screen projection sender by starting the audio device monitoring module during the screen projection process, and updates the target identification number recorded in the audio device table when the audio device changes , so that the target identification number recorded in the audio device table can be changed according to the audio device actually selected by the screen projection sender, thereby ensuring that during the screen projection process, when the screen projection sender is a sound output device, the audio data can be changed by the changed Audio device playback, when the screen projection receiver is a sound output device, the screen projection sender can obtain audio data from the channel corresponding to the changed audio device and send it to the screen projection receiver for playback. In this way, in the existing solution, no matter whether the screen projection sender is connected to other audio devices, during the screen projection process, the screen projection receiver and the screen projection sender can make sound normally.
  • the method further includes: after the user transfers the sound output device from the After the screen projection receiver is changed to the screen projection sender, the audio data is played by the audio device identified by the target identification number recorded in the audio device table.
  • the audio data is played by the audio device identified by the target identification number recorded in the audio device table, so that after the sound output device is changed from the screen projection receiving end to the screen projection sending end,
  • the audio device used by the screen projection sender to play audio data can be consistent with the one selected by the user, further improving the user experience.
  • the method further includes: after receiving a screen projection disconnection request Afterwards, the audio data is played by the audio device identified by the target identification number recorded in the audio device table.
  • the screen projection solution provided by this application plays the audio data through the audio device identified by the target identification number recorded in the audio device table, so that after the screen projection is disconnected, the audio device that plays the audio data at the screen projection sender It can be consistent with what the user chooses to further enhance the user experience.
  • the method further includes: closing the audio device monitoring module.
  • the screen projection solution provided by the present application stops monitoring changes of the audio device after the screen projection ends, thereby effectively avoiding occupation and waste of resources at the screen projection sending end.
  • the method further includes: obtaining the current audio state of the screen projection sending end as the target audio state, and recording To the audio state table, the target audio state is a mute state or a non-mute state; correspondingly, when the sound output device is the sending end of the screen projection, the target recorded in the audio device table
  • the audio device identified by the identification number plays the audio data, including: when the sound output device is the sending end of the screen projection, the audio device identified by the target identification number recorded in the audio device table plays the audio data. audio data, and set the audio state of the audio device identified by the target identification number as the target audio state.
  • the screen projection solution provided by this application obtains the audio status of the screen projection sender before establishing a screen projection connection in the screen projection scenario, and records the acquired audio state as the target audio state of the screen projection sender in the Audio state table, so that when it is determined that the sound output device selected by the user is the screen projection sender, the audio state of the screen projection sender is directly set to the target audio state recorded in the audio state table, so that in the screen projection scene, when the sound cuts When returning to the screen projection sender, the audio state of the screen projection sender can be consistent with the audio state expected by the user, thereby greatly improving the user experience.
  • the method further includes: Call the audio state monitoring module to monitor the user's click operation on the audio state switching control corresponding to the audio device identified by the target identification number.
  • the audio state corresponding to the audio state switching control is the mute state
  • the audio state After the switch control is clicked, the audio state is switched from the mute state to the non-mute state, and when the audio state corresponding to the audio state switch control is the non-mute state, the audio state switch control is clicked Afterwards, the audio state is switched from the non-mute state to the mute state; after monitoring the user's click operation on the audio state switching control corresponding to the audio device identified by the target identification number, according to the switched
  • the audio status updates the target audio status recorded in the audio status table.
  • the screen projection solution provided by this application continuously monitors the audio state of the screen projection sending end by starting the audio state monitoring module during the screen projection process, and updates the target audio state recorded in the audio state table when the audio state changes, so that The target audio state recorded in the audio state table can be changed according to the actual operation of the user, thereby ensuring the audio state set according to the target audio state recorded in the audio state table when the screen projection is disconnected or the sound output device is changed to the screen projection sender Consistent with the audio state the user actually wants to set.
  • the audio status of the terminal can be in a muted state consistent with the user's setting instead of directly making a sound.
  • the method further includes: after the user transfers the sound output device from the After the screen projection receiver is changed to the screen projection sender, read the target audio state recorded in the audio state table; the audio state of the audio device identified by the target identification number in the screen projection sender Set to the target audio state.
  • the screen projection solution provided by this application sets the audio state of the screen projection sender according to the target audio state recorded in the audio state table, so that after the sound output device is changed from the screen projection receiver to the screen projection sender, the projection The audio status of the sending end of the screen can be consistent with the status set by the user, further improving the user experience.
  • the method further includes: after receiving the screen projection disconnection request, reading the target audio state recorded in the audio state table; The audio state of the audio device identified by the target identification number in the screen projection sending end is set as the target audio state.
  • the screen projection solution provided by this application sets the audio state of the screen projection sender according to the target audio state recorded in the audio state table, so that after the screen projection is disconnected, the audio state of the screen projection sender can be set by the user.
  • the status is consistent, further improving the user experience.
  • the method further includes: closing the audio state monitoring module.
  • the screen projection solution provided by the present application stops monitoring the change of the audio state after the screen projection ends, thereby effectively avoiding occupation and waste of resources at the screen projection sending end.
  • the present application provides an electronic device, which is a screen projection sending terminal, including a processor and a memory; wherein, the memory is coupled to the processor, and the memory stores program instructions; when When the program instructions are executed by the processor, the electronic device executes the first aspect, or the instruction of the method in any implementation manner of the above first aspect, or executes the second aspect, or the above second aspect Directives for methods in any of the implementations of .
  • the present application provides a computer-readable medium for storing a computer program.
  • the computer program When the computer program is run on an electronic device, the electronic device executes the first aspect, or any of the above first aspects.
  • the present application provides a computer program product, the computer program product includes a computer program, and when it is run on an electronic device, the electronic device executes the first aspect, or any one of the above first aspects An instruction for implementing the method in the manner, or an instruction for executing the method in the second aspect, or any implementation manner of the second aspect above.
  • the present application provides a chip, which includes a processing circuit and a transceiver pin.
  • the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the instructions of the first aspect, or the method in any implementation of the above first aspect, or executes the second aspect, or The instruction of the method in any implementation manner of the above second aspect is used to control the receiving pin to receive a signal, and to control the sending pin to send a signal.
  • the present application provides a screen projection system, which includes a screen projection sending end and a screen projection receiving end.
  • the screen projection sending end is the electronic device mentioned above in the third aspect.
  • the screen projection receiving end is a TV, or other devices capable of receiving and projecting the screen projection information sent by the screen projection sending end.
  • Fig. 1 is one of the schematic flow charts of the screen projection method provided by the embodiment of the present application.
  • Fig. 2 is the second schematic flow diagram of the screen projection method provided by the embodiment of the present application.
  • Fig. 3 is a schematic diagram of the main page of the screencasting sending terminal shown by way of example;
  • Fig. 4 is one of schematic diagrams of an exemplary screen-casting application initiating a screen-casting connection
  • Fig. 5 is a second schematic diagram of a screen casting application initiating a screen casting connection
  • Fig. 6 is a schematic diagram of an interface schematically shown for selecting a receiving end for screen projection
  • Fig. 7 is a schematic diagram of an interface for establishing a connection with a selected screen projection receiver
  • Fig. 8 is a schematic diagram of an interface of a screen casting application after the screen casting connection is successfully shown by way of example;
  • FIG. 9 is a schematic diagram of an interface between a screen projection initiator and a screen projection receiver after the screen projection connection is successfully shown by way of example;
  • Fig. 10 is one of the schematic diagrams schematically showing that the user switches the audio device at the sending end of screen projection
  • Fig. 11 is the second schematic diagram of the user switching the audio device at the sending end of screen projection
  • Fig. 12 is the third schematic diagram of the user switching the audio device at the sending end of screen projection
  • Fig. 13 is a fourth schematic diagram of the user switching the audio device at the sending end of screen projection
  • FIG. 14 is an exemplary schematic diagram of the user adjusting the earphone 1 at the screen projection sending end to be muted
  • Fig. 15 is a schematic diagram illustrating when switching the machine as a sound output device
  • Fig. 16 is a schematic diagram showing an exemplary switch of the machine as a sound output device
  • Fig. 17 is one of the schematic diagrams illustrating the sound changes of the screen projection sending end and the screen projection receiving end after switching the local machine as a sound output device;
  • Fig. 18 is the second schematic diagram showing the sound changes of the screen projection sending end and the screen projection receiving end after switching the local machine as a sound output device;
  • Fig. 19 is one of the schematic diagrams illustrating the sound changes of the screen projection sending end and the screen projection receiving end after the screen projection is disconnected;
  • Fig. 20 is the second schematic diagram showing the sound changes of the screen projection sending end and the screen projection receiving end after the screen projection is disconnected;
  • Fig. 21 is one of the schematic diagrams of the method called when the audio management module of the upper layer sets the audio state of the sending end of the screen projection;
  • Fig. 22 is the second schematic diagram of the method called when the audio management module of the upper layer sets the audio status of the sending end of the screen projection;
  • Fig. 23 is one of the schematic diagrams schematically showing the audio status of the sending end of the projection screen set by the upper-layer audio management module
  • Fig. 24 is the second schematic diagram of setting the audio status of the screen projection sender by the upper-layer audio management module
  • Fig. 25 is the third schematic diagram of setting the audio status of the screen-casting sender by the upper-layer audio management module
  • Fig. 26 is one of the schematic diagrams of the method called when the transmission module of the lower layer sets the audio state of the screen projection sender;
  • Fig. 27 is the second schematic diagram of the method called when the transmission module of the lower layer sets the audio state of the screen projection sender;
  • Fig. 28 is one of the schematic diagrams schematically showing the audio status of the sending end of screen projection set by the transmission module of the lower layer;
  • Fig. 29 is the second schematic diagram of setting the audio status of the screen projection sender by the transmission module of the lower layer
  • FIG. 30 is a third schematic diagram showing the audio status of the screen projection sender being set by the transmission module at the lower layer.
  • first and second in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of objects.
  • first target object, the second target object, etc. are used to distinguish different target objects, rather than describing a specific order of the target objects.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
  • multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
  • the technical solution provided in this embodiment is applied to a screen projection sending end, and the screen projection sending end is a PC device (hereinafter referred to as a PC) installed with a screen projection application.
  • a PC PC device
  • the aforementioned PC may be a desktop computer or a notebook computer.
  • the screen projection receiver that receives the screen projection content sent by the screen projection sender may be a large-screen device such as a TV or a display screen.
  • the specific implementation steps of the embodiment of the present application include:
  • Step 101 after receiving the screen projection connection request, obtain the identification number of the audio device currently used by the screen projection sending end as the target identification number, and record it in the audio device table.
  • Step 102 determine the sound output device selected by the user.
  • Step 103 whether the sound output device is the sending end of screen projection.
  • Step 104 play audio data through the audio device identified by the target identification number recorded in the audio device table.
  • Step 105 set the audio device identified by the target identification number recorded in the audio device table to a mute state, and obtain the corresponding audio channel from the audio device identified by the target identification number recorded in the audio device table For the audio data, send the audio data to the screen projection receiving end to play.
  • the screen projection method obtains the audio device currently used by the screen projection sender in the screen projection scene, and records the identification number corresponding to the audio device in the audio state table, so that when determining the audio device selected by the user When the sound output device is the screen projection receiver, the audio data is obtained from the audio device identified by the identification number and sent to the screen projection receiver to play, instead of the default audio device, such as a speaker, so as to ensure that during the screen projection process, the screen projection receiver When the end is the sound device, the receiving end of the projection screen can always obtain the audio data and play it out.
  • Step 201 after receiving the screen projection connection request, obtain the identification number of the audio device currently used by the screen projection sending end as the target identification number, and record it in the audio device table.
  • the screen projection application may include, for example, a screen projection management module, an audio management module, and a transmission module.
  • the screen projection management module performs data interaction with the audio management module
  • the audio management module performs data interaction with the transmission module.
  • the screen projection connection request, screen projection disconnection request, and sound output device switching request involved in the screen projection scene are all monitored by the screen projection management module.
  • the audio equipment that can be used by the screen projection sender is, for example, a built-in speaker in the screen projection sender, or an earphone (Bluetooth earphone, wired earphone, etc.) connected to the screen caster sender,
  • earphone Bluetooth earphone, wired earphone, etc.
  • the audio equipment and the like are not listed here one by one, and this embodiment does not limit it.
  • the audio device currently used by the screen projection sending end may be any one of the above-listed ones.
  • the above-mentioned identification number used to identify the audio device may be, for example, a serial number assigned by the manufacturer to the audio device, or an identification number assigned according to a preset rule.
  • the above-mentioned target identification number of the currently used audio device may be obtained by the audio management module and managed.
  • each audio device will have an identification number that can identify its uniqueness, and different audio devices may correspond to different channels, that is, audio devices, identification numbers There is a mapping relationship shown in Table 1 between the number and the channel.
  • the audio management module obtains that the audio device currently used by the screen projection sender is a speaker, it needs to be recorded in the audio device table.
  • the target identification number is 10001.
  • the audio management module acquires that the audio device currently used by the screen projection sending end is earphone 1, the target identification number that needs to be recorded in the audio device table is 10002.
  • the display interface of the PC device 100 displays the main page of the PC device 100 .
  • the main page may include one or more controls, such as video application controls, social application controls, browser controls, and computer housekeeper application controls, which will not be listed here. This is also not limited.
  • the main page of the PC device 100 includes a screen-casting application control 10 .
  • the toolbar at the bottom of the main interface of the PC device 100 may include one or more controls, such as setting the audio status of the PC device 100, such as adjusting to a mute state or a non-mute state, and calling out the sound setting control 20 of the volume bar.
  • the PC device 100 when the user wants to cast the content of the PC device 100 to a large-screen device such as a TV, after the user clicks the screen-casting application control 10 on the main page, the PC device 100 responds to the user's operation behavior, and in the The display interface displays a page for initiating a screen projection connection, as shown in Figure 4.
  • the page for initiating a screencasting connection may include one or more options.
  • the "connect immediately" option 10-1 for initiating a screen projection connection request allows the user to select an option of a screen projection mode.
  • the options available for the user to select a screen projection mode include, for example, a "mirror mode” option and an "extended mode” option.
  • the so-called mirroring mode refers to the mirroring display of the computer screen, that is, the content on the screen of the PC device 100, on the receiving end of the screen projection, such as a display of a large-screen device such as a TV. That is, after the screen projection connection between the PC device 100 and the large-screen device is established using the mirroring mode, the content displayed on the display of the large-screen device is exactly the same as that displayed on the screen of the PC device 100 .
  • the so-called extended mode refers to displaying the computer screen, that is, the content on the screen of the PC device 100 in an extended manner on the receiving end of screen projection, such as a display of a large-screen device such as a TV. That is, after the screen projection connection between the PC device 100 and the large-screen device is established in the extended mode, the display of the large-screen device not only displays the content displayed on the screen of the PC device 100, but also displays the content of the large-screen device itself, similar to multi-screen synergy.
  • the functions to be implemented by the screen projection application can also be integrated with other functions into one application, such as system management functions such as driver management and power management, and screen projection and multi-screen collaboration.
  • system management functions such as driver management and power management
  • screen projection and multi-screen collaboration The functionality of the user experience is integrated in one application.
  • the application may be "My Computer” or “Computer Manager”, etc., which is not limited in this embodiment.
  • the PC device 100 responds to the user's operation behavior, and the display interface on the right will display the initiating cast as shown in FIG. screen connected page.
  • the PC device 100 when the user selects the mirror image mode and clicks the "Connect Now" option 10-1, the PC device 100 responds to the user's operation behavior and displays the device selection window 10-2 on the display interface, as Figure 6 shows.
  • the device selection window 10-2 is used to display currently available devices, that is, large-screen devices that can be used as screen projection receivers.
  • the currently available devices include TV 1 , TV 2 and TV 3 .
  • the device selection window 10-2 can also include the option of "find other display devices", so that when none of the currently displayed available devices is the device that the user wants to select, the user can click "find other display devices" option, jump to the page of searching for other display devices, and the PC device 100 will open a search function to search for large-screen devices with available accessories.
  • the prerequisite for establishing a screen projection connection between the PC device 100 and the large-screen device may be, for example, a wired connection or a wireless connection.
  • the two may be connected to the same WLAN network, or successfully matched through Bluetooth.
  • the PC device 100 will first turn on Bluetooth or WLAN before jumping to the device selection window 10-2 in response to the user's operation behavior, and then jump to the device search interface.
  • the search operation after the search operation is finished, it will jump to the device selection window 10-2, and the searched available devices will be displayed in the device selection window 10-2.
  • the operation of turning on Bluetooth or WLAN may be completed by the PC device 100 itself, or it may jump to the interface of turning on Bluetooth or WLAN, which is turned on by a user. No restrictions.
  • the PC device 100 responds to the user's operation behavior and displays a connection window 10 - 3 on the display interface, as shown in FIG. 7 .
  • the display connection window 10-3 may include a cancel option 10-4.
  • the PC device 100 when the user clicks the cancel option 10-4, the PC device 100 will return to the interface shown in FIG. 6 in response to the user's operation behavior.
  • the display interface of the PC device 100 will be changed to the style shown in FIG. 8 .
  • one or more options may be included in the display interface of successful screen projection connection.
  • the disconnection option 10 - 5 shown in FIG. 8 the sound output device selection option 10 - 6 , options for the user to select a screen projection mode, such as "mirror mode” option and "extended mode” option.
  • Step 202 obtain the current audio state of the screen projection sending end as the target audio state, and record it in the audio state table.
  • the above-mentioned target audio state of the screen projection sending end is acquired and managed by the audio management module.
  • the audio state is divided into a mute state and a non-mute state. Therefore, the aforementioned target audio state may be, for example, a mute state or a non-mute state.
  • the target audio state recorded in the audio state table can be represented by a pre-agreed state value (state code).
  • 0 may be used to indicate a mute state
  • 1 may be used to indicate a non-mute state
  • Step 203 determine the sound output device selected by the user.
  • the sound output device selected by the user is "this machine"
  • the sound output device is the screen projection sending end. That is, the sound is emitted from the screencasting sender.
  • Step 204 whether the sound output device is the sending end of screen projection.
  • step 205 if the determined sound output device is the screen projection sending end, then perform the operation of step 205; otherwise, perform the operation of step 206.
  • Step 205 Play the audio data through the audio device identified by the target identification number recorded in the audio device table, and set the audio state of the audio device identified by the target identification number as the target audio state.
  • the target identification number recorded in the audio device table is "10001", according to the mapping relationship recorded in Table 1, it can be known that the audio device identified by the target identification number is a speaker, then the audio output device is a speaker When the screen is sent, the audio data is played by the speaker.
  • the state value of the target audio state recorded in the audio state table is "0"
  • the mapping relationship recorded in Table 2 it can be known that the target audio state of the speaker is a mute state
  • the audio of the speaker The state is set to the mute state, so that the screen projection sender will be muted as the sound output device, that is, there will be no sound.
  • the screen of the screen projection receiver and the screen of the screen projection sender display the same picture, but neither device makes a sound .
  • the state value of the target audio state recorded in the audio state table is "1"
  • the mapping relationship recorded in Table 2 it can be seen that the target audio state of the speaker is a non-mute state, then the speaker's The audio status is set to non-mute, so that the screen-casting sender will make sound as a sound output device.
  • the screen of the screen-casting receiver and the screen of the screen-casting sender display the same picture, and the screen-casting receiver does not make a sound.
  • Step 206 set the audio device identified by the target identification number recorded in the audio device table to a mute state, and obtain the corresponding audio channel from the audio device identified by the target identification number recorded in the audio device table For the audio data, send the audio data to the screen projection receiving end to play.
  • the audio output device is the screen projection receiver
  • the screen projection sender and screen projection receiver establish screen projection
  • the screen projection Neither the sender can make sound
  • the screen projection application in the screen projection sender needs to call the interface for setting the sound of the screen projection sender, set the screen projection sender to the mute state, and then send the audio data through the above-mentioned transmission module To the receiving end of the projection screen, so that the receiving end of the projection screen can play the audio data after receiving the audio data, that is, the receiving end of the projection screen can make sound.
  • the audio data is from the sound channel corresponding to the audio device currently used by the screen projection sending end. Therefore, the audio data sent to the screen projection receiver is obtained from the audio channel corresponding to the audio device identified by the target identification number recorded in the audio device table, and then the acquired audio data is sent to the screen projection receiver for playback.
  • the target identification number recorded in the audio device table is "10001", according to the mapping relationship recorded in Table 1, it can be known that the audio device identified by the target identification number is a speaker, and the channel corresponding to the speaker is channel 1, when sending audio data to the screen projection receiver, the audio data is specifically obtained from channel 1, and then the acquired audio data is sent to the screen projection receiver for playback.
  • the audio device identified by the target identification number is earphone 1
  • the channel corresponding to earphone 1 is channel 2. Then, when sending the audio data to the screen projection receiving end, specifically, the audio data is obtained from the sound channel 2, and then the acquired audio data is sent to the screen projection receiving end for playback.
  • the default screen projection receiver is a sound output device, that is, the default screen projection occurs at the receiver, and the scene is shown in Figure 9.
  • the PC device 100 transmitter of screen projection
  • TV 200 receiver of screen projection
  • the PC device 100 receives a screen projection connection with TV 200 (receiver of screen projection)
  • the TV 200 is a sound output device, in the mirroring mode
  • the PC device 100 The screen will display picture 30, and the screen of TV 200 will display the same content as picture 30, such as picture 30' displayed on the screen of TV 200 in FIG.
  • the sound output device is the screen projection receiver
  • the operation of setting the screen projection sender to the mute state is implemented by the system, not modified by the user, so this state is not recorded in the audio state table. Therefore, it will not interfere with the user's operation.
  • the audio data sent by the transmission module to the TV 200 is usually an audio data packet after audio coding processing, which can avoid data frame loss caused by direct audio data transmission and avoid audio data transmission. Direct exposure of user privacy.
  • the encoding mode may be determined according to the protocol type corresponding to the audio data, and then the audio data may be encoded using the determined encoding mode.
  • the transmission module when the transmission module sends audio data to the screen projection receiving end, such as the TV 200 mentioned above, it needs to first determine the protocol type corresponding to the audio data; then, determine the protocol type according to the protocol type. A target coding method for audio data; then, encode the audio data according to the target coding method to obtain an audio data packet; finally, send the audio data packet to the screen projection receiving end.
  • the protocol type is sent to the screen projection receiving end.
  • the screen projection receiver such as the TV 200, can know which decoding method needs to be used to decode the audio data packet, thereby ensuring the accuracy of the decoding result.
  • the target encoding method of the audio data according to the protocol type for example, it may be determined through a pre-negotiated codec mapping relationship table between the screen projection sender and the screen projection receiver. Determining is to look up the encoding mode corresponding to the protocol type in the codec mapping relationship table, and then determine the found encoding mode as the target encoding mode.
  • the encoding method can not be directly transmitted between the screen projection sender and the screen projection receiver, thereby avoiding the interception of the content transmitted between the two, thereby ensuring that the content of the audio data is not stolen by criminals, especially for The usage scenarios of audio and video conferences effectively guarantee the security of the conference.
  • the user may manually modify the audio device used by the PC device 100 , or an audio device with a high priority is connected to the PC device 100 . Therefore, in order to ensure that the target identification number recorded in the audio device table can be dynamically updated according to actual changes, it is necessary to monitor whether the audio device currently used by the PC device 100 changes.
  • the audio device monitoring module provided by the system used by the PC device 100 is used.
  • the PC device 100 may invoke the aforementioned audio device monitoring module, and then the audio device monitoring module monitors whether the audio device currently used by the PC device 100 changes.
  • the audio device monitoring module monitors that the audio device currently used by the screen projection sending end changes, it acquires the identification number corresponding to the changed audio device; then sends the acquired identification number to the audio management module, and the audio The management module updates the target identification number recorded in the audio device table according to the changed identification number corresponding to the audio device.
  • the priority of the earphone is higher than that of the speaker and the sound system, that is, when the PC device 100 is connected to the earphone, the audio data will be preferentially output from the channel corresponding to the earphone. Therefore, the above-mentioned access of an audio device with a high priority to the PC device 100 may be, for example, when the audio device currently used by the PC device 100 is a speaker, and a Bluetooth earphone or a wired earphone has established a connection with the PC device 100 .
  • the above-mentioned audio device monitoring module monitors the audio device changes, and the audio management module updates the target identification number, which will be described below in conjunction with FIGS. 10 to 13 .
  • the user can first click the sound setting control 20 .
  • the PC device 100 will display the sound setting window 20-1 in response to the user's operation behavior, as shown in FIG. 11 .
  • the audio device selection control 20-2 the currently used audio device, such as a loudspeaker, and the audio state switching control 20-3 corresponding to the loudspeaker and the adjustment volume are displayed in the sound setting window 20-1.
  • volume bar control 20-4 the audio state switching control 20-3 corresponding to the loudspeaker and the adjustment volume are displayed in the sound setting window 20-1.
  • the PC device 100 will display a list of selected playback devices in response to the user's operation behavior, as shown in FIG. 12 .
  • all audio devices that can be selected by the PC device 100 are displayed in the list of selected playback devices, such as the earphone 1 and the speaker in FIG. 12 .
  • PC device 100 when the user clicks the option of earphone 1, PC device 100 responds to the user's operation behavior, and PC device 100 will switch the currently used audio device from the speaker to earphone 1, and the switched sound setting window 20- 1 shows the content shown in Figure 13.
  • the speaker and the earphone 1 share an audio state switching control 20 - 3 and a volume bar control 20 - 4 for adjusting the volume.
  • the operation of the audio state switching control 20-3 and the volume bar control 20-4 for adjusting the volume is essentially the adjustment of the audio state of the speaker. and volume.
  • the operation of the audio state switch control 20 - 3 and the volume bar control 20 - 4 for adjusting the volume essentially adjusts the audio state and volume of the earphone 1 .
  • the mapping between the current audio state of the audio state switching control 20-3, the current volume value of the volume bar control 20-4, and the currently used audio device can be maintained. relationship, and then when a change in the audio device is detected, adjust the audio state corresponding to the display of the audio state switching control 20-3 according to the change, and the volume value corresponding to the display of the volume bar control 20-4.
  • the volume bar control 20-4 corresponding to the audio state switching control 20-3 and the volume adjustment control 20-4 respectively corresponding to the audio state switching control 20-3 and the volume adjustment can be set according to the number of audio devices that can be selected by the PC device 100, so that in the audio When the device changes, the audio state and volume value can be set by the corresponding audio state switching control 20-3 and the volume bar control 20-4 for adjusting the volume.
  • the user may manually modify the currently used PC device 100.
  • the audio state of the audio device Therefore, in order to ensure that the state value of the target audio state recorded in the audio state table can be dynamically updated according to the actual modification of the user, it is necessary to monitor the audio state switching control.
  • the audio state monitoring module provided by the system used by the PC device 100 is used.
  • the PC device 100 can call the above-mentioned audio state monitoring module, and then the audio state monitoring module monitors the user's click on the audio state switching control corresponding to the audio device currently used by the PC device 100. operate.
  • the audio state corresponding to the audio state switch control is the above-mentioned mute state
  • the audio state switch control is clicked, the audio state is switched from the mute state to the above-mentioned mute state. non-mute state.
  • the audio state corresponding to the audio state switch control is the non-mute state
  • the audio state switch control is clicked, the audio state is switched from the non-mute state to the mute state.
  • the click operation of the audio state switch control is monitored. After monitoring the user's click operation on the audio state switch control corresponding to the audio device identified by the target identification number, according to the switched The audio state only needs to update the target audio state recorded in the audio state table.
  • the audio device currently used by the PC device 100 is a speaker, and when the state value corresponding to the target audio state of the speaker is "0", after the screen projection connection, if the audio device does not change, the After the user clicks on the audio state switching control, the audio state of the speaker will be changed to a non-mute state.
  • the update of the audio state table is, for example, changing the recorded state value corresponding to the speaker from "0" to "1".
  • the audio device currently used by the PC device 100 is a speaker, and when the state value corresponding to the target audio state of the speaker is "0", after the screen projection connection, if the audio device changes, it will be changed to a headset. And the state value corresponding to the target audio state of the earphone is "1", then after listening to the user clicking on the audio state switching control, the audio state of the earphone will be changed to the mute state.
  • the update of the audio state table is, for example, to The recorded state value corresponding to the headset changed from "1" to "0".
  • the audio device used by the PC device during the screen projection process is the earphone 1 as an example for illustration.
  • the user can click the audio state switching control 20-3.
  • the audio state monitoring module listens to the click operation, and the PC device 100 responds to the user's operation behavior, and the icon style of the audio state switching control 20-3 changes from the style shown in FIG. 13 to the audio state switching control 20 in FIG. 14 -3, the icon style of the sound setting control 20 will also change from the style shown in FIG. 13 to the icon style of the sound setting control 20 in FIG. 14 . That is, it indicates that the target audio state of the earphone 1 has changed from the non-mute state to the mute state. At this time, the state value corresponding to the earphone 1 recorded in the audio state table will be changed from "1" representing the non-mute state to "1" representing the mute state. "0".
  • the target audio state of the audio device currently used by the screen projection sender recorded in the audio state table can be changed according to the actual operation of the user, thereby ensuring that the screen projection is disconnected or the sound output device is changed to the screen projection sender
  • the audio state set according to the target audio state of the currently used audio device recorded in the audio state table is consistent with the audio state that the user actually wants to set.
  • the setting of the audio state of the audio device currently used by the PC device 100 according to the target audio state corresponding to the currently used audio device recorded in the audio state table can be divided into, for example, switching the sound output device to The scene of the PC device 100 and the scene of disconnecting the screen projection connection.
  • the implementation process is shown in steps 207 and 208 , for example.
  • Step 207 after the user changes the sound output device from the screen projection receiving end to the screen projection sending end, read the target audio state recorded in the audio state table.
  • Step 208 Set the audio state of the audio device identified by the target identification number in the screen projection sending end as the target audio state.
  • the PC device 100 will display the sound output device selection control 10-7 in response to the user's operation behavior.
  • the sound output device selection control 10-7 may include the currently connected screen projection receiver, For example, the TV 1 in FIG. 15 , and the screen projection sending end, for example, the local machine in FIG. 15 .
  • audio data can also be played by other third-party audio devices, such as stereos
  • the sound output device selection control 10-7 can include TV 1, This unit can also include available third-party audio devices.
  • the sound output device will switch from the TV 1 to the PC device 100, and the PC device 100 will respond Due to the user's operation behavior, the content displayed in the audio output device option 10-6 will change from the TV 1 in FIG. 15 to the local machine in FIG. 16 .
  • the existing solution that is, the solution that does not adopt the screen projection method provided by this embodiment
  • after the user switches the sound output device from the TV 200 to the PC device 100 no matter whether the user is currently using the PC device during the screen projection process
  • the audio state of the audio device of the device is modified, and the PC device 100 will make sound during the screen projection process, but the TV 200 will not make sound.
  • the sound setting option 20 displays the audio device currently used by the PC device 100, for example, the audio status of the earphone 1 is a mute state, but in the scenario where the PC device 100 is a sound output device, in the existing implementation , the PC device 100 may play the audio data through the default speaker, that is, the sound will still be emitted.
  • the target identification number recorded in the audio device table and the target audio state in the audio state table will be updated in real time according to the user's operation, and the sound output device is switched from the TV 200 during the screen projection process
  • the PC device 100 plays the audio device for audio data, and the audio state of the audio device for playing the audio data can be consistent with the user's expectation, thus solving the existing solution Inconsistent issues with audio devices and audio states.
  • the target identification number recorded in the audio device table is the identification number of the earphone 1.
  • the audio state of the earphone 1 is in the mute state.
  • the PC device 100 is a sound output device
  • the PC device 100 as the sound output device will not make a sound , but in a mute state, that is, in this scenario, both the PC device 100 and the TV 200 only display images without making any sound.
  • the audio device used by the PC device 100 to play audio data, and the audio state of the audio device played by the audio data can be consistent with the user's expectations. , which solves the problem of inconsistent audio equipment and audio status in existing solutions.
  • the implementation process can be, for example: the screen projection management module notifies the audio management module to read the target identification number and audio status recorded in the audio device table after receiving the screen projection disconnection request
  • the target audio state recorded in the table corresponds to the audio device corresponding to the target identification number, and then the audio state of the audio device identified by the target identification number in the screen projection sending end is set as the target audio state.
  • the PC device 100 will disconnect the screen projection connection with the TV 200 in response to the user's operation behavior.
  • the screen projection information provided by the PC device 100 will not be sent to the TV 200 through the transmission module, so the screen of the TV 200 will not display the content displayed on the screen of the PC device 100, while the TV 200 Audio data provided by the PC device 100 is also not played.
  • the sound setting option 20 shows that the audio device currently used by the PC device 100 is the audio state of the headset 1, and the audio state is muted.
  • the system does not know the screen projection process
  • the user changes the currently used audio device from the speaker to the earphone 1, and modifies the audio status of the earphone 1, so the PC device 100 will control the speaker to play audio data, and the sound will still be emitted.
  • the existing solution will cause the PC device to 100
  • the audio device and audio state playing the audio data are inconsistent with what the user expects.
  • the audio data is played by the audio device corresponding to the target identification number recorded in the audio device table, and the audio state of the audio device playing the audio data is consistent with the target audio state recorded in the audio state table, so that the sound output
  • the PC device 100 plays the audio device for audio data, and the audio state of the audio device for playing the audio data can be consistent with the user's expectations, thereby solving the problem of the existing solution audio device, audio state Inconsistent issues.
  • the target identification number recorded in the audio device table is the identification number of the earphone 1.
  • the audio state of the earphone 1 is in the mute state.
  • the audio state of the earphone 1 will be It is set to the target audio state recorded in the audio state table, i.e. the mute state.
  • the PC device 100 only displays the picture without sound, while the TV 200 neither displays the picture displayed on the screen of the PC device 100 nor silent.
  • the audio device monitoring module is constantly monitoring whether the audio device changes during the screen projection process, the audio state monitoring module has been monitoring the user's click operation on the audio state switching control corresponding to the currently used audio device, so After the screen projection is finished, that is, after the screen projection is disconnected, the audio device monitoring module and the audio state monitoring module need to be closed, that is, stop monitoring whether the audio device changes, and stop continuing to monitor the audio state change, thereby avoiding the PC device 100 Occupation and waste of resources.
  • the audio device currently used by the PC device 100 is first obtained, and the identification number of the currently used audio device is recorded in the audio device table as the target identification number, and the current audio state is obtained at the same time, and the current The audio state of the target audio state is used as the target audio state, and the state value corresponding to the target audio state is recorded in the audio state table, so that it can be known which audio device of the PC device 100 the user expects to be in which audio state during the screen projection process, and then When the screen projection is subsequently disconnected, or when the PC device 100 is used as the sound output device, the PC device 100 can be used to play audio data by the user's desired audio device, and the audio state of the audio device playing the audio data can be consistent with the user's desired.
  • the PC device 100 can obtain audio data from the audio channel corresponding to the audio device identified by the target identifier recorded in the audio device table and send it to the TV 200, thereby ensuring that during the screen projection process, no matter how the user switches the audio device used by the screen projection sender, it will be used as the sound
  • the TV 2 of the output device can obtain the audio data that can be played, and then play the sound.
  • the PC device will change the volume of the output audio data in response to the user's operation behavior, so that if the audio output
  • the audio data played by the large-screen device will be synchronized with the adjusted volume of the volume bar control 20-4, for example, when the user When the volume is turned up through the volume bar control 20-4, the volume of the audio data played by the large-screen device will also be turned up, and when the user turns the volume down through the volume bar control 20-4, the audio data played by the large-screen device will The volume of the data is also turned down.
  • Method 1.1 During the screen projection process, the audio status of the screen projection sender is set by the audio management module.
  • the PC is muted before casting the screen, and then plays the audio to cast the screen (the large-screen device is connected to the screen for the first time, as shown in Figure 21 The sound from TV 1), and then switch the sound to the local machine, that is, switch to the PC, then switch back to TV 1, and finally disconnect the screen projection connection.
  • the upper layer cast screen management module (for example, it may be called MultiCastMgr) notifies the audio management through the initial interface/method provided by the volume control application, such as the audioContol.Init() method Module (for example, it can be called AudioControl); then the audio management module obtains the identification number of the audio device currently in use, and saves the identification number as an initial value, such as SaveMuteState() to obtain the identification number of the audio device in use number, and save the identification number as the initial value, and at the same time call the method used to set the mute of the currently used audio device, such as SetDeviceMute() to set the mute of the currently used audio device, for example, when the currently used audio device is a speaker, set The speaker is muted.
  • the currently used audio device is headphone 1, set the headphone 1 to mute, and then call the method used to monitor whether the audio sending device changes, such as ListenDeviceChange
  • the audio module calls SetDeviceMute() to mute the currently used audio device and calls ListenDeviceChange() to start monitoring whether the audio device used by the PC changes, regardless of the execution sequence.
  • the upper layer of the product will notify the corresponding protocol layer, that is, the sound output device of the transmission module is a large screen (TV 1), and the transmission module will pass the The method used to obtain the currently used audio device, such as audioService() to obtain the currently used audio device.
  • the audio management module in response to the request of audioService(), will send the channel information corresponding to the audio device identified by the target identification number recorded in the audio device table to the transmission module through the method of transmitting the audio mode of the device, such as DeviceVoiceMode() .
  • the transmission module After the transmission module receives the channel information sent by the audio management module, it will obtain the audio data from the channel pointed to by the channel information, and use the method for audio encoding and decoding of the audio data, such as SpeakerENcoder() will The acquired audio data is encoded and decoded, and then packaged and sent to TV 1, so that TV 1 decodes the audio and produces sound.
  • the upper layer projection management module notifies the audio management module through the audioContol. , That is, stop encoding, and call the method of stopping playback, such as Audiostop(), so that TV 1 cannot receive audio data packets, and cannot decode and obtain audio data for playback, so TV 1 will mute.
  • the method of using the audio management module is used to query the audio device currently used by the PC, such as HAudioDevice() to query the audio device currently used by the PC, which is determined by querying the target identification number recorded in the audio device table.
  • the speaker is set to sound through SetDeviceMute(); when the audio device is the earphone 1, the earphone 1 is set to sound through SetDeviceMute().
  • the implementation process is similar to the process performed when the default large-screen sound is performed when the screen is connected for the first time, except that there is no need to call ListenDeviceChange() again.
  • the audio management module when the screen projection connection is disconnected, notifies the transmission module to disconnect the screen projection connection with the TV 1 through a method of disconnection, such as Devicestop(), and simultaneously uses the Turn off the audio device monitoring module that monitors whether the audio device of the PC is changed, such as StopNotifyDeviceChange() to turn off the audio device monitoring module that monitors whether the audio device of the PC is changed.
  • the audio management module uses HAudioDevice() to query the audio device currently used by the PC.
  • the speaker is set to sound through SetDeviceMute(); when the audio device is the earphone 1, the earphone 1 is set to sound through SetDeviceMute().
  • the audio management module will also notify the transmission module not to encode, decode and package the audio and send it to TV 1, that is, stop encoding, and call Audiostop() so that TV 1 cannot decode the audio data for playback if it cannot receive the audio data packet. Therefore, TV 1 will be muted.
  • ListenDeviceChange() will be running consistently, and when the audio device is monitored to change, it will send the identification number of the changed audio device to the audio management module for the audio device table.
  • the target identification number of the target is updated.
  • Method 1.2 During the screen projection process, the audio status of the screen projection sender is set by the audio management module according to the audio status monitored by the audio status monitoring module.
  • the upper layer cast screen management module notifies the audio management module through the audioContol.Init() method; then the audio management module obtains the identification number of the currently used audio device through SaveMuteState() and the audio status of the currently used audio device, and save the identification number and audio status of the currently used audio device as the initial value, and call SetDeviceMute() to set the currently used audio device to mute, for example, the currently used audio device is a speaker , set the speaker to mute, and when the currently used audio device is earphone 1, set the earphone 1 to mute, and then open the ListenDeviceChange() that monitors whether the audio sending device changes and monitors whether the audio status of the currently used audio device changes.
  • ListenVolChange Such as ListenVolChange ().
  • the audio module calls SetDeviceMute() to set the mute operation of the currently used audio device, calls ListenDeviceChange() to enable the operation of monitoring whether the audio device used by the PC changes, and calls ListenVolChange() to monitor the current Whether or not the audio state of the audio device being used has changed does not distinguish the execution order.
  • the upper layer of the product will notify the corresponding protocol layer, that is, the sound output device of the transmission module is a large screen (TV 1), and the transmission module will pass the audioService() Gets the currently used audio device.
  • the audio management module in response to the request of audioService(), will send the channel information corresponding to the audio device identified by the target identification number recorded in the audio device table to the transmission module through DeviceVoiceMode().
  • the transmission module After the transmission module receives the channel information sent by the audio management module, it will obtain audio data from the channel pointed to by the channel information, and perform audio encoding and decoding on the acquired audio data through SpeakerENcoder(), and then package and send Give it to TV 1, so that TV 1 decodes the audio and plays it.
  • the upper layer projection management module notifies the audio management module through the audioContol. , That is, stop encoding, and call Audiostop(), so that TV 1 cannot receive audio data packets, and cannot decode and obtain audio data for playback, so TV 1 will mute.
  • the audio management module uses the method HAudioDevice() to query the audio device currently used by the PC and the audio state of the audio device, that is, by querying the target identification number recorded in the audio device table, and by querying the corresponding audio device recorded in the audio state table.
  • the audio status of is OK.
  • the implementation process is similar to the process performed when the default large-screen sound is performed when the screen is connected for the first time, except that there is no need to call ListenDeviceChange() and ListenVolChange() again.
  • the audio management module notifies the transmission module to disconnect the screen projection connection with the TV 1 through Devicestop(), and at the same time, the audio of the monitoring PC is turned off through StopNotifyDeviceChange() Whether the audio device monitoring module changes, the audio status monitoring module that monitors whether the audio status changes is closed through StopNotifyVolChange(). At the same time, the audio management module uses HAudioDevice() to query the audio device currently used by the PC and the audio state corresponding to the audio device.
  • the audio management module will also notify the transmission module not to encode, decode and package the audio and send it to TV 1, that is, stop encoding, and call Audiostop() so that TV 1 cannot decode the audio data for playback if it cannot receive the audio data packet. Therefore, TV 1 will be muted.
  • ListenDeviceChange() and ListenVolChange() will be running consistently, and when the audio device is monitored to change, the identification number of the changed audio device will be sent to the audio management module.
  • the target ID in the audio device table is updated.
  • the identification number of the switched audio device such as deviceId
  • the audio management module modifies the target identification number recorded in the audio device table through SaveMuteState().
  • the identification number deviceId of the switched audio equipment is used as a query parameter, and the audio status of the audio equipment corresponding to the identification number deviceId monitored by the audio status monitoring module is inquired by FindDeviceMuteState (), and after the audio status is inquired, through VolChagestate () sent to the audio management module.
  • the audio device monitoring module and the The audio status monitoring module is taken as an example, and will be described in detail with reference to FIG. 23 to FIG. 25 .
  • the screen projection sending end is called a PC
  • the screen projection receiving end is called a TV 1 .
  • the PC is installed with a screen projection application
  • the screen projection application includes a screen projection management module, an audio management module and a transmission module.
  • the system used by the PC is provided with an audio state monitoring module.
  • the sound output device defaults to TV 1, that is, the sound is produced by TV 1.
  • the screen projection management module will receive a screen projection connection request to TV 1, namely step 301.
  • step 302 the screen projection management module executes step 302 to send an initialization command to the audio management module.
  • the audio management module will execute step 303 to perform an initialization operation, such as implementing initialization by calling the audioContol.Init() interface.
  • the audio management module After the audio management module is initialized, it will obtain the audio device currently used by the machine and the audio status of the audio device.
  • the operation of the audio management module to obtain the audio device currently used by the machine and the audio state of the audio device can be realized through a pre-compiled program interface.
  • the program interface is called SaveMuteState().
  • the audio management module can obtain the audio device currently used by the PC and the audio state of the audio device by calling SaveMuteState().
  • step 305 will be executed, specifically, the identification number of the speaker obtained in step 304 Establish a mapping relationship with the audio state of the speaker and the state value corresponding to the mute state, such as "0", for subsequent use.
  • the audio management module will send a request to monitor the audio device selected by the machine to the audio device monitoring module, that is, perform step 306;
  • call the audio device monitoring module to start the operation of whether the monitoring audio changes, such as through the pre-compiled ListenDeviceChange () interface; call the audio state monitoring module to start the operation of monitoring the audio state of the PC, such as through Call the precompiled ListenVolChange() interface.
  • step 308 will be consistently performed to monitor whether the audio state changes during the entire screen projection process, that is, before the screen projection is disconnected; after the audio device monitoring module is started, during the entire screen projection process , that is, the operation of step 309 will be consistently executed before the screen projection is disconnected to monitor whether the audio device changes.
  • step 310 if it is detected that the audio state changes, execute step 310 , otherwise, continue to execute step 308 ; if it detects that the audio device changes, execute step 311 , otherwise, continue to execute step 309 .
  • the audio device used by the PC is a speaker
  • the target audio state of the speaker is a mute state
  • the audio state monitoring module detects that the audio state changes
  • the user clicks the audio state switching control so that the audio state of the speaker is changed to the non-mute state
  • step 310 specifically sends the state value corresponding to the non-mute state, such as "1", to the audio management module.
  • the audio management module updates the state value of the target audio state recorded in the audio state table according to the state value "1" corresponding to the received non-mute state, and at the same time updates the state value in the mapping relationship between the target identification codes To update, specifically to update the state value from 0 to 1, that is, to execute step 311.
  • step 312 if during the screen projection process, a sound change of the audio device is detected, for example, the speaker is changed to the earphone 1, the identification number of the earphone 1 will be sent to the audio management module, that is, step 312 is executed.
  • the audio management module will establish a mapping relationship between the identification number of the earphone 1 and the state value corresponding to the audio state of the earphone 1 , for example 0, that is, step 313 is executed.
  • the audio management module will also notify the transmission module that the sound output device is TV 1, and set the audio device currently used by the machine through the interface for setting the audio state, such as SetDeviceMute(), such as earphone 1 is mute, that is, execute the steps 314 sets the machine to a silent state.
  • SetDeviceMute() such as earphone 1 is mute
  • step 314 may be executed synchronously with step 304 after the audio management module executes step 303, which is not limited in this embodiment.
  • the audio management module will acquire audio data from the corresponding channel of the earphone 1, that is, execute step 315, and send the audio data to the transmission module, that is, execute step 316.
  • the transmission module After the transmission module receives the audio data, it will encode the audio data in the manner described in the above step embodiment, and then obtain an audio data packet, that is, execute step 317 .
  • the transmission module sends the obtained audio data packet to the TV 1 through the established screen projection link, that is, step 318 is executed.
  • TV 1 after TV 1 receives the audio data packet sent by the transmission module, it will execute step 319 to decode the audio data packet, and then restore the audio data, and play the audio data, so that TV 1 can make sound.
  • the PC is muted first, and then the video is played and then cast to the screen, and the TV 1 makes the sound.
  • the target identification number recorded in the audio device table and the state value of the audio state of the audio device corresponding to the target identification number recorded in the audio state table are dynamically updated. Modify the audio device used by the PC and the audio state of the audio device during the screen projection process, so that the audio data can be obtained from the channel corresponding to the currently used audio device and sent to TV 1, so that when the sound output device is TV 1, TV 1 can always obtain audio data that can be played.
  • step 321 is executed.
  • the audio management module after receiving the initialization instruction sent by the screen projection management module, the audio management module will execute step 322 to perform an initialization operation, for example, by calling the audioContol.Init() interface to realize initialization.
  • the audio management module After the audio management module is initialized, it will read the recorded target identification number from the audio device table, and read the recorded state value of the target audio state corresponding to the target identification number from the audio state table.
  • the target identification number and the state value may be obtained from the mapping relationship table between the audio device and the state value.
  • the audio device corresponding to the target identification number recorded in the audio device table is earphone 1, and the state value corresponding to earphone 1 recorded in the audio state table is "1", then after the audio management module is initialized, that is, according to The mapping relationship determines that the audio device is the earphone 1, and the audio status value is "1" as an example, that is, the content of step 323 .
  • the audio management module sets the device to a non-mute state according to the read state value "1", that is, executes the operation of step 324, and then executes the operation of step 325 to play the audio data.
  • the audio state of the earphone 1 is set to a non-mute state in step 324, and the audio data is played by the earphone 1 in step 325.
  • the audio state value of the audio state of the headphone 1 recorded in the audio state table is "0"
  • the user changes the audio state of the headphone 1 of the PC to the mute state before or during the screen projection
  • the audio management module reads the status value "0" from the audio status table, it will set the earphone 1 to the mute status according to the read status value "0", and then play the audio data.
  • the audio state of the earphone 1 is set to the mute state, even if the audio data is played by the earphone 1, since the audio state of the earphone 1 is in the mute state, no sound will be emitted during the audio data playback .
  • the transmission module will not send audio data packets to TV 1, and TV 1 cannot receive the audio data packets. No sound will be produced.
  • the sound output device is switched from TV 1 to PC during the screen projection process, and then the audio management module is based on the target identification number recorded in the audio device table and the state corresponding to the target identification number recorded in the audio state table.
  • the process of setting the audio state of the PC so that after the sound output device is changed to a PC, the audio device used by the PC to play audio data, and the audio state of the audio device played by the audio data can be consistent with the user's expectation.
  • the PC starts to play the audio data, and after the TV 1 continues to play the picture/video data, if the user clicks the disconnection option 10-5 in Fig. 8, the audio state of the PC will be Refer to Figure 25 for the setting process.
  • the screen projection management module if the screen projection management module receives a screen projection disconnection request, that is, the operation of step 326, the screen projection management module will resend the initialization instruction to the audio management module, that is, step 327 is performed.
  • the audio management module will execute step 328 to perform an initialization operation, for example, by calling the audioContol.Init() interface to realize initialization.
  • the audio management module After the audio management module is initialized, it will read the recorded target identification number from the audio device table, and read the recorded state value of the target audio state corresponding to the target identification number from the audio state table.
  • the target identification number and the state value may be obtained from the mapping relationship table between the audio device and the state value.
  • the audio device corresponding to the target identification number recorded in the audio device table is earphone 1, and the state value corresponding to earphone 1 recorded in the audio state table is "1", then after the audio management module is initialized, that is, according to The mapping relationship determines that the audio device is earphone 1, and the state value of the audio state is "1" as an example, that is, the content of step 329 .
  • the audio management module sets the device to a non-mute state according to the read state value "1", that is, executes the operation of step 330, and then executes the operation of step 331 to play the audio data.
  • the audio state of the earphone 1 is set to a non-mute state in step 330, and the audio data is played by the earphone 1 in step 331.
  • the audio state value of the audio state of the headphone 1 recorded in the audio state table is "0"
  • the user changes the audio state of the headphone 1 of the PC to the mute state before or during the screen projection
  • the audio management module reads the status value "0" from the audio status table, it will set the earphone 1 to the mute status according to the read status value "0", and then play the audio data.
  • the audio state of the earphone 1 is set to the mute state, even if the audio data is played by the earphone 1, since the audio state of the earphone 1 is in the mute state, no sound will be emitted during the audio data playback .
  • the audio management module will also send a request to the audio state monitoring module to stop monitoring the audio state of the machine, that is, perform step 332; send a request to stop monitoring the audio device selected by the machine to the audio device monitoring module , that is, step 334 is executed.
  • the audio status monitoring module after receiving the request from the audio management module to stop monitoring the audio status of the unit, the audio status monitoring module will perform the operation of step 333 to stop monitoring the audio status of the unit.
  • the audio device monitoring module After receiving the request from the audio management module to stop monitoring the audio device selected by the local device, the audio device monitoring module will perform the operation of step 335 to stop monitoring the audio device selected by the local device.
  • the audio state monitoring module can call the pre-packaged StopNotifyVolChange() interface, so as to stop monitoring the local audio state; the audio device monitoring module can call the pre-packaged StopNotifyDeviceChange() interface, for example.
  • the audio management module sets the audio status of the screen projection sending end according to the contents recorded in the audio state table and audio device table, so that no matter what the screen projection application uses Which protocol, the audio management module only needs to be set in a unified way, which greatly reduces the development workload and maintenance difficulty.
  • Method 2.1 During the screen projection process, the audio status of the screen projection sender is set by the transmission module.
  • the PC is muted before screen projection, and then plays the audio for screen projection (the large-screen device is connected for the first time for screen projection, as shown in Figure 26 The sound from TV 1), and then switch the sound to the local machine, that is, switch to the PC, then switch back to TV 1, and finally disconnect the screen projection connection.
  • the upper layer cast screen management module (for example, it may be called MultiCastMgr) notifies the audio management module (for example, it may be called AudioControl) through the audioContol.Init() method; then the audio The management module obtains the identification number of the currently used audio device through SaveMuteState(), and saves the identification number as the initial value, and at the same time starts ListenDeviceChange() to monitor whether the audio sending device changes.
  • MultiCastMgr the audio management module
  • the audio management module will call DeviceVoiceMode() to send the channel information corresponding to the currently used audio device obtained through SaveMuteState() to the corresponding protocol layer, That is, the sound output device of the transmission module is a large screen (TV 1).
  • the transmission module After the transmission module receives the channel information sent by the audio management module, it will obtain audio data from the channel pointed to by the channel information, and perform audio encoding and decoding on the acquired audio data through SpeakerENcoder(), and then package and send Give it to TV 1, so that TV 1 decodes the audio and plays it. At the same time, the transmission module will call HAudioDevice() to query the currently used audio device recorded in the audio management module.
  • the audio management module will send the identification number of the queried audio device, that is, deviceId, to the transmission module, and the transmission module will call SetDeviceMute() to set the audio device identified by deviceId to mute.
  • the transmission module will call SetDeviceMute() to set the audio device identified by deviceId to mute.
  • the audio device identified by deviceId is earphone 1, set earphone 1 to mute.
  • the upper layer projection management module notifies the audio management module through the audioContol. , that is, stop encoding, and call Audiostop() so that TV 1 cannot receive audio data packets, and cannot decode and obtain audio data for playback, so TV 1 will mute.
  • the transmission module will call HAudioDevice() to query the currently used audio device recorded in the audio management module.
  • the audio management module will send the identification number of the queried audio device, that is, deviceId, to the transmission module, and the transmission module will call SetDeviceMute() to set the audio device identified by deviceId to mute.
  • the transmission module will call SetDeviceMute() to set the audio device identified by deviceId to mute.
  • the audio device identified by deviceId is earphone 1, set earphone 1 to mute.
  • the implementation process is similar to the process performed when the default large-screen sound is performed when the screen is connected for the first time, except that there is no need to call ListenDeviceChange() again.
  • the audio management module notifies the transmission module to disconnect the screen projection connection with the TV 1 through Devicestop(), and at the same time, the audio of the monitoring PC is turned off through StopNotifyDeviceChange() Status of the audio status monitoring module.
  • the transmission module will call HAudioDevice() to query the currently used audio device recorded in the audio management module.
  • the audio management module will send the identification number of the queried audio device, that is, deviceId, to the transmission module, and the transmission module will call SetDeviceMute() to set the audio device identified by deviceId to mute.
  • the transmission module will call SetDeviceMute() to set the audio device identified by deviceId to mute.
  • the audio device identified by deviceId is earphone 1, set earphone 1 to mute.
  • the audio management module will also notify the transmission module not to encode, decode and package the audio and send it to TV 1, that is, stop encoding, and call Audiostop() so that TV 1 cannot decode the audio data for playback if it cannot receive the audio data packet. Therefore, TV 1 will be muted.
  • ListenDeviceChange() will be running consistently, and when the audio device is monitored to change, it will send the identification number of the changed audio device to the audio management module for the audio device table.
  • the target identification number of the target is updated.
  • Method 2.2 During the screen projection process, the audio state of the screen projection sender is set by the transmission module according to the audio state monitored by the audio state monitoring module.
  • the upper layer projection management module notifies the audio management module through the audioContol.Init() method; then the audio management module obtains the identification number of the currently used audio device through SaveMuteState() and the audio status of the currently used audio device, and save the identification number and audio status of the currently used audio device as the initial value, and at the same time open the ListenDeviceChange() that monitors whether the audio sending device changes and monitors the audio status of the currently used audio device ListenVolChange() if there is a change.
  • the audio management module will call DeviceVoiceMode() to send the channel information corresponding to the currently used audio device obtained through SaveMuteState() to the corresponding protocol layer, That is, the sound output device of the transmission module is a large screen (TV 1).
  • the transmission module After the transmission module receives the channel information sent by the audio management module, it will obtain audio data from the channel pointed to by the channel information, and perform audio encoding and decoding on the acquired audio data through SpeakerENcoder(), and then package and send Give it to TV 1, so that TV 1 decodes the audio and plays it. At the same time, the transmission module will call HAudioDevice() to query the currently used audio device and the audio status of the audio device recorded in the audio management module.
  • the audio management module will send the identification number (deviceId) of the audio device found and the audio status of the audio device identified by the identification number to the transmission module, and the transmission module calls SetDeviceMute () to set the audio device identified by deviceId as Mute, for example, when the currently used audio device is a speaker, set the speaker to mute, and when the audio device identified by deviceId is earphone 1, set earphone 1 to mute.
  • DeviceId the identification number of the audio device found and the audio status of the audio device identified by the identification number
  • the transmission module calls SetDeviceMute () to set the audio device identified by deviceId as Mute, for example, when the currently used audio device is a speaker, set the speaker to mute, and when the audio device identified by deviceId is earphone 1, set earphone 1 to mute.
  • the upper layer projection management module notifies the audio management module through the audioContol. , that is, stop encoding, and call Audiostop() so that TV 1 cannot receive audio data packets, and cannot decode and obtain audio data for playback, so TV 1 will mute.
  • the audio management module will send the identification number (deviceId) of the audio device found and the audio status of the audio device identified by the identification number to the transmission module, and the transmission module calls SetDeviceMute () to set the audio device identified by deviceId as The corresponding audio state.
  • the speaker when the currently used audio device is a speaker, and the obtained audio state corresponding to the speaker is mute, set the speaker to mute; when the currently used audio device is a speaker, and the obtained audio state corresponding to the speaker is not mute , set the speaker to unmute.
  • the audio device identified by deviceId is earphone 1, and the audio status corresponding to the acquired speaker is mute, set earphone 1 to mute; the audio device identified by deviceId is earphone 1, and the acquired audio corresponding to the speaker When the status is not muted, set earphone 1 to be unmuted.
  • the implementation process is similar to the process performed when the default large-screen sound is performed when the screen is connected for the first time, except that there is no need to call ListenDeviceChange() and ListenVolChange() again.
  • the audio management module notifies the transmission module to disconnect the screen projection connection with the TV 1 through Devicestop(), and at the same time turns off the audio of the monitoring PC through StopNotifyDeviceChange() Whether the audio device monitoring module changes, the audio status monitoring module that monitors whether the audio status changes is closed through StopNotifyVolChange().
  • the transmission module will call HAudioDevice() to query the currently used audio device and the audio status of the audio device recorded in the audio management module.
  • the audio management module will send the identification number (deviceId) of the audio device found and the audio status of the audio device identified by the identification number to the transmission module, and the transmission module calls SetDeviceMute () to set the audio device identified by deviceId as The corresponding audio state.
  • the audio management module will also notify the transmission module not to encode, decode and package the audio and send it to TV 1, that is, stop encoding, and call Audiostop() so that TV 1 cannot decode the audio data for playback if it cannot receive the audio data packet. Therefore, TV 1 will be muted.
  • ListenDeviceChange() and ListenVolChange() will be running consistently, and when the audio device is monitored to change, the identification number of the changed audio device will be sent to the audio management module.
  • the target ID in the audio device table is updated.
  • the audio management module can obtain the identification number of the changed audio device through GetDefaultSpeakerDevice().
  • the audio device monitoring module will send the changed identification number (deviceId) of the audio device to the audio management module for management.
  • the audio management module uses the received deviceId as a query parameter, and obtains the audio state of the audio device corresponding to the deviceId from the audio state monitoring module through FindDevceMuteState().
  • the audio state management module will send the queried audio state to the audio management module through VolChangestate().
  • the audio device monitoring module and the The audio status monitoring module is taken as an example, and will be described in detail with reference to FIG. 28 to FIG. 30 .
  • the screen projection sending end is called a PC
  • the screen projection receiving end is called a TV 1 .
  • the PC is installed with a screen projection application
  • the screen projection application includes a screen projection management module, an audio management module and a transmission module.
  • the system used by the PC is provided with an audio state monitoring module.
  • the sound output device defaults to TV 1, that is, the sound is produced by TV 1.
  • the screen projection management module will receive a screen projection connection request to the TV 1.
  • the technical solution provided by this embodiment includes steps 401 to 419 . It is not difficult to find that step 401 to step 413, step 415 to step 419 in this embodiment are roughly the same as step 301 to step 311, step 315 to step 319 in the embodiment shown in FIG. Only the differences are described.
  • the transmission module executes step 414 to put the local device in a mute state.
  • the transmission module will set the audio state of the device through an interface for setting the audio state, such as SetDeviceMute().
  • the transmission module when the transmission module sets the audio state of the machine through SetDeviceMute(), it will set the audio device identified by the identification number to the mute state according to the obtained identification number.
  • the earphone 1 when the audio device identified by the queried identification number is earphone 1, the earphone 1 is set to a mute state through SetDeviceMute().
  • the audio device identified by the queried identification number is a speaker
  • the sound output device is the TV 1
  • the audio device currently used by the PC such as a speaker
  • the interface for setting the audio state is called between the transmission modules to set the local audio device, for example, the speaker is muted.
  • the PC is muted first, and then the video is played and then cast to the screen, and the TV 1 makes the sound.
  • the target identification number recorded in the audio device table and the state value of the audio state of the audio device corresponding to the target identification number recorded in the audio state table are dynamically updated. Modify the audio device used by the PC and the audio state of the audio device during the screen projection process, so that the audio data can be obtained from the channel corresponding to the currently used audio device and sent to TV 1, so that when the sound output device is TV 1, TV 1 can always obtain audio data that can be played.
  • the technical solution provided by this embodiment includes steps 420 to 427 . It is not difficult to find that steps 420 to 422, step 424 and step 427 in this embodiment are roughly the same as steps 320 to 323 and step 325 in the embodiment shown in FIG. to explain.
  • the transmission module sends an audio device and audio status inquiry request to the audio management module.
  • the transmission module may, for example, send an audio device and an audio status query request to the audio management module through precompiled HAudioDevice().
  • the audio management module will send the queried deviceId and the audio state queried through the precompiled VolChangestate() to the transmission module.
  • the audio management module sends the identification number of the earphone 1 and the status value 1 to the transmission module, that is, sends the queried identification number deviceId of the currently used audio device and the audio status of the audio device to the transmission module.
  • step 426 the transmission module sets the earphone 1 to a non-mute state.
  • the transmission module sets the audio state of the device through SetDeviceMute().
  • the audio device identified by the identification number is set as the queried audio state.
  • the audio device identified by the queried identification number is earphone 1 and the corresponding audio state is mute, set the earphone 1 to the mute state through SetDeviceMute(); the audio device identified by the queried identification number is Headphone 1, when the corresponding audio state is unmute, set the earphone 1 to unmute through SetDeviceMute().
  • the speaker is set to a mute state by SetDeviceMute (); the audio device identified by the queried identification number is a speaker , when the corresponding audio state is non-mute, set the speaker to non-mute through SetDeviceMute().
  • the sound output device is switched from TV 1 to PC during the screen projection process, and then the audio management module is based on the target identification number recorded in the audio device table and the state corresponding to the target identification number recorded in the audio state table.
  • the process of setting the audio state of the PC so that after the sound output device is changed to a PC, the audio device used by the PC to play audio data, and the audio state of the audio device played by the audio data can be consistent with the user's expectation.
  • the technical solution provided by this embodiment includes steps 428 to 439 . It is not difficult to find that steps 428 to 435 in this embodiment are substantially the same as steps 420 to 427 in the embodiment shown in Figure 29, and steps 436 to 439 are similar to steps 323 to 325 in the embodiment shown in Figure 25 They are roughly the same and will not be repeated here.
  • the audio status of the screen projection sender is set by the transmission module during the screen projection process, so that screen projection applications using different protocols can be personalized according to actual needs, so that the screen projection provided by this application Screen projection solutions are more diversified.
  • the system projection methods provided by the above-mentioned embodiments implemented by electronic equipment can also be performed by a chip system included in the electronic device, wherein the chip system can including the processor.
  • the system-on-a-chip can be coupled with a memory, so that the computer program stored in the memory is invoked when the system-on-a-chip is running, so as to realize the steps performed by the above-mentioned electronic device.
  • the processor in the chip system may be an application processor or a non-application processor.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer storage medium stores computer instructions, and when the computer instructions are run on the electronic device, the electronic device executes the above-mentioned related method steps to implement the above-mentioned embodiment.
  • the method of system projection is also provided.
  • an embodiment of the present application also provides a computer program product, which, when running on an electronic device, causes the electronic device to perform the above related steps, so as to implement the system screen projection method in the above embodiment.
  • embodiments of the present application also provide a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein, the transceiver pins and the The processing circuits communicate with each other through internal connection paths, and the processing circuits implement the above-mentioned relevant method steps to implement the system screen projection method in the above-mentioned embodiment, to control the receiving pin to receive signals, and to control the sending pin to send signals.
  • a chip which may also be a component or module
  • the processing circuits communicate with each other through internal connection paths, and the processing circuits implement the above-mentioned relevant method steps to implement the system screen projection method in the above-mentioned embodiment, to control the receiving pin to receive signals, and to control the sending pin to send signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Acoustics & Sound (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Transforming Electric Information Into Light Information (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本申请提供了一种投屏方法、设备及存储介质。该方法应用于安装有投屏应用的投屏发送端,在投屏场景中通过获取投屏发送端当前使用的音频设备,并将该音频设备对应的标识号记录到音频状态表,这样在确定用户选择的声音输出设备为投屏接收端时,从该标识号标识的音频设备获取音频数据发送给投屏接收端播放,而非默认的音频设备,例如扬声器,从而保证投屏过程中,在投屏接收端为出声设备时,投屏接收端始终可以获取到音频数据进而播放出声。

Description

投屏方法、设备及存储介质
本申请要求于2021年12月14日提交中国专利局、申请号为202111523895.3、发明名称为“投屏方法、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及投屏技术领域,尤其涉及一种投屏方法、设备及存储介质。
背景技术
随着终端技术的发展,越来越多的终端具备投屏功能,例如在家庭、工作、教学、游戏竞技场景下,终端通过将当前显示的画面投射到大屏上,从而可以大大方便人们观看画面内容。
对于投屏发送端,即发送投屏信息的终端是个人计算机(personal computer,PC设备)的投屏场景,目前需要借助安装在PC设备上的投屏应用来实现将PC设备中播放的音视频内容投屏到投屏接收端,如电视等大屏幕设备(后续称为大屏设备)上。
虽然PC设备可以借助投屏应用实现投屏功能,但是却存在着一些不容忽视的问题,比如在PC设备连接有其他音频设备,例如耳机时,在选择大屏设备做为声音输出设备时往往会面临大屏设备无法出声的问题。
发明内容
为了解决上述技术问题,本申请提供一种投屏方法、设备及存储介质,旨在实现投屏场景中,无论PC设备是否连接其他音频设备,在选择大屏设备作为声音输出设备时大屏设备均能正常出声。
第一方面,本申请提供一种投屏方法,应用于投屏发送端,所述投屏发送端安装有投屏应用,所述方法包括:在所述投屏发送端由内置的扬声器播放音频数据时,当接收到投屏连接请求后,所述投屏发送端响应于所述投屏连接请求,与投屏接收端建立投屏连接,从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据;在有耳机与所述投屏发送端连接后,从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据。由此,通过记录投屏发送端当前使用的音频设备的标识号,进而在声音输出设备为投屏接收端时,投屏发送端能够从记录的标识号标识的音频设备对应的声道获取需要播放的音频数据发送给投屏接收端,从而在投屏场景中无论投屏发送端是否切换音频设备,投屏接收端都可以接收到可以播放的音频数据,即均能正常出声。
根据第一方面,在所述投屏发送端的显示界面中显示有对应于所述扬声器的第一音频状态切换控件和第一音量条控件;所述方法还包括:在所述投屏发送端由内置的扬声器以所述第一音量条控件对应的音量值播放所述音频数据时,当接收到对所述第一音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作控制所述扬声器停止出声。由此可知,在投屏发送端与投屏接收端建立投屏连接前,投屏发送端 的扬声器是否出声与用户对第一音频状态切换控件的点击操作息息相关,通过对第一音频状态切换控件的点击便可以实现对扬声器音频状态的修改。
根据第一方面,或者以上第一方面的任意一种实现方式,在所述从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:在接收到将声音输出设备由所述投屏接收端切换为所述投屏发送端的点击操作后,所述投屏发送端响应于所述点击操作,停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声。由此,在投屏过程中,当声音输出设备切换为投屏发送端,且投屏发送端当前使用的音频设备是内置的扬声器时,投屏发送端的扬声器是否出声取决于与扬声器对应的第一音频状态切换控件当前的状态,从而保证了投屏场景中,投屏发送端的扬声器是否出声能够与用户期望的一致。
根据第一方面,或者以上第一方面的任意一种实现方式,在所述停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声之后,所述方法还包括:在接收到对所述第一音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,控制所述扬声器以所述第一音量条控件对应的音量值播放所述音频数据。
根据第一方面,或者以上第一方面的任意一种实现方式,在所述从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:在接收到断开所述投屏发送端与所述投屏接收端之间的投屏连接后,所述投屏发送端响应于所述点击操作,停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声。
根据第一方面,或者以上第一方面的任意一种实现方式,在所述投屏发送端的显示界面中显示有对应于所述耳机的第二音频状态切换控件和第二音量条控件;在所述从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:在接收到对所述第二音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,将所述耳机设置为静音状态。
根据第一方面,或者以上第一方面的任意一种实现方式,所述将所述耳机设置为静音状态之后,所述方法还包括:在接收到将声音输出设备由所述投屏接收端切换为所述投屏发送端的点击操作后,所述投屏发送端响应于所述点击操作,停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声。由此,在投屏过程中,当声音输出设备切换为投屏发送端,且投屏发送端当前使用的音频设备是外接的耳机时,投屏发送端的耳机是否出声取决于与耳机对应的第二音频状态切换控件当前的状态,从而保证了投屏场景中,投屏发送端的耳机是否出声能够与用户期望的一致。
根据第一方面,或者以上第一方面的任意一种实现方式,在所述停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声之后,所述方法还包括:在接收到对所述第二音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,控制所述耳机出声。
根据第一方面,或者以上第一方面的任意一种实现方式,在所述将所述耳机设置为静音状态之后,所述方法还包括:在接收到断开所述投屏发送端与所述投屏接收端之间的投屏连接后,所述投屏发送端响应于所述点击操作,停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声。
根据第一方面,或者以上第一方面的任意一种实现方式,在所述投屏发送端的显示界面中还显示有音频设备选择列表,所述音频设备选择列表包括第一音频设备选项和第二音频设备选项,所述第一音频设备选项对应于所述扬声器,所述第二音频设备选项对应于所述耳机;在有耳机与所述投屏发送端连接后,从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:当接收到对所述第一音频设备选项的点击操作后,所述投屏发送端响应于所述点击操作,从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据。
第二方面,本申请提供一种投屏方法,应用于投屏发送端,所述投屏发送端安装有投屏应用,所述方法包括:在接收到投屏连接请求后,获取所述投屏发送端当前使用的音频设备的标识号作为目标标识号,并记录到音频设备表;确定用户选择的声音输出设备;在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放音频数据;在所述声音输出设备为投屏接收端时,将所述音频设备表中记录的所述目标标识号标识的音频设备设置为静音状态,并从所述音频设备表中记录的所述目标标识号标识的音频设备对应的声道获取所述音频数据,将所述音频数据发送至所述投屏接收端播放。
示例性的,所述投屏发送端为PC设备,所述投屏接收端为电视等大屏设备。
由此,本申请提供的投屏方案,在投屏场景中通过获取投屏发送端当前使用的音频设备,并将该音频设备对应的标识号记录到音频状态表,这样在确定用户选择的声音输出设备为投屏接收端时,从该标识号标识的音频设备获取音频数据发送给投屏接收端播放,而非默认的音频设备,例如扬声器,从而保证投屏过程中,在投屏接收端为出声设备时,投屏接收端始终可以获取到音频数据进而播放出声。
根据第二方面,在所述获取所述投屏发送端当前使用的音频设备的标识号作为目标标识号,并记录到音频设备表之后,所述方法还包括:调用音频设备监控模块,监控所述投屏发送端当前使用的音频设备是否发生变化;在监控到所述投屏发送端当前使用的音频设备发生变化时,获取变化后的音频设备对应的标识号;根据变化后的音频设备对应的标识号更新所述音频设备表中记录的所述目标标识号。
由此,本申请提供的投屏方案,通过在投屏过程中启动音频设备监控模块持续监控投屏发送端选中的音频设备,并在音频设备发生改变时更新音频设备表中记录的目标标识号,使得音频设备表中记录的目标标识号能够根据投屏发送端实际选中的音频设备进行改变,进而保证投屏过程中,在投屏发送端为声音输出设备时,音频数据能够由变更后的音频设备播放,在投屏接收端为声音输出设备时,投屏发送端能够从变更后的音频设备对应的声道获取音频数据发送给投屏接收端播放。这样就可以解决现有方案中,无论投屏发送端是否连接其他音频设备,投屏过程中,投屏接收端和投屏发送端均能正常出声。
根据第二方面,或者以上第二方面的任意一种实现方式,在所述将所述音频数据发送至所述投屏接收端播放之后,所述方法还包括:在用户将声音输出设备从所述投屏接收端变更为所述投屏发送端后,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据。
由此,本申请提供的投屏方案,通过根据音频设备表中记录的目标标识号标识的音频设备播放所述音频数据,从而使得声音输出设备从投屏接收端变更为投屏发送端后,投屏发送端播放音频数据的音频设备能够与用户选择的相一致,进一步提升用户体验。
根据第二方面,或者以上第二方面的任意一种实现方式,在所述将所述音频数据发送至所述投屏接收端播放之后,所述方法还包括:在接收到投屏断开请求后,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据。
由此,本申请提供的投屏方案,通过根据音频设备表中记录的目标标识号标识的音频设备播放所述音频数据,从而使得投屏断开后,投屏发送端播放音频数据的音频设备能够与用户选择的相一致,进一步提升用户体验。
根据第二方面,或者以上第二方面的任意一种实现方式,在断开与所述投屏接收端的连接之后,所述方法还包括:关闭所述音频设备监控模块。
由此,本申请提供的投屏方案,在投屏结束后停止继续监控音频设备的变化,从而有效避免了对投屏发送端资源的占用和浪费。
根据第二方面,或者以上第二方面的任意一种实现方式,在接收到投屏连接请求后,所述方法还包括:获取所述投屏发送端当前的音频状态作为目标音频状态,并记录到音频状态表,所述目标音频状态为静音状态或非静音状态;相应地,所述在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据,包括:在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据,并将所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
由此,本申请提供的投屏方案,通过在投屏场景中通过获取投屏发送端在建立投屏连接前的音频状态,并将获取到的音频状态作为投屏发送端的目标音频状态记录到音频状态表,这样在确定用户选择的声音输出设备为投屏发送端时,直接将投屏发送端的音频状态设置为音频状态表中记录的目标音频状态,从而使得投屏场景中,在声音切回到投屏发送端时,投屏发送端的音频状态能够与用户期望的音频状态一致,进而大大提升了用户体验。
根据第二方面,或者以上第二方面的任意一种实现方式,在所述获取所述投屏发送端当前的音频状态作为目标音频状态,并记录到音频状态表之后,所述方法还包括:调用音频状态监控模块,监控用户对所述目标标识号标识的音频设备对应的音频状态切换控件的点击操作,在所述音频状态切换控件对应的音频状态为所述静音状态时,所述音频状态切换控件被点击后,所述音频状态从所述静音状态切换为所述非静音状态,在所述音频状态切换控件对应的音频状态为所述非静音状态时,所述音频状态切换控件被点击后,所述音频状态从所述非静音状态切换为所述静音状态;在监控到用户对所述目标标识号标识的音频设备对应的音频状态切换控件的点击操作后,根据切换后的所述音频状态更新所述音频状态表中记录的所述目标音频状态。
由此,本申请提供的投屏方案,通过在投屏过程中启动音频状态监控模块持续监控投屏发送端的音频状态,并在音频状态发生改变时更新音频状态表中记录的目标音频状态,使得音频状态表中记录的目标音频状态能够根据用户的实际操作进行变更,进而保证断开投屏或者将声音输出设备变更为投屏发送端时根据音频状态表中记录的目标音频状态设 置的音频状态与用户实际想要设置的音频状态相一致。这样就可以解决现有方案中投屏前或者投屏中用户手动修改投屏发送端为静音状态,断开投屏或由大屏设备出声切换为投屏发送端出声后,投屏发送端的音频状态能够与用户设置的一致处于静音状态而不是直接出声。
根据第二方面,或者以上第二方面的任意一种实现方式,在所述将所述音频数据发送至所述投屏接收端之后,所述方法还包括:在用户将声音输出设备从所述投屏接收端变更为所述投屏发送端后,读取所述音频状态表中记录的所述目标音频状态;将所述投屏发送端中所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
由此,本申请提供的投屏方案,通过根据音频状态表中记录的目标音频状态来设置投屏发送端的音频状态,从而使得声音输出设备从投屏接收端变更为投屏发送端后,投屏发送端的音频状态能够与用户设置的状态相一致,进一步提升用户体验。
根据第二方面,或者以上第二方面的任意一种实现方式,所述方法还包括:在接收到投屏断开请求后,读取所述音频状态表中记录的所述目标音频状态;将所述投屏发送端中所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
由此,本申请提供的投屏方案,通过根据音频状态表中记录的目标音频状态来设置投屏发送端的音频状态,从而使得投屏断开后,投屏发送端的音频状态能够与用户设置的状态相一致,进一步提升用户体验。
根据第二方面,或者以上第二方面的任意一种实现方式,在断开与所述投屏接收端的连接之后,所述方法还包括:关闭所述音频状态监控模块。
由此,本申请提供的投屏方案,在投屏结束后停止继续监控音频状态的变化,从而有效避免了对投屏发送端资源的占用和浪费。
第三方面,本申请提供了一种电子设备,所述电子设备为投屏发送终端,包括处理器以及存储器;其中,所述存储器和所述处理器耦合,所述存储器存储有程序指令;当所述程序指令由所述处理器执行时,使得所述电子设备执行第一方面,或者以上第一方面的任意一种实现方式中的方法的指令,或者执行第二方面,或者以上第二方面的任意一种实现方式中的方法的指令。
第四方面,本申请提供了一种计算机可读介质,用于存储计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行第一方面,或者以上第一方面的任意一种实现方式中的方法的指令,或者执行第二方面,或者以上第二方面的任意一种实现方式中的方法的指令。
第五方面,本申请提供了一种计算机程序产品,该计算机程序产品包括计算机程序,当其在电子设备上运行时,使得所述电子设备执行第一方面,或者以上第一方面的任意一种实现方式中的方法的指令,或者执行第二方面,或者以上第二方面的任意一种实现方式中的方法的指令。
第六方面,本申请提供了一种芯片,该芯片包括处理电路、收发管脚。其中,该 收发管脚、和该处理电路通过内部连接通路互相通信,该处理电路执行第一方面,或者以上第一方面的任意一种实现方式中的方法的指令,或者执行第二方面,或者以上第二方面的任意一种实现方式中的方法的指令,以控制接收管脚接收信号,以控制发送管脚发送信号。
第七方面,本申请提供一种投屏系统,该系统包括投屏发送端和投屏接收端。
示例性的,所述投屏发送端为上述第三方面涉及的电子设备。
示例性的,所述投屏接收端为电视,或其他能够接收所述投屏发送端发送的投屏信息,并投放的设备。
附图说明
图1是示例性示出的本申请实施例提供的投屏方法的流程示意图之一;
图2是示例性示出的本申请实施例提供的投屏方法的流程示意图之二;
图3是示例性示出的投屏发送端主页面的示意图;
图4是示例性示出的投屏应用发起投屏连接的示意图之一;
图5是示例性示出的投屏应用发起投屏连接的示意图之二;
图6是示例性示出的选择投屏接收端的界面示意图;
图7是示例性示出的与选择的投屏接收端建立连接的界面示意图;
图8是示例性示出的投屏连接成功后投屏应用的界面示意图;
图9是示例性示出的投屏连接成功后投屏发起端和投屏接收端的界面示意图;
图10是示例性示出的用户切换投屏发送端的音频设备的示意图之一;
图11是示例性示出的用户切换投屏发送端的音频设备的示意图之二;
图12是示例性示出的用户切换投屏发送端的音频设备的示意图之三;
图13是示例性示出的用户切换投屏发送端的音频设备的示意图之四;
图14是示例性是出的用户调整投屏发送端的耳机1为静音的示意图;
图15是示例性示出的切换本机为声音输出设备时的示意图;
图16是示例性示出的切换本机为声音输出设备后的示意图;
图17是示例性示出的切换本机为声音输出设备后投屏发送端和投屏接收端声音变化的示意图之一;
图18是示例性示出的切换本机为声音输出设备后投屏发送端和投屏接收端声音变化的示意图之二;
图19是示例性示出的断开投屏后投屏发送端和投屏接收端声音变化的示意图之一;
图20是示例性示出的断开投屏后投屏发送端和投屏接收端声音变化的示意图之二;
图21是示例性示出的由上层的音频管理模块设置投屏发送端音频状态时调用的方法示意图之一;
图22是示例性示出的由上层的音频管理模块设置投屏发送端音频状态时调用的方法示意图之二;
图23是示例性示出的由上层的音频管理模块设置投屏发送端音频状态的示意图之一;
图24是示例性示出的由上层的音频管理模块设置投屏发送端音频状态的示意图之二;
图25是示例性示出的由上层的音频管理模块设置投屏发送端音频状态的示意图之三;
图26是示例性示出的由下层的传输模块设置投屏发送端音频状态时调用的方法示意图之一;
图27是示例性示出的由下层的传输模块设置投屏发送端音频状态时调用的方法示意图之二;
图28是示例性示出的由下层的传输模块设置投屏发送端音频状态的示意图之一;
图29是示例性示出的由下层的传输模块设置投屏发送端音频状态的示意图之二;
图30是示例性示出的由下层的传输模块设置投屏发送端音频状态的示意图之三。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。
在对本申请实施例的技术方案说明之前,首先对本申请实施例提供的技术方案适用于的电子设备进行说明。
具体的说,本实施例提供的技术方案是应用于投屏发送端的,并且投屏发送端是安装有投屏应用的PC设备(下文称为PC机)。
示例性的,在本实施例中,上述所说的PC机可以是台式机,也可以是笔记本电脑。
此外,需要说明的是,在本实施例中,接收投屏发送端发送的投屏内容,例如视 频数据、图像数据、音频数据的投屏接收端可以是电视、显示屏等大屏设备。
下面对本申请实施例提供的技术方案的实现细节进行说明,以下内容仅为方便理解而提供的实现细节,并非实施本方案的必须。
示例性的,参见图1,本申请实施例的具体实现步骤包括:
步骤101,在接收到投屏连接请求后,获取所述投屏发送端当前使用的音频设备的标识号作为目标标识号,并记录到音频设备表。
步骤102,确定用户选择的声音输出设备。
步骤103,声音输出设备是否为投屏发送端。
步骤104,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放音频数据。
步骤105,将所述音频设备表中记录的所述目标标识号标识的音频设备设置为静音状态,并从所述音频设备表中记录的所述目标标识号标识的音频设备对应的声道获取所述音频数据,将所述音频数据发送至所述投屏接收端播放。
由此,本实施例提供的投屏方法,在投屏场景中通过获取投屏发送端当前使用的音频设备,并将该音频设备对应的标识号记录到音频状态表,这样在确定用户选择的声音输出设备为投屏接收端时,从该标识号标识的音频设备获取音频数据发送给投屏接收端播放,而非默认的音频设备,例如扬声器,从而保证投屏过程中,在投屏接收端为出声设备时,投屏接收端始终可以获取到音频数据进而播放出声。
此外,需要说明的是,在投屏场景中,除了会面临上述实施例中所说的投屏接收端无法获取音频数据播放出声,或者投屏发送端未从用户期望的音频设备播放音频数据的问题,还会面临投屏发送端的音频状态与用户期待的不一致的问题。为了解决这一技术问题,参见图2提出如下实现方案:
步骤201,在接收到投屏连接请求后,获取所述投屏发送端当前使用的音频设备的标识号作为目标标识号,并记录到音频设备表。
示例性的,在实际应用中,投屏应用例如可以包括投屏管理模块、音频管理模块和传输模块。
示例性的,投屏管理模块与音频管理模块进行数据交互,音频管理模块与传输模块进行数据交互。
具体到本实施例中,投屏场景中涉及的投屏连接请求、投屏断开请求、声音输出设备切换请求均是由投屏管理模块监控的。
示例性的,在一些例子中,可供投屏发送端使用的音频设备例如为投屏发送端中内置的扬声器,也可以是与投屏发送端连接的耳机(蓝牙耳机、有线耳机等)、音响设备等,此处不再一一列举,本实施例对此不做限制。
具体到本实施例中,投屏发送端当前使用的音频设备可以是上述列举的任意一种。
此外,可理解的,上述所说的用于标识音频设备的标识号例如可以是生产商为音频设备分配的序列号,或者根据预设规则分配的标识号。
示例性的,具体到本实施例中包括投屏管理模块、音频管理模块和传输模块的投屏发送端,上述所说的当前使用的音频设备的目标标识号具体可以是由音频管理模块 获取并管理的。
应当理解的是,在实际应用中,为了区分不同的音频设备,每一音频设备会有一个能够标识其唯一性的标识号,并且不同的音频设备可能对应不同的声道,即音频设备、标识号和声道之间存在表1所示的映射关系。
表1 音频设备、标识号和声道之间的映射关系表
音频设备 标识号 声道
扬声器 10001 声道1
耳机1 10002 声道2
耳机2 10003 声道3
音响1 10004 声道4
应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
为了便于说明,仍以表1记录的内容为例,假设在接收到投屏连接请求后,音频管理模块获取到投屏发送端当前使用的音频设备为扬声器,则需要记录到音频设备表中的目标标识号为10001。
相应地,若音频管理模块获取到投屏发送端当前使用的音频设备为耳机1,则需要记录到音频设备表中的目标标识号为10002。
为了更好的理解本实施例提供的技术方案,以投屏发送端为PC设备,投屏接收端为电视等大屏设备为例,结合图3至图8对发起投屏连接请求的实现过程进行说明。
参见图3,示例性的,PC设备100的显示界面显示的是PC设备100的主页面。
可理解的,在实际应用中,主页面上可以包括一个或多个控件,例如视频应用控件、社交应用控件、浏览器控件,电脑管家应用控件,此处不再一一列举,本实施例对此也不做限制。
继续参见图3,具体到本实施例的技术方案中,PC设备100的主页面上包括投屏应用控件10。
此外,在PC设备100主界面底部的工具栏中可以包括一个或多个控件,例如设置PC设备100音频状态,例如调整为静音状态或非静音状态,以及调出音量条的声音设置控件20。
需要说明的是,图3及下面的附图中所涉及的PC设备100的显示界面显示的控件的名称和数量,以及弹出的界面中的控件的名称和数量仅为示意性举例,本申请不做限定。
继续参见图3,当用户想要将PC设备100的内容投屏到电视等大屏设备时,在用户点击主页面中的投屏应用控件10后,PC设备100响应于用户的操作行为,在显示界面显示发起投屏连接的页面,如图4所示。
参见图4,示例性的,发起投屏连接的页面中可以包括一个或多个选项。例如,发起投屏连接请求的“立即连接”选项10-1,可供用户选择投屏模式的选项。
继续参见图4,可供用户选择投屏模式的选项例如包括“镜像模式”选项和“扩展模式”选项。
所谓镜像模式,是指在投屏接收端,例如电视等大屏设备的显示器上镜像显示电 脑屏幕,即PC设备100的屏幕上的内容。即,采用镜像模式建立PC设备100和大屏设备之间的投屏连接后,大屏设备的显示器显示的内容与PC设备100的屏幕显示的内容完全相同。
所谓扩展模式,是指在投屏接收端,例如电视等大屏设备的显示器上以扩展的方式显示电脑屏幕,即PC设备100的屏幕上的内容。即,采用扩展模式建立PC设备100和大屏设备之间的投屏连接后,大屏设备的显示器既显示PC设备100的屏幕显示的内容,又显示大屏设备本机的内容,类似多屏协同。
此外,需要说明的是,在实际应用中,投屏应用所要实现的功能也可以与其他功能集成到一个应用中,例如将驱动管理、电源管理等系统管理功能与投屏、多屏协同等提升用户体验的功能集成在一个应用中。
示例性的,该应用于例如可以成为“我的电脑”或者“电脑管家”等,本实施例对此不做限制。
参见图5,示例性的,当用户点击了功能列表中显示的“电脑互联”选项后,PC设备100响应于用户的操作行为,右侧的显示界面便会显示如图4所示的发起投屏连接的页面。
继续参见图4或图5,当用户选择了镜像模式后点击了“立即连接”选项10-1后,PC设备100响应于用户的操作行为,在显示界面上显示设备选择窗口10-2,如图6所示。
具体的说,设备选择窗口10-2用于显示当前可用设备,即可以作为投屏接收端的大屏设备,例如图5所示,当前可用设备有电视1、电视2和电视3。
继续参见图6,设备选择窗口10-2中还可以包括“查找其他显示设备”的选项,这样在当前显示的可用设备均不是用户要选择的设备时,用户可以通过点击“查找其他显示设备”的选项,跳转到查找其他显示设备的页面,并且PC设备100会开启搜索功能查找附件可用的大屏设备。
可理解的,在实际的应用场景中,PC设备100与大屏设备建立投屏连接的前提例如可以是通过有线连接的方式,也可以是通过无线连接的方式。
示例性的,关于无线连接的方式,例如可以是二者接入了同一WLAN网络,或者通过蓝牙匹配成功。
故而在投屏场景中PC设备100和大屏设备是采用无线方式建立连接的情况下,在用户点击了“立即连接”选项10-1后,PC设备100还需要确定本机是否开启了蓝牙或WLAN。
相应地,如果PC设备100没有开启蓝牙或WLAN,则PC设备100响应于用户的操作行为,在跳转到设备选择窗口10-2前会先开启蓝牙或WLAN,然后跳转到设备搜索界面。
相应地,在搜索操作结束后,会跳转到设备选择窗口10-2,在设备选择窗口10-2中显示搜索到的可用设备。
此外,可理解的,在实际应用中,开启蓝牙或WLAN的操作可以是由PC设备100自行完成的,也可以是跳转到开启蓝牙或WLAN的界面,有用户开启的,本实施例对此不做限制。
继续参见图6,示例性的,当用户点击了电视1的选项后,PC设备100响应于用户的操作行为,在显示界面上显示连接窗口10-3,如图7所示。
参见图7,示例性的,显示连接窗口10-3中可以包括取消选项10-4。
示例性的,当用户点击取消选项10-4时,PC设备100响应于用户的操作行为,会返回到图6所示的界面。
示例性的,当PC设备100与电视1建立投屏连接后,PC设备100的显示界面会变更为图8所示的样式。
示例性的,在投屏连接成功的显示界面中可以包括一个或多个选项。例如图8中示出的断开连接选项10-5、声音输出设备选择选项10-6、可供用户选择投屏模式的选项,例如“镜像模式”选项和“扩展模式”选项。
应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
步骤202,获取所述投屏发送端当前的音频状态作为目标音频状态,并记录到音频状态表。
具体的说,上述所说的投屏发送端的目标音频状态则是由音频管理模块获取并管理的。
需要说明的是,在本实施例中,将音频状态划分为静音状态和非静音状态。故而,上述所说的目标音频状态例如可以是静音状态,或者非静音状态。
进一步地,具体到实际应用中,为了便于机器内部快速识别,记录到音频状态表中的目标音频状态可以用预先约定的状态值(状态码)表示。
示例性的,在一些例子中,可以用“0”表示静音状态,用“1”表示非静音状态。
此外,可理解的,具体到本实施例中,在可供投屏发送端选择使用的音频设备有多个,例如表1中示出的扬声器、耳机1、耳机2和音响1时,为了准确的获知每个音频设备的音频状态,可以建立表2所示的映射关系。
表2 音频设备和音频状态之间的映射关系表
音频设备 标识号 声道 音频状态 状态值
扬声器 10001 声道1 静音状态 0
耳机1 10002 声道2 非静音状态 1
耳机2 10003 声道3 静音状态 0
音响1 10004 声道4 静音状态 0
应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
步骤203,确定用户选择的声音输出设备。
继续参见图8,当用户选择的声音输出设备为“电视1”时,确定声音输出设备为投屏接收端,即由投屏接收端出声。
相应地,当用户选择的声音输出设备为“本机”时,确定声音输出设备为投屏发送端。即由投屏发送端出声。
步骤204,声音输出设备是否为投屏发送端。
具体的说,如果确定的声音输出设备为投屏发送端,则执行步骤205的操作;否 则执行步骤206的操作。
步骤205,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据,并将所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
继续参见表1,示例性的,如果音频设备表中记录的目标标识号为“10001”,根据表1记录的映射关系可知,目标标识号标识的音频设备为扬声器,则在声音输出设备为投屏发送端时,由扬声器播放音频数据。
继续参见表2,示例性的,如果音频状态表中记录的目标音频状态的状态值为“0”,根据表2记录的映射关系可知,扬声器的目标音频状态为静音状态,则将扬声器的音频状态设置为静音状态,这样投屏发送端作为声音输出设备会被静音,即不出声,此时投屏接收端的屏幕和投屏发送端的屏幕显示相同的画面,但是两个设备都不出声。
继续参见表2,示例性的,如果音频状态表中记录的目标音频状态的状态值为“1”,根据表2记录的映射关系可知,扬声器的目标音频状态为非静音状态,则将扬声器的音频状态设置为非静音,这样投屏发送端作为声音输出设备会出声,此时投屏接收端的屏幕和投屏发送端的屏幕显示相同的画面,投屏接收端不出声。
步骤206,将所述音频设备表中记录的所述目标标识号标识的音频设备设置为静音状态,并从所述音频设备表中记录的所述目标标识号标识的音频设备对应的声道获取所述音频数据,将所述音频数据发送至所述投屏接收端播放。
需要说明的是,在声音输出设备为投屏接收端时,不论音频状态表中记录的目标音频状态是静音状态还是非静音状态,投屏发送端和投屏接收端建立投屏后,投屏发送端均不能出声,因此投屏发送端中的投屏应用需要调用设置投屏发送端声音的接口,将投屏发送端设置为静音状态,然后将音频数据通过上述所说的传输模块发送至投屏接收端,这样投屏接收端接收到音频数据后便可以播放音频数据,即投屏接收端可以出声。
此外,应当理解的是,通过上述描述可知,不同的音频设备可能对应不同的声道,而音频数据是来之投屏发送端当前使用的音频设备对应的声道的。因此,发给投屏接收端的音频数据是从音频设备表中记录的目标标识号标识的音频设备对应的声道处获取音频数据,进而将获取到的音频数据发送至投屏接收端播放。
继续参见表1,示例性的,如果音频设备表中记录的目标标识号为“10001”,根据表1记录的映射关系可知,目标标识号标识的音频设备为扬声器,而扬声器对应的声道为声道1,则在向投屏接收端发送音频数据时,具体是从声道1获取音频数据,然后将获取到的音频数据发送给投屏接收端播放。
相应地,如果音频设备表中记录的目标标识号为“10002”,根据表1记录的映射关系可知,目标标识号标识的音频设备为耳机1,而耳机1对应的声道为声道2,则在向投屏接收端发送音频数据时,具体是从声道2获取音频数据,然后将获取到的音频数据发送给投屏接收端播放。
应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
为了便于说明,本实施例以投屏发送端和投屏接收端建立投屏连接后,默认投屏 接收端为声音输出设备,即默认投屏接收端发生,则该场景如图9所示。
参见图9,示例性的,在PC设备100(投屏发送端)与电视200(投屏接收端)建立投屏连接后,如果电视200为声音输出设备,在镜像模式下,PC设备100的屏幕会显示画面30,而电视200的屏幕会显示与画面30相同的内容,例如图9中显示在电视200的屏幕中的画面30’,同时PC设备100不出声,电视200出声。
可理解的,发送给电视200的音频数据的获取过程参见上述步骤206的描述,此处不再赘述。
此外,需要说明的是,在声音输出设备为投屏接收端时,设置投屏发送端为静音状态的操作是系统实现的,而非用户修改的,因此该状态不记录在音频状态表中,故而不会对用户的操作造成干扰。
此外,可理解的,在实际应用中,传输模块发送至电视200的音频数据通常是进行音频编码处理后的音频数据包,这样既可以避免直接传输音频数据导致数据帧丢失,又可以避免音频数据直接暴露用户隐私。
此外,由于在实际应用中,使用投屏应用建立PC设备100与电视200之间的投屏连接时,PC设备100与电视200之间所遵循的协议会有所不同。因此,可以根据音频数据对应的协议类型来确定编码方式,进而采用确定的编码方式对音频数据进行编码。
具体的,传输模块在将音频数据发送至所述投屏接收端,例如上文所说的电视200时,需要先确定所述音频数据对应的协议类型;然后,根据所述协议类型确定所述音频数据的目标编码方式;接着,根据所述目标编码方式对所述音频数据进行编码,得到音频数据包;最后,将所述音频数据包发送至所述投屏接收端。
相应地,在将所述音频数据包发送至所述投屏接收端时,将所述协议类型发送至所述投屏接收端。
这样,投屏接收端,如电视200就可以知道需要采用哪种解码方式对音频数据包解码,从而保证了解码结果的准确性。
此外,需要说明的是,关于上述所说的根据所述协议类型确定所述音频数据的目标编码方式,例如可以是通过投屏发送端和投屏接收端预先协商确定的编解码映射关系表来确定,即在编解码映射关系表中查找所述协议类型对应的编码方式,进而将查找到的编码方式确定为所述目标编码方式。
这样,投屏发送端和投屏接收端之间就可以不直接传输编码方式,从而避免了二者之间传输的内容被拦截,进而保证了音频数据的内容不被不法分子窃取,特别是针对音视频会议的使用场景,有效保证了会议安全性。
此外,需要说明的是,具体到实际的应用场景中,在PC设备100与大屏设备端建立投屏连接后,即在投屏的过程中,用户可能会手动修改PC设备100使用的音频设备,或者有优先级高的音频设备接入PC设备100。因此,为了保证音频设备表中记录的目标标识号能够根据实际变化而动态更新,需要对监控PC设备100当前使用的音频设备是否发生变化。
具体到本实施例中,为了监控音频设备是否发生变化,借助了PC设备100使用的系统提供的音频设备监控模块。
具体的说,在执行完步骤201之后,PC设备100可以调用上述所说的音频设备监控模块,进而由音频设备监控模块监控PC设备100当前使用的音频设备是否发生变化。
相应地,音频设备监控模块在监控到所述投屏发送端当前使用的音频设备发生变化时,获取变化后的音频设备对应的标识号;然后将获取到标识号发送给音频管理模块,由音频管理模块根据变化后的音频设备对应的标识号更新所述音频设备表中记录的所述目标标识号。
此外,需要说明的是,在实际的应用场景中,耳机的优先级要高于扬声器和音响,即在PC设备100连接由耳机时,音频数据会优先从耳机对应的声道输出。因此,上述所说的有优先级高的音频设备接入PC设备100例如可以是在PC设备100当前使用的音频设备是扬声器时,有蓝牙耳机或者有线耳机与PC设备100建立了连接。
为了便于说明,上述音频设备监控模块对音频设备变化的监控,以及音频管理模块对目标标识号的更新,以下结合图10至图13进行说明。
参见图10,示例性的,在投屏过程中,如果用户想要将PC设备100当前使用的音频设备从扬声器切换为耳机1,用户可以先点击声音设置控件20。
相应地,在用户点击声音设置控件20后,PC设备100响应于用户的操作行为,会显示声音设置窗口20-1,如图11所示。
继续参见图11,示例性的,声音设置窗口20-1中显示了音频设备选择控件20-2、当前使用的音频设备,例如扬声器,以及对应于扬声器的音频状态切换控件20-3和调节音量的音量条控件20-4。
继续参见图11,当用户点击了音频设备选择控件20-2后,PC设备100响应于用户的操作行为,会显示选择播放设备的列表,如图12所示。
参见图12,示例性的,选择播放设备的列表中会显示可供PC设备100选择的所有音频设备,例如图12中的耳机1和扬声器。
继续参见图12,当用户点击了耳机1的选项后,PC设备100响应于用户的操作行为,PC设备100会将当前使用的音频设备从扬声器切换为耳机1,切换后的声音设置窗口20-1显示的内容如图13所示。
可理解的是,图10至图13所示的实现方式中,扬声器和耳机1共用一个音频状态切换控件20-3和调节音量的音量条控件20-4。
具体的,对于这种情况,在PC设备100当前使用的音频设备为扬声器时,对音频状态切换控件20-3和调节音量的音量条控件20-4的操作,实质是调整的扬声器的音频状态和音量。
相应地,在PC设备100当前使用的音频设备为耳机1时,对音频状态切换控件20-3和调节音量的音量条控件20-4的操作,实质是调整的耳机1的音频状态和音量。
可理解的,对于这种方式的实现,在一些例子中可以通过维护音频状态切换控件20-3当前的音频状态、音量条控件20-4当前的音量值与当前使用的音频设备之间的映射关系,进而在监测到音频设备发生变化时,根据变化调整音频状态切换控件20-3对应显示的音频状态,音量条控件20-4对应显示的音量值。
此外,可以理解的,在另一些实现场景中,可以根据PC设备100可以选择的音频设备的数量设置分别对应于音频状态切换控件20-3和调节音量的音量条控件20-4,这样在音频设备发生变化时,便可以由各自对应的音频状态切换控件20-3和调节音量的音量条控件20-4来设置音频状态和音量值。
应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
此外,需要说明的是,具体到实际的应用场景中,在PC设备100与大屏设备端建立投屏连接后,即在投屏的过程中,用户还可能会手动修改PC设备100当前使用的音频设备的音频状态,因此为了保证音频状态表中记录的目标音频状态的状态值能够根据用户实际修改动态更新,需要对音频状态切换控件进行监控。
具体到本实施例中,为了监控用户是否对PC设备100当前使用音频设备对应的音频状态切换控件进行了点击,借助了PC设备100使用的系统提供的音频状态监控模块。
具体的说,在执行完上述步骤202之后,PC设备100可以调用上述所说的音频状态监控模块,进而由音频状态监控模块监控用户对PC设备100当前使用音频设备对应的音频状态切换控件的点击操作。
需要说明的是,在所述音频状态切换控件对应的音频状态为上述所说的静音状态时,所述音频状态切换控件被点击后,所述音频状态从所述静音状态切换为上述所说的非静音状态。
相应地,在所述音频状态切换控件对应的音频状态为所述非静音状态时,所述音频状态切换控件被点击后,所述音频状态从所述非静音状态切换为所述静音状态。
由此,借助音频状态监控模块对音频状态切换控件的点击操作进行监控,在监控到用户对所述目标标识号标识的音频设备对应的音频状态切换控件的点击操作后,根据切换后的所述音频状态更新所述音频状态表中记录的所述目标音频状态即可。
例如,在投屏连接前PC设备100当前使用的音频设备为扬声器,扬声器的目标音频状态对应的状态值为“0”时,当投屏连接后,如果音频设备没有发生变化,则在监听到用户对音频状态切换控件进行点击后,扬声器的音频状态会变更为非静音状态,此时对音频状态表的更新例如为将记录的对应于扬声器的状态值从“0”变更为“1”。
相应地,在投屏连接前PC设备100当前使用的音频设备为扬声器,扬声器的目标音频状态对应的状态值为“0”时,当投屏连接后,如果音频设备发生变化,变更为耳机,并且耳机的目标音频状态对应的状态值为“1”,则在监听到用户对音频状态切换控件进行点击后,耳机的音频状态会变更为静音状态,此时对音频状态表的更新例如为将记录的对应于耳机的状态值从“1”变更为“0”。
为了更好的理解对PC设备100当前使用的音频设备的音频状态的修改,以下以投屏过程中PC设备使用的音频设备为耳机1为例进行说明。
继续参见图13,示例性的,在投屏过程中,如果用户想要修改耳机1的音频状态(修改前为非静音状态),用户可以点击音频状态切换控件20-3。
相应地,音频状态监控模块监听到该点击操作,PC设备100响应于用户的操作行为,音频状态切换控件20-3的图标样式从图13所示的样式变为图14中音频状态切换控件20-3 的图标样式,声音设置控件20的图标样式也会从图13所示的样式变为图14中声音设置控件20的图标样式。即,表明耳机1的目标音频状态从非静音状态变为了静音状态,此时会将音频状态表中记录的对应于耳机1的状态值从表示非静音状态的“1”变更为表示静音状态的“0”。
这样,便可以使音频状态表中记录的投屏发送端当前使用的音频设备的目标音频状态能够根据用户的实际操作进行变更,进而保证断开投屏或者将声音输出设备变更为投屏发送端时根据音频状态表中记录的当前使用的音频设备的目标音频状态设置的音频状态与用户实际想要设置的音频状态相一致。
具体到实际应用中,根据音频状态表中记录的对应于当前使用的音频设备的目标音频状态对PC设备100当前使用的音频设备的音频状态的设置,例如可以是分为将声音输出设备切换为PC设备100的场景和断开投屏连接的场景。
示例性的,关于将声音输出设备切换为PC设备100的场景,实现流程例如步骤207和步骤208所示。
步骤207,在用户将声音输出设备从所述投屏接收端变更为所述投屏发送端后,读取所述音频状态表中记录的所述目标音频状态。
步骤208,将所述投屏发送端中所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
参见图15,示例性的,用户点击声音输出设备选择选项10-6后,PC设备100响应于用户的操作行为,会显示声音输出设备选择控件10-7。
示例性的,在一些例子中,例如音频数据要么由投屏发送端播放,要么由投屏接收端播放的场景下,声音输出设备选择控件10-7中可以包括当前连接的投屏接收端,例如图15中的电视1,以及投屏发送端,例如图15中的本机。
示例性的,在另一些例子中,例如音频数据还可以由其他第三方音频设备,例如音响播放的场景下,声音输出设备选择控件10-7中除了可以包括图15中示出的电视1、本机,还可以包括可用的第三方音频设备。
继续参见图15,如果用户选择了声音输出设备选择控件10-7中显示的本机选项,则声音输出设备会从由电视1出声切换为由PC设备100本机出声,PC设备100响应于用户的操作行为,声音输出设备选项10-6中显示的内容会从图15中的电视1变更为图16中的本机。
对于现有的方案,即未采用本实施例提供的投屏方法的方案中,在用户将声音输出设备从电视200切换为由PC设备100后,不论投屏过程中用户是否对PC设备当前使用的音频设备的音频状态进行了修改,投屏过程中PC设备100均会出声,而电视200则不出声。
例如图17所示,声音设置选项20显示PC设备100当前使用的音频设备,例如耳机1的音频状态为静音状态,但是在PC设备100是声音输出设备的场景下,在现有的实现方案中,PC设备100可能会通过默认的扬声器播放音频数据,即依旧会发出声音。
由此可见,现有的方案在投屏过程中,当将声音输出设备从电视200切换为PC设备100后,PC设备100用来播放音频数据的音频设备,不仅与用户期望的不一致,并且音频状态也与用户期望的不一致。
具体到本实施例提供的技术方案,由于音频设备表中记录的目标标识号和音频状态表中的目标音频状态会根据用户的操作实时更新,并且投屏过程中声音输出设备在从电视200切换到PC设备100后,是由音频设备表中记录的目标标识号对应的音频设备来播放音频数据,并且播放音频数据的音频设备的音频状态是与音频状态表中记录的目标音频状态来相一致的,这样声音输出设备从电视200切换为PC设备100后,PC设备100播放音频数据的音频设备,以及播放音频数据的音频设备的音频状态能够与用户期望的相一致,从而解决了现有方案音频设备、音频状态不一致的问题。
示例性的,假设音频设备表中记录的目标标识号为耳机1的标识号,参见图18,声音设置选项20显示PC设备100的音频状态即为耳机1的音频状态。
继续参见图18,示例性的,耳机1的音频状态为静音状态,采用本实施例提供的技术方案,在PC设备100是声音输出设备的场景下,PC设备100作为声音输出设备不会出声,而是处于静音状态,即在这种场景下,PC设备100和电视200都只显示画面,不出声。
由此,基于本实施例提供的技术方案,在声音输出设备从电视200切换为PC设备100后,PC设备100播放音频数据的音频设备,以及播放音频数据的音频设备的音频状态能够与用户期望的相一致,从而解决了现有方案音频设备、音频状态不一致的问题。
关于上述所说的断开投屏连接的场景,实现流程例如可以是:投屏管理模块在接收到投屏断开请求后通知音频管理模块读取音频设备表中记录的目标标识号和音频状态表中记录的对应于目标标识号对应的音频设备的目标音频状态,然后将所述投屏发送端中所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
继续参见图16,示例性的,用户点击断开连接选项10-5后,PC设备100响应于用户的操作行为,PC设备100便会与电视200断开投屏连接。
可理解的,由于断开投屏后,PC设备100提供的投屏信息不会在通过传输模块发送给电视200,因此电视200的屏幕不会在显示PC设备100屏幕显示的内容,同时电视200也不会播放PC设备100提供的音频数据。
对于现有的方案,即未采用本实施例提供的投屏方法的方案中,在用户点击了断开连接选项10-5后,不论投屏过程中用户是否对PC设备100当前使用的音频设备的音频状态进行了修改,断开投屏后,系统会直接设置PC设备100默认的音频设备,例如扬声器出声,而电视200则不出声。
例如图19所示,声音设置选项20显示PC设备100当前使用的音频设备为耳机1的音频状态,并且音频状态为静音状态,在与电视200断开投屏后,由于系统不知道投屏过程中用户将当前使用的音频设备从扬声器变更为了耳机1,并且修改了耳机1的音频状态,因此PC设备100会控制扬声器播放音频数据,并且依旧会发出声音,显然现有的方案会造成PC设备100播放音频数据的音频设备和音频状态与用户期望的不一致。
具体到本实施例提供的技术方案,由于音频设备表中记录的目标标识号和音频状态表中记录的对应于目标标识号的目标音频状态会根据用户的操作实时更新,并且断开投屏后,是由音频设备表中记录的目标标识号对应的音频设备来播放音频数据,并且播放音频数据的音频设备的音频状态是与音频状态表中记录的目标音频状态来相一致的,这样声音 输出设备从电视200切换为PC设备100后,PC设备100播放音频数据的音频设备,以及播放音频数据的音频设备的音频状态能够与用户期望的相一致,从而解决了现有方案音频设备、音频状态不一致的问题。
示例性的,假设音频设备表中记录的目标标识号为耳机1的标识号,参见图20,声音设置选项20显示PC设备100的音频状态即为耳机1的音频状态。
继续参见图20,示例性的,耳机1的音频状态为静音状态,采用本实施例提供的技术方案,在PC设备100断开与电视200之间的投屏连接后,耳机1的音频状态会设置为音频状态表中记录的目标音频状态,即静音状态,在这种场景下,PC设备100只显示画面,不出声,而电视200则既不现实PC设备100的屏幕显示的画面,也不出声。
此外,需要说明的是,由于投屏过程中音频设备监控模块一致在监听音频设备是否发生变化,音频状态监控模块一直在监听用户对当前使用的音频设备对应的音频状态切换控件的点击操作,因此在投屏结束后,即断开投屏后,需要关闭音频设备监控模块和音频状态监控模块,即停止继续监控音频设备是否发生变化,以及停止继续监控音频状态的变化,从而避免对PC设备100资源的占用和浪费。
由此,在建立投屏连接前先获取PC设备100当前使用的音频设备,并将当前使用的音频设备的标识号作为目标标识号记录到音频设备表,同时获取当前的音频状态,并将当前的音频状态作为目标音频状态,将该目标音频状态对应的状态值记录到音频状态表中,从而可以获知用户在投屏过程中,期望PC设备100的哪个音频设备处预哪种音频状态,进而使得后续断开投屏,或者采用PC设备100作为声音输出设备时,PC设备100能够由用户期望的音频设备播放音频数据,并且播放音频数据的音频设备的音频状态能够与用户期望的相一致。
此外,通过将PC设备100当前使用的音频设备的标识号作为目标标识号记录到音频设备表,从而可以在投屏过程中,当声音输出设备为投屏接收端,即电视200时,PC设备100能够从音频设备表中记录的目标标识标识的音频设备对应的声道获取音频数据发送给电视200,进而保证了投屏过程中,无论用户如何切换投屏发送端使用的音频设备,作为声音输出设备的电视2均能得到可以播放的音频数据,进而播放出声音。
此外,需要说明的是,在实际应用中,如果用户点击了调节音量的音量条控件20-4,PC设备响应于用户的操作行为,会改变输出的音频数据的音量大小,这样如果在声音输出设备为大屏设备时,由于从PC设备接收到的音频数据是根据调节后音量编码得到的,因此大屏设备播放的音频数据会与音量条控件20-4调节后的音量同步,例如在用户是通过音量条控件20-4将音量调高时,大屏设备播放的音频数据的音量也会调高,在用户是通过音量条控件20-4将音量调低时,大屏设备播放的音频数据的音量也会调低。
此外,具体到实际应用中,本实施例提供的技术方案可以通过两种实现方式实现。
方式1.1:投屏过程中通过由音频管理模块来设置投屏发送端的音频状态。
参见图21,示例性的,为了更好的理解本实施例提供的技术方案,以投屏前PC机先静音,然后播放音频进行投屏(首次连接投屏时大屏设备,如图21中的电视1出声), 之后切换声音到本机,即切换到PC机,然后切换回电视1,最后断开投屏连接的场景进行说明。
继续参见图21,示例性的,在用户点击进行投屏时,上层投屏管理模块(例如可以称为MultiCastMgr)通过音量控制应用提供的初始接口/方法,例如audioContol.Init()方法通知音频管理模块(例如可以称为AudioControl);然后音频管理模块通过用于获取当前使用的音频设备的标识号,并将该标识号保存为初始值的方法,如SaveMuteState()获取当前使用的音频设备的标识号,并将该标识号保存为初始值,同时调用用于设置当前使用的音频设备静音的方法,如SetDeviceMute()设置当前使用的音频设备静音,例如在当前使用的音频设备为扬声器时,设置扬声器静音,在当前使用的音频设备为耳机1时,设置耳机1静音,之后调用用于监控音频送设备是否变化方法,如ListenDeviceChange()。
需要说明的是,在实际应用中,音频模块调用SetDeviceMute()设置当前使用的音频设备静音的操作和调用ListenDeviceChange()开启监控PC使用的音频设备是否发生变化的操作不区分执行顺序。
继续参见图21,示例性的,在执行上述操作的过程中,产品上层会通知对应的协议层,即传输模块声音输出设备为大屏(电视1),此时传输模块收到上层通知后通过用于获取当前使用的音频设备的方法,如audioService()获取当前使用的音频设备。
相应地,音频管理模块响应于audioService()的请求,会将音频设备表中记录的目标标识号标识的音频设备对应的声道信息通过传输设备音频模式的方法,如DeviceVoiceMode()发送给传输模块。
相应地,传输模块收到音频管理模块发送的声道信息后,会从该声道信息指向的声道获取音频数据,并通过用于对音频数据进行音频编解的方法,如SpeakerENcoder()将获取到的音频数据进行音频编解,然后打包发送给电视1,使得电视1对音频解码后出声。
继续参见图21,示例性的,当切换声音到本机时,上层投屏管理模块通过audioContol.Init()方法通知音频管理模块,产品上层通知传输模块不将音频编解并打包发送到电视1,即停止编码,并调用停止播放的方法,如Audiostop(),这样电视1接收不到音频数据包,就无法解码获得音频数据进行播放,故而电视1会静音。
同时音频管理模块使用方法用于查询PC机当前使用的音频设备的方法,如HAudioDevice()查询PC机当前使用的音频设备,即通过查询音频设备表中记录的目标标识号确定。
相应地,在音频设备为扬声器时,通过SetDeviceMute()设置扬声器出声;在音频设备为耳机1时,通过SetDeviceMute()设置耳机1出声。
接着,在从本机出声切换回大屏出声时,实现流程与首次连接投屏时默认大屏出声时执行的流程类似,只是不需要重新调用ListenDeviceChange()。
继续参见图21,示例性的,当断开投屏连接时,音频管理模块通过断开连接的方法,如Devicestop()通知传输模块断开与电视1之间的投屏连接,同时通过用于关闭监控PC机的音频设备是否发生变化的音频设备监控模块,如StopNotifyDeviceChange()关闭监控PC机的音频设备是否发生变化的音频设备监控模块。同时音频管理模块使用HAudioDevice()查询PC机当前使用的音频设备。
相应地,在音频设备为扬声器时,通过SetDeviceMute()设置扬声器出声;在音频设备为耳机1时,通过SetDeviceMute()设置耳机1出声。
此外,音频管理模块还会通知传输模块不将音频编解并打包发送到电视1,即停止编码,并调用Audiostop()这样电视1接收不到音频数据包,就无法解码获得音频数据进行播放,故而电视1会静音。
此外,可以理解的,在投屏过程中,ListenDeviceChange()会一致处于运行中,并在监控到音频设备发生变化时,将变化后的音频设备的标识号发送给音频管理模块对音频设备表中的目标标识号进行更新。
方式1.2:投屏过程中通过由音频管理模块根据音频状态监控模块监控到的音频状态来设置投屏发送端的音频状态。
参见图22,示例性的,在用户点击进行投屏时,上层投屏管理模块通过audioContol.Init()方法通知音频管理模块;然后音频管理模块通过SaveMuteState()获取当前使用的音频设备的标识号和当前使用的音频设备的音频状态,并将当前使用的音频设备的标识号和音频状态保存为初始值,同时调用SetDeviceMute()设置当前使用的音频设备静音,例如在当前使用的音频设备为扬声器时,设置扬声器静音,在当前使用的音频设备为耳机1时,设置耳机1静音,之后开启监控音频送设备是否变化的ListenDeviceChange()和监控当前使用的音频设备的音频状态是否发生变化的方法,如ListenVolChange()。
需要说明的是,在实际应用中,音频模块调用SetDeviceMute()设置当前使用的音频设备静音的操作、调用ListenDeviceChange()开启监控PC使用的音频设备是否发生变化的操作,以及调用ListenVolChange()监控当前使用的音频设备的音频状态是否发生变化的操作不区分执行顺序。
继续参见图22,示例性的,在执行上述操作的过程中,产品上层会通知对应的协议层,即传输模块声音输出设备为大屏(电视1),此时传输模块收到上层通知后通过audioService()获取当前使用的音频设备。
相应地,音频管理模块响应于audioService()的请求,会将音频设备表中记录的目标标识号标识的音频设备对应的声道信息通过DeviceVoiceMode()发送给传输模块。
相应地,传输模块收到音频管理模块发送的声道信息后,会从该声道信息指向的声道获取音频数据,并通过SpeakerENcoder()将获取到的音频数据进行音频编解,然后打包发送给电视1,使得电视1对音频解码后出声。
继续参见图22,示例性的,当切换声音到本机时,上层投屏管理模块通过audioContol.Init()方法通知音频管理模块,产品上层通知传输模块不将音频编解并打包发送到电视1,即停止编码,并调用Audiostop(),这样电视1接收不到音频数据包,就无法解码获得音频数据进行播放,故而电视1会静音。
同时音频管理模块使用方法HAudioDevice()查询PC机当前使用的音频设备和该音频设备的音频状态,即通过查询音频设备表中记录的目标标识号确定,通过查询音频状态表中记录的音频设备对应的音频状态确定。
相应地,在音频设备为扬声器,且音频状态为非静音状态时,通过SetDeviceMute()设置扬声器出声;在音频设备为扬声器,且音频状态为静音状态时,通过SetDeviceMute()设置扬声器静音。
相应地,在音频设备为耳机1时,且音频状态为非静音状态时,通过SetDeviceMute()设置耳机1出声;在音频设备为耳机1时,且音频状态为静音状态时,通过SetDeviceMute()设置耳机1静音。
接着,在从本机出声切换回大屏出声时,实现流程与首次连接投屏时默认大屏出声时执行的流程类似,只是不需要重新调用ListenDeviceChange()和ListenVolChange()。
继续参见图22,示例性的,当断开投屏连接时,音频管理模块通过Devicestop()通知传输模块断开与电视1之间的投屏连接,同时通过StopNotifyDeviceChange()关闭监控PC机的音频设备是否发生变化的音频设备监控模块,通过StopNotifyVolChange()关闭监控音频状态是否发生变化的音频状态监控模块。同时音频管理模块使用HAudioDevice()查询PC机当前使用的音频设备和该音频设备对应的音频状态。
相应地,在音频设备为扬声器,且音频状态为非静音状态时,通过SetDeviceMute()设置扬声器出声;在音频设备为扬声器,且音频状态为静音状态时,通过SetDeviceMute()设置扬声器静音。
相应地,在音频设备为耳机1时,且音频状态为非静音状态时,通过SetDeviceMute()设置耳机1出声;在音频设备为耳机1时,且音频状态为静音状态时,通过SetDeviceMute()设置耳机1静音。
此外,音频管理模块还会通知传输模块不将音频编解并打包发送到电视1,即停止编码,并调用Audiostop()这样电视1接收不到音频数据包,就无法解码获得音频数据进行播放,故而电视1会静音。
此外,可以理解的,在投屏过程中,ListenDeviceChange()和ListenVolChange()会一致处于运行中,并在监控到音频设备发生变化时,将变化后的音频设备的标识号发送给音频管理模块对音频设备表中的目标标识号进行更新。
继续参见图22,示例性的,如果在投屏过程中,ListenDeviceChange()监控到PC机当前使用的音频设备发生了变化,则将切换后的音频设备的标识号,例如deviceId发送给音频管理模块,由音频管理模块通过SaveMuteState()修改音频设备表中记录的目标标识号。同时,将切换后的音频设备的标识号deviceId作为查询参数,通过FindDeviceMuteState()查询音频状态监控模块监测到的该标识号deviceId对应的音频设备的音频状态,并在查询到音频状态后,通过VolChagestate()发送给音频管理模块。
为了更好的理解图21和22中示出的三种场景下基于本实施例提供的技术方案实现的投屏处理,以下以图22所示的投屏场景中会同时启动音频设备监控模块和音频状态监控模块为例,结合图23至图25进行详细说明。
参见图23,示例性的,将投屏发送端称为PC机,将投屏接收端称为电视1。
其中,PC机安装有投屏应用,投屏应用包括投屏管理模块、音频管理模块和传输模块。
此外,PC机使用的系统提供有音频状态监控模块。
假设PC机和电视1首次建立投屏连接时,声音输出设备默认为电视1,即由电视1出声。
继续参见图23,示例性的,在有用户点击图4或图5中的“立即连接”选项10-1时,投屏管理模块会接收到向电视1投屏的投屏连接请求,即步骤301。
接着,投屏管理模块会执行步骤302,向音频管理模块发送初始化指令。
相应地,音频管理模块在接收到投屏管理模块发送的初始化指令后,会执行步骤303进行初始化操作,例如通过调用audioContol.Init()接口实现初始化。
接着,音频管理模块在初始化后,会获取本机当前使用的音频设备,以及该音频设备的音频状态。
具体到实际应用中,音频管理模块获取本机当前使用的音频设备,以及该音频设备的音频状态的操作可以是通过预先编译好的程序接口实现。
示例性的,在本实施例中,将该程序接口称为SaveMuteState()。
音频管理模块通过调用SaveMuteState()便可以获取到PC机当前使用的音频设备,以及该音频设备的音频状态。
相应地,如果音频管理模块通过步骤304获取到的当前使用的音频设备为扬声器,并且扬声器的音频状态为静音状态,紧接着会执行步骤305,具体为将步骤304中获取到的扬声器的标识号和扬声器的音频状态,静音状态对应的状态值,如“0”建立映射关系,以便后续使用。
此外,可理解的,在实际应用中还需要将获取到的扬声器的标识号记录到音频设备表,将扬声器对应的音频状态的状态值记录到音频状态表。
之后,音频管理模块会向音频设备监控模块发送监控本机选择的音频设备的请求,即执行步骤306;同时向音频状态监控模块发送监控本机音频状态的请求,即执行步骤307。
具体到本实施例中,调用音频设备监控模块开启监控音频是否是否变化的操作,例如是通过预先编译的ListenDeviceChange()接口;调用音频状态监控模块开启监控PC机的音频状态的操作,例如是通过调用预先编译的ListenVolChange()接口。
示例性的,音频状态监控模块启动后,在整个投屏过程中,即断开投屏前会一致执行步骤308的操作监控音频状态是否变化;音频设备监控模块启动后,在整个投屏过程中,即断开投屏前会一致执行步骤309的操作监控音频设备是否变化。
相应地,如果监听到音频状态发生变化,则执行步骤310,否则继续执行步骤308;如果监听到音频设备发生变化,则执行步骤311,否则继续执行步骤309。
示例性的,由于图23示出的场景中,在音频设备发生变化前,PC机使用的音频设备为扬声器,扬声器的目标音频状态为静音状态,因此音频状态监控模块监听到音频状态发生变化时,是用户点击了音频状态切换控件,使得扬声器的音频状态变更为非静音状态,因此步骤310具体是向音频管理模块发送非静音状态对应的状态值,例如“1”。
接着,音频管理模块根据接收到的非静音状态对应的状态值“1”对音频状态表中记录的目标音频状态的状态值进行更新,同时将于目标标识码之间的映射关系中的状态值进行更新,具体为将状态值从0更新为1,即执行步骤311。
继续参见图23,如果在投屏过程中,监测到了音频设备发声变化,例如从扬声器变更为耳机1,则会向音频管理模块发送耳机1的标识号,即执行步骤312。
接着,音频管理模块会建立耳机1的标识号与耳机1的音频状态对应的状态值,例如0之间的映射关系,即执行步骤313。
同时,音频管理模块还会通知传输模块声音输出设备为电视1,并通过设置音频状态的接口,例如称为SetDeviceMute(),设置本机当前使用的音频设备,例如耳机1为静音,即执行步骤314将本机设置为静音状态。
需要说明的是,在实际应用中,步骤314的操作可以在音频管理模块执行完步骤303后,与步骤304同步执行,本实施例对此不做限制。
接着,在完成上述步骤314的操作后,音频管理模块会从耳机1对应的声道获取音频数据,即执行步骤315,并将音频数据发送给传输模块,即执行步骤316。
相应地,传输模块接收到音频数据后,会采用上述步骤实施例所说的方式对音频数据进行编码,进而得到音频数据包,即执行步骤317。
接着,传输模块会将得到的音频数据包通过建立的投屏链路发送至电视1,即执行步骤318。
相应地,电视1在接收到传输模块发送的音频数据包后会执行步骤319对音频数据包进行解码操作,进而还原出音频数据,并播放音频数据,实现电视1出声。
由此,实现了PC机先静音,然后播放视频后进行投屏,由电视1出声,并在投屏过程中由音频管理模块通过对音频设备的监控和对应的音频状态的监控,实行对音频设备表中记录的目标标识号和音频状态表中记录的对应于目标标识号的音频设备的音频状态的状态值进行动态更新,这样既不影响用户使用投屏功能,又能够实时监控用户在投屏过程中对PC机使用的音频设备和音频设备的音频状态的修改,从而能够从当前使用的音频设备对应的声道获取到音频数据发给电视1,使得声音输出设备为电视1时,电视1始终能够获取到可以播放的音频数据。
进一步地,在PC机的投屏信息发送到电视1,电视1开始播放画面,并播放音频数据后,如果用户将声音输出设备由电视1切换为了PC机,则对PC机音频状态的设置过程可以参见图24。
示例性的,如果投屏管理模块监听到用户切换声音输出设备的操作,并确定声音输出设备切换为本机,即步骤320的操作后,投屏管理模块会向音频管理模块重新发送初始化指令,即执行步骤321。
相应地,音频管理模块在接收到投屏管理模块发送的初始化指令后,会执行步骤322进行初始化操作,例如通过调用audioContol.Init()接口实现初始化。
接着,音频管理模块在初始化后,会从从音频设备表中读取记录的目标标识号,并从音频状态表中读取记录的对应于目标标识号的目标音频状态的状态值。
具体到实际应用中,可以是从音频设备和状态值之间的映射关系表中获取目标标识号和状态值。
示例性的,以音频设备表中记录的目标标识号对应的音频设备是耳机1,音频状态表中记录的对应于耳机1的状态值为“1”,则音频管理模块在初始化后,即根据映射关系确定音频设备为耳机1,音频状态的状态值为“1”为例,即步骤323的内容。
接着,音频管理模块根据读取出的状态值“1”将本机设置为非静音状态,即执行步骤324的操作,然后执行步骤325的操作播放音频数据。
具体的,由于确定的PC机当前使用的音频设备为耳机1,故而步骤324中是将耳机1的音频状态设置为非静音状态,步骤325中是由耳机1播放音频数据。
示例性的,如果音频状态表中记录的耳机1的音频状态的状态值为“0”,即投屏前或投屏过程中用户将PC机的耳机1的音频状态修改为了静音状态,则音频管理模块在初始化后,从在当前使用的音频设备依旧是耳机1时,从音频状态表中读取记录的音频状态的状态值为“0”。
相应地,音频管理模块在从音频状态表中读取出状态值“0”后,会根据读取出的状态值“0”将耳机1设置为静音状态,然后播放音频数据。
可理解的,由于耳机1的音频状态被设置成了静音状态,因此即便音频数据是由耳机1播放,但是由于耳机1的音频状态是静音状态,故而播放音频数据的过程中也不会发出声音。
此外,需要说明的是,虽然在图24中未示出音频状态监控模块执行的操作和音频设备监控模块执行的操作,但是音频状态监控模块和音频设备监控模块被启动后,在整个投屏过程中始终是处于工作状态,即在执行步骤320至步骤325的过程中,只要用户修改了音频状态和音频设备图23中步骤308至步骤313的操作就会执行。
此外,由于图24所示的投屏场景是用户将声音输出设备由电视1切换为了PC机,因此传输模块不会在向电视1发送音频数据包,电视1接收不到音频数据包,也就不会发出声音。
此外,可理解的,由于本实施例提供的技术方案是针对投屏场景中音频数据的,因此关于视频数据的发送并未在图中示出。
由此,实现了投屏过程中将声音输出设备由电视1切换为PC机,然后由音频管理模块根据音频设备表中记录的目标标识号和音频状态表中记录的对应于目标标识号的状态值设置PC机音频状态的过程,从而使得声音输出设备修改为PC机后,PC机播放音频数据的音频设备,以及播放音频数据的音频设备的音频状态能够与用户期望的一致。
进一步地,在完成图24的操作,PC机开始播放音频数据,电视1继续播放画面/视频数据后,如果用户点击了图8中的断开连接选项10-5,则对PC机音频状态的设置过程可以参见图25。
示例性的,如果投屏管理模块接收到投屏断开请求,即步骤326的操作,投屏管理模块会向音频管理模块重新发送初始化指令,即执行步骤327。
相应地,音频管理模块在接收到投屏管理模块发送的初始化指令后,会执行步骤328进行初始化操作,例如通过调用audioContol.Init()接口实现初始化。
接着,音频管理模块在初始化后,会从从音频设备表中读取记录的目标标识号,并从音频状态表中读取记录的对应于目标标识号的目标音频状态的状态值。
具体到实际应用中,可以是从音频设备和状态值之间的映射关系表中获取目标标识号和状态值。
示例性的,以音频设备表中记录的目标标识号对应的音频设备是耳机1,音频状态表中记录的对应于耳机1的状态值为“1”,则音频管理模块在初始化后,即根据映射关系确定音频设备为耳机1,音频状态的状态值为“1”为例,即步骤329的内容。
接着,音频管理模块根据读取出的状态值“1”将本机设置为非静音状态,即执行步骤330的操作,然后执行步骤331的操作播放音频数据。
具体的,由于确定的PC机当前使用的音频设备为耳机1,故而步骤330中是将耳机1的音频状态设置为非静音状态,步骤331中是由耳机1播放音频数据。
示例性的,如果音频状态表中记录的耳机1的音频状态的状态值为“0”,即投屏前或投屏过程中用户将PC机的耳机1的音频状态修改为了静音状态,则音频管理模块在初始化后,从在当前使用的音频设备依旧是耳机1时,从音频状态表中读取记录的音频状态的状态值为“0”。
相应地,音频管理模块在从音频状态表中读取出状态值“0”后,会根据读取出的状态值“0”将耳机1设置为静音状态,然后播放音频数据。
可理解的,由于耳机1的音频状态被设置成了静音状态,因此即便音频数据是由耳机1播放,但是由于耳机1的音频状态是静音状态,故而播放音频数据的过程中也不会发出声音。
此外,在断开投屏后,音频管理模块还会向音频状态监控模块发送停止监控本机音频状态的请求,即执行步骤332;向音频设备监控模块发送停止监控本机选择的音频设备的请求,即执行步骤334。
相应地,音频状态监控模块在接收到音频管理模块发送的停止监控本机音频状态的请求后,会执行步骤333的操作,停止监听本机的音频状态。
同理,音频设备监控模块在接收到音频管理模块发送的停止监控本机选择的音频设备的请求后,会执行步骤335的操作,停止监听本机选择的音频设备。
示例性的,音频状态监控模块例如可以调用预先封装的StopNotifyVolChange()接口,从而停止监听本机的音频状态;音频设备监控模块例如可以调用预先封装的StopNotifyDeviceChange()接口。
由此,本申请提供的投屏方案,在投屏过程中通过由音频管理模块根据音频状态表和音频设备表中记录的内容来设置投屏发送端的音频状态,这样不管投屏应用采用的是哪种协议,音频管理模块只需采用统一的方式进行设置即可,大大减小了开发工作量和维护难。
方式2.1:投屏过程中通过由传输模块来设置投屏发送端的音频状态。
参见图26,示例性的,为了更好的理解本实施例提供的技术方案,以投屏前PC机先静音,然后播放音频进行投屏(首次连接投屏时大屏设备,如图26中的电视1出声),之后切换声音到本机,即切换到PC机,然后切换回电视1,最后断开投屏连接的场景进行说明。
继续参见图26,示例性的,在用户点击进行投屏时,上层投屏管理模块(例如可以称为MultiCastMgr)通过audioContol.Init()方法通知音频管理模块(例如可以称为AudioControl);然后音频管理模块通过SaveMuteState()获取当前使用的音频设备的标识号,并将该标识号保存为初始值,同时开启监控音频送设备是否变化的ListenDeviceChange()。
继续参见图26,在PC机与电视1建立投屏连接后,音频管理模块会调用DeviceVoiceMode()将通过SaveMuteState()获取到的当前使用的音频设备对应的声道信息发送给对应的协议层,即传输模块声音输出设备为大屏(电视1)。
相应地,传输模块收到音频管理模块发送的声道信息后,会从该声道信息指向的声道获取音频数据,并通过SpeakerENcoder()将获取到的音频数据进行音频编解,然后打包发送给电视1,使得电视1对音频解码后出声。同时,传输模块会调用HAudioDevice()查询音频管理模块中记录的当前使用的音频设备。
相应地,音频管理模块会将查询到的音频设备的标识号,即deviceId发送给传输模块,由传输模块调用SetDeviceMute()设置deviceId标识的音频设备静音,例如在当前使用的音频设备为扬声器时,设置扬声器静音,在deviceId标识的音频设备为耳机1时,设置耳机1静音。
继续参见图26,示例性的,当切换声音为本机时,上层投屏管理模块通过audioContol.Init()方法通知音频管理模块,产品上层通知传输模块不将音频编解并打包发送到电视1,即停止编码,并调用Audiostop()这样电视1接收不到音频数据包,就无法解码获得音频数据进行播放,故而电视1会静音。
相应地,传输模块在接收到上层的通知后,会调用HAudioDevice()查询音频管理模块中记录的当前使用的音频设备。
相应地,音频管理模块会将查询到的音频设备的标识号,即deviceId发送给传输模块,由传输模块调用SetDeviceMute()设置deviceId标识的音频设备静音,例如在当前使用的音频设备为扬声器时,设置扬声器静音,在deviceId标识的音频设备为耳机1时,设置耳机1静音。
接着,在从本机出声切换回大屏出声时,实现流程与首次连接投屏时默认大屏出声时执行的流程类似,只是不需要重新调用ListenDeviceChange()。
继续参见图26,示例性的,当断开投屏连接时,音频管理模块通过Devicestop()通知传输模块断开与电视1之间的投屏连接,同时通过StopNotifyDeviceChange()关闭监控PC机的音频状态的音频状态监控模块。
相应地,传输模块在接收到上层的通知后,会调用HAudioDevice()查询音频管理模块中记录的当前使用的音频设备。
相应地,音频管理模块会将查询到的音频设备的标识号,即deviceId发送给传输模块,由传输模块调用SetDeviceMute()设置deviceId标识的音频设备静音,例如在当前使用的音频设备为扬声器时,设置扬声器静音,在deviceId标识的音频设备为耳机1时,设置耳机1静音。
此外,音频管理模块还会通知传输模块不将音频编解并打包发送到电视1,即停止编码,并调用Audiostop()这样电视1接收不到音频数据包,就无法解码获得音频数据进行播放,故而电视1会静音。
此外,可以理解的,在投屏过程中,ListenDeviceChange()会一致处于运行中,并在监控到音频设备发生变化时,将变化后的音频设备的标识号发送给音频管理模块对音频设备表中的目标标识号进行更新。
方式2.2:投屏过程中通过由传输模块根据音频状态监控模块监控到的音频状态来设置投屏发送端的音频状态。
参见图27,示例性的,在用户点击进行投屏时,上层投屏管理模块通过audioContol.Init()方法通知音频管理模块;然后音频管理模块通过SaveMuteState()获取当前使用的音频设备 的标识号和当前使用的音频设备的音频状态,并将当前使用的音频设备的标识号和音频状态保存为初始值,同时开启监控音频送设备是否变化的ListenDeviceChange()和监控当前使用的音频设备的音频状态是否发生变化的ListenVolChange()。
继续参见图27,在PC机与电视1建立投屏连接后,音频管理模块会调用DeviceVoiceMode()将通过SaveMuteState()获取到的当前使用的音频设备对应的声道信息发送给对应的协议层,即传输模块声音输出设备为大屏(电视1)。
相应地,传输模块收到音频管理模块发送的声道信息后,会从该声道信息指向的声道获取音频数据,并通过SpeakerENcoder()将获取到的音频数据进行音频编解,然后打包发送给电视1,使得电视1对音频解码后出声。同时,传输模块会调用HAudioDevice()查询音频管理模块中记录的当前使用的音频设备,以及该音频设备的音频状态。
相应地,音频管理模块会将查询到的音频设备的标识号(deviceId),以及该标识号标识的音频设备的音频状态发送给传输模块,由传输模块调用SetDeviceMute()设置deviceId标识的音频设备为静音,例如在当前使用的音频设备为扬声器时,设置扬声器静音,在deviceId标识的音频设备为耳机1时,设置耳机1静音。
继续参见图27,示例性的,当切换声音为本机时,上层投屏管理模块通过audioContol.Init()方法通知音频管理模块,产品上层通知传输模块不将音频编解并打包发送到电视1,即停止编码,并调用Audiostop()这样电视1接收不到音频数据包,就无法解码获得音频数据进行播放,故而电视1会静音。
相应地,音频管理模块会将查询到的音频设备的标识号(deviceId),以及该标识号标识的音频设备的音频状态发送给传输模块,由传输模块调用SetDeviceMute()设置deviceId标识的音频设备为对应的音频状态。
例如在当前使用的音频设备为扬声器,且获取到的扬声器对应的音频状态为静音状态时,设置扬声器静音;在当前使用的音频设备为扬声器,且获取到的扬声器对应的音频状态为非静音状态时,设置扬声器非静音。
还例如,在deviceId标识的音频设备为耳机1,且获取到的扬声器对应的音频状态为静音状态时,设置耳机1静音;在deviceId标识的音频设备为耳机1,且获取到的扬声器对应的音频状态为非静音状态时,设置耳机1非静音。
接着,在从本机出声切换回大屏出声时,实现流程与首次连接投屏时默认大屏出声时执行的流程类似,只是不需要重新调用ListenDeviceChange()和ListenVolChange()。
继续参见图27,示例性的,当断开投屏连接时,音频管理模块通过Devicestop()通知传输模块断开与电视1之间的投屏连接,同时通过StopNotifyDeviceChange()关闭监控PC机的音频设备是否发生变化的音频设备监控模块,通过StopNotifyVolChange()关闭监控音频状态是否发生变化的音频状态监控模块。同时,传输模块会调用HAudioDevice()查询音频管理模块中记录的当前使用的音频设备,以及该音频设备的音频状态。
相应地,音频管理模块会将查询到的音频设备的标识号(deviceId),以及该标识号标识的音频设备的音频状态发送给传输模块,由传输模块调用SetDeviceMute()设置deviceId标识的音频设备为对应的音频状态。
此外,音频管理模块还会通知传输模块不将音频编解并打包发送到电视1,即停止编码,并调用Audiostop()这样电视1接收不到音频数据包,就无法解码获得音频数据进行播放,故而电视1会静音。
此外,可以理解的,在投屏过程中,ListenDeviceChange()和ListenVolChange()会一致处于运行中,并在监控到音频设备发生变化时,将变化后的音频设备的标识号发送给音频管理模块对音频设备表中的目标标识号进行更新。
继续参见图27,示例性的,如果在投屏过程中,ListenDeviceChange()监控到PC机当前使用的音频设备发生了变化,音频管理模块可以通过GetDefaultSpeakerDevice()获取变更后的音频设备的标识号。
相应地,音频设备监控模块会将变更后的音频设备的标识号(deviceId)发送给音频管理模块管理。
接着,音频管理模块将接收到的deviceId作为查询参数,通过FindDevceMuteState()向音频状态监控模块获取deviceId对应的音频设备的音频状态。
相应地,音频状态管理模块会通过VolChangestate()将查询到的音频状态发送音频管理模块。
为了更好的理解图26和27中示出的三种场景下基于本实施例提供的技术方案实现的投屏处理,以下以图27所示的投屏场景中会同时启动音频设备监控模块和音频状态监控模块为例,结合图28至图30进行详细说明。
参见图28,示例性的,将投屏发送端称为PC机,将投屏接收端称为电视1。
其中,PC机安装有投屏应用,投屏应用包括投屏管理模块、音频管理模块和传输模块。
此外,PC机使用的系统提供有音频状态监控模块。
假设PC机和电视1首次建立投屏连接时,声音输出设备默认为电视1,即由电视1出声。
示例性的,在有用户点击图4或图5中的“立即连接”选项10-1时,投屏管理模块会接收到向电视1投屏的投屏连接请求。
继续参见图28,示例性的,本实施例提供的技术方案包括步骤401至步骤419。不难发现,本实施例中的步骤401至步骤413,步骤415至步骤419与图23所示实施例中的步骤301至步骤311,步骤315至步骤319大致相同,此处不再赘述,以下仅对不同之处进行说明。
继续参见图28,由传输模块执行步骤414将本机设备为静音状态。
需要说明的是,由于本实施例中设置本机音频状态的操作是由传输模块实现的,因此传输模块会通过设置音频状态的接口,例如称为SetDeviceMute()来设置本机的音频状态。
示例性的,传输模块在通过SetDeviceMute()来设置本机的音频状态时,会根据获取到标识号,将该标识号标识的音频设备设置为静音状态。
例如,在查询到的标识号标识到的音频设备为耳机1时,通过SetDeviceMute()将耳机1设置为静音状态。
还例如,在查询到的标识号标识到的音频设备为扬声器时,通过SetDeviceMute() 将扬声器设置为静音状态。
可理解的,由于声音输出设备为电视1时,投屏过程中无论PC机当前使用的音频设备的音频状态是静音状态还是非静音状态,PC机当前使用的音频设备,例如扬声器都不会出声,因此这种场景下,传输模块之间调用设置音频状态的接口设置本机的音频设备,例如扬声器为静音即可。
由此,实现了PC机先静音,然后播放视频后进行投屏,由电视1出声,并在投屏过程中由音频管理模块通过对音频设备的监控和对应的音频状态的监控,实行对音频设备表中记录的目标标识号和音频状态表中记录的对应于目标标识号的音频设备的音频状态的状态值进行动态更新,这样既不影响用户使用投屏功能,又能够实时监控用户在投屏过程中对PC机使用的音频设备和音频设备的音频状态的修改,从而能够从当前使用的音频设备对应的声道获取到音频数据发给电视1,使得声音输出设备为电视1时,电视1始终能够获取到可以播放的音频数据。
进一步地,在PC机的投屏信息发送到电视1,电视1开始播放画面,并播放音频数据后,如果用户将声音输出设备由电视1切换为了PC机,则对PC机音频状态的设置过程可以参见图29。
参见图29,示例性的,本实施例提供的技术方案包括步骤420至步骤427。不难发现,本实施例中的步骤420至步骤422,步骤424、步骤427与图24所示实施例中的步骤320至步骤323,步骤325大致相同,此处不再赘述,以下仅对不同之处进行说明。
继续参见图29,在步骤423中,由传输模块向音频管理模块发送音频设备和音频状态查询请求。
示例性的,传输模块例如可以通过预先编译的HAudioDevice()向音频管理模块发送音频设备和音频状态查询请求。
相应地,音频管理模块会将查询到的deviceId,以及通过预先编译的VolChangestate()查询到的音频状态发送给传输模块。
在步骤425中,由音频管理模块向传输模块发送耳机1的标识号和状态值1,即向传输模块发送查询到的当前使用的音频设备的标识号deviceId和该音频设备的音频状态。
在步骤426中,由传输模块将耳机1设置为非静音状态。
示例性的,传输模块在接收到音频模块反馈的音频设备的标识号和音频状态后,通过SetDeviceMute()来设置本机的音频状态。
具体的,根据获取到标识号,将该标识号标识的音频设备设置为查询到的音频状态。
例如,在查询到的标识号标识到的音频设备为耳机1,对应的音频状态为静音状态时,通过SetDeviceMute()将耳机1设置为静音状态;在查询到的标识号标识到的音频设备为耳机1,对应的音频状态为非静音状态时,通过SetDeviceMute()将耳机1设置为非静音状态。
还例如,在查询到的标识号标识到的音频设备为扬声器,对应的音频状态为静音状态时,通过SetDeviceMute()将扬声器设置为静音状态;在查询到的标识号标识到的 音频设备为扬声器,对应的音频状态为非静音状态时,通过SetDeviceMute()将扬声器设置为非静音状态。
由此,实现了投屏过程中将声音输出设备由电视1切换为PC机,然后由音频管理模块根据音频设备表中记录的目标标识号和音频状态表中记录的对应于目标标识号的状态值设置PC机音频状态的过程,从而使得声音输出设备修改为PC机后,PC机播放音频数据的音频设备,以及播放音频数据的音频设备的音频状态能够与用户期望的一致。
进一步地,在完成图29的操作,PC机开始播放音频数据,电视1继续播放画面/视频数据后,如果用户点击了图8中的断开连接选项10-5,则对PC机音频状态的设置过程可以参见图30。
参见图30,示例性的,本实施例提供的技术方案包括步骤428至步骤439。不难发现,本实施例中的步骤428至步骤435与图29所示实施例中的步骤420至步骤427大致相同,步骤436至步骤439与图25所示实施例中的步骤323至步骤325大致相同,此处不再赘述。
由此,本申请提供的投屏方案,在投屏过程中通过由传输模块来设置投屏发送端的音频状态,这样采用不同协议的投屏应用能够根据实际需求个性化设置,使得本申请提供的投屏方案更加多元化。
此外,应当理解的是,上述实施例中使用的各方法接口仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
此外,需要说明的是,在实际的应用场景中由电子设备实现的上述各实施例提供的系统投屏方法,也可以由电子设备中包括的一种芯片系统来执行,其中,该芯片系统可以包括处理器。该芯片系统可以与存储器耦合,使得该芯片系统运行时调用该存储器中存储的计算机程序,实现上述电子设备执行的步骤。其中,该芯片系统中的处理器可以是应用处理器也可以是非应用处理器的处理器。
另外,本申请实施例还提供一种计算机可读存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的系统投屏方法。
另外,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得电子设备执行上述相关步骤,以实现上述实施例中的系统投屏方法。
另外,本申请的实施例还提供一种芯片(也可以是组件或模块),该芯片可包括一个或多个处理电路和一个或多个收发管脚;其中,所述收发管脚和所述处理电路通过内部连接通路互相通信,所述处理电路执行上述相关方法步骤实现上述实施例中的系统投屏方法,以控制接收管脚接收信号,以控制发送管脚发送信号。
此外,通过上述描述可知,本申请实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可 以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (44)

  1. 一种投屏方法,其特征在于,应用于投屏发送端,所述投屏发送端安装有投屏应用,所述方法包括:
    在所述投屏发送端由内置的扬声器播放音频数据时,当接收到投屏连接请求后,所述投屏发送端响应于所述投屏连接请求,与投屏接收端建立投屏连接,从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据;
    在有耳机与所述投屏发送端连接后,从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据。
  2. 根据权利要求1所述的方法,其特征在于,在所述投屏发送端的显示界面中显示有对应于所述扬声器的第一音频状态切换控件和第一音量条控件;
    所述方法还包括:
    在所述投屏发送端由内置的扬声器以所述第一音量条控件对应的音量值播放所述音频数据时,当接收到对所述第一音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作控制所述扬声器停止出声。
  3. 根据权利要求2所述的方法,其特征在于,在所述从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:
    在接收到将声音输出设备由所述投屏接收端切换为所述投屏发送端的点击操作后,所述投屏发送端响应于所述点击操作,停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声。
  4. 根据权利要求3所述的方法,其特征在于,在所述停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声之后,所述方法还包括:
    在接收到对所述第一音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,控制所述扬声器以所述第一音量条控件对应的音量值播放所述音频数据。
  5. 根据权利要求2所述的方法,其特征在于,在所述从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:
    在接收到断开所述投屏发送端与所述投屏接收端之间的投屏连接后,所述投屏发送端响应于所述点击操作,停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声。
  6. 根据权利要求2所述的方法,其特征在于,在所述投屏发送端的显示界面中显示有对应于所述耳机的第二音频状态切换控件和第二音量条控件;
    在所述从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:
    在接收到对所述第二音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,将所述耳机设置为静音状态。
  7. 根据权利要求6所述的方法,其特征在于,在所述将所述耳机设置为静音状态之后,所述方法还包括:
    在接收到将声音输出设备由所述投屏接收端切换为所述投屏发送端的点击操作后,所述投屏发送端响应于所述点击操作,停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声。
  8. 根据权利要求7所述的方法,其特征在于,在所述停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声之后,所述方法还包括:
    在接收到对所述第二音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,控制所述耳机出声。
  9. 根据权利要求6所述的方法,其特征在于,在所述将所述耳机设置为静音状态之后,所述方法还包括:
    在接收到断开所述投屏发送端与所述投屏接收端之间的投屏连接后,所述投屏发送端响应于所述点击操作,停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声。
  10. 根据权利要求1至9任一项所述的方法,其特征在于,在所述投屏发送端的显示界面中还显示有音频设备选择列表,所述音频设备选择列表包括第一音频设备选项和第二音频设备选项,所述第一音频设备选项对应于所述扬声器,所述第二音频设备选项对应于所述耳机;
    在有耳机与所述投屏发送端连接后,从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:
    当接收到对所述第一音频设备选项的点击操作后,所述投屏发送端响应于所述点击操作,从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据。
  11. 一种投屏方法,其特征在于,应用于投屏发送端,所述投屏发送端安装有投屏应用,所述方法包括:
    在接收到投屏连接请求后,获取所述投屏发送端当前使用的音频设备的标识号作为目标标识号,并记录到音频设备表;
    确定用户选择的声音输出设备;
    在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放音频数据;
    在所述声音输出设备为投屏接收端时,将所述音频设备表中记录的所述目标标识号标识的音频设备设置为静音状态,并从所述音频设备表中记录的所述目标标识号标识的音频设备对应的声道获取所述音频数据,将所述音频数据发送至所述投屏接收端播放。
  12. 根据权利要求11所述的方法,其特征在于,在所述获取所述投屏发送端当前使用的音频设备的标识号作为目标标识号,并记录到音频设备表之后,所述方法还包括:
    调用音频设备监控模块,监控所述投屏发送端当前使用的音频设备是否发生变化;
    在监控到所述投屏发送端当前使用的音频设备发生变化时,获取变化后的音频设备对应的标识号;
    根据变化后的音频设备对应的标识号更新所述音频设备表中记录的所述目标标识号。
  13. 根据权利要求12所述的方法,其特征在于,在所述将所述音频数据发送至所述投屏接收端播放之后,所述方法还包括:
    在用户将声音输出设备从所述投屏接收端变更为所述投屏发送端后,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据。
  14. 根据权利要求12所述的方法,其特征在于,在所述将所述音频数据发送至所述投屏接收端播放之后,所述方法还包括:
    在接收到投屏断开请求后,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据。
  15. 根据权利要求14所述的方法,其特征在于,在断开与所述投屏接收端的连接之后,所述方法还包括:
    关闭所述音频设备监控模块。
  16. 根据权利要求11所述的方法,其特征在于,在接收到投屏连接请求后,所述方法还包括:
    获取所述投屏发送端当前的音频状态作为目标音频状态,并记录到音频状态表,所述目标音频状态为静音状态或非静音状态;
    相应地,所述在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据,包括:
    在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据,并将所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
  17. 根据权利要求16所述的方法,其特征在于,在所述获取所述投屏发送端当前的音频状态作为目标音频状态,并记录到音频状态表之后,所述方法还包括:
    调用音频状态监控模块,监控用户对所述目标标识号标识的音频设备对应的音频状态切换控件的点击操作,在所述音频状态切换控件对应的音频状态为所述静音状态时,所述音频状态切换控件被点击后,所述音频状态从所述静音状态切换为所述非静音状态,在所述音频状态切换控件对应的音频状态为所述非静音状态时,所述音频状态切换控件被点击后,所述音频状态从所述非静音状态切换为所述静音状态;
    在监控到用户对所述目标标识号标识的音频设备对应的音频状态切换控件的点击操作后,根据切换后的所述音频状态更新所述音频状态表中记录的所述目标音频状态。
  18. 根据权利要求17所述的方法,其特征在于,在所述将所述音频数据发送至所述投屏接收端之后,所述方法还包括:
    在用户将声音输出设备从所述投屏接收端变更为所述投屏发送端后,读取所述音频状态表中记录的所述目标音频状态;
    将所述投屏发送端中所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
  19. 根据权利要求17所述的方法,其特征在于,所述方法还包括:
    在接收到投屏断开请求后,读取所述音频状态表中记录的所述目标音频状态;
    将所述投屏发送端中所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
  20. 根据权利要求19所述的方法,其特征在于,在断开与所述投屏接收端的连接之后,所述方法还包括:
    关闭所述音频状态监控模块。
  21. 一种电子设备,其特征在于,所述电子设备为投屏发送端,包括:存储器和处理器,所述存储器和所述处理器耦合;所述存储器存储有程序指令,所述程序指令由所述处理器执行时,使得所述电子设备执行如权利要求1至10,或者如权利要求11至20中任意一项所述的投屏方法。
  22. 一种计算机可读存储介质,其特征在于,包括计算机程序,其特征在于,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1至10,或者如权利要求11至20中任意一项所述的投屏方法。
  23. 一种投屏方法,其特征在于,应用于投屏发送端,所述投屏发送端安装有投屏应用,所述方法包括:
    在所述投屏发送端由内置的扬声器播放音频数据时,当接收到投屏连接请求后,所述投屏发送端响应于所述投屏连接请求,与投屏接收端建立投屏连接,并获取所述扬声器的标识号作为所述投屏发送端当前使用的音频设备的目标标识号,并记录到音频设备表;
    确定用户选择的声音输出设备为投屏接收端时,将所述音频设备表中记录的所述目标标识号标识的所述扬声器设置为静音状态,从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据;
    在有耳机与所述投屏发送端连接后,获取所述耳机的标识号作为所述投屏发送端当前使用的音频设备的目标标识号,记录到音频设备表,将所述音频设备表中记录的所述目标标识号标识的所述耳机设置为静音状态,从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据。
  24. 根据权利要求23所述的方法,其特征在于,在所述投屏发送端的显示界面中显示有对应于所述扬声器的第一音频状态切换控件和第一音量条控件;
    所述方法还包括:
    在所述投屏发送端由内置的扬声器以所述第一音量条控件对应的音量值播放所述音频数据时,当接收到对所述第一音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作控制所述扬声器停止出声。
  25. 根据权利要求24所述的方法,其特征在于,在所述从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:
    在接收到将声音输出设备由所述投屏接收端切换为所述投屏发送端的点击操作后,所述投屏发送端响应于所述点击操作,停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声。
  26. 根据权利要求25所述的方法,其特征在于,在所述停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声之后,所述方法还包括:
    在接收到对所述第一音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,控制所述扬声器以所述第一音量条控件对应的音量值播放所述音频数据。
  27. 根据权利要求24所述的方法,其特征在于,在所述从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:
    在接收到断开所述投屏发送端与所述投屏接收端之间的投屏连接后,所述投屏发送端响应于所述点击操作,停止从所述扬声器对应的声道获取所述音频数据,并保持所述扬声器不出声。
  28. 根据权利要求24所述的方法,其特征在于,在所述投屏发送端的显示界面中显示有对应于所述耳机的第二音频状态切换控件和第二音量条控件;
    在所述从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:
    在接收到对所述第二音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,将所述耳机设置为静音状态。
  29. 根据权利要求28所述的方法,其特征在于,在所述将所述耳机设置为静音状态之后,所述方法还包括:
    在接收到将声音输出设备由所述投屏接收端切换为所述投屏发送端的点击操作后,所述投屏发送端响应于所述点击操作,停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声。
  30. 根据权利要求29所述的方法,其特征在于,在所述停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声之后,所述方法还包括:
    在接收到对所述第二音频状态切换控件的点击操作后,所述投屏发送端响应于所述点击操作,控制所述耳机出声。
  31. 根据权利要求28所述的方法,其特征在于,在所述将所述耳机设置为静音状态之后,所述方法还包括:
    在接收到断开所述投屏发送端与所述投屏接收端之间的投屏连接后,所述投屏发送端响应于所述点击操作,停止从所述耳机对应的声道获取所述音频数据,并控制所述耳机停止出声。
  32. 根据权利要求23至31任一项所述的方法,其特征在于,在所述投屏发送端的显示界面中还显示有音频设备选择列表,所述音频设备选择列表包括第一音频设备选项和第二音频设备选项,所述第一音频设备选项对应于所述扬声器,所述第二音频设备选项对应于所述耳机;
    在有耳机与所述投屏发送端连接后,获取所述耳机的标识号作为所述投屏发送端当前使用的音频设备的目标标识号,记录到音频设备表,将所述音频设备表中记录的所述目标标识号标识的所述耳机设置为静音状态,从所述耳机对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据之后,所述方法还包括:
    当接收到对所述第一音频设备选项的点击操作后,所述投屏发送端响应于所述点击操作,获取所述扬声器的标识号作为所述投屏发送端当前使用的音频设备的目标标识号,记录到音频设备表,将所述音频设备表中记录的所述目标标识号标识的所述扬声器设置为静音状态,从所述扬声器对应的声道获取所述音频数据,并将所述音频数据发送给所述投屏接收端,由所述投屏接收端播放所述音频数据。
  33. 一种投屏方法,其特征在于,应用于投屏发送端,所述投屏发送端安装有投屏应用,所述方法包括:
    在接收到投屏连接请求后,获取所述投屏发送端当前使用的音频设备的标识号作为目标标识号,并记录到音频设备表;
    确定用户选择的声音输出设备;
    在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放音频数据;
    在所述声音输出设备为投屏接收端时,将所述音频设备表中记录的所述目标标识号标识的音频设备设置为静音状态,并从所述音频设备表中记录的所述目标标识号标识的音频设备对应的声道获取所述音频数据,将所述音频数据发送至所述投屏接收端播放。
  34. 根据权利要求33所述的方法,其特征在于,在所述获取所述投屏发送端当前使用的音频设备的标识号作为目标标识号,并记录到音频设备表之后,所述方法还包括:
    调用音频设备监控模块,监控所述投屏发送端当前使用的音频设备是否发生变化;
    在监控到所述投屏发送端当前使用的音频设备发生变化时,获取变化后的音频设备对应的标识号;
    根据变化后的音频设备对应的标识号更新所述音频设备表中记录的所述目标标识号。
  35. 根据权利要求34所述的方法,其特征在于,在所述将所述音频数据发送至所述投屏接收端播放之后,所述方法还包括:
    在用户将声音输出设备从所述投屏接收端变更为所述投屏发送端后,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据。
  36. 根据权利要求34所述的方法,其特征在于,在所述将所述音频数据发送至所述投屏接收端播放之后,所述方法还包括:
    在接收到投屏断开请求后,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据。
  37. 根据权利要求36所述的方法,其特征在于,在断开与所述投屏接收端的连接之后,所述方法还包括:
    关闭所述音频设备监控模块。
  38. 根据权利要求33所述的方法,其特征在于,在接收到投屏连接请求后,所述方法还包括:
    获取所述投屏发送端当前的音频状态作为目标音频状态,并记录到音频状态表,所述目标音频状态为静音状态或非静音状态;
    相应地,所述在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据,包括:
    在所述声音输出设备为所述投屏发送端时,通过所述音频设备表中记录的所述目标标识号标识的音频设备播放所述音频数据,并将所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
  39. 根据权利要求38所述的方法,其特征在于,在所述获取所述投屏发送端当前的音频状态作为目标音频状态,并记录到音频状态表之后,所述方法还包括:
    调用音频状态监控模块,监控用户对所述目标标识号标识的音频设备对应的音频状态切换控件的点击操作,在所述音频状态切换控件对应的音频状态为所述静音状态时,所述音频状态切换控件被点击后,所述音频状态从所述静音状态切换为所述非静音状态,在所述音频状态切换控件对应的音频状态为所述非静音状态时,所述音频状态切换控件被点击后,所述音频状态从所述非静音状态切换为所述静音状态;
    在监控到用户对所述目标标识号标识的音频设备对应的音频状态切换控件的点击操作后,根据切换后的所述音频状态更新所述音频状态表中记录的所述目标音频状态。
  40. 根据权利要求39所述的方法,其特征在于,在所述将所述音频数据发送至所述投屏接收端之后,所述方法还包括:
    在用户将声音输出设备从所述投屏接收端变更为所述投屏发送端后,读取所述音频状态表中记录的所述目标音频状态;
    将所述投屏发送端中所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
  41. 根据权利要求39所述的方法,其特征在于,所述方法还包括:
    在接收到投屏断开请求后,读取所述音频状态表中记录的所述目标音频状态;
    将所述投屏发送端中所述目标标识号标识的音频设备的音频状态设置为所述目标音频状态。
  42. 根据权利要求41所述的方法,其特征在于,在断开与所述投屏接收端的连接之后,所述方法还包括:
    关闭所述音频状态监控模块。
  43. 一种电子设备,其特征在于,所述电子设备为投屏发送端,包括:存储器和处理器,所述存储器和所述处理器耦合;所述存储器存储有程序指令,所述程序指令由所述处理器执行时,使得所述电子设备执行如权利要求23至32,或者如权利要求33至42中任意一项所述的投屏方法。
  44. 一种计算机可读存储介质,其特征在于,包括计算机程序,其特征在于,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求23至32,或者如权利要求33至42中任意一项所述的投屏方法。
PCT/CN2022/112847 2021-12-14 2022-08-16 投屏方法、设备及存储介质 WO2023109156A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP22854497.9A EP4224865A4 (en) 2021-12-14 2022-08-16 SCREEN PROJECTION METHOD AND APPARATUS AND STORAGE MEDIUM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111523895.3A CN114125515B (zh) 2021-12-14 2021-12-14 投屏方法、设备及存储介质
CN202111523895.3 2021-12-14

Publications (1)

Publication Number Publication Date
WO2023109156A1 true WO2023109156A1 (zh) 2023-06-22

Family

ID=80365382

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/112847 WO2023109156A1 (zh) 2021-12-14 2022-08-16 投屏方法、设备及存储介质

Country Status (3)

Country Link
EP (1) EP4224865A4 (zh)
CN (2) CN116264624A (zh)
WO (1) WO2023109156A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115525366A (zh) * 2021-06-25 2022-12-27 华为技术有限公司 一种投屏方法及相关装置
CN116264624A (zh) * 2021-12-14 2023-06-16 荣耀终端有限公司 投屏方法、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558105A (zh) * 2018-12-14 2019-04-02 广州视源电子科技股份有限公司 投屏方法、投屏装置、投屏设备
CN111628847A (zh) * 2020-05-06 2020-09-04 上海幻电信息科技有限公司 数据传输方法及装置
CN112835549A (zh) * 2019-11-25 2021-05-25 华为技术有限公司 一种切换音频输出设备的方法及设备
CN113050916A (zh) * 2021-04-09 2021-06-29 深圳Tcl新技术有限公司 音频播放方法、装置及存储介质
CN113225592A (zh) * 2020-01-21 2021-08-06 华为技术有限公司 基于Wi-Fi P2P的投屏方法和装置
CN114125515A (zh) * 2021-12-14 2022-03-01 荣耀终端有限公司 投屏方法、设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103562992B (zh) * 2011-03-22 2016-11-09 先进电声私人有限公司 一种通信设备
US20150296247A1 (en) * 2012-02-29 2015-10-15 ExXothermic, Inc. Interaction of user devices and video devices
CN106878920B (zh) * 2016-12-29 2017-12-22 建荣半导体(深圳)有限公司 数据转发方法、其装置、蓝牙设备及音频传输方法
CN109032555A (zh) * 2018-07-06 2018-12-18 广州视源电子科技股份有限公司 投屏中音频数据处理方法、装置、存储介质及电子设备
CN111770415B (zh) * 2019-07-12 2021-12-03 北京京东尚科信息技术有限公司 一种扬声器与耳机的切换方法及装置
CN214281369U (zh) * 2021-02-06 2021-09-24 南京音范影音科技有限公司 一种多通道无线智能音频装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558105A (zh) * 2018-12-14 2019-04-02 广州视源电子科技股份有限公司 投屏方法、投屏装置、投屏设备
CN112835549A (zh) * 2019-11-25 2021-05-25 华为技术有限公司 一种切换音频输出设备的方法及设备
CN113225592A (zh) * 2020-01-21 2021-08-06 华为技术有限公司 基于Wi-Fi P2P的投屏方法和装置
CN111628847A (zh) * 2020-05-06 2020-09-04 上海幻电信息科技有限公司 数据传输方法及装置
CN113050916A (zh) * 2021-04-09 2021-06-29 深圳Tcl新技术有限公司 音频播放方法、装置及存储介质
CN114125515A (zh) * 2021-12-14 2022-03-01 荣耀终端有限公司 投屏方法、设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4224865A4

Also Published As

Publication number Publication date
EP4224865A4 (en) 2023-12-27
CN114125515A (zh) 2022-03-01
CN114125515B (zh) 2022-06-10
EP4224865A1 (en) 2023-08-09
CN116264624A (zh) 2023-06-16

Similar Documents

Publication Publication Date Title
WO2023109156A1 (zh) 投屏方法、设备及存储介质
US11818420B2 (en) Cross-device content projection method and electronic device
KR101801127B1 (ko) 실시간 전송 프로토콜에 대한 스트리밍 제어
US20070291955A1 (en) Sound reproducing apparatus and sound synchronizing method in sound reproducing system
US10932210B2 (en) Content output device and control method thereof
EP4033773A1 (en) Connection method for multimedia playing device, multimedia playing device and control terminal
WO2021254160A1 (zh) 蓝牙设备及其蓝牙抢占方法和装置、计算机可读存储介质
US20220263883A1 (en) Adaptive audio processing method, device, computer program, and recording medium thereof in wireless communication system
US9749373B2 (en) System and method for improved content streaming
WO2022089088A1 (zh) 显示设备、移动终端、投屏数据传输方法及传输系统
CN111147938A (zh) 视频投屏方法、视频源终端、播放终端及存储介质
US20230069230A1 (en) Switching between multiple earbud architectures
US9843879B2 (en) Apparatus and method for reproducing multi-sound channel contents using DLNA in mobile terminal
CN115686424A (zh) 针对音频播放的优先级配置方法、装置、设备及存储介质
WO2023103167A1 (zh) 投屏方法、设备及存储介质
CN106604204B (zh) 一种远程蓝牙控制终端应用的方法及系统
KR101483213B1 (ko) 오디오 출력경로를 제어하는 단말기 및 단말기 간 오디오 출력경로 제어방법
WO2022088899A1 (zh) 显示设备、显示设备与外接音响的通信方法及外接音响音频输出方法
CN111586152B (zh) 蓝牙传输数据的播放方法及装置、蓝牙传输数据的发送方法及装置
JPWO2018096849A1 (ja) 情報処理装置、情報処理方法、及びプログラム
US20240223867A1 (en) Screen projection method, device, and storage medium
US11109209B2 (en) Bluetooth device, method of operating bluetooth device, and non-transitory computer readable storage medium
WO2023035630A1 (zh) 一种音频控制方法及显示设备
TWI841832B (zh) 傳輸音頻資料的方法
WO2023185589A1 (zh) 音量控制方法及电子设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 18023304

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022854497

Country of ref document: EP

Effective date: 20230216