video: make direct includes work again
authorTim-Philipp Müller <tim@centricular.net>
Fri, 16 Aug 2013 12:47:31 +0000 (13:47 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Fri, 16 Aug 2013 13:14:15 +0000 (14:14 +0100)
Not nice to break people's code if we can avoid it. Could
add a warning in the next cycle, and then require single
includes in the cycle after.

https://bugzilla.gnome.org/show_bug.cgi?id=695889

gst-libs/gst/video/gstvideodecoder.h
gst-libs/gst/video/gstvideoutils.h
gst-libs/gst/video/video-chroma.h
gst-libs/gst/video/video-frame.h

index 7c16c0e..1bdb37d 100644 (file)
@@ -26,7 +26,6 @@
 #define _GST_VIDEO_DECODER_H_
 
 #include <gst/base/gstadapter.h>
-#include <gst/video/video.h>
 #include <gst/video/gstvideoutils.h>
 
 G_BEGIN_DECLS
index 2851521..29a2c9a 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+#ifndef __GST_VIDEO_H__
+#include <gst/video/video.h>
+#endif
+
 #ifndef _GST_VIDEO_UTILS_H_
 #define _GST_VIDEO_UTILS_H_
 
 #include <gst/gst.h>
-#include <gst/video/video.h>
 
 G_BEGIN_DECLS
 #define GST_TYPE_VIDEO_CODEC_STATE \
index 8c450d2..717d43b 100644 (file)
@@ -82,6 +82,9 @@ typedef enum {
 
 typedef struct _GstVideoChromaResample GstVideoChromaResample;
 
+/* circular dependency, need to include this after defining the enums */
+#include <gst/video/video-format.h>
+
 GstVideoChromaResample * gst_video_chroma_resample_new   (GstVideoChromaMethod method,
                                                           GstVideoChromaSite site,
                                                           GstVideoChromaFlags flags,
index fd56821..670806e 100644 (file)
 #ifndef __GST_VIDEO_FRAME_H__
 #define __GST_VIDEO_FRAME_H__
 
-#include <gst/gst.h>
-#include <gst/video/video-info.h>
+#include <gst/video/video-enumtypes.h>
 
 G_BEGIN_DECLS
 
-#include <gst/video/video-enumtypes.h>
-
 typedef struct _GstVideoFrame GstVideoFrame;
 
 /**
@@ -49,6 +46,10 @@ typedef enum {
   GST_VIDEO_FRAME_FLAG_ONEFIELD     = (1 << 3)
 } GstVideoFrameFlags;
 
+/* circular dependency, need to include this after defining the enums */
+#include <gst/video/video-format.h>
+#include <gst/video/video-info.h>
+
 /**
  * GstVideoFrame:
  * @info: the #GstVideoInfo