# Path: rtpmidi/protocols/rtp/formats.py
# class PTMarker:
# class AudioPTMarker(PTMarker):
# class VideoPTMarker(PTMarker):
# class SDPGenerator:
#     def __init__(self, name, pt=None, clock=8000, params=1, fmtp=None):
#     def __repr__(self):
#     def getSDP(self, rtp, extrartp=None):
# PT_PCMU =       AudioPTMarker('PCMU',    clock=8000,  params=1, pt=0)
# PT_GSM =        AudioPTMarker('GSM',     clock=8000,  params=1, pt=3)
# PT_G723 =       AudioPTMarker('G723',    clock=8000,  params=1, pt=4)
# PT_DVI4 =       AudioPTMarker('DVI4',    clock=8000,  params=1, pt=5)
# PT_DVI4_16K =   AudioPTMarker('DVI4',    clock=16000, params=1, pt=6)
# PT_LPC =        AudioPTMarker('LPC',     clock=8000,  params=1, pt=7)
# PT_PCMA =       AudioPTMarker('PCMA',    clock=8000,  params=1, pt=8)
# PT_G722 =       AudioPTMarker('G722',    clock=8000,  params=1, pt=9)
# PT_L16_STEREO = AudioPTMarker('L16',     clock=44100, params=2, pt=10)
# PT_L16 =        AudioPTMarker('L16',     clock=44100, params=1, pt=11)
# PT_QCELP =      AudioPTMarker('QCELP',   clock=8000,  params=1, pt=12)
# PT_CN =         AudioPTMarker('CN',      clock=8000,  params=1, pt=13)
# PT_G728 =       AudioPTMarker('G728',    clock=8000,  params=1, pt=15)
# PT_DVI4_11K =   AudioPTMarker('DVI4',    clock=11025, params=1, pt=16)
# PT_DVI4_22K =   AudioPTMarker('DVI4',    clock=22050, params=1, pt=17)
# PT_G729 =       AudioPTMarker('G729',    clock=8000,  params=1, pt=18)
# PT_AVP =        AudioPTMarker('mpeg4-generic',     clock=44100, params=1, pt=96)
# PT_SPEEX =      AudioPTMarker('speex',   clock=8000,  params=1)
# PT_SPEEX_16K =  AudioPTMarker('speex',   clock=16000, params=1)
# PT_G726_40 =    AudioPTMarker('G726-40', clock=8000,  params=1)
# PT_1016 =       AudioPTMarker('1016', clock=8000,  params=1, pt=1)
# PT_G726_40 =    AudioPTMarker('G726-40', clock=8000,  params=1)
# PT_G726_32 =    AudioPTMarker('G726-32', clock=8000,  params=1)
# PT_G721 =       AudioPTMarker('G721', clock=8000,  params=1, pt=2)
# PT_G726_24 =    AudioPTMarker('G726-24', clock=8000,  params=1)
# PT_G726_16 =    AudioPTMarker('G726-16', clock=8000,  params=1)
# PT_G729D =      AudioPTMarker('G729D',   clock=8000,  params=1)
# PT_G729E =      AudioPTMarker('G729E',   clock=8000,  params=1)
# PT_GSM_EFR =    AudioPTMarker('GSM-EFR', clock=8000,  params=1)
# PT_ILBC =       AudioPTMarker('iLBC',    clock=8000,  params=1)
# PT_NTE =        PTMarker('telephone-event', clock=8000, params=None,
#                         fmtp='0-16')
# PT_RAW =        AudioPTMarker('RAW_L16', clock=8000, params=1)
# PT_CELB =       VideoPTMarker('CelB', clock=90000, pt=25)
# PT_JPEG =       VideoPTMarker('JPEG', clock=90000, pt=26)
# PT_NV =         VideoPTMarker('nv',   clock=90000, pt=28)
# PT_H261 =       VideoPTMarker('H261', clock=90000, pt=31)
# PT_MPV =        VideoPTMarker('MPV',  clock=90000, pt=32)
# PT_MP2T =       VideoPTMarker('MP2T', clock=90000, pt=33)
# PT_H263 =       VideoPTMarker('H263', clock=90000, pt=34)


from rtpmidi.protocols.rtp.formats import RTPDict, PTMarker, PT_AVP
from twisted.python.util import OrderedDict
        from time import time
for (key, required, parseFcn, unparseFcn) in mdparsers:
    mdparser[key] = parseFcn
    mdunparser[key] = unparseFcn
del key,required,parseFcn,unparseFcn

class MediaDescription:
    "The MediaDescription encapsulates all of the SDP media descriptions"
    def __init__(self, text=None):
        self.media = None
        self.nettype = 'IN'
        self.addrfamily = 'IP4'
        self.ipaddr = None
        self.port = None
        self.transport = None
        self.formats = []
        self._d = {}
        self._a = {}
        self.rtpmap = OrderedDict()
        self.media = 'audio'
        self.transport = 'RTP/AVP'
        self.keyManagement = None
        if text:
            parse_m(self, 'm', text)

    def setFormats(self, formats):
        if self.media in ( 'audio', 'video'):
            for pt in formats:
                pt = int(pt)
                if pt < 97:
                    try:

# Path: rtpmidi/protocols/rtp/formats.py
# class PTMarker:
# class AudioPTMarker(PTMarker):
# class VideoPTMarker(PTMarker):
# class SDPGenerator:
#     def __init__(self, name, pt=None, clock=8000, params=1, fmtp=None):
#     def __repr__(self):
#     def getSDP(self, rtp, extrartp=None):
# PT_PCMU =       AudioPTMarker('PCMU',    clock=8000,  params=1, pt=0)
# PT_GSM =        AudioPTMarker('GSM',     clock=8000,  params=1, pt=3)
# PT_G723 =       AudioPTMarker('G723',    clock=8000,  params=1, pt=4)
# PT_DVI4 =       AudioPTMarker('DVI4',    clock=8000,  params=1, pt=5)
# PT_DVI4_16K =   AudioPTMarker('DVI4',    clock=16000, params=1, pt=6)
# PT_LPC =        AudioPTMarker('LPC',     clock=8000,  params=1, pt=7)
# PT_PCMA =       AudioPTMarker('PCMA',    clock=8000,  params=1, pt=8)
# PT_G722 =       AudioPTMarker('G722',    clock=8000,  params=1, pt=9)
# PT_L16_STEREO = AudioPTMarker('L16',     clock=44100, params=2, pt=10)
# PT_L16 =        AudioPTMarker('L16',     clock=44100, params=1, pt=11)
# PT_QCELP =      AudioPTMarker('QCELP',   clock=8000,  params=1, pt=12)
# PT_CN =         AudioPTMarker('CN',      clock=8000,  params=1, pt=13)
# PT_G728 =       AudioPTMarker('G728',    clock=8000,  params=1, pt=15)
# PT_DVI4_11K =   AudioPTMarker('DVI4',    clock=11025, params=1, pt=16)
# PT_DVI4_22K =   AudioPTMarker('DVI4',    clock=22050, params=1, pt=17)
# PT_G729 =       AudioPTMarker('G729',    clock=8000,  params=1, pt=18)
# PT_AVP =        AudioPTMarker('mpeg4-generic',     clock=44100, params=1, pt=96)
# PT_SPEEX =      AudioPTMarker('speex',   clock=8000,  params=1)
# PT_SPEEX_16K =  AudioPTMarker('speex',   clock=16000, params=1)
# PT_G726_40 =    AudioPTMarker('G726-40', clock=8000,  params=1)
# PT_1016 =       AudioPTMarker('1016', clock=8000,  params=1, pt=1)
# PT_G726_40 =    AudioPTMarker('G726-40', clock=8000,  params=1)
# PT_G726_32 =    AudioPTMarker('G726-32', clock=8000,  params=1)
# PT_G721 =       AudioPTMarker('G721', clock=8000,  params=1, pt=2)
# PT_G726_24 =    AudioPTMarker('G726-24', clock=8000,  params=1)
# PT_G726_16 =    AudioPTMarker('G726-16', clock=8000,  params=1)
# PT_G729D =      AudioPTMarker('G729D',   clock=8000,  params=1)
# PT_G729E =      AudioPTMarker('G729E',   clock=8000,  params=1)
# PT_GSM_EFR =    AudioPTMarker('GSM-EFR', clock=8000,  params=1)
# PT_ILBC =       AudioPTMarker('iLBC',    clock=8000,  params=1)
# PT_NTE =        PTMarker('telephone-event', clock=8000, params=None,
#                         fmtp='0-16')
# PT_RAW =        AudioPTMarker('RAW_L16', clock=8000, params=1)
# PT_CELB =       VideoPTMarker('CelB', clock=90000, pt=25)
# PT_JPEG =       VideoPTMarker('JPEG', clock=90000, pt=26)
# PT_NV =         VideoPTMarker('nv',   clock=90000, pt=28)
# PT_H261 =       VideoPTMarker('H261', clock=90000, pt=31)
# PT_MPV =        VideoPTMarker('MPV',  clock=90000, pt=32)
# PT_MP2T =       VideoPTMarker('MP2T', clock=90000, pt=33)
# PT_H263 =       VideoPTMarker('H263', clock=90000, pt=34)


# Path: rtpmidi/protocols/rtp/sdp.py
from rtpmidi.protocols.rtp.formats import RTPDict, PTMarker, PT_AVP
from twisted.python.util import OrderedDict
        from time import time

for (key, required, parseFcn, unparseFcn) in mdparsers:
    mdparser[key] = parseFcn
    mdunparser[key] = unparseFcn
del key,required,parseFcn,unparseFcn

class MediaDescription:
    "The MediaDescription encapsulates all of the SDP media descriptions"
    def __init__(self, text=None):
        self.media = None
        self.nettype = 'IN'
        self.addrfamily = 'IP4'
        self.ipaddr = None
        self.port = None
        self.transport = None
        self.formats = []
        self._d = {}
        self._a = {}
        self.rtpmap = OrderedDict()
        self.media = 'audio'
        self.transport = 'RTP/AVP'
        self.keyManagement = None
        if text:
            parse_m(self, 'm', text)

    def setFormats(self, formats):
        if self.media in ( 'audio', 'video'):
            for pt in formats:
                pt = int(pt)
                if pt < 97:
                    try:

                        PT = RTPDict[pt]