[Ffmpeg-devel] [PATCH] vhook timestamps

Bobby Bingham uhmmmm
Tue Mar 27 13:41:27 CEST 2007


Diego Biurrun wrote:
> On Tue, Mar 27, 2007 at 04:19:48PM +0900, Bobby Bingham wrote:
>> This patch changes the vhook code to send real timestamps to the filters 
>> instead of the current time of day, which is useless, and which the 
>> filters could just as easily query for themselves.  I kept the units of 
>> the timestamps in nanoseconds to match what the fish filter currently 
>> expects.
>>
>> --- ffmpeg.orig/ffmpeg.c
>> +++ ffmpeg/ffmpeg.c
>> @@ -562,7 +562,7 @@ static void do_audio_out(AVFormatContext
>>  
>> -static void pre_process_video_frame(AVInputStream *ist, AVPicture *picture, void **bufp)
>> +static void pre_process_video_frame(AVInputStream *ist, AVPicture *picture, void **bufp, uint64_t pts)
> 
> pts is uint64_t here ..
> 
>> --- ffmpeg.orig/libavformat/framehook.c
>> +++ ffmpeg/libavformat/framehook.c
>> @@ -93,11 +93,10 @@ int frame_hook_add(int argc, char *argv[
>>  
>> -void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, int height)
>> +void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts)
>> --- ffmpeg.orig/libavformat/framehook.h
>> +++ ffmpeg/libavformat/framehook.h
>> @@ -46,7 +46,7 @@ typedef FrameHookRelease *FrameHookRelea
>>  
>> -extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height);
>> +extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts);
> 
> .. but int64_t here ..
> 
> Why?

Typo.  But it turns out the extra parameter to pre_process_video_frame 
wasn't needed in the first place.  Here's a patch to do the same thing 
without the extra parameter.

> 
> Diego


-- 
Bobby Bingham
??????????????????????
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vhook-pts
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070327/cf4d79fb/attachment.txt>



More information about the ffmpeg-devel mailing list