Libavdevice is not really a standalone library, it depends (by
definition) on libavformat internal symbols. As there are no real reason
for it to be a separate library, the best solution for the associated ABI
problems is to merge it with libavformat.
---
 Changelog                                        |    5 +++
 LICENSE                                          |    2 +-
 configure                                        |    4 +--
 libavdevice/Makefile                             |   29 ----------------
 libavdevice/alldevices.c                         |   40 ----------------------
 libavdevice/avdevice.h                           |   18 +++++-----
 libavdevice/file_open.c                          |    1 -
 libavdevice/version.h                            |    2 +-
 libavformat/Makefile                             |   25 ++++++++++++++
 libavformat/allformats.c                         |   33 ++++++++++++++++++
 {libavdevice => libavformat}/alsa-audio-common.c |    0
 {libavdevice => libavformat}/alsa-audio-dec.c    |    0
 {libavdevice => libavformat}/alsa-audio-enc.c    |    0
 {libavdevice => libavformat}/alsa-audio.h        |    0
 {libavdevice => libavformat}/bktr.c              |    0
 {libavdevice => libavformat}/dv1394.c            |    0
 {libavdevice => libavformat}/dv1394.h            |    0
 {libavdevice => libavformat}/fbdev.c             |    0
 {libavdevice => libavformat}/jack_audio.c        |    0
 {libavdevice => libavformat}/libcdio.c           |    0
 {libavdevice => libavformat}/libdc1394.c         |    0
 {libavdevice => libavformat}/oss_audio.c         |    0
 {libavdevice => libavformat}/pulse.c             |    0
 {libavdevice => libavformat}/sndio_common.c      |    0
 {libavdevice => libavformat}/sndio_common.h      |    0
 {libavdevice => libavformat}/sndio_dec.c         |    0
 {libavdevice => libavformat}/sndio_enc.c         |    0
 {libavdevice => libavformat}/timefilter.c        |    0
 {libavdevice => libavformat}/timefilter.h        |    0
 {libavdevice => libavformat}/v4l2.c              |    0
 {libavdevice => libavformat}/vfwcap.c            |    0
 {libavdevice => libavformat}/x11grab.c           |    0
 tests/Makefile                                   |    1 -
 tests/fate/libavdevice.mak                       |    6 ----
 tests/fate/libavformat.mak                       |    4 +++
 35 files changed, 79 insertions(+), 91 deletions(-)
 delete mode 100644 libavdevice/file_open.c
 rename {libavdevice => libavformat}/alsa-audio-common.c (100%)
 rename {libavdevice => libavformat}/alsa-audio-dec.c (100%)
 rename {libavdevice => libavformat}/alsa-audio-enc.c (100%)
 rename {libavdevice => libavformat}/alsa-audio.h (100%)
 rename {libavdevice => libavformat}/bktr.c (100%)
 rename {libavdevice => libavformat}/dv1394.c (100%)
 rename {libavdevice => libavformat}/dv1394.h (100%)
 rename {libavdevice => libavformat}/fbdev.c (100%)
 rename {libavdevice => libavformat}/jack_audio.c (100%)
 rename {libavdevice => libavformat}/libcdio.c (100%)
 rename {libavdevice => libavformat}/libdc1394.c (100%)
 rename {libavdevice => libavformat}/oss_audio.c (100%)
 rename {libavdevice => libavformat}/pulse.c (100%)
 rename {libavdevice => libavformat}/sndio_common.c (100%)
 rename {libavdevice => libavformat}/sndio_common.h (100%)
 rename {libavdevice => libavformat}/sndio_dec.c (100%)
 rename {libavdevice => libavformat}/sndio_enc.c (100%)
 rename {libavdevice => libavformat}/timefilter.c (100%)
 rename {libavdevice => libavformat}/timefilter.h (100%)
 rename {libavdevice => libavformat}/v4l2.c (100%)
 rename {libavdevice => libavformat}/vfwcap.c (100%)
 rename {libavdevice => libavformat}/x11grab.c (100%)
 delete mode 100644 tests/fate/libavdevice.mak

