diff options
author | Diego Biurrun <diego@biurrun.de> | 2009-03-03 14:09:10 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2009-03-03 14:09:10 +0000 |
commit | fdf119062e21547fbd9c3bb465cf6b2a276359ae (patch) | |
tree | 4e89853c43850d8cb6812987b9ce17b5eac0a9d8 /libavformat | |
parent | f989d397529cc86c25dfd8992e865ddd76ecf1dd (diff) | |
download | ffmpeg-fdf119062e21547fbd9c3bb465cf6b2a276359ae.tar.gz |
Remove deprecated vhook subsystem.
Originally committed as revision 17769 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/Makefile | 2 | ||||
-rw-r--r-- | libavformat/framehook.c | 115 | ||||
-rw-r--r-- | libavformat/framehook.h | 52 |
3 files changed, 0 insertions, 169 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile index b01fbbfeac..e3f59b2a01 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -228,8 +228,6 @@ OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER) += yuv4mpeg.o OBJS-$(CONFIG_LIBNUT_DEMUXER) += libnut.o riff.o OBJS-$(CONFIG_LIBNUT_MUXER) += libnut.o riff.o -OBJS-$(CONFIG_VHOOK) += framehook.o - # protocols I/O OBJS+= avio.o aviobuf.o diff --git a/libavformat/framehook.c b/libavformat/framehook.c deleted file mode 100644 index 494b30b5b1..0000000000 --- a/libavformat/framehook.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Video processing hooks - * Copyright (c) 2000, 2001 Fabrice Bellard - * - * 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.1 of the License, or (at your option) any later version. - * - * 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 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 "avformat.h" -#include "framehook.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - - -typedef struct FrameHookEntry { - struct FrameHookEntry *next; - FrameHookConfigureFn Configure; - FrameHookProcessFn Process; - FrameHookReleaseFn Release; - void *ctx; -} FrameHookEntry; - -static FrameHookEntry *first_hook; - -/* Returns 0 on OK */ -int frame_hook_add(int argc, char *argv[]) -{ - void *loaded; - FrameHookEntry *fhe, **fhep; - - if (argc < 1) { - return ENOENT; - } - - loaded = dlopen(argv[0], RTLD_NOW); - if (!loaded) { - av_log(NULL, AV_LOG_ERROR, "%s\n", dlerror()); - return -1; - } - - fhe = av_mallocz(sizeof(*fhe)); - if (!fhe) { - return AVERROR(ENOMEM); - } - - fhe->Configure = dlsym(loaded, "Configure"); - fhe->Process = dlsym(loaded, "Process"); - fhe->Release = dlsym(loaded, "Release"); /* Optional */ - - if (!fhe->Process) { - av_log(NULL, AV_LOG_ERROR, "Failed to find Process entrypoint in %s\n", argv[0]); - return AVERROR(ENOENT); - } - - if (!fhe->Configure && argc > 1) { - av_log(NULL, AV_LOG_ERROR, "Failed to find Configure entrypoint in %s\n", argv[0]); - return AVERROR(ENOENT); - } - - if (argc > 1 || fhe->Configure) { - if (fhe->Configure(&fhe->ctx, argc, argv)) { - av_log(NULL, AV_LOG_ERROR, "Failed to Configure %s\n", argv[0]); - return AVERROR(EINVAL); - } - } - - for (fhep = &first_hook; *fhep; fhep = &((*fhep)->next)) { - } - - *fhep = fhe; - - return 0; -} - -void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts) -{ - if (first_hook) { - FrameHookEntry *fhe; - - for (fhe = first_hook; fhe; fhe = fhe->next) { - fhe->Process(fhe->ctx, pict, pix_fmt, width, height, pts); - } - } -} - -void frame_hook_release(void) -{ - FrameHookEntry *fhe; - FrameHookEntry *fhenext; - - for (fhe = first_hook; fhe; fhe = fhenext) { - fhenext = fhe->next; - if (fhe->Release) - fhe->Release(fhe->ctx); - av_free(fhe); - } - - first_hook = NULL; -} diff --git a/libavformat/framehook.h b/libavformat/framehook.h deleted file mode 100644 index 0bad6067ac..0000000000 --- a/libavformat/framehook.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * video processing hooks - * copyright (c) 2000, 2001 Fabrice Bellard - * - * 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.1 of the License, or (at your option) any later version. - * - * 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVFORMAT_FRAMEHOOK_H -#define AVFORMAT_FRAMEHOOK_H - -#warning VHOOK is deprecated. Please help finishing libavfilter instead of wasting your time writing new filters for this crappy filter system. - -/* - * Prototypes for interface to .so that implement a video processing hook - */ - -#include "libavcodec/avcodec.h" - -/* Function must be called 'Configure' */ -typedef int (FrameHookConfigure)(void **ctxp, int argc, char *argv[]); -typedef FrameHookConfigure *FrameHookConfigureFn; -extern FrameHookConfigure Configure; - -/* Function must be called 'Process' */ -typedef void (FrameHookProcess)(void *ctx, struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts); -typedef FrameHookProcess *FrameHookProcessFn; -extern FrameHookProcess Process; - -/* Function must be called 'Release' */ -typedef void (FrameHookRelease)(void *ctx); -typedef FrameHookRelease *FrameHookReleaseFn; -extern FrameHookRelease Release; - -int frame_hook_add(int argc, char *argv[]); -void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts); -void frame_hook_release(void); - -#endif /* AVFORMAT_FRAMEHOOK_H */ |