73 #define OFFSET(x) offsetof(MovieContext, x)
74 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM
95 int i,
ret, already = 0, stream_id = -1;
96 char type_char[2],
dummy;
100 ret = sscanf(spec,
"d%1[av]%d%c", type_char, &stream_id, &dummy);
101 if (ret >= 1 && ret <= 2) {
115 "Invalid stream specifier \"%s\"\n", spec);
126 "Ambiguous stream specifier \"%s\", using #%d\n", spec, i);
133 already ?
"matched only already used streams" :
134 "did not match any stream");
140 "currently unsupported by libavfilter\n", spec,
176 "Channel layout is not set in stream %d, and could not "
177 "be guessed from the number of channels (%d)\n",
184 "Channel layout is not set in output stream %d, "
185 "guessed channel layout is '%s'\n",
197 char default_streams[16], *stream_specs, *spec, *cursor;
210 snprintf(default_streams,
sizeof(default_streams),
"d%c%d",
211 !strcmp(ctx->
filter->
name,
"amovie") ?
'a' :
'v',
213 stream_specs = default_streams;
215 for (cursor = stream_specs, nb_streams = 1; *cursor; cursor++)
219 if (movie->
loop_count != 1 && nb_streams != 1) {
221 "Loop with several streams is currently unsupported\n");
233 "Failed to avformat_open_input '%s'\n", movie->
file_name);
246 "%s: seek value overflow with start_time:%"PRId64
" seek_point:%"PRId64
"\n",
267 spec =
av_strtok(stream_specs,
"+", &cursor);
275 movie->
st[i].
st = st;
292 snprintf(name,
sizeof(name),
"out%d", i);
309 av_log(ctx,
AV_LOG_VERBOSE,
"seek_point:%"PRIi64
" format_name:%s file_name:%s stream_index:%d\n",
336 int list[] = { 0, -1 };
337 int64_t list64[] = { 0, -1 };
392 switch (frame_type) {
395 "video pts:%s time:%s size:%dx%d aspect:%d/%d",
403 "audio pts:%s time:%s samples:%d",
454 int ret, got_frame = 0, pkt_out_id;
459 if (movie->
st[out_id].
done) {
489 if (pkt_out_id < 0) {
495 st = &movie->
st[pkt_out_id];
496 outlink = ctx->
outputs[pkt_out_id];
503 switch (frame_type) {
527 if (pkt->
size <= 0) {
558 return pkt_out_id == out_id;
570 return FFMIN(ret, 0);
574 #if CONFIG_MOVIE_FILTER
582 .priv_class = &movie_class,
594 #if CONFIG_AMOVIE_FILTER
596 #define amovie_options movie_options
609 .priv_class = &amovie_class,