UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
rtp.hpp
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2013-2023 CESNET z.s.p.o.
7 * All rights reserved.
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. Neither the name of CESNET nor the names of its contributors may be
21 * used to endorse or promote products derived from this software without
22 * specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
26 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
27 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
28 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef VIDEO_RXTX_RTP_H_
39#define VIDEO_RXTX_RTP_H_
40
41#include "tv.h"
42#include "video_rxtx.hpp"
43
44#include <mutex>
45#include <string>
46
47#ifdef __APPLE__
48#define INITIAL_VIDEO_RECV_BUFFER_SIZE 5944320
49#else
50#define INITIAL_VIDEO_RECV_BUFFER_SIZE ((4*1920*1080)*110/100)
51#endif
52
53#define INITIAL_VIDEO_SEND_BUFFER_SIZE (1024*1024)
54
55struct rtp;
56struct fec;
57
58class rtp_video_rxtx : public video_rxtx {
59 friend struct video_rxtx;
60public:
61 rtp_video_rxtx(std::map<std::string, param_u> const &params);
62 virtual ~rtp_video_rxtx();
63
64 static struct rtp *initialize_network(const char *addrs, int recv_port_base,
65 int send_port_base, struct pdb *participants, int force_ip_version,
66 const char *mcast_if, int ttl);
67 static void destroy_rtp_device(struct rtp * network_devices);
68 static void display_buf_increase_warning(int size);
69
70protected:
71 struct rtp *m_network_device; // ULTRAGRID_RTP
73 struct tx *m_tx;
80private:
81 struct response *process_sender_message(struct msg_sender *msg) override;
82};
83
84#endif // VIDEO_RXTX_RTP_H_
85
fec * m_fec_state
Definition rtp.hpp:78
std::mutex m_network_devices_lock
Definition rtp.hpp:72
struct response * process_sender_message(struct msg_sender *msg) override
Definition rtp.cpp:73
static struct rtp * initialize_network(const char *addrs, int recv_port_base, int send_port_base, struct pdb *participants, int force_ip_version, const char *mcast_if, int ttl)
Definition rtp.cpp:267
int m_recv_port_number
Definition rtp.hpp:76
struct rtp * m_network_device
Definition rtp.hpp:71
static void destroy_rtp_device(struct rtp *network_devices)
Definition rtp.cpp:305
struct pdb * m_participants
Definition rtp.hpp:74
rtp_video_rxtx(std::map< std::string, param_u > const &params)
Definition rtp.cpp:194
std::string m_requested_receiver
Definition rtp.hpp:75
virtual ~rtp_video_rxtx()
Definition rtp.cpp:224
int m_send_port_number
Definition rtp.hpp:77
video_desc m_video_desc
Definition rtp.hpp:79
static void display_buf_increase_warning(int size)
Definition rtp.cpp:241
struct tx * m_tx
Definition rtp.hpp:73
Definition fec.h:51
Definition pdb.c:84
Definition rtp.c:274