Macro qtTrIdx() replaced by tr() and QT_TRANSLATE_NOOP()
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / inc / MafwGstScreenshot.h
1 /*
2  * This file is part of QMAFW
3  *
4  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
5  * reserved.
6  *
7  * Contact: Visa Smolander <visa.smolander@nokia.com>
8  *
9  * This software, including documentation, is protected by copyright controlled
10  * by Nokia Corporation. All rights are reserved. Copying, including
11  * reproducing, storing, adapting or translating, any or all of this material
12  * requires the prior written consent of Nokia Corporation. This material also
13  * contains confidential information which may not be disclosed to others
14  * without the prior written consent of Nokia.
15  *
16  */
17
18 #ifndef MAFWGSTSCREENSHOT_H
19 #define MAFWGSTSCREENSHOT_H
20
21 #include <QObject>
22 #include <gst/gst.h>
23
24 class MafwGstScreenshot : public QObject
25 {
26     Q_OBJECT
27 public:
28     MafwGstScreenshot(QObject* parent);
29     ~MafwGstScreenshot();
30
31     bool savePauseFrame(GstBuffer *buffer, const char *filename);
32     void cancelPauseFrame();
33     bool reportBack(GError *error);
34
35 private:
36     /* All GStreamer elements are owned by m_pipeline.
37        Elements are destroyed when m_pipeline is destroyed.*/
38     GstElement *m_src;
39     GstElement *m_sink;
40     GstElement *m_pipeline;
41     GstElement *m_filter;
42     GstElement *m_enc;
43     GstElement *m_csp;
44     GstBus *m_bus;
45     GstCaps *m_caps;
46     GstStructure *m_structure;
47
48     gulong m_handler_id;
49
50 Q_SIGNALS:
51     void screenshotCancelled();
52     void screenshotTaken(char *location, GError *error);
53 };
54
55 #endif // MAFWGSTSCREENSHOT_H