|
1 /* |
|
2 * Copyright (c) 2006 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: Implementation of the thumbnail processor |
|
15 * interface class |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // EXTERNAL RESOURCES |
|
22 |
|
23 // Include Files |
|
24 #include "TNEProcessorImpl.h" |
|
25 #include "TNEProcessor.h" |
|
26 |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CTNEProcessor::NewL |
|
30 // Two-phased constructor. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 CTNEProcessor* CTNEProcessor::NewL() |
|
34 |
|
35 { |
|
36 CTNEProcessor* self = NewLC(); |
|
37 CleanupStack::Pop(self); |
|
38 return self; |
|
39 } |
|
40 |
|
41 CTNEProcessor* CTNEProcessor::NewLC() |
|
42 { |
|
43 CTNEProcessor* self = new (ELeave) CTNEProcessor(); |
|
44 CleanupStack::PushL(self); |
|
45 self->ConstructL(); |
|
46 return self; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CTNEProcessor::CTNEProcessor() |
|
51 // C++ default constructor can NOT contain any code, that |
|
52 // might leave. |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 CTNEProcessor::CTNEProcessor() |
|
56 { |
|
57 iTNEProcessor=0; |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // CTNEProcessor::ConstructL |
|
62 // Symbian 2nd phase constructor can leave. |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 void CTNEProcessor::ConstructL() |
|
66 { |
|
67 iTNEProcessor = CTNEProcessorImpl::NewL(); |
|
68 } |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // CTNEProcessor::~CTNEProcessor |
|
72 // Destructor. |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 CTNEProcessor::~CTNEProcessor() |
|
76 { |
|
77 if(iTNEProcessor) |
|
78 { |
|
79 delete iTNEProcessor; |
|
80 iTNEProcessor=0; |
|
81 } |
|
82 } |
|
83 |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CTNEProcessor::GetVideoClipPropertiesL |
|
87 // Retrieves information about the given clip |
|
88 // (other items were commented in a header). |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void CTNEProcessor::GetVideoClipPropertiesL(RFile& aFileHandle, |
|
92 TTNEVideoFormat& aFormat, |
|
93 TTNEVideoType& aVideoType, |
|
94 TSize& aResolution, |
|
95 TInt& aVideoFrameCount) |
|
96 { |
|
97 |
|
98 iTNEProcessor->GetClipPropertiesL(aFileHandle, aFormat, |
|
99 aVideoType, aResolution, aVideoFrameCount); |
|
100 |
|
101 return; |
|
102 |
|
103 } |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // CTNEProcessor::StartThumbL |
|
107 // Initiates thumbnail generation |
|
108 // (other items were commented in a header). |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 void CTNEProcessor::StartThumbL(RFile& aFileHandle, TInt aIndex, TSize aResolution, |
|
112 TDisplayMode aDisplayMode, TBool aEnhance) |
|
113 { |
|
114 TInt fileSize; |
|
115 aFileHandle.Size(fileSize); |
|
116 iTNEProcessor->StartThumbL(aFileHandle, aIndex, aResolution, aDisplayMode, aEnhance); |
|
117 } |
|
118 |
|
119 |
|
120 // ----------------------------------------------------------------------------- |
|
121 // CTNEProcessor::ProcessThumbL |
|
122 // Starts thumbnail image generation |
|
123 // (other items were commented in a header). |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 void CTNEProcessor::ProcessThumbL(TRequestStatus &aStatus) |
|
127 { |
|
128 iTNEProcessor->ProcessThumbL(aStatus); |
|
129 } |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // CTNEProcessor::FetchThumb |
|
133 // Gets a pointer to completed thumbnail bitmap |
|
134 // (other items were commented in a header). |
|
135 // ----------------------------------------------------------------------------- |
|
136 // |
|
137 void CTNEProcessor::FetchThumb(CFbsBitmap*& aThumb) |
|
138 { |
|
139 iTNEProcessor->FetchThumb(aThumb); |
|
140 } |