|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "libgstreamer_wsd_solution.h" |
|
21 |
|
22 #ifdef EMULATOR |
|
23 |
|
24 #include <e32std.h> |
|
25 #include <pls.h> // For emulator WSD API |
|
26 #include <glib.h> |
|
27 |
|
28 const TUid KLibGStreamerUid3 = {0x0AB229CB}; // This is the UID of the library |
|
29 |
|
30 extern "C" EXPORT_C struct libgstreamer_global_struct *libgstreamer_ImpurePtr() |
|
31 { |
|
32 |
|
33 #if defined(__WINSCW__) || defined(__WINS__) |
|
34 |
|
35 // Access the PLS of this process |
|
36 struct libgstreamer_global_struct* p = Pls<struct libgstreamer_global_struct>(KLibGStreamerUid3, &libgstreamer_Init); |
|
37 return p; |
|
38 |
|
39 #else |
|
40 |
|
41 return NULL; |
|
42 |
|
43 #endif |
|
44 |
|
45 |
|
46 |
|
47 } |
|
48 |
|
49 int libgstreamer_Init(libgstreamer_global_struct *g) |
|
50 { |
|
51 #if defined(__WINSCW__) || defined(__WINS__) |
|
52 if(g) |
|
53 { |
|
54 //#if GST_TESTCASE_COMPILATION |
|
55 g->GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g) = NULL; |
|
56 g->GET_GSTREAMER_WSD_VAR_NAME(check_mutex,gstcheck,g) = NULL; |
|
57 g->GET_GSTREAMER_WSD_VAR_NAME(check_cond,gstcheck,g) = NULL; |
|
58 |
|
59 g->GET_GSTREAMER_WSD_VAR_NAME(fp_std_log,std_log_result,g) = NULL; |
|
60 g->GET_GSTREAMER_WSD_VAR_NAME(assert_failed,std_log_result,g) = 0; |
|
61 g->GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g) = FALSE; |
|
62 g->GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g) = FALSE; |
|
63 g->GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g) = FALSE; |
|
64 |
|
65 g->GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g) = NULL; |
|
66 //#endif /* GST_TESTCASE_COMPILATION */ |
|
67 |
|
68 |
|
69 return 0; |
|
70 } |
|
71 return 1; |
|
72 #else |
|
73 |
|
74 return 1; |
|
75 |
|
76 #endif |
|
77 } |
|
78 |
|
79 extern "C" EXPORT_C void _gstreamer_wsd_reset() |
|
80 { |
|
81 struct libgstreamer_global_struct* p = Pls<struct libgstreamer_global_struct>(KLibGStreamerUid3, &libgstreamer_Init); |
|
82 if(p) |
|
83 { |
|
84 memset(p,0,sizeof(struct libgstreamer_global_struct)); |
|
85 libgstreamer_Init(p); |
|
86 } |
|
87 } |
|
88 |
|
89 #endif // EMULATOR |
|
90 |
|
91 |