1 /* |
1 /* |
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: VOIP Audio Services |
14 * Description: VOIP Audio Services |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 |
17 |
19 #include "VoIPAudioSession.h" |
18 #include "VoIPAudioSession.h" |
20 #include "VoIPUplinkStreamImpl.h" |
19 #include "VoIPUplinkStreamImpl.h" |
21 #include "VoIPG711EncoderIntfcImpl.h" |
20 #include "VoIPG711EncoderIntfcImpl.h" |
22 |
|
23 |
21 |
24 // --------------------------------------------------------------------------- |
22 // --------------------------------------------------------------------------- |
25 // CVoIPG711EncoderIntfcImpl::NewL |
23 // CVoIPG711EncoderIntfcImpl::NewL |
26 // --------------------------------------------------------------------------- |
24 // --------------------------------------------------------------------------- |
27 // |
25 // |
28 CVoIPG711EncoderIntfcImpl* CVoIPG711EncoderIntfcImpl::NewL( |
26 CVoIPG711EncoderIntfcImpl* CVoIPG711EncoderIntfcImpl::NewL( |
29 CVoIPAudioUplinkStreamImpl* aUpLinkStreamImpl) |
27 CVoIPAudioUplinkStreamImpl* aUpLinkStreamImpl) |
30 { |
28 { |
31 CVoIPG711EncoderIntfcImpl* self = new (ELeave) CVoIPG711EncoderIntfcImpl(); |
29 CVoIPG711EncoderIntfcImpl* self = |
|
30 new (ELeave) CVoIPG711EncoderIntfcImpl(); |
32 CleanupStack::PushL(self); |
31 CleanupStack::PushL(self); |
33 self->ConstructL(aUpLinkStreamImpl); |
32 self->ConstructL(aUpLinkStreamImpl); |
34 CleanupStack::Pop(self); |
33 CleanupStack::Pop(self); |
35 return self; |
34 return self; |
36 } |
35 } |
54 // --------------------------------------------------------------------------- |
53 // --------------------------------------------------------------------------- |
55 // CVoIPG711EncoderIntfcImpl::ConstructL |
54 // CVoIPG711EncoderIntfcImpl::ConstructL |
56 // --------------------------------------------------------------------------- |
55 // --------------------------------------------------------------------------- |
57 // |
56 // |
58 void CVoIPG711EncoderIntfcImpl::ConstructL( |
57 void CVoIPG711EncoderIntfcImpl::ConstructL( |
59 CVoIPAudioUplinkStreamImpl* aUpLinkStreamImpl) |
58 CVoIPAudioUplinkStreamImpl* aUpLinkStreamImpl) |
60 { |
59 { |
61 iVoIPAudioSession = aUpLinkStreamImpl->GetSession(); |
60 iVoIPAudioSession = aUpLinkStreamImpl->GetSession(); |
62 CVoIPFormatIntfcImpl::ConstructL(iVoIPAudioSession); |
61 CVoIPFormatIntfcImpl::ConstructL(iVoIPAudioSession); |
63 CVoIPG711EncoderIntfc::ConstructL(this); |
62 CVoIPG711EncoderIntfc::ConstructL(this); |
64 } |
63 } |
66 // --------------------------------------------------------------------------- |
65 // --------------------------------------------------------------------------- |
67 // CVoIPG711EncoderIntfcImpl::SetMode |
66 // CVoIPG711EncoderIntfcImpl::SetMode |
68 // --------------------------------------------------------------------------- |
67 // --------------------------------------------------------------------------- |
69 // |
68 // |
70 TInt CVoIPG711EncoderIntfcImpl::SetMode( |
69 TInt CVoIPG711EncoderIntfcImpl::SetMode( |
71 CVoIPFormatIntfc::TG711CodecMode aMode) |
70 CVoIPFormatIntfc::TG711CodecMode aMode) |
72 { |
71 { |
73 TInt err = iVoIPAudioSession->SetMode(aMode); |
72 TInt err = iVoIPAudioSession->SetMode(aMode); |
74 return err; |
73 return err; |
75 } |
74 } |
76 |
75 |
77 // --------------------------------------------------------------------------- |
76 // --------------------------------------------------------------------------- |
78 // CVoIPG711EncoderIntfcImpl::GetMode |
77 // CVoIPG711EncoderIntfcImpl::GetMode |
79 // --------------------------------------------------------------------------- |
78 // --------------------------------------------------------------------------- |
80 // |
79 // |
81 TInt CVoIPG711EncoderIntfcImpl::GetMode( |
80 TInt CVoIPG711EncoderIntfcImpl::GetMode( |
82 CVoIPFormatIntfc::TG711CodecMode& aMode) |
81 CVoIPFormatIntfc::TG711CodecMode& aMode) |
83 { |
82 { |
84 TInt err = iVoIPAudioSession->GetMode(aMode); |
83 TInt err = iVoIPAudioSession->GetMode(aMode); |
85 return err; |
84 return err; |
86 } |
85 } |
87 |
86 |
88 |
|
89 // End of file |
87 // End of file |