UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
h264_rtp.hpp
Go to the documentation of this file.
1
8/*
9 * Copyright (c) 2013-2014 Fundació i2CAT, Internet I Innovació Digital a Catalunya
10 * Copyright (c) 2013-2023 CESNET, z. s. p. o.
11 * All rights reserved.
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, is permitted provided that the following conditions
15 * are met:
16 *
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 *
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * 3. Neither the name of CESNET nor the names of its contributors may be
25 * used to endorse or promote products derived from this software without
26 * specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
30 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
31 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
32 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
38 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
39 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 */
41
42#ifndef VIDEO_RXTX_H264_RTP_H_
43#define VIDEO_RXTX_H264_RTP_H_
44
45#include <atomic> // for atomic_bool
46#include <map> // for map
47#include <memory> // for shared_ptr
48#include <string> // for string
49
51#include "video_rxtx/rtp.hpp"
52
53union param_u;
54struct video_frame;
55
57public:
58 h264_rtp_video_rxtx(std::map<std::string, param_u> const &, int);
59 virtual ~h264_rtp_video_rxtx();
60 void join() override;
61 void set_audio_spec(const struct audio_desc *desc, int audio_rx_port,
62 int audio_tx_port, bool ipv6) override;
63
64private:
65 virtual void send_frame(std::shared_ptr<video_frame>) noexcept override;
66 virtual void *(*get_receiver_thread() noexcept)(void *arg) override {
67 return nullptr;
68 }
71 std::atomic<bool> audio_params_set = false;
73 void (*tx_send_std)(struct tx *tx_session, struct video_frame *frame,
74 struct rtp *rtp_session) = nullptr;
75};
76
77#endif // VIDEO_RXTX_H264_RTP_H_
78
struct video_desc desc
struct video_frame * frame
EXTERNC struct rtsp_serv rtsp_serv_t
void set_audio_spec(const struct audio_desc *desc, int audio_rx_port, int audio_tx_port, bool ipv6) override
Definition h264_rtp.cpp:149
void(* tx_send_std)(struct tx *tx_session, struct video_frame *frame, struct rtp *rtp_session)
Definition h264_rtp.hpp:73
virtual ~h264_rtp_video_rxtx()
Definition h264_rtp.cpp:137
h264_rtp_video_rxtx(std::map< std::string, param_u > const &, int)
Definition h264_rtp.cpp:68
virtual void send_frame(std::shared_ptr< video_frame >) noexcept override
Definition h264_rtp.cpp:111
std::atomic< bool > audio_params_set
Definition h264_rtp.hpp:71
rtsp_serv_t * m_rtsp_server
Definition h264_rtp.hpp:72
virtual void *(*)(void *arg) get_receiver_thread() noexcept
Definition h264_rtp.hpp:66
void configure_rtsp_server_video()
Definition h264_rtp.cpp:85
void join() override
Definition h264_rtp.cpp:142
Definition rtp.c:274
Struct video_frame represents a video frame and contains video description.
Definition types.h:305