equal
deleted
inserted
replaced
17 |
17 |
18 #include <stdio.h> |
18 #include <stdio.h> |
19 #include <stdlib.h> |
19 #include <stdlib.h> |
20 #include <assert.h> |
20 #include <assert.h> |
21 #include "xaledarrayitf.h" |
21 #include "xaledarrayitf.h" |
22 #ifdef _GSTREAMER_BACKEND_ |
22 |
23 #include "XALEDArrayItfAdaptation.h" |
23 #include "xaledarrayitfadaptation.h" |
24 #endif |
24 |
25 #include "xathreadsafety.h" |
25 #include "xathreadsafety.h" |
26 |
26 |
27 /* XALEDArrayItfImpl* GetImpl(XALEDArrayItf self) |
27 /* XALEDArrayItfImpl* GetImpl(XALEDArrayItf self) |
28 * Description: Validate interface pointer and cast it to implementation pointer. |
28 * Description: Validate interface pointer and cast it to implementation pointer. |
29 */ |
29 */ |
67 } |
67 } |
68 |
68 |
69 /* check is ligtMask mode changed */ |
69 /* check is ligtMask mode changed */ |
70 if( impl->lightMask != lightMask ) |
70 if( impl->lightMask != lightMask ) |
71 { |
71 { |
72 #ifdef _GSTREAMER_BACKEND_ |
72 |
73 ret = XALEDArrayItfAdapt_ActivateLEDArray( impl->adapCtx, lightMask ); |
73 ret = XALEDArrayItfAdapt_ActivateLEDArray( (XAAdaptationGstCtx*)impl->adapCtx, lightMask ); |
74 #endif |
74 |
75 if ( ret == XA_RESULT_SUCCESS ) |
75 if ( ret == XA_RESULT_SUCCESS ) |
76 { |
76 { |
77 impl->lightMask = lightMask; |
77 impl->lightMask = lightMask; |
78 } |
78 } |
79 } |
79 } |
150 DEBUG_API("<-XALEDArrayItfImpl_SetColor"); |
150 DEBUG_API("<-XALEDArrayItfImpl_SetColor"); |
151 return XA_RESULT_PRECONDITIONS_VIOLATED; |
151 return XA_RESULT_PRECONDITIONS_VIOLATED; |
152 } |
152 } |
153 else |
153 else |
154 { |
154 { |
155 #ifdef _GSTREAMER_BACKEND_ |
155 |
156 ret = XALEDArrayItfAdapt_SetColor( impl->adapCtx, index, pColor); |
156 ret = XALEDArrayItfAdapt_SetColor( (XAAdaptationGstCtx*)impl->adapCtx, index, pColor); |
157 #endif |
157 |
158 if ( ret == XA_RESULT_SUCCESS ) |
158 if ( ret == XA_RESULT_SUCCESS ) |
159 { |
159 { |
160 impl->color = *pColor; |
160 impl->color = *pColor; |
161 } |
161 } |
162 } |
162 } |
206 } |
206 } |
207 |
207 |
208 /***************************************************************************** |
208 /***************************************************************************** |
209 * XALEDArrayItfImpl -specific methods |
209 * XALEDArrayItfImpl -specific methods |
210 *****************************************************************************/ |
210 *****************************************************************************/ |
211 #ifdef _GSTREAMER_BACKEND_ |
211 |
212 |
212 |
213 /* XALEDArrayItfImpl* XALEDArrayItfImpl_Create() |
213 /* XALEDArrayItfImpl* XALEDArrayItfImpl_Create() |
214 * Description: Allocate and initialize LEDArrayItfImpl |
214 * Description: Allocate and initialize LEDArrayItfImpl |
215 */ |
215 */ |
216 XALEDArrayItfImpl* XALEDArrayItfImpl_Create( XAAdaptationBaseCtx *adapCtx ) |
216 XALEDArrayItfImpl* XALEDArrayItfImpl_Create( XAAdaptationBaseCtx *adapCtx ) |
237 } |
237 } |
238 |
238 |
239 DEBUG_API("<-XALEDArrayItfImpl_Create"); |
239 DEBUG_API("<-XALEDArrayItfImpl_Create"); |
240 return self; |
240 return self; |
241 } |
241 } |
242 #endif |
242 |
243 /* void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self) |
243 /* void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self) |
244 * Description: Free all resources reserved at XALEDArrayItfImpl_Create |
244 * Description: Free all resources reserved at XALEDArrayItfImpl_Create |
245 */ |
245 */ |
246 void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self) |
246 void XALEDArrayItfImpl_Free(XALEDArrayItfImpl* self) |
247 { |
247 { |