|
1 /* |
|
2 * Copyright (c) 2008-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 #include <glxtracer.h> |
|
19 #include <glxlog.h> |
|
20 #include "glxactivedecoder.h" |
|
21 |
|
22 // ----------------------------------------------------------------------------- |
|
23 // NewL |
|
24 // ----------------------------------------------------------------------------- |
|
25 CGlxHdmiDecoderAO* CGlxHdmiDecoderAO::NewL(CGlxHdmiSurfaceUpdater* aHdmiSurfaceUpdater) |
|
26 { |
|
27 TRACER("CGlxHdmiDecoderAO::NewL()"); |
|
28 CGlxHdmiDecoderAO* self = new (ELeave) CGlxHdmiDecoderAO(aHdmiSurfaceUpdater); |
|
29 return self; |
|
30 } |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CGlxHdmiDecoderAO() |
|
34 // ----------------------------------------------------------------------------- |
|
35 CGlxHdmiDecoderAO::CGlxHdmiDecoderAO(CGlxHdmiSurfaceUpdater* aHdmiSurfaceUpdater): |
|
36 CActive(CActive::EPriorityStandard-1),iHdmiSurfaceUpdater(aHdmiSurfaceUpdater) |
|
37 { |
|
38 TRACER("CGlxHdmiDecoderAO::CGlxHdmiDecoderAO()"); |
|
39 CActiveScheduler::Add(this); |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // ~CGlxHdmiDecoderAO |
|
44 // Cancel the outstanding request |
|
45 // ----------------------------------------------------------------------------- |
|
46 CGlxHdmiDecoderAO::~CGlxHdmiDecoderAO() |
|
47 { |
|
48 TRACER("CGlxHdmiDecoderAO::~CGlxHdmiDecoderAO()"); |
|
49 } |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // RunL |
|
53 // Calls iHdmiSurfaceUpdater->HandleRunL() which is expected to handle the call |
|
54 // ----------------------------------------------------------------------------- |
|
55 void CGlxHdmiDecoderAO::RunL() |
|
56 { |
|
57 TRACER("CGlxHdmiDecoderAO::RunL()"); |
|
58 if(iStatus == KErrUnderflow) |
|
59 { |
|
60 GLX_LOG_INFO("CGlxHdmiDecoderAO::RunL() - call continueconvert"); |
|
61 iDecoder->ContinueConvert(&iStatus); |
|
62 } |
|
63 else |
|
64 { |
|
65 GLX_LOG_INFO("CGlxHdmiDecoderAO::RunL() - call handlerunL"); |
|
66 iHdmiSurfaceUpdater->HandleRunL(iStatus); |
|
67 } |
|
68 } |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // DoCancel |
|
72 // ----------------------------------------------------------------------------- |
|
73 void CGlxHdmiDecoderAO::DoCancel() |
|
74 { |
|
75 TRACER("CGlxHdmiDecoderAO::DoCancel()"); |
|
76 iDecoder->Cancel(); |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // ConvertImageL |
|
81 // ----------------------------------------------------------------------------- |
|
82 void CGlxHdmiDecoderAO::ConvertImageL(CFbsBitmap& aBitmap, |
|
83 CImageDecoder* aDecoder) |
|
84 { |
|
85 TRACER("CGlxHdmiDecoderAO::ConvertImageL()"); |
|
86 iDecoder = aDecoder; |
|
87 iDecoder->Convert(&iStatus,aBitmap); |
|
88 SetActive(); |
|
89 } |
|
90 |
|
91 |
|
92 |