author | vnuitven <> |
Mon, 06 Sep 2010 18:50:40 +0530 | |
branch | rcs |
changeset 50 | 1d8943dd8be6 |
parent 49 | 64c62431ac08 |
permissions | -rw-r--r-- |
49 | 1 |
/* |
50
1d8943dd8be6
changed copy right year to 2010 for all newly added files
vnuitven <>
parents:
49
diff
changeset
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
49 | 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 |
#ifndef MCEMESSAGECODEC_H |
|
21 |
#define MCEMESSAGECODEC_H |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include <e32base.h> |
|
25 |
#include <mcedefs.h> |
|
26 |
#include <mcecodec.h> |
|
27 |
||
28 |
// FORWARD DECLARATIONS |
|
29 |
class RReadStream; |
|
30 |
class RWriteStream; |
|
31 |
class CMceComMessageCodec; |
|
32 |
class CMceMediaStream; |
|
33 |
class TMceIds; |
|
34 |
class TMceEvent; |
|
35 |
class TMceMediaId; |
|
36 |
class TMceFactory; |
|
37 |
class TMceTextCodecFactory; |
|
38 |
class CMceCommessageCodec; |
|
39 |
||
40 |
// CLASS DECLARATION |
|
41 |
||
42 |
/** |
|
43 |
* Container class for message codecs. |
|
44 |
* |
|
45 |
* @lib mceclient.lib |
|
46 |
*/ |
|
47 |
class CMceMessageCodec : public CMceCodec |
|
48 |
{ |
|
49 |
public: // Constructors and destructor |
|
50 |
||
51 |
/** |
|
52 |
* Destructor. |
|
53 |
*/ |
|
54 |
virtual ~CMceMessageCodec(); |
|
55 |
||
56 |
public: // New functions |
|
57 |
||
58 |
/** |
|
59 |
* Enable / Disable Voice Activity Detection. |
|
60 |
* @param aEnableVAD, Boolean indicating whether to enable Voice Activity Detection |
|
61 |
* @return KErrNotSupported if codec doesn't support VAD; otherwise KErrNone. |
|
62 |
*/ |
|
63 |
virtual TInt EnableVAD(TBool aEnableVAD) = 0; |
|
64 |
||
65 |
/** |
|
66 |
* Sets the sampling frequency. |
|
67 |
* @param aSamplingFreq, Sampling frequency to be used |
|
68 |
* @return KErrNotSupported if codec doesn't support sampling frequency issued; otherwise KErrNone. |
|
69 |
*/ |
|
70 |
virtual TInt SetSamplingFreq(TUint aSamplingFreq) = 0; |
|
71 |
||
72 |
/** |
|
73 |
* Sets the packetization rate. |
|
74 |
* @param aPTime, Packetization rate, must be multiple of audio frame size. |
|
75 |
* @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone. |
|
76 |
*/ |
|
77 |
virtual TInt SetPTime(TUint aPTime) = 0; |
|
78 |
||
79 |
/** |
|
80 |
* Sets the maximum packetization rate. |
|
81 |
* @param aMaxPTime, maximum allowed packetization rate, must be multiple of audio frame size. |
|
82 |
* @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone. |
|
83 |
*/ |
|
84 |
virtual TInt SetMaxPTime(TUint aMaxPTime) = 0; |
|
85 |
||
86 |
/** |
|
87 |
* Clones codec, ownership is transferred. |
|
88 |
* @return cloned codec |
|
89 |
*/ |
|
90 |
virtual CMceMessageCodec* CloneL() const = 0; |
|
91 |
||
92 |
/** |
|
93 |
* Gets sampling frequency used currently. |
|
94 |
* @return Sampling frequency |
|
95 |
*/ |
|
96 |
virtual TUint SamplingFreq() const; |
|
97 |
||
98 |
/** |
|
99 |
* Get VAD status. |
|
100 |
* @return Boolean indicating is VAD activated |
|
101 |
*/ |
|
102 |
virtual TBool VAD() const; |
|
103 |
||
104 |
/** |
|
105 |
* Gets the packetization rate. |
|
106 |
* @return packetization rate. |
|
107 |
*/ |
|
108 |
virtual TUint PTime() const; |
|
109 |
||
110 |
/** |
|
111 |
* Gets max packetization rate. |
|
112 |
* @return Max packetization rate. |
|
113 |
*/ |
|
114 |
virtual TUint MaxPTime() const; |
|
115 |
||
116 |
public: |
|
117 |
||
118 |
/** |
|
119 |
* Initializes |
|
120 |
* @param aParent the parent |
|
121 |
*/ |
|
122 |
virtual void InitializeL( CMceMediaStream& aParent ); |
|
123 |
||
124 |
/** |
|
125 |
* Factory |
|
126 |
* @return factory |
|
127 |
*/ |
|
128 |
//static TMceMessageCodecFactory Factory(); |
|
129 |
||
130 |
protected: // New functions |
|
131 |
||
132 |
/** |
|
133 |
* C++ default constructor. |
|
134 |
*/ |
|
135 |
CMceMessageCodec(); |
|
136 |
||
137 |
/** |
|
138 |
* second-phase constructor |
|
139 |
* @paramaFlatData flat data container |
|
140 |
* @param aType type of sink |
|
141 |
*/ |
|
142 |
void ConstructL( CMceComMessageCodec* aFlatData ); |
|
143 |
||
144 |
||
145 |
//for testing |
|
146 |
||
147 |
MCE_UNIT_TEST_DEFS |
|
148 |
}; |
|
149 |
||
150 |
||
151 |
#endif |
|
152 |
||
153 |
// End of File |