]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/framehook.c
document the extradata protocol for VP6F
[ffmpeg] / libavformat / framehook.c
index e0597f00c1299bbede4cb3fbd599b27c60e750bf..e6624e80f884f7424a123783276b1b65d10c5fdb 100644 (file)
@@ -2,24 +2,26 @@
  * Video processing hooks
  * Copyright (c) 2000, 2001 Fabrice Bellard.
  *
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include <errno.h>
 #include "config.h"
-#include "framehook.h"
 #include "avformat.h"
+#include "framehook.h"
 
 #ifdef CONFIG_HAVE_DLFCN
 #include <dlfcn.h>
@@ -49,7 +51,7 @@ int frame_hook_add(int argc, char *argv[])
 
     loaded = dlopen(argv[0], RTLD_NOW);
     if (!loaded) {
-        fprintf(stderr, "%s\n", dlerror());
+        av_log(NULL, AV_LOG_ERROR, "%s\n", dlerror());
         return -1;
     }
 
@@ -63,18 +65,18 @@ int frame_hook_add(int argc, char *argv[])
     fhe->Release = dlsym(loaded, "Release");    /* Optional */
 
     if (!fhe->Process) {
-        fprintf(stderr, "Failed to find Process entrypoint in %s\n", argv[0]);
+        av_log(NULL, AV_LOG_ERROR, "Failed to find Process entrypoint in %s\n", argv[0]);
         return -1;
     }
 
     if (!fhe->Configure && argc > 1) {
-        fprintf(stderr, "Failed to find Configure entrypoint in %s\n", argv[0]);
+        av_log(NULL, AV_LOG_ERROR, "Failed to find Configure entrypoint in %s\n", argv[0]);
         return -1;
     }
 
     if (argc > 1 || fhe->Configure) {
         if (fhe->Configure(&fhe->ctx, argc, argv)) {
-            fprintf(stderr, "Failed to Configure %s\n", argv[0]);
+            av_log(NULL, AV_LOG_ERROR, "Failed to Configure %s\n", argv[0]);
             return -1;
         }
     }
@@ -86,7 +88,7 @@ int frame_hook_add(int argc, char *argv[])
 
     return 0;
 #else
-    fprintf(stderr, "Video hooking not compiled into this version\n");
+    av_log(NULL, AV_LOG_ERROR, "Video hooking not compiled into this version\n");
     return 1;
 #endif
 }
@@ -95,7 +97,7 @@ void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, in
 {
     if (first_hook) {
         FrameHookEntry *fhe;
-        INT64 pts = av_gettime();
+        int64_t pts = av_gettime();
 
         for (fhe = first_hook; fhe; fhe = fhe->next) {
             fhe->Process(fhe->ctx, pict, pix_fmt, width, height, pts);
@@ -103,7 +105,7 @@ void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, in
     }
 }
 
-void frame_hook_release()
+void frame_hook_release(void)
 {
     FrameHookEntry *fhe;
     FrameHookEntry *fhenext;