Added qmafw-gst-subtitles-renderer-0.0.55 for Meego Harmattan 1.2
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / inc / MafwGstScreenshot.h
diff --git a/qmafw-gst-subtitles-renderer/inc/MafwGstScreenshot.h b/qmafw-gst-subtitles-renderer/inc/MafwGstScreenshot.h
new file mode 100644 (file)
index 0000000..a032c04
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * This file is part of QMAFW
+ *
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+ * reserved.
+ *
+ * Contact: Visa Smolander <visa.smolander@nokia.com>
+ *
+ * This software, including documentation, is protected by copyright controlled
+ * by Nokia Corporation. All rights are reserved. Copying, including
+ * reproducing, storing, adapting or translating, any or all of this material
+ * requires the prior written consent of Nokia Corporation. This material also
+ * contains confidential information which may not be disclosed to others
+ * without the prior written consent of Nokia.
+ *
+ */
+
+#ifndef MAFWGSTSCREENSHOT_H
+#define MAFWGSTSCREENSHOT_H
+
+#include <QObject>
+#include <gst/gst.h>
+
+class MafwGstScreenshot : public QObject
+{
+    Q_OBJECT
+public:
+    MafwGstScreenshot(QObject* parent);
+    ~MafwGstScreenshot();
+
+    bool savePauseFrame(GstBuffer *buffer, const char *filename);
+    void cancelPauseFrame();
+    bool reportBack(GError *error);
+
+private:
+    /* All GStreamer elements are owned by m_pipeline.
+       Elements are destroyed when m_pipeline is destroyed.*/
+    GstElement *m_src;
+    GstElement *m_sink;
+    GstElement *m_pipeline;
+    GstElement *m_filter;
+    GstElement *m_enc;
+    GstElement *m_csp;
+    GstBus *m_bus;
+    GstCaps *m_caps;
+    GstStructure *m_structure;
+
+    gulong m_handler_id;
+
+Q_SIGNALS:
+    void screenshotCancelled();
+    void screenshotTaken(char *location, GError *error);
+};
+
+#endif // MAFWGSTSCREENSHOT_H