Update contrib.
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef BUFFERSOURCE_H
20 #define BUFFERSOURCE_H
24 #include <a3f/mbuffersource.h>
26 #include "moutputport.h"
27 #include "mstreambuffercontrol.h"
29 #include <a3f/a3f_trace_utils.h>
33 // This is the implementation of CAudioSource API.
35 // @see CAudioComponent.
37 NONSHARABLE_CLASS(CBufferSource) : public CActive,
38 public MMMFBufferSource, // A3F interface
39 public MOutputPort // Adaptation interface
44 IMPORT_C static CBufferSource* NewL();
48 // Deletes all objects and releases all resource owned by this instance.
50 virtual ~CBufferSource();
52 // from MMMFBufferSource
53 TInt SetDataSupplier(MMMFAudioDataSupplier& aSupplier);
54 TInt BufferFilled(CMMFBuffer* aBuffer);
55 TInt BuffersDiscarded();
57 // from class MOutputPort
58 TInt GetOutputPort(MOutputPort*& aOutputPort);
59 TInt FillBuffer(CMMFBuffer* aBuffer, MInputPort* aConsumer);
60 TInt BufferEmptied(CMMFBuffer* aBuffer);
61 TInt SetInput(MInputPort* aInput);
62 TInt RemoveInput(MInputPort* aInput);
63 TInt FlushBuffer(MFlushHandlerObserver* aFlushObserver);
75 MFlushHandlerObserver* iObserver;
77 MMMFAudioDataSupplier* iSupplier;
84 #endif // BUFFERSOURCE_H