2 * This file is part of QMAFW
4 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights
7 * Contact: Visa Smolander <visa.smolander@nokia.com>
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.
18 #ifndef UT_MAFW_GST_RENDERER_WORKER_H_
19 #define UT_MAFW_GST_RENDERER_WORKER_H_
22 #include <QtTest/QtTest>
24 #include "mafw-gst-renderer-worker.h"
26 class ut_MafwGstRendererWorker: public QObject
30 private slots: // tests
32 void basicPlaybackTestCase();
33 void basicVideoPlaybackTestCase();
35 void playAndPauseTestCase();
36 void playAndStopTestCase();
37 void setAndGetPropertiesTestCase();
38 void gettersTestCase();
39 void playAndPauseAndResumeTestCase();
40 void pauseQuicklyAfterPlayTestCase();
41 void pauseAtTestCase();
42 void resumeDelayedTestCase();
43 void getCurrentMetadataTestCase();
44 void invalidUriTestCase();
46 void defaultConfigurationTestCase();
47 void configurabilityTestCase();
48 void pauseFrameTestCase();
49 void pauseFrameConfigurabilityTestCase();
50 void pauseFrameCancelTestCase();
51 void rendererArtTestCase();
52 void bufferingTestCase();
53 void mediaRouteTestCase();
54 void setReadyTimeoutTestCase();
55 void redirectMessageTestCase();
65 static void playCallback(MafwGstRendererWorker *worker, gpointer owner);
66 static void eosCallback(MafwGstRendererWorker *worker, gpointer owner);
67 static void errorCallback(MafwGstRendererWorker *worker,
70 static void pauseCallback(MafwGstRendererWorker *worker, gpointer owner);
71 static void propertyCallback(MafwGstRendererWorker *worker,
75 static void seekCallback(MafwGstRendererWorker *worker, gpointer owner);
76 static void metadataCallback(MafwGstRendererWorker *worker,
81 static void bufferingCallback(MafwGstRendererWorker *worker,
84 static void blankingControlCallback(MafwGstRendererWorker *worker,
85 gpointer owner, gboolean prohibit);
86 static void screenshotCallback(MafwGstRendererWorker *worker,
92 void waitForEvent(gint ms, bool &hasEventOccurred);
95 MafwGstRendererWorker *m_worker;
96 bool m_gotPlayCallback;
97 bool m_gotEosCallback;
98 bool m_gotErrorCallback;
99 bool m_gotPauseCallback;
100 bool m_gotSeekCallback;
101 bool m_gotMetadataCallback;
102 bool m_gotPropertyCallback;
103 bool m_gotBufferStatusCallback;
104 bool m_blankingProhibited;
105 int m_receivedErrorCode;
106 int m_receivedPropertyId;
107 gdouble m_receivedBufferStatus;
108 QList<int> m_receivedMetadata;