|
1 // Copyright (c) 2008-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 |
|
18 /** |
|
19 * @file |
|
20 * @internalTechnology |
|
21 */ |
|
22 |
|
23 #include "omxilotherfilesourceopb0port.h" |
|
24 #include "omxilfilesourceprocessingfunction.h" |
|
25 #include <uri8.h> |
|
26 |
|
27 COmxILOtherFileSourceOPB0Port* COmxILOtherFileSourceOPB0Port::NewL(const TOmxILCommonPortData& aCommonPortData, |
|
28 const RArray<OMX_OTHER_FORMATTYPE>& aSupportedOtherFormats, |
|
29 const COmxILFileSourceProcessingFunction& aFileSourcePF) |
|
30 { |
|
31 COmxILOtherFileSourceOPB0Port* self = new (ELeave) COmxILOtherFileSourceOPB0Port(aCommonPortData, aFileSourcePF); |
|
32 CleanupStack::PushL(self); |
|
33 self->ConstructL(aSupportedOtherFormats); |
|
34 CleanupStack::Pop(self); |
|
35 return self; |
|
36 } |
|
37 |
|
38 void COmxILOtherFileSourceOPB0Port::ConstructL(const RArray<OMX_OTHER_FORMATTYPE>& aSupportedOtherFormats) |
|
39 { |
|
40 iParamPortDefinition.eDomain = OMX_PortDomainOther; |
|
41 iParamPortDefinition.format.other.eFormat = OMX_OTHER_FormatBinary; |
|
42 |
|
43 // base |
|
44 COmxILOtherPort::ConstructL(aSupportedOtherFormats); |
|
45 } |
|
46 |
|
47 COmxILOtherFileSourceOPB0Port::COmxILOtherFileSourceOPB0Port(const TOmxILCommonPortData& aCommonPortData, |
|
48 const COmxILFileSourceProcessingFunction& aFileSourcePF) |
|
49 : COmxILOtherPort(aCommonPortData), |
|
50 iFileSourcePF(aFileSourcePF) |
|
51 { |
|
52 } |
|
53 |
|
54 COmxILOtherFileSourceOPB0Port::~COmxILOtherFileSourceOPB0Port() |
|
55 { |
|
56 CleanUpPort(); |
|
57 } |
|
58 |
|
59 OMX_ERRORTYPE COmxILOtherFileSourceOPB0Port::GetLocalOmxParamIndexes(RArray<TUint>& aIndexArray) const |
|
60 { |
|
61 return COmxILOtherPort::GetLocalOmxParamIndexes(aIndexArray); |
|
62 } |
|
63 |
|
64 OMX_ERRORTYPE COmxILOtherFileSourceOPB0Port::GetLocalOmxConfigIndexes(RArray<TUint>& aIndexArray) const |
|
65 { |
|
66 return COmxILOtherPort::GetLocalOmxConfigIndexes(aIndexArray); |
|
67 } |
|
68 |
|
69 OMX_ERRORTYPE COmxILOtherFileSourceOPB0Port::GetParameter(OMX_INDEXTYPE aParamIndex, |
|
70 TAny* apComponentParameterStructure) const |
|
71 { |
|
72 return COmxILOtherPort::GetParameter(aParamIndex, apComponentParameterStructure); |
|
73 } |
|
74 |
|
75 OMX_ERRORTYPE COmxILOtherFileSourceOPB0Port::SetParameter(OMX_INDEXTYPE aParamIndex, |
|
76 const TAny* apComponentParameterStructure, |
|
77 TBool& aUpdateProcessingFunction) |
|
78 { |
|
79 return COmxILOtherPort::SetParameter(aParamIndex, |
|
80 apComponentParameterStructure, |
|
81 aUpdateProcessingFunction); |
|
82 } |
|
83 |
|
84 |
|
85 OMX_ERRORTYPE COmxILOtherFileSourceOPB0Port::SetFormatInPortDefinition(const OMX_PARAM_PORTDEFINITIONTYPE& aPortDefinition, |
|
86 TBool& /*aUpdateProcessingFunction*/) |
|
87 { |
|
88 |
|
89 iParamPortDefinition.format.other = aPortDefinition.format.other; |
|
90 return OMX_ErrorNone; |
|
91 } |
|
92 |
|
93 TBool COmxILOtherFileSourceOPB0Port::IsTunnelledPortCompatible(const OMX_PARAM_PORTDEFINITIONTYPE& aPortDefinition) const |
|
94 { |
|
95 if(aPortDefinition.eDomain != iParamPortDefinition.eDomain) |
|
96 { |
|
97 return EFalse; |
|
98 } |
|
99 |
|
100 |
|
101 if (aPortDefinition.format.other.eFormat == OMX_OTHER_FormatMax) |
|
102 { |
|
103 return EFalse; |
|
104 } |
|
105 |
|
106 |
|
107 return ETrue; |
|
108 } |