CN111916092A - Qemu virtual machine remote audio transmission method and device - Google Patents

Qemu virtual machine remote audio transmission method and device Download PDF

Info

Publication number
CN111916092A
CN111916092A CN202010748650.XA CN202010748650A CN111916092A CN 111916092 A CN111916092 A CN 111916092A CN 202010748650 A CN202010748650 A CN 202010748650A CN 111916092 A CN111916092 A CN 111916092A
Authority
CN
China
Prior art keywords
virtual machine
audio
qemu virtual
qemu
pulseaudio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010748650.XA
Other languages
Chinese (zh)
Inventor
陈乃阔
侯亚杰
王则陆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Chaoyue CNC Electronics Co Ltd
Original Assignee
Shandong Chaoyue CNC Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Chaoyue CNC Electronics Co Ltd filed Critical Shandong Chaoyue CNC Electronics Co Ltd
Priority to CN202010748650.XA priority Critical patent/CN111916092A/en
Publication of CN111916092A publication Critical patent/CN111916092A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes
    • G10L19/24Variable rate codecs, e.g. for generating different qualities using a scalable representation such as hierarchical encoding or layered encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The invention provides a Qemu virtual machine remote audio transmission method and a device; wherein the method comprises the following steps: starting a Qemu virtual machine, and automatically configuring a drive program; detecting the operating environment of the driver; and in response to the operating environment not having audio transmission capability, starting a PulseAudio plug-in the Qemu virtual machine to transmit audio signals through the network. The beneficial effects of the invention include: the invention adds the PulseAudio plug-in to the Qemu virtual machine, so that the transmission of audio data can be realized through a network without being limited by the interface of the equipment or an audio transmission protocol, and the application range of the Qemu virtual machine remote audio transmission method and the device is greatly enlarged.

Description

