comparison rtpenc.h @ 4388:80f21f72d7d6 libavformat

Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
author lucabe
date Fri, 06 Feb 2009 10:35:52 +0000
parents rtp.h@5c42816e12c6
children 25430a31705d
comparison
equal deleted inserted replaced
4387:5c42816e12c6 4388:80f21f72d7d6
1 /*
2 * RTP muxer definitions
3 * Copyright (c) 2002 Fabrice Bellard
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
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
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21 #ifndef AVFORMAT_RTPENC_H
22 #define AVFORMAT_RTPENC_H
23
24 #include "avformat.h"
25 #include "rtp.h"
26
27 struct RTPMuxContext {
28 AVFormatContext *ic;
29 AVStream *st;
30 int payload_type;
31 uint32_t ssrc;
32 uint16_t seq;
33 uint32_t timestamp;
34 uint32_t base_timestamp;
35 uint32_t cur_timestamp;
36 int max_payload_size;
37 int num_frames;
38
39 /* rtcp sender statistics receive */
40 int64_t last_rtcp_ntp_time; // TODO: move into statistics
41 int64_t first_rtcp_ntp_time; // TODO: move into statistics
42
43 /* rtcp sender statistics */
44 unsigned int packet_count; // TODO: move into statistics (outgoing)
45 unsigned int octet_count; // TODO: move into statistics (outgoing)
46 unsigned int last_octet_count; // TODO: move into statistics (outgoing)
47 int first_packet;
48 /* buffer for output */
49 uint8_t buf[RTP_MAX_PACKET_LENGTH];
50 uint8_t *buf_ptr;
51
52 int max_frames_per_packet;
53 };
54
55 typedef struct RTPMuxContext RTPMuxContext;
56
57 void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
58
59 void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size);
60
61 #endif /* AVFORMAT_RTPENC_H */