#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <string.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <linux/if_ether.h>
#include <errno.h>
#include "str.h"
#include "net_udp.h"
#include "rtp.h"
#include <sys/types.h>
#include <sys/uio.h>
Include dependency graph for rtp.c:
Go to the source code of this file.
Defines | |
#define | SECS_BETWEEN_1900_1970 2208988800u |
#define | SOURCE_UDP_PORT 20020 |
Functions | |
void | ntp64_time (uint32_t *ntp_sec, uint32_t *ntp_frac) |
static void | init_rng (const int8_t *s) |
int32_t | rtp_init (struct param *p) |
uint16_t | in_chksum (const uint16_t *addr, register uint32_t len) |
int | rtp_send_data (struct param *p, uint32_t rtp_ts, int8_t pt, int32_t m, int8_t *data, int32_t data_len, unsigned char *h_buf, int h_offset, int h_len) |
void | rtp_done (struct param *p) |
int32_t | ismulticast (struct param *p) |
#define SECS_BETWEEN_1900_1970 2208988800u |
#define SOURCE_UDP_PORT 20020 |
uint16_t in_chksum | ( | const uint16_t * | addr, | |
register uint32_t | len | |||
) |
static void init_rng | ( | const int8_t * | s | ) | [static] |
int32_t ismulticast | ( | struct param * | p | ) |
Definition at line 248 of file rtp.c.
References param::dst_addr4.
Referenced by handle_DESCRIBE(), jpeg_session_start(), and write_sdp().
void ntp64_time | ( | uint32_t * | ntp_sec, | |
uint32_t * | ntp_frac | |||
) |
void rtp_done | ( | struct param * | p | ) |
int32_t rtp_init | ( | struct param * | p | ) |
Definition at line 77 of file rtp.c.
References param::dport, init_rng(), param::ip_id, param::my_ssrc, param::rtp_seq, and udp_init4().
Referenced by jpeg_session_start().
int rtp_send_data | ( | struct param * | p, | |
uint32_t | rtp_ts, | |||
int8_t | pt, | |||
int32_t | m, | |||
int8_t * | data, | |||
int32_t | data_len, | |||
unsigned char * | h_buf, | |||
int | h_offset, | |||
int | h_len | |||
) |
Definition at line 134 of file rtp.c.
References buffer, rtp_packet::cc, param::dport, param::dst_addr4, param::fd_raw, param::fd_udp, in_chksum(), param::ip_id, rtp_packet::m, param::msg, param::my_ssrc, rtp_packet::p, rtp_packet::pt, param::raw, RTP_HEADER_SIZE, param::rtp_seq, rtp_packet::seq, SOURCE_UDP_PORT, param::src_addr4, rtp_packet::ssrc, rtp_packet::ts, param::ttl, rtp_packet::v, and rtp_packet::x.
Referenced by send_jpeg().