|
1 /* |
|
2 * Copyright (c) 2008 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 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #include "comxil3gpdemuxertimeinputport.h" |
|
25 #include "comxil3gpdemuxerprocessingfunction.h" |
|
26 |
|
27 COmxIL3GPDemuxerTimeInputPort* COmxIL3GPDemuxerTimeInputPort::NewL(const TOmxILCommonPortData& aCommonPortData, |
|
28 const RArray<OMX_OTHER_FORMATTYPE>& aSupportedOtherFormats, |
|
29 COmxIL3GPDemuxerProcessingFunction& aProcessingFunction) |
|
30 { |
|
31 COmxIL3GPDemuxerTimeInputPort* tip = new(ELeave) COmxIL3GPDemuxerTimeInputPort(aProcessingFunction); |
|
32 CleanupStack::PushL(tip); |
|
33 tip->ConstructL(aCommonPortData, aSupportedOtherFormats); |
|
34 CleanupStack::Pop(tip); |
|
35 return tip; |
|
36 } |
|
37 |
|
38 COmxIL3GPDemuxerTimeInputPort::COmxIL3GPDemuxerTimeInputPort(COmxIL3GPDemuxerProcessingFunction& aProcessingFunction) : |
|
39 iProcessingFunction(&aProcessingFunction) |
|
40 { |
|
41 } |
|
42 |
|
43 COmxIL3GPDemuxerTimeInputPort::~COmxIL3GPDemuxerTimeInputPort() |
|
44 { |
|
45 } |
|
46 |
|
47 OMX_ERRORTYPE COmxIL3GPDemuxerTimeInputPort::GetLocalOmxParamIndexes(RArray<TUint>& aIndexArray) const |
|
48 { |
|
49 return COmxILOtherPort::GetLocalOmxParamIndexes(aIndexArray); |
|
50 } |
|
51 |
|
52 OMX_ERRORTYPE COmxIL3GPDemuxerTimeInputPort::GetLocalOmxConfigIndexes(RArray<TUint>& aIndexArray) const |
|
53 { |
|
54 return COmxILOtherPort::GetLocalOmxConfigIndexes(aIndexArray); |
|
55 } |
|
56 |
|
57 OMX_ERRORTYPE COmxIL3GPDemuxerTimeInputPort::GetParameter(OMX_INDEXTYPE aParamIndex, |
|
58 TAny* apComponentParameterStructure) const |
|
59 { |
|
60 return COmxILOtherPort::GetParameter(aParamIndex, apComponentParameterStructure); |
|
61 } |
|
62 |
|
63 OMX_ERRORTYPE COmxIL3GPDemuxerTimeInputPort::SetParameter(OMX_INDEXTYPE aParamIndex, |
|
64 const TAny* apComponentParameterStructure, |
|
65 TBool& aUpdateProcessingFunction) |
|
66 { |
|
67 return COmxILOtherPort::SetParameter(aParamIndex, apComponentParameterStructure, aUpdateProcessingFunction); |
|
68 } |
|
69 |
|
70 OMX_ERRORTYPE COmxIL3GPDemuxerTimeInputPort::SetFormatInPortDefinition(const OMX_PARAM_PORTDEFINITIONTYPE& aPortDefinition, |
|
71 TBool& /*aUpdateProcessingFunction*/) |
|
72 { |
|
73 if (aPortDefinition.nBufferCountActual > KMaxTimeBuffers) |
|
74 { |
|
75 return OMX_ErrorBadParameter; |
|
76 } |
|
77 |
|
78 // Just ignore this. It has to be a time format. |
|
79 return OMX_ErrorNone; |
|
80 } |
|
81 |
|
82 TBool COmxIL3GPDemuxerTimeInputPort::IsTunnelledPortCompatible(const OMX_PARAM_PORTDEFINITIONTYPE& /*aPortDefinition*/) const |
|
83 { |
|
84 return ETrue; |
|
85 } |