Qemu virtual machine remote audio transmission method and device
Technical Field
The invention relates to the technical field of virtual machines, in particular to a Qemu virtual machine remote audio transmission method and device, which are used for more widely realizing virtual machine remote audio transmission.
Background
Qemu is a relatively mature virtualization scheme in cloud computing, can provide server virtualization or desktop virtualization, and is supported by various platforms.
As in the ProxmoxVE virtualization platform, Kvm-Qemu was used as a virtual machine monitor to provide desktop cloud services. Kvm-Qemu is provided with an open source remote scheme Spice of RedHat, and the Spice can provide friendly functions such as image display, sound recording and playing. However, in some cases where the Spice protocol is not applicable, such as in a VNC (Virtual Network simple Virtual control) desktop, the user can only obtain images but not sound, because the VNC does not have a sound channel.
Therefore, it is necessary to develop a Qemu virtual machine remote audio transmission method with wider application range.
Disclosure of Invention
In order to solve the technical problems mentioned in the background art, the invention provides a method for transmitting a Qemu virtual machine remote audio, wherein the method comprises the following steps: starting a Qemu virtual machine, and automatically configuring a drive program; detecting the operating environment of the driver; and in response to the operating environment not having audio transmission capability, starting a PulseAudio plug-in the Qemu virtual machine to transmit audio signals through the network.
In one or more embodiments, the detecting the operating environment of the driver includes: whether the running environment supports an audio transmission protocol in the Qemu virtual machine is detected.
In one or more embodiments, the initiating a PulseAudio plug-in the Qemu virtual machine to transmit audio signals over a network includes: acquiring an audio signal in a VDI (virtual device interface) rear-end drive of the Qemu virtual machine; removing an additional part corresponding to a communication protocol in the audio signal and reserving an audio data part; and modulating the audio data by using the PulseAudio plug-in to generate a new audio signal so as to transmit the new audio signal through the network.
In one or more embodiments, the modulating the audio data with the PulseAudio plug-in includes: and performing pulse code modulation on the audio data by using a PulseAudio plug-in.
In one or more embodiments, the method further comprises: and performing source code compiling on the Qemu virtual machine program, and adding a pulseAudio plug-in.
Wherein, the Qemu virtual machine remote audio transmission device includes: the control module is configured for starting the Qemu virtual machine and automatically configuring a drive program; a detection module configured to detect an operating environment of the driver; a network communication module configured to start a PulseAudio plug-in the Qemu virtual machine to transmit audio signals over a network in response to the operating environment not having audio transmission capabilities.
In one or more embodiments, the detection module is further configured to: and detecting whether the operating environment of the driver supports the audio communication protocol in the Qemu virtual machine.
In one or more embodiments, the network communication module is further configured to control the PulseAudio plugin to perform the following steps, including: acquiring an audio signal in a VDI (virtual device interface) rear-end drive of the Qemu virtual machine; removing an additional part corresponding to a communication protocol in the audio signal and reserving an audio data part; modulating the audio data to generate a new audio signal for transmission over a network.
In one or more embodiments, the network communication module is further configured to: pulse code modulation is performed on the audio data.
In one or more embodiments, the PulseAudio plug-in is configured by source code compilation of the Qemu virtual machine program.
The beneficial effects of the invention include: the invention adds the PulseAudio plug-in to the Qemu virtual machine, so that the transmission of audio data can be realized through a network without being limited by the interface of the equipment or an audio transmission protocol, and the application range of the Qemu virtual machine remote audio transmission method is greatly enlarged.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for transmitting audio remotely by a Qemu virtual machine according to the present invention;
FIG. 2 is a schematic diagram of the Qemu virtual machine of the present invention;
FIG. 3 is a schematic structural diagram of a Qemu virtual machine remote audio transmission device according to the present invention;
fig. 4 is a schematic composition diagram of the Qemu virtual machine remote audio transmission system of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In order to improve the application range of the Qemu virtual machine, the invention provides a method and a device for transmitting the remote audio of the Qemu virtual machine, which are used for realizing remote communication under the condition that the operating environment of the Qemu virtual machine does not support an audio communication protocol. The present invention will be described in more detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a method for transmitting audio remotely by a Qemu virtual machine according to the present invention. In this embodiment, the process of the method for transmitting the remote audio of the Qemu virtual machine includes: step S1, starting a Qemu virtual machine, and automatically configuring a drive program; step S2, detecting the operating environment of the driver; and step S3, responding to the condition that the running environment has no audio transmission capability, starting a pulseAudio plug-in the Qemu virtual machine to transmit audio signals through the network.
Specifically, after the Qemu Virtual machine is successfully created, the Qemu simulates a PCI (Peripheral Component Interconnect) Virtual sound card for the Virtual machine, the Virtual sound card can receive PCM (Pulse Code Modulation) sound data inside the Virtual machine, the PCM data is delivered to a VDI (Virtual Desktop Infrastructure) rear end of the Qemu through the Virtual sound card, and the Qemu Virtual machine can Support various rear end drivers including OSS (open Support Systems), pulseadoio, Wav (audio format), Spice, and the like. The audio is actually sent from the backend driver to the client. PulseAudio is an open source software that accepts voice input from one or more audio sources (processes or input devices) and then redirects the voice to one or more slots (sound card, remote network PulseAudio service, or other process). One purpose of PulseAudio is to redirect all sound streams, including those processes PulseAudio that attempt to access the hardware, by providing adapters to those using different sound systems. According to the invention, when the running environment for running the Qemu virtual machine does not have audio transmission capability, the pulseAudio plug-in is utilized to transmit audio data to the remote client through the network. Wherein the receiving device or platform should have a corresponding PulseAudio card. Wherein detecting the operating environment of the driver includes: whether the running environment supports an audio transmission protocol in the Qemu virtual machine or whether equipment running the Qemu virtual machine does not have an audio output interface is detected.
In a further embodiment, initiating a PulseAudio plug-in the Qemu virtual machine to transmit audio signals over a network comprises: acquiring an audio signal in a VDI (virtual device interface) rear-end drive of the Qemu virtual machine; removing an additional part corresponding to the communication protocol in the audio signal and reserving an audio data part; and modulating the audio data by using the PulseAudio plug-in to generate a new audio signal so as to transmit the new audio signal through the network.
Specifically, fig. 2 is a schematic diagram of the principle of the Qemu virtual machine of the present invention. As shown in fig. 2, there are multiple audio transmission modes in the backend of the Qemu virtual machine, such as OSS, SPICE, Wav, and Dsound. On one hand, the VDI back end of the Qemu virtual machine acquires audio data through a virtual sound card in a sound card driver, and on the other hand, the other method modulates the audio data by utilizing the audio transmission modes, so that the transmission of audio signals is realized. However, the above audio transmission methods all have respective limitations, for example, when the drive of the Qemu virtual machine runs in the VNC operating environment, since the VNC is not suitable for the Spice protocol, the Spice cannot be used to realize audio transmission. For another example, when the device running the Qemu virtual machine does not have an audio output interface, that is, does not have an audio transmission channel, none of the above audio transmission methods can achieve transmission of audio data. The invention enables the audio data to be transmitted through the network by configuring the PulseAudio plug-in the Qemu virtual machine, so that the limit of a data interface and a communication protocol is avoided, the compatibility of the PulseAudio plug-in is strong, the PulseAudio plug-in can be suitable for various operating environments, and the application range of the Qemu virtual machine remote audio transmission method is wider.
Correspondingly, the device applying the method of the embodiment has network communication capability, and new audio data generated by the PulseAudio plug-in does not need an audio transmission channel or an audio transmission protocol, but is sent to the receiving device through the network in a form conforming to the network communication protocol; and a corresponding PulseAudio plug-in is also installed in the corresponding receiving device for receiving and demodulating the new audio signal.
In a further embodiment, modulating the audio data with the PulseAudio plug-in comprises: the audio data is pulse code modulated using a PulseAudio plug-in.
In a further embodiment, the method of the present invention further comprises: and performing source code compiling on the Qemu virtual machine program, and adding a pulseAudio plug-in.
The invention adds the PulseAudio plug-in to the Qemu virtual machine, so that the PulseAudio plug-in is not limited by the interface of the device or the operating environment, and further realizes the transmission of audio data through a network, thereby greatly increasing the application range of the Qemu virtual machine remote audio transmission method.
Corresponding to the Qemu virtual machine remote audio transmission method, the invention also provides a Qemu virtual machine remote audio transmission device.
Fig. 3 is a schematic structural diagram of the Qemu virtual machine remote audio transmission device of the present invention. As shown in fig. 3, the Qemu virtual machine remote audio transmission apparatus of the present invention includes: the control module 10 is used for starting the Qemu virtual machine and automatically configuring a drive program, wherein the control module 10 is configured and used for starting the Qemu virtual machine; a detection module 20 configured to detect an operating environment of the driver; and the network communication module 30, wherein the network communication module 30 is configured to respond to that the running environment has no audio transmission capability, and start a PulseAudio plug-in the Qemu virtual machine to transmit audio signals through a network.
In a further embodiment, the detection module is further configured to: whether the running environment of the driver supports the audio communication protocol in the Qemu virtual machine is detected.
In a further embodiment, the network communication module is further configured to control the PulseAudio plug-in to perform the following steps, including: acquiring an audio signal in a VDI (virtual device interface) rear-end drive of the Qemu virtual machine; removing an additional part corresponding to the communication protocol in the audio signal and reserving an audio data part; the audio data is modulated to generate a new audio signal for transmission over the network.
In a further embodiment, the network communication module is further configured to: the audio data is pulse code modulated.
In a further embodiment, the PulseAudio plug-in is configured by source code compilation of the Qemu virtual machine program.
In a further embodiment, the present invention further provides a Qemu virtual machine remote audio transmission system, as shown in fig. 4.
Fig. 4 is a schematic composition diagram of the Qemu virtual machine remote audio transmission system of the present invention. As shown in fig. 4, the remote audio transmission system of the present invention includes a platform server running a Qemu virtual machine and a client receiving an audio signal. In this server, a KVM-Qemu virtual machine program, a pulseAudio plug-in, and a daughter plug-in alsa thereof are arranged. Among them, the alsa daughter card is the key for implementing audio remote transmission in the PulseAudio card. A PulseAudio plug-in is also provided in the client for communicating with the server and for restoring audio signals from the server to sound.
In another embodiment, a display module is further configured in the client for displaying the transmission quality of the audio signal as a reference for selecting different audio transmission modes.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A Qemu virtual machine remote audio transmission method is characterized by comprising the following steps:
starting a Qemu virtual machine, and automatically configuring a drive program;
detecting the operating environment of the driver;
and in response to the operating environment not having audio transmission capability, starting a PulseAudio plug-in the Qemu virtual machine to transmit audio signals through the network.
2. The method for Qemu virtual machine remote audio transmission according to claim 1, wherein the detecting the running environment of the driver includes:
and detecting whether the operating environment of the driver supports an audio transmission protocol in the Qemu virtual machine.
3. The method for Qemu virtual machine remote audio transmission according to claim 1, wherein the starting a pulseAudio plug-in the Qemu virtual machine to transmit audio signals through a network comprises:
acquiring an audio signal in a VDI (virtual device interface) rear-end drive of the Qemu virtual machine;
removing an additional part corresponding to a communication protocol in the audio signal and reserving an audio data part;
and modulating the audio data by using the PulseAudio plug-in to generate a new audio signal so as to transmit the new audio signal through the network.
4. The Qemu virtual machine remote audio transmission method of claim 3, wherein said modulating the audio data with a PulseAudio plug-in comprises:
and performing pulse code modulation on the audio data by using a PulseAudio plug-in.
5. The method for Qemu virtual machine remote audio transmission according to any one of claims 1-4, further comprising:
and performing source code compiling on the Qemu virtual machine program, and adding a pulseAudio plug-in.
6. A Qemu virtual machine remote audio transmission device is characterized by comprising:
the control module is configured for starting the Qemu virtual machine and automatically configuring a drive program;
a detection module configured to detect an operating environment of the driver;
a network communication module configured to start a PulseAudio plug-in the Qemu virtual machine to transmit audio signals over a network in response to the operating environment not having audio transmission capabilities.
7. The Qemu virtual machine remote audio transmission device of claim 6, wherein the detection module is further configured to:
and detecting whether the operating environment of the driver supports the audio communication protocol in the Qemu virtual machine.
8. The Qemu virtual machine remote audio transmission device of claim 6, wherein said network communication module is further configured to control said PulseAudio plug-in to perform steps comprising:
acquiring an audio signal in a VDI (virtual device interface) rear-end drive of the Qemu virtual machine;
removing an additional part corresponding to a communication protocol in the audio signal and reserving an audio data part;
modulating the audio data to generate a new audio signal for transmission over a network.
9. The Qemu virtual machine remote audio transmission device of claim 8, wherein the network communication module is further configured to:
pulse code modulation is performed on the audio data.
10. The Qemu virtual machine remote audio transmission device of any of claims 6-9, wherein the PulseAudio plug-in is configured by source code compilation of the Qemu virtual machine program.
CN202010748650.XA 2020-07-30 2020-07-30 Qemu virtual machine remote audio transmission method and device Pending CN111916092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010748650.XA CN111916092A (en) 2020-07-30 2020-07-30 Qemu virtual machine remote audio transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010748650.XA CN111916092A (en) 2020-07-30 2020-07-30 Qemu virtual machine remote audio transmission method and device

