WO2021204141A1 - Video live-streaming control, bridging, stream control and broadcast control methods, and client - Google Patents

Video live-streaming control, bridging, stream control and broadcast control methods, and client Download PDF

Info

Publication number
WO2021204141A1
WO2021204141A1 PCT/CN2021/085783 CN2021085783W WO2021204141A1 WO 2021204141 A1 WO2021204141 A1 WO 2021204141A1 CN 2021085783 W CN2021085783 W CN 2021085783W WO 2021204141 A1 WO2021204141 A1 WO 2021204141A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
live
broadcast
operating system
simulation
Prior art date
Application number
PCT/CN2021/085783
Other languages
French (fr)
Chinese (zh)
Inventor
王斐航
林忠涛
Original Assignee
广州华多网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州华多网络科技有限公司 filed Critical 广州华多网络科技有限公司
Publication of WO2021204141A1 publication Critical patent/WO2021204141A1/en

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/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/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • 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/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4438Window management, e.g. event handling following interaction with the user interface

Definitions

  • the present invention relates to computer system communication technology, in particular to a video live broadcast control method and a corresponding client, and correspondingly relates to a video direct bridge method, a video live streaming control method, and a video live broadcast control method during the execution of the control method.
  • the developer will choose to let the anchor install a customized emulator on the PC, first establish an environment suitable for Android App running on the PC machine, and then use the emulator
  • the Android launch tool is installed inside, so that R&D only needs to develop the Android launch application to meet the needs of the PC and Android platforms.
  • the present invention provides a live video control method, a live video bridge bridging method, a live video streaming control method, and a live video broadcast control method for the first purpose of avoiding repeated development.
  • the second object of the present invention is to provide a client terminal, so as to realize hardware support for the first object and the method.
  • the present invention provides the following technical solutions:
  • the video live broadcast control method of the present invention includes the following steps:
  • the simulation program When the simulation program running in the current first operating system for simulating the operating environment of the second operating system starts the live program, the simulation program establishes the live program running in the operating environment and the live program running in the first operating system.
  • the communication channel of the flow control program
  • the broadcast start preview message is broadcast, and the simulation program notifies the flow control program of the start preview message to trigger it to enter the preview state, so that it opens a preview window to display the video stream it collects;
  • the live broadcast program After the live broadcast program starts the broadcast mode, it broadcasts the cloud address message it has acquired for receiving the video stream, and the simulation program notifies the cloud address message to the streaming control program to trigger it to enter the broadcast state and make it broadcast to the corresponding The cloud address to transmit the video stream.
  • the method further includes the following steps:
  • the simulation program When the live broadcast program is closed, the broadcast preview stop message, the simulation program notifies the stream control program of the preview stop message to trigger it to enter the stop broadcast state, and stop pushing the video stream to the cloud address.
  • the communication channel includes a first direct channel between a live program and a simulation program and a second direct channel between the simulation program and the flow control program.
  • the first direct channel is established as follows: the live program carries service components registered in the simulation running environment, and the simulation program carries broadcast receivers registered in the simulation running environment The simulation program transmits the messages generated by the flow control program to the live program through the service process constructed by the service component; the simulation program receives the messages broadcast by the live program through the broadcast receiver and transmits them Give the described flow control program.
  • the second direct channel is established as follows: the second direct channel is established between the simulation program and the flow control program by reading and writing sockets or files with each other.
  • the simulation program and the flow control program are suitable for running on the current first operating system
  • the live broadcast program is suitable for running on a second operating system that is different from the current operating system
  • the simulation program is suitable for Simulate the second operating system in the first operating system to create a corresponding simulated running environment for the live program.
  • the first operating system is any one of Windows or operating systems based on Linux and Unix
  • the second operating system is Android, IOS, Linux, Windows that are different from the first operating system. Any of the operating systems.
  • the application package name representing the main process of the live program and the service name representing its service process are passed to the flow control program for all
  • the flow control program identifies the main process and the service process of the live broadcast program to determine the identity of message delivery.
  • a tool container for controlling the video stream collected by the flow control program is opened.
  • the tool container includes at least one control that can affect the special effects of the preview video in the preview window.
  • the message generated from the control is transmitted to the live broadcast program through the communication channel.
  • the preview window is closed when the flow control program enters the stop state.
  • a method for bridging video live broadcast of the present invention includes the following steps:
  • the method further includes the following steps:
  • the communication channel includes a first direct channel between the simulation program and the live program implemented by the method, and a second direct channel between the simulation program and the flow control program.
  • the first direct channel is established as follows: the live program carries service components registered in the simulation running environment, and the simulation program carries broadcast receivers registered in the simulation running environment The simulation program transmits the messages generated by the flow control program to the live program through the service process constructed by the service component; the simulation program receives the messages broadcast by the live program through the broadcast receiver and transmits them Give the described flow control program.
  • the second direct channel is established as follows: the second direct channel is established between the simulation program and the flow control program by reading and writing sockets or files with each other.
  • the application package name representing the main process of the live program and the service name representing its service process are passed to the flow control program for all
  • the flow control program identifies the main process and the service process of the live broadcast program to determine the identity of message delivery.
  • a video live streaming method of the present invention includes the following steps:
  • a tool container for controlling the video stream when entering the preview state, is opened, and the tool container includes at least one control that can affect the special effect of the preview video in the preview window.
  • the preview window when entering the stop state, the preview window is closed.
  • the flow control program that implements this method and the simulation program realize communication by reading and writing sockets or files with each other, so as to realize the transmission of the message.
  • the flow control program that implements the method sends a notification message to the simulation program, so that the notification message is displayed in the simulation running environment created by the simulation program.
  • a method for controlling live video broadcasting of the present invention includes the following steps:
  • the bottom layer driver of the first operating system is triggered to stop collecting the video stream.
  • the first operating system runs a simulation program for creating the operating environment of the second operating system module, and the first operating system runs a first-level control program for capturing video from the underlying driver The action of streaming and the execution of the action of pushing the video stream.
  • the live broadcast program that implements the method sends a message in the broadcast mode of the broadcast mechanism of the second operating system to implement the trigger operation on the first operating system.
  • the live program that implements the method carries a service component for receiving messages generated in the first operating system, so as to display the messages generated in the first operation to the user.
  • the first operating system is any one of Windows or operating systems based on Linux and Unix
  • the second operating system is Android, IOS, Linux, and Linux, which are different from the first operating system. Any of the Windows operating systems.
  • a client of the present invention includes a central processing unit and a memory, and the central processing unit is used to call and run one or more computer programs stored in the memory to execute the various types of the first object of the present invention as described above. Provided method.
  • the video stream does not need to be transferred through the simulation program and the live program, which can greatly improve the push efficiency of the video stream.
  • the video stream is received by the cloud server and pushed to the terminal device of the user in the live broadcast room, the user can obtain high fidelity Video stream to obtain a clearer video viewing effect. Accordingly, developers do not need to adapt to the mechanism and development language of the first operating system to re-develop and maintain another version of the live program, which can greatly save program development consumption and development cost.
  • the simulation program implemented by the video live streaming bridge method of the present invention can not only simulate the operating environment of the second operating system in the first operating system, so as to ensure that the live program is called and run normally, but also, through the establishment of the live program and
  • the communication channel between flow control programs realizes the message bridging mechanism, which in fact creates the basic conditions for the separation of video streaming and live broadcast control.
  • the simulation program It can serve it and provide a docking channel between the flow control programs. Therefore, the bridging method is equivalent to providing applications of different operating systems running on the first operating system and enabling separate collection and push of video streams.
  • the service mechanism is convenient for Internet developers to adapt and call, and it is convenient to be compatible with the application programs of the second operating system developed by different developers.
  • the flow control program implemented by the video live streaming method of the present invention runs on the first operating system and is specifically responsible for the collection, push and preview of the video stream, and can be used for the second operation through the simulation program through the corresponding communication channel.
  • the live program developed by the system provides the service of pushing the video stream, which is convenient for the anchor users to watch and operate on the first operating system (usually a PC), which is more convenient to control and obtain better preview effects.
  • the live program implemented by the video live broadcast control method of the present invention can access the simulation program running on the first operating system of the present invention as long as the relevant response and message broadcasting is implemented according to the method, and run on the simulation program created by the simulation program.
  • the live program can also be developed lightly, and it does not necessarily need to provide a complete preview. , Capture and push video stream related functions.
  • developers often provide full-featured live broadcast programs.
  • the live broadcast programs developed for the second operating system can access the simulation programs as long as they comply with the specifications of this broadcast control method. , And it runs virtually in the first operating system, which realizes function expansion and facilitates the operation of anchor users.
  • FIG. 1 is a schematic flowchart of a typical embodiment of the video live broadcast control method of the present invention
  • FIG. 2 is a schematic flowchart of a typical embodiment of the video live streaming bridge method of the present invention
  • FIG. 3 is a schematic flowchart of a typical embodiment of a video live streaming method of the present invention.
  • FIG. 4 is a schematic flowchart of a typical embodiment of a method for controlling live video broadcasting according to the present invention.
  • client includes both wireless signal receiver devices, which only have wireless signal receiver devices without transmitting capabilities, and include A device for receiving and transmitting hardware, which has a device capable of receiving and transmitting hardware for two-way communication on a two-way communication link.
  • Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service, personal communication) System), which can combine voice, data processing, fax and/or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet/Intranet access, web browsers, and notes Notebook, calendar, and/or GPS (Global Positioning System) receiver; conventional laptop and/or palmtop computer or other equipment, which has and/or includes a conventional laptop and/or radio frequency receiver Palm-size computer or other equipment.
  • cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays
  • PCS Personal Communications Service, personal communication) System
  • PDA Personal Digital Assistant
  • GPS Global Positioning System
  • the “client”, “terminal”, and “terminal device” used here may be portable, transportable, installed in vehicles (air, sea and/or land), or suitable and/or configured to be locally Operate, and/or in a distributed form, operate in any other location on the earth and/or space.
  • the “client”, “terminal”, and “terminal device” used here can also be communication terminals, internet terminals, music/video playback terminals, such as PDA, MID (Mobile Internet Device, mobile Internet device) and/or Mobile phones with music/video playback functions can also be devices such as smart TVs and set-top boxes.
  • the hardware referred to by the names "server”, “client”, “service node” and so on in the present invention is essentially a device with the equivalent capabilities of a personal computer, which is a central processing unit (including arithmetic unit and controller) , Memory, input equipment, output equipment and other necessary components disclosed by the von Neumann principle.
  • the computer program is stored in its memory.
  • the central processing unit transfers the program stored in the external memory into the memory to run and execute the program.
  • the command interacts with input and output devices to complete specific functions.
  • server referred to in the present invention can also be extended to the situation of server clusters in the same way.
  • the present invention is proposed for the application scenario of the host side of live video.
  • the host uses a personal computer installed with a first operating system, such as a Windows system, as a client, and runs the video according to the present invention on the desktop.
  • the live program in the operating system can use the live program as a controller to control the flow control program to collect and preview the video stream, and further can operate the live program to drive the flow control program to push the video stream to the cloud server, which is pushed by the server For users in the live broadcast room to watch.
  • the video stream referred to in the present invention unless otherwise selectively controlled by the host user, generally can include two types of stream data, video and audio, and these video streams may not be collected by the underlying driver of the client.
  • the original data means that the anchor user can edit and process the video and/or audio with the special effects tools provided by the flow control program, so that the flow control program will finally push the edited and processed video stream to The cloud server.
  • Both the first operating system and the second operating system involved in the present invention can be various currently known operating systems or unknown operating systems, including operating systems suitable for various mobile terminals and personal computers.
  • the first operating system and the second operating system are different operating systems, so the bridging is just achieved through the simulation program.
  • the first operating system of the present invention recommends using any one of Windows or Linux and Unix-based operating systems
  • the second operating system is Android, which is different from the first operating system.
  • Any one of IOS, Linux, Windows operating system can be set as the Windows operating system and the second operating system is the Android operating system.
  • the second operating system excludes other operating systems including IOS.
  • the method includes the following steps:
  • Step S11 when the simulation program running in the current first operating system for simulating the operating environment of the second operating system starts the live program, the simulation program establishes the live program running in the operating environment and runs in the first operation
  • the first operating system of the present invention runs, for example, the Windows operating system
  • the second operating system may be, for example, the Android operating system.
  • the flow control program and the simulation program are both developed by the Windows operating system.
  • the said flow control program is actually equivalent to opening a service, which can collect video streams and realize video preview in the desktop window of the first operating system, and can push the collected video streams to the cloud with a designated cloud address.
  • the cloud server can push the video stream to the relevant participating users in the live broadcast room controlled by the host user.
  • the anchor user will run the flow control program and the simulation program first, and when the developer develops, he can also integrate the simulation program and the flow control program into the same program, so that they can call each other associatively, simplifying the anchor user Start operation.
  • the flow control program When the flow control program is initially started, it is in a stopped state by default, so there is no need to open the preview window (which can also be opened) and the corresponding tool container, and it can run in the background.
  • the simulation program When the simulation program is started, it is responsible for creating the simulation running environment of the second operating system, which actually functions as the operating system virtual machine, and finally provides a second operating system operation interface, which is convenient for the anchor user to install and start it. , Close and uninstall related applications, including the live broadcast program.
  • the simulation program establishes the communication channel in accordance with the protocol mechanism preset by the developer during or after the start-up process.
  • the communication channel includes a first direct channel between a live program and a simulation program and a second direct channel between the simulation program and the flow control program.
  • the first direct channel is mainly to maintain the message transmission between the simulation program and the live program, including two-direction message transmission, that is, the message channel from the simulation program to the live program and the message channel from the live program to the simulation program.
  • the message channel through which the simulation program transmits messages to the live broadcast program is realized by using the service components carried by the live broadcast program.
  • the code related to the service component is embedded, and the service component has been declared in its Androidmanifest.xml configuration information file. Therefore, when the live broadcast program is running, it will be parsed and registered in the simulation running environment to construct A service process.
  • the simulation program implements binding with the service process and maintains communication with it to realize inter-process communication, and can send messages to the live program through the service process, usually by forwarding and transmitting the messages generated by the flow control program.
  • the message channel through which the live broadcast program transmits messages to the simulation program implements message broadcast by using the broadcast mechanism of the second operating system itself, such as the broadcast mechanism in Android, by the live broadcast program.
  • a broadcast receiver is pre-declared in its Androidmanifest.xml file.
  • This broadcast interface device can be used to filter and receive various messages broadcast by the live broadcast program.
  • the live program uses this mechanism to include the messages that need to be broadcast into the intent to achieve broadcast.
  • the simulation program filters and receives the messages broadcast by the live program through its own broadcast receiver, and then can deliver it to all The flow control program described.
  • the second channel is mainly to maintain the message transfer between the simulation program and the flow control program running on the client. Since both the simulation program and the flow control program run in the same operating system, the two can adopt a simpler way to achieve message transmission in the same way.
  • the socket mechanism or the file read and write mechanism of the Windows system can be used to read and write the socket or file, one write and one read , To achieve message delivery.
  • the simulation program can theoretically run multiple applications developed for the second operating system. Therefore, in theory, it can be allowed to simulate multiple processes in the operating environment, in order to avoid confusion caused by multiple processes sending messages at the same time, or to clarify these processes As any one of them is the recipient of the message, you can consider letting the parties in the communication channel identify the identities of these processes. Therefore, in a modified embodiment, in the process of establishing the communication channel, the simulation program may further pass the application package name of the live program on behalf of its main process and the service name on behalf of its service process to The flow control program enables the flow control program to identify the sending identity of the message to be transmitted, and it can also clarify the receiving identity of the object whose message needs to be transmitted.
  • the flow control program when the flow control program receives a live program message from the simulation program through a socket or file, its legitimacy can be determined based on the application package name and service name; and when the flow control program needs to broadcast to a specific live program
  • the program sends a message it can specify the recipient in the message to be delivered, so that the simulation program can correctly deliver the message to the corresponding main process or service process. It can be seen that by allowing the flow control program to hold the application package name and service name of the live program, it is beneficial for the flow control program to identify the main process and service process of the live program to determine the message delivery identity.
  • Step S12 After the live broadcast program starts the preview mode, the broadcast preview message is broadcast, and the simulation program notifies the flow control program of the broadcast preview message to trigger it to enter the preview state, so that it opens the preview window to display the video stream it collects:
  • the simulation program After the live broadcast program is started, the simulation program has also established the communication channel. Therefore, barrier-free communication between the live broadcast program and the flow control program can be realized through the simulation program, and the anchor user can perform regular routines. Live broadcast operation.
  • an entry or control or other control method related to the start of the preview mode will be provided on the live program interface, or directly when the user switches to a certain page, it is regarded as the start of the preview mode.
  • the live broadcast program will be triggered in this mode, taking the method in the Android system as an example, construct an intent, and run it in the simulation Broadcasting a message in the environment that indicates that the anchor user needs to start the broadcast preview is called the start broadcast preview message.
  • the broadcast receiver registered by the simulation program will receive the broadcast preview message, and after filtering the reception, it can write it to the relevant socket in accordance with the rules and format agreed with the flow control program Or in the file.
  • the flow control program reads the on-air preview message from the socket or file according to the method pre-agreeed with the simulation program, and is triggered by it to switch itself into the preview state.
  • the preview state open a preview window for displaying images in the current window or by creating a new window.
  • the flow control program will also control the camera and audio circuit to collect the video stream for it by calling the underlying driver of the first operating system. Unless the host user has a setting that prohibits immediate display for safety reasons, the video stream will be synchronized. Displayed in the preview window.
  • the flow control program itself is a program developed for the first operating system, it does not need to be converted by different operating system mechanisms. Therefore, it will have a higher video stream acquisition efficiency, ensure the video stream acquisition quality, and minimize the time The impact of problems such as delay and dropped frames.
  • the tool container is usually represented as a toolbar, which can be an independent window or integrated with other windows such as the preview window into the same window.
  • the tool container can generally provide multiple controls, and the functions implemented by these controls may be different.
  • a typical application is to provide one or more special effect controls in the tool container.
  • the host user can manipulate one or more such controls to perform special effects processing on the video effect, so that the final video image displayed in the preview window appears Corresponding special effects, and these special effects can be superimposed on the video stream data, and subsequently pushed to the live room users to watch.
  • the tool container may of course also include controls that act on the preview video in the preview window to achieve other different functions, which should be understood in the art.
  • the flow control program can generate relevant messages in response to the manipulation of the controls, and send them back to the live program through the communication channel. , So that the live program can make further decisions and processing accordingly.
  • Step S13 After the live broadcast program starts the broadcast mode, it broadcasts the cloud address message it has acquired for receiving the video stream, and the simulation program notifies the cloud address message to the streaming control program to trigger it to enter the broadcast state, so that It transmits the video stream to the corresponding cloud address:
  • the live broadcast program can provide a control or any other method recognized by the live broadcast program to initiate the start of the broadcast mode to the live broadcast program. instruction.
  • the live broadcast program is triggered by the start instruction of the host user, and according to the design logic of the program developer, the cloud address used to upload the video stream can be obtained from the cloud server first.
  • the live broadcast program will query the authentication service of the cloud server after passing the authentication, and then obtain the cloud address by querying the stream management service of the cloud server.
  • These methods involving security and addressing are all known to those skilled in the art, and do not affect the creative spirit and protection scope of the present invention, and will not be repeated.
  • the live broadcast program will obtain the cloud address provided by the cloud server through certain code logic.
  • the cloud address can theoretically be used to push the video stream collected by the live broadcast program itself, or it can be used to provide the flow control program for execution. Pushing the video stream collected by the flow control program, the present invention focuses on the latter.
  • the live streaming program broadcasts a cloud address message by constructing an intent according to the broadcast mechanism of the second operating system such as Android, that is, the cloud address is included in the intent and becomes the message body, Broadcast in a simulated operating environment.
  • the second operating system such as Android
  • the broadcast receiver pre-registered by the simulation program will filter and receive the cloud address message, and then write through the socket or file channel, and the flow control program will The socket or file is read to obtain the cloud address message, and the simulation program also completes the task of notifying the cloud address message to the flow control program.
  • the stream control program After the stream control program receives the cloud address message, it is triggered by this notification and enters the on-air state, so it can call the communication interface of the first operating system, transmit the video stream to the cloud address, and upload the video stream to Corresponding remote server, and the remote server will push this video stream directly or after processing to each user in the live broadcast room where the anchor user is located, and finally display it on the desktop of these users.
  • the flow control program can reversely send the corresponding message back to the live program through the communication channel in the above manner, so as to allow the host The user makes further adjustments and controls.
  • the simulation program notifies the stream control program of the preview stop broadcast message to trigger it to enter the stop broadcast state, and stop pushing the video stream to the cloud address:
  • the host user When the host user wants to end the live broadcast, similarly, he can issue a preview stop broadcast instruction to the live broadcast program.
  • the live broadcast program then constructs a message body according to the aforementioned broadcast mechanism to broadcast the preview stop broadcast message.
  • the simulation program filters through its broadcast receiver and receives the preview stop-broadcast message, it notifies it to the flow control program through a socket or a file.
  • the flow control program obtains the notification by reading the socket or the file, it triggers itself to switch to the stop state, so it can close the previously opened preview window and/or tool container, and synchronously stop pushing the cloud address to the cloud address.
  • the entire live broadcast process is over.
  • this method makes the live broadcast process of the host user on the personal computer more smooth, even if the operating system of the live broadcast program used by the host is not the operating system of the personal computer, it can still be used.
  • the simulation program and the flow control program of this method realize smooth and high-definition video live broadcast. Accordingly, developers only need to develop one live broadcast program, which can be applied to two operating systems.
  • a typical embodiment of the video live broadcast bridge method of the present invention is actually a specific application example obtained on the basis of each embodiment of the video live broadcast control method of the present invention, which is the basis for the realization of the simulation program Therefore, it involves the establishment principle and process of the communication channel, so I won’t repeat it.
  • This method includes the following steps:
  • Step S21 creating a second operating system simulation operating environment different from the current first operating system for running the live program:
  • the simulation program acts as the virtual machine of the operating system and runs in the first operating system such as Windows
  • a simulation operating environment of the second operating system such as Android is created to run the video stream controller. Live program.
  • Step S22 establishing a communication channel between the live broadcast program and the flow control program running in the current first operating system:
  • the second direct channel can be established with the flow control program through sockets or file reading and writing, and the live program can be established with the live program.
  • the first direct channel mainly includes the message channel from the broadcast message initiated by the live program using the broadcast mechanism to the broadcast receiver pre-registered by the simulation program, and the reverse from the simulation program to the live program.
  • Step S23 forwarding the on-air preview message broadcast by the live program to the stream control program via the communication channel, and trigger it to enter the preview state so as to preview the video stream it collects:
  • the simulation program uses the communication channel, with the aid of its broadcast receiver, to subsequently receive the start-up preview message broadcast by the live program, and then through the communication channel, use sockets or file read and write methods to transfer
  • the broadcast preview message is passed to the flow control program, thereby triggering the flow control program to enter the preview state. Accordingly, as mentioned above, the flow control program can start to collect the video stream and output the video stream to the preview
  • the window is for the anchor user to preview.
  • Step S24 forwarding the cloud address message broadcast by the live broadcast program to the stream control program via the communication channel, triggering it to enter the on-air state, so as to push the video stream to the cloud address:
  • the simulation program After the simulation program receives the cloud address message broadcast by the live broadcast program through the communication channel, with the help of its broadcast receiver, it can use the socket or file reading and writing method through the communication channel.
  • the cloud address message is passed to the flow control program, thereby triggering the flow control program to enter the broadcast state. In this state, the flow control program starts to push the collected video stream to the cloud address.
  • the stream may further include special effects loaded by the host user.
  • the simulation program After the simulation program obtains the preview stop message broadcast by the live program from the communication channel by means of its broadcast receiver, the message is transferred to the flow control program by writing a socket or a file in the same way.
  • the stream control program obtains the notification of the message through the corresponding reading socket or file, triggers itself to switch to the stop broadcast state, and closes the preview window and tool container that have been opened before, and stops pushing the video stream to the cloud address.
  • Users in the live broadcast room will also not be able to obtain the real-time video stream of the anchor user.
  • the simulation program actually plays the role of the operating system virtual machine and acts as a bridge between the flow control program of the first operating system and the live program of the second operating system.
  • the simulation program can actually provide a running environment for the live program of any operating system, and it can be adapted to the flow control program.
  • the role of standardized interfaces helps to avoid repeated development by developers for the live broadcast program itself.
  • a typical embodiment of the video live streaming control method of the present invention is actually a specific application example obtained on the basis of the various embodiments of the video live streaming control method of the present invention, and is an implementation of the streaming control program.
  • Step S31 Receive the start-up preview message forwarded by the simulation program used to provide the simulation running environment of the second operating system, start the preview window to display the video stream collected by the current bottom driver of the first operating system, and enter the preview state:
  • the flow control program of the present invention when it is running, it is in the off-broadcast state by default, but it uses the socket or file used in the communication channel mechanism to obtain the message passed by the simulation program.
  • it obtains the start preview message initiated by the live program it triggers itself to enter the preview state, starts a preview window, and calls the underlying driver of the current first operating system, such as audio driver or camera driver, To capture the video stream, display the obtained video stream in the preview window for the anchor user to preview.
  • the underlying driver of the current first operating system such as audio driver or camera driver
  • Step S32 Receive the message containing the cloud address transmitted by the simulation program, enter the on-air state, and push the video stream to the cloud address:
  • the streaming program will further obtain the cloud address message broadcast by the live program and transmitted by the simulation program through a socket or file, obtain the cloud address from it, and then send it to the Pushing the video stream by the cloud address means that the stream control program has entered the start state, and the host user's video stream is pushed to the live room user via the remote server.
  • Step S33 Receive the preview stop broadcast message delivered by the simulation program, enter the stop broadcast state, and end the push of the video stream:
  • the streaming control program can obtain the stop-broadcast message broadcasted by the live program transmitted by the simulation program through the socket or file in the same way, thereby triggering itself to return to the stop-broadcasting state. In this state, The flow control program will end pushing the video stream collected by the machine to the cloud address.
  • the flow control program can also close various open windows and containers, including the preview window and tool container.
  • the flow control program can pass through the socket
  • the word or file sends a notification message to the simulation program.
  • the notification message can be fed back to the live program by the simulation program through the service process, and the main process of the live program can display it on the interface in the simulation running environment for the anchor user to know.
  • the streaming control program functions as a standardized and independent service for pushing video streams.
  • the simulation program and the live streaming program comply with their communication methods, they can be called. Collect and push video streams to remote servers.
  • the streaming program is opened for service in this way, the development work of the developers of the live program will become simple, and only need to debug and adapt the simulation program and the existing live program belonging to the second operating system to make it compatible with The flow control program is fine.
  • the typical embodiment of the live video broadcast control method of the present invention is actually a specific application example obtained on the basis of the various embodiments of the live video control method of the present invention, and is a result of the implementation of the live broadcast program.
  • Dependent method so it involves the establishment principle and process of communication channel, so I won’t repeat it. This method includes the following steps:
  • Step S41 in response to the start preview mode command acting on the application program in the second operating system simulation running environment, trigger the display of the preview window in the first operating system providing the simulation running environment to display the information via the first operating system
  • the live program can be installed and run in the simulation running environment of the second operating system created by the simulation program.
  • the broadcast mechanism of the second operating system is used in the live program to broadcast messages to the simulation program, and a service component can be carried to construct a service process that communicates with the simulation program, so that it can receive messages from the simulation program in reverse.
  • the program and the flow control program communicate with each other through reading and writing sockets and files. Therefore, once the live broadcast program runs successfully, the communication channel between the programs is established.
  • the host user initiates the preview mode command through the user interface of the live broadcast application, and the command is transmitted to the first operating system through the simulation program in the form of broadcast start preview message, and the first operating system ,
  • the message can be read and responded to by a service such as a flow control program, so as to display a preview container on the desktop of the first operating system according to the logic of the flow control program, and at the same time, call the first
  • the bottom layer driver of the operating system collects the video stream, and outputs the collected video stream for display in the preview window.
  • Step S42 in response to the start-up mode instruction acting on the application program, trigger the first operating system to call the remote interface to push the video stream to the cloud address obtained and provided by the application program:
  • the host user When the host user confirms to start the live broadcast, he can initiate an instruction to start the broadcast mode through the entry or control provided by the application program, that is, the live broadcast program.
  • the live program will first query the authentication service and stream management service of the cloud server, and obtain the cloud address used by the cloud server to receive the video stream of the host user.
  • the live program uses the broadcast mechanism of the second operating system. A message containing the cloud address is broadcast in the simulation operating environment, and the simulation program obtains the message and writes it into a socket or file for reading by the first operating system.
  • the first operating system is triggered by this message, and can obtain the cloud address through a stream control program such as the aforementioned, and then call the remote interface to push the video stream to the remote server pointed to by the cloud address, and the remote server will The video stream is pushed to the users in the live broadcast room.
  • a stream control program such as the aforementioned
  • Step S43 in response to the preview stop instruction acting on the application program, trigger the bottom layer driver of the first operating system to stop collecting the video stream:
  • the preview stop instruction is sent to the live broadcast program.
  • the instruction is transmitted to the first operating system through the simulation program in the form of broadcast, it triggers the underlying driver of the first operating system to stop collecting the said The video stream, correspondingly, closes the start state and enters the stop state.
  • the live broadcast program functions as a playback controller for the video stream in the live broadcast room. Although it runs in the memory space of the simulated operating environment based on the first operating system, It was developed for the second operating system. Therefore, developers do not need to develop and maintain the live program for the first operating system, as long as the live program includes a configuration that can be switched to run in the simulated operating environment. When the live program leaves the first operating system and runs in the real second operating system, it can still resume its normal function of collecting and pushing video streams by relying on its own software design logic.
  • a client including a central processing unit and a memory, and the central processing unit is configured to call and run the live program, streaming program, and bridge program stored in the memory. Any one or any more of them can execute each step in the above-mentioned related method embodiment of the present invention corresponding to each program, so as to facilitate the physical manipulation of the anchor user.
  • the present invention can prevent programmers from developing different live programs for different operating systems, and can provide host users with live programs developed for the second operating system on a personal computer using the first operating system, and can ensure The image quality of the video stream collected by the live video broadcast.
  • the package of the present invention relates to a device for performing one or more of the operations and methods described in the present invention.
  • These devices may be specially designed and manufactured for the required purpose, or may also include known devices in general-purpose computers.
  • These devices have computer programs stored in their memory, which are selectively activated or reconfigured.
  • Such a computer program may be stored in a device (for example, a computer) readable medium or in any type of medium suitable for storing electronic instructions and respectively coupled to a bus.
  • the computer readable medium includes, but is not limited to, any Types of disks (including floppy disks, hard disks, CD-ROMs, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory) , Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the readable medium includes any medium that stores or transmits information in a readable form by a device (for example, a computer).
  • a device for example, a computer.

