Mercurial > libavformat.hg
annotate rtp.h @ 4179:c32a783ff374 libavformat
Add a second metadata compatibility layer, so that metadata that gets
demuxed with new API is automatically converted to the old API,
allowing old applications to stay functional.
author | aurel |
---|---|
date | Thu, 08 Jan 2009 23:24:51 +0000 |
parents | af2c0aef892b |
children | 77e0c7511d41 |
rev | line source |
---|---|
0 | 1 /* |
2 * RTP definitions | |
3 * Copyright (c) 2002 Fabrice Bellard. | |
4 * | |
1358
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1167
diff
changeset
|
5 * This file is part of FFmpeg. |
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1167
diff
changeset
|
6 * |
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1167
diff
changeset
|
7 * FFmpeg is free software; you can redistribute it and/or |
0 | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | |
1358
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1167
diff
changeset
|
10 * version 2.1 of the License, or (at your option) any later version. |
0 | 11 * |
1358
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1167
diff
changeset
|
12 * FFmpeg is distributed in the hope that it will be useful, |
0 | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Lesser General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Lesser General Public | |
1358
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1167
diff
changeset
|
18 * License along with FFmpeg; if not, write to the Free Software |
896
edbe5c3717f9
Update licensing information: The FSF changed postal address.
diego
parents:
885
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 20 */ |
3852 | 21 #ifndef AVFORMAT_RTP_H |
22 #define AVFORMAT_RTP_H | |
0 | 23 |
3286 | 24 #include "libavcodec/avcodec.h" |
2171 | 25 #include "avformat.h" |
26 | |
1868
b92a67b0b4bd
Doxygenize the unaltered comments for the rtp_payload_data_s struct.
takis
parents:
1867
diff
changeset
|
27 /** Structure listing useful vars to parse RTP packet payload*/ |
4101
af2c0aef892b
Rename rtp_payload_data_t to avoid clashes with the POSIX namespace
lucabe
parents:
4100
diff
changeset
|
28 typedef struct rtp_payload_data |
774 | 29 { |
30 int sizelength; | |
31 int indexlength; | |
32 int indexdeltalength; | |
33 int profile_level_id; | |
34 int streamtype; | |
35 int objecttype; | |
36 char *mode; | |
37 | |
1869
48b1d0b70e09
Doxygenize the unaltered comments for the AUHeaders structure.
takis
parents:
1868
diff
changeset
|
38 /** mpeg 4 AU headers */ |
774 | 39 struct AUHeaders { |
40 int size; | |
41 int index; | |
42 int cts_flag; | |
43 int cts; | |
44 int dts_flag; | |
45 int dts; | |
46 int rap_flag; | |
47 int streamstate; | |
48 } *au_headers; | |
49 int nb_au_headers; | |
50 int au_headers_length_bytes; | |
51 int cur_au_index; | |
4101
af2c0aef892b
Rename rtp_payload_data_t to avoid clashes with the POSIX namespace
lucabe
parents:
4100
diff
changeset
|
52 } RTPPayloadData; |
774 | 53 |
4100 | 54 typedef struct PayloadContext PayloadContext; |
55 typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler; | |
56 | |
57 #define RTP_MIN_PACKET_LENGTH 12 | |
58 #define RTP_MAX_PACKET_LENGTH 1500 /* XXX: suppress this define */ | |
59 | |
60 int rtp_get_codec_info(AVCodecContext *codec, int payload_type); | |
61 | |
62 /** return < 0 if unknown payload type */ | |
63 int rtp_get_payload_type(AVCodecContext *codec); | |
64 | |
65 typedef struct RTPDemuxContext RTPDemuxContext; | |
4101
af2c0aef892b
Rename rtp_payload_data_t to avoid clashes with the POSIX namespace
lucabe
parents:
4100
diff
changeset
|
66 RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, RTPPayloadData *rtp_payload_data); |
4100 | 67 void rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, |
68 RTPDynamicProtocolHandler *handler); | |
69 int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, | |
70 const uint8_t *buf, int len); | |
71 void rtp_parse_close(RTPDemuxContext *s); | |
72 | |
73 int rtp_get_local_port(URLContext *h); | |
74 int rtp_set_remote_url(URLContext *h, const char *uri); | |
75 void rtp_get_file_handles(URLContext *h, int *prtp_fd, int *prtcp_fd); | |
76 | |
77 /** | |
78 * some rtp servers assume client is dead if they don't hear from them... | |
79 * so we send a Receiver Report to the provided ByteIO context | |
80 * (we don't have access to the rtcp handle from here) | |
81 */ | |
82 int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count); | |
83 | |
84 #define RTP_PT_PRIVATE 96 | |
85 #define RTP_VERSION 2 | |
86 #define RTP_MAX_SDES 256 /**< maximum text length for SDES */ | |
87 | |
88 /* RTCP paquets use 0.5 % of the bandwidth */ | |
89 #define RTCP_TX_RATIO_NUM 5 | |
90 #define RTCP_TX_RATIO_DEN 1000 | |
91 | |
3852 | 92 #endif /* AVFORMAT_RTP_H */ |