[FFmpeg-cvslog] r17769 - in trunk: MAINTAINERS Makefile configure doc/ffmpeg-doc.texi doc/general.texi doc/hooks.texi ffmpeg.c libavformat/Makefile libavformat/framehook.c libavformat/framehook.h vhook

diego subversion
Tue Mar 3 15:09:11 CET 2009


Author: diego
Date: Tue Mar  3 15:09:10 2009
New Revision: 17769

Log:
Remove deprecated vhook subsystem.

Deleted:
   trunk/doc/hooks.texi
   trunk/libavformat/framehook.c
   trunk/libavformat/framehook.h
   trunk/vhook/
Modified:
   trunk/MAINTAINERS
   trunk/Makefile
   trunk/configure
   trunk/doc/ffmpeg-doc.texi
   trunk/doc/general.texi
   trunk/ffmpeg.c
   trunk/libavformat/Makefile

Modified: trunk/MAINTAINERS
==============================================================================
--- trunk/MAINTAINERS	Tue Mar  3 14:57:09 2009	(r17768)
+++ trunk/MAINTAINERS	Tue Mar  3 15:09:10 2009	(r17769)
@@ -18,15 +18,6 @@ Applications
 ffmpeg:
   ffmpeg.c                              Michael Niedermayer
 
-  Video Hooks:
-    vhook
-    vhook/watermark.c                   Marcus Engene
-    vhook/ppm.c
-    vhook/drawtext.c
-    vhook/fish.c
-    vhook/null.c
-    vhook/imlib2.c
-
 ffplay:
   ffplay.c                              Michael Niedermayer
 

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	Tue Mar  3 14:57:09 2009	(r17768)
+++ trunk/Makefile	Tue Mar  3 15:09:10 2009	(r17769)
@@ -32,10 +32,8 @@ FF_LDFLAGS   := $(FFLDFLAGS)
 FF_EXTRALIBS := $(FFEXTRALIBS)
 FF_DEP_LIBS  := $(DEP_LIBS)
 
-ALL_TARGETS-$(CONFIG_VHOOK) += videohook
 ALL_TARGETS-$(BUILD_DOC)    += documentation
 
-INSTALL_TARGETS-$(CONFIG_VHOOK) += install-vhook
 ifneq ($(PROGS),)
 INSTALL_TARGETS-yes             += install-progs install-data
 INSTALL_TARGETS-$(BUILD_DOC)    += install-man
@@ -81,41 +79,8 @@ cmdutils.o cmdutils.d: version.h
 
 alltools: $(addsuffix $(EXESUF),$(addprefix tools/, cws2fws pktdumper qt-faststart trasher))
 
-VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
-
-BASEHOOKS = fish null watermark
-ALLHOOKS = $(BASEHOOKS) drawtext imlib2 ppm
-ALLHOOKS_SRCS = $(addprefix vhook/, $(addsuffix .c, $(ALLHOOKS)))
-
-HOOKS-$(HAVE_FORK)      += ppm
-HOOKS-$(HAVE_IMLIB2)    += imlib2
-HOOKS-$(HAVE_FREETYPE2) += drawtext
-
-HOOKS = $(addprefix vhook/, $(addsuffix $(SLIBSUF), $(BASEHOOKS) $(HOOKS-yes)))
-
-VHOOKCFLAGS-$(HAVE_IMLIB2) += `imlib2-config --cflags`
-LIBS_imlib2$(SLIBSUF)       = `imlib2-config --libs`
-
-VHOOKCFLAGS-$(HAVE_FREETYPE2) += `freetype-config --cflags`
-LIBS_drawtext$(SLIBSUF)        = `freetype-config --libs`
-
-VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
-
-vhook/%.o vhook/%.d: CFLAGS:=$(VHOOKCFLAGS)
-
-# vhooks compile fine without libav*, but need them nonetheless.
-videohook: $(FF_DEP_LIBS) $(HOOKS)
-
-$(eval VHOOKSHFLAGS=$(VHOOKSHFLAGS))
-vhook/%$(SLIBSUF): vhook/%.o
-	$(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$(@F))
-
-VHOOK_DEPS = $(HOOKS:$(SLIBSUF)=.d)
-depend dep: $(VHOOK_DEPS)
-
 documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
-                                 ffplay-doc.html general.html hooks.html \
-                                 $(ALLMANPAGES))
+                                 ffplay-doc.html general.html $(ALLMANPAGES))
 
 doc/%.html: doc/%.texi
 	texi2html -monolithic -number $<
@@ -141,11 +106,7 @@ install-man: $(MANPAGES)
 	install -d "$(MANDIR)/man1"
 	install -m 644 $(MANPAGES) "$(MANDIR)/man1"
 