Abstract

A video live-streaming control, bridging, stream control and broadcast control methods, and a client. Said control method comprises: when a live-streaming program is started by a simulation program which is running in a current first operating system and used for simulating a running environment of a second operating system, establishing a communication channel between the live-streaming program and a stream control program running in the first operating system; after the live-streaming program starts a preview mode, broadcasting a live-streaming-start preview message, and the simulation program notifying a stream control program of the live-streaming-start preview message, so as to trigger the stream control program to enter a preview state and to open a preview window to display a video stream; and after the live-streaming program starts a live-streaming-start mode, broadcasting a cloud address message which is acquired by the live-streaming program and used for receiving the video stream, and the simulation program notifying the stream control program of the cloud address message, so as to trigger the stream control program to enter a live-streaming-start state and to transmit the video stream to a cloud address. The present invention can prevent program personnel from developing different live-streaming programs for different operating systems, and can ensure the image quality of video streams collected by video live streaming.

Description

视频直播控制、桥接、流控、播控方法及客户端Video live broadcast control, bridging, flow control, broadcast control method and client
本申请要求于2020年4月10日提交中国专利局、申请号为202010281352.4、发明名称为“视频直播控制、桥接、流控、播控方法及客户端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on April 10, 2020, the application number is 202010281352.4, and the invention title is "Video Live Control, Bridge, Stream Control, Broadcast Control Method and Client", all of which The content is incorporated in this application by reference.
技术领域Technical field
本发明涉及计算机系统通信技术,尤其涉及一种视频直播控制方法及相应的客户端,相应也涉及该控制方法执行期间相关的视频直接桥接方法、视频直播流控方法以及视频直播播控方法。The present invention relates to computer system communication technology, in particular to a video live broadcast control method and a corresponding client, and correspondingly relates to a video direct bridge method, a video live streaming control method, and a video live broadcast control method during the execution of the control method.
背景技术Background technique
在一种操作系统中通过模拟器运行为另一操作系统开发的应用程序的技术虽然已经非常普遍,但在一些特殊的应用场景中,仍然存在很多技术障碍。一个非常普遍的场景中,在涉及到需要与云端交换大流量音视频数据的情况下,由于跨系统交互涉及到的一些效率问题,常出现不理想的情况。Although the technology of running an application program developed for another operating system through an emulator in one operating system is very common, there are still many technical obstacles in some special application scenarios. In a very common scenario, when it involves the need to exchange large-volume audio and video data with the cloud, due to some efficiency issues involved in cross-system interaction, unsatisfactory situations often occur.
举例而言,最为基本的应用情况下,互联网视频直播平台在发布开播工具的时候,为了保证各个平台的主播都能覆盖到,通常会发布三个应用:PC开播应用、Android开播应用、IOS开播应用。这三个应用分别运行在windows系统的电脑上、Android手机上和苹果手机上。For example, in the most basic application situation, when the Internet video live broadcast platform releases the launching tool, in order to ensure that the anchors of each platform can be covered, three applications are usually released: PC launching application, Android launching application, IOS launching application. These three applications run on windows system computers, Android phones and Apple phones respectively.
这三个应用的大部分业务功能完全相同,但由于这三个应用的开发语言和开发环境完全不同,就导致同一个业务场景,需要PC研发、Android研发、IOS研发分别开发一遍。并且在后期维护的过程中,也需要三个平台的研发对该应用分别进行维护,这样做就会造成不必要的人力浪费。Most of the business functions of these three applications are exactly the same, but because the development languages and development environments of these three applications are completely different, the same business scenario requires PC R&D, Android R&D, and IOS R&D to be developed separately. And in the later maintenance process, it also needs the research and development of three platforms to maintain the application separately, which will cause unnecessary waste of manpower.
在这种背景下,为了节省掉PC那一部分的工期,开发者会选择让主播端在PC上安装定制的模拟器,先在PC机器上建立起适合Android的App运行的环境,然后在模拟器里面安装Android开播工具,这样研发只需要开发Android开播应用,就可以满足PC、Android这两个平台的使用需求。In this context, in order to save the PC part of the construction period, the developer will choose to let the anchor install a customized emulator on the PC, first establish an environment suitable for Android App running on the PC machine, and then use the emulator The Android launch tool is installed inside, so that R&D only needs to develop the Android launch application to meet the needs of the PC and Android platforms.
这种方案虽然节省了PC研发的人力,但是也存在一些问题,实际运行中发现,由于开播预览页面并不是完全的PC端采集和显示,导致有一部分的机型会出现花屏、卡顿等问题,导致相应的直播间性能也非常的差,从而严重影响直播的用户体验。Although this solution saves the manpower of PC research and development, it also has some problems. In actual operation, it is found that because the preview page of the start-up is not completely collected and displayed on the PC side, some models will have problems such as blurred screens and freezes. , The performance of the corresponding live broadcast room is also very poor, which seriously affects the user experience of the live broadcast.
理论上,不局限于PC端的Windows操作系统和手机端的Android操作系统,只要涉及到在一个操作系统中运行为另一操作系统开发的应用程序,特别是涉及到如直播这种应用需求时,均可能遭遇相同或相似的情形。In theory, it is not limited to the Windows operating system on the PC side and the Android operating system on the mobile phone, as long as it involves running an application developed for another operating system in one operating system, especially when it comes to application requirements such as live broadcasting. May encounter the same or similar situations.
发明内容Summary of the invention
本发明出于避免重复开发的第一目的而提供一种视频直播控制方法、一种视频直播桥接方法、一种视频直播流控方法以及一种视频直播播控方法。The present invention provides a live video control method, a live video bridge bridging method, a live video streaming control method, and a live video broadcast control method for the first purpose of avoiding repeated development.
本发明的第二目的在于提供一种客户端,以便为第一目的的和种方法实现硬件支持。The second object of the present invention is to provide a client terminal, so as to realize hardware support for the first object and the method.
为满足本发明的各个目的,本发明提供如下技术方案:In order to meet the various objectives of the present invention, the present invention provides the following technical solutions:
本发明的一种视频直播控制方法,包括如下步骤:The video live broadcast control method of the present invention includes the following steps:
运行在当前第一操作系统的用于模拟第二操作系统的运行环境的模拟程序启动直播程序时,模拟程序建立运行于所述运行环境中的所述直播程序与运行于第一操作系统中的流控程序的通信通道;When the simulation program running in the current first operating system for simulating the operating environment of the second operating system starts the live program, the simulation program establishes the live program running in the operating environment and the live program running in the first operating system. The communication channel of the flow control program;
所述直播程序启动预览模式后,广播开播预览消息,模拟程序将该开播预览消息通知流控程序以触发其进入预览状态,使其开启预览窗口用于显示其所采集的视频流;After the live broadcast program starts the preview mode, the broadcast start preview message is broadcast, and the simulation program notifies the flow control program of the start preview message to trigger it to enter the preview state, so that it opens a preview window to display the video stream it collects;
所述直播程序启动开播模式后,广播其所获取的用于接收所述视频流的云端地址消息,模拟程序将该云端地址消息通知给流控程序,以触发其进入开播状态,使其向相应的云端地址传输所述的视频流。After the live broadcast program starts the broadcast mode, it broadcasts the cloud address message it has acquired for receiving the video stream, and the simulation program notifies the cloud address message to the streaming control program to trigger it to enter the broadcast state and make it broadcast to the corresponding The cloud address to transmit the video stream.
进一步的实施例中,本方法还包括如下步骤:In a further embodiment, the method further includes the following steps:
直播程序关闭时,广播预览停播消息,模拟程序将该预览停播消息通知流控程序以触发其进入停播状态,停止向云端地址推送所述视频流。When the live broadcast program is closed, the broadcast preview stop message, the simulation program notifies the stream control program of the preview stop message to trigger it to enter the stop broadcast state, and stop pushing the video stream to the cloud address.
较佳的实施例中,所述通信通道包括直播程序与模拟程序之间的第一 直接通道和所述模拟程序与所述流控程序之间的第二直接通道。In a preferred embodiment, the communication channel includes a first direct channel between a live program and a simulation program and a second direct channel between the simulation program and the flow control program.
部分实施例中,按照如下方式建立所述的第一直接通道:所述直播程序携带注册到所述模拟运行环境中的服务组件,所述模拟程序携带注册到所述模拟运行环境中的广播接收器,所述模拟程序通过该服务组件构建的服务进程向该直播程序传递所述流控程序产生的消息;所述模拟程序通过所述广播接收器接收所述直播程序广播的消息,将其传递给所述的流控程序。In some embodiments, the first direct channel is established as follows: the live program carries service components registered in the simulation running environment, and the simulation program carries broadcast receivers registered in the simulation running environment The simulation program transmits the messages generated by the flow control program to the live program through the service process constructed by the service component; the simulation program receives the messages broadcast by the live program through the broadcast receiver and transmits them Give the described flow control program.
部分实施例中,按照如下方式建立所述的第二直接通道:所述模拟程序与所述流控程序之间通过彼此读写套接字或文件的方式建立所述的第二直接通道。In some embodiments, the second direct channel is established as follows: the second direct channel is established between the simulation program and the flow control program by reading and writing sockets or files with each other.
较佳的实施例中,所述模拟程序与流控程序适于运行于当前第一操作系统,所述直播程序适于运行于区别于当前操作系统的第二操作系统,所述模拟程序适于在第一操作系统中模拟所述第二操作系统而为该直播程序创建相应的模拟运行环境。In a preferred embodiment, the simulation program and the flow control program are suitable for running on the current first operating system, the live broadcast program is suitable for running on a second operating system that is different from the current operating system, and the simulation program is suitable for Simulate the second operating system in the first operating system to create a corresponding simulated running environment for the live program.
部分实施实施例中,所述第一操作系统为Windows或基于Linux、Unix的操作系统中的任意一种,所述第二操作系统为与第一操作系统相异的Android、IOS、Linux、Windows操作系统中的任意一种。In some embodiments, the first operating system is any one of Windows or operating systems based on Linux and Unix, and the second operating system is Android, IOS, Linux, Windows that are different from the first operating system. Any of the operating systems.
较佳的实施例中,所述模拟程序建立所述通信通道的过程中,将直播程序代表其主进程的应用包名及代表其服务进程的服务名传递给所述流控程序,以供所述流控程序识别所述直播程序的主进程和服务进程以便确定消息传递身份。In a preferred embodiment, in the process of establishing the communication channel by the simulation program, the application package name representing the main process of the live program and the service name representing its service process are passed to the flow control program for all The flow control program identifies the main process and the service process of the live broadcast program to determine the identity of message delivery.
部分实施例中,所述流控程序进入预览状态时,开启用于控制其所采集的视频流的工具容器,该工具容器包括至少一个能够影响所述预览窗口的预览视频的特效的控件,作用于该控件而产生的消息通过所述通信通道传递给所述的直播程序。In some embodiments, when the flow control program enters the preview state, a tool container for controlling the video stream collected by the flow control program is opened. The tool container includes at least one control that can affect the special effects of the preview video in the preview window. The message generated from the control is transmitted to the live broadcast program through the communication channel.
较佳的实施例中,所述流控程序进入停播状态时,关闭所述的预览窗口。In a preferred embodiment, the preview window is closed when the flow control program enters the stop state.
本发明的一种视频直播桥接方法,包括如下步骤:A method for bridging video live broadcast of the present invention includes the following steps:
创建区别于当前第一操作系统的第二操作系统模拟运行环境,供运行 直播程序;Create a second operating system simulation operating environment that is different from the current first operating system for running live broadcast programs;
建立所述直播程序到在当前第一操作系统中运行的流控程序之间的通信通道;Establishing a communication channel between the live broadcast program and the flow control program running in the current first operating system;
经由所述的通信通道,转发所述直播程序广播的开播预览消息给所述流控程序,触发其进入预览状态以便预览其所采集的视频流;Forward the start preview message broadcast by the live broadcast program to the flow control program via the communication channel, and trigger it to enter the preview state so as to preview the video stream it collects;
经由所述的通信通道,转发所述直播程序广播的云端地址消息给所述流控程序,触发其进入开播状态,以向所述云端地址推送所述的视频流。Through the communication channel, forward the cloud address message broadcast by the live broadcast program to the flow control program, triggering it to enter the on-air state, so as to push the video stream to the cloud address.
进一步的实施例中,本方法还包括如下步骤:In a further embodiment, the method further includes the following steps:
经由所述的通信通道,转发所述直播程序广播的预览停播消息给所述流控程序,触发其进入停播状态,以结束所述视频流的推送。Via the communication channel, forward the preview stop broadcast message broadcast by the live broadcast program to the stream control program, triggering it to enter the stop broadcast state, so as to end the push of the video stream.
较佳的实施例中,所述通信通道包括由本方法所实现的模拟程序与直播程序之间的第一直接通道和所述模拟程序与所述流控程序之间的第二直接通道。In a preferred embodiment, the communication channel includes a first direct channel between the simulation program and the live program implemented by the method, and a second direct channel between the simulation program and the flow control program.
部分实施例中,按照如下方式建立所述的第一直接通道:所述直播程序携带注册到所述模拟运行环境中的服务组件,所述模拟程序携带注册到所述模拟运行环境中的广播接收器,所述模拟程序通过该服务组件构建的服务进程向该直播程序传递所述流控程序产生的消息;所述模拟程序通过所述广播接收器接收所述直播程序广播的消息,将其传递给所述的流控程序。In some embodiments, the first direct channel is established as follows: the live program carries service components registered in the simulation running environment, and the simulation program carries broadcast receivers registered in the simulation running environment The simulation program transmits the messages generated by the flow control program to the live program through the service process constructed by the service component; the simulation program receives the messages broadcast by the live program through the broadcast receiver and transmits them Give the described flow control program.
部分实施例中,按照如下方式建立所述的第二直接通道:所述模拟程序与所述流控程序之间通过彼此读写套接字或文件的方式建立所述的第二直接通道。In some embodiments, the second direct channel is established as follows: the second direct channel is established between the simulation program and the flow control program by reading and writing sockets or files with each other.
较佳的实施例中,所述模拟程序建立所述通信通道的过程中,将直播程序代表其主进程的应用包名及代表其服务进程的服务名传递给所述流控程序,以供所述流控程序识别所述直播程序的主进程和服务进程以便确定消息传递身份。In a preferred embodiment, in the process of establishing the communication channel by the simulation program, the application package name representing the main process of the live program and the service name representing its service process are passed to the flow control program for all The flow control program identifies the main process and the service process of the live broadcast program to determine the identity of message delivery.
本发明的一种视频直播流控方法,包括如下步骤:A video live streaming method of the present invention includes the following steps:
接收用于提供第二操作系统的模拟运行环境的模拟程序转发的开播预览消息,启动预览窗口显示经由当前第一操作系统的底层驱动采集的视频 流,进入预览状态;Receiving a broadcast preview message forwarded by a simulation program used to provide a simulated running environment of the second operating system, start a preview window to display the video stream collected by the current bottom layer driver of the first operating system, and enter the preview state;
接收所述模拟程序传递的包含云端地址的消息,进入开播状态,向该云端地址推送所述的视频流;Receiving the message containing the cloud address transmitted by the simulation program, entering the on-air state, and pushing the video stream to the cloud address;
接收所述模拟程序传递的预览停播消息,进入停播状态,结束所述视频流的推送。Receive the preview stop broadcast message delivered by the simulation program, enter the stop broadcast state, and end the push of the video stream.
部分实施例中,当进入预览状态时,开启用于控制所述视频流的工具容器,该工具容器包括至少一个能够影响所述预览窗口的预览视频的特效的控件。In some embodiments, when entering the preview state, a tool container for controlling the video stream is opened, and the tool container includes at least one control that can affect the special effect of the preview video in the preview window.
部分实施例中,当进入停播状态时,关闭所述的预览窗口。In some embodiments, when entering the stop state, the preview window is closed.
较多佳的实施例中,实现了本方法的流控程序与所述模拟程序之间,通过彼此读写套接字或文件的方式实现通信,以实现所述消息的传递。In a more preferred embodiment, the flow control program that implements this method and the simulation program realize communication by reading and writing sockets or files with each other, so as to realize the transmission of the message.
部分实施例中,实现了本方法的流控程序向模拟程序发送通知消息,以便使该通知消息显示到该模拟程序创建的所述模拟运行环境中。In some embodiments, the flow control program that implements the method sends a notification message to the simulation program, so that the notification message is displayed in the simulation running environment created by the simulation program.
本发明的一种视频直播播控方法,包括如下步骤:A method for controlling live video broadcasting of the present invention includes the following steps:
响应于在第二操作系统模拟运行环境中作用于本应用程序的启动预览模式指令,触发提供该模拟运行环境的第一操作系统中显示预览窗口,以显示经由该第一操作系统的底层驱动所采集的视频流;In response to the start preview mode command acting on the application in the second operating system simulation running environment, triggering the display of the preview window in the first operating system that provides the simulation running environment to display the commands via the underlying driver of the first operating system The captured video stream;
响应于作用于本应用程序的启动开播模式指令,触发所述第一操作系统调用远程接口将该视频流推送到本应用程序获取并提供的云端地址;In response to the start-up mode instruction acting on the application program, triggering the first operating system to call the remote interface to push the video stream to the cloud address obtained and provided by the application program;
响应于作用于本应用程序的预览停播指令,触发所述第一操作系统的底层驱动停止采集所述的视频流。In response to the preview stop instruction acting on the application program, the bottom layer driver of the first operating system is triggered to stop collecting the video stream.
进一步的实施例中,所述第一操作系统运行一模拟程序用于创建所述的第二操作系统模块运行环境,所述第一操作系统运行一流控程序用于实现对所述底层驱动采集视频流的动作和对推送所述视频流的动作的执行。In a further embodiment, the first operating system runs a simulation program for creating the operating environment of the second operating system module, and the first operating system runs a first-level control program for capturing video from the underlying driver The action of streaming and the execution of the action of pushing the video stream.
部分实施例中,实现了本方法的直播程序以第二操作系统的广播机制的广播方式发出消息以实现对所述第一操作系统的触发操作。In some embodiments, the live broadcast program that implements the method sends a message in the broadcast mode of the broadcast mechanism of the second operating system to implement the trigger operation on the first operating system.
部分实施例中,实现了本方法的直播程序携带用于接收所述第一操作系统中产生的消息的服务组件,以便将所述第一操作中产生的消息显示给用户。In some embodiments, the live program that implements the method carries a service component for receiving messages generated in the first operating system, so as to display the messages generated in the first operation to the user.
较佳的实施例中,所述第一操作系统为Windows或基于Linux、Unix的操作系统中的任意一种,所述第二操作系统为与第一操作系统相异的Android、IOS、Linux、Windows操作系统中的任意一种。In a preferred embodiment, the first operating system is any one of Windows or operating systems based on Linux and Unix, and the second operating system is Android, IOS, Linux, and Linux, which are different from the first operating system. Any of the Windows operating systems.
本发明的一种客户端,包括中央处理器和存储器,所述中央处理器用于调用运行存储于所述存储器中的一个或多个计算机程序以执行如前所述的各种由本发明第一目的提供的方法。A client of the present invention includes a central processing unit and a memory, and the central processing unit is used to call and run one or more computer programs stored in the memory to execute the various types of the first object of the present invention as described above. Provided method.
相对于现有技术,本发明的优势如下:Compared with the prior art, the advantages of the present invention are as follows:
本发明的视频直播控制方法,由运行于第一操作系统的流控程序负责采集推送视频流实现流控、由运行于第一操作系统的模拟程序负责创建第二操作系统模拟运行环境以加载运行直播程序并负责直播程序与流控程序之间的消息传递实现桥接、由直播程序承担起用户控制终端的作用而实现播控,由此,为第二操作系统开发的直播程序便可以运行于第一操作系统中,直播程序负责控制播放状态的控制,在模拟程序的桥接作用实现消息传递的辅助下,流控程序可以调用第一操作系统的底层驱动接口采集视频流并直接推送给由直播程序提供的云端地址,视频流无需经过模拟程序和直播程序中转,由此可大大提高视频流的推送效率,当视频流被云端服务器接收并推送到直播间用户的终端设备时,用户可以获得高保真的视频流而获得较为清晰的视频观看效果。据此,开发人员无需适应第一操作系统的机制和开发语言重新开发和维护另一版本的所述直播程序,可以大大节省程序开发消耗,而节省开发成本。In the live video control method of the present invention, the flow control program running on the first operating system is responsible for collecting and pushing video streams to realize flow control, and the simulation program running on the first operating system is responsible for creating a simulation operating environment of the second operating system to load and run. The live program is also responsible for the message transfer between the live program and the flow control program to realize the bridge, and the live program assumes the role of the user control terminal to realize the broadcast control. As a result, the live program developed for the second operating system can run on the second operating system. In an operating system, the live program is responsible for controlling the playback status. With the aid of the bridge function of the simulation program to achieve message transmission, the flow control program can call the underlying driver interface of the first operating system to collect the video stream and directly push it to the live program. With the provided cloud address, the video stream does not need to be transferred through the simulation program and the live program, which can greatly improve the push efficiency of the video stream. When the video stream is received by the cloud server and pushed to the terminal device of the user in the live broadcast room, the user can obtain high fidelity Video stream to obtain a clearer video viewing effect. Accordingly, developers do not need to adapt to the mechanism and development language of the first operating system to re-develop and maintain another version of the live program, which can greatly save program development consumption and development cost.
依据本发明的视频直播桥接方法所实现的模拟程序,不仅可以在第一操作系统中模拟出第二操作系统的运行环境,以便确保直播程序在其中正常调用和运行,而且,通过建立直播程序与流控程序之间的通信通道,实现消息桥接机制,在事实上为视频流和直播控制的分离创造了基础条件,推而广之,只要相关应用程序遵守该模拟程序的接口规范,该模拟程序便可为之服务,提供到所述流控程序之间的对接通道,因此,该桥接方法相当于为不同操作系统的应用程序提供了运行于第一操作系统且能实现视频流分离采集和推送的服务机制,便于互联网开发者适配调用,方便兼容不同开发者开发的第二操作系统的应用程序。The simulation program implemented by the video live streaming bridge method of the present invention can not only simulate the operating environment of the second operating system in the first operating system, so as to ensure that the live program is called and run normally, but also, through the establishment of the live program and The communication channel between flow control programs realizes the message bridging mechanism, which in fact creates the basic conditions for the separation of video streaming and live broadcast control. By extension, as long as the relevant application complies with the interface specification of the simulation program, the simulation program It can serve it and provide a docking channel between the flow control programs. Therefore, the bridging method is equivalent to providing applications of different operating systems running on the first operating system and enabling separate collection and push of video streams. The service mechanism is convenient for Internet developers to adapt and call, and it is convenient to be compatible with the application programs of the second operating system developed by different developers.
依据本发明的视频直播流控方法所实现的流控程序,其运行于第一操作系统,专门负责视频流的采集、推送和预览,且可通过相应的通信通道经模拟程序与为第二操作系统开发的直播程序提供推送视频流的服务,方便主播用户在第一操作系统(一般是PC机)上进行观看和操作,更方便操控,可获得更佳的预览效果。此外,由于其遵守了与模拟程序之间的通信通道的机制,例如通过套接字(Socket)或文件读写的方式与模拟程序实现消息传递,由此,实际上也相当于提供了标准接口,方便为不同的模拟程序服务,方便接入不同开发者为第二操作系统开发的虚拟机,从而便于通过匹配不同的虚拟机,在第一操作系统上兼容更多类型的第二操作系统的直播程序并为其提供推流服务。The flow control program implemented by the video live streaming method of the present invention runs on the first operating system and is specifically responsible for the collection, push and preview of the video stream, and can be used for the second operation through the simulation program through the corresponding communication channel. The live program developed by the system provides the service of pushing the video stream, which is convenient for the anchor users to watch and operate on the first operating system (usually a PC), which is more convenient to control and obtain better preview effects. In addition, since it complies with the mechanism of the communication channel with the simulation program, for example, it realizes message transfer with the simulation program through socket or file reading and writing, which is actually equivalent to providing a standard interface , It is convenient to serve different simulation programs, and it is convenient to access virtual machines developed by different developers for the second operating system, so that it is convenient to match different virtual machines to be compatible with more types of second operating systems on the first operating system. Live programs and provide push streaming services for them.
依据本发明的视频直播播控方法所实现的直播程序,只要按照该方法实现相关响应和消息广播,便可接入本发明的运行于第一操作系统的模拟程序,而运行于该模拟程序创建的模拟运行环境中,实现将自身的推流功能转移到第一操作系统进行预览、采集以及推送的效果,由此,理论上,直播程序还可以实现轻量开发,自身未必需要提供完整的预览、采集以及推送视频流的相关功能。当然,实际开发中,开发者往往会提供全功能的直播程序,无论如何,为第二操作系统开发的所述直播程序,只要遵守本播控方法的规范,便可接入所述的模拟程序,而虚拟运行于第一操作系统中,实现功能扩展,方便主播用户操作。The live program implemented by the video live broadcast control method of the present invention can access the simulation program running on the first operating system of the present invention as long as the relevant response and message broadcasting is implemented according to the method, and run on the simulation program created by the simulation program. In the simulated operating environment of, it realizes the effect of transferring its own streaming function to the first operating system for previewing, collecting and pushing. Therefore, in theory, the live program can also be developed lightly, and it does not necessarily need to provide a complete preview. , Capture and push video stream related functions. Of course, in actual development, developers often provide full-featured live broadcast programs. In any case, the live broadcast programs developed for the second operating system can access the simulation programs as long as they comply with the specifications of this broadcast control method. , And it runs virtually in the first operating system, which realizes function expansion and facilitates the operation of anchor users.
本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。The additional aspects and advantages of the present invention will be partly given in the following description, which will become obvious from the following description, or be understood through the practice of the present invention.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative work.
图1为本发明的视频直播控制方法的典型实施例的流程示意图;FIG. 1 is a schematic flowchart of a typical embodiment of the video live broadcast control method of the present invention;
图2为本发明的视频直播桥接方法的典型实施例的流程示意图;FIG. 2 is a schematic flowchart of a typical embodiment of the video live streaming bridge method of the present invention;
图3为本发明的视频直播流控方法的典型实施例的流程示意图;FIG. 3 is a schematic flowchart of a typical embodiment of a video live streaming method of the present invention;
图4为本发明的视频直播播控方法的典型实施例的流程示意图。FIG. 4 is a schematic flowchart of a typical embodiment of a method for controlling live video broadcasting according to the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals indicate the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the drawings are exemplary, and are only used to explain the present invention, but cannot be construed as limiting the present invention.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the described features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups of them. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or intervening elements may also be present. In addition, “connected” or “coupled” used herein may include wireless connection or wireless coupling. The term "and/or" as used herein includes all or any unit and all combinations of one or more associated listed items.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as those commonly understood by those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with the meaning in the context of the prior art, and unless specifically defined as here, they will not be idealized or overly Explain the formal meaning.
本技术领域技术人员可以理解,这里所使用的“客户端”、“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,进行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他诸如个人计算机、平板电脑之类的通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个 人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“客户端”、“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“客户端”、“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "client", "terminal", and "terminal device" used herein include both wireless signal receiver devices, which only have wireless signal receiver devices without transmitting capabilities, and include A device for receiving and transmitting hardware, which has a device capable of receiving and transmitting hardware for two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service, personal communication) System), which can combine voice, data processing, fax and/or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet/Intranet access, web browsers, and notes Notebook, calendar, and/or GPS (Global Positioning System) receiver; conventional laptop and/or palmtop computer or other equipment, which has and/or includes a conventional laptop and/or radio frequency receiver Palm-size computer or other equipment. The "client", "terminal", and "terminal device" used here may be portable, transportable, installed in vehicles (air, sea and/or land), or suitable and/or configured to be locally Operate, and/or in a distributed form, operate in any other location on the earth and/or space. The "client", "terminal", and "terminal device" used here can also be communication terminals, internet terminals, music/video playback terminals, such as PDA, MID (Mobile Internet Device, mobile Internet device) and/or Mobile phones with music/video playback functions can also be devices such as smart TVs and set-top boxes.
本发明所称的“服务器”、“客户端”、“服务节点”等名称所指向的硬件,本质上是具备个人计算机等效能力的设备,为具有中央处理器(包括运算器和控制器)、存储器、输入设备以及输出设备等冯诺依曼原理所揭示的必要构件的硬件装置,计算机程序存储于其存储器中,中央处理器将存储在外存中的程序调入内存中运行,执行程序中的指令,与输入输出设备交互,借此完成特定的功能。本发明所称的“服务器”这一概念,同理也可扩展到适用于服务器机群的情况。The hardware referred to by the names "server", "client", "service node" and so on in the present invention is essentially a device with the equivalent capabilities of a personal computer, which is a central processing unit (including arithmetic unit and controller) , Memory, input equipment, output equipment and other necessary components disclosed by the von Neumann principle. The computer program is stored in its memory. The central processing unit transfers the program stored in the external memory into the memory to run and execute the program. The command interacts with input and output devices to complete specific functions. The concept of "server" referred to in the present invention can also be extended to the situation of server clusters in the same way.
本发明是为视频直播的主播端的应用场景而提出的,在这种场景中,主播采用一台安装有第一操作系统例如Windows系统的个人计算机作为客户端,在桌面操作运行依据本发明的视频直播桥接方法实现的模拟程序和依据本发明的视频直播流控方法实现的流控程序,在模拟程序运行后形成的界面中,打开依据本发明的视频直播播控方法实现的适用于运行在第二操作系统中的直播程序,便可通过直播程序作为控制器,控制流控程序采集和预览视频流,进一步还可通过操作直播程序,驱动流控程序将视频流推送到云端服务器,由服务器推送给直播间中的用户观看。The present invention is proposed for the application scenario of the host side of live video. In this scenario, the host uses a personal computer installed with a first operating system, such as a Windows system, as a client, and runs the video according to the present invention on the desktop. The simulation program implemented by the live bridge method and the flow control program implemented according to the video live streaming control method of the present invention, in the interface formed after the simulation program runs, open the video live broadcast control method according to the present invention, which is suitable for running in the first Second, the live program in the operating system can use the live program as a controller to control the flow control program to collect and preview the video stream, and further can operate the live program to drive the flow control program to push the video stream to the cloud server, which is pushed by the server For users in the live broadcast room to watch.
应当理解,在这样的场景中,本发明所称的视频流,除非主播用户另行选择性控制,一般均可包括视频和音频两类流数据,而这些视频流也未 必是客户端的底层驱动所采集的原始数据,意味着主播用户可以藉由例如所述流控程序提供的特效工具对所述的视频和/或音频进行编辑和处理,以便流控程序最终将编辑和处理后的视频流推送给所述的云端服务器。It should be understood that in such a scenario, the video stream referred to in the present invention, unless otherwise selectively controlled by the host user, generally can include two types of stream data, video and audio, and these video streams may not be collected by the underlying driver of the client. The original data means that the anchor user can edit and process the video and/or audio with the special effects tools provided by the flow control program, so that the flow control program will finally push the edited and processed video stream to The cloud server.
本发明所涉及的第一操作系统与第二操作系统,均可以为目前已知的各种操作系统,也可以是未知的操作系统,包括适用于各种移动终端和个人计算机的操作系统。通常第一操作系统和第二操作系统是不同的操作系统,因此正好通过所述的模拟程序实现桥接。根据目前的操作系统生态,本发明的所述第一操作系统推荐使用Windows或基于Linux、Unix的操作系统中的任意一种,所述第二操作系统为与第一操作系统相异的Android、IOS、Linux、Windows操作系统中的任意一种。例如,本发明的后续揭示的各种实施例,为描述的方便,均可设定所述第一操作系统为Windows操作系统,而第二操作系统为Android操作系统,但不应理解本发明的第二操作系统排斥了包括IOS在内的其他操作系统。Both the first operating system and the second operating system involved in the present invention can be various currently known operating systems or unknown operating systems, including operating systems suitable for various mobile terminals and personal computers. Usually, the first operating system and the second operating system are different operating systems, so the bridging is just achieved through the simulation program. According to the current operating system ecology, the first operating system of the present invention recommends using any one of Windows or Linux and Unix-based operating systems, and the second operating system is Android, which is different from the first operating system. Any one of IOS, Linux, Windows operating system. For example, in various embodiments disclosed in the subsequent disclosure of the present invention, for the convenience of description, the first operating system can be set as the Windows operating system and the second operating system is the Android operating system. However, it should not be understood that the present invention The second operating system excludes other operating systems including IOS.
本发明所称的各程序,虽采用静态的表述,但本领域技术人员应当理解,当程序运行于个人计算机或相关设备中时,其在内存中表现为动态的进程,而进程的功能实现,正是程序的代码得以在计算机中执行使然,因此程序与进程之间的这种相应性,不应构成影响本发明的发明精神和保护范围的障碍。Although each program referred to in the present invention adopts a static expression, those skilled in the art should understand that when the program runs on a personal computer or related equipment, it appears as a dynamic process in the memory, and the function of the process is realized, It is the code of the program that can be executed in the computer, so this correspondence between the program and the process should not constitute an obstacle that affects the spirit of the invention and the scope of protection of the present invention.
需要指出的是,本发明即将揭示的各种方法的实施例,均是基于同一发明原理获得的不同部分或不同形式,因此,除非明文声明,否则,本领域技术人员不应因各实施例之间的分开阐述而机械分割各实施例之间的关联性。It should be pointed out that the embodiments of the various methods to be disclosed in the present invention are all different parts or different forms obtained based on the same inventive principle. Therefore, unless expressly stated otherwise, those skilled in the art should not rely on the differences in the various embodiments. Separate explanations between the two and mechanically divide the relevance between the various embodiments.
请参阅图1,本发明的视频直播控制方法的一种典型实施例中,该方法包括如下步骤:Please refer to FIG. 1. In a typical embodiment of the video live broadcast control method of the present invention, the method includes the following steps:
步骤S11,运行在当前第一操作系统的用于模拟第二操作系统的运行环境的模拟程序启动直播程序时,模拟程序建立运行于所述运行环境中的所述直播程序与运行于第一操作系统中的流控程序的通信通道:Step S11, when the simulation program running in the current first operating system for simulating the operating environment of the second operating system starts the live program, the simulation program establishes the live program running in the operating environment and runs in the first operation The communication channel of the flow control program in the system:
如前所述,本发明第一操作系统运行例如Windows操作系统,所述的 第二操作系统例如可为Android操作系统,所述直播程序适应Android的机制而开发,适于运行在Android操作系统的移动终端中。所述的流控程序和模拟程序均为Windows操作系统而开发。所述的流控程序事实上相当于开放了一个服务,可以采集视频流并实现在第一操作系统的桌面窗口中进行视频预览,且可将所采集的视频流推送到指定了云端地址的云端服务器处,以便该云端服务器可以将视频流推送给主播用户所控制的直播间的各个相关参与用户。As mentioned above, the first operating system of the present invention runs, for example, the Windows operating system, and the second operating system may be, for example, the Android operating system. In the mobile terminal. The flow control program and the simulation program are both developed by the Windows operating system. The said flow control program is actually equivalent to opening a service, which can collect video streams and realize video preview in the desktop window of the first operating system, and can push the collected video streams to the cloud with a designated cloud address. At the server, so that the cloud server can push the video stream to the relevant participating users in the live broadcast room controlled by the host user.
通常,主播用户会先行运行所述的流控程序和模拟程序,而开发者开发时,也可将模拟程序和流控程序集成为同一程序,使其彼此之间实现关联性调用,简化主播用户的启动操作。Usually, the anchor user will run the flow control program and the simulation program first, and when the developer develops, he can also integrate the simulation program and the flow control program into the same program, so that they can call each other associatively, simplifying the anchor user Start operation.
所述的流控程序初始启动时,默认处于停播状态,因而不必打开预览窗口(也可打开)和相应的工具容器,可处于后台运行。When the flow control program is initially started, it is in a stopped state by default, so there is no need to open the preview window (which can also be opened) and the corresponding tool container, and it can run in the background.
所述的模拟程序启动时,则负责创建所述第二操作系统的模拟运行环境实际上起到操作系统虚拟机的作用,最终提供一个第二操作系统操作界面,方便主播用户在其中安装、开启、关闭、卸载相关应用程序,包括所述的直播程序。When the simulation program is started, it is responsible for creating the simulation running environment of the second operating system, which actually functions as the operating system virtual machine, and finally provides a second operating system operation interface, which is convenient for the anchor user to install and start it. , Close and uninstall related applications, including the live broadcast program.
所述的模拟程序在其启动过程或者启动后,依照开发人员预设的协议机制,建立所述的通信通道。所述通信通道包括直播程序与模拟程序之间的第一直接通道和所述模拟程序与所述流控程序之间的第二直接通道。The simulation program establishes the communication channel in accordance with the protocol mechanism preset by the developer during or after the start-up process. The communication channel includes a first direct channel between a live program and a simulation program and a second direct channel between the simulation program and the flow control program.
第一直接通道主要是为了维持模拟程序与直播程序之间的消息传递,包括两个方向的消息传递,即模拟程序向直播程序传递的消息通道,和直播程序向模拟程序传递的消息通道。The first direct channel is mainly to maintain the message transmission between the simulation program and the live program, including two-direction message transmission, that is, the message channel from the simulation program to the live program and the message channel from the live program to the simulation program.
模拟程序向直播程序传递消息的消息通道,是通过利用直播程序所携带的服务组件来实现的。直播程序在开发时,便嵌入了服务组件相关的代码,在其Androidmanifest.xml配置信息文件中已经声明了该服务组件,因此,在直播程序运行时会被解析注册到模拟运行环境中,从而构造一个服务进程。所述模拟程序通过与该服务进程实施绑定并维护与其通信,实现进程间通信,便可通过该服务进程向直播程序发送消息,通常是转发传递所述流控程序产生的消息。The message channel through which the simulation program transmits messages to the live broadcast program is realized by using the service components carried by the live broadcast program. During the development of the live broadcast program, the code related to the service component is embedded, and the service component has been declared in its Androidmanifest.xml configuration information file. Therefore, when the live broadcast program is running, it will be parsed and registered in the simulation running environment to construct A service process. The simulation program implements binding with the service process and maintains communication with it to realize inter-process communication, and can send messages to the live program through the service process, usually by forwarding and transmitting the messages generated by the flow control program.
直播程序向模拟程序传递消息的消息通道,是通过直播程序运用第二操作系统自身的广播机制的方式,例如Android中的广播机制的方式,来实现消息广播的。而模拟程序中则在其Androidmanifest.xml文件中预先声明了一个广播接收器,这个广播接口器便可用于过滤和接收直播程序广播的各种消息。所述直播程序利用这个机制,将需要广播的消息包含到intent中实现广播,所述模拟程序通过其自身的广播接收器过滤和接收所述直播程序广播的消息,然后便可将其传递给所述的流控程序。The message channel through which the live broadcast program transmits messages to the simulation program implements message broadcast by using the broadcast mechanism of the second operating system itself, such as the broadcast mechanism in Android, by the live broadcast program. In the simulation program, a broadcast receiver is pre-declared in its Androidmanifest.xml file. This broadcast interface device can be used to filter and receive various messages broadcast by the live broadcast program. The live program uses this mechanism to include the messages that need to be broadcast into the intent to achieve broadcast. The simulation program filters and receives the messages broadcast by the live program through its own broadcast receiver, and then can deliver it to all The flow control program described.
第二通道主要是为了维持模拟程序与客户端在运行的所述流控程序之间的消息传递。由于模拟程序与流控程序均运行于同一操作系统中,所以,两者可以同理采用更为简便的方式来实现消息传递。例如在Windows操作系统中,模拟程序与流控程序之间,可以借助Windows系统的套接字(Socket)机制或者文件读写机制,彼此读写所述的套接字或文件,一写一读,来实现消息传递。The second channel is mainly to maintain the message transfer between the simulation program and the flow control program running on the client. Since both the simulation program and the flow control program run in the same operating system, the two can adopt a simpler way to achieve message transmission in the same way. For example, in the Windows operating system, between the simulation program and the flow control program, the socket mechanism or the file read and write mechanism of the Windows system can be used to read and write the socket or file, one write and one read , To achieve message delivery.
由此可见,经过上述的过程中,直播程序、模拟程序以及流控程序之间便起立了端到端的通信通道。It can be seen that after the above process, an end-to-end communication channel has been established between the live program, the simulation program, and the flow control program.
模拟程序理论上可以运行多个为第二操作系统开发的应用程序,因此,理论上可以允许其模拟运行环境中存在多个进程,为了避免多个进程同时发送消息导致混淆,或者为了明确这些进程中的任何一个作为消息接收对象,可以考虑让通信通道中的各方识别这些进程的身份。因此,一种变化的实施例中,在建立所述通信通道的过程中,所述模拟程序可以进一步将所述直播程序的代表其主进程的应用包名以及代表其服务进程的服务名传递给所述的流控程序,使得所述流控程序可以识别传递消息的发送身份,也可以明确其自身消息需要传递的对象的接收身份。由此,当流控程序通过套接字或文件接收到模拟程序传递过来的某直播程序的消息时,可依据应用程序包名和服务名确定其合法性;而当流控程序要向特定的直播程序发送消息时,便可在待传递的消息中指明接收对象,以便模拟程序将该消息正确传递给相应的主进程或服务进程。可见,通过让流控程序持有直播程序的应用包名和服务名,有利于流控程序识别所述直播程序的主进程和服务进程以便确定消息传递身份。The simulation program can theoretically run multiple applications developed for the second operating system. Therefore, in theory, it can be allowed to simulate multiple processes in the operating environment, in order to avoid confusion caused by multiple processes sending messages at the same time, or to clarify these processes As any one of them is the recipient of the message, you can consider letting the parties in the communication channel identify the identities of these processes. Therefore, in a modified embodiment, in the process of establishing the communication channel, the simulation program may further pass the application package name of the live program on behalf of its main process and the service name on behalf of its service process to The flow control program enables the flow control program to identify the sending identity of the message to be transmitted, and it can also clarify the receiving identity of the object whose message needs to be transmitted. Therefore, when the flow control program receives a live program message from the simulation program through a socket or file, its legitimacy can be determined based on the application package name and service name; and when the flow control program needs to broadcast to a specific live program When the program sends a message, it can specify the recipient in the message to be delivered, so that the simulation program can correctly deliver the message to the corresponding main process or service process. It can be seen that by allowing the flow control program to hold the application package name and service name of the live program, it is beneficial for the flow control program to identify the main process and service process of the live program to determine the message delivery identity.
步骤S12,所述直播程序启动预览模式后,广播开播预览消息,模拟程序将该开播预览消息通知流控程序以触发其进入预览状态,使其开启预览窗口用于显示其所采集的视频流:Step S12: After the live broadcast program starts the preview mode, the broadcast preview message is broadcast, and the simulation program notifies the flow control program of the broadcast preview message to trigger it to enter the preview state, so that it opens the preview window to display the video stream it collects:
在直播程序启动后,模拟程序也已经建立了所述的通信通道,因此,直播程序与所述流控程序之间便可通过所述模拟程序实现无障碍的通信,主播用户由此可以进行常规的直播操作。After the live broadcast program is started, the simulation program has also established the communication channel. Therefore, barrier-free communication between the live broadcast program and the flow control program can be realized through the simulation program, and the anchor user can perform regular routines. Live broadcast operation.
按照一般的直播控制程序,直播程序界面上会提供一个启动预览模式相关的入口或控件或其他控制方式,或者,直接在用户切换到某个页面上时,便视为启动预览模式。According to a general live broadcast control program, an entry or control or other control method related to the start of the preview mode will be provided on the live program interface, or directly when the user switches to a certain page, it is regarded as the start of the preview mode.
无论以何种方式发送预览指令促使直播程序进入所述的启动预览模式,直播程序均会在这一模式被触发后,以Android系统中的方法为例,构造一个intent,在所述的模拟运行环境中广播一个表征主播用户需要进行开播预览的消息,称为开播预览消息。No matter how the preview instruction is sent to prompt the live broadcast program to enter the start preview mode, the live broadcast program will be triggered in this mode, taking the method in the Android system as an example, construct an intent, and run it in the simulation Broadcasting a message in the environment that indicates that the anchor user needs to start the broadcast preview is called the start broadcast preview message.
依照Android的操作系统原理,模拟程序已注册的广播接收器会接收到该开播预览消息,过滤接收后,便可依照与流控程序协议好的规则和格式,将其写入相关的套接字或文件中。According to the operating system principle of Android, the broadcast receiver registered by the simulation program will receive the broadcast preview message, and after filtering the reception, it can write it to the relevant socket in accordance with the rules and format agreed with the flow control program Or in the file.
相应的,流控程序依照与模拟程序预协议的方法,从所述的套接字或文件中读取到该开播预览消息,受其触发,便使自身切换进入预览状态。在预览状态下,在当前窗口或者通过创建新窗口,打开一用于显示图像的预览窗口。与此同时,流控程序也会通过调用第一操作系统的底层驱动,控制摄像头和音频电路等为其采集视频流,除非主播用户有出于安全考虑禁止立即显示的设置,否则同步将视频流显示到所述的预览窗口中。Correspondingly, the flow control program reads the on-air preview message from the socket or file according to the method pre-agreeed with the simulation program, and is triggered by it to switch itself into the preview state. In the preview state, open a preview window for displaying images in the current window or by creating a new window. At the same time, the flow control program will also control the camera and audio circuit to collect the video stream for it by calling the underlying driver of the first operating system. Unless the host user has a setting that prohibits immediate display for safety reasons, the video stream will be synchronized. Displayed in the preview window.
可以理解,由于流控程序本身便是为第一操作系统开发的程序,不必经过不同操作系统机制的转换,因此,会具有更高的视频流获取效率,能够确保视频流获取质量,最小化时延和掉帧等问题的影响。It can be understood that since the flow control program itself is a program developed for the first operating system, it does not need to be converted by different operating system mechanisms. Therefore, it will have a higher video stream acquisition efficiency, ensure the video stream acquisition quality, and minimize the time The impact of problems such as delay and dropped frames.
通常,考虑到主播用户的需求,在一种变化的实施例中,在进入这一预览状态后,可以进一步随同所述预览窗口的调用显示,同步开户用于控制流控程序所采集的视频流的工具容器,通常表现为一个工具栏,可以是一个独立的窗口也可以是与其他窗口如预览窗口集成为同一窗口。所述的 工具容器通常可以提供多个控件,这些控件所实现的功能可以各不相同。一种典型的应用是在工具容器中提供一个或多个特效控件,主播用户可以通过操控一个或多个这样的控件,来对视频效果进行特效加工,使得最终在预览窗口中显示的视频图像出现相应的特效,并且这些特效可以叠加到视频流数据中,后续一同被推送给直播间用户观看。除此之外,所述工具容器当然也可以包括作用于预览窗口中的预览视频的实现其他不同功能的控件,本领域对此应当理解。Generally, taking into account the needs of the host user, in a modified embodiment, after entering this preview state, it can be further displayed along with the call of the preview window, and the synchronous account opening is used to control the video stream collected by the flow control program. The tool container is usually represented as a toolbar, which can be an independent window or integrated with other windows such as the preview window into the same window. The tool container can generally provide multiple controls, and the functions implemented by these controls may be different. A typical application is to provide one or more special effect controls in the tool container. The host user can manipulate one or more such controls to perform special effects processing on the video effect, so that the final video image displayed in the preview window appears Corresponding special effects, and these special effects can be superimposed on the video stream data, and subsequently pushed to the live room users to watch. In addition, the tool container may of course also include controls that act on the preview video in the preview window to achieve other different functions, which should be understood in the art.
为了便于直播程序的同步控制,在用户操作所述的工具容器的控件后,所述流控程序可以因应对控件的操控,产生相关消息,通过所述的通信通道回传给所述的直播程序,以便直播程序据此做进一步决策和处理。In order to facilitate the synchronization control of the live program, after the user operates the controls of the tool container, the flow control program can generate relevant messages in response to the manipulation of the controls, and send them back to the live program through the communication channel. , So that the live program can make further decisions and processing accordingly.
步骤S13,所述直播程序启动开播模式后,广播其所获取的用于接收所述视频流的云端地址消息,模拟程序将该云端地址消息通知给流控程序,以触发其进入开播状态,使其向相应的云端地址传输所述的视频流:Step S13: After the live broadcast program starts the broadcast mode, it broadcasts the cloud address message it has acquired for receiving the video stream, and the simulation program notifies the cloud address message to the streaming control program to trigger it to enter the broadcast state, so that It transmits the video stream to the corresponding cloud address:
当主播用户在预览模式下完成相关的设置之后,往往会正式开播,此时,可通过直播程序提供一的个控件或者通过任何其他为直播程序所认可的方式,向直播程序发起启动开播模式的指令。When the host user completes the relevant settings in the preview mode, the broadcast will often officially start. At this time, the live broadcast program can provide a control or any other method recognized by the live broadcast program to initiate the start of the broadcast mode to the live broadcast program. instruction.
所述直播程序受主播用户的开播指令的触发,依照程序开发者的设计逻辑,可以先向云端的服务器获取用来上传视频流的云端地址。通常的设计中,直播程序会查询云端服务器的鉴权服务通过鉴权之后,通过查询云端服务器的流管理服务来获取所述的云端地址。这些涉及安全和寻址的方式,均为本领域技术人员所知晓,也不影响本发明的创造精神和保护范围,恕不赘述。总之,直播程序通过一定的代码逻辑,将获得云端服务器提供的云端地址,该云端地址理论上既可用来由直播程序自行推送其自身采集的视频流,也可用来提供给所述流控程序进行推送流控程序采集的视频流,本发明重点在于后者。The live broadcast program is triggered by the start instruction of the host user, and according to the design logic of the program developer, the cloud address used to upload the video stream can be obtained from the cloud server first. In a usual design, the live broadcast program will query the authentication service of the cloud server after passing the authentication, and then obtain the cloud address by querying the stream management service of the cloud server. These methods involving security and addressing are all known to those skilled in the art, and do not affect the creative spirit and protection scope of the present invention, and will not be repeated. In short, the live broadcast program will obtain the cloud address provided by the cloud server through certain code logic. The cloud address can theoretically be used to push the video stream collected by the live broadcast program itself, or it can be used to provide the flow control program for execution. Pushing the video stream collected by the flow control program, the present invention focuses on the latter.
为了让所述流控程序进行推流,所述直播程序依照第二操作系统例如Android的广播机制,通过构造intent来广播一个云端地址消息,即将所述云端地址包含在intent中,成为消息体,在模拟运行环境中广播。In order for the streaming program to push streaming, the live streaming program broadcasts a cloud address message by constructing an intent according to the broadcast mechanism of the second operating system such as Android, that is, the cloud address is included in the intent and becomes the message body, Broadcast in a simulated operating environment.
同理,所述的模拟程序预注册的广播接收器会过滤并接收到该云端地 址消息,然后通过套接字或者文件的渠道进行写入操作,而所述的流控程序则对所述的套接字或者文件进行读操作,由此获得所述的云端地址消息,模拟程序也便完成了将该云端地址消息通知给流控程序的任务。In the same way, the broadcast receiver pre-registered by the simulation program will filter and receive the cloud address message, and then write through the socket or file channel, and the flow control program will The socket or file is read to obtain the cloud address message, and the simulation program also completes the task of notifying the cloud address message to the flow control program.
流控程序收到该云端地址消息后,受这一通知触发,便进入开播状态,于是便可调用第一操作系统的通信接口,向该云端地址传输所述的视频流,将视频流上传到对应的远程服务器,而远程服务器则会将这一视频流的直接或加工后推送给主播用户所在的直播间的各个用户,最终显示到这些用户的桌面上。After the stream control program receives the cloud address message, it is triggered by this notification and enters the on-air state, so it can call the communication interface of the first operating system, transmit the video stream to the cloud address, and upload the video stream to Corresponding remote server, and the remote server will push this video stream directly or after processing to each user in the live broadcast room where the anchor user is located, and finally display it on the desktop of these users.
同理,期间如果与远程服务器的通信中断,或者出现其他故障,所述流控程序均可按照上述的方式,通过所述的通信通道,逆向将相应的消息回传给直播程序,以便允许主播用户做进一步的调整和控制。In the same way, if the communication with the remote server is interrupted or other failures occur during the period, the flow control program can reversely send the corresponding message back to the live program through the communication channel in the above manner, so as to allow the host The user makes further adjustments and controls.
在这一典型实施例的基础上进一步发展的实施例中,还可以包括如下步骤:In an embodiment further developed on the basis of this typical embodiment, the following steps may also be included:
直播程序关闭时,广播预览停播消息,模拟程序将该预览停播消息通知流控程序以触发其进入停播状态,停止向云端地址推送所述视频流:When the live broadcast program is closed, the broadcast preview stop broadcast message, the simulation program notifies the stream control program of the preview stop broadcast message to trigger it to enter the stop broadcast state, and stop pushing the video stream to the cloud address:
当主播用户欲结束直播时,同理可以向直播程序发出预览停播指令,直播程序于是依照前述的广播机制构造一个消息体,广播预览停播消息。模拟程序通过其广播接收器过滤并接收到该预览停播消息后,将其通过套接字或文件的方式通知给所述的流控程序。所述流控程序通过读套接字或文件获得该通知之后,触发其自身切换到停播状态,于是可以关闭先前打开的预览窗口和/或工具容器,同步停止向所述云端地址推送所述的视频流,整个直播过程便告结束。When the host user wants to end the live broadcast, similarly, he can issue a preview stop broadcast instruction to the live broadcast program. The live broadcast program then constructs a message body according to the aforementioned broadcast mechanism to broadcast the preview stop broadcast message. After the simulation program filters through its broadcast receiver and receives the preview stop-broadcast message, it notifies it to the flow control program through a socket or a file. After the flow control program obtains the notification by reading the socket or the file, it triggers itself to switch to the stop state, so it can close the previously opened preview window and/or tool container, and synchronously stop pushing the cloud address to the cloud address. The entire live broadcast process is over.
由以上本发明的视频直播控制方法可以看出,该方法使得主播用户在个人计算机上的直播过程更加流畅,即使其使用的直播程序所适应操作系统并非该个人计算机在运行的操作系统,仍可藉由本方法的模拟程序和流控程序实现流畅高清的视频直播,相应的,开发人员只需开发一个直播程序,便可适用于两个操作系统。It can be seen from the above video live broadcast control method of the present invention that this method makes the live broadcast process of the host user on the personal computer more smooth, even if the operating system of the live broadcast program used by the host is not the operating system of the personal computer, it can still be used. The simulation program and the flow control program of this method realize smooth and high-definition video live broadcast. Accordingly, developers only need to develop one live broadcast program, which can be applied to two operating systems.
请参阅图2,本发明的视频直播桥接方法的典型实施例,实际上是在本 发明的视频直播控制方法的各个实施例的基础上获得的具体应用实例,是所述模拟程序的实现所依据的方法,因此其中涉及通信通道的建立原理和过程,恕不赘述。本方法包括如下步骤:Please refer to FIG. 2, a typical embodiment of the video live broadcast bridge method of the present invention is actually a specific application example obtained on the basis of each embodiment of the video live broadcast control method of the present invention, which is the basis for the realization of the simulation program Therefore, it involves the establishment principle and process of the communication channel, so I won’t repeat it. This method includes the following steps:
步骤S21,创建区别于当前第一操作系统的第二操作系统模拟运行环境,供运行直播程序:Step S21, creating a second operating system simulation operating environment different from the current first operating system for running the live program:
如前所述,当模拟程序充当操作系统虚拟机的作用,运行于第一操作系统如Windows中后,便创建第二操作系统如Android的模拟运行环境,以便运行充当视频流控制器的所述的直播程序。As mentioned earlier, when the simulation program acts as the virtual machine of the operating system and runs in the first operating system such as Windows, a simulation operating environment of the second operating system such as Android is created to run the video stream controller. Live program.
步骤S22,建立所述直播程序到在当前第一操作系统中运行的流控程序之间的通信通道:Step S22, establishing a communication channel between the live broadcast program and the flow control program running in the current first operating system:
模拟程序建立所述的模拟运行环境的过程中或者之后,便可通过套接字或文件读写的方式,与流控程序建立所述的第二直接通道,而与所述直播程序建立所述的第一直接通道,所述第一直接通道主要包括从直播程序采用广播机制发起的广播消息到模拟程序预注册的广播接收器之间的消息通道和反向从模拟程序到所述直播程序的服务组件所构建的服务进程之间的跨进程消息通道,两个直接通道的确立可用,便完成了所述通信通道建立过程,使得直播程序与流控程序之间可以通过所述模拟程序双向互通消息。During or after the simulation program establishes the simulation operating environment, the second direct channel can be established with the flow control program through sockets or file reading and writing, and the live program can be established with the live program. The first direct channel mainly includes the message channel from the broadcast message initiated by the live program using the broadcast mechanism to the broadcast receiver pre-registered by the simulation program, and the reverse from the simulation program to the live program The establishment of the cross-process message channel between the service processes constructed by the service component and the availability of two direct channels completes the establishment of the communication channel, so that the live program and the flow control program can communicate in both directions through the simulation program information.
步骤S23,经由所述的通信通道,转发所述直播程序广播的开播预览消息给所述流控程序,触发其进入预览状态以便预览其所采集的视频流:Step S23, forwarding the on-air preview message broadcast by the live program to the stream control program via the communication channel, and trigger it to enter the preview state so as to preview the video stream it collects:
参阅前述,模拟程序通过所述的通信通道,借助其广播接收器,后续接收到所述直播程序广播的开播预览消息后,便通过该通信通道,利用套接字或文件读写的方式,将所述开播预览消息传递给所述的流控程序,从而触发该流控程序进入预览状态,相应的,如前所述,该流控程序便可开始采集视频流,并将视频流输出到预览窗口中供主播用户预览。With reference to the foregoing, the simulation program uses the communication channel, with the aid of its broadcast receiver, to subsequently receive the start-up preview message broadcast by the live program, and then through the communication channel, use sockets or file read and write methods to transfer The broadcast preview message is passed to the flow control program, thereby triggering the flow control program to enter the preview state. Accordingly, as mentioned above, the flow control program can start to collect the video stream and output the video stream to the preview The window is for the anchor user to preview.
步骤S24,经由所述的通信通道,转发所述直播程序广播的云端地址消息给所述流控程序,触发其进入开播状态,以向所述云端地址推送所述的视频流:Step S24, forwarding the cloud address message broadcast by the live broadcast program to the stream control program via the communication channel, triggering it to enter the on-air state, so as to push the video stream to the cloud address:
同理,模拟程序通过所述的通信通道,借助其广播接收器,后续接收 到所述直播程序广播的云端地址消息后,便可通过该通信通道,利用套接字或文件读写的方式,将所述云端地址消息传递给所述的流控程序,从而触发该流控程序进入开播状态,在这一状态下,流控程序开始向所述的云端地址推送已经采集的视频流,该视频流可以进一步包含主播用户加载的特效。In the same way, after the simulation program receives the cloud address message broadcast by the live broadcast program through the communication channel, with the help of its broadcast receiver, it can use the socket or file reading and writing method through the communication channel. The cloud address message is passed to the flow control program, thereby triggering the flow control program to enter the broadcast state. In this state, the flow control program starts to push the collected video stream to the cloud address. The stream may further include special effects loaded by the host user.
在这一典型实施例的基础上进一步发展的实施例中,还可以包括如下步骤:In an embodiment further developed on the basis of this typical embodiment, the following steps may also be included:
经由所述的通信通道,转发所述直播程序广播的预览停播消息给所述流控程序,触发其进入停播状态,以结束所述视频流的推送:Via the communication channel, forward the preview stop broadcast message broadcast by the live broadcast program to the stream control program, and trigger it to enter the stop broadcast state to end the push of the video stream:
所述的模拟程序借助其广播接收器从通信通道中获得直播程序广播的预览停播消息后,同理通过写套接字或文件的方式将该消息传递给所述的流控程序。流控程序通过相应读套接字或文件获得该消息的通知,触发自身切换到停播状态,同时关闭此前已经打开的预览窗口、工具容器,停止向所述云端地址推送视频流,这种情况下,直播间用户也将无法获取主播用户的实时的视频流。After the simulation program obtains the preview stop message broadcast by the live program from the communication channel by means of its broadcast receiver, the message is transferred to the flow control program by writing a socket or a file in the same way. The stream control program obtains the notification of the message through the corresponding reading socket or file, triggers itself to switch to the stop broadcast state, and closes the preview window and tool container that have been opened before, and stops pushing the video stream to the cloud address. In this case, Users in the live broadcast room will also not be able to obtain the real-time video stream of the anchor user.
由以上本发明的视频直播桥接方法可以看出,模拟程序实际上发挥了操作系统虚拟机的作用,且为第一操作系统的流控程序和第二操作系统的直播程序起到桥梁的作用,只要模拟程序被实现为按照任意第二操作系统的逻辑而运行,那么,模拟程序实际上能为任意操作系统的所述直播程序提供运行环境,且能够令其与流控程序实现适配,起到标准化接口的作用,有助于避免开发人员针对直播程序本身进行的重复开发。It can be seen from the above video live streaming bridge method of the present invention that the simulation program actually plays the role of the operating system virtual machine and acts as a bridge between the flow control program of the first operating system and the live program of the second operating system. As long as the simulation program is implemented to run according to the logic of any second operating system, the simulation program can actually provide a running environment for the live program of any operating system, and it can be adapted to the flow control program. The role of standardized interfaces helps to avoid repeated development by developers for the live broadcast program itself.
请参阅图3,本发明的视频直播流控方法的典型实施例,实际上是在本发明的视频直播控制方法的各个实施例的基础上获得的具体应用实例,是所述流控程序的实现所依赖的方法,因此其中涉及通信通道的建立原理和过程,恕不赘述。本方法包括如下步骤:Please refer to FIG. 3, a typical embodiment of the video live streaming control method of the present invention is actually a specific application example obtained on the basis of the various embodiments of the video live streaming control method of the present invention, and is an implementation of the streaming control program. The method that it relies on, so it involves the establishment principle and process of the communication channel, so I won’t repeat it. This method includes the following steps:
步骤S31,接收用于提供第二操作系统的模拟运行环境的模拟程序转发的开播预览消息,启动预览窗口显示经由当前第一操作系统的底层驱动采集的视频流,进入预览状态:Step S31: Receive the start-up preview message forwarded by the simulation program used to provide the simulation running environment of the second operating system, start the preview window to display the video stream collected by the current bottom driver of the first operating system, and enter the preview state:
对于本发明的流控程序而言,当其运行时,默认处于停播状态,但其通过所述通信通道机制中所采用的套接字或文件,来获取模拟程序传递过来的消息。当其获取到由所述直播程序发起的所述的开播预览消息后,便触发自身进入预览状态,而启动一个预览窗口,同时调用当前第一操作系统的底层驱动,例如音频驱动或摄像头驱动,去采集视频流,将获得的视频流显示到该预览窗口中供主播用户预览。For the flow control program of the present invention, when it is running, it is in the off-broadcast state by default, but it uses the socket or file used in the communication channel mechanism to obtain the message passed by the simulation program. When it obtains the start preview message initiated by the live program, it triggers itself to enter the preview state, starts a preview window, and calls the underlying driver of the current first operating system, such as audio driver or camera driver, To capture the video stream, display the obtained video stream in the preview window for the anchor user to preview.
主播用户预览过程中,可能需要设置视频流显示效果,因此,通常可以提供一个所述的工具容器,在工具容器中提供一个或多个控件,通过操控该些控件,来为主播的视频流添加视频特效和/或音频特效,应当理解,这个特效最终可以呈现给直播间的用户。During the preview process of the host user, it may be necessary to set the display effect of the video stream. Therefore, it is usually possible to provide a tool container as described, and one or more controls are provided in the tool container. By manipulating these controls, you can add the video stream to the host. Video special effects and/or audio special effects, it should be understood that this special effect can eventually be presented to users in the live broadcast room.
步骤S32,接收所述模拟程序传递的包含云端地址的消息,进入开播状态,向该云端地址推送所述的视频流:Step S32: Receive the message containing the cloud address transmitted by the simulation program, enter the on-air state, and push the video stream to the cloud address:
流控程序在开播预览过程中,进一步会通过套接字或文件的方式获得直播程序广播而由模拟程序传递的所述的云端地址消息,从其中获得所述的云端地址,然后便可向该云端地址推送所述的视频流,意味着流控程序已经进入了所述的开播状态,经由远程服务器向直播间用户推送主播用户的视频流。During the preview process of the streaming program, it will further obtain the cloud address message broadcast by the live program and transmitted by the simulation program through a socket or file, obtain the cloud address from it, and then send it to the Pushing the video stream by the cloud address means that the stream control program has entered the start state, and the host user's video stream is pushed to the live room user via the remote server.
步骤S33,接收所述模拟程序传递的预览停播消息,进入停播状态,结束所述视频流的推送:Step S33: Receive the preview stop broadcast message delivered by the simulation program, enter the stop broadcast state, and end the push of the video stream:
流控程序在开播过程中,同理可以通过套接字或文件获得模拟程序传递过来的由所述直播程序广播的停播消息,由此而触发自身恢复到停播状态,这一状态下,流控程序会结束向所述云端地址推送本机采集的视频流。通常,结合前述可知,流控程序可以一并关闭已经打开的各种窗口和容器,包括所述的预览窗口和工具容器等。In the process of streaming, the streaming control program can obtain the stop-broadcast message broadcasted by the live program transmitted by the simulation program through the socket or file in the same way, thereby triggering itself to return to the stop-broadcasting state. In this state, The flow control program will end pushing the video stream collected by the machine to the cloud address. Generally, in combination with the foregoing, the flow control program can also close various open windows and containers, including the preview window and tool container.
在流控程序运行的过程中,特别是在其推送视频流的过程中,如果远程服务器返回相关信息,或者通信过程遭遇故障,或者遭遇其他任何需求,流控程序均可通过所述的套接字或文件向模拟程序发送通知消息,该通知消息可以被模拟程序通过服务进程反馈给直播程序,直播程序的主进程便可将其显示到模拟运行环境中的界面中,显示给主播用户知悉。During the operation of the flow control program, especially in the process of pushing video streams, if the remote server returns relevant information, or the communication process encounters a failure, or encounters any other requirements, the flow control program can pass through the socket The word or file sends a notification message to the simulation program. The notification message can be fed back to the live program by the simulation program through the service process, and the main process of the live program can display it on the interface in the simulation running environment for the anchor user to know.
由以上本发明的视频直播流控方法可以看出,流控程序起到了标准化的独立推送视频流的服务的作用,只要模拟程序与直播程序遵守其通信方式,便可对其实施调用,通过其向远程服务器采集和推送视频流。流控程序以这种方式开放服务的情况下,直播程序的开发人员的开发工作会变得简单,只需调试和适配模拟程序和已有的属于第二操作系统的直播程序,使其与流控程序即可。From the above video live streaming control method of the present invention, it can be seen that the streaming control program functions as a standardized and independent service for pushing video streams. As long as the simulation program and the live streaming program comply with their communication methods, they can be called. Collect and push video streams to remote servers. When the streaming program is opened for service in this way, the development work of the developers of the live program will become simple, and only need to debug and adapt the simulation program and the existing live program belonging to the second operating system to make it compatible with The flow control program is fine.
请参阅图4,本发明的视频直播播控方法的典型实施例,实际上是在本发明的视频直播控制方法的各个实施例的基础上获得的具体应用实例,是所述直播程序的实现所依赖的方法,因此其中涉及通信通道的建立原理和过程,恕不赘述。本方法包括如下步骤:Please refer to FIG. 4, the typical embodiment of the live video broadcast control method of the present invention is actually a specific application example obtained on the basis of the various embodiments of the live video control method of the present invention, and is a result of the implementation of the live broadcast program. Dependent method, so it involves the establishment principle and process of communication channel, so I won’t repeat it. This method includes the following steps:
步骤S41,响应于在第二操作系统模拟运行环境中作用于本应用程序的启动预览模式指令,触发提供该模拟运行环境的第一操作系统中显示预览窗口,以显示经由该第一操作系统的底层驱动所采集的视频流:Step S41, in response to the start preview mode command acting on the application program in the second operating system simulation running environment, trigger the display of the preview window in the first operating system providing the simulation running environment to display the information via the first operating system The video stream collected by the underlying driver:
如前所述,当所述流控程序和模拟程序运行于第一操作系统之后,便可以在模拟程序创建的第二操作系统模拟运行环境中安装并运行所述的直播程序,当所述直播程序启动后,由于直播程序中运用了第二操作系统的广播机制可以向模拟程序广播消息,且携带一服务组件可以构建与模拟程序通信的服务进程从而可以逆向接收模拟程序的消息,且由于模拟程序与流控程序之间通过彼此读写套接字和文件实现通信,因此,一旦直播程序成功运行,各程序之间的通信通道即告建立。As mentioned above, after the flow control program and the simulation program are running on the first operating system, the live program can be installed and run in the simulation running environment of the second operating system created by the simulation program. After the program is started, the broadcast mechanism of the second operating system is used in the live program to broadcast messages to the simulation program, and a service component can be carried to construct a service process that communicates with the simulation program, so that it can receive messages from the simulation program in reverse. The program and the flow control program communicate with each other through reading and writing sockets and files. Therefore, once the live broadcast program runs successfully, the communication channel between the programs is established.
在这种情况下,主播用户通过直播应用程序的用户界面操作,发起启动预览模式指令,该指令便以广播开播预览消息的方式,经模拟程序传递给第一操作系统,而第一操作系统中,可以藉由流控程序之类的服务来实现对该消息的读取和响应,从而按照所述流控程序的逻辑,在第一操作系统的桌面中显示一个预览容器,同时,调用第一操作系统的底层驱动采集视频流,将采集到的视频流输出该预览窗口中显示。In this case, the host user initiates the preview mode command through the user interface of the live broadcast application, and the command is transmitted to the first operating system through the simulation program in the form of broadcast start preview message, and the first operating system , The message can be read and responded to by a service such as a flow control program, so as to display a preview container on the desktop of the first operating system according to the logic of the flow control program, and at the same time, call the first The bottom layer driver of the operating system collects the video stream, and outputs the collected video stream for display in the preview window.
步骤S42,响应于作用于本应用程序的启动开播模式指令,触发所述第一操作系统调用远程接口将该视频流推送到本应用程序获取并提供的云端 地址:Step S42, in response to the start-up mode instruction acting on the application program, trigger the first operating system to call the remote interface to push the video stream to the cloud address obtained and provided by the application program:
当主播用户确认开始直播时,便可通过本应用程序即直播程序提供的入口或控件,发起启动开播模式指令。如前所述,直播程序会首先查询云端服务器的鉴权服务和流管理服务,获得云端服务器用于接收主播用户的视频流的云端地址,然而,直播程序以第二操作系统的广播机制的方式在模拟运行环境中广播包含该云端地址的消息,模拟程序获取该消息后写入套接入或文件中,供第一操作系统读取。第一操作系统被这一消息触发,可以通过一个例如前述的流控程序来获取该云端地址,然后调用远程接口将该视频流推送到该云端地址所指向的远程服务器处,由该远程服务器将视频流推送给直播间用户。When the host user confirms to start the live broadcast, he can initiate an instruction to start the broadcast mode through the entry or control provided by the application program, that is, the live broadcast program. As mentioned earlier, the live program will first query the authentication service and stream management service of the cloud server, and obtain the cloud address used by the cloud server to receive the video stream of the host user. However, the live program uses the broadcast mechanism of the second operating system. A message containing the cloud address is broadcast in the simulation operating environment, and the simulation program obtains the message and writes it into a socket or file for reading by the first operating system. The first operating system is triggered by this message, and can obtain the cloud address through a stream control program such as the aforementioned, and then call the remote interface to push the video stream to the remote server pointed to by the cloud address, and the remote server will The video stream is pushed to the users in the live broadcast room.
步骤S43,响应于作用于本应用程序的预览停播指令,触发所述第一操作系统的底层驱动停止采集所述的视频流:Step S43, in response to the preview stop instruction acting on the application program, trigger the bottom layer driver of the first operating system to stop collecting the video stream:
当主播用户确认结束直播时,同理向直播程序发送预览停播指令,该指令以广播的形式,经模拟程序传递给第一操作系统后,触发第一操作系统的底层驱动停止采集所述的视频流,相应的,也就关闭了所述开播状态,而进入停播状态。When the host user confirms the end of the live broadcast, similarly, the preview stop instruction is sent to the live broadcast program. After the instruction is transmitted to the first operating system through the simulation program in the form of broadcast, it triggers the underlying driver of the first operating system to stop collecting the said The video stream, correspondingly, closes the start state and enters the stop state.
根据这一典型实施例可知,理论上,只要第一操作系统支持实现所述流控程序和模拟程序的相关方法所实现的功能逻辑,无论这些程序是以服务还是以独立的程序的形式来提供,均不影响本典型实施例的实施。According to this exemplary embodiment, in theory, as long as the first operating system supports the realization of the functional logic realized by the related methods of the flow control program and the simulation program, whether these programs are provided in the form of services or independent programs , Does not affect the implementation of this exemplary embodiment.
由以上本发明的视频直播播控方法可以看出,直播程序起到了直播间的视频流的播放控制器的作用,虽然运行于在第一操作系统基础上的模拟运行环境的内存空间中,但却是为第二操作系统开发的,因此,开发人员不必为第一操作系统而专门开发和维护该直播程序,只要使该直播程序包含能够切换到运行于该模拟运行环境的配置即可,当直播程序离开第一操作系统而运行于真实的第二操作系统中时,也仍可恢复其正常的依靠自身软件设计逻辑进行的采集并推送视频流的功能。From the above video live broadcast control method of the present invention, it can be seen that the live broadcast program functions as a playback controller for the video stream in the live broadcast room. Although it runs in the memory space of the simulated operating environment based on the first operating system, It was developed for the second operating system. Therefore, developers do not need to develop and maintain the live program for the first operating system, as long as the live program includes a configuration that can be switched to run in the simulated operating environment. When the live program leaves the first operating system and runs in the real second operating system, it can still resume its normal function of collecting and pushing video streams by relying on its own software design logic.
本发明再一典型实施例中,提供一种客户端,包括中央处理器和存储器,所述中央处理器用于调用运行存储于所述存储器中的所述的直播程序、 流控程序、桥接程序中的任意一个或任意多个,以执行各个程序相应的本发明前述相关方法的实施例中的各个步骤,以便利主播用户的实体操控。In yet another exemplary embodiment of the present invention, a client is provided, including a central processing unit and a memory, and the central processing unit is configured to call and run the live program, streaming program, and bridge program stored in the memory. Any one or any more of them can execute each step in the above-mentioned related method embodiment of the present invention corresponding to each program, so as to facilitate the physical manipulation of the anchor user.
综上所述,本发明能够避免程序人员为不同操作系统开发不同的直播程序,而可为主播用户提供在个人计算机上利用第一操作系统运行为第二操作系统开发的直播程序,并能确保视频直播所采集的视频流的图像质量。In summary, the present invention can prevent programmers from developing different live programs for different operating systems, and can provide host users with live programs developed for the second operating system on a personal computer using the first operating system, and can ensure The image quality of the video stream collected by the live video broadcast.
本技术领域技术人员可以理解,本发明包涉及用于执行本发明中所述操作、方法中的一项或多项的设备。这些设备可以为所需的目的而专门设计和制造,或者也可以包括通用计算机中的已知设备。这些设备具有存储在其存储器之内的计算机程序,这些计算机程序选择性地激活或重构。这样的计算机程序可以被存储在设备(例如,计算机)可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何类型的介质中,所述计算机可读介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,可读介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。Those skilled in the art can understand that the package of the present invention relates to a device for performing one or more of the operations and methods described in the present invention. These devices may be specially designed and manufactured for the required purpose, or may also include known devices in general-purpose computers. These devices have computer programs stored in their memory, which are selectively activated or reconfigured. Such a computer program may be stored in a device (for example, a computer) readable medium or in any type of medium suitable for storing electronic instructions and respectively coupled to a bus. The computer readable medium includes, but is not limited to, any Types of disks (including floppy disks, hard disks, CD-ROMs, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory) , Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the readable medium includes any medium that stores or transmits information in a readable form by a device (for example, a computer).
本技术领域技术人员可以理解,可以用计算机程序指令来实现这些结构图和/或框图和/或流图中的每个框以及这些结构图和/或框图和/或流图中的框的组合。本技术领域技术人员可以理解,可以将这些计算机程序指令提供给通用计算机、专业计算机或其他可编程数据处理方法的处理器来实现,从而通过计算机或其他可编程数据处理方法的处理器来执行本发明公开的结构图和/或框图和/或流图的框或多个框中指定的方案。Those skilled in the art can understand that computer program instructions can be used to implement each block in these structural diagrams and/or block diagrams and/or flow diagrams and combinations of blocks in these structural diagrams and/or block diagrams and/or flow diagrams. . Those skilled in the art can understand that these computer program instructions can be provided to processors of general-purpose computers, professional computers, or other programmable data processing methods for implementation, so that the computer or other programmable data processing method processors can execute this The structure diagram and/or block diagram and/or flow diagram of the disclosure of the invention are specified in the block or multiple blocks.
本技术领域技术人员可以理解,本发明中已经讨论过的各种操作、方法、流程中的步骤、措施、方案可以被交替、更改、组合或删除。进一步地,具有本发明中已经讨论过的各种操作、方法、流程中的其他步骤、措 施、方案也可以被交替、更改、重排、分解、组合或删除。进一步地,现有技术中的具有与本发明中公开的各种操作、方法、流程中的步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。Those skilled in the art can understand that the various operations, methods, and steps, measures, and solutions in the process that have been discussed in the present invention can be alternated, changed, combined, or deleted. Further, various operations, methods, and other steps, measures, and solutions in the process that have been discussed in the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the various operations, methods, and procedures disclosed in the present invention in the prior art can also be alternated, changed, rearranged, decomposed, combined or deleted.
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only part of the embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications are also It should be regarded as the protection scope of the present invention.

