22 #include "mccanysink.h" |
22 #include "mccanysink.h" |
23 #include "mmccinterfacedef.h" |
23 #include "mmccinterfacedef.h" |
24 #include "mccanysourcesinklogs.h" |
24 #include "mccanysourcesinklogs.h" |
25 #include "mccinternalevents.h" |
25 #include "mccinternalevents.h" |
26 #include "mccinternaldef.h" |
26 #include "mccinternaldef.h" |
|
27 #include "mccdatasender.h" |
27 |
28 |
28 // CONSTANTS |
29 // CONSTANTS |
29 |
30 |
30 // ============================ MEMBER FUNCTIONS =============================== |
31 // ============================ MEMBER FUNCTIONS =============================== |
31 |
32 |
47 // ----------------------------------------------------------------------------- |
48 // ----------------------------------------------------------------------------- |
48 // |
49 // |
49 void CMccAnySink::ConstructSinkL( const TDesC8& /*aInitData*/ ) |
50 void CMccAnySink::ConstructSinkL( const TDesC8& /*aInitData*/ ) |
50 { |
51 { |
51 __ANYSOURCESINK_CONTROLL( "CMccAnySink::ConstructSinkL" ) |
52 __ANYSOURCESINK_CONTROLL( "CMccAnySink::ConstructSinkL" ) |
|
53 iDataSender = CMccDataSender::NewL(); |
52 } |
54 } |
53 |
55 |
54 // ----------------------------------------------------------------------------- |
56 // ----------------------------------------------------------------------------- |
55 // CMccAnySink::CMccAnySink |
57 // CMccAnySink::CMccAnySink |
56 // ----------------------------------------------------------------------------- |
58 // ----------------------------------------------------------------------------- |
64 // ----------------------------------------------------------------------------- |
66 // ----------------------------------------------------------------------------- |
65 // |
67 // |
66 CMccAnySink::~CMccAnySink() |
68 CMccAnySink::~CMccAnySink() |
67 { |
69 { |
68 __ANYSOURCESINK_CONTROLL( "CMccAnySink::~CMccAnySink" ) |
70 __ANYSOURCESINK_CONTROLL( "CMccAnySink::~CMccAnySink" ) |
|
71 delete iDataSender; |
69 } |
72 } |
70 |
73 |
71 // ----------------------------------------------------------------------------- |
74 // ----------------------------------------------------------------------------- |
72 // CMccAnySink::SinkPrimeL |
75 // CMccAnySink::SinkPrimeL |
73 // ----------------------------------------------------------------------------- |
76 // ----------------------------------------------------------------------------- |
214 |
217 |
215 // ----------------------------------------------------------------------------- |
218 // ----------------------------------------------------------------------------- |
216 // CMccAnySink::EmptyBufferL |
219 // CMccAnySink::EmptyBufferL |
217 // ----------------------------------------------------------------------------- |
220 // ----------------------------------------------------------------------------- |
218 // |
221 // |
219 void CMccAnySink::EmptyBufferL( CMMFBuffer* /*aBuffer*/, |
222 void CMccAnySink::EmptyBufferL( CMMFBuffer* aBuffer, |
220 MDataSource* /*aProvider*/, |
223 MDataSource* aProvider, |
221 TMediaId /*aMediaId*/ ) |
224 TMediaId /*aMediaId*/ ) |
222 { |
225 { |
223 __ANYSOURCESINK_CONTROLL( "CMccAnySink::EmptyBufferL" ) |
226 __ANYSOURCESINK_CONTROLL( "CMccAnySink::EmptyBufferL" ) |
224 |
227 __ASSERT_ALWAYS( aBuffer, User::Leave( KErrArgument ) ); |
225 User::Leave( KErrNotSupported ); |
228 __ASSERT_ALWAYS( aProvider, User::Leave( KErrArgument ) ); |
|
229 |
|
230 CMMFDataBuffer* dataBuffer = static_cast<CMMFDataBuffer*>( aBuffer ); |
|
231 const TDesC8& data = dataBuffer->Data(); |
|
232 iDataSender->Send( data ); |
|
233 aProvider->BufferEmptiedL( aBuffer ); |
226 } |
234 } |
227 |
235 |
228 // ----------------------------------------------------------------------------- |
236 // ----------------------------------------------------------------------------- |
229 // CMccAnySink::BufferFilledL |
237 // CMccAnySink::BufferFilledL |
230 // ----------------------------------------------------------------------------- |
238 // ----------------------------------------------------------------------------- |