annotate rtpenc.h @ 6389:054de75e4a49 libavformat

Make parse_key_value from httpauth a common lavf internal function
author mstorsjo
date Thu, 19 Aug 2010 14:49:53 +0000
parents 0bcd6a8bc5d5
children
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;
6136
6c0e0ad77315 If the video stream is H.264 with MP4 syntax, store the NAL lenght size in
lucabe
parents: 4836
diff changeset
53
6c0e0ad77315 If the video stream is H.264 with MP4 syntax, store the NAL lenght size in
lucabe
parents: 4836
diff changeset
54 /**
6c0e0ad77315 If the video stream is H.264 with MP4 syntax, store the NAL lenght size in
lucabe
parents: 4836
diff changeset
55 * Number of bytes used for H.264 NAL length, if the MP4 syntax is used
6c0e0ad77315 If the video stream is H.264 with MP4 syntax, store the NAL lenght size in
lucabe
parents: 4836
diff changeset
56 * (1, 2 or 4)
6c0e0ad77315 If the video stream is H.264 with MP4 syntax, store the NAL lenght size in
lucabe
parents: 4836
diff changeset
57 */
6c0e0ad77315 If the video stream is H.264 with MP4 syntax, store the NAL lenght size in
lucabe
parents: 4836
diff changeset
58 int nal_length_size;
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
59 };
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
60
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
61 typedef struct RTPMuxContext RTPMuxContext;
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
62
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
63 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
64
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
65 void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size);
4814
730b214077ca Add support for H.263 video in the RTP muxer
lucabe
parents: 4391
diff changeset
66 void ff_rtp_send_h263(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
67 void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size);
4836
bf87d9ffb3ae Add support for AMR audio in the RTP muxer
lucabe
parents: 4814
diff changeset
68 void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size);
4389
25430a31705d Merge rtp_aac.h and rtp_mpv.h in rtpenc.h
lucabe
parents: 4388
diff changeset
69 void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size);
6349
93c7a56fa912 Add RTP packetization of Theora and Vorbis
mstorsjo
parents: 6136
diff changeset
70 void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size);
6379
0bcd6a8bc5d5 Add RTP packetization of VP8
mstorsjo
parents: 6349
diff changeset
71 void ff_rtp_send_vp8(AVFormatContext *s1, const uint8_t *buff, int size);
4291
f49e5d92ab26 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
lucabe
parents: 4251
diff changeset
72
4388
80f21f72d7d6 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
lucabe
parents: 4387
diff changeset
73 #endif /* AVFORMAT_RTPENC_H */