Embodiment
Main thought of the present invention is in originating end network interface unit and receiving terminal network interface unit signaling negotiation module and forwarding module to be set respectively, described signaling negotiation module, be used for the multiplexed configuration information according to local terminal RTP, structure and processing RTCP multiplex consultation message are realized multiplexing signaling negotiation; Described forwarding module, be used for the RTCP multiplex consultation message that receives from external network in time is transmitted to the signaling negotiation module, the RTCP multiplex consultation message that receives from the signaling negotiation module in time is transmitted to external network, simultaneously after the multiplex consultation success, according to consensus RTP compression options information, the RTP message of connection multiplexing opposite end is carried out multiplexing (sending direction) and demultiplexing (receive direction) processing.
Below in conjunction with accompanying drawing described method of the embodiment of the invention and device are elaborated.
With reference to shown in Figure 1, be the schematic flow sheet of the method for the invention first embodiment, the present invention proposes a kind of signal negotiation method of realizing that rtp streaming is multiplexed, described method comprises:
Step 101: originating end is provided with local terminal RTP data stream multiplexing function and enables, and to the multiplexed configuration information of the synchronous RTP of originating end network interface unit;
Step 102: the originating end network interface unit is initiated RTCP to each purpose receiving terminal and is consulted request according to the multiplexed configuration information of described RTP;
Step 103: after the receiving terminal network interface unit receives described RTCP negotiation request, according to the multiplexed configuration information of receiving terminal RTP, case of successful is consulted in judgement return RTCP negotiate response message, and prepare the rtp streaming that connects this receiving terminal is carried out multiplexed reconciliation multiplexing process;
Step 104: the network interface unit of originating end receives RTC negotiate response message, and this purpose receiving terminal is consulted successfully, and the RTP data flow that connects this originating end is carried out multiplexed reconciliation multiplexing process.
Described originating end is to the multiplexed configuration information of the synchronous RTP of originating end network interface unit, comprise: whether the multiplexed destination information of RTP, the local terminal overall situation multiplexed UDP (User DatagramProtocol, User Datagram Protoco (UDP)) port numbers, local terminal support RTP compression options.Certainly, if other demand is arranged in the practical application, can increase other information at interface.
The multiplexed configuration information of described receiving terminal RTP comprises: whether enable the multiplexed function of RTP, whether support RTP compression options.Same, if other demand is arranged in the practical application, can increase other information at interface.
Described originating end network interface unit is initiated RTCP to each purpose receiving terminal and is consulted request according to the multiplexed configuration information of described RTP, comprising:
The network interface unit of originating end is according to the multiplexed configuration information of local terminal RTP, and structure RTCP multiplex consultation request message is sent to corresponding receiving terminal.
Described receiving terminal is to judging that consulting case of successful returns RTCP negotiate response message, comprising:
Receiving terminal determines the multiplexed function of local terminal RTP and enables, and RTP compression options information in the request of RTCP multiplex consultation and local terminal configuration consistency, then judges this originating end is consulted successfully, and return RTCP multiplex consultation response message to originating end.
Described receiving terminal also comprises consulting case of successful:
The network interface unit of receiving terminal is according to RTCP multiplex consultation request message, the overall multiplexed udp port of record originating end number and a compression options information, and preparation is carried out multiplexed reconciliation multiplexing process to the rtp streaming that connects this end.
As a preferred embodiment of the present invention, to consult for the RTCP signaling, " subtype " field mark that utilizes the RTCP message is the multiplexed negotiation packet of RTP.
Support the situation of RTP compression options in the described method, comprise that the rtp streaming of tenaculum RTP head compression is multiplexed, or support not multiplexed with the rtp streaming of RTP head compression.
Specifically, originating end at first needs to dispose the multiplexed function of this end rtp streaming and enables before initiating the RTP multiplex consultation in thestep 101; Originating end is in time given network interface unit synchronously with the multiplexed configuration information of local terminal RTP, comprises whether the multiplexed destination information of RTP (IP+DSCP), the multiplexed udp port of the multiplexed overall situation of local terminal number, local terminal support RTP compression options.
The network interface unit of originating end is according to the multiplexed configuration information of local terminal RTP (comprising whether the multiplexed destination information of RTP (IP+DSCP), the multiplexed udp port of the multiplexed overall situation of local terminal number, local terminal support RTP compression options) in thestep 102, structure RTCP multiplex consultation request message is sent to corresponding destination.
In thestep 103, after the network interface unit of receiving terminal receives the request of RTCP multiplex consultation, inquiry local terminal rtp streaming multiplexed configuration information comprises whether enabling the multiplexed function of RTP, whether the multiplexed udp port of the multiplexed overall situation of local terminal number, local terminal support RTP compression options;
Enable if inquire the multiplexed function of local terminal RTP, judge then whether RTP compression options information in the request of RTCP multiplex consultation is consistent with the local terminal configuration: the situation of RTP compression options unanimity is judged this originating end is consulted successfully, and in time return the response of RTCP multiplex consultation to originating end; RTP the inconsistent situation of compression options judged the negotiation failure, do not return the response of RTCP multiplex consultation to the other side;
If inquiring the multiplexed function of local terminal RTP does not enable, judge and consult failure, do not return the response of RTCP multiplex consultation to the other side;
To the multiplex consultation case of successful, the network interface unit of receiving terminal is according to RTCP multiplex consultation request message, an overall multiplexed udp port number and a compression options information of record originating end are prepared the rtp streaming that connects this end is carried out multiplexed (sending direction) and demultiplexing (receive direction) processing;
To the situation of multiplex consultation failure, the network interface unit of receiving terminal is handled according to not multiplexing flow process the rtp streaming that connects this originating end.
In thestep 104, the network interface unit of originating end receive that receiving terminal returns after the response of RTCP multiplex consultation, judge this receiving terminal consulted successfully;
Originating end is not received that receiving terminal returns the situation of RTCP multiplex consultation response, judges this end is consulted failure;
To the multiplex consultation case of successful, the network interface unit of originating end is prepared the rtp streaming that connects this destination is carried out multiplexed (sending direction) and demultiplexing (receive direction) processing;
To the situation of multiplex consultation failure, the network interface unit of originating end is handled according to not multiplexing flow process the rtp streaming that connects this destination.
With reference to shown in Figure 2, be the structural representation of device first embodiment of the present invention.The present invention proposes a kind of signaling consulting device of realizing that rtp streaming is multiplexed, specifically comprise network interface unit and a plurality of Service Processing Unit, wherein,
Described network interface unit, be used for the RTCP and the RTP message that receive are resolved, extract relevant parameter, and, finish multiplexed the handling through consultation of RTCP and handle with multiplexing, the demultiplexing of rtp streaming according to the multiplexed configuration information of local terminal RTP (comprising whether the multiplexed destination information of RTP (IP+DSCP), the multiplexed udp port of the multiplexed overall situation of local terminal number, local terminal support RTP compression options).
Described Service Processing Unit is used for the RTP session and handles, and in the present invention, it is multiplexed and consult to finish RTP by network interface unit, the interface of network interface unit and a plurality of Service Processing Units and being consistent when not increasing the multiplexed processing of RTP.
Described network interface unit mainly specifically comprises: signaling negotiation module and forwarding module, wherein,
The signaling negotiation module is used for the multiplexed configuration information according to local terminal RTP, and structure and processing RTCP multiplex consultation message are realized multiplexing signaling negotiation;
Forwarding module is used for the RTCP multiplex consultation message that receives from external network in time is transmitted to the signaling negotiation module; Simultaneously after the multiplex consultation success,, the RTP message of connection multiplexing opposite end is carried out multiplexing (sending direction) and demultiplexing (receive direction) processing according to RTP consensus compression options information.
Specifically, the present invention proposes a kind of signaling consulting device of realizing that rtp streaming is multiplexed, comprising:
Originating end signaling negotiation module 201 is used to be provided with local terminal RTP data stream multiplexing function and enables, and to the multiplexed configuration information of the synchronous RTP of originating end network interface unit; Be used for multiplexed configuration information, initiate RTCP to each purpose receiving terminal and consult request according to described RTP;
Receiving terminal signaling negotiation module 204 is used for the multiplexed configuration information according to local terminal RTP, returns RTCP negotiate response message to judging the negotiation case of successful, and prepares the rtp streaming that connects this receiving terminal is carried out multiplexed reconciliation multiplexing process.
Also and draw together:
Originating end forwarding module 202, link to each other with originating end signaling negotiation module 201, be used for and in time be transmitted to external network from the RTCP multiplex consultation message that originating end signaling negotiation module 201 receives, to in time be transmitted to originating end signaling negotiation module 201 from the RTCP multiplex consultation message that external network receives, simultaneously after the multiplex consultation success, according to consensus RTP compression options information, the RTP message of connection multiplexing opposite end is carried out multiplexing reconciliation multiplexing process;
Receiving terminal forwarding module 203, link to each other with receiving terminal signaling negotiation module 204, be used for and in time be transmitted to external network from the RTCP multiplex consultation message that receiving terminal signaling negotiation module 204 receives, to in time be transmitted to receiving terminal signaling negotiation module 204 from the RTCP multiplex consultation message that external network receives, simultaneously after the multiplex consultation success, according to consensus RTP compression options information, the RTP message of connection multiplexing opposite end is carried out multiplexing reconciliation multiplexing process.
The multiplexed configuration information of described originating end RTP comprises: whether the multiplexed udp port of the multiplexed destination information of RTP, the local terminal overall situation number, local terminal support RTP compression options.
The multiplexed configuration information of described receiving terminal RTP comprises: whether enable the multiplexed function of RTP, whether support RTP compression options.
Described originating end signaling negotiation module is used for the multiplexed configuration information according to local terminal RTP, structure RTCP multiplex consultation request message.
Described receiving terminal signaling negotiation module, being used to determine the multiplexed function of local terminal RTP enables, and RTP compression options information in the request of RTCP multiplex consultation and local terminal configuration consistency are then judged this originating end are consulted successfully, and return RTCP multiplex consultation response message to originating end.
Described receiving terminal signaling negotiation module is used for according to RTCP multiplex consultation request message, an overall multiplexed udp port number and a compression options information of record originating end, and preparation is carried out multiplexed reconciliation multiplexing process to the rtp streaming that connects this end.
Described originating end signaling negotiation module, " subtype " field mark that utilizes RTCP multiplex consultation request message is the multiplexed negotiation packet of RTP.
RTP compression options of described support comprises:
The rtp streaming of tenaculum RTP head compression is multiplexed, or supports not multiplexed with the rtp streaming of RTP head compression.
With reference to shown in Figure 3, the schematic flow sheet for the described method of second embodiment of the invention specifically may further comprise the steps:
Step S301: originating end is provided with the multiplexed function of local terminal rtp streaming and enables, and, comprise whether the multiplexed destination information of RTP (IP+DSCP), the multiplexed udp port of the multiplexed overall situation of local terminal number, local terminal support RTP compression options in time to the multiplexed configuration information of the synchronous RTP of network interface unit; The signaling negotiation module of network interface unit is according to the multiplexed configuration information of local terminal RTP, and the request of structure RTCP multiplex consultation is sent to forwarding module;
Step S302: the forwarding module of originating end network interface unit is sent to the multiplexed destination of corresponding RTP with the request of RTCP multiplex consultation;
Step S303: after the forwarding module of receiving terminal network interface unit receives the request of RTCP multiplex consultation, transmit to local terminal signaling negotiation module;
Step S304: after the signaling negotiation module of receiving terminal network interface unit receives the request of RTCP multiplex consultation, if local terminal has disposed the multiplexed function of RTP and has enabled, and RTP compression options information is consistent with RTP the compression options information that originating end is stated in the request of RTCP multiplex consultation, then judge this originating end is consulted successfully, write down a multiplexed udp port of the multiplexed overall situation of RTP number and a compression options information of this originating end, return the response of RTCP multiplex consultation;
Step S305: the forwarding module of receiving terminal network interface unit is sent to the multiplexed negotiation originating end of corresponding RTP with the response of RTCP multiplex consultation;
Step S306: the forwarding module of originating end network interface unit is transmitted to local terminal signaling negotiation module after receiving the response of RTCP multiplex consultation;
Step S307: the signaling negotiation module of originating end network interface unit judges this receiving terminal consulted successfully after receiving the RTCP multiplex consultation response that receiving terminal returns, and with this information synchronization to forwarding module;
Step S308: the rtp streaming multiplex link between originating end and the receiving terminal is set up, and the forwarding module at two ends carries out multiplexed reconciliation multiplexing process according to consensus RTP compression options information to rtp streaming.
The described method of the embodiment of the invention also comprises:
Receiving terminal is received the multiplexed negotiation request of RTCP, but the situation that the multiplexed function of local terminal RTP does not enable judges that multiplexed negotiation is failed to this originating end rtp streaming, does not return the response of RTCP multiplex consultation to the other side;
Receiving terminal is received the multiplexed negotiation request of RTCP, and the multiplexed function of local terminal RTP enables, but the situation of RTP compression options information inconsistency in local terminal RTP compression options information and the request of originating end RTCP multiplex consultation, judgement is not returned the response of RTCP multiplex consultation to the other side to the multiplexed negotiation failure of this originating end RTP;
Originating end is not received that receiving terminal returns the situation of RTCP multiplex consultation response, judge multiplexed negotiation failure this receiving terminal RTP;
To the multiplex consultation case of successful, the network interface unit of originating end and receiving terminal is handled according to multiplexing flow process the rtp streaming of peer end of the connection;
To the situation of multiplex consultation failure, the network interface unit of originating end and receiving terminal is handled according to not multiplexing flow process the rtp streaming of peer end of the connection.
With reference to shown in Figure 4, be the structural representation of the described device of second embodiment of the invention, show the apparatus structure schematic diagram of originating end or receiving terminal.Specifically comprise network interface unit and a plurality of Service Processing Unit.Wherein said network interface unit specifically comprises signaling negotiation module and forwarding module, is described in detail respectively below.
The forwarding module of network interface unit is resolved the RTCP message that receives from external network, and the RTCP message (comprising the request of negotiation and negotiate response) to being labeled as the multiplexed negotiation of RTP is forwarded to the signaling negotiation module and handles;
The signaling negotiation module of network interface unit is resolved the RTCP message that receives, and main conditions comprise:
A: the situation judgement that receives the response of RTCP multiplex consultation is consulted successfully this responder RTP is multiplexed;
B: to receiving the situation of RTCP multiplex consultation request, inquiry local terminal RTP multiplexed configuration information (comprise whether enabling the multiplexed function of RTP, the multiplexed udp port of the multiplexed overall situation of local terminal number, local terminal whether support RTP compression options), Query Result mainly comprises:
B1: inquire the situation that the multiplexed function of local terminal RTP does not enable, judge to the multiplexed negotiation failure of this originating end rtp streaming;
B2: inquire the multiplexed function of local terminal RTP and enable, but the situation of RTP compression options information inconsistency in local terminal RTP compression options information and the request of originating end RTCP multiplex consultation is judged the multiplexed negotiation failure of this originating end rtp streaming;
B3: inquire the multiplexed function of local terminal RTP and enable, and RTP the situation that compression options information is consistent in local terminal RTP compression options information and the request of originating end RTCP multiplex consultation, then judge and consult successfully this originating end rtp streaming is multiplexed, and the response of structure RTCP multiplex consultation, be sent to forwarding module.
Signaling negotiation module to network interface unit is judged the multiplexed negotiation case of successful of RTP to corresponding destination, and forwarding module is transmitted Service Processing Module according to multiplexing flow process connecting the RTP message of this destination;
Signaling negotiation module to network interface unit is judged the situation that the multiplexed negotiation of RTP is failed to corresponding destination, and forwarding module is transmitted Service Processing Module according to not multiplexing flow process connecting the RTP message of this destination.
In sum, the invention provides a kind of signal negotiation method and device of realizing that rtp streaming is multiplexed, can realize dynamically setting up the multiplexed negotiation of RTP end to end by the expansion of RTCP signaling, realize the multiplexed of rtp streaming, improve network bandwidth utilance effectively.
It is pointed out that the above only is preferred embodiment of the present invention, is not to be used for limiting practical range of the present invention, and every variation and modification according to the equivalence that the present invention did are all covered by claim of the present invention.