58 CPVDisplaySinkNodeProxy::CPVDisplaySinkNodeProxy() : MVTVideoSource(KNullUid) |
58 CPVDisplaySinkNodeProxy::CPVDisplaySinkNodeProxy() : MVTVideoSource(KNullUid) |
59 { |
59 { |
60 } |
60 } |
61 |
61 |
62 // ----------------------------------------------------------------------------- |
62 // ----------------------------------------------------------------------------- |
63 // CPVDisplaySinkNodeProxy::~CPVDisplaySinkNodeProxy |
|
64 // destructor.add for memory leak |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 CPVDisplaySinkNodeProxy::~CPVDisplaySinkNodeProxy() |
|
68 { |
|
69 __IF_DEBUG(Print( _L( "VTProto: CPVDisplaySinkNodeProxy::~CPVDisplaySinkNodeProxy<" ) )); |
|
70 __IF_DEBUG(Print( _L( "VTProto: ~CPVDisplaySinkNodeProxy = %x"), (TInt)this) ); |
|
71 __IF_DEBUG(Print( _L( "VTProto: CPVDisplaySinkNodeProxy::~CPVDisplaySinkNodeProxy>" ) )); |
|
72 } |
|
73 |
|
74 // ============================ CVSVideoOutput ================================= |
|
75 |
|
76 // ----------------------------------------------------------------------------- |
|
77 // CVSVideoOutput::CVSVideoOutput |
|
78 // ----------------------------------------------------------------------------- |
|
79 // |
|
80 CVSVideoOutput::CVSVideoOutput( CDisplaySinkProxy* aSink ) |
|
81 : iSink( aSink ) |
|
82 { |
|
83 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSVideoOutput::CVSVideoOutput()<"), RThread().Id().operator TUint())); |
|
84 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSVideoOutput::CVSVideoOutput()>"), RThread().Id().operator TUint())); |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // CVSVideoOutput::SetFormatL |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void CVSVideoOutput::SetFormatL( const TDesC8& aFormat ) |
|
92 { |
|
93 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSVideoOutput::SetFormatL()<"), RThread().Id().operator TUint())); |
|
94 iSink->SetFormatL( aFormat ); |
|
95 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSVideoOutput::SetFormatL()>"), RThread().Id().operator TUint())); |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // CVSVideoOutput::SetVideoFrameSizeL |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 void CVSVideoOutput::SetVideoFrameSizeL( const TSize& aSize ) |
|
103 { |
|
104 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSVideoOutput::SetVideoFrameSizeL()<"), RThread().Id().operator TUint())); |
|
105 iSink->SetVideoFrameSizeL( aSize ); |
|
106 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSVideoOutput::SetVideoFrameSizeL()>"), RThread().Id().operator TUint())); |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CVSVideoOutput::GetVideoFrameSizeL |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 void CVSVideoOutput::GetVideoFrameSizeL( TSize& aSize ) const |
|
114 { |
|
115 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSVideoOutput::GetVideoFrameSizeL()<"), RThread().Id().operator TUint())); |
|
116 iSink->GetVideoFrameSizeL( aSize ); |
|
117 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSVideoOutput::GetVideoFrameSizeL()>"), RThread().Id().operator TUint())); |
|
118 } |
|
119 |
|
120 // ----------------------------------------------------------------------------- |
|
121 // CDisplaySinkProxy::CDisplaySinkProxy |
63 // CDisplaySinkProxy::CDisplaySinkProxy |
122 // Constructor. |
64 // Constructor. |
123 // ----------------------------------------------------------------------------- |
65 // ----------------------------------------------------------------------------- |
124 // |
66 // |
125 CDisplaySinkProxy::CDisplaySinkProxy(MVTVideoSink* aDisplaySink) : MPVDataSink(KNullUid), iDisplaySink(aDisplaySink) |
67 CDisplaySinkProxy::CDisplaySinkProxy(MVTVideoSink* aDisplaySink) : MPVDataSink(KNullUid), iDisplaySink(aDisplaySink) |
127 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::CDisplaySinkProxy<" ) )); |
69 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::CDisplaySinkProxy<" ) )); |
128 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::CDisplaySinkProxy iDisplaySink %d>" ), iDisplaySink)); |
70 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::CDisplaySinkProxy iDisplaySink %d>" ), iDisplaySink)); |
129 } |
71 } |
130 |
72 |
131 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
132 // CDisplaySinkProxy::~CDisplaySinkProxy |
|
133 // destructor.add for memory leak |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 CDisplaySinkProxy::~CDisplaySinkProxy() |
|
137 { |
|
138 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::~CDisplaySinkProxy<" ) )); |
|
139 __IF_DEBUG(Print( _L( "VTProto: ~CDisplaySinkProxy = %x"), (TInt)this) ); |
|
140 delete iVideoOutputInterface; |
|
141 delete iDSNodeProxy; |
|
142 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::~CDisplaySinkProxy>" ) )); |
|
143 } |
|
144 // ----------------------------------------------------------------------------- |
|
145 // CDisplaySinkProxy::ConstructL |
74 // CDisplaySinkProxy::ConstructL |
146 // ----------------------------------------------------------------------------- |
75 // ----------------------------------------------------------------------------- |
147 // |
76 // |
148 void CDisplaySinkProxy::ConstructL() |
77 void CDisplaySinkProxy::ConstructL() |
149 { |
78 { |
150 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::ConstructL<" ) )); |
79 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::ConstructL<" ) )); |
151 iDSNodeProxy = new (ELeave)CPVDisplaySinkNodeProxy(); |
80 iDSNodeProxy = new (ELeave)CPVDisplaySinkNodeProxy(); |
152 iVideoOutputInterface = new (ELeave) CVSVideoOutput( this ); |
|
153 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::ConstructL>" ) )); |
81 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::ConstructL>" ) )); |
154 } |
82 } |
155 |
83 |
156 |
84 |
157 // ----------------------------------------------------------------------------- |
85 // ----------------------------------------------------------------------------- |
177 void CDisplaySinkProxy::QueryInterface( const TPVUuid& aUuid, TPVInterfacePtr& aInterfacePtr ) |
105 void CDisplaySinkProxy::QueryInterface( const TPVUuid& aUuid, TPVInterfacePtr& aInterfacePtr ) |
178 { |
106 { |
179 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::QueryInterface<" ) )); |
107 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::QueryInterface<" ) )); |
180 if ( aUuid == KPVUidVideoOutputInterface ) |
108 if ( aUuid == KPVUidVideoOutputInterface ) |
181 { |
109 { |
182 MPVVideoInput* interfaceP = (MPVVideoInput*) iVideoOutputInterface; |
110 MPVVideoInput* interfaceP = (MPVVideoInput*) this; |
183 aInterfacePtr = (TPVInterfacePtr) interfaceP; |
111 aInterfacePtr = (TPVInterfacePtr) interfaceP; |
184 } |
112 } |
185 else |
113 else |
186 { |
114 { |
187 aInterfacePtr = NULL; |
115 aInterfacePtr = NULL; |
188 } |
116 } |
189 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::QueryInterface aInterfacePtr %x>" ), aInterfacePtr )); |
117 __IF_DEBUG(Print( _L( "VTProto: CDisplaySinkProxy::QueryInterface aInterfacePtr %d>" ), aInterfacePtr )); |
190 } |
118 } |
191 |
119 |
192 // ----------------------------------------------------------------------------- |
120 // ----------------------------------------------------------------------------- |
193 // CDisplaySinkProxy::GetMultimediaTypesL |
121 // CDisplaySinkProxy::GetMultimediaTypesL |
194 // This API returns multimedias type supported by the data source/sink. |
122 // This API returns multimedias type supported by the data source/sink. |