• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavfilter/

Lines Matching defs:movie

24  * movie video source
71 return "movie";
82 MovieContext *movie = ctx->priv;
90 // Try to find the movie format (container)
91 iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL;
93 movie->format_ctx = NULL;
94 if ((ret = avformat_open_input(&movie->format_ctx, movie->file_name, iformat, NULL)) < 0) {
96 "Failed to avformat_open_input '%s'\n", movie->file_name);
99 if ((ret = avformat_find_stream_info(movie->format_ctx, NULL)) < 0)
103 if (movie->seek_point > 0) {
104 timestamp = movie->seek_point;
106 if (movie->format_ctx->start_time != AV_NOPTS_VALUE) {
107 if (timestamp > INT64_MAX - movie->format_ctx->start_time) {
110 movie->file_name, movie->format_ctx->start_time, movie->seek_point);
113 timestamp += movie->format_ctx->start_time;
115 if ((ret = av_seek_frame(movie->format_ctx, -1, timestamp, AVSEEK_FLAG_BACKWARD)) < 0) {
117 movie->file_name, timestamp);
123 if ((ret = av_find_best_stream(movie->format_ctx, AVMEDIA_TYPE_VIDEO,
124 movie->stream_index, -1, NULL, 0)) < 0) {
126 movie->stream_index);
129 movie->stream_index = ret;
130 movie->codec_ctx = movie->format_ctx->streams[movie->stream_index]->codec;
136 codec = avcodec_find_decoder(movie->codec_ctx->codec_id);
142 if ((ret = avcodec_open2(movie->codec_ctx, codec, NULL)) < 0) {
147 if (!(movie->frame = avcodec_alloc_frame()) ) {
152 movie->w = movie->codec_ctx->width;
153 movie->h = movie->codec_ctx->height;
156 movie->seek_point, movie->format_name, movie->file_name,
157 movie->stream_index);
164 MovieContext *movie = ctx->priv;
166 movie->class = &movie_class;
167 av_opt_set_defaults(movie);
170 movie->file_name = av_get_token(&args, ":");
171 if (!movie->file_name || !*movie->file_name) {
176 if (*args++ == ':' && (ret = av_set_options_string(movie, args, "=", ":")) < 0) {
181 movie->seek_point = movie->seek_point_d * 1000000 + 0.5;
188 MovieContext *movie = ctx->priv;
190 av_free(movie->file_name);
191 av_free(movie->format_name);
192 if (movie->codec_ctx)
193 avcodec_close(movie->codec_ctx);
194 if (movie->format_ctx)
195 avformat_close_input(&movie->format_ctx);
196 avfilter_unref_buffer(movie->picref);
197 av_freep(&movie->frame);
202 MovieContext *movie = ctx->priv;
203 enum PixelFormat pix_fmts[] = { movie->codec_ctx->pix_fmt, PIX_FMT_NONE };
211 MovieContext *movie = outlink->src->priv;
213 outlink->w = movie->w;
214 outlink->h = movie->h;
215 outlink->time_base = movie->format_ctx->streams[movie->stream_index]->time_base;
222 MovieContext *movie = outlink->src->priv;
225 AVStream *st = movie->format_ctx->streams[movie->stream_index];
227 if (movie->is_done == 1)
230 while ((ret = av_read_frame(movie->format_ctx, &pkt)) >= 0) {
232 if (pkt.stream_index == movie->stream_index) {
233 movie->codec_ctx->reordered_opaque = pkt.pos;
234 avcodec_decode_video2(movie->codec_ctx, movie->frame, &frame_decoded, &pkt);
238 movie->picref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE | AV_PERM_PRESERVE |
240 av_image_copy(movie->picref->data, movie->picref->linesize,
241 movie->frame->data, movie->frame->linesize,
242 movie->picref->format, outlink->w, outlink->h);
243 avfilter_copy_frame_props(movie->picref, movie->frame);
248 movie->picref->pts = movie->frame->pkt_pts == AV_NOPTS_VALUE ?
249 movie->frame->pkt_dts : movie->frame->pkt_pts;
251 movie->picref->pos = movie->frame->reordered_opaque;
252 if (!movie->frame->sample_aspect_ratio.num)
253 movie->picref->video->pixel_aspect = st->sample_aspect_ratio;
256 movie->file_name, movie->picref->pts,
257 (double)movie->picref->pts * av_q2d(st->time_base),
258 movie->picref->pos,
259 movie->picref->video->pixel_aspect.num, movie->picref->video->pixel_aspect.den);
271 // the movie source does not have more frames
273 movie->is_done = 1;
280 MovieContext *movie = outlink->src->priv;
283 if (movie->is_done)
288 outpicref = avfilter_ref_buffer(movie->picref, ~0);
292 avfilter_unref_buffer(movie->picref);
293 movie->picref = NULL;
299 .name = "movie",
300 .description = NULL_IF_CONFIG_SMALL("Read from a movie source."),