Claims (27)

  1. 一种视频直播控制方法,其特征在于,包括如下步骤:A method for controlling live video broadcast is characterized in that it comprises the following steps:
    运行在当前第一操作系统的用于模拟第二操作系统的运行环境的模拟程序启动直播程序时,模拟程序建立运行于所述运行环境中的所述直播程序与运行于第一操作系统中的流控程序的通信通道;When the simulation program running in the current first operating system for simulating the operating environment of the second operating system starts the live program, the simulation program establishes the live program running in the operating environment and the live program running in the first operating system. The communication channel of the flow control program;
    所述直播程序启动预览模式后,广播开播预览消息,模拟程序将该开播预览消息通知流控程序以触发其进入预览状态,使其开启预览窗口用于显示其所采集的视频流;After the live broadcast program starts the preview mode, the broadcast start preview message is broadcast, and the simulation program notifies the flow control program of the start preview message to trigger it to enter the preview state, so that it opens a preview window to display the video stream it collects;
    所述直播程序启动开播模式后,广播其所获取的用于接收所述视频流的云端地址消息,模拟程序将该云端地址消息通知给流控程序,以触发其进入开播状态,使其向相应的云端地址传输所述的视频流。After the live broadcast program starts the broadcast mode, it broadcasts the cloud address message it has acquired for receiving the video stream, and the simulation program notifies the cloud address message to the streaming control program to trigger it to enter the broadcast state and make it broadcast to the corresponding The cloud address to transmit the video stream.
  2. 根据权利要求1所述的方法,其特征在于,还包括如下步骤:The method according to claim 1, characterized in that it further comprises the following steps:
    直播程序关闭时,广播预览停播消息,模拟程序将该预览停播消息通知流控程序以触发其进入停播状态,停止向云端地址推送所述视频流。When the live broadcast program is closed, the broadcast preview stop message, the simulation program notifies the stream control program of the preview stop message to trigger it to enter the stop broadcast state, and stop pushing the video stream to the cloud address.
  3. 根据权利要求1所述的方法,其特征在于,所述通信通道包括直播程序与模拟程序之间的第一直接通道和所述模拟程序与所述流控程序之间的第二直接通道。The method according to claim 1, wherein the communication channel comprises a first direct channel between a live program and a simulation program and a second direct channel between the simulation program and the flow control program.
  4. 根据权利要求3所述的方法,其特征在于,按照如下方式建立所述的第一直接通道:所述直播程序携带注册到所述模拟运行环境中的服务组件,所述模拟程序携带注册到所述模拟运行环境中的广播接收器,所述模拟程序通过该服务组件构建的服务进程向该直播程序传递所述流控程序产生的消息;所述模拟程序通过所述广播接收器接收所述直播程序广播的消息,将其传递给所述的流控程序。The method according to claim 3, wherein the first direct channel is established in the following manner: the live broadcast program carries service components registered in the simulation running environment, and the simulation program carries service components registered in the simulation operation environment. The broadcast receiver in the simulation operating environment, the simulation program transmits the message generated by the flow control program to the live program through the service process constructed by the service component; the simulation program receives the live broadcast through the broadcast receiver The message broadcast by the program is passed to the flow control program.
  5. 根据权利要求3所述的方法,其特征在于,按照如下方式建立所述的第二直接通道:所述模拟程序与所述流控程序之间通过彼此读写套接字或文件的方式建立所述的第二直接通道。The method according to claim 3, wherein the second direct channel is established in the following manner: the simulation program and the flow control program establish a socket or file by reading and writing to each other. The second direct channel described.
  6. 根据权利要求1所述的方法,其特征在于,所述模拟程序与流控程序适于运行于当前第一操作系统,所述直播程序适于运行于区别于当前操作系统的第二操作系统,所述模拟程序适于在第一操作系统中模拟所述第 二操作系统而为该直播程序创建相应的模拟运行环境。The method according to claim 1, wherein the simulation program and the flow control program are adapted to run on a current first operating system, and the live broadcast program is adapted to run on a second operating system different from the current operating system, The simulation program is suitable for simulating the second operating system in a first operating system to create a corresponding simulation running environment for the live program.
  7. 根据权利要求6所述的方法,其特征在于,所述第一操作系统为Windows或基于Linux、Unix的操作系统中的任意一种,所述第二操作系统为与第一操作系统相异的Android、IOS、Linux、Windows操作系统中的任意一种。The method according to claim 6, wherein the first operating system is any one of Windows or operating systems based on Linux and Unix, and the second operating system is different from the first operating system Any one of Android, IOS, Linux, Windows operating systems.
  8. 根据权利要求1所述的方法,其特征在于,所述模拟程序建立所述通信通道的过程中,将直播程序代表其主进程的应用包名及代表其服务进程的服务名传递给所述流控程序,以供所述流控程序识别所述直播程序的主进程和服务进程以便确定消息传递身份。The method according to claim 1, wherein, in the process of establishing the communication channel by the simulation program, the application package name representing the main process of the live program and the service name representing the service process of the live program are passed to the stream Control program for the flow control program to identify the main process and the service process of the live program to determine the message delivery identity.
  9. 根据权利要求1至8中任意一项所述的方法,其特征在于,所述流控程序进入预览状态时,开启用于控制其所采集的视频流的工具容器,该工具容器包括至少一个能够影响所述预览窗口的预览视频的特效的控件,作用于该控件而产生的消息通过所述通信通道传递给所述的直播程序。The method according to any one of claims 1 to 8, wherein when the flow control program enters the preview state, a tool container for controlling the video stream collected by the flow control program is opened, and the tool container includes at least one The control that affects the special effect of the preview video of the preview window, and the message generated by acting on the control is transmitted to the live program through the communication channel.
  10. 根据权利要求2所述的方法,其特征在于,所述流控程序进入停播状态时,关闭所述的预览窗口。The method according to claim 2, wherein the preview window is closed when the flow control program enters the stop state.
  11. 一种视频直播桥接方法,其特征在于,包括如下步骤:A bridging method for live video streaming, which is characterized in that it comprises the following steps:
    创建区别于当前第一操作系统的第二操作系统模拟运行环境,供运行直播程序;Create a second operating system simulation operating environment that is different from the current first operating system for running live broadcast programs;
    建立所述直播程序到在当前第一操作系统中运行的流控程序之间的通信通道;Establishing a communication channel between the live broadcast program and the flow control program running in the current first operating system;
    经由所述的通信通道,转发所述直播程序广播的开播预览消息给所述流控程序,触发其进入预览状态以便预览其所采集的视频流;Forward the start preview message broadcast by the live broadcast program to the flow control program via the communication channel, and trigger it to enter the preview state so as to preview the video stream it collects;
    经由所述的通信通道,转发所述直播程序广播的云端地址消息给所述流控程序,触发其进入开播状态,以向所述云端地址推送所述的视频流。Through the communication channel, forward the cloud address message broadcast by the live broadcast program to the flow control program, triggering it to enter the on-air state, so as to push the video stream to the cloud address.
  12. 根据权利要求11所述的方法,其特征在于,还包括如下步骤:The method according to claim 11, further comprising the following steps:
    经由所述的通信通道,转发所述直播程序广播的预览停播消息给所述流控程序,触发其进入停播状态,以结束所述视频流的推送。Via the communication channel, forward the preview stop broadcast message broadcast by the live broadcast program to the stream control program, triggering it to enter the stop broadcast state, so as to end the push of the video stream.
  13. 根据权利要求11所述的方法,其特征在于,所述通信通道包括由本方法所实现的模拟程序与直播程序之间的第一直接通道和所述模拟程序 与所述流控程序之间的第二直接通道。The method according to claim 11, wherein the communication channel comprises the first direct channel between the simulation program and the live program implemented by the method and the first direct channel between the simulation program and the flow control program. Two direct channels.
  14. 根据权利要求13所述的方法,其特征在于,按照如下方式建立所述的第一直接通道:所述直播程序携带注册到所述模拟运行环境中的服务组件,所述模拟程序携带注册到所述模拟运行环境中的广播接收器,所述模拟程序通过该服务组件构建的服务进程向该直播程序传递所述流控程序产生的消息;所述模拟程序通过所述广播接收器接收所述直播程序广播的消息,将其传递给所述的流控程序。The method according to claim 13, wherein the first direct channel is established in the following manner: the live broadcast program carries service components registered in the simulation running environment, and the simulation program carries service components registered in the simulation operation environment. The broadcast receiver in the simulation operating environment, the simulation program transmits the message generated by the flow control program to the live program through the service process constructed by the service component; the simulation program receives the live broadcast through the broadcast receiver The message broadcast by the program is passed to the flow control program.
  15. 根据权利要求13所述的方法,其特征在于,按照如下方式建立所述的第二直接通道:所述模拟程序与所述流控程序之间通过彼此读写套接字或文件的方式建立所述的第二直接通道。The method according to claim 13, wherein the second direct channel is established in the following manner: the simulation program and the flow control program establish a socket or file by reading and writing to each other. The second direct channel described.
  16. 根据权利要求1所述的方法,其特征在于,所述模拟程序建立所述通信通道的过程中,将直播程序代表其主进程的应用包名及代表其服务进程的服务名传递给所述流控程序,以供所述流控程序识别所述直播程序的主进程和服务进程以便确定消息传递身份。The method according to claim 1, wherein, in the process of establishing the communication channel by the simulation program, the application package name representing the main process of the live program and the service name representing the service process of the live program are passed to the stream Control program for the flow control program to identify the main process and the service process of the live program to determine the message delivery identity.
  17. 一种视频直播流控方法,其特征在于,包括如下步骤:A method for streaming video live broadcast, which is characterized in that it includes the following steps:
    接收用于提供第二操作系统的模拟运行环境的模拟程序转发的开播预览消息,启动预览窗口显示经由当前第一操作系统的底层驱动采集的视频流,进入预览状态;Receiving a broadcast preview message forwarded by a simulation program used to provide a simulated running environment of the second operating system, starting a preview window to display the video stream collected by the current bottom layer driver of the first operating system, and entering a preview state;
    接收所述模拟程序传递的包含云端地址的消息,进入开播状态,向该云端地址推送所述的视频流;Receiving the message containing the cloud address transmitted by the simulation program, entering the on-air state, and pushing the video stream to the cloud address;
    接收所述模拟程序传递的预览停播消息,进入停播状态,结束所述视频流的推送。Receive the preview stop broadcast message delivered by the simulation program, enter the stop broadcast state, and end the push of the video stream.
  18. 根据权利要求17所述的方法,其特征在于,当进入预览状态时,开启用于控制所述视频流的工具容器,该工具容器包括至少一个能够影响所述预览窗口的预览视频的特效的控件。The method according to claim 17, wherein when the preview state is entered, a tool container for controlling the video stream is opened, and the tool container includes at least one control capable of influencing a special effect of the preview video of the preview window .
  19. 根据权利要求17所述的方法,其特征在于,当进入停播状态时,关闭所述的预览窗口。18. The method according to claim 17, wherein the preview window is closed when the broadcast stop state is entered.
  20. 根据权利要求17至19中任意一项所述的方法,其特征在于,实现了本方法的流控程序与所述模拟程序之间,通过彼此读写套接字或文件 的方式实现通信,以实现所述消息的传递。The method according to any one of claims 17 to 19, wherein the flow control program that implements the method and the simulation program communicate with each other by reading and writing sockets or files, and Realize the delivery of the message.
  21. 根据权利要求20所述的方法,其特征在于,实现了本方法的流控程序向模拟程序发送通知消息,以便使该通知消息显示到该模拟程序创建的所述模拟运行环境中。The method according to claim 20, wherein the flow control program that implements the method sends a notification message to the simulation program, so that the notification message is displayed in the simulation running environment created by the simulation program.
  22. 一种视频直播播控方法,其特征在于,包括如下步骤:A method for controlling live video broadcasting, which is characterized in that it comprises the following steps:
    响应于在第二操作系统模拟运行环境中作用于本应用程序的启动预览模式指令,触发提供该模拟运行环境的第一操作系统中显示预览窗口,以显示经由该第一操作系统的底层驱动所采集的视频流;In response to the start preview mode command acting on the application in the second operating system simulation running environment, triggering the display of the preview window in the first operating system that provides the simulation running environment to display the commands via the underlying driver of the first operating system The captured video stream;
    响应于作用于本应用程序的启动开播模式指令,触发所述第一操作系统调用远程接口将该视频流推送到本应用程序获取并提供的云端地址;In response to the start-up mode instruction acting on the application program, triggering the first operating system to call the remote interface to push the video stream to the cloud address obtained and provided by the application program;
    响应于作用于本应用程序的预览停播指令,触发所述第一操作系统的底层驱动停止采集所述的视频流。In response to the preview stop instruction acting on the application program, the bottom layer driver of the first operating system is triggered to stop collecting the video stream.
  23. 根据权利要求22所述的方法,其特征在于,所述第一操作系统运行一模拟程序用于创建所述的第二操作系统模块运行环境,所述第一操作系统运行一流控程序用于实现对所述底层驱动采集视频流的动作和对推送所述视频流的动作的执行。22. The method of claim 22, wherein the first operating system runs a simulation program for creating the second operating system module operating environment, and the first operating system runs a first-level control program for implementing The execution of the action of collecting the video stream by the underlying driver and the action of pushing the video stream.
  24. 根据权利要求22所述的方法,其特征在于,实现了本方法的直播程序以第二操作系统的广播机制的广播方式发出消息,以实现对所述第一操作系统的触发操作。22. The method according to claim 22, wherein the live program that implements the method sends a message in the broadcasting mode of the broadcasting mechanism of the second operating system, so as to realize the trigger operation of the first operating system.
  25. 根据权利要求22所述的方法,其特征在于,实现了本方法的直播程序携带用于接收所述第一操作系统中产生的消息的服务组件,以便将所述第一操作中产生的消息显示给用户。The method according to claim 22, wherein the live program that implements the method carries a service component for receiving messages generated in the first operating system, so as to display the messages generated in the first operation To the user.
  26. 根据权利要求22至25所述的方法,其特征在于,所述第一操作系统为Windows或基于Linux、Unix的操作系统中的任意一种,所述第二操作系统为与第一操作系统相异的Android、IOS、Linux、Windows操作系统中的任意一种。The method according to claims 22 to 25, wherein the first operating system is any one of Windows or operating systems based on Linux and Unix, and the second operating system is similar to the first operating system. Any one of different Android, IOS, Linux, Windows operating systems.
  27. 一种客户端,包括中央处理器和存储器,其特征在于,所述中央处理器用于调用运行存储于所述存储器中的一个或多个计算机程序以执行如权利要求1至26中的任意一项所述的方法。A client, comprising a central processing unit and a memory, wherein the central processing unit is used to call and run one or more computer programs stored in the memory to execute any one of claims 1 to 26 The method described.
