Mercurial > libavformat.hg
annotate rtpenc.h @ 5799:821155aecf2a libavformat
Add special case to avoid binary search when appending index entries.
author | michael |
---|---|
date | Tue, 09 Mar 2010 15:19:23 +0000 |
parents | bf87d9ffb3ae |
children | 6c0e0ad77315 |
rev | line source |
---|---|
0 | 1 /* |
4388 | 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 | 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 */ |
4388 | 21 #ifndef AVFORMAT_RTPENC_H |
22 #define AVFORMAT_RTPENC_H | |
4100 | 23 |
4388 | 24 #include "avformat.h" |
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 | 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 | 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 | 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 | 59 void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size); |
4814 | 60 void ff_rtp_send_h263(AVFormatContext *s1, const uint8_t *buf1, int size); |
4389 | 61 void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size); |
4836 | 62 void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size); |
4389 | 63 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
|
64 |
4388 | 65 #endif /* AVFORMAT_RTPENC_H */ |