UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
transmit.h
Go to the documentation of this file.
1/*
2 * FILE: transmit.h
3 * AUTHOR: Colin Perkins <csp@isi.edu>
4 * Martin Benes <martinbenesh@gmail.com>
5 * Lukas Hejtmanek <xhejtman@ics.muni.cz>
6 * Petr Holub <hopet@ics.muni.cz>
7 * Milos Liska <xliska@fi.muni.cz>
8 * Jiri Matela <matela@ics.muni.cz>
9 * Dalibor Matura <255899@mail.muni.cz>
10 * Ian Wesley-Smith <iwsmith@cct.lsu.edu>
11 * David Cassany <david.cassany@i2cat.net>
12 * Ignacio Contreras <ignacio.contreras@i2cat.net>
13 * Gerard Castillo <gerard.castillo@i2cat.net>
14 * Jordi "Txor" Casas Ríos <txorlings@gmail.com>
15 *
16 * Copyright (c) 2005-2010 Fundació i2CAT, Internet I Innovació Digital a Catalunya
17 * Copyright (c) 2001-2002 University of Southern California
18 * Copyright (c) 2005-2023 CESNET z.s.p.o.
19 *
20 * Redistribution and use in source and binary forms, with or without
21 * modification, is permitted provided that the following conditions
22 * are met:
23 *
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 *
27 * 2. Redistributions in binary form must reproduce the above copyright
28 * notice, this list of conditions and the following disclaimer in the
29 * documentation and/or other materials provided with the distribution.
30 *
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 *
34 * This product includes software developed by the University of Southern
35 * California Information Sciences Institute. This product also includes
36 * software developed by CESNET z.s.p.o.
37 *
38 * 4. Neither the name of the University, Institute, CESNET nor the names of
39 * its contributors may be used to endorse or promote products derived from
40 * this software without specific prior written permission.
41 *
42 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
43 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
44 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
45 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
46 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
47 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
48 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
49 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
51 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
52 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
53 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 *
55 */
56
57#ifndef TRANSMIT_H_
58#define TRANSMIT_H_
59
60#include "audio/types.h"
61#include "rtp/rtpenc_h264.h"
62#include "types.h"
63
64#ifndef __cplusplus
65#include <stdint.h>
66#else
67#include <cstdint>
68extern "C" {
69#endif
70
71struct module;
72struct rtp;
73struct tx;
74struct video_frame;
75
76struct tx *tx_init(struct module *parent, unsigned mtu, enum tx_media_type media_type,
77 const char *fec, const char *encryption, long long bitrate);
78void tx_send(struct tx *tx_session, struct video_frame *frame, struct rtp *rtp_session);
79void format_video_header(struct video_frame *frame, int tile_idx, int buffer_idx,
80 uint32_t *hdr);
81
82void tx_send_h264(struct tx *tx_session, struct video_frame *frame, struct rtp *rtp_session);
83void tx_send_jpeg(struct tx *tx_session, struct video_frame *frame, struct rtp *rtp_session);
84
88int tx_get_buffer_id(struct tx *tx_session);
89
90#ifdef __cplusplus
91}
92#endif
93
94#ifdef __cplusplus
95class audio_frame2;
96void audio_tx_send(struct tx *tx_session, struct rtp *rtp_session, const audio_frame2 *buffer);
97void audio_tx_send_standard(struct tx* tx, struct rtp *rtp_session, const audio_frame2 * buffer);
98void format_audio_header(const class audio_frame2 *frame, int channel, int buffer_idx, uint32_t *audio_hdr);
99#endif
100
101#endif // TRANSMIT_H_
102
struct video_frame * frame
This file contains definition of some common audio types.
const char * parent
Definition settings.cpp:198
Definition fec.h:51
Definition rtp.c:274
unsigned mtu
Definition transmit.cpp:137
long long int bitrate
Definition transmit.cpp:160
enum tx_media_type media_type
Definition transmit.cpp:136
struct openssl_encrypt * encryption
Definition transmit.cpp:159
Struct video_frame represents a video frame and contains video description.
Definition types.h:305
void format_video_header(struct video_frame *frame, int tile_idx, int buffer_idx, uint32_t *hdr)
Definition transmit.cpp:445
struct tx * tx_init(struct module *parent, unsigned mtu, enum tx_media_type media_type, const char *fec, const char *encryption, long long bitrate)
void audio_tx_send(struct tx *tx_session, struct rtp *rtp_session, const audio_frame2 *buffer)
Definition transmit.cpp:799
void tx_send_h264(struct tx *tx_session, struct video_frame *frame, struct rtp *rtp_session)
void tx_send_jpeg(struct tx *tx_session, struct video_frame *frame, struct rtp *rtp_session)
void tx_send(struct tx *tx_session, struct video_frame *frame, struct rtp *rtp_session)
Definition transmit.cpp:407
int tx_get_buffer_id(struct tx *tx_session)
void audio_tx_send_standard(struct tx *tx, struct rtp *rtp_session, const audio_frame2 *buffer)
Definition transmit.cpp:958
void format_audio_header(const class audio_frame2 *frame, int channel, int buffer_idx, uint32_t *audio_hdr)
This file contains some common data types.
tx_media_type
Definition types.h:363