PCT/CN2021/085783 2020-04-10 2021-04-07 Video live-streaming control, bridging, stream control and broadcast control methods, and client WO2021204141A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010281352.4 2020-04-10
CN202010281352.4A CN111510780B (en) 2020-04-10 2020-04-10 Video live broadcast control, bridging, flow control and broadcast control method and client

Publications (1)

Publication Number Publication Date
WO2021204141A1 true WO2021204141A1 (en) 2021-10-14

Family

ID=71878698

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/085783 WO2021204141A1 (en) 2020-04-10 2021-04-07 Video live-streaming control, bridging, stream control and broadcast control methods, and client

Country Status (2)

Country Link
CN (1) CN111510780B (en)
WO (1) WO2021204141A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022669A (en) * 2022-05-31 2022-09-06 厦门蝉羽网络科技有限公司 Live broadcast system and live broadcast method based on information processing

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111510780B (en) * 2020-04-10 2021-10-26 广州方硅信息技术有限公司 Video live broadcast control, bridging, flow control and broadcast control method and client
CN114374852A (en) * 2020-10-14 2022-04-19 武汉斗鱼鱼乐网络科技有限公司 Method, device, equipment and medium for constructing special effect
CN113473158B (en) * 2021-06-30 2024-01-30 北京百度网讯科技有限公司 Live broadcast data processing method, device, electronic equipment and medium
CN113596561B (en) * 2021-07-29 2023-06-27 北京达佳互联信息技术有限公司 Video stream playing method, device, electronic equipment and computer readable storage medium
CN114363281A (en) * 2021-12-31 2022-04-15 阿里巴巴(中国)有限公司 Message transmission method, system, device, storage medium and program product
CN115103218B (en) * 2022-06-16 2023-09-19 广州市百果园网络科技有限公司 Data stream recovery method and device, equipment and medium thereof
CN116389801B (en) * 2023-05-31 2023-07-28 北京庭宇科技有限公司 Multi-terminal integrated cloud streaming client implementation method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142852A (en) * 2014-08-04 2014-11-12 福州靠谱网络有限公司 Method for achieving graph acceleration of android simulator on computer
CN105991700A (en) * 2015-02-06 2016-10-05 百度在线网络技术(北京)有限公司 Voice data processing method, cloud server system and terminal equipment
CN106445630A (en) * 2016-08-10 2017-02-22 北京奇虎科技有限公司 Android simulator and method for realizing Android simulator
CN109068179A (en) * 2018-09-17 2018-12-21 珠海市筑巢科技有限公司 A kind of multi-platform live broadcasting method, computer installation and computer readable storage medium
CN111510780A (en) * 2020-04-10 2020-08-07 广州华多网络科技有限公司 Video live broadcast control, bridging, flow control and broadcast control method and client

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8881222B2 (en) * 2009-09-23 2014-11-04 At&T Intellectual Property I, L.P. Multimedia interactive simulator
CN102204210A (en) * 2011-05-18 2011-09-28 华为技术有限公司 Method, server, and system for starting application
CN103309690B (en) * 2012-03-12 2016-08-17 联想(北京)有限公司 Process method and the electronic equipment of data
CN103327117B (en) * 2013-07-05 2017-02-08 百度在线网络技术(北京)有限公司 Cross-system running method and device for application programs
CN104007986A (en) * 2014-05-08 2014-08-27 郭伟 Cross-system remote real-time interaction technology
CN105335282A (en) * 2014-07-30 2016-02-17 国际商业机器公司 Method and system for cross-platform test of applications
US10326822B2 (en) * 2015-12-03 2019-06-18 Google Llc Methods, systems and media for presenting a virtual operating system on a display device
CN107996026A (en) * 2016-12-27 2018-05-04 深圳前海达闼云端智能科技有限公司 Multiple operating system multimedia coding-decoding method, device and electronic equipment
CN107077377B (en) * 2016-12-29 2020-08-04 深圳前海达闼云端智能科技有限公司 Equipment virtualization method, device and system, electronic equipment and computer program product
CN106874128B (en) * 2017-01-22 2020-11-20 广州华多网络科技有限公司 Data transmission method and device
CN106980481B (en) * 2017-03-28 2020-02-04 北京奇虎科技有限公司 Image display method and equipment
CN107220083B (en) * 2017-05-22 2020-12-18 南京航空航天大学 Method and system for installation-free operation of application program in android system
CN108762815B (en) * 2018-05-16 2021-01-01 北京麟卓信息科技有限公司 Method for realizing Android running environment based on non-virtualization system architecture
CN109544663B (en) * 2018-11-09 2023-01-06 腾讯科技(深圳)有限公司 Virtual scene recognition and interaction key position matching method and device of application program
CN109547812A (en) * 2019-01-22 2019-03-29 广州虎牙信息科技有限公司 A kind of live broadcasting method, device, mobile terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142852A (en) * 2014-08-04 2014-11-12 福州靠谱网络有限公司 Method for achieving graph acceleration of android simulator on computer
CN105991700A (en) * 2015-02-06 2016-10-05 百度在线网络技术(北京)有限公司 Voice data processing method, cloud server system and terminal equipment
CN106445630A (en) * 2016-08-10 2017-02-22 北京奇虎科技有限公司 Android simulator and method for realizing Android simulator
CN109068179A (en) * 2018-09-17 2018-12-21 珠海市筑巢科技有限公司 A kind of multi-platform live broadcasting method, computer installation and computer readable storage medium
CN111510780A (en) * 2020-04-10 2020-08-07 广州华多网络科技有限公司 Video live broadcast control, bridging, flow control and broadcast control method and client

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022669A (en) * 2022-05-31 2022-09-06 厦门蝉羽网络科技有限公司 Live broadcast system and live broadcast method based on information processing
CN115022669B (en) * 2022-05-31 2024-03-12 厦门蝉羽网络科技有限公司 Live broadcast system and live broadcast method based on information processing