-install-vhook: videohook
-	install -d "$(SHLIBDIR)/vhook"
-	install -m 755 $(HOOKS) "$(SHLIBDIR)/vhook"
-
-uninstall: uninstall-progs uninstall-data uninstall-man uninstall-vhook
+uninstall: uninstall-progs uninstall-data uninstall-man
 
 uninstall-progs:
 	rm -f $(addprefix "$(BINDIR)/", $(ALLPROGS))
@@ -156,10 +117,6 @@ uninstall-data:
 uninstall-man:
 	rm -f $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
 
-uninstall-vhook:
-	rm -f $(addprefix "$(SHLIBDIR)/",$(ALLHOOKS_SRCS:.c=$(SLIBSUF)))
-	-rmdir "$(SHLIBDIR)/vhook/"
-
 testclean:
 	rm -rf tests/vsynth1 tests/vsynth2 tests/data tests/asynth1.sw tests/*~
 
@@ -168,10 +125,9 @@ clean:: testclean
 	rm -f doc/*.html doc/*.pod doc/*.1
 	rm -f $(addprefix tests/,$(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr))
 	rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher))
-	rm -f vhook/*.o vhook/*~ vhook/*.so vhook/*.dylib vhook/*.dll
 
 distclean::
-	rm -f version.h config.* vhook/*.d
+	rm -f version.h config.*
 
 # regression tests
 
@@ -355,6 +311,4 @@ tests/seek_test$(EXESUF): tests/seek_tes
 	$(CC) $(FF_LDFLAGS) $(CFLAGS) -o $@ $< $(FF_EXTRALIBS)
 
 
-.PHONY: lib videohook documentation *test regtest-* swscale-error zlib-error alltools check
-
--include $(VHOOK_DEPS)
+.PHONY: lib documentation *test regtest-* swscale-error zlib-error alltools check

Modified: trunk/configure
==============================================================================
--- trunk/configure	Tue Mar  3 14:57:09 2009	(r17768)
+++ trunk/configure	Tue Mar  3 15:09:10 2009	(r17769)
@@ -82,9 +82,8 @@ show_help(){
   echo "  --disable-ffserver       disable ffserver build"
   echo "  --enable-postproc        enable GPLed postprocessing support [no]"
   echo "  --enable-swscale         enable GPLed software scaler support [no]"
-  echo "  --enable-avfilter        video filter support (replaces vhook) [no]"
+  echo "  --enable-avfilter        video filter support [no]"
   echo "  --enable-avfilter-lavf   video filters dependent on avformat [no]"
-  echo "  --disable-vhook          disable video hooking support"
   echo "  --enable-beosthreads     use BeOS threads [no]"
   echo "  --enable-os2threads      use OS/2 threads [no]"
   echo "  --enable-pthreads        use pthreads [no]"
@@ -799,7 +798,6 @@ CONFIG_LIST="
     static
     swscale
     vdpau
-    vhook
     x11grab
     zlib
 "
@@ -873,11 +871,9 @@ HAVE_LIST="
     fast_cmov
     fast_unaligned
     fork
-    freetype2
     gethrtime
     GetProcessTimes
     getrusage
-    imlib2
     inet_aton
     inline_asm
     libdc1394_1
@@ -1133,7 +1129,6 @@ movie_filter_deps="avfilter_lavf"
 ffplay_deps="sdl"
 ffserver_deps="ffm_muxer rtp_protocol rtsp_demuxer"
 ffserver_extralibs='$ldl'
-vhook_extralibs='$ldl'
 
 
 # default parameters
@@ -1180,12 +1175,10 @@ enable optimizations
 enable protocols
 enable static
 enable stripping
-vhook="default"
 
 # build settings
 add_cflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
 SHFLAGS='-shared -Wl,-soname,$$(@F)'
-VHOOKSHFLAGS='$(SHFLAGS)'
 FFSERVERLDFLAGS=-Wl,-E
 LIBPREF="lib"
 LIBSUF=".a"
@@ -1560,7 +1553,6 @@ case $target_os in
     darwin)
         disable need_memalign
         SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR) -Wl,-read_only_relocs,suppress'
-        VHOOKSHFLAGS='-dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(SHLIBDIR)/vhook/$$(@F)'
         strip="strip -x"
         FFLDFLAGS="-Wl,-dynamic,-search_paths_first"
         SLIBSUF=".dylib"
@@ -1578,12 +1570,6 @@ case $target_os in
             LIBTARGET=x64
         fi
         shlibdir_default="$bindir_default"
-        VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil'
-        VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)'
-        if enabled swscale; then
-            VHOOKSHFLAGS="$VHOOKSHFLAGS -L\$(BUILD_ROOT)/libswscale"
-            VHOOKLIBS="$VHOOKLIBS -lswscale\$(BUILDSUF)"
-        fi
         disable ffserver
         SLIBPREF=""
         SLIBSUF=".dll"
@@ -1607,12 +1593,6 @@ case $target_os in
     cygwin*)
         target_os=cygwin
         shlibdir_default="$bindir_default"
-        VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil'
-        VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)'
-        if enabled swscale; then
-            VHOOKSHFLAGS="$VHOOKSHFLAGS -L\$(BUILD_ROOT)/libswscale"
-            VHOOKLIBS="$VHOOKLIBS -lswscale\$(BUILDSUF)"
-        fi
         SLIBPREF="cyg"
         SLIBSUF=".dll"
         SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
@@ -1622,7 +1602,7 @@ case $target_os in
         enable dos_paths
         ;;
     *-dos|freedos|opendos)
-        disable ffplay ffserver vhook
+        disable ffplay ffserver
         disable $INDEV_LIST $OUTDEV_LIST
         network_extralibs="-lsocket"
         objformat="coff"
@@ -1656,12 +1636,8 @@ case $target_os in
           emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;'
         SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
         SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
-        disable vhook
         enable dos_paths
         ;;
-    interix)
-        disable vhook
-        ;;
 
     *)
         die "Unknown OS '$target_os'."
@@ -2040,24 +2016,6 @@ void foo(char * $restrict_keyword p);
 EOF
 done
 
-test "$vhook" = "default" && vhook="$dlopen"
-
-if test "$target_os" = cygwin -o "$target_os" = mingw32 && enabled_all static vhook ; then
-    disable vhook
-    echo
-    echo "At the moment vhooks don't work on Cygwin or MinGW static builds."
-    echo "Patches welcome."
-    echo
-fi
-
-if enabled vhook; then
-    check_ldflags -rdynamic
-    check_ldflags -export-dynamic
-fi
-
-check_foo_config imlib2 imlib2 Imlib2.h imlib_load_font
-check_foo_config freetype2 freetype ft2build.h FT_Init_FreeType
-
 ##########################################
 # SDL check
 
@@ -2225,8 +2183,6 @@ if enabled gprof; then
     add_ldflags -p
 fi
 
-VHOOKCFLAGS="-fPIC"
-
 # Find out if the .align argument is a power of two or not.
 check_asm asmalign_pot '".align 3"'
 
@@ -2312,11 +2268,6 @@ echo "postprocessing support    ${postpr
 echo "software scaler enabled   ${swscale-no}"
 echo "new filter support        ${avfilter-no}"
 echo "filters using lavformat   ${avfilter_lavf-no}"
-echo "video hooking             ${vhook-no}"
-if enabled vhook; then
-    echo "Imlib2 support            ${imlib2-no}"
-    echo "FreeType support          ${freetype2-no}"
-fi
 echo "network support           ${network-no}"
 if enabled network; then
     echo "IPv6 support              ${ipv6-no}"
@@ -2395,13 +2346,10 @@ enabled stripping &&
     echo "STRIP=echo ignoring strip" >> config.mak
 
 echo "OPTFLAGS=$CFLAGS" >> config.mak
-echo "VHOOKCFLAGS=$VHOOKCFLAGS" >> config.mak
 echo "LDFLAGS=$LDFLAGS" >> config.mak
 echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak
 echo "SHFLAGS=$SHFLAGS" >> config.mak
 echo "YASMFLAGS=$YASMFLAGS" >> config.mak
-echo "VHOOKSHFLAGS=$VHOOKSHFLAGS" >> config.mak
-echo "VHOOKLIBS=$VHOOKLIBS" >> config.mak
 echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
 echo "BUILD_STATIC=$static" >> config.mak
 echo "BUILDSUF=$build_suffix" >> config.mak
@@ -2529,7 +2477,6 @@ if enabled source_path_used; then
         libswscale        \
         tests             \
         tools             \
-        vhook             \
         "
     FILES="\
         Makefile             \

Modified: trunk/doc/ffmpeg-doc.texi
==============================================================================
--- trunk/doc/ffmpeg-doc.texi	Tue Mar  3 14:57:09 2009	(r17768)
+++ trunk/doc/ffmpeg-doc.texi	Tue Mar  3 15:09:10 2009	(r17769)
@@ -660,9 +660,6 @@ Calculate PSNR of compressed frames.
 Dump video coding statistics to @file{vstats_HHMMSS.log}.
 @item -vstats_file @var{file}
 Dump video coding statistics to @var{file}.
- at item -vhook @var{module}
-Insert video processing @var{module}. @var{module} contains the module
-name and its parameters separated by spaces.
 @item -top @var{n}
 top=1/bottom=0/auto=-1 field first
 @item -dc @var{precision}

Modified: trunk/doc/general.texi
==============================================================================
--- trunk/doc/general.texi	Tue Mar  3 14:57:09 2009	(r17768)
+++ trunk/doc/general.texi	Tue Mar  3 15:09:10 2009	(r17769)
@@ -691,10 +691,6 @@ Notes:
 
 @itemize
 
- at item In order to compile vhooks, you must have a POSIX-compliant libdl in
-your MinGW system. Get dlfcn-win32 from
- at url{http://code.google.com/p/dlfcn-win32}.
-
 @item In order to compile FFplay, you must have the MinGW development library
 of SDL. Get it from @url{http://www.libsdl.org}.
 Edit the @file{bin/sdl-config} script so that it points to the correct prefix

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Tue Mar  3 14:57:09 2009	(r17768)
+++ trunk/ffmpeg.c	Tue Mar  3 15:09:10 2009	(r17769)
@@ -34,7 +34,6 @@
 #include "libavformat/avformat.h"
 #include "libavdevice/avdevice.h"
 #include "libswscale/swscale.h"
-#include "libavformat/framehook.h"
 #include "libavcodec/opt.h"
 #include "libavcodec/audioconvert.h"
 #include "libavutil/fifo.h"
@@ -203,7 +202,6 @@ static int audio_volume = 256;
 
 static int exit_on_error = 0;
 static int using_stdin = 0;
-static int using_vhook = 0;
 static int verbose = 1;
 static int thread_count= 1;
 static int q_pressed = 0;
@@ -736,7 +734,7 @@ static void pre_process_video_frame(AVIn
     dec = ist->st->codec;
 
     /* deinterlace : must be done before any resize */