diff --git a/Changelog b/Changelog
index beb3068..6a90a86 100644
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,11 @@
 Entries are sorted chronologically from oldest to youngest within each release,
 releases are sorted from youngest to oldest.
 
+version next:
+- move all muxers and demuxers from libavdevice to libavformat,
+  deprecate libavdevice
+
+
 version 10:
 - av_strnstr
 - support ID3v2 tags in ASF files
diff --git a/LICENSE b/LICENSE
index 20d82c3..041f46c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -13,7 +13,7 @@ configure to activate them. In this case, Libav's license 
changes to GPL v2+.
 
 Specifically, the GPL parts of Libav are
 
-- the X11 grabber in libavdevice/x11grab.c
+- the X11 grabber in libavformat/x11grab.c
 - the texi2pod.pl tool
 - the following filters in libavfilter:
     - vf_blackframe.c
diff --git a/configure b/configure
index 945a012..7ef96d4 100755
--- a/configure
+++ b/configure
@@ -2170,8 +2170,8 @@ PARSER_LIST=$(find_things   parser   PARSER   
libavcodec/allcodecs.c)
 BSF_LIST=$(find_things      bsf      BSF      libavcodec/allcodecs.c)
 MUXER_LIST=$(find_things    muxer    _MUX     libavformat/allformats.c)
 DEMUXER_LIST=$(find_things  demuxer  DEMUX    libavformat/allformats.c)
-OUTDEV_LIST=$(find_things   outdev   OUTDEV   libavdevice/alldevices.c)
-INDEV_LIST=$(find_things    indev    _IN      libavdevice/alldevices.c)
+OUTDEV_LIST=$(find_things   outdev   OUTDEV   libavformat/allformats.c)
+INDEV_LIST=$(find_things    indev    _IN      libavformat/allformats.c)
 PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c)
 FILTER_LIST=$(find_things   filter   FILTER   libavfilter/allfilters.c)
 
diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index 02de216..8148709 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -6,32 +6,3 @@ HEADERS = avdevice.h                                           
         \
 
 OBJS    = alldevices.o                                                  \
           avdevice.o                                                    \
-
-# input/output devices
-OBJS-$(CONFIG_ALSA_INDEV)                += alsa-audio-common.o \
-                                            alsa-audio-dec.o
-OBJS-$(CONFIG_ALSA_OUTDEV)               += alsa-audio-common.o \
-                                            alsa-audio-enc.o
-OBJS-$(CONFIG_BKTR_INDEV)                += bktr.o
-OBJS-$(CONFIG_DV1394_INDEV)              += dv1394.o
-OBJS-$(CONFIG_FBDEV_INDEV)               += fbdev.o
-OBJS-$(CONFIG_JACK_INDEV)                += jack_audio.o timefilter.o
-OBJS-$(CONFIG_OSS_INDEV)                 += oss_audio.o
-OBJS-$(CONFIG_OSS_OUTDEV)                += oss_audio.o
-OBJS-$(CONFIG_PULSE_INDEV)               += pulse.o
-OBJS-$(CONFIG_SNDIO_INDEV)               += sndio_common.o sndio_dec.o
-OBJS-$(CONFIG_SNDIO_OUTDEV)              += sndio_common.o sndio_enc.o
-OBJS-$(CONFIG_V4L2_INDEV)                += v4l2.o
-OBJS-$(CONFIG_VFWCAP_INDEV)              += vfwcap.o
-OBJS-$(CONFIG_X11GRAB_INDEV)             += x11grab.o
-
-# external libraries
-OBJS-$(CONFIG_LIBCDIO_INDEV)             += libcdio.o
-OBJS-$(CONFIG_LIBDC1394_INDEV)           += libdc1394.o
-
-OBJS-$(HAVE_LIBC_MSVCRT)                 += file_open.o
-
-SKIPHEADERS-$(HAVE_ALSA_ASOUNDLIB_H)     += alsa-audio.h
-SKIPHEADERS-$(HAVE_SNDIO_H)              += sndio_common.h
-
-TESTPROGS = timefilter
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 155f7a8..0ad65d1 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -18,48 +18,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "config.h"
-#include "libavformat/avformat.h"
 #include "avdevice.h"
 