Publications (1)

Publication Number Publication Date
CN111916092A true CN111916092A (en) 2020-11-10

Family

ID=73287451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010748650.XA Pending CN111916092A (en) 2020-07-30 2020-07-30 Qemu virtual machine remote audio transmission method and device

Country Status (1)

Country Link
CN (1) CN111916092A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100269135A1 (en) * 2009-04-16 2010-10-21 Ibahn General Holdings Corporation Virtual desktop services
CN106933529A (en) * 2017-01-24 2017-07-07 北京元心科技有限公司 The method and system of audio service are provided
US20170332128A1 (en) * 2014-11-26 2017-11-16 Lg Electronics Inc. System for controlling device, digital device, and method for controlling same
CN107704312A (en) * 2017-10-18 2018-02-16 顺丰科技有限公司 A kind of qemu kvm virtual machines is performed any order method and storage medium
WO2019186443A1 (en) * 2018-03-28 2019-10-03 L&T Technology Services Limited Audio streaming from host bluetooth device to multiple receiving bluetooth devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100269135A1 (en) * 2009-04-16 2010-10-21 Ibahn General Holdings Corporation Virtual desktop services
US20170332128A1 (en) * 2014-11-26 2017-11-16 Lg Electronics Inc. System for controlling device, digital device, and method for controlling same
CN106933529A (en) * 2017-01-24 2017-07-07 北京元心科技有限公司 The method and system of audio service are provided
CN107704312A (en) * 2017-10-18 2018-02-16 顺丰科技有限公司 A kind of qemu kvm virtual machines is performed any order method and storage medium
WO2019186443A1 (en) * 2018-03-28 2019-10-03 L&T Technology Services Limited Audio streaming from host bluetooth device to multiple receiving bluetooth devices

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XIAOSEYIHE: "《PulseAudio安装流程》", pages 1 - 3, Retrieved from the Internet <URL:https://blog.csdn.net/xiaoseyihe/article/details/76905905> *
老马驿站: "《在Fedora 11下安装VMware Workstation6.5.3并解决在PulseAudio环境下虚拟机正常发声的办法》", pages 1 - 3, Retrieved from the Internet <URL:http://www.cppblog.com/jerryma/archive/2009/11/27/102119.html> *

