|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDES |
|
22 #include "createStartDMTDialog.h" |
|
23 #include "CMCETestUIEngineAudioStream.h" |
|
24 #include "CMCETestUIEngineSink.h" |
|
25 #include <MCEAudioStream.h> |
|
26 #include <MCERtpSink.h> |
|
27 #include <MCEMediaSink.h> |
|
28 #include <MCESpeakerSink.h> |
|
29 // CONSTANTS |
|
30 |
|
31 const TInt KBufLength = 100; |
|
32 |
|
33 // ============================ MEMBER FUNCTIONS ============================== |
|
34 |
|
35 // ---------------------------------------------------------------------------- |
|
36 // CCreateRtpSinkDialog::CCreateRtpSinkDialog( ) |
|
37 // . |
|
38 // ---------------------------------------------------------------------------- |
|
39 // |
|
40 CCreateRtpSinkDialog::CCreateRtpSinkDialog( |
|
41 CMCETestUIEngineAudioStream& aStream, TInt aIndex ) : |
|
42 iStream(aStream),iSinkIndex( aIndex ) |
|
43 { |
|
44 |
|
45 // No implementation required |
|
46 } |
|
47 |
|
48 // ---------------------------------------------------------------------------- |
|
49 // CCreateRtpSinkDialog::PreLayoutDynInitL() |
|
50 // . |
|
51 // ---------------------------------------------------------------------------- |
|
52 // |
|
53 void CCreateRtpSinkDialog::PreLayoutDynInitL() |
|
54 { |
|
55 const RPointerArray<CMCETestUIEngineSink>& sinks = |
|
56 iStream.SinksL(); |
|
57 |
|
58 CMceMediaSink& mediaSink = static_cast<CMceMediaSink&>(sinks[iSinkIndex]->Sink()); |
|
59 CMceRtpSink& rtpSink = static_cast<CMceRtpSink&>(mediaSink); |
|
60 |
|
61 CAknPopupFieldText* popupFieldText = |
|
62 static_cast <CAknPopupFieldText*> (Control(ERtpSinkSuppressRtcp)); |
|
63 |
|
64 if(rtpSink.IsEnabled()) |
|
65 { |
|
66 popupFieldText->SetCurrentValueIndex(0); |
|
67 } |
|
68 else |
|
69 { |
|
70 popupFieldText->SetCurrentValueIndex(1); |
|
71 } |
|
72 |
|
73 CAknForm::PreLayoutDynInitL(); |
|
74 } |
|
75 |
|
76 // ---------------------------------------------------------------------------- |
|
77 // CCreateAudioCodecDialog::OkToExitL( TInt ) |
|
78 // . |
|
79 // ---------------------------------------------------------------------------- |
|
80 // |
|
81 |
|
82 TBool CCreateRtpSinkDialog::OkToExitL( TInt aKey ) |
|
83 { |
|
84 if ( aKey == EEikCmdCanceled ) |
|
85 { |
|
86 // Cancel pressed. Just exit. |
|
87 return ETrue; |
|
88 } |
|
89 const RPointerArray<CMCETestUIEngineSink>& sinks = |
|
90 iStream.SinksL(); |
|
91 |
|
92 if(sinks[iSinkIndex]->Type() == KMceRTPSink) |
|
93 { |
|
94 CMceMediaSink& mediaSink = static_cast<CMceMediaSink&>(sinks[iSinkIndex]->Sink()); |
|
95 CMceRtpSink& rtpSink = static_cast<CMceRtpSink&>(mediaSink); |
|
96 CAknPopupFieldText* popupFieldText = |
|
97 static_cast <CAknPopupFieldText*> (Control(ERtpSinkSuppressRtcp)); |
|
98 |
|
99 if( popupFieldText->CurrentValueIndex() == 0) |
|
100 { |
|
101 rtpSink.EnableL(); |
|
102 } |
|
103 else |
|
104 { |
|
105 rtpSink.DisableL(); |
|
106 } |
|
107 } |
|
108 |
|
109 |
|
110 |
|
111 return ETrue; |
|
112 } |
|
113 |
|
114 // ---------------------------------------------------------------------------- |
|
115 // CCreateRtpSinkDialog::~CCreateRtpSinkDialog() |
|
116 // . |
|
117 // ---------------------------------------------------------------------------- |
|
118 // |
|
119 CCreateRtpSinkDialog::~CCreateRtpSinkDialog() |
|
120 { |
|
121 return; |
|
122 } |
|
123 |
|
124 // End of File |