[FFmpeg-devel] [PATCH] lavdev: include libavformat/avformat.h header
Stefano Sabatini
stefano.sabatini-lala at poste.it
Fri May 27 02:26:54 CEST 2011
Also prefer the inclusion of avdevice.h over that of
libavformat/avformat.h.
The header is always required, since libavdevice uses the AVFormat*
structures defined in avformat.h.
Avoid the need to explicitely add libavformat/avformat.h in
libavdevice applications.
---
libavdevice/alldevices.c | 1 -
libavdevice/alsa-audio-common.c | 2 +-
libavdevice/alsa-audio-dec.c | 2 +-
libavdevice/alsa-audio-enc.c | 2 +-
libavdevice/alsa-audio.h | 2 +-
libavdevice/avdevice.h | 1 +
libavdevice/bktr.c | 2 +-
libavdevice/dshow.c | 2 +-
libavdevice/dshow.h | 2 +-
libavdevice/dv1394.c | 2 +-
libavdevice/fbdev.c | 2 +-
libavdevice/jack_audio.c | 2 +-
libavdevice/libdc1394.c | 2 +-
libavdevice/oss_audio.c | 2 +-
libavdevice/sndio_common.c | 2 +-
libavdevice/sndio_common.h | 2 +-
libavdevice/sndio_enc.c | 2 +-
libavdevice/v4l.c | 2 +-
libavdevice/v4l2.c | 2 +-
libavdevice/vfwcap.c | 2 +-
libavdevice/x11grab.c | 2 +-
21 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 3997c73..a017bac 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -19,7 +19,6 @@
*/
#include "config.h"
-#include "libavformat/avformat.h"
#include "avdevice.h"
#define REGISTER_OUTDEV(X,x) { \
diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c
index c00e973..38466a0 100644
--- a/libavdevice/alsa-audio-common.c
+++ b/libavdevice/alsa-audio-common.c
@@ -29,7 +29,7 @@
*/
#include <alsa/asoundlib.h>
-#include "libavformat/avformat.h"
+#include "avdevice.h"
#include "alsa-audio.h"
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c
index 24abc7c..2424c02 100644
--- a/libavdevice/alsa-audio-dec.c
+++ b/libavdevice/alsa-audio-dec.c
@@ -46,9 +46,9 @@
*/
#include <alsa/asoundlib.h>
-#include "libavformat/avformat.h"
#include "libavutil/opt.h"
+#include "avdevice.h"
#include "alsa-audio.h"
static av_cold int audio_read_header(AVFormatContext *s1,
diff --git a/libavdevice/alsa-audio-enc.c b/libavdevice/alsa-audio-enc.c
index 0bc53b6..1b5a15a 100644
--- a/libavdevice/alsa-audio-enc.c
+++ b/libavdevice/alsa-audio-enc.c
@@ -38,7 +38,7 @@
*/
#include <alsa/asoundlib.h>
-#include "libavformat/avformat.h"
+#include "avdevice.h"
#include "alsa-audio.h"
diff --git a/libavdevice/alsa-audio.h b/libavdevice/alsa-audio.h
index a7a000c..431401b 100644
--- a/libavdevice/alsa-audio.h
+++ b/libavdevice/alsa-audio.h
@@ -32,8 +32,8 @@
#include <alsa/asoundlib.h>
#include "config.h"
-#include "libavformat/avformat.h"
#include "libavutil/log.h"
+#include "avdevice.h"
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index d31c99e..929ee82 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -20,6 +20,7 @@
#define AVDEVICE_AVDEVICE_H
#include "libavutil/avutil.h"
+#include "libavformat/avformat.h"
#define LIBAVDEVICE_VERSION_MAJOR 53
#define LIBAVDEVICE_VERSION_MINOR 0
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 0e57258..c76b5fb 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -24,7 +24,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavformat/avformat.h"
+#include "avdevice.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 901c766..348fda6 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -19,9 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavformat/avformat.h"
#include "libavformat/timefilter.h"
+#include "avdevice.h"
#include "dshow.h"
struct dshow_ctx {
diff --git a/libavdevice/dshow.h b/libavdevice/dshow.h
index c991c02..4e79680 100644
--- a/libavdevice/dshow.h
+++ b/libavdevice/dshow.h
@@ -21,7 +21,7 @@
#define DSHOWDEBUG 0
-#include "libavformat/avformat.h"
+#include "avdevice.h"
#define COBJMACROS
#include <windows.h>
diff --git a/libavdevice/dv1394.c b/libavdevice/dv1394.c
index 7fa73bd..4a84383 100644
--- a/libavdevice/dv1394.c
+++ b/libavdevice/dv1394.c
@@ -32,7 +32,7 @@
#include "libavutil/log.h"
#include "libavutil/opt.h"
-#include "libavformat/avformat.h"
+#include "avdevice.h"
#undef DV1394_DEBUG
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c
index 4f670e9..19bf5ad 100644
--- a/libavdevice/fbdev.c
+++ b/libavdevice/fbdev.c
@@ -39,7 +39,7 @@
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
-#include "libavformat/avformat.h"
+#include "avdevice.h"
struct rgb_pixfmt_map_entry {
int bits_per_pixel;
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index 9062e7f..f78a2c9 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -27,8 +27,8 @@
#include "libavutil/log.h"
#include "libavutil/fifo.h"
#include "libavcodec/avcodec.h"
-#include "libavformat/avformat.h"
#include "libavformat/timefilter.h"
+#include "avdevice.h"
/**
* Size of the internal FIFO buffers as a number of audio packets
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index 838f019..dfee0a9 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -21,9 +21,9 @@
*/
#include "config.h"
-#include "libavformat/avformat.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
+#include "avdevice.h"
#if HAVE_LIBDC1394_2
#include <dc1394/dc1394.h>
diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c
index 66c3032..2fde491 100644
--- a/libavdevice/oss_audio.c
+++ b/libavdevice/oss_audio.c
@@ -39,7 +39,7 @@
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
-#include "libavformat/avformat.h"
+#include "avdevice.h"
#define AUDIO_BLOCK_SIZE 4096
diff --git a/libavdevice/sndio_common.c b/libavdevice/sndio_common.c
index 7e3b9a3..048e72e 100644
--- a/libavdevice/sndio_common.c
+++ b/libavdevice/sndio_common.c
@@ -22,7 +22,7 @@
#include <stdint.h>
#include <sndio.h>
-#include "libavformat/avformat.h"
+#include "avdevice.h"
#include "sndio_common.h"
diff --git a/libavdevice/sndio_common.h b/libavdevice/sndio_common.h
index 1d00395..12218b4 100644
--- a/libavdevice/sndio_common.h
+++ b/libavdevice/sndio_common.h
@@ -25,8 +25,8 @@
#include <stdint.h>
#include <sndio.h>
-#include "libavformat/avformat.h"
#include "libavutil/log.h"
+#include "avdevice.h"
typedef struct {
AVClass *class;
diff --git a/libavdevice/sndio_enc.c b/libavdevice/sndio_enc.c
index 30f1910..267d672 100644
--- a/libavdevice/sndio_enc.c
+++ b/libavdevice/sndio_enc.c
@@ -22,7 +22,7 @@
#include <stdint.h>
#include <sndio.h>
-#include "libavformat/avformat.h"
+#include "avdevice.h"
#include "sndio_common.h"
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index a49ca80..dd2900e 100644
--- a/libavdevice/v4l.c
+++ b/libavdevice/v4l.c
@@ -25,7 +25,6 @@
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
-#include "libavformat/avformat.h"
#include "libavcodec/dsputil.h"
#include <unistd.h>
#include <fcntl.h>
@@ -36,6 +35,7 @@
#include <linux/videodev.h>
#include <time.h>
#include <strings.h>
+#include "avdevice.h"
typedef struct {
AVClass *class;
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index a0fc992..f219305 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -29,7 +29,6 @@
#undef __STRICT_ANSI__ //workaround due to broken kernel headers
#include "config.h"
-#include "libavformat/avformat.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -46,6 +45,7 @@
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
+#include "avdevice.h"
static const int desired_video_buffers = 256;
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index b8ca419..b8b8f52 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -19,9 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavformat/avformat.h"
#include <windows.h>
#include <vfw.h>
+#include "avdevice.h"
//#define DEBUG_VFW
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index 090af49..a41e11a 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -36,7 +36,6 @@
*/
#include "config.h"
-#include "libavformat/avformat.h"
#include <time.h>
#include <X11/X.h>
#include <X11/Xlib.h>
@@ -46,6 +45,7 @@
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
#include <X11/extensions/Xfixes.h>
+#include "avdevice.h"
/**
* X11 Device Demuxer context
--
1.7.2.3
More information about the ffmpeg-devel
mailing list