|
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 MUSHENGCLIPSESSION_H |
|
20 #define MUSHENGCLIPSESSION_H |
|
21 |
|
22 // USER |
|
23 #include "musengmceoutsession.h" |
|
24 #include "musunittesting.h" |
|
25 |
|
26 class MMusEngClipSessionObserver; |
|
27 class CMusEngLiveSession; |
|
28 class CMceFileSource; |
|
29 class CMceAudioStream; |
|
30 class CMceVideoStream; |
|
31 class CMceAudioCodec; |
|
32 class CMusEngClipVideoPlayer; |
|
33 |
|
34 |
|
35 class CMusEngClipSession : public CMusEngMceOutSession |
|
36 { |
|
37 MUS_UNITTEST( UT_CMusEngClipSession ) |
|
38 MUS_UNITTEST( UT_CMusEngMceSession ) |
|
39 |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Constructor |
|
44 */ |
|
45 static CMusEngClipSession* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor |
|
49 */ |
|
50 ~CMusEngClipSession(); |
|
51 |
|
52 public: // from MLcSession |
|
53 |
|
54 MLcVideoPlayer* LocalVideoPlayer(); |
|
55 |
|
56 |
|
57 protected: // implementation of virtual helper from CMusEngMceOutSession |
|
58 |
|
59 /** |
|
60 * @param aLocalBundle All local streams are supposed to be added to |
|
61 * this bundle |
|
62 */ |
|
63 void CompleteSessionStructureL( CMceStreamBundle& aLocalBundle ); |
|
64 |
|
65 |
|
66 protected: // overrides function from CMusEngMceOutSession |
|
67 |
|
68 /** |
|
69 * Checks that there is no need for transcoding before calling |
|
70 * overridden base class variant of this function. |
|
71 */ |
|
72 void EstablishSessionL(); |
|
73 |
|
74 |
|
75 private: // from MMceStreamObserver, |
|
76 // overrides the function in CMusEngMceSession |
|
77 |
|
78 /** |
|
79 * The state of the stream has changed. |
|
80 * |
|
81 * @param aStream, the stream that has changed. |
|
82 */ |
|
83 void StreamStateChanged( CMceMediaStream& aStream ); |
|
84 |
|
85 /** |
|
86 * The state of the source has changed. |
|
87 * @param aStream, the stream that uses the source. |
|
88 * @param aSource, the source that has changed. |
|
89 */ |
|
90 void StreamStateChanged( CMceMediaStream& aStream, |
|
91 CMceMediaSource& aSource ); |
|
92 |
|
93 private: |
|
94 |
|
95 CMusEngClipSession(); |
|
96 |
|
97 void ConstructL(); |
|
98 |
|
99 |
|
100 private: // HELPERS |
|
101 |
|
102 void AddAmrCodecL( CMceAudioStream& aAudioStream ); |
|
103 |
|
104 void AddVideoCodecL( CMceVideoStream& aVideoStream ); |
|
105 |
|
106 void ConstructAudioStructureL( CMceStreamBundle& aLocalBundle ); |
|
107 |
|
108 void DetermineBufferingPeriod( CMceMediaStream& aStream ); |
|
109 |
|
110 private: // Data |
|
111 |
|
112 CMusEngClipVideoPlayer* iClipVideoPlayer; |
|
113 TTime iBufferingStartedTime; |
|
114 }; |
|
115 |
|
116 #endif // MUSHENGCLIPSESSION_H |
|
117 |