|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #include <mdf/mdfpuconfig.h> |
|
22 #include <mmf/server/taskconfig.h> |
|
23 #include <omxprocessingunit.h> |
|
24 |
|
25 #include "vorbisdecoderprocessingunit.h" |
|
26 #include "vorbisdecoderinputport.h" |
|
27 #include "vorbisdecoderoutputport.h" |
|
28 |
|
29 |
|
30 _LIT8(KVorbisDecoderILComponentName,"OMX.SYMBIAN.AUDIO.DECODER.VORBIS"); |
|
31 |
|
32 CVorbisDecoderProcessingUnit::CVorbisDecoderProcessingUnit() |
|
33 : iVorbisDecoderPuObserver(NULL), |
|
34 iVorbisDecoderInputPort(NULL), |
|
35 iVorbisDecoderOutputPort(NULL) |
|
36 |
|
37 { |
|
38 } |
|
39 |
|
40 CVorbisDecoderProcessingUnit* CVorbisDecoderProcessingUnit::NewL() |
|
41 { |
|
42 CVorbisDecoderProcessingUnit* self = new (ELeave) CVorbisDecoderProcessingUnit; |
|
43 CleanupStack::PushL(self); |
|
44 self->ConstructL(); |
|
45 CleanupStack::Pop(self); |
|
46 return self; |
|
47 } |
|
48 |
|
49 void CVorbisDecoderProcessingUnit::ConstructL() |
|
50 { |
|
51 } |
|
52 |
|
53 CVorbisDecoderProcessingUnit::~CVorbisDecoderProcessingUnit() |
|
54 { |
|
55 delete iVorbisDecoderOutputPort; |
|
56 delete iVorbisDecoderInputPort; |
|
57 } |
|
58 |
|
59 TInt CVorbisDecoderProcessingUnit::Create(const MMdfProcessingUnitObserver& aProcessingUnitObserver) |
|
60 { |
|
61 TRAPD(err, CreateL(aProcessingUnitObserver)); |
|
62 return err; |
|
63 } |
|
64 |
|
65 void CVorbisDecoderProcessingUnit::CreateL(const MMdfProcessingUnitObserver& aProcessingUnitObserver) |
|
66 { |
|
67 iVorbisDecoderPuObserver = const_cast<MMdfProcessingUnitObserver*>(&aProcessingUnitObserver); |
|
68 COmxProcessingUnit::ConstructL(KVorbisDecoderILComponentName, aProcessingUnitObserver); |
|
69 iVorbisDecoderInputPort = CVorbisDecoderInputPort::NewL(KVorbisDecoderInputPortIndex, this); |
|
70 iVorbisDecoderOutputPort = CVorbisDecoderOutputPort::NewL(KVorbisDecoderOutputPortIndex, this); |
|
71 User::LeaveIfError(AddInputPort(iVorbisDecoderInputPort)); |
|
72 User::LeaveIfError(AddOutputPort(iVorbisDecoderOutputPort)); |
|
73 } |
|
74 |
|
75 |
|
76 |
|
77 // end |
|
78 |
|
79 |
|
80 |