1 /*
2 * RTP/mpegts muxer
3 * Copyright (c) 2011 Martin Storsjo
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
25
29 };
30
32 {
34
39 }
43 }
44 return 0;
45 }
46
48 {
55
56 if (!mpegts_format || !rtp_format)
59 if (!mpegts_ctx)
61 mpegts_ctx->
oformat = mpegts_format;
65 if (!st)
66 goto fail;
70 }
72 goto fail;
74 goto fail;
77
80
82 if (!rtp_ctx) {
84 goto fail;
85 }
86 rtp_ctx->oformat = rtp_format;
94 goto fail;
96
97 return 0;
98
99 fail:
100 if (mpegts_ctx) {
103 }
104 if (rtp_ctx)
108 }
109
111 {
116
120 }
127 return 0;
128 }
143
145 }
146
148 .
name =
"rtp_mpegts",
150 .priv_data_size =
sizeof(
struct MuxChain),
156 };