static void build_udp_url(char *buf, int buf_size, const char *hostname, int port, int local_port, int multicast, int ttl) { snprintf(buf, buf_size, "udp://%s:%d", hostname, port); if (local_port >= 0) url_add_option(buf, buf_size, "localport=%d", local_port); if (multicast) url_add_option(buf, buf_size, "multicast=1"); if (ttl >= 0) url_add_option(buf, buf_size, "ttl=%d", ttl); }
static void build_udp_url(char *buf, int buf_size, const char *hostname, int port, int local_port, int ttl, int max_packet_size) { ff_url_join(buf, buf_size, "udp", NULL, hostname, port, NULL); if (local_port >= 0) url_add_option(buf, buf_size, "localport=%d", local_port); if (ttl >= 0) url_add_option(buf, buf_size, "ttl=%d", ttl); if (max_packet_size >=0) url_add_option(buf, buf_size, "pkt_size=%d", max_packet_size); }
static void build_udp_url(char *buf, int buf_size, const char *hostname, int port, int local_port, int ttl, int max_packet_size, int connect, int dscp, const char *include_sources, const char *exclude_sources) { ff_url_join(buf, buf_size, "udp", NULL, hostname, port, NULL); if (local_port >= 0) url_add_option(buf, buf_size, "localport=%d", local_port); if (ttl >= 0) url_add_option(buf, buf_size, "ttl=%d", ttl); if (max_packet_size >=0) url_add_option(buf, buf_size, "pkt_size=%d", max_packet_size); if (connect) url_add_option(buf, buf_size, "connect=1"); if (dscp >= 0) url_add_option(buf, buf_size, "dscp=%d", dscp); url_add_option(buf, buf_size, "fifo_size=0"); if (include_sources && include_sources[0]) url_add_option(buf, buf_size, "sources=%s", include_sources); if (exclude_sources && exclude_sources[0]) url_add_option(buf, buf_size, "block=%s", exclude_sources); }
static void build_udp_url(RTPContext *s, char *buf, int buf_size, const char *hostname, int port, int local_port, const char *include_sources, const char *exclude_sources) { ff_url_join(buf, buf_size, "udp", NULL, hostname, port, NULL); if (local_port >= 0) url_add_option(buf, buf_size, "localport=%d", local_port); if (s->ttl >= 0) url_add_option(buf, buf_size, "ttl=%d", s->ttl); if (s->buffer_size >= 0) url_add_option(buf, buf_size, "buffer_size=%d", s->buffer_size); if (s->pkt_size >= 0) url_add_option(buf, buf_size, "pkt_size=%d", s->pkt_size); if (s->connect) url_add_option(buf, buf_size, "connect=1"); if (include_sources && include_sources[0]) url_add_option(buf, buf_size, "sources=%s", include_sources); if (exclude_sources && exclude_sources[0]) url_add_option(buf, buf_size, "block=%s", exclude_sources); }