21 const char *sink_name;
33 NULL, NULL, NULL, graph);
43 int main(
int argc,
char **argv)
45 char *in_graph_desc, **out_dev_name;
46 int nb_out_dev = 0, nb_streams = 0;
48 Stream *streams = NULL, *st;
56 "Usage: %s filter_graph dev:out [dev2:out2...]\n\n"
58 "%s movie=file.nut:s=v+a xv:- alsa:default\n"
59 "%s movie=file.nut:s=v+a uncodedframecrc:pipe:0\n",
60 argv[0], argv[0], argv[0]);
63 in_graph_desc = argv[1];
64 out_dev_name = argv + 2;
65 nb_out_dev = argc - 2;
103 if (nb_out_dev != 1 && nb_out_dev != nb_streams) {
105 "Graph has %d output streams, %d devices given\n",
106 nb_streams, nb_out_dev);
111 if (!(streams =
av_calloc(nb_streams,
sizeof(*streams)))) {
132 for (i = 0; i < nb_out_dev; i++) {
133 char *
fmt = NULL, *dev = out_dev_name[i];
135 if ((dev = strchr(dev,
':'))) {
137 fmt = out_dev_name[i];
155 for (; i < nb_streams; i++)
156 streams[i].mux = streams[0].mux;
159 for (i = 0; i < nb_streams; i++) {
166 st->stream->codec->codec_type = st->link->type;
167 st->stream->time_base = st->stream->codec->time_base =
169 switch (st->link->type) {
172 st->stream->avg_frame_rate =
174 st->stream->codec->width = st->link->w;
175 st->stream->codec->height = st->link->h;
176 st->stream->codec->sample_aspect_ratio = st->link->sample_aspect_ratio;
177 st->stream->codec->pix_fmt = st->link->format;
180 st->stream->codec->codec_id =
182 st->stream->codec->channel_layout = st->link->channel_layout;
184 st->stream->codec->sample_rate = st->link->sample_rate;
185 st->stream->codec->sample_fmt = st->link->format;
193 for (i = 0; i < nb_out_dev; i++) {
203 for (i = 0; i < nb_streams; i++) {
208 "Uncoded frames not supported on stream #%d: %s\n",
225 for (i = 0; i < nb_streams; i++) {
243 st->link ->time_base,
244 st->stream->time_base);
259 for (i = 0; i < nb_out_dev; i++) {
268 for (i = 0; i < nb_out_dev; i++) {