1 /* |
|
2 * Copyright (c) 2005 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 // USER |
|
20 #include "musengtwowaysession.h" |
|
21 #include "lcsessionobserver.h" |
|
22 #include "musenglogger.h" |
|
23 #include "musengremotevideoplayer.h" |
|
24 #include "musenglivevideoplayer.h" |
|
25 #include "svptimer.h" |
|
26 |
|
27 |
|
28 const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold |
|
29 // Using following value increases treshold buffer to 1 second from |
|
30 // default 100 ms |
|
31 const TInt KMusEngJitterBufferTreshold = 50; |
|
32 |
|
33 const TUint32 KMusEngTwoWayReceivingActivityTimeout = 5000; // 5 seconds |
|
34 // 6 seconds keepalive timer, needs to be more than receiving timeout |
|
35 const TUint8 KMusEngTwoWayRtpKeepAliveTimer = 6; |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CMusEngTwoWaySession* CMusEngTwoWaySession::NewL() |
|
42 { |
|
43 CMusEngTwoWaySession* self = new( ELeave )CMusEngTwoWaySession(); |
|
44 CleanupStack::PushL( self ); |
|
45 self->ConstructL(); |
|
46 CleanupStack::Pop( self ); |
|
47 return self; |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 CMusEngTwoWaySession::~CMusEngTwoWaySession() |
|
55 { |
|
56 MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWaySession::~CMusEngTwoWaySession()" ) |
|
57 |
|
58 MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::~CMusEngTwoWaySession()" ) |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 void CMusEngTwoWaySession::EnableDisplayL( TBool aEnable ) |
|
66 { |
|
67 MUS_LOG1( "mus: [ENGINE] -> CMusEngTwoWaySession::EnableDisplayL() %d", |
|
68 aEnable ) |
|
69 |
|
70 MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::EnableDisplayL()") |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 void CMusEngTwoWaySession::SetOrientationL( TDisplayOrientation aOrientation ) |
|
78 { |
|
79 MUS_LOG1( "mus: [ENGINE] -> CMusEngTwoWaySession::SetOrientationL() %d", |
|
80 aOrientation ) |
|
81 |
|
82 |
|
83 MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::SetOrientationL()" ) |
|
84 } |
|
85 |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void CMusEngTwoWaySession::SetRectsL( |
|
92 const TRect& aRemoteRect, |
|
93 const TRect& aLocalRect ) |
|
94 { |
|
95 MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWaySession::SetRectsL()" ) |
|
96 |
|
97 MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::SetRectsL()" ) |
|
98 } |
|
99 |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 CMusEngTwoWaySession::CMusEngTwoWaySession() |
|
106 : CMusEngMceSession() |
|
107 { |
|
108 } |
|
109 |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 void CMusEngTwoWaySession::ConstructL() |
|
115 { |
|
116 MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWaySession::ConstructL()" ) |
|
117 |
|
118 CMusEngMceSession::ConstructL(); |
|
119 |
|
120 iRemoteVideoPlayer = CMusEngRemoteVideoPlayer::NewL( *this, *this ); |
|
121 |
|
122 MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::ConstructL()" ) |
|
123 } |
|
124 |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 void CMusEngTwoWaySession::EstablishLcSessionL() |
|
130 { |
|
131 MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWaySession::EstablishLcSessionL" ) |
|
132 |
|
133 iTimer = CSVPTimer::NewL( *this, 1 ); |
|
134 iTimer->SetTime(2000); |
|
135 |
|
136 MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::EstablishLcSessionL" ) |
|
137 } |
|
138 |
|
139 // ----------------------------------------------------------------------------- |
|
140 // |
|
141 // ----------------------------------------------------------------------------- |
|
142 // |
|
143 void CMusEngTwoWaySession::TerminateLcSessionL() |
|
144 { |
|
145 MUS_LOG( "mus: [ENGINE] -> CMusEngTwoWaySession::TerminateLcSessionL" ) |
|
146 |
|
147 MUS_LOG( "mus: [ENGINE] <- CMusEngTwoWaySession::TerminateLcSessionL" ) |
|
148 } |
|
149 |
|
150 // ----------------------------------------------------------------------------- |
|
151 // From MLcSession |
|
152 // ----------------------------------------------------------------------------- |
|
153 // |
|
154 MLcVideoPlayer* CMusEngTwoWaySession::RemoteVideoPlayer() |
|
155 { |
|
156 return iRemoteVideoPlayer; |
|
157 } |
|
158 |
|
159 // End of file |
|