[FFmpeg-cvslog] r20546 - in trunk/libavdevice: Makefile alldevices.c avdevice.c

diego subversion
Wed Nov 18 18:01:26 CET 2009


Author: diego
Date: Wed Nov 18 18:01:25 2009
New Revision: 20546

Log:
Split avdevice.c off from alldevices.c.
alldevices.c is not a good place for avdevice_version().

Added:
   trunk/libavdevice/avdevice.c
      - copied, changed from r20510, trunk/libavdevice/alldevices.c
Modified:
   trunk/libavdevice/Makefile
   trunk/libavdevice/alldevices.c

Modified: trunk/libavdevice/Makefile
==============================================================================
--- trunk/libavdevice/Makefile	Wed Nov 18 01:07:20 2009	(r20545)
+++ trunk/libavdevice/Makefile	Wed Nov 18 18:01:25 2009	(r20546)
@@ -5,7 +5,7 @@ FFLIBS  = avformat avcodec avutil
 
 HEADERS = avdevice.h
 
-OBJS    = alldevices.o
+OBJS    = alldevices.o avdevice.o
 
 # input/output devices
 OBJS-$(CONFIG_ALSA_INDEV)                += alsa-audio-common.o \

Modified: trunk/libavdevice/alldevices.c
==============================================================================
--- trunk/libavdevice/alldevices.c	Wed Nov 18 01:07:20 2009	(r20545)
+++ trunk/libavdevice/alldevices.c	Wed Nov 18 18:01:25 2009	(r20546)
@@ -20,12 +20,6 @@
 
 #include "config.h"
 #include "libavformat/avformat.h"
-#include "avdevice.h"
-
-unsigned avdevice_version(void)
-{
-    return LIBAVDEVICE_VERSION_INT;
-}
 
 #define REGISTER_OUTDEV(X,x) { \
           extern AVOutputFormat x##_muxer; \

Copied and modified: trunk/libavdevice/avdevice.c (from r20510, trunk/libavdevice/alldevices.c)
==============================================================================
--- trunk/libavdevice/alldevices.c	Wed Nov 11 02:04:08 2009	(r20510, copy source)
+++ trunk/libavdevice/avdevice.c	Wed Nov 18 18:01:25 2009	(r20546)
@@ -1,6 +1,4 @@
 /*
- * Register all the grabbing devices.
- *
  * This file is part of FFmpeg.
  *
  * FFmpeg is free software; you can redistribute it and/or
@@ -18,43 +16,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "config.h"
-#include "libavformat/avformat.h"
 #include "avdevice.h"
 
 unsigned avdevice_version(void)
 {
     return LIBAVDEVICE_VERSION_INT;
 }
-
-#define REGISTER_OUTDEV(X,x) { \
-          extern AVOutputFormat x##_muxer; \
-          if(CONFIG_##X##_OUTDEV)  av_register_output_format(&x##_muxer); }
-#define REGISTER_INDEV(X,x) { \
-          extern AVInputFormat x##_demuxer; \
-          if(CONFIG_##X##_INDEV)   av_register_input_format(&x##_demuxer); }
-#define REGISTER_INOUTDEV(X,x)  REGISTER_OUTDEV(X,x); REGISTER_INDEV(X,x)
-
-void avdevice_register_all(void)
-{
-    static int initialized;
-
-    if (initialized)
-        return;
-    initialized = 1;
-
-    /* devices */
-    REGISTER_INOUTDEV (ALSA, alsa);
-    REGISTER_INOUTDEV (AUDIO_BEOS, audio_beos);
-    REGISTER_INDEV    (BKTR, bktr);
-    REGISTER_INDEV    (DV1394, dv1394);
-    REGISTER_INDEV    (JACK, jack);
-    REGISTER_INOUTDEV (OSS, oss);
-    REGISTER_INDEV    (V4L2, v4l2);
-    REGISTER_INDEV    (V4L, v4l);
-    REGISTER_INDEV    (VFWCAP, vfwcap);
-    REGISTER_INDEV    (X11_GRAB_DEVICE, x11_grab_device);
-
-    /* external libraries */
-    REGISTER_INDEV    (LIBDC1394, libdc1394);
-}



More information about the ffmpeg-cvslog mailing list