CN111083412B - Video switching method, video switching device, electronic equipment and storage medium - Google Patents

Video switching method, video switching device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111083412B
CN111083412B CN201911237154.1A CN201911237154A CN111083412B CN 111083412 B CN111083412 B CN 111083412B CN 201911237154 A CN201911237154 A CN 201911237154A CN 111083412 B CN111083412 B CN 111083412B
Authority
CN
China
Prior art keywords
interface
type
video
mcu
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911237154.1A
Other languages
Chinese (zh)
Other versions
CN111083412A (en
Inventor
彭宇龙
韩杰
刘蒙
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201911237154.1A priority Critical patent/CN111083412B/en
Publication of CN111083412A publication Critical patent/CN111083412A/en
Application granted granted Critical
Publication of CN111083412B publication Critical patent/CN111083412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching

Abstract

The invention provides a video switching method, a video switch, electronic equipment and a storage medium. The video switching method comprises the following steps: the MCU detects the insertion of the first interface end and identifies a first input/output type and a first interface type of the first interface end; receiving a second input and output type and a second interface type of a second interface end; when the first input/output type is input, the second input/output type is output, and the first interface type and the second interface type are different, transmitting the second interface type to the FPGA; the FPGA acquires video data input by the first interface end, converts the video data into a video format corresponding to the second interface type, and returns the converted video data to the MCU; and the MCU sends the converted video data to the opposite-end video adapter so that the opposite-end video adapter outputs the converted video data through the second interface end. The invention can flexibly adapt to the characteristics of different types of interfaces and support the switching between interfaces of any type.

Description

Video switching method, video switching device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a video switching method, a video switch, an electronic device, and a storage medium.
Background
With the rapid development of video technologies, users increasingly rely on various video services, such as video conferences, video calls, and the like. In various video services, since the video formats corresponding to different interfaces are different, a need for video transfer between different interfaces often arises.
In the prior art, video switching is generally realized through switching lines or switching boxes of different interfaces. However, the interface between the patch cord and the patch box is fixed, so that only the interface of the patch cord and the patch box can be switched, and flexible switching cannot be realized according to different application scenes.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a video switching method, a video switch, an electronic device, and a storage medium that overcome or at least partially solve the above problems.
In a first aspect, the embodiment of the invention discloses a video switching method, which is applied to a video adapter, wherein the video adapter comprises a cable end and an interface end which are separated from each other, the cable end comprises an MCU (microprogrammed control unit) and an FPGA (field programmable gate array), and the interface end comprises any type of interface; the method comprises the following steps:
the MCU detects the insertion of a first interface end and identifies a first input/output type and a first interface type of the first interface end;
the MCU receives a second input/output type and a second interface type of a second interface end, which are sent by the opposite-end video adapter;
the MCU transmits the second interface type to the FPGA when the first input/output type is input, the second input/output type is output, and the first interface type and the second interface type are different;
the FPGA acquires video data input by the first interface end, converts the video data into a video format corresponding to the second interface type, and returns the converted video data to the MCU;
and the MCU sends the converted video data to the opposite-end video adapter so that the opposite-end video adapter outputs the converted video data through the second interface end.
Optionally, before the transmitting the second interface type to the FPGA, the method further includes: the MCU acquires a preset data list, wherein the data list comprises a corresponding relation between an interface type and a data channel identifier; the MCU inquires a data channel identifier corresponding to the first interface type from the data list; the transmitting the second interface type to the FPGA comprises: and the MCU transmits the second interface type and the inquired data channel identifier to the FPGA.
Optionally, the acquiring, by the FPGA, the video data input by the first interface end includes: and the FPGA acquires the video data input by the first interface end from the data channel corresponding to the inquired data channel identifier.
Optionally, the interface end further includes a memory, and the MCU is connected to an IIC bus; the MCU detects that a first interface end is inserted, identifies a first input and output type and a first interface type of the first interface end, and comprises the following steps: the MCU determines that the first interface end is inserted after detecting that the memory of the first interface end is mounted on the IIC bus; and the MCU reads the first input and output type and the first interface type of the first interface end from the memory of the first interface end.
Optionally, the method further comprises: after detecting that the first interface end is pulled out and receiving the notification of pulling out the second interface end sent by the opposite-end video adapter, the MCU sends a stop notification to the FPGA; and after receiving the stop notification, the FPGA stops acquiring the video data input by the first interface end.
In a second aspect, an embodiment of the present invention discloses a video adapter, where the video adapter includes a cable end and an interface end that are separated from each other, the cable end includes an MCU and an FPGA, and the interface end includes any type of interface;
the MCU includes:
the identification module is used for detecting the insertion of a first interface end and identifying a first input and output type and a first interface type of the first interface end;
the receiving module is used for receiving a second input/output type and a second interface type of the second interface end, which are sent by the opposite-end video adapter;
the transmission module is used for transmitting the second interface type to the FPGA when the first input/output type is input, the second input/output type is output and the first interface type and the second interface type are different;
the FPGA comprises: the conversion module is used for acquiring the video data input by the first interface end, converting the video data into a video format corresponding to the second interface type, and returning the converted video data to the MCU;
the MCU further comprises: and the sending module is used for sending the converted video data to the opposite-end video adapter so that the opposite-end video adapter outputs the converted video data through the second interface end.
Optionally, the MCU further comprises: the query module is used for acquiring a preset data list before the transmission module transmits the second interface type to the FPGA, and querying a data channel identifier corresponding to the first interface type from the data list; the data list comprises a corresponding relation between the interface type and the data channel identifier; the transmission module is specifically configured to transmit the second interface type and the queried data channel identifier to the FPGA.
Optionally, the conversion module comprises: and the obtaining unit is used for obtaining the video data input by the first interface end from the data channel corresponding to the inquired data channel identifier.
Optionally, the interface end further includes a memory, and the MCU is connected to the IIC bus; the identification module comprises: the determining unit is used for determining that the first interface end is inserted after the memory of the first interface end is mounted on the IIC bus; and the reading unit is used for reading the first input and output type and the first interface type of the first interface end from the memory of the first interface end.
Optionally, the MCU further comprises: the notification module is used for sending a stop notification to the FPGA after the first interface end is detected to be pulled out and after a notification that the second interface end is pulled out and sent by the opposite-end video adapter is received; the FPGA further comprises: and the stopping module is used for stopping acquiring the video data input by the first interface terminal after receiving the stopping notification.
In a third aspect, an embodiment of the present invention discloses an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon; the instructions, when executed by the one or more processors, cause the processors to perform the video switching method of any of the above.
In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the video forwarding method as described in any one of the above.
In the embodiment of the present invention, the video adapter includes a cable end and an interface end that are separated from each other, the cable end includes an MCU (micro controller Unit) and an FPGA (Field-Programmable Gate Array), and the interface end includes any type of interface; the MCU detects the insertion of a first interface end and identifies a first input/output type and a first interface type of the first interface end; the MCU receives a second input/output type and a second interface type of a second interface end sent by the opposite-end video adapter; when the first input and output type is input, the second input and output type is output, and the first interface type and the second interface type are different, the MCU transmits the second interface type to the FPGA; the FPGA acquires video data input by the first interface end, converts the video data into a video format corresponding to the second interface type, and returns the converted video data to the MCU; and the MCU sends the converted video data to the opposite-end video adapter so that the opposite-end video adapter outputs the converted video data through the second interface end. Therefore, the video adapter in the embodiment of the invention adopts a mode of separating the interface end from the cable end, the cable end can be inserted into any type of interface, the MCU is used for collecting information to be converted, the FPGA is guided to complete format conversion of the video, the characteristics of different types of interfaces can be flexibly adapted, and the adapter can support the adapter among any type of interfaces.
Drawings
Fig. 1 is a flowchart illustrating steps of a video forwarding method according to an embodiment of the present invention.
Fig. 2 is a block diagram of a video adapter according to a second embodiment of the present invention.
Fig. 3 is a flowchart illustrating a video forwarding method according to a second embodiment of the present invention.
Fig. 4 is an interaction diagram of a video forwarding process according to a third embodiment of the present invention.
Fig. 5 is a block diagram of a video adapter according to a fourth embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Example one
The video switching method of the embodiment of the invention can be applied to a video switch. The Video adaptor includes a cable terminal and an Interface terminal, which are separated from each other, and the Interface terminal includes any type of Interface, so that the cable terminal can be inserted into any type of Interface, such as SDI (Serial Digital Interface), DVI (Digital Video Interface), HDMI (High Definition Multimedia Interface), VGA (Video Graphics Array), and so on. The cable end comprises an MCU and an FPGA, and the MCU and the FPGA can carry out bidirectional data interaction.
Referring to fig. 1, a flowchart illustrating steps of a video forwarding method according to a first embodiment of the present invention is shown.
The video switching method of the embodiment of the invention can comprise the following steps:
step 101, the MCU detects the insertion of a first interface end and identifies a first input/output type and a first interface type of the first interface end.
In the embodiment of the invention, for two interface ends of different interface types needing to be switched, each interface end is respectively inserted into one video adapter, and the two video adapters can be respectively called a local end video adapter and an opposite end video adapter. The local video adapter and the opposite video adapter can communicate in a wired or wireless mode. The interface end into which the cable end of the local video adapter is inserted is called a first interface end, and the interface end into which the cable end of the opposite video adapter is inserted is called a second interface end.
And after detecting that the first interface end is inserted, the MCU of the local-end video adapter identifies the input and output type and the interface type of the first interface end. Wherein the input and output types may include both input and output types. The input type indicates that video data is input from the interface side, and the output type indicates that video data is output from the interface side. The interface type indicates the type of an interface included in the interface port. In the embodiment of the present invention, the input and output type of the first interface end is referred to as a first input and output type, and the interface type of the first interface end is referred to as a first interface type.
And 102, receiving the second input and output type and the second interface type of the second interface end, which are sent by the opposite-end video adapter, by the MCU.
And after detecting that the second interface end is inserted, the MCU of the opposite-end video adapter identifies the input and output type and the interface type of the second interface end. In the embodiment of the present invention, the input and output type of the second interface end is referred to as a second input and output type, and the interface type of the second interface end is referred to as a second interface type. And the MCU of the opposite-end video adapter sends the second input/output type and the second interface type of the second interface end to the MCU of the local-end video adapter.
And 103, when the first input and output type is input, the second input and output type is output, and the first interface type and the second interface type are different, the MCU transmits the second interface type to the FPGA.
And the MCU of the local end video adapter receives the second input/output type and the second interface type sent by the MCU of the opposite end video adapter. And when the first input and output type is input and the second input and output type is output, the MCU compares whether the first interface type and the second interface type are the same or not. And if the first interface type is different from the second interface type, the MCU of the local video adapter transmits the second interface type to the FPGA of the local video adapter.
And 104, the FPGA acquires video data input by the first interface end, converts the video data into a video format corresponding to the second interface type, and returns the converted video data to the MCU.
After receiving the second interface type, the FPGA of the local video adapter learns that the video data needs to be converted into the video format corresponding to the second interface type, so that the FPGA acquires the video data input from the first interface end, converts the video data into the video format corresponding to the second interface type, and returns the converted video data to the MCU of the local video adapter.
And 105, the MCU sends the converted video data to the opposite-end video adapter so that the opposite-end video adapter outputs the converted video data through the second interface end.
The MCU of the local end video adapter transmits the converted video data to the MCU of the opposite end video adapter, and the MCU of the opposite end video adapter can output the converted video data to the corresponding display equipment through the second interface end.
In the embodiment of the invention, the video adapter adopts a mode of separating the interface end from the cable end, the cable end can be inserted into any type of interface, the MCU is used for collecting information to be converted and guiding the FPGA to complete format conversion of the video, so that the video adapter can flexibly adapt to the characteristics of different types of interfaces and support the switching between any type of interfaces.
Example two
Referring to fig. 2, a block diagram of a video adapter according to a second embodiment of the present invention is shown. As shown in fig. 2, the video adapter includes a physical interface end (i.e., the interface end described above) and a cable end that are separate from each other. The physical interface terminal may include a physical interface, an EEPROM (Electrically Erasable Programmable Read-Only Memory) and a gold finger. The physical interface is a variable interface, and can be any one of HDMI, DVI, VGA and SDI. It should be noted that the physical interface includes a memory, the EEPROM shown in fig. 2 is an example of a memory, and the memory in the embodiment of the present invention may also be other forms of memories. The cable end can include golden finger card slot, FPGA, MCU, 5.8GHZ wireless transmitting end and 5.8GHZ wireless receiving end. The golden fingers of the solid interface end can be inserted into the golden finger clamping grooves of the cable end, so that the solid interface end and the cable end are connected. The FPGA and the MCU can perform bidirectional interaction, the MCU can send video data to other video adapters through the 5.8GHZ wireless sending end, and the MCU can receive the video data sent by other video adapters through the 5.8GHZ wireless receiving end.
Referring to fig. 3, a flowchart illustrating steps of a video forwarding method according to a second embodiment of the present invention is shown.
The video switching method of the embodiment of the invention can comprise the following steps:
in step 301, the mcu detects the insertion of the first interface end, and identifies the first input/output type and the first interface type of the first interface end.
In the embodiment of the invention, the MCU can be connected with an IIC (Inter-Integrated Circuit) bus, and the EEPROM can also be connected with the IIC bus.
In an alternative embodiment, step 301 may include steps A1-A2:
step A1, after detecting that the memory of the first interface end is mounted on the IIC bus, the MCU determines that the first interface end is inserted.
The MCU of the local video adapter can poll the IIC bus and detect whether the memory is mounted on the IIC bus or not. After the gold finger of the first interface end is inserted into the gold finger slot of the cable end of the home terminal video adapter, the memory (for example, EEPROM in fig. 2) of the first interface end may be mounted on the IIC bus, and the MCU of the home terminal video adapter may determine that the first interface end is inserted after detecting that the memory of the first interface end is mounted on the IIC bus.
And step A2, the MCU reads the first input and output type and the first interface type of the first interface end from the memory of the first interface end.
The memory can store the input and output type and the interface type of the interface end, and the information can be set when the product leaves the factory. Therefore, the MCU of the local video adapter may read the first input and output type and the first interface type of the first interface terminal from the memory of the first interface terminal.
And 302, receiving the second input and output type and the second interface type of the second interface end, which are sent by the opposite-end video adapter, by the MCU.
And the local end video adapter and the opposite end video adapter are in wireless pairing. After the pairing is successful, after the MCU of the local video adaptor identifies the first input/output type and the first interface type of the first interface end, the MCU of the opposite video adaptor can send the first input/output type and the first interface type of the first interface end through the 5.8GHZ wireless transmitting end of the local video adaptor, and the MCU of the opposite video adaptor can receive the first input/output type and the first interface type of the first interface end through the 5.8GHZ wireless receiving end of the opposite video adaptor. Similarly, the MCU of the opposite-end video adapter detects the insertion of the second interface end, and identifies the second input/output type and the second interface type of the second interface end (the processing process refers to the related processing process of the MCU of the local-end video adapter), after the second input/output type and the second interface type of the second interface end are identified, the second input/output type and the second interface type of the second interface end can be sent out by the 5.8GHZ wireless sending end of the opposite-end video adapter, and the MCU of the local-end video adapter can receive the second input/output type and the second interface type of the second interface end by the 5.8GHZ wireless receiving end of the local-end video adapter.
And 303, when the first input and output type is input, the second input and output type is output, and the first interface type is different from the second interface type, the MCU queries a data channel identifier corresponding to the first interface type and transmits the second interface type and the queried data channel identifier to the FPGA.
The MCU of the local-end video adapter judges whether the first interface type is the same as the second interface type or not after judging that the first input/output type is input and the second input/output type is output, and can determine that format conversion needs to be carried out on video data input from the first interface end when the first interface type is different from the second interface type.
The video adapter comprises a plurality of data channels, and data of different types of interfaces can be transmitted in different data channels. And the MCU of the local end video adapter inquires the data channel identifier corresponding to the first interface type. In an alternative embodiment, a data list may be preset and stored in the video switch, and the data list may include a correspondence between the interface type and the data channel identifier. And the MCU of the local video adapter inquires a data channel identifier corresponding to the first interface type from the data list. And after the data channel identification is inquired, the MCU of the local video adapter transmits the second interface type and the inquired data channel identification to the FPGA of the local video adapter.
The MCU of the local video adapter can determine that format conversion of the video data input from the first interface end is not needed when the first input/output type is input and the second input/output type is output and the first interface type is the same as the second interface type, so that the MCU can send the video data input from the first interface end out through the 5.8GHZ wireless sending end. In implementation, the MCU of the local video adapter queries the data channel identifier corresponding to the first interface type, acquires video data input by the first interface from the corresponding data channel, encapsulates the video data into a data packet, adds the data channel identifier corresponding to the first interface type into the data packet, and sends the data packet through the 5.8GHZ wireless sending end.
And after the MCU of the local-end video adapter judges that the first input/output type is output and the second input/output type is input, subsequent processing is not carried out, and the MCU waits for the video adapter of the opposite end to send video data. The processing procedure of the opposite-end video adapter refers to the processing procedure of the local-end video adapter.
The MCU of the local-end video adapter judges that the first input/output type and the second input/output type are both input or output, and can prompt an interface error, such as a flashing red light prompting interface error and the like.
And 304, the FPGA acquires the video data input by the first interface end from the data channel corresponding to the inquired data channel identifier, converts the video data into a video format corresponding to the second interface type, and returns the converted video data to the MCU.
And after receiving the second interface type and the data channel identifier, the FPGA of the local-end video adapter acquires the video data input by the first interface end from the data channel corresponding to the data channel identifier. And the FPGA converts the video data into a video format corresponding to the second interface type and returns the converted video data to the MCU of the local video adapter.
And 305, the MCU sends the converted video data to the opposite-end video adapter so that the opposite-end video adapter outputs the converted video data through the second interface end.
The MCU of the local video adapter receives the converted video data returned by the FPGA and can send the converted video data out through the 5.8GHZ wireless sending end. In the implementation, the MCU of the local video adapter queries the data channel identifier corresponding to the second interface type, encapsulates the converted video data into a data packet, adds the data channel identifier corresponding to the second interface type into the data packet, and sends the data packet through the 5.8GHZ wireless sending end.
And after receiving the data packet, the MCU of the opposite-end video adapter analyzes the data channel identifier added in the data packet, and sends the analyzed data channel identifier to the FPGA of the opposite-end video adapter. And the FPGA of the opposite-end video adapter acquires video data from the data channel corresponding to the data channel identifier, and then outputs the acquired video data through the second interface end by the golden finger.
And step 306, after detecting that the first interface end is pulled out and receiving the notification of pulling out the second interface end sent by the opposite-end video adapter, the MCU sends a stop notification to the FPGA.
After the first interface end is pulled out, the memory of the first interface end is not mounted on the IIC bus any more, and the MCU of the local-end video adapter can detect that the IIC bus is not mounted with the memory of the first interface end any more, so that the first interface end is determined to be pulled out. And after the MCU of the local end video adapter detects that the first interface end is pulled out, the MCU can send a stop notice to the FPGA.
After the second interface end is pulled out, the memory of the second interface end is not mounted on the IIC bus any more, and the MCU of the opposite-end video adapter can detect that the IIC bus is not mounted with the memory of the second interface end any more, so that the second interface end is determined to be pulled out. And after the MCU of the opposite-end video adapter detects that the second interface end is pulled out, the MCU of the local-end video adapter can send a notification that the second interface end is pulled out. The MCU of the local end video adapter may send a stop notification to the FPGA after receiving the notification of the second interface end being pulled out sent by the opposite end video adapter.
And 307, after receiving the stop notification, the FPGA stops acquiring the video data input by the first interface end.
And after receiving the stop notification, the FPGA of the local-end video adapter does not continue to acquire the video data input by the first interface end. And if the residual video data obtained before still exist, continuing to convert the format of the residual video data obtained before and returning the converted video data to the MCU of the local video adapter until the residual video data obtained before does not exist any more.
In the embodiment of the invention, the cable end and the entity interface end are separated, and the middle part adopts a snap-in design of a golden finger. The entity interface end adopts a variable interface, namely a public channel is used for transmission conversion, and only the entity interface is converted, so that one cable or channel can meet the use of various interfaces, and the interface switching work is greatly facilitated. In actual operation, when the entity interface needs to be replaced, the MCU detects the plugging signal, the entity interface type can be identified again, and the MCU guides the FPGA to change the conversion type after acquiring the required type conversion. The wireless receiving end and the wireless sending end provide a wireless channel, data transmission can be carried out by using wireless, and the use is more suitable when the distance is short and the blockage between the receiving and sending ends is small.
EXAMPLE III
Referring to fig. 4, an interaction diagram of a video forwarding process according to a third embodiment of the present invention is shown. Fig. 4 illustrates an example in which the SDI interface is converted into the HDMI interface. As shown in fig. 4, the video switching process may include:
1. and the gold finger at the SDI interface end is inserted into the gold finger card slot at the cable end where the MCU1 is positioned. The MCU1 conducts polling through the IIC bus, after the SDI interface end is inserted, the MCU1 recognizes that the EEPROM1 is mounted on the IIC bus, and the insertion of the interface end is determined. The MCU1 identifies an interface type and an input/output type, the identified interface type is SDI, and the input/output type is input. And after the identification, waiting for the insertion of the opposite terminal interface.
2. The golden finger of the HDMI interface end is inserted into the golden finger card slot of the cable end where the MCU2 is located. The MCU2 carries out polling through the IIC bus, after the HDMI interface end is inserted, the MCU2 recognizes that the EEPROM2 is mounted on the IIC bus, and the interface end is determined to be inserted. The MCU2 identifies the interface type and the input/output type, the identified interface type is HDMI, and the input/output type is output. After the identification, the MCU2 transmits the identified interface type (i.e., HDMI) and input/output type (i.e., output) to the MCU1 through wireless transmission.
3. The MCU1 receives the interface type (i.e., HDMI) and the input/output type (i.e., output) transmitted from the MCU2, and determines whether the input/output type (i.e., input) recognized by itself and the input/output type (i.e., output) recognized by the MCU2 are identical. If the data list is inconsistent, the MCU1 queries a data list, where the data list is pre-recorded for delivery, specifies a transmission channel for each type of data, for example, SDI is a single data line input/output channel of 01, and obtains the self-identified interface type, that is, the data channel identifier corresponding to the SDI interface is 01. The MCU1 sends the conversion information (the conversion information may include SDI type conversion to HDMI type, or may include only HDMI type) and the data channel identifier 01 corresponding to the SDI interface to the FPGA1. The transmission is made via a transmission medium, i.e. wired or 5.8GHZ wireless.
4. The FPGA1 acquires video data (i.e., video data input from the SDI interface) from the data channel identified as 01. The SDI is single-ended serial data, one signal line, and the HDMI is differential data, and has 4 pairs of differential data, and the FPGA1 converts video data from SDI format to HDMI format (differential data of HDMI), and then the FPGA1 transmits the converted video data to the MCU1.
5. The MCU1 queries the data list, for example, to obtain the data channel identifier 07 corresponding to the HDMI interface. The MCU1 encapsulates the converted video data into a data packet, adds a data channel identifier 07 in the data packet, and transmits the data packet to the MCU2 through wireless transmission. After receiving the data packet, the MCU2 analyzes the data channel identifier 07, and sends the data channel identifier 07 to the FPGA2, and the FPGA2 obtains video data from the data channel identified by the identifier 07, and sends the video data to the HDMI interface through the gold finger, and the video data is output by the HDMI interface.
6. Under the scene that the entity interface needs to be changed, if the SDI input needs to be changed into the VGA input (not shown in the figure), when the SDI interface is unplugged, the MCU1 stops the conversion and waits for the new entity interface to be accessed because the EEPROM1 is no longer accessed and the MCU1 polls and cannot detect the chip. Assuming that the newly accessed interface is VGA corresponding to EEPROM3, similarly, the MCU1 reads data from the EEPROM3 and directs the FPGA to perform conversion, where the VGA interface can adopt a channel 02 to transmit due to the change of the input signal, and the channel 02 occupies 5 data lines, which are R, G, B and line synchronization and field synchronization, respectively. After the connection, the FPGA1 starts to convert VGA to HDMI, thereby completing the conversion of the interface.
The embodiment of the invention enables the cable end to be more conveniently used, and one transmission channel can be compatible with various interfaces.
Example four
Referring to fig. 5, a block diagram of a video adapter according to a fourth embodiment of the present invention is shown. The video adapter comprises a cable end 51 and an interface end 52 which are separated from each other, wherein the cable end 51 comprises an MCU 511 and an FPGA 512, and the interface end 52 comprises an interface 521 of any type.
The MCU 511 includes:
the identifying module 5111 is configured to detect that a first interface end is inserted, and identify a first input/output type and a first interface type of the first interface end;
a receiving module 5112, configured to receive the second input/output type and the second interface type of the second interface end sent by the peer-to-peer video adapter;
a transmitting module 5113, configured to transmit the second interface type to the FPGA when the first input/output type is input, the second input/output type is output, and the first interface type and the second interface type are different;
the FPGA 512 includes: a conversion module 5121, configured to obtain video data input by the first interface, convert the video data into a video format corresponding to the second interface type, and return the converted video data to the MCU;
the MCU 51 further includes: a sending module 5114, configured to send the converted video data to the peer video adapter, so that the peer video adapter outputs the converted video data through the second interface.
Optionally, the MCU 511 further includes: a query module, configured to obtain a preset data list before the transmission module 5113 transmits the second interface type to the FPGA, and query a data channel identifier corresponding to the first interface type from the data list; the data list comprises a corresponding relation between the interface type and the data channel identifier; the transmission module 5113 is specifically configured to transmit the second interface type and the queried data channel identifier to the FPGA.
Optionally, the conversion module 5121 includes: and the obtaining unit is used for obtaining the video data input by the first interface end from the data channel corresponding to the inquired data channel identifier.
Optionally, the interface 52 further includes a memory, and the MCU is connected to the IIC bus; the identification module 5111 includes: the determining unit is used for determining that the first interface end is inserted after the memory of the first interface end is mounted on the IIC bus; and the reading unit is used for reading the first input and output type and the first interface type of the first interface end from the memory of the first interface end.
Optionally, the MCU 511 further includes: the notification module is used for sending a stop notification to the FPGA after detecting that the first interface end is pulled out and receiving a notification that the second interface end is pulled out, which is sent by the opposite-end video adapter; the FPGA 512 further includes: and the stopping module is used for stopping acquiring the video data input by the first interface terminal after receiving the stopping notification.
In the embodiment of the invention, the video adapter adopts a mode of separating the interface end from the cable end, the cable end can be inserted into any type of interface, the MCU is used for collecting information to be converted and guiding the FPGA to complete format conversion of the video, so that the video adapter can flexibly adapt to the characteristics of different types of interfaces and support the switching between any type of interfaces.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In an embodiment of the invention, an electronic device is also provided. The electronic device may include one or more processors and one or more machine-readable media having instructions, such as an application program, stored thereon. The instructions, when executed by the one or more processors, cause the processors to perform the video forwarding method described above.
In an embodiment of the present invention, there is also provided a non-transitory computer-readable storage medium having a computer program stored thereon, the program being executable by a processor of an electronic device to perform the video forwarding method described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or terminal apparatus that comprises the element.
The video forwarding method, the video adapter, the electronic device and the storage medium provided by the present invention are introduced in detail, and a specific example is applied in the present document to illustrate the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present 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.

Claims (10)

1. The video switching method is applied to a video adapter, the video adapter comprises a cable end and an interface end which are separated from each other, the cable end comprises an MCU (microprogrammed control unit) and an FPGA (field programmable gate array), and the interface end comprises any type of interface; the method comprises the following steps:
the MCU detects the insertion of a first interface end and identifies a first input/output type and a first interface type of the first interface end;
the MCU receives a second input/output type and a second interface type of a second interface end, which are sent by the opposite-end video adapter;
the MCU transmits the second interface type to the FPGA when the first input/output type is input, the second input/output type is output, and the first interface type and the second interface type are different;
the FPGA acquires video data input by the first interface end, converts the video data into a video format corresponding to the second interface type, and returns the converted video data to the MCU;
and the MCU sends the converted video data to the opposite-end video adapter so that the opposite-end video adapter outputs the converted video data through the second interface end.
2. The method of claim 1,
before the transmitting the second interface type to the FPGA, further comprising:
the MCU acquires a preset data list, wherein the data list comprises a corresponding relation between an interface type and a data channel identifier;
the MCU inquires a data channel identifier corresponding to the first interface type from the data list;
the transmitting the second interface type to the FPGA comprises:
and the MCU transmits the second interface type and the inquired data channel identifier to the FPGA.
3. The method according to claim 2, wherein the FPGA acquiring the video data input by the first interface end comprises:
and the FPGA acquires the video data input by the first interface end from the data channel corresponding to the inquired data channel identifier.
4. The method of claim 1, wherein the interface end further comprises a memory, and the MCU is connected to an IIC bus; the MCU detects that a first interface end is inserted, identifies a first input and output type and a first interface type of the first interface end, and comprises the following steps:
the MCU determines that the first interface end is inserted after detecting that the memory of the first interface end is mounted on the IIC bus;
and the MCU reads the first input and output type and the first interface type of the first interface end from the memory of the first interface end.
5. The method of claim 1, further comprising:
after detecting that the first interface end is pulled out and receiving the notification of pulling out the second interface end sent by the opposite-end video adapter, the MCU sends a stop notification to the FPGA;
and after receiving the stop notification, the FPGA stops acquiring the video data input by the first interface terminal.
6. The video adapter is characterized by comprising a cable end and an interface end which are separated from each other, wherein the cable end comprises an MCU (microprogrammed control unit) and an FPGA (field programmable gate array), and the interface end comprises any type of interface;
the MCU includes:
the identification module is used for detecting the insertion of a first interface end and identifying a first input and output type and a first interface type of the first interface end;
the receiving module is used for receiving a second input/output type and a second interface type of the second interface end, which are sent by the opposite-end video adapter;
the transmission module is used for transmitting the second interface type to the FPGA when the first input/output type is input, the second input/output type is output and the first interface type and the second interface type are different;
the FPGA comprises: the conversion module is used for acquiring the video data input by the first interface end, converting the video data into a video format corresponding to the second interface type, and returning the converted video data to the MCU;
the MCU further comprises: and the sending module is used for sending the converted video data to the opposite-end video adapter so that the opposite-end video adapter outputs the converted video data through the second interface end.
7. The video switcher of claim 6, wherein the MCU further comprises:
the query module is used for acquiring a preset data list before the transmission module transmits the second interface type to the FPGA, and querying a data channel identifier corresponding to the first interface type from the data list; the data list comprises a corresponding relation between the interface type and the data channel identifier;
the transmission module is specifically configured to transmit the second interface type and the queried data channel identifier to the FPGA.
8. The video switcher of claim 7, wherein said switching module comprises:
and the obtaining unit is used for obtaining the video data input by the first interface end from the data channel corresponding to the inquired data channel identifier.
9. An electronic device, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon;
the instructions, when executed by the one or more processors, cause the processors to perform the video patching method of any of claims 1-5.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a video relay method according to any one of claims 1 to 5.
CN201911237154.1A 2019-12-05 2019-12-05 Video switching method, video switching device, electronic equipment and storage medium Active CN111083412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911237154.1A CN111083412B (en) 2019-12-05 2019-12-05 Video switching method, video switching device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911237154.1A CN111083412B (en) 2019-12-05 2019-12-05 Video switching method, video switching device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111083412A CN111083412A (en) 2020-04-28
CN111083412B true CN111083412B (en) 2022-11-08

Family

ID=70313174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911237154.1A Active CN111083412B (en) 2019-12-05 2019-12-05 Video switching method, video switching device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111083412B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868159A (en) * 2020-06-30 2021-12-31 中车株洲电力机车研究所有限公司 IO module, in-module master control device and in-module interface device identification method
CN114911729A (en) * 2021-02-10 2022-08-16 华为技术有限公司 Data transmission method of electronic equipment, electronic equipment and interface circuit

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10210424A (en) * 1997-01-20 1998-08-07 Sony Corp Rate conversion device and image-pickup device
CN101098442A (en) * 2007-07-13 2008-01-02 上海大学 FPGA based video format converter
CN101999234A (en) * 2008-04-18 2011-03-30 日本电气株式会社 Gateway device, method, and program
CN102007774A (en) * 2008-04-18 2011-04-06 日本电气株式会社 Server device, content distribution method, and program
CN205071166U (en) * 2015-10-23 2016-03-02 上海巨视安全防范技术有限公司 Novel mixed switch of video
CN109361894A (en) * 2018-12-05 2019-02-19 福建星网智慧科技股份有限公司 A kind of video interface expanding unit and method based on FPGA realization
CN208798084U (en) * 2018-09-14 2019-04-26 广东电网有限责任公司 Video switching device and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10210424A (en) * 1997-01-20 1998-08-07 Sony Corp Rate conversion device and image-pickup device
CN101098442A (en) * 2007-07-13 2008-01-02 上海大学 FPGA based video format converter
CN101999234A (en) * 2008-04-18 2011-03-30 日本电气株式会社 Gateway device, method, and program
CN102007774A (en) * 2008-04-18 2011-04-06 日本电气株式会社 Server device, content distribution method, and program
CN205071166U (en) * 2015-10-23 2016-03-02 上海巨视安全防范技术有限公司 Novel mixed switch of video
CN208798084U (en) * 2018-09-14 2019-04-26 广东电网有限责任公司 Video switching device and system
CN109361894A (en) * 2018-12-05 2019-02-19 福建星网智慧科技股份有限公司 A kind of video interface expanding unit and method based on FPGA realization

Also Published As

Publication number Publication date
CN111083412A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN111083412B (en) Video switching method, video switching device, electronic equipment and storage medium
CN108459982B (en) Communication equipment and switching method of USB and serial port
US8504853B2 (en) Method, apparatus, and computer program product for cable detection and power negotiation
CN100452001C (en) Method and device for confirming sort of USB apparatus
EP2733619B1 (en) Electronic device with Thunderbolt interface, connecting method thereof, and docking apparatus
CN102111599A (en) Communication system, transmitter, receiver, communication method, and program
CN101563921A (en) Communication system, transmitting device, receiving device, communication method, program and communication cable
CN101500114A (en) Electronic device, method for responding to message, and program
US20130057760A1 (en) Source terminal and method for outputting data to external output device
CN104918105A (en) Media file multi-screen playing method, device and system
JP2020150445A (en) Electronic apparatus
CN101505379A (en) Video display apparatus and control method thereof, and video output apparatus and control method thereof
KR20080113693A (en) System and method for data communication
KR20180083572A (en) Electronic apparatus and control method thereof
CN106532382A (en) USB Type-C adapter and implementation method thereof
CN113938630A (en) Control method of LED display screen and display screen group
CN103220370A (en) Method and device for achieving single wire protocol (SWP) interface and SWP system
CN112469104A (en) Networking method of dual-system electronic whiteboard and electronic whiteboard
US20070286380A1 (en) Method of providing services that can be used between network devices, and network device and storage medium suitable for implementing the method
CN108055212B (en) Method and device compatible with PSE chip
CN107483847B (en) Video distributor
CN113055735A (en) Wireless screen transmission data transmission method, system and computer readable storage medium
WO2018035681A1 (en) Method of establishing interface connection, and interface chip
KR100733033B1 (en) Apparatus for communicating data in mobile terminal by using data communication cable and method therefor
CN105392049B (en) Audio gain adjusting method, screen end equipment, master control borad and separation TV

Legal Events

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