-#define REGISTER_OUTDEV(X, x)                                           \
-    {                                                                   \
-        extern AVOutputFormat ff_##x##_muxer;                           \
-        if (CONFIG_##X##_OUTDEV)                                        \
-            av_register_output_format(&ff_##x##_muxer);                 \
-    }
-
-#define REGISTER_INDEV(X, x)                                            \
-    {                                                                   \
-        extern AVInputFormat ff_##x##_demuxer;                          \
-        if (CONFIG_##X##_INDEV)                                         \
-            av_register_input_format(&ff_##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_INDEV   (BKTR,             bktr);
-    REGISTER_INDEV   (DV1394,           dv1394);
-    REGISTER_INDEV   (FBDEV,            fbdev);
-    REGISTER_INDEV   (JACK,             jack);
-    REGISTER_INOUTDEV(OSS,              oss);
-    REGISTER_INDEV   (PULSE,            pulse);
-    REGISTER_INOUTDEV(SNDIO,            sndio);
-    REGISTER_INDEV   (V4L2,             v4l2);
-    REGISTER_INDEV   (VFWCAP,           vfwcap);
-    REGISTER_INDEV   (X11GRAB,          x11grab);
-
-    /* external libraries */
-    REGISTER_INDEV   (LIBCDIO,          libcdio);
-    REGISTER_INDEV   (LIBDC1394,        libdc1394);
 }
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index 39166a5..5d2e757 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -19,6 +19,8 @@
 #ifndef AVDEVICE_AVDEVICE_H
 #define AVDEVICE_AVDEVICE_H
 
+#include "libavutil/attributes.h"
+
 #include "version.h"
 
 /**
@@ -30,38 +32,34 @@
 /**
  * @defgroup lavd Special devices muxing/demuxing library
  * @{
- * Libavdevice is a complementary library to @ref libavf "libavformat". It
- * provides various "special" platform-specific muxers and demuxers, e.g. for
- * grabbing devices, audio capture and playback etc. As a consequence, the
- * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
- * I/O functions). The filename passed to avformat_open_input() often does not
- * refer to an actually existing file, but has some special device-specific
- * meaning - e.g. for x11grab it is the display name.
- *
- * To use libavdevice, simply call avdevice_register_all() to register all
- * compiled muxers and demuxers. They all use standard libavformat API.
+ * @deprecated Libavdevice is deprecated. All the muxers and demuxers in it 
have
+ * been move to libavformat.
  * @}
  */
 
 /**
  * Return the LIBAVDEVICE_VERSION_INT constant.
  */
+attribute_deprecated
 unsigned avdevice_version(void);
 
 /**
  * Return the libavdevice build-time configuration.
  */
+attribute_deprecated
 const char *avdevice_configuration(void);
 
 /**
  * Return the libavdevice license.
  */
+attribute_deprecated
 const char *avdevice_license(void);
 
 /**
  * Initialize libavdevice and register all the input and output devices.
  * @warning This function is not thread safe.
  */
+attribute_deprecated
 void avdevice_register_all(void);
 
 #endif /* AVDEVICE_AVDEVICE_H */
diff --git a/libavdevice/file_open.c b/libavdevice/file_open.c
deleted file mode 100644
index 494a5d3..0000000
--- a/libavdevice/file_open.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "libavutil/file_open.c"
diff --git a/libavdevice/version.h b/libavdevice/version.h
index 487b4c0..ab0931c 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -28,7 +28,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVDEVICE_VERSION_MAJOR 54
-#define LIBAVDEVICE_VERSION_MINOR  0
+#define LIBAVDEVICE_VERSION_MINOR  1
 #define LIBAVDEVICE_VERSION_MICRO  0
 
 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 8605a1c..4a897af 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -386,15 +386,40 @@ OBJS-$(CONFIG_TLS_PROTOCOL)              += tls.o
 OBJS-$(CONFIG_UDP_PROTOCOL)              += udp.o
 OBJS-$(CONFIG_UNIX_PROTOCOL)             += unix.o
 
+# input/output devices
+OBJS-$(CONFIG_ALSA_INDEV)                += alsa-audio-common.o \
+                                            alsa-audio-dec.o
+OBJS-$(CONFIG_ALSA_OUTDEV)               += alsa-audio-common.o \
+                                            alsa-audio-enc.o
+OBJS-$(CONFIG_BKTR_INDEV)                += bktr.o
+OBJS-$(CONFIG_DV1394_INDEV)              += dv1394.o
+OBJS-$(CONFIG_FBDEV_INDEV)               += fbdev.o
+OBJS-$(CONFIG_JACK_INDEV)                += jack_audio.o timefilter.o
+OBJS-$(CONFIG_OSS_INDEV)                 += oss_audio.o
+OBJS-$(CONFIG_OSS_OUTDEV)                += oss_audio.o
+OBJS-$(CONFIG_PULSE_INDEV)               += pulse.o
+OBJS-$(CONFIG_SNDIO_INDEV)               += sndio_common.o sndio_dec.o
+OBJS-$(CONFIG_SNDIO_OUTDEV)              += sndio_common.o sndio_enc.o
+OBJS-$(CONFIG_V4L2_INDEV)                += v4l2.o
+OBJS-$(CONFIG_VFWCAP_INDEV)              += vfwcap.o
+OBJS-$(CONFIG_X11GRAB_INDEV)             += x11grab.o
+
+# external libraries
+OBJS-$(CONFIG_LIBCDIO_INDEV)             += libcdio.o
+OBJS-$(CONFIG_LIBDC1394_INDEV)           += libdc1394.o
+
 OBJS-$(HAVE_LIBC_MSVCRT)                 += file_open.o
 
 SKIPHEADERS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh.h
 SKIPHEADERS-$(CONFIG_NETWORK)            += network.h rtsp.h
+SKIPHEADERS-$(HAVE_ALSA_ASOUNDLIB_H)     += alsa-audio.h
+SKIPHEADERS-$(HAVE_SNDIO_H)              += sndio_common.h
 
 EXAMPLES  = metadata                                                    \
 
 TESTPROGS = seek                                                        \
             srtp                                                        \
+            timefilter                                                  \
             url                                                         \
 
 TESTPROGS-$(CONFIG_NETWORK)              += noproxy
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 3bc128b..f1b1987 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -41,6 +41,22 @@
 
 #define REGISTER_MUXDEMUX(X, x) REGISTER_MUXER(X, x); REGISTER_DEMUXER(X, x)
 
+#define REGISTER_OUTDEV(X, x)                                           \
+    {                                                                   \
+        extern AVOutputFormat ff_##x##_muxer;                           \
+        if (CONFIG_##X##_OUTDEV)                                        \
+            av_register_output_format(&ff_##x##_muxer);                 \
+    }
+
+#define REGISTER_INDEV(X, x)                                            \
+    {                                                                   \
+        extern AVInputFormat ff_##x##_demuxer;                          \
+        if (CONFIG_##X##_INDEV)                                         \
+            av_register_input_format(&ff_##x##_demuxer);                \
+    }
+
+#define REGISTER_INOUTDEV(X, x) REGISTER_OUTDEV(X, x); REGISTER_INDEV(X, x)
+
 #define REGISTER_PROTOCOL(X, x)                                         \
     {                                                                   \
         extern URLProtocol ff_##x##_protocol;                           \
@@ -292,4 +308,21 @@ void av_register_all(void)
     REGISTER_PROTOCOL(LIBRTMPS,         librtmps);
     REGISTER_PROTOCOL(LIBRTMPT,         librtmpt);
     REGISTER_PROTOCOL(LIBRTMPTE,        librtmpte);
+
+    /* devices */
+    REGISTER_INOUTDEV(ALSA,             alsa);
+    REGISTER_INDEV   (BKTR,             bktr);
+    REGISTER_INDEV   (DV1394,           dv1394);
+    REGISTER_INDEV   (FBDEV,            fbdev);
+    REGISTER_INDEV   (JACK,             jack);
+    REGISTER_INOUTDEV(OSS,              oss);
+    REGISTER_INDEV   (PULSE,            pulse);
+    REGISTER_INOUTDEV(SNDIO,            sndio);
+    REGISTER_INDEV   (V4L2,             v4l2);
+    REGISTER_INDEV   (VFWCAP,           vfwcap);
+    REGISTER_INDEV   (X11GRAB,          x11grab);
+
+    /* external libraries */
+    REGISTER_INDEV   (LIBCDIO,          libcdio);
+    REGISTER_INDEV   (LIBDC1394,        libdc1394);
 }
diff --git a/libavdevice/alsa-audio-common.c b/libavformat/alsa-audio-common.c
similarity index 100%
rename from libavdevice/alsa-audio-common.c
rename to libavformat/alsa-audio-common.c
diff --git a/libavdevice/alsa-audio-dec.c b/libavformat/alsa-audio-dec.c
similarity index 100%
rename from libavdevice/alsa-audio-dec.c
rename to libavformat/alsa-audio-dec.c
diff --git a/libavdevice/alsa-audio-enc.c b/libavformat/alsa-audio-enc.c
similarity index 100%
rename from libavdevice/alsa-audio-enc.c
rename to libavformat/alsa-audio-enc.c
diff --git a/libavdevice/alsa-audio.h b/libavformat/alsa-audio.h
similarity index 100%
rename from libavdevice/alsa-audio.h
rename to libavformat/alsa-audio.h
diff --git a/libavdevice/bktr.c b/libavformat/bktr.c
similarity index 100%
rename from libavdevice/bktr.c
rename to libavformat/bktr.c
diff --git a/libavdevice/dv1394.c b/libavformat/dv1394.c
similarity index 100%
rename from libavdevice/dv1394.c
rename to libavformat/dv1394.c
diff --git a/libavdevice/dv1394.h b/libavformat/dv1394.h
similarity index 100%
rename from libavdevice/dv1394.h
rename to libavformat/dv1394.h
diff --git a/libavdevice/fbdev.c b/libavformat/fbdev.c
similarity index 100%
rename from libavdevice/fbdev.c
rename to libavformat/fbdev.c
diff --git a/libavdevice/jack_audio.c b/libavformat/jack_audio.c
similarity index 100%
rename from libavdevice/jack_audio.c
rename to libavformat/jack_audio.c
diff --git a/libavdevice/libcdio.c b/libavformat/libcdio.c
similarity index 100%
rename from libavdevice/libcdio.c
rename to libavformat/libcdio.c
diff --git a/libavdevice/libdc1394.c b/libavformat/libdc1394.c
similarity index 100%
rename from libavdevice/libdc1394.c
rename to libavformat/libdc1394.c
diff --git a/libavdevice/oss_audio.c b/libavformat/oss_audio.c
similarity index 100%
rename from libavdevice/oss_audio.c
rename to libavformat/oss_audio.c
diff --git a/libavdevice/pulse.c b/libavformat/pulse.c
similarity index 100%
rename from libavdevice/pulse.c
rename to libavformat/pulse.c
diff --git a/libavdevice/sndio_common.c b/libavformat/sndio_common.c
similarity index 100%
rename from libavdevice/sndio_common.c
rename to libavformat/sndio_common.c
diff --git a/libavdevice/sndio_common.h b/libavformat/sndio_common.h
similarity index 100%
rename from libavdevice/sndio_common.h
rename to libavformat/sndio_common.h
diff --git a/libavdevice/sndio_dec.c b/libavformat/sndio_dec.c
similarity index 100%
rename from libavdevice/sndio_dec.c
rename to libavformat/sndio_dec.c
diff --git a/libavdevice/sndio_enc.c b/libavformat/sndio_enc.c
similarity index 100%
rename from libavdevice/sndio_enc.c
rename to libavformat/sndio_enc.c
diff --git a/libavdevice/timefilter.c b/libavformat/timefilter.c
similarity index 100%
rename from libavdevice/timefilter.c
rename to libavformat/timefilter.c
diff --git a/libavdevice/timefilter.h b/libavformat/timefilter.h
similarity index 100%
rename from libavdevice/timefilter.h
rename to libavformat/timefilter.h
diff --git a/libavdevice/v4l2.c b/libavformat/v4l2.c
similarity index 100%
rename from libavdevice/v4l2.c
rename to libavformat/v4l2.c
diff --git a/libavdevice/vfwcap.c b/libavformat/vfwcap.c
similarity index 100%
rename from libavdevice/vfwcap.c
rename to libavformat/vfwcap.c
diff --git a/libavdevice/x11grab.c b/libavformat/x11grab.c
similarity index 100%
rename from libavdevice/x11grab.c
rename to libavformat/x11grab.c
diff --git a/tests/Makefile b/tests/Makefile
index ef0bdb4..925750f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -83,7 +83,6 @@ include $(SRC_PATH)/tests/fate/hevc.mak
 include $(SRC_PATH)/tests/fate/image.mak
 include $(SRC_PATH)/tests/fate/indeo.mak
 include $(SRC_PATH)/tests/fate/libavcodec.mak
-include $(SRC_PATH)/tests/fate/libavdevice.mak
 include $(SRC_PATH)/tests/fate/libavformat.mak
 include $(SRC_PATH)/tests/fate/libavresample.mak
 include $(SRC_PATH)/tests/fate/libavutil.mak
diff --git a/tests/fate/libavdevice.mak b/tests/fate/libavdevice.mak
deleted file mode 100644
index cb6af51..0000000
--- a/tests/fate/libavdevice.mak
+++ /dev/null
@@ -1,6 +0,0 @@
-FATE_LIBAVDEVICE-yes += fate-timefilter
-fate-timefilter: libavdevice/timefilter-test$(EXESUF)
-fate-timefilter: CMD = run libavdevice/timefilter-test
-
-FATE-$(CONFIG_AVDEVICE) += $(FATE_LIBAVDEVICE-yes)
-fate-libavdevice: $(FATE_LIBAVDEVICE-yes)
diff --git a/tests/fate/libavformat.mak b/tests/fate/libavformat.mak
index d532adc..0dfcf6c 100644
--- a/tests/fate/libavformat.mak
+++ b/tests/fate/libavformat.mak
@@ -6,6 +6,10 @@ FATE_LIBAVFORMAT-yes += fate-srtp
 fate-srtp: libavformat/srtp-test$(EXESUF)
 fate-srtp: CMD = run libavformat/srtp-test
 
+FATE_LIBAVFORMAT-yes += fate-timefilter
+fate-timefilter: libavformat/timefilter-test$(EXESUF)
+fate-timefilter: CMD = run libavformat/timefilter-test
+
 FATE_LIBAVFORMAT-yes += fate-url
 fate-url: libavformat/url-test$(EXESUF)
 fate-url: CMD = run libavformat/url-test
-- 
1.7.10.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to