65 lines
1.9 KiB
C
65 lines
1.9 KiB
C
/*
|
|||
|
|
* RTP network protocol
|
||
|
|
*
|
||
|
|
* This file is part of FFmpeg.
|
||
|
|
*
|
||
|
|
* FFmpeg is free software; you can redistribute it and/or
|
||
|
|
* modify it under the terms of the GNU Lesser General Public
|
||
|
|
* License as published by the Free Software Foundation; either
|
||
|
|
* version 2.1 of the License, or (at your option) any later version.
|
||
|
|
*
|
||
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
||
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
|
* Lesser General Public License for more details.
|
||
|
|
*
|
||
|
|
* You should have received a copy of the GNU Lesser General Public
|
||
|
|
* License along with FFmpeg; if not, write to the Free Software
|
||
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
|
*/
|
||
|
|
|
||
|
|
#ifndef AVFORMAT_RTPPROTO_H
|
||
|
|
#define AVFORMAT_RTPPROTO_H
|
||
|
|
|
||
|
|
#include "libavformat/url.h"
|
||
|
|
#include "libavformat/network.h"
|
||
|
|
#include "libavutil/opt.h"
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct RTPContext {
|
||
|
|
const AVClass *clasz;
|
||
|
|
URLContext *rtp_hd, *rtcp_hd, *fec_hd;
|
||
|
|
int rtp_fd, rtcp_fd, nb_ssm_include_addrs, nb_ssm_exclude_addrs;
|
||
|
|
struct sockaddr_storage **ssm_include_addrs, **ssm_exclude_addrs;
|
||
|
|
int write_to_source;
|
||
|
|
struct sockaddr_storage last_rtp_source, last_rtcp_source;
|
||
|
|
socklen_t last_rtp_source_len, last_rtcp_source_len;
|
||
|
|
int ttl;
|
||
|
|
int buffer_size;
|
||
|
|
int rtcp_port, local_rtpport, local_rtcpport;
|
||
|
|
int connect;
|
||
|
|
int pkt_size;
|
||
|
|
int dscp;
|
||
|
|
char *sources;
|
||
|
|
char *block;
|
||
|
|
char *fec_options_str;
|
||
|
|
int rtp_thread_enable; //1:enable; 0:disable
|
||
|
|
void* session;
|
||
|
|
} RTPContext;
|
||
|
|
|
||
|
|
extern const AVOption options[];
|
||
|
|
|
||
|
|
static const AVClass rtp_class = {
|
||
|
|
.class_name = "rtp",
|
||
|
|
.item_name = av_default_item_name,
|
||
|
|
.option = options,
|
||
|
|
.version = LIBAVUTIL_VERSION_INT,
|
||
|
|
};
|
||
|
|
|
||
|
|
int aml_rtp_set_remote_url(URLContext *h, const char *uri);
|
||
|
|
|
||
|
|
int ff_rtp_get_local_rtp_port(URLContext *h);
|
||
|
|
|
||
|
|
#endif /* AVFORMAT_RTPPROTO_H */
|