Disclosure of Invention
The invention aims to overcome the defects of the prior art, provides a wireless screen transmission method supporting double signals and a wireless screen transmitter, solves the problem of insufficient applicability of the conventional wireless screen transmitter, distinguishes different data processing modes for the double signals and has better practicability.
Correspondingly, the invention provides a wireless screen transmission method supporting dual signals, which comprises the following steps:
a processor unit of the video coding module monitors whether an HDMI interface receives an HDMI signal;
if the HDMI interface does not receive the HDMI signal, the processor unit monitors whether the signal switching module transmits a USB signal;
if the signal switching module transmits a USB signal, the processor unit controls a format conversion unit of the video coding module to be in a sleep mode and forwards the USB signal transmitted by the signal switching module to a network transmission module;
and if the signal switching module does not transmit the USB signal, the processor unit returns to monitor whether the HDMI interface receives the HDMI signal.
Optionally, after the processor unit of the video encoding module monitors whether the HDMI interface receives an HDMI signal, the method further includes:
if the HDMI interface receives an HDMI signal, the processor unit controls the format conversion unit to be in a working mode;
the format conversion unit receives the HDMI signals and separates audio signals and video signals from the HDMI signals;
and the coding unit of the video coding module respectively performs compression coding on the audio signal and the video signal and transmits the synthesized code stream signal to the network transmission module.
Optionally, the monitoring, by the processor unit, whether the signal switching module transmits the USB signal includes:
the signal switching module monitors whether the Micro-USB interface receives a first USB signal;
if the Micro-USB interface receives a first USB signal, the signal switching module stores the first USB signal in a data buffer area and sends a transmission instruction to the processor unit;
based on the response information of the processor unit to the transmission instruction, the signal switching module transmits the first USB signal to the processor unit.
Optionally, after the signal switching module monitors whether the Micro-USB interface receives the first USB signal, the method further includes:
if the Micro-USB interface does not receive the first USB signal, the signal switching module monitors whether the HDMI interface receives a second USB signal;
if the HDMI receives a second USB signal, the signal switching module stores the second USB signal in a data buffer area and sends a transmission instruction to the processor unit;
based on the response information of the processor unit to the transmission instruction, the signal switching module transmits the second USB signal to the processor unit.
Optionally, after the signal switching module monitors whether the HDMI interface receives the second USB signal, the method further includes:
and if the HDMI does not receive the second USB signal, the signal switching module returns to monitor whether the Micro-USB interface receives the first USB signal.
Optionally, before the processor unit of the video encoding module monitors whether the HDMI interface receives the HDMI signal, the method further includes:
the network transmission module establishes a wireless connection with the external display device based on the transmitted radio waves, which include a preset field and an encoding field.
Optionally, the preset field at least includes a wireless hotspot name of the network transmission module, and the encoding field at least includes a login password of the network transmission module.
Correspondingly, the embodiment of the invention also provides a wireless screen transmitter supporting double signals, wherein the wireless screen transmitter comprises an HDMI interface, a signal switching module, a video coding module and a network transmission module, and the video coding module comprises a processor unit, a format conversion unit and a coding unit;
the HDMI interface is connected with the processor unit based on an HDMI signal line, the signal switching module is connected with the processor unit based on a USB signal line, the processor unit is connected with the format conversion unit, and the processor unit is connected with the network transmission module; the processor unit is used for monitoring whether the HDMI interface receives an HDMI signal or not and whether the signal switching module transmits the USB signal or not based on the priority level; based on the fact that the HDMI interface does not receive HDMI signals and the signal switching module transmits the USB signals, the format conversion unit is controlled to be in a sleep mode, and the USB signals are forwarded to the network transmission module; and controlling the format conversion unit to be in a working mode based on the fact that the HDMI interface receives an HDMI signal;
the HDMI is connected with the format conversion unit based on an HDMI signal line; the format conversion unit is used for receiving the HDMI signals and separating audio signals and video signals from the HDMI signals;
the format conversion unit is connected with the coding unit, and the coding unit is connected with the network transmission module; the coding unit is used for respectively carrying out compression coding on the audio signal and the video signal and transmitting a synthesized code stream signal to the network transmission module;
the network transmission module is used for establishing wireless connection with external display equipment based on the sent radio waves and transmitting the code stream signal or the USB signal to the external display equipment.
Optionally, the wireless screen transmitter further includes a Micro-USB interface, the Micro-USB interface is connected to the signal switching module based on a USB signal line, the HDMI interface is connected to the signal switching module based on a USB signal line, and the signal switching module is connected to the processor unit based on a USB signal line;
the signal switching module is used for monitoring whether the Micro-USB interface receives a first USB signal or not and whether the HDMI interface receives a second USB signal or not based on the priority level, and outputting a corresponding USB signal to the processor unit.
Optionally, the radio wave includes a preset field and an encoding field, the preset field at least includes a name of a wireless hotspot of the network transmission module, and the encoding field at least includes a login password of the network transmission module.
The wireless screen transmitter provided by the embodiment of the invention has the screen transmitting capability for two different signals, and can overcome the problem of insufficient applicability of the existing wireless screen transmitter; in addition, the embodiment of the invention provides a screen transmission method based on the wireless screen transmitter, which sets data processing modes for different signals, such as encoding the HDMI signal or forwarding the original frame of the USB signal, by a processor unit in a video encoding module, and sets priority levels of the two data processing modes, so that a data screen projection conflict can be avoided, and the practicability is good.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 shows a schematic structural diagram of a wireless screen transmitter supporting dual signals in an embodiment of the present invention, where the wireless screen transmitter includes an HDMI interface, a Micro-USB interface, a signal switching module, a video coding module, and a network transmission module, the video coding module includes a processor unit, a format conversion unit, and a coding unit, the processor unit is connected to the network transmission module, and the coding unit is connected to the network transmission module.
The Micro-USB interface is connected with the signal switching module based on a USB signal line, the HDMI interface is connected with the signal switching module based on a USB signal line, and the signal switching module is connected with the processor unit based on a USB signal line so as to establish a USB signal detection channel or a USB signal transmission channel; the HDMI is connected with the processor unit based on an HDMI signal line, and the processor unit is connected with the format conversion unit to establish an HDMI signal detection channel; and establishing an HDMI signal transmission channel through the connection between the HDMI interface and the format conversion unit based on the HDMI signal line.
In a specific implementation process, the processor unit selects a current working mode of the wireless screen transmitter by identifying a level signal triggered by the HDMI signal detection channel and the USB signal detection channel according to a set priority level: (1) when the wireless screen transmitter is in an HDMI signal coding mode (high priority level), the format conversion unit acquires an HDMI audio/video signal to be processed by using the HDMI signal transmission channel, and completes coding synthesis of the HDMI audio/video signal based on the connection of the format conversion unit and the coding unit; (2) when the wireless screen transmitter is in a USB signal forwarding mode (the priority level is low), the processor unit acquires USB audio/video signals to be processed by using the USB signal transmission channel so as to complete the forwarding of the USB audio/video signals. By respectively setting corresponding working modes for two different signals, the data processing pressure of the coding unit can be reduced, and the requirement on the data processing capacity is not high.
It should be noted that, when the wireless screen transmitter is connected to an external source device based on the HDMI interface, the external source device defaults to transmit an HDMI signal to the HDMI interface, and customizes pins of the HDMI interface to strengthen diversification of data transmitted by the HDMI interface, including: will the CEC pin of HDMI interface resets to USB _ DM signal transmission channel, will the HEC pin of HDMI interface resets to USB _ DP signal transmission channel, works as when the adapter that the adaptation has transmittable USB signal on the HDMI interface, can guarantee outside source equipment also can pass through the USB signal that this adapter transmitted the HDMI interface transmit extremely signal switching module will overcome the transmission signal limitation of current wireless biography screen ware.
Based on the wireless screen transmitter supporting the dual signals provided by the embodiment of the invention, the method for realizing wireless screen transmission comprises the following steps: a processor unit of the video coding module monitors whether an HDMI interface receives an HDMI signal; if the HDMI interface does not receive the HDMI signal, the processor unit monitors whether the signal switching module transmits a USB signal; if the signal switching module transmits a USB signal, the processor unit controls a format conversion unit of the video coding module to be in a sleep mode and forwards the USB signal transmitted by the signal switching module to a network transmission module; and if the signal switching module does not transmit the USB signal, the processor unit returns to monitor whether the HDMI interface receives the HDMI signal.
Specifically, fig. 2 shows a schematic flow chart of a wireless screen transmission method supporting dual signals in an embodiment of the present invention, where the method includes the following steps:
s101, the network transmission module establishes wireless connection with external display equipment based on sending radio waves;
in an embodiment of the present invention, the radio wave includes a preset field and an encoded field, where the preset field at least includes a name of a wireless hotspot of the network transmission module, and the encoded field at least includes a login password of the network transmission module. In a specific implementation process, the network transmission module immediately sends the radio wave when detecting that a connection signal of an external source device is arranged on the HDMI or the Micro-USB interface; searching equipment in a connection range by the external display equipment, and establishing a matching relation with the preset field in the connection range; decoding the associated encoding field by the external display device based on a decoding mode provided by a system to acquire a login password of the network transmission module; and finally, the external display equipment establishes a short-distance wireless connection relation with the network transmission module based on the login password.
It should be noted that, after the network transmission module is in communication connection with the external display device, the external display device records communication parameters of the network transmission device, such as wireless access point information, connection password, communication access time point, applicable communication protocol, and the like, so as to facilitate the next direct access of the network transmission module.
S102, a processor unit of the video coding module monitors whether an HDMI interface receives an HDMI signal;
in the embodiment of the invention, based on the fact that the wireless screen transmitter is connected with an external source device through an HDMI (high-definition multimedia interface), when the external source device detects that a level signal changes at an HPD (high-power digital) pin of the HDMI (high-power digital interface) (default initial level is low level, and jump to high level when in normal connection), the wireless screen transmitter is judged to be normally connected with the wireless screen transmitter, at the moment, an internal screen transmitting server is controlled to acquire audio and video data of a current interface in a screen capturing mode, and an internal TMDS (transition minimized transition standard) signal generating circuit is activated to convert the audio and video data into an HDMI signal and then transmit the HDMI signal. Under the precondition, because six pins on the processor unit are respectively connected with three groups of HDMI signal transmission pins on the HDMI through independent signal lines, the processor unit can judge whether the HDMI interface receives HDMI signals or not by detecting the level change (default initial level is low level, and jump to high level when data is transmitted) of any group of pins on the three groups of HDMI signal transmission pins; if any group of pins jump to high level, it indicates that the HDMI interface receives an HDMI signal, and step S103 is continuously executed; if all the three groups of pins are kept at low level, it indicates that the HDMI interface has not received the HDMI signal, and the step S104 is skipped to execute.
S103, separating an audio signal and a video signal from the HDMI signal through a format conversion unit of the video coding module, respectively compressing and coding the audio signal and the video signal through a coding unit of the video coding module, synthesizing a code stream signal and transmitting the code stream signal to the network transmission module.
The implementation process of the invention is as follows: firstly, the processor unit controls the format conversion unit to be in a working mode, at the moment, the format conversion unit starts to receive the HDMI signal and separates the HDMI signal into an audio signal and a video signal; secondly, the encoding unit encodes the audio signal based on the combination of three modes of waveform encoding, parameter encoding and mixed encoding to generate audio compressed data, wherein the waveform encoding is to sample and quantize a time domain or frequency domain waveform of the audio signal, the parameter encoding is to extract characteristic parameters of the audio signal, and the mixed encoding is to perform high-quality synthesis on output values of the waveform encoding and the parameter encoding; meanwhile, the encoding unit encodes the video signal based on a combination of three ways of motion estimation and motion compensation, transform coding and entropy coding to generate video compression data, wherein the intra-frame redundancy of the video signal is eliminated by using the transform coding, the inter-frame redundancy of the video signal is eliminated by using the motion estimation and the motion compensation, and the compression efficiency of the video signal is further improved by using the entropy coding; and finally, the coding unit performs format encapsulation on the audio compression data and the video compression data, and then performs packaging processing on the encapsulated audio and video data based on a specified communication protocol to generate a code stream signal for network transmission.
In addition, after the external display device receives the code stream signal in a wireless connection mode, an internal processing chip is used for decoding the code stream signal, and the decoding processing comprises the steps of sequentially carrying out protocol decoding, decapsulation, audio decoding and video decoding on the code stream signal; carrying out format detection on the decoded audio data and video data, and judging whether the audio data and the video data are in a video file format capable of supporting playing; if not, preferentially performing format conversion on the decoded audio data and video data; and if so, synchronously processing the decoded audio data and video data and outputting the processed audio data and video data to a display screen of the external display equipment for real-time playing.
S104, the processor unit monitors whether the signal switching module transmits a USB signal or not;
in the embodiment of the present invention, since the two pins on the processor unit are connected to the D + pin and the D-pin led out from the signal switching module based on independent signal lines, the processor unit can determine whether the signal switching module transmits a USB signal by detecting level changes of the D + pin and the D-pin (default initial level is low level, and jump to high level when there is data transmission); if the D + pin and the D-pin jump to high level, it indicates that the signal switching module has a USB signal to transmit, and continues to execute step S105; if the D + pin and the D-pin are kept at the low level, it indicates that the signal switching module does not transmit the USB signal, and the step S102 is executed again.
Further, an independent loop detection process also exists inside the signal switching module, and specifically includes:
(1) the signal switching module monitors whether the Micro-USB interface receives a first USB signal; based on the Micro-USB interface receiving a first USB signal, the signal switching module stores the first USB signal in a data buffer area and sends a transmission instruction to the processor unit; based on the response information of the processor unit to the transmission instruction, the signal switching module transmits the first USB signal to the processor unit; continuing to execute the step (2) based on the fact that the Micro-USB interface does not receive the first USB signal;
(2) the signal switching module monitors whether the HDMI receives a second USB signal; when a second USB signal is received on the basis of the HDMI, the signal switching module stores the second USB signal in a data buffer area, sends a transmission instruction to the processor unit, and transmits the second USB signal to the processor unit on the basis of response information of the processor unit to the transmission instruction; and (4) returning to the step (1) when the second USB signal is not received based on the HDMI interface.
Specifically, the input end of the signal switching module is provided with two groups of data receiving ports, wherein one group of data receiving ports is used as a first USB signal receiving port and is respectively connected with a D + pin and a D-pin on the Micro-USB interface; the other group of data receiving ports are used as second USB signal receiving ports, and are respectively connected to a CEC pin and an HEC pin (customized) on the HDMI interface, which shows that the second USB signal is actually a signal transmitted by an external source device through an adapter adapted to the HDMI interface and capable of transmitting the USB signal.
S105, the processor unit controls the format conversion unit to be in a sleep mode, and forwards the USB signal transmitted by the signal switching module to a network transmission module, wherein the USB signal is the first USB signal or the second USB signal.
It should be noted that, since the USB signal transmitted by the wireless screen transmitter is actually an audio/video signal subjected to encoding processing, the processor unit only needs to read and transmit the USB signal frame by frame.
The wireless screen transmitter provided by the embodiment of the invention has the screen transmitting capability for two different signals, and can overcome the problem of insufficient applicability of the existing wireless screen transmitter; in addition, the embodiment of the invention provides a screen transmission method based on the wireless screen transmitter, which sets data processing modes for different signals, such as encoding the HDMI signal or forwarding the original frame of the USB signal, by a processor unit in a video encoding module, and sets priority levels of the two data processing modes, so that a data screen projection conflict can be avoided, and the practicability is good.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The wireless screen transmission method and the wireless screen transmitter supporting dual signals provided by the embodiment of the invention are described in detail, a specific example is adopted in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.