Similar Documents

Publication Publication Date Title
US5309564A (en) Apparatus for networking computers for multimedia applications
US6928464B2 (en) Systems and methods for unified remote control access
JP6582100B2 (en) Method and apparatus for providing voice service
CN110806934A (en) RPA technology-based intelligent all-in-one machine development and multi-service rapid processing method
WO2022057677A1 (en) Vibration control method and apparatus, and electronic device and computer-readable storage medium
CN109933442A (en) The means of communication, equipment and computer storage medium between small routine platform
CN111131891B (en) Audio and video playing method and device, playing equipment and system
EP1179774A2 (en) Apparatus and method for sharing data across a plurality of devices
US20210224014A1 (en) Display method, display system and vehicle
CN111045781A (en) Method and device for creating mirror image on cloud platform and storage medium
KR20050114047A (en) Method and server for servicing remote clients
CN113489805A (en) Docking method, device, equipment and storage medium of cloud desktop system
WO2023154739A3 (en) Method and system for servicing a vehicle using a test set
US11803606B2 (en) Device augmentation of real time communications
CN113709243B (en) Equipment remote control method and device, electronic equipment and storage medium
US20220103415A1 (en) Remote network and cloud infrastructure management
CN114489891A (en) Control method, system, device, readable medium and equipment of cloud application program
CN114513552A (en) Data processing method, device, equipment and storage medium
WO2024061308A1 (en) Notification processing method, and terminal device, server side and computer storage medium
CN107231275B (en) Method for connection configuration of user equipment and household equipment
CN111916092A (en) Qemu virtual machine remote audio transmission method and device
CN114125732B (en) Message processing method and device, storage medium and electronic equipment
CN114301789A (en) Data transmission method and device, storage medium and electronic equipment
CN113938518A (en) Remote connection service method, device and equipment
CN112448878B (en) PPPoE transparent transmission method, PPPoE server and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination