[FFmpeg-cvslog] r22506 - in trunk/libavfilter: avfilter.c avfilter.h defaults.c
stefano
subversion
Sat Mar 13 12:27:05 CET 2010
Author: stefano
Date: Sat Mar 13 12:27:05 2010
New Revision: 22506
Log:
Add AVFilterPic.pos field and make libavfilter propagate stream byte
position information, as stored in the pkt.pos, through the
filterchain.
Note that the pos field is added *non* at the end of the
AVFilterPicRef struct, thus breaking ABI compatibility, which is
allowed as the API is still considered non-stable.
Modified:
trunk/libavfilter/avfilter.c
trunk/libavfilter/avfilter.h
trunk/libavfilter/defaults.c
Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c Sat Mar 13 11:41:25 2010 (r22505)
+++ trunk/libavfilter/avfilter.c Sat Mar 13 12:27:05 2010 (r22506)
@@ -171,11 +171,12 @@ int avfilter_config_links(AVFilterContex
static void dprintf_picref(void *ctx, AVFilterPicRef *picref, int end)
{
dprintf(ctx,
- "picref[%p data[%p, %p, %p, %p] linesize[%d, %d, %d, %d] pts:%"PRId64" a:%d/%d s:%dx%d]%s",
+ "picref[%p data[%p, %p, %p, %p] linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64" a:%d/%d s:%dx%d]%s",
picref,
picref->data [0], picref->data [1], picref->data [2], picref->data [3],
picref->linesize[0], picref->linesize[1], picref->linesize[2], picref->linesize[3],
- picref->pts, picref->pixel_aspect.num, picref->pixel_aspect.den, picref->w, picref->h,
+ picref->pts, picref->pos,
+ picref->pixel_aspect.num, picref->pixel_aspect.den, picref->w, picref->h,
end ? "\n" : "");
}
@@ -263,6 +264,7 @@ void avfilter_start_frame(AVFilterLink *
link->cur_pic = avfilter_default_get_video_buffer(link, dst->min_perms, link->w, link->h);
link->srcpic = picref;
link->cur_pic->pts = link->srcpic->pts;
+ link->cur_pic->pos = link->srcpic->pos;
link->cur_pic->pixel_aspect = link->srcpic->pixel_aspect;
}
else
Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h Sat Mar 13 11:41:25 2010 (r22505)
+++ trunk/libavfilter/avfilter.h Sat Mar 13 12:27:05 2010 (r22506)
@@ -105,6 +105,7 @@ typedef struct AVFilterPicRef
int h; ///< image height
int64_t pts; ///< presentation timestamp in units of 1/AV_TIME_BASE
+ int64_t pos; ///< byte position in stream, -1 if unknown
AVRational pixel_aspect; ///< pixel aspect ratio
Modified: trunk/libavfilter/defaults.c
==============================================================================
--- trunk/libavfilter/defaults.c Sat Mar 13 11:41:25 2010 (r22505)
+++ trunk/libavfilter/defaults.c Sat Mar 13 12:27:05 2010 (r22506)
@@ -74,6 +74,7 @@ void avfilter_default_start_frame(AVFilt
if(out) {
out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, out->w, out->h);
out->outpic->pts = picref->pts;
+ out->outpic->pos = picref->pos;
out->outpic->pixel_aspect = picref->pixel_aspect;
avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0));
}
More information about the ffmpeg-cvslog
mailing list