1 /*
2 * Copyright (c) 2007 Bobby Bingham
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 /**
22 * @file
23 * audio and video splitter
24 */
25
26 #include <stdio.h>
27
32
37
42
44 {
46 int i;
47
51
52 snprintf(name,
sizeof(name),
"output%d", i);
55
57 }
58
59 return 0;
60 }
61
63 {
64 int i;
65
68 }
69
71 {
74
77
79 continue;
81 if (!buf_out) {
83 break;
84 }
85
87 if (ret < 0)
88 break;
89 }
92 }
93
94 #define OFFSET(x) offsetof(SplitContext, x)
95 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM
98 { NULL }
99 };
100
101 #define split_options options
103
104 #define asplit_options options
106
108 {
112 },
113 { NULL }
114 };
115
120 .priv_class = &split_class,
123 .
inputs = avfilter_vf_split_inputs,
126 };
127
129 {
133 },
134 { NULL }
135 };
136
141 .priv_class = &asplit_class,
144 .
inputs = avfilter_af_asplit_inputs,
147 };