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