Also Published As

Publication number Publication date
CN111510780B (en) 2021-10-26
CN111510780A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
WO2021204141A1 (en) Video live-streaming control, bridging, stream control and broadcast control methods, and client
WO2020221190A1 (en) Applet state synchronization method, device and computer storage medium
CN110597774B (en) File sharing method, system, device, computing equipment and terminal equipment
WO2018130165A1 (en) Cloud computing mobile terminal and operation method therefor
JP5030522B2 (en) Data processing system, method, computer program (user interface widget unit sharing for application user interface distribution)
WO2017124860A1 (en) Distributed wireless multi-screen virtual machine service system
US7908325B1 (en) System and method for event-based collaboration
WO2021258617A1 (en) Multi-platform synchronous live streaming method and apparatus, computer device, and readable storage medium
WO2021143182A1 (en) Game processing method and apparatus, electronic device, and computer-readable storage medium
US20120317243A1 (en) Audio processing method and device for remote desktop protocol
JP2023126832A (en) Method and system for making functional devices available to participants of meetings
WO2018081928A1 (en) Data processing method and apparatus, and terminal device
US11900006B2 (en) Synchronizing local room and remote sharing
CN110493028A (en) A kind of clustered deploy(ment) method, system, device and computer readable storage medium
WO2017050006A1 (en) Remote live broadcast method and system
CN105323272A (en) Method, terminal and system for managing clipboard
CN102427465A (en) Voice service proxy method and device and system for integrating voice application through proxy
CN103561106A (en) System and method for remote teaching and remote meeting
WO2019080222A1 (en) Data transmission method and device for mobile terminal and mobile terminal
CN110865783A (en) Screen projection method, device, system and storage medium
CN114245328B (en) Voice call transfer method and electronic equipment
US11803606B2 (en) Device augmentation of real time communications
KR101833942B1 (en) Transcoder for real-time compositing
WO2020025016A1 (en) Node initialization for multipage communication
CN108683873B (en) Control device and method for video conference

Legal Events

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

Ref document number: 21784484

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21784484

Country of ref document: EP

Kind code of ref document: A1