UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
sdp.h
Go to the documentation of this file.
1/*
2 * FILE: sdp.h
3 * AUTHORS: Gerard Castillo <gerard.castillo@i2cat.net>
4 * Martin Pulec <pulec@cesnet.cz>
5 *
6 * Copyright (c) 2005-2010 Fundació i2CAT, Internet I Innovació Digital a Catalunya
7 * Copyright (c) 2018-2023 CESNET, z. s. p. o.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, is permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 *
20 * 3. All advertising materials mentioning features or use of this software
21 * must display the following acknowledgement:
22 *
23 * This product includes software developed by CESNET z.s.p.o.
24 *
25 * 4. Neither the name of the CESNET nor the names of its contributors may be
26 * used to endorse or promote products derived from this software without
27 * specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
30 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
31 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
32 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
33 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
34 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
35 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
39 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
40 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 *
42 */
43#ifndef __sdp_h
44#define __sdp_h
45
46#include "audio/types.h"
47#include "types.h"
48#include "utils/macros.h" // for STR_LEN
49
50#ifdef __cplusplus
51extern "C" {
52#else
53#include <stdbool.h>
54#endif
55
56int sdp_set_options(const char *options);
57void sdp_set_properties(const char *receiver, bool has_sdp_video, bool has_sdp_audio);
58
59typedef void (*address_callback_t)(void *udata, const char *address);
60
62 char rtpmapLine[STR_LEN]);
63int get_video_rtp_pt_rtpmap(codec_t codec, char rtpmapLine[STR_LEN]);
64int sdp_add_audio(bool ipv6, int port, int sample_rate, int channels, audio_codec_t codec, address_callback_t addr_callback, void *addr_callback_udata);
65int sdp_add_video(bool ipv6, int port, codec_t codec, address_callback_t addr_callback, void *addr_callback_udata);
66
67codec_t get_video_codec_from_pt_rtpmap(int pt, const char *rtpmap_codec_name);
68
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif
int int int sample_rate
int int channels
This file contains definition of some common audio types.
audio_codec_t
Definition types.h:51
@ STR_LEN
"standard" string length placeholder
Definition macros.h:134
int get_audio_rtp_pt_rtpmap(audio_codec_t codec, int sample_rate, int channels, char rtpmapLine[STR_LEN])
Definition sdp.c:227
int sdp_set_options(const char *options)
Definition sdp.c:585
int sdp_add_audio(bool ipv6, int port, int sample_rate, int channels, audio_codec_t codec, address_callback_t addr_callback, void *addr_callback_udata)
Definition sdp.c:277
void sdp_set_properties(const char *receiver, bool has_sdp_video, bool has_sdp_audio)
Definition sdp.c:576
int get_video_rtp_pt_rtpmap(codec_t codec, char rtpmapLine[STR_LEN])
Definition sdp.c:304
int sdp_add_video(bool ipv6, int port, codec_t codec, address_callback_t addr_callback, void *addr_callback_udata)
Definition sdp.c:335
void sdp_print_supported_codecs(void)
Definition sdp.c:652
void(* address_callback_t)(void *udata, const char *address)
Definition sdp.h:59
codec_t get_video_codec_from_pt_rtpmap(int pt, const char *rtpmap_codec_name)
get UG video codec to given params
Definition sdp.c:622
Definition rtp.c:253
This file contains some common data types.
codec_t
Definition types.h:65