예제 #1
0
def upgradeSDP(currentSession, newSDP):
    "Read the media description from the new SDP and update the current session by removing the current media."

    sdp = SDP(currentSession)
    if newSDP.ipaddr:
        c = (newSDP.nettype, newSDP.addrfamily, newSDP.ipaddr)
        sdp.nettype, sdp.addrfamily, sdp.ipaddr = c
    sdp.mediaDescriptions = newSDP.mediaDescriptions
    sdp._o_version = str(int(sdp._o_version) + 1)
    return sdp
예제 #2
0
def upgradeSDP(currentSession, newSDP):
    "Read the media description from the new SDP and update the current session by removing the current media."

    sdp = SDP(currentSession)
    if newSDP.ipaddr:
        c = (newSDP.nettype, newSDP.addrfamily, newSDP.ipaddr)
        sdp.nettype, sdp.addrfamily, sdp.ipaddr = c
    sdp.mediaDescriptions =  newSDP.mediaDescriptions
    sdp._o_version = str(int(sdp._o_version) + 1)
    return sdp