[Ffmpeg-devel] [PATCH] vhook timestamps

Michael Niedermayer michaelni
Tue Mar 27 14:42:42 CEST 2007


Hi

On Tue, Mar 27, 2007 at 08:41:27PM +0900, Bobby Bingham wrote:
> 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.

looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070327/57878af8/attachment.pgp>



More information about the ffmpeg-devel mailing list