]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/framehook.c
simplify
[ffmpeg] / libavformat / framehook.c
index 8f5ddd66f8097ff5c821f3363e2d6ed710705ca0..494b30b5b14b99e8082b843280e602482fc94303 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Video processing hooks
- * Copyright (c) 2000, 2001 Fabrice Bellard.
+ * Copyright (c) 2000, 2001 Fabrice Bellard
  *
  * This file is part of FFmpeg.
  *
 #include "avformat.h"
 #include "framehook.h"
 
-#ifdef HAVE_DLFCN_H
+#if HAVE_DLFCN_H
 #include <dlfcn.h>
 #endif
 
 
-typedef struct _FrameHookEntry {
-    struct _FrameHookEntry *next;
+typedef struct FrameHookEntry {
+    struct FrameHookEntry *next;
     FrameHookConfigureFn Configure;
     FrameHookProcessFn Process;
     FrameHookReleaseFn Release;
@@ -41,7 +41,6 @@ static FrameHookEntry *first_hook;
 /* Returns 0 on OK */
 int frame_hook_add(int argc, char *argv[])
 {
-#ifdef CONFIG_VHOOK
     void *loaded;
     FrameHookEntry *fhe, **fhep;
 
@@ -87,17 +86,12 @@ int frame_hook_add(int argc, char *argv[])
     *fhep = fhe;
 
     return 0;
-#else
-    av_log(NULL, AV_LOG_ERROR, "Video hooking not compiled into this version\n");
-    return 1;
-#endif
 }
 
-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)
 {
     if (first_hook) {
         FrameHookEntry *fhe;
-        int64_t pts = av_gettime();
 
         for (fhe = first_hook; fhe; fhe = fhe->next) {
             fhe->Process(fhe->ctx, pict, pix_fmt, width, height, pts);