Mercurial > libavformat.hg
annotate rtp.h @ 1371:6f00a1374023 libavformat
unused #define
author | michael |
---|---|
date | Tue, 10 Oct 2006 23:59:08 +0000 |
parents | 0899bfe4105c |
children | 8fb4910bdcc0 |
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 */ |
21 #ifndef RTP_H | |
22 #define RTP_H | |
23 | |
24 #define RTP_MIN_PACKET_LENGTH 12 | |
25 #define RTP_MAX_PACKET_LENGTH 1500 /* XXX: suppress this define */ | |
26 | |
27 int rtp_init(void); | |
28 int rtp_get_codec_info(AVCodecContext *codec, int payload_type); | |
29 int rtp_get_payload_type(AVCodecContext *codec); | |
294
6091b76cfc2a
added MPEG2TS support in RTP, SDP and RTSP - replaced fake RTP demux by a specific API
bellard
parents:
0
diff
changeset
|
30 |
6091b76cfc2a
added MPEG2TS support in RTP, SDP and RTSP - replaced fake RTP demux by a specific API
bellard
parents:
0
diff
changeset
|
31 typedef struct RTPDemuxContext RTPDemuxContext; |
774 | 32 typedef struct rtp_payload_data_s rtp_payload_data_s; |
33 RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, int payload_type, rtp_payload_data_s *rtp_payload_data); | |
885 | 34 int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, |
294
6091b76cfc2a
added MPEG2TS support in RTP, SDP and RTSP - replaced fake RTP demux by a specific API
bellard
parents:
0
diff
changeset
|
35 const uint8_t *buf, int len); |
6091b76cfc2a
added MPEG2TS support in RTP, SDP and RTSP - replaced fake RTP demux by a specific API
bellard
parents:
0
diff
changeset
|
36 void rtp_parse_close(RTPDemuxContext *s); |
0 | 37 |
1167 | 38 extern AVOutputFormat rtp_muxer; |
39 extern AVInputFormat rtp_demuxer; | |
0 | 40 |
41 int rtp_get_local_port(URLContext *h); | |
42 int rtp_set_remote_url(URLContext *h, const char *uri); | |
43 void rtp_get_file_handles(URLContext *h, int *prtp_fd, int *prtcp_fd); | |
44 | |
45 extern URLProtocol rtp_protocol; | |
46 | |
774 | 47 #define RTP_PT_PRIVATE 96 |
48 #define RTP_VERSION 2 | |
49 #define RTP_MAX_SDES 256 /* maximum text length for SDES */ | |
50 | |
51 /* RTCP paquets use 0.5 % of the bandwidth */ | |
52 #define RTCP_TX_RATIO_NUM 5 | |
53 #define RTCP_TX_RATIO_DEN 1000 | |
54 | |
55 /* Structure listing usefull vars to parse RTP packet payload*/ | |
56 typedef struct rtp_payload_data_s | |
57 { | |
58 int sizelength; | |
59 int indexlength; | |
60 int indexdeltalength; | |
61 int profile_level_id; | |
62 int streamtype; | |
63 int objecttype; | |
64 char *mode; | |
65 | |
66 /* mpeg 4 AU headers */ | |
67 struct AUHeaders { | |
68 int size; | |
69 int index; | |
70 int cts_flag; | |
71 int cts; | |
72 int dts_flag; | |
73 int dts; | |
74 int rap_flag; | |
75 int streamstate; | |
76 } *au_headers; | |
77 int nb_au_headers; | |
78 int au_headers_length_bytes; | |
79 int cur_au_index; | |
80 } rtp_payload_data_t; | |
81 | |
82 typedef struct AVRtpPayloadType_s | |
83 { | |
84 int pt; | |
85 const char enc_name[50]; /* XXX: why 50 ? */ | |
86 enum CodecType codec_type; | |
87 enum CodecID codec_id; | |
88 int clock_rate; | |
89 int audio_channels; | |
90 } AVRtpPayloadType_t; | |
91 | |
92 typedef struct AVRtpDynamicPayloadType_s /* payload type >= 96 */ | |
93 { | |
94 const char enc_name[50]; /* XXX: still why 50 ? ;-) */ | |
95 enum CodecType codec_type; | |
96 enum CodecID codec_id; | |
97 } AVRtpDynamicPayloadType_t; | |
98 | |
803
021c8bf015c2
RTCP_* conflict with live.com and they seem not to be used anywhere so commenting them out
michael
parents:
774
diff
changeset
|
99 #if 0 |
774 | 100 typedef enum { |
101 RTCP_SR = 200, | |
102 RTCP_RR = 201, | |
103 RTCP_SDES = 202, | |
104 RTCP_BYE = 203, | |
105 RTCP_APP = 204 | |
106 } rtcp_type_t; | |
107 | |
108 typedef enum { | |
109 RTCP_SDES_END = 0, | |
110 RTCP_SDES_CNAME = 1, | |
111 RTCP_SDES_NAME = 2, | |
112 RTCP_SDES_EMAIL = 3, | |
113 RTCP_SDES_PHONE = 4, | |
114 RTCP_SDES_LOC = 5, | |
115 RTCP_SDES_TOOL = 6, | |
116 RTCP_SDES_NOTE = 7, | |
117 RTCP_SDES_PRIV = 8, | |
118 RTCP_SDES_IMG = 9, | |
119 RTCP_SDES_DOOR = 10, | |
120 RTCP_SDES_SOURCE = 11 | |
121 } rtcp_sdes_type_t; | |
803
021c8bf015c2
RTCP_* conflict with live.com and they seem not to be used anywhere so commenting them out
michael
parents:
774
diff
changeset
|
122 #endif |
774 | 123 |
124 extern AVRtpPayloadType_t AVRtpPayloadTypes[]; | |
125 extern AVRtpDynamicPayloadType_t AVRtpDynamicPayloadTypes[]; | |
126 | |
0 | 127 #endif /* RTP_H */ |