/* $Header: /pjproject/pjmedia/src/test/sdptest.c 8 6/12/05 11:36a Bennylp $ */ #include #include #include #include #include static char *sdp[] = { /* "v=0\r\n" "o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4\r\n" "s=SDP Seminar\r\n" "i=A Seminar on the session description protocol\r\n" "u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps\r\n" "e=mjh@isi.edu (Mark Handley)\r\n" "c=IN IP4 224.2.17.12/127\r\n" "t=2873397496 2873404696\r\n" "a=recvonly\r\n" "m=audio 49170 RTP/AVP 0\r\n" "m=video 51372 RTP/AVP 31\r\n" "m=application 32416 udp wb\r\n" "a=orient:portrait\r\n" "m=audio 49230 RTP/AVP 96 97 98\r\n" "a=rtpmap:96 L8/8000\r\n" "a=rtpmap:97 L16/8000\r\n" "a=rtpmap:98 L16/11025/2\r\n", */ "v=0\r\n" "o=usera 2890844526 2890844527 IN IP4 alice.example.com\r\n" "s=\r\n" "c=IN IP4 alice.example.com\r\n" "t=0 0\r\n" "m=message 7394 msrp/tcp *\r\n" "a=accept-types: message/cpim text/plain text/html\r\n" "a=path:msrp://alice.example.com:7394/2s93i9;tcp\r\n" }; static int sdp_perform_test(pj_pool_factory *pf) { pj_pool_t *pool; int inputlen, len; pjsdp_session_desc *ses; char buf[1500]; enum { LOOP=1000000 }; int i; pj_time_val start, end; printf("Parsing and printing %d SDP messages..\n", LOOP); pool = pj_pool_create(pf, "", 4096, 0, NULL); inputlen = strlen(sdp[0]); pj_gettimeofday(&start); for (i=0; i