|
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 #ifndef MUSHENGTWOWAYRECVSESSION_H |
|
20 #define MUSHENGTWOWAYRECVSESSION_H |
|
21 |
|
22 // USER |
|
23 #include "musengreceivesession.h" |
|
24 #include "musunittesting.h" |
|
25 #include "mussettings.h" |
|
26 #include "musengcamerahandler.h" |
|
27 |
|
28 // SYSTEM |
|
29 #include <ecam.h> |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CMceDisplaySink; |
|
33 class CMceStreamBundle; |
|
34 class CMusEngLiveVideoPlayer; |
|
35 |
|
36 |
|
37 class CMusEngTwoWayRecvSession : public CMusEngReceiveSession |
|
38 { |
|
39 MUS_UNITTEST( UT_CMusEngTwoWayRecvSession ) |
|
40 |
|
41 |
|
42 public: |
|
43 /** |
|
44 * Creates new MultimediaSharing two-way receive session. |
|
45 * @return CMusEngTwoWayRecvSession* New instanse of specified class |
|
46 */ |
|
47 static CMusEngTwoWayRecvSession* NewL(); |
|
48 |
|
49 public: |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 ~CMusEngTwoWayRecvSession(); |
|
55 |
|
56 public: |
|
57 |
|
58 void EnableDisplayL( TBool aEnable ); |
|
59 |
|
60 TBool IsDisplayEnabled(); |
|
61 |
|
62 CMusEngMceSession::TDisplayOrientation OrientationL(); |
|
63 |
|
64 void SetOrientationL( TDisplayOrientation aOrientation ); |
|
65 |
|
66 public: |
|
67 |
|
68 /** |
|
69 * Sets both remote (receiving video) and local (viewfinder) rects. |
|
70 * |
|
71 */ |
|
72 void SetRectsL( const TRect& aRemoteRect, |
|
73 const TRect& aLocalRect ); |
|
74 |
|
75 /** |
|
76 * Gets camera handler (can be used for zooming etc.) |
|
77 */ |
|
78 TMusEngCameraHandler& Camera(); |
|
79 |
|
80 public: // from MLcSession |
|
81 |
|
82 MLcVideoPlayer* LocalVideoPlayer(); |
|
83 |
|
84 protected: // From CMusEngReceiveSession |
|
85 |
|
86 /** |
|
87 * Sets local rect (viewfinder). |
|
88 * |
|
89 */ |
|
90 void SetSecondaryRectL( const TRect& aSecondaryRect ); |
|
91 |
|
92 /** |
|
93 * Gets local rect (viewfinder). |
|
94 * |
|
95 */ |
|
96 TRect SecondaryRect() const; |
|
97 |
|
98 void CompleteSessionStructureL(); |
|
99 |
|
100 void RectChangedL(); |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * Constructor |
|
106 */ |
|
107 CMusEngTwoWayRecvSession(); |
|
108 |
|
109 /** |
|
110 * Second-phase constructor |
|
111 */ |
|
112 void ConstructL(); |
|
113 |
|
114 private: |
|
115 |
|
116 void CompleteSessionStructureAudioPartL( |
|
117 const RPointerArray<CMceMediaStream>& aStreams, |
|
118 CMceStreamBundle& aLocalBundle, |
|
119 CMceMediaStream* aVideoInStream, |
|
120 CMceMediaStream* aVideoOutStream ); |
|
121 |
|
122 void CompleteSessionStructureInStreamL( CMceMediaStream& aVideoInStream, |
|
123 CMceStreamBundle& aLocalBundle ); |
|
124 |
|
125 void CompleteSessionStructureOutStreamL( CMceMediaStream& aVideoOutStream ); |
|
126 |
|
127 |
|
128 private: |
|
129 |
|
130 TRect iLocalRect; |
|
131 |
|
132 TMusEngCameraHandler iCameraHandler; |
|
133 |
|
134 /// The live video player implementing MLcVideoPlayer |
|
135 CMusEngLiveVideoPlayer* iLiveVideoPlayer; |
|
136 |
|
137 TRect iSetRemoteRect; |
|
138 TRect iSetLocalRect; |
|
139 |
|
140 }; |
|
141 |
|
142 #endif |
|
143 |