0
|
1 |
// Copyright (c) 2006-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 |
@file
|
|
18 |
@internalComponent
|
|
19 |
*/
|
|
20 |
|
|
21 |
#include <omxinputport.h>
|
|
22 |
#include <mdf/mdfpuconfig.h>
|
|
23 |
|
|
24 |
#include "vorbisdecoderinputport.h"
|
|
25 |
#include "vorbisdecoderprocessingunit.h"
|
|
26 |
|
|
27 |
#include <e32debug.h>
|
|
28 |
|
|
29 |
// #define VORBISDECODERINPUTPORT_DEBUG 1
|
|
30 |
#if defined(VORBISDECODERINPUTPORT_DEBUG)
|
|
31 |
#define DEBUG_PRINT RDebug::Print
|
|
32 |
#else
|
|
33 |
#define DEBUG_PRINT
|
|
34 |
#endif
|
|
35 |
|
|
36 |
CVorbisDecoderInputPort* CVorbisDecoderInputPort::NewL(TInt aIndex, CVorbisDecoderProcessingUnit* aComponent)
|
|
37 |
{
|
|
38 |
CVorbisDecoderInputPort* self = new (ELeave) CVorbisDecoderInputPort;
|
|
39 |
CleanupStack::PushL (self);
|
|
40 |
self->ConstructL(aIndex, aComponent);
|
|
41 |
CleanupStack::Pop();
|
|
42 |
return self;
|
|
43 |
}
|
|
44 |
|
|
45 |
CVorbisDecoderInputPort::CVorbisDecoderInputPort()
|
|
46 |
{
|
|
47 |
}
|
|
48 |
|
|
49 |
TInt CVorbisDecoderInputPort::MipConfigure(const TPuConfig& aConfig)
|
|
50 |
{
|
|
51 |
if (aConfig.Uid() == TUid::Uid(KUidTTaskConfig))
|
|
52 |
{
|
|
53 |
// no configuration to be done for the decoder input port;
|
|
54 |
// the vorbis decoder will detect that the input buffer is vorbis
|
|
55 |
// format (or not).
|
|
56 |
return KErrNone;
|
|
57 |
}
|
|
58 |
return KErrNotSupported;
|
|
59 |
}
|
|
60 |
|
|
61 |
void CVorbisDecoderInputPort::MipInitialize()
|
|
62 |
{
|
|
63 |
COmxInputPort::MipInitialize();
|
|
64 |
OMX_VERSIONTYPE ver =
|
|
65 |
{
|
|
66 |
1,0
|
|
67 |
};
|
|
68 |
|
|
69 |
// Set Input Port (Vorbis)
|
|
70 |
OMX_AUDIO_PARAM_VORBISTYPE vorbis;
|
|
71 |
vorbis.nVersion = ver;
|
|
72 |
vorbis.nSize = sizeof(OMX_AUDIO_PARAM_VORBISTYPE);
|
|
73 |
vorbis.nPortIndex = KVorbisDecoderInputPortIndex;
|
|
74 |
|
|
75 |
Component()->OmxSetParameter(OMX_IndexParamAudioVorbis, &vorbis);
|
|
76 |
}
|