Small clean of subtitles applet code.
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / unittests / ut_MafwGstRendererSeeker / ut_MafwGstRendererSeeker_stubs.c
1 /*
2  * This file is part of QMAFW
3  *
4  * Copyright (C) 2011 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 #include <glib.h>
19
20 #include <gst/gstelement.h>
21
22 gint64 g_currentPosition;
23 gint64 g_duration;
24 gint64 g_seekRequested;
25 gint g_seeksCalled;
26
27 gboolean gst_element_query_position(GstElement *element,
28                                     GstFormat *format,
29                                     gint64 *value)
30 {
31     *value = g_currentPosition * GST_SECOND;
32     return TRUE;
33 }
34
35 gboolean gst_element_query_duration(GstElement *element,
36                                     GstFormat *format,
37                                     gint64 *value)
38 {
39     *value = g_duration * GST_SECOND;
40     return TRUE;
41 }
42
43 gboolean gst_element_seek(GstElement *element,
44                           gdouble rate,
45                           GstFormat format,
46                           GstSeekFlags flags,
47                           GstSeekType cur_type,
48                           gint64 cur,
49                           GstSeekType stop_type,
50                           gint64 stop)
51 {
52     g_seekRequested = cur / GST_SECOND;
53     ++g_seeksCalled;
54     return TRUE;
55 }