72 #define OFFSET(x) offsetof(MovieContext, x)
73 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM
94 int i,
ret, already = 0, stream_id = -1;
95 char type_char[2],
dummy;
99 ret = sscanf(spec,
"d%1[av]%d%c", type_char, &stream_id, &dummy);
100 if (ret >= 1 && ret <= 2) {
114 "Invalid stream specifier \"%s\"\n", spec);
125 "Ambiguous stream specifier \"%s\", using #%d\n", spec, i);
132 already ?
"matched only already used streams" :
133 "did not match any stream");
139 "currently unsupported by libavfilter\n", spec,
175 "Channel layout is not set in stream %d, and could not "
176 "be guessed from the number of channels (%d)\n",
183 "Channel layout is not set in output stream %d, "
184 "guessed channel layout is '%s'\n",
196 char default_streams[16], *stream_specs, *spec, *cursor;
209 snprintf(default_streams,
sizeof(default_streams),
"d%c%d",
210 !strcmp(ctx->
filter->
name,
"amovie") ?
'a' :
'v',
212 stream_specs = default_streams;
214 for (cursor = stream_specs; *cursor; cursor++)
218 if (movie->
loop_count != 1 && nb_streams != 1) {
220 "Loop with several streams is currently unsupported\n");
232 "Failed to avformat_open_input '%s'\n", movie->
file_name);
245 "%s: seek value overflow with start_time:%"PRId64
" seek_point:%"PRId64
"\n",
266 spec =
av_strtok(stream_specs,
"+", &cursor);
274 movie->
st[i].
st = st;
289 snprintf(name,
sizeof(name),
"out%d", i);
306 av_log(ctx,
AV_LOG_VERBOSE,
"seek_point:%"PRIi64
" format_name:%s file_name:%s stream_index:%d\n",
332 int list[] = { 0, -1 };
333 int64_t list64[] = { 0, -1 };
388 switch (frame_type) {
391 "video pts:%s time:%s size:%dx%d aspect:%d/%d",
399 "audio pts:%s time:%s samples:%d",
450 int ret, got_frame = 0, pkt_out_id;
456 if (movie->
st[out_id].
done) {
486 if (pkt_out_id < 0) {
492 st = &movie->
st[pkt_out_id];
493 outlink = ctx->
outputs[pkt_out_id];
500 switch (frame_type) {
524 if (pkt->
size <= 0) {
554 return pkt_out_id == out_id;
566 return FFMIN(ret, 0);
570 #if CONFIG_MOVIE_FILTER
578 .priv_class = &movie_class,
590 #if CONFIG_AMOVIE_FILTER
592 #define amovie_options movie_options
605 .priv_class = &amovie_class,