1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/* $Id$ * */ #include <pjmedia/rtp.h> #include <stdio.h> int rtp_test() { pj_rtp_session rtp; FILE *fhnd = fopen("RTP.DAT", "wb"); const void *rtphdr; int hdrlen; if (!fhnd) return -1; pj_rtp_session_init (&rtp, 4, 0x12345678); pj_rtp_encode_rtp (&rtp, 4, 0, 0, 160, &rtphdr, &hdrlen); fwrite (rtphdr, hdrlen, 1, fhnd); fclose(fhnd); return 0; }