Stop using single-include headers that are only available since GStreamer >= 1.2.
[WebKit-https.git] / Source / WebCore / platform / graphics / gstreamer / ImageGStreamer.h
index 83bdfe2..1ecd334 100644 (file)
 
 #include "BitmapImage.h"
 #include "FloatRect.h"
 
 #include "BitmapImage.h"
 #include "FloatRect.h"
-#include "GStreamerVersioning.h"
+#include "GRefPtrGStreamer.h"
+
+#include <gst/gst.h>
+#include <gst/video/video-frame.h>
+
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -34,9 +38,9 @@ class IntSize;
 
 class ImageGStreamer : public RefCounted<ImageGStreamer> {
     public:
 
 class ImageGStreamer : public RefCounted<ImageGStreamer> {
     public:
-        static PassRefPtr<ImageGStreamer> createImage(GstBuffer* buffer, GstCaps* caps)
+        static PassRefPtr<ImageGStreamer> createImage(GstSample* sample)
         {
         {
-            return adoptRef(new ImageGStreamer(buffer, caps));
+            return adoptRef(new ImageGStreamer(sample));
         }
         ~ImageGStreamer();
 
         }
         ~ImageGStreamer();
 
@@ -51,15 +55,18 @@ class ImageGStreamer : public RefCounted<ImageGStreamer> {
         {
             if (!m_cropRect.isEmpty())
                 return FloatRect(m_cropRect);
         {
             if (!m_cropRect.isEmpty())
                 return FloatRect(m_cropRect);
-
-            // Default rectangle used by GraphicsContext::drawImage().
-            return FloatRect(0, 0, -1, -1);
+            ASSERT(m_image);
+            return FloatRect(0, 0, m_image->size().width(), m_image->size().height());
         }
 
     private:
         }
 
     private:
-        ImageGStreamer(GstBuffer*, GstCaps*);
+        ImageGStreamer(GstSample*);
         RefPtr<BitmapImage> m_image;
         FloatRect m_cropRect;
         RefPtr<BitmapImage> m_image;
         FloatRect m_cropRect;
+
+#if USE(CAIRO)
+        GstVideoFrame m_videoFrame;
+#endif
     };
 }
 
     };
 }