-    if (do_deinterlace || using_vhook) {
+    if (do_deinterlace) {
         int size;
 
         /* create temporary picture */
@@ -764,10 +762,6 @@ static void pre_process_video_frame(AVIn
         picture2 = picture;
     }
 
-    if (CONFIG_VHOOK)
-        frame_hook_process(picture2, dec->pix_fmt, dec->width, dec->height,
-                           1000000 * ist->pts / AV_TIME_BASE);
-
     if (picture != picture2)
         *picture = *picture2;
     *bufp = buf;
@@ -1772,10 +1766,6 @@ static int av_encode(AVFormatContext **o
                     codec->block_align= 0;
                 break;
             case CODEC_TYPE_VIDEO:
-                if(using_vhook) {
-                    fprintf(stderr,"-vcodec copy and -vhook are incompatible (frames are not decoded)\n");
-                    av_exit(1);
-                }
                 codec->pix_fmt = icodec->pix_fmt;
                 codec->width = icodec->width;
                 codec->height = icodec->height;
@@ -2651,29 +2641,6 @@ static void opt_video_tag(const char *ar
         video_codec_tag= arg[0] + (arg[1]<<8) + (arg[2]<<16) + (arg[3]<<24);
 }
 
-#if CONFIG_VHOOK
-static void add_frame_hooker(const char *arg)
-{
-    int argc = 0;
-    char *argv[64];
-    int i;
-    char *args = av_strdup(arg);
-
-    using_vhook = 1;
-
-    argv[0] = strtok(args, " ");
-    while (argc < 62 && (argv[++argc] = strtok(NULL, " "))) {
-    }
-
-    i = frame_hook_add(argc, argv);
-
-    if (i != 0) {
-        fprintf(stderr, "Failed to add video hook function: %s\n", arg);
-        av_exit(1);
-    }
-}
-#endif
-
 static void opt_video_codec(const char *arg)
 {
     opt_codec(&video_stream_copy, &video_codec_name, CODEC_TYPE_VIDEO, arg);
@@ -3840,9 +3807,6 @@ static const OptionDef options[] = {
     { "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
     { "vstats", OPT_EXPERT | OPT_VIDEO, {(void*)&opt_vstats}, "dump video coding statistics to file" },
     { "vstats_file", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_vstats_file}, "dump video coding statistics to file", "file" },
-#if CONFIG_VHOOK
-    { "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" },
-#endif
     { "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
     { "inter_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_inter_matrix}, "specify inter matrix coeffs", "matrix" },
     { "top", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_top_field_first}, "top=1/bottom=0/auto=-1 field first", "" },

Modified: trunk/libavformat/Makefile
==============================================================================
--- trunk/libavformat/Makefile	Tue Mar  3 14:57:09 2009	(r17768)
+++ trunk/libavformat/Makefile	Tue Mar  3 15:09:10 2009	(r17769)
@@ -228,8 +228,6 @@ OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER)     
 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
 




More information about the ffmpeg-cvslog mailing list