FreeCalypso > hg > themwi-interim
view mtctest/rtp_sink.c @ 13:c71801aa0039 default tip
themwi-test-mtc: increase maximum play length
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 29 Oct 2024 00:06:28 +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); }