annotate rtpenc.h @ 4391:3c0d674bd232 libavformat

Do not use RTP_MAX_PACKET_LENGTH in the RTP muxer
author lucabe
date Fri, 06 Feb 2009 20:41:15 +0000
parents 25430a31705d
children 730b214077ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
1 /*
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
2 * RTP muxer definitions
4251
77e0c7511d41 cosmetics: Remove pointless period after copyright statement non-sentences.
diego
parents: 4101
diff changeset
3 * Copyright (c) 2002 Fabrice Bellard
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
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
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
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
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
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
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
15 * Lesser General Public License for more details.
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
16 *
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
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
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
20 */
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
21 #ifndef AVFORMAT_RTPENC_H
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
22 #define AVFORMAT_RTPENC_H
4100
2e81931d3995 Remove useless typedef
lucabe
parents: 4099
diff changeset
23
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
24 #include "avformat.h"
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
25 #include "rtp.h"
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
26
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
27 struct RTPMuxContext {
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
28 AVFormatContext *ic;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
29 AVStream *st;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
30 int payload_type;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
31 uint32_t ssrc;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
32 uint16_t seq;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
33 uint32_t timestamp;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
34 uint32_t base_timestamp;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
35 uint32_t cur_timestamp;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
36 int max_payload_size;
4380
1b695f013cd3 Introduce a new num_frames field in RTPDemuxContext so that rtp_aac.c
lucabe
parents: 4291
diff changeset
37 int num_frames;
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
38
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
39 /* rtcp sender statistics receive */
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
40 int64_t last_rtcp_ntp_time; // TODO: move into statistics
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
41 int64_t first_rtcp_ntp_time; // TODO: move into statistics
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
42
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
43 /* rtcp sender statistics */
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
44 unsigned int packet_count; // TODO: move into statistics (outgoing)
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
45 unsigned int octet_count; // TODO: move into statistics (outgoing)
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
46 unsigned int last_octet_count; // TODO: move into statistics (outgoing)
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
47 int first_packet;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
48 /* buffer for output */
4391
3c0d674bd232 Do not use RTP_MAX_PACKET_LENGTH in the RTP muxer
lucabe
parents: 4389
diff changeset
49 uint8_t *buf;
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
50 uint8_t *buf_ptr;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
51
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
52 int max_frames_per_packet;
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
53 };
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
54
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
55 typedef struct RTPMuxContext RTPMuxContext;
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
56
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
57 void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
58
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
59 void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size);
4389
25430a31705d Merge rtp_aac.h and rtp_mpv.h in rtpenc.h
lucabe
parents: 4388
diff changeset
60 void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size);
25430a31705d Merge rtp_aac.h and rtp_mpv.h in rtpenc.h
lucabe
parents: 4388
diff changeset
61 void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size);
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
62
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
63 #endif /* AVFORMAT_RTPENC_H */