• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavfilter/

Lines Matching defs:movie

24  * movie video source
193 MovieContext *movie = ctx->priv;
201 if (!movie->file_name) {
206 movie->seek_point = movie->seek_point_d * 1000000 + 0.5;
208 stream_specs = movie->stream_specs;
212 movie->stream_index);
219 if (movie->loop_count != 1 && nb_streams != 1) {
227 // Try to find the movie format (container)
228 iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL;
230 movie->format_ctx = NULL;
231 if ((ret = avformat_open_input(&movie->format_ctx, movie->file_name, iformat, NULL)) < 0) {
233 "Failed to avformat_open_input '%s'\n", movie->file_name);
236 if ((ret = avformat_find_stream_info(movie->format_ctx, NULL)) < 0)
240 if (movie->seek_point > 0) {
241 timestamp = movie->seek_point;
243 if (movie->format_ctx->start_time != AV_NOPTS_VALUE) {
244 if (timestamp > INT64_MAX - movie->format_ctx->start_time) {
247 movie->file_name, movie->format_ctx->start_time, movie->seek_point);
250 timestamp += movie->format_ctx->start_time;
252 if ((ret = av_seek_frame(movie->format_ctx, -1, timestamp, AVSEEK_FLAG_BACKWARD)) < 0) {
254 movie->file_name, timestamp);
259 for (i = 0; i < movie->format_ctx->nb_streams; i++)
260 movie->format_ctx->streams[i]->discard = AVDISCARD_ALL;
262 movie->st = av_calloc(nb_streams, sizeof(*movie->st));
263 if (!movie->st)
271 st = find_stream(ctx, movie->format_ctx, spec);
275 movie->st[i].st = st;
276 movie->max_stream_index = FFMAX(movie->max_stream_index, st->index);
281 movie->out_index = av_calloc(movie->max_stream_index + 1,
282 sizeof(*movie->out_index));
283 if (!movie->out_index)
285 for (i = 0; i <= movie->max_stream_index; i++)
286 movie->out_index[i] = -1;
288 movie->out_index[movie->st[i].st->index] = i;
293 pad.type = movie->st[i].st->codec->codec_type;
298 ret = open_stream(ctx, &movie->st[i]);
301 if ( movie->st[i].st->codec->codec->type == AVMEDIA_TYPE_AUDIO &&
302 !movie->st[i].st->codec->channel_layout) {
303 ret = guess_channel_layout(&movie->st[i], i, ctx);
310 movie->seek_point, movie->format_name, movie->file_name,
311 movie->stream_index);
318 MovieContext *movie = ctx->priv;
323 if (movie->st[i].st)
324 avcodec_close(movie->st[i].st->codec);
326 av_freep(&movie->st);
327 av_freep(&movie->out_index);
328 av_frame_free(&movie->frame);
329 if (movie->format_ctx)
330 avformat_close_input(&movie->format_ctx);
335 MovieContext *movie = ctx->priv;
341 MovieStream *st = &movie->st[i];
368 MovieContext *movie = ctx->priv;
370 MovieStream *st = &movie->st[out_id];
416 MovieContext *movie = ctx->priv;
417 int64_t timestamp = movie->seek_point;
420 if (movie->format_ctx->start_time != AV_NOPTS_VALUE)
421 timestamp += movie->format_ctx->start_time;
422 ret = av_seek_frame(movie->format_ctx, -1, timestamp, AVSEEK_FLAG_BACKWARD);
425 movie->loop_count = 1; /* do not try again */
430 avcodec_flush_buffers(movie->st[i].st->codec);
431 movie->st[i].done = 0;
433 movie->eof = 0;
450 MovieContext *movie = ctx->priv;
451 AVPacket *pkt = &movie->pkt;
458 if (movie->eof) {
459 if (movie->st[out_id].done) {
460 if (movie->loop_count != 1) {
464 movie->loop_count -= movie->loop_count > 1;
470 pkt->stream_index = movie->st[out_id].st->index;
473 ret = av_read_frame(movie->format_ctx, &movie->pkt0);
475 av_init_packet(&movie->pkt0); /* ready for flushing */
476 *pkt = movie->pkt0;
478 movie->eof = 1;
483 *pkt = movie->pkt0;
487 pkt_out_id = pkt->stream_index > movie->max_stream_index ? -1 :
488 movie->out_index[pkt->stream_index];
490 av_free_packet(&movie->pkt0);
495 st = &movie->st[pkt_out_id];
498 movie->frame = av_frame_alloc();
499 if (!movie->frame)
505 ret = avcodec_decode_video2(st->st->codec, movie->frame, &got_frame, pkt);
508 ret = avcodec_decode_audio4(st->st->codec, movie->frame, &got_frame, pkt);
516 av_frame_free(&movie->frame);
517 av_free_packet(&movie->pkt0);
518 movie->pkt.size = 0;
519 movie->pkt.data = NULL;
528 av_free_packet(&movie->pkt0);
535 av_frame_free(&movie->frame);
539 movie->frame->pts = av_frame_get_best_effort_timestamp(movie->frame);
540 av_dlog(ctx, "movie_push_frame(): file:'%s' %s\n", movie->file_name,
541 describe_frame_to_str((char[1024]){0}, 1024, movie->frame, frame_type, outlink));
544 if (movie->frame->format != outlink->format) {
547 av_get_pix_fmt_name(movie->frame->format)
549 av_frame_free(&movie->frame);
553 ret = ff_filter_frame(outlink, movie->frame);
554 movie->frame = NULL;
576 AVFILTER_DEFINE_CLASS(movie);
579 .name = "movie",
580 .description = NULL_IF_CONFIG_SMALL("Read from a movie source."),
601 .description = NULL_IF_CONFIG_SMALL("Read audio from a movie source."),