|
1 /* |
|
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
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: VOIP Audio Services |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "VoIPAudioSession.h" |
|
21 #include "VoIPFormatIntfcImpl.h" |
|
22 |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // CVoIPFormatIntfcImpl::~CVoIPFormatIntfcImpl |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 CVoIPFormatIntfcImpl::~CVoIPFormatIntfcImpl() |
|
29 { |
|
30 } |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CVoIPFormatIntfcImpl::CVoIPFormatIntfcImpl |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 CVoIPFormatIntfcImpl::CVoIPFormatIntfcImpl() |
|
37 { |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // CVoIPFormatIntfcImpl::ConstructL |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 void CVoIPFormatIntfcImpl::ConstructL(RVoIPAudioSession* aVoIPAudioSession) |
|
45 { |
|
46 iVoIPAudioSession = aVoIPAudioSession; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CVoIPFormatIntfcImpl::SetObserver |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 TInt CVoIPFormatIntfcImpl::SetObserver(MVoIPFormatObserver& aObserver) |
|
54 { |
|
55 iObserver = &aObserver; |
|
56 return KErrNone; |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // CVoIPFormatIntfcImpl::GetSupportedBitRates |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 TInt CVoIPFormatIntfcImpl::GetSupportedBitRates(RArray<TUint>& aArray) |
|
64 { |
|
65 TRAPD(err, iVoIPAudioSession->GetSupportedBitRatesL(aArray)); |
|
66 return err; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CVoIPFormatIntfcImpl::SetBitRate |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 TInt CVoIPFormatIntfcImpl::SetBitRate(TUint aBitrate) |
|
74 { |
|
75 TInt err = iVoIPAudioSession->SetBitRate(aBitrate); |
|
76 return err; |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CVoIPFormatIntfcImpl::GetBitRate |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 TInt CVoIPFormatIntfcImpl::GetBitRate(TUint& aBitrate) |
|
84 { |
|
85 TInt err = iVoIPAudioSession->GetBitRate(aBitrate); |
|
86 return err; |
|
87 } |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CVoIPFormatIntfcImpl::SetVAD |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 TInt CVoIPFormatIntfcImpl::SetVAD(TBool aVad) |
|
94 { |
|
95 TInt err = iVoIPAudioSession->SetVAD(aVad); |
|
96 return err; |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // CVoIPFormatIntfcImpl::GetVAD |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 TInt CVoIPFormatIntfcImpl::GetVAD(TBool& aVad) |
|
104 { |
|
105 TInt err = iVoIPAudioSession->GetVAD(aVad); |
|
106 return err; |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CVoIPFormatIntfcImpl::FrameModeRequiredForErrorConcealment |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 TInt CVoIPFormatIntfcImpl::FrameModeRequiredForErrorConcealment(TBool& aMode) |
|
114 { |
|
115 TInt err = iVoIPAudioSession->FrameModeRequiredForEC(aMode); |
|
116 return err; |
|
117 } |
|
118 |
|
119 // ----------------------------------------------------------------------------- |
|
120 // CVoIPFormatIntfcImpl::SetFrameMode |
|
121 // ----------------------------------------------------------------------------- |
|
122 // |
|
123 TInt CVoIPFormatIntfcImpl::SetFrameMode(TBool aMode) |
|
124 { |
|
125 TInt err = iVoIPAudioSession->SetFrameMode(aMode); |
|
126 return err; |
|
127 } |
|
128 |
|
129 // ----------------------------------------------------------------------------- |
|
130 // CVoIPFormatIntfcImpl::GetFrameMode |
|
131 // ----------------------------------------------------------------------------- |
|
132 // |
|
133 TInt CVoIPFormatIntfcImpl::GetFrameMode(TBool& aMode) |
|
134 { |
|
135 TInt err = iVoIPAudioSession->GetFrameMode(aMode); |
|
136 return err; |
|
137 } |
|
138 |
|
139 // ----------------------------------------------------------------------------- |
|
140 // CVoIPFormatIntfcImpl::ConcealErrorForNextBuffer |
|
141 // ----------------------------------------------------------------------------- |
|
142 // |
|
143 TInt CVoIPFormatIntfcImpl::ConcealErrorForNextBuffer() |
|
144 { |
|
145 TInt err = iVoIPAudioSession->ConcealErrorForNextBuffer(); |
|
146 return err; |
|
147 } |
|
148 |
|
149 // End of file |