Ignore:
Timestamp:
Jun 4, 2010 1:41:34 PM (14 years ago)
Author:
nanang
Message:

Re #668:

  • Fixed process_answer() of SDP negotiation, when no common format in a media, instead of returning error, it should just deactivate the media (offer & answer) and continue negotiating next media.
  • Generalized the way of deactivating media: set port to 0 and remove all attributes.
  • Added new API pjmedia_sdp_media_clone_deactivate() to clone media and deactivate the newly cloned media.
  • Updated PJMEDIA SDP negotiation test.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/test/sdp_neg_test.c

    r3014 r3198  
    9797            "a=rtpmap:0 PCMU/8000\r\n" 
    9898            "m=video 0 RTP/AVP 31\r\n" 
    99             "a=rtpmap:31 H261/90000\r\n" 
     99            //"a=rtpmap:31 H261/90000\r\n"      /* <-- this is not necessary (port 0) */ 
    100100            "m=video 53000 RTP/AVP 32\r\n" 
    101101            "a=rtpmap:32 MPV/90000\r\n" 
     
    130130            "a=rtpmap:0 PCMU/8000\r\n" 
    131131            "m=video 0 RTP/AVP 31\r\n" 
    132             //"a=rtpmap:31 H261/90000\r\n"      /* <-- this is not necessary */ 
     132            //"a=rtpmap:31 H261/90000\r\n"      /* <-- this is not necessary (port 0) */ 
    133133            "m=video 53000 RTP/AVP 32\r\n" 
    134134            "a=rtpmap:32 MPV/90000\r\n" 
    135135            "m=audio 0 RTP/AVP 110\r\n" 
    136             "a=rtpmap:110 telephone-events/8000\r\n" 
    137             "a=sendonly\r\n" 
     136            /* <-- the following attributes are not necessary (port 0) */ 
     137            //"a=rtpmap:110 telephone-events/8000\r\n" 
     138            //"a=sendonly\r\n" 
    138139          } 
    139140        } 
     
    556557            "a=rtpmap:0 PCMU/8000\r\n" 
    557558            "a=rtpmap:8 PCMA/8000\r\n" 
    558             "m=video 0 RTP/AVP 31\r\n" 
    559             "a=rtpmap:31 H261/90000\r\n" 
     559            // By #1088, the formats won't be negotiated when the media has port 0. 
     560            //"m=video 0 RTP/AVP 31\r\n" 
     561            "m=video 0 RTP/AVP 31 32\r\n" 
     562            //"a=rtpmap:31 H261/90000\r\n"  /* <-- this is not necessary (port 0) */ 
    560563          }, 
    561564          { 
     
    590593            "a=rtpmap:0 PCMU/8000\r\n" 
    591594            "m=video 0 RTP/AVP 31\r\n" 
    592             "a=rtpmap:31 H261/90000\r\n" 
     595            //"a=rtpmap:31 H261/90000\r\n"  /* <-- this is not necessary (port 0) */ 
    593596          } 
    594597        } 
     
    666669            "a=rtpmap:0 PCMU/8000\r\n" 
    667670            "m=video 0 RTP/AVP 31\r\n" 
    668             "a=rtpmap:31 H261/90000\r\n" 
     671            //"a=rtpmap:31 H261/90000\r\n"  /* <-- this is not necessary (port 0) */ 
    669672          } 
    670673        } 
     
    817820            "t=0 0\r\n" 
    818821            "m=audio 0 RTP/AVP 0\r\n" 
    819             "a=rtpmap:0 PCMU/8000\r\n" 
     822            //"a=rtpmap:0 PCMU/8000\r\n"          /* <-- this is not necessary (port 0) */ 
    820823            "m=audio 51372 RTP/AVP 97 101\r\n" 
    821824            "a=rtpmap:97 iLBC/8000\r\n" 
     
    871874            "t=0 0\r\n" 
    872875            "m=audio 0 RTP/AVP 0\r\n" 
    873             "a=rtpmap:0 PCMU/8000\r\n" 
     876            //"a=rtpmap:0 PCMU/8000\r\n"      /* <-- this is not necessary (port 0) */ 
    874877            "m=audio 49170 RTP/AVP 97 101\r\n" 
    875878            "a=rtpmap:97 iLBC/8000\r\n" 
     
    917920            "a=rtpmap:0 PCMU/8000\r\n" 
    918921            "m=video 0 RTP/AVP 31\r\n" 
    919             "a=rtpmap:31 H261/90000\r\n" 
     922            //"a=rtpmap:31 H261/90000\r\n"    /* <-- this is not necessary (port 0) */ 
    920923            "", 
    921924          } 
     
    963966            "a=rtpmap:0 PCMU/8000\r\n" 
    964967            "m=video 0 RTP/AVP 31\r\n" 
    965             "a=rtpmap:31 H261/90000\r\n" 
     968            //"a=rtpmap:31 H261/90000\r\n"    /* <-- this is not necessary (port 0) */ 
    966969            "", 
    967970          } 
     
    10531056            "a=rtpmap:0 PCMU/8000\r\n" 
    10541057            "m=audio 0 RTP/AVP 0\r\n" 
    1055             "a=rtpmap:0 PCMU/8000\r\n" 
    1056             "m=video 0 RTP/AVP 31\r\n" 
    1057             "a=rtpmap:31 H261/90000\r\n" 
     1058            //"a=rtpmap:0 PCMU/8000\r\n"      /* <-- this is not necessary (port 0) */ 
     1059            "m=video 0 RTP/AVP 31\r\n" 
     1060            //"a=rtpmap:31 H261/90000\r\n"    /* <-- this is not necessary (port 0) */ 
    10581061            "", 
    10591062          } 
     
    12311234            "a=rtpmap:0 PCMU/8000\r\n" 
    12321235            "m=audio 0 RTP/AVP 0\r\n" 
    1233             "a=rtpmap:0 PCMU/8000\r\n" 
     1236            //"a=rtpmap:0 PCMU/8000\r\n"      /* <-- this is not necessary (port 0) */ 
    12341237            "m=video 5000 RTP/AVP 31\r\n" 
    12351238            "a=rtpmap:31 H261/90000\r\n" 
Note: See TracChangeset for help on using the changeset viewer.