|
1 /* |
|
2 * Copyright (c) 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 "VoIPJitterBufferIntfcImpl.h" |
|
22 |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // CVoIPJitterBufferIntfcImpl::NewL |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 CVoIPJitterBufferIntfcImpl* CVoIPJitterBufferIntfcImpl::NewL( |
|
29 RVoIPAudioSession* aVoIPAudioSession) |
|
30 { |
|
31 CVoIPJitterBufferIntfcImpl* self = |
|
32 new (ELeave) CVoIPJitterBufferIntfcImpl(); |
|
33 CleanupStack::PushL(self); |
|
34 self->ConstructL(aVoIPAudioSession); |
|
35 CleanupStack::Pop(self); |
|
36 return self; |
|
37 } |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // CVoIPJitterBufferIntfcImpl::~CVoIPJitterBufferIntfcImpl |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 CVoIPJitterBufferIntfcImpl::~CVoIPJitterBufferIntfcImpl() |
|
44 { |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 // CVoIPJitterBufferIntfcImpl::CVoIPJitterBufferIntfcImpl |
|
49 // --------------------------------------------------------------------------- |
|
50 // |
|
51 CVoIPJitterBufferIntfcImpl::CVoIPJitterBufferIntfcImpl() |
|
52 { |
|
53 } |
|
54 |
|
55 // --------------------------------------------------------------------------- |
|
56 // CVoIPJitterBufferIntfcImpl::ConstructL |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 void CVoIPJitterBufferIntfcImpl::ConstructL( |
|
60 RVoIPAudioSession* aVoIPAudioSession) |
|
61 { |
|
62 CVoIPJitterBufferIntfc::ConstructL(this); |
|
63 iVoIPAudioSession = aVoIPAudioSession; |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------------------------- |
|
67 // CVoIPJitterBufferIntfcImpl::SetObserver |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 TInt CVoIPJitterBufferIntfcImpl::SetObserver( |
|
71 MVoIPJitterBufferObserver& aObserver) |
|
72 { |
|
73 iObserver = &aObserver; |
|
74 return KErrNone; |
|
75 } |
|
76 |
|
77 // --------------------------------------------------------------------------- |
|
78 // CVoIPJitterBufferIntfcImpl::ConfigureJitterBuffer |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 TInt CVoIPJitterBufferIntfcImpl::ConfigureJitterBuffer( |
|
82 const TVoIPJBConfig& aJbConfig) |
|
83 { |
|
84 TInt err = iVoIPAudioSession->ConfigureJitterBuffer(aJbConfig); |
|
85 return err; |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------------------------- |
|
89 // CVoIPJitterBufferIntfcImpl::ResetJitterBuffer |
|
90 // --------------------------------------------------------------------------- |
|
91 // |
|
92 TInt CVoIPJitterBufferIntfcImpl::ResetJitterBuffer(TBool aPlayTone) |
|
93 { |
|
94 TInt err = iVoIPAudioSession->ResetJitterBuffer(aPlayTone); |
|
95 return err; |
|
96 } |
|
97 |
|
98 // --------------------------------------------------------------------------- |
|
99 // CVoIPJitterBufferIntfcImpl::DelayDown |
|
100 // --------------------------------------------------------------------------- |
|
101 // |
|
102 TInt CVoIPJitterBufferIntfcImpl::DelayDown() |
|
103 { |
|
104 TInt err = iVoIPAudioSession->DelayDown(); |
|
105 return err; |
|
106 } |
|
107 |
|
108 // --------------------------------------------------------------------------- |
|
109 // CVoIPJitterBufferIntfcImpl::DelayUp |
|
110 // --------------------------------------------------------------------------- |
|
111 // |
|
112 TInt CVoIPJitterBufferIntfcImpl::DelayUp() |
|
113 { |
|
114 TInt err = iVoIPAudioSession->DelayUp(); |
|
115 return err; |
|
116 } |
|
117 |
|
118 // --------------------------------------------------------------------------- |
|
119 // CVoIPJitterBufferIntfcImpl::SendEventToObserver |
|
120 // --------------------------------------------------------------------------- |
|
121 // |
|
122 void CVoIPJitterBufferIntfcImpl::SendEventToObserver(TInt aEvent) |
|
123 { |
|
124 iObserver->Event(*this, aEvent); |
|
125 } |
|
126 |
|
127 // End of file |