FreeCalypso > hg > themwi-interim
view mtctest/rtp_sink.c @ 14:44c1d4d787e9 default tip
themwi-test-mtc: add option to set bearer cap
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 28 Nov 2024 20:37:23 +0000 |
parents | 33d8b3177540 |
children |
line wrap: on
line source
/* * In this module we implement our RTP handling: obtaining a GSM-side * RTP endpoint from themwi-rtp-mgr, then handling read select on RTP * and RTCP UDP sockets. */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <themwi/rtp/rtp_alloc_if.h> #include <themwi/rtp/rtp_alloc_simple.h> struct rtp_alloc_simple rtp_info; void obtain_rtp_endp() { int rc; rc = rtp_alloc_simple(RTP_ALLOC_TYPE_GSM, &rtp_info); if (rc < 0) exit(1); /* error msg already printed */ } void rtp_rx_select() { u_char buf[512]; recv(rtp_info.gsm_rtp_fd, buf, sizeof buf, 0); } void rtcp_rx_select() { u_char buf[512]; recv(rtp_info.gsm_rtcp_fd, buf, sizeof buf, 0); }