author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 12:09:15 +0300 | |
branch | RCL_3 |
changeset 38 | ac48f0cc9f9c |
parent 33 | bc78a40cd63c |
child 41 | 755f0370535b |
permissions | -rw-r--r-- |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
// INTERNAL INCLUDES |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include "ut_musengClipsession.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include "musengstubs.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include "musengtestdefs.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include "musengclipsession.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include "mussipprofilehandler.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include "musengmceutils.h" |
33 | 26 |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
// SYSTEM INCLUDES |
33 | 29 |
#include <digia/eunit/eunitmacros.h> |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
#include <mceoutsession.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
#include <mcestreambundle.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
#include <mcevideostream.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
#include <mceaudiostream.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
#include <mcefilesource.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
#include <mcertpsink.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
#include <mcedisplaysink.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
#include <mcespeakersink.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
#include <mcertpsource.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
#include <mcevideocodec.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
#include <mceamrcodec.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
#include <drmcommon.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
#include <sipprofile.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
#include <sipstrings.h> |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
UT_CMusEngClipSession* UT_CMusEngClipSession::NewL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
UT_CMusEngClipSession* self = UT_CMusEngClipSession::NewLC(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
CleanupStack::Pop( self ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
return self; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
UT_CMusEngClipSession* UT_CMusEngClipSession::NewLC() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
UT_CMusEngClipSession* self = new( ELeave ) UT_CMusEngClipSession(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
CleanupStack::PushL( self ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
self->ConstructL(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
return self; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
UT_CMusEngClipSession::~UT_CMusEngClipSession() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
76 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
// NOP |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
// Default constructor |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
UT_CMusEngClipSession::UT_CMusEngClipSession() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
// NOP |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
// Second phase construct |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
void UT_CMusEngClipSession::ConstructL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
// The ConstructL from the base class CEUnitTestSuiteClass must be called. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
// It generates the test case table. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
CEUnitTestSuiteClass::ConstructL(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
void UT_CMusEngClipSession::SetupL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
{ |
33 | 109 |
iObserver = new( ELeave ) CMusEngObserverStub; |
110 |
iClipSession = CMusEngClipSession::NewL( TRect(0,0, 100,100), |
|
111 |
*iObserver, |
|
112 |
*iObserver, |
|
113 |
*iObserver ); |
|
114 |
iClipSession->SetClipL( KTestVideoFileName ); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
iClipSession->iVideoCodecList = KMceSDPNameH264().AllocL(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
SIPStrings::OpenL(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
|
33 | 120 |
// ----------------------------------------------------------------------------- |
121 |
// |
|
122 |
// ----------------------------------------------------------------------------- |
|
123 |
// |
|
124 |
void UT_CMusEngClipSession::Setup2L() |
|
125 |
{ |
|
126 |
iObserver = new( ELeave ) CMusEngObserverStub; |
|
127 |
iClipSession = CMusEngClipSession::NewL( TRect(0,0, 100,100), |
|
128 |
*iObserver, |
|
129 |
*iObserver, |
|
130 |
*iObserver ); |
|
131 |
iClipSession->SetClipL( KTestVideoFileName ); |
|
132 |
iClipSession->iVideoCodecList = KMceSDPNameH263().AllocL(); |
|
133 |
||
134 |
SIPStrings::OpenL(); |
|
135 |
} |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
void UT_CMusEngClipSession::Teardown() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
SIPStrings::Close(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
delete iClipSession; |
33 | 145 |
delete iObserver; |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
// TEST CASES |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
|
33 | 152 |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
void UT_CMusEngClipSession::UT_NewLL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
EUNIT_ASSERT( iClipSession ) |
33 | 160 |
EUNIT_ASSERT( iClipSession->iFileName != KNullDesC() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
161 |
EUNIT_ASSERT( !iClipSession->iSession ) |
33 | 162 |
} |
163 |
||
164 |
||
165 |
// ----------------------------------------------------------------------------- |
|
166 |
// |
|
167 |
// ----------------------------------------------------------------------------- |
|
168 |
// |
|
169 |
void UT_CMusEngClipSession::UT_SetClipLL() |
|
170 |
{ |
|
171 |
// Try with protected file, cannot use EUNIT_ASSERT_SPECIFIC_LEAVE |
|
172 |
TRAPD( error, iClipSession->SetClipL( KMusDrmProtectedFileName() ) ) |
|
173 |
MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
|
174 |
EUNIT_ASSERT( error == KErrPermissionDenied ) |
|
175 |
EUNIT_ASSERT_EQUALS( iClipSession->iFileName, KTestVideoFileName() ) |
|
176 |
||
177 |
// Change the file before session is established |
|
178 |
iClipSession->SetClipL( KTestAvcVideoFileName() ); |
|
179 |
EUNIT_ASSERT_EQUALS( iClipSession->iFileName, KTestAvcVideoFileName() ) |
|
180 |
EUNIT_ASSERT( !iClipSession->iSession ) |
|
181 |
||
182 |
// simulate session establishment |
|
183 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
184 |
||
185 |
// Now test with established session |
|
186 |
iClipSession->SetClipL( KTestVideoFileName() ); |
|
187 |
||
188 |
CMceFileSource* file = |
|
189 |
MusEngMceUtils::GetFileSourceL( *iClipSession->iSession ); |
|
190 |
||
191 |
EUNIT_ASSERT_EQUALS( iClipSession->iFileName, KTestVideoFileName() ) |
|
192 |
EUNIT_ASSERT_EQUALS( file->iFileName, KTestVideoFileName() ) |
|
193 |
||
194 |
||
195 |
} |
|
196 |
||
197 |
||
198 |
// ----------------------------------------------------------------------------- |
|
199 |
// |
|
200 |
// ----------------------------------------------------------------------------- |
|
201 |
// |
|
202 |
void UT_CMusEngClipSession::UT_FastForwardLL() |
|
203 |
{ |
|
204 |
// Try before establishment |
|
205 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->FastForwardL( ETrue ), |
|
206 |
KErrNotReady ) |
|
207 |
||
208 |
// Establish session, simulate position and duration and try again |
|
209 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
210 |
||
211 |
CMceFileSource* file = |
|
212 |
MusEngMceUtils::GetFileSourceL( *iClipSession->iSession ); |
|
213 |
||
214 |
file->iDuration = KMusEngTestFileDuration; |
|
215 |
file->iPosition = KMusEngTestFilePosition; |
|
216 |
||
217 |
iClipSession->FastForwardL( ETrue ); |
|
218 |
||
219 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
220 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() > 0 ) |
|
221 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) |
|
222 |
||
223 |
// Simulate fastforwarding for a while |
|
224 |
User::After( 1000 ); |
|
225 |
||
226 |
// Try to fastforward when already fastforwarding, will be ignored |
|
227 |
iClipSession->FastForwardL( ETrue ); |
|
228 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
229 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() > 0 ) |
|
230 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) |
|
231 |
||
232 |
// Stop fastforwarding |
|
233 |
iClipSession->FastForwardL( EFalse ); |
|
234 |
EUNIT_ASSERT( file->iPosition > KMusEngTestFilePosition ) |
|
235 |
EUNIT_ASSERT( file->iPosition != file->iDuration ) |
|
236 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
237 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 ) |
|
238 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) |
|
239 |
||
240 |
// Try to stop fastforwarding again, leaves |
|
241 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->FastForwardL( EFalse ), |
|
242 |
KErrAlreadyExists ) |
|
243 |
||
244 |
// Start fastrewinding |
|
245 |
iClipSession->FastRewindL( ETrue ); |
|
246 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
247 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 ) |
|
248 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() > 0 ) |
|
249 |
||
250 |
// Start fastforwarding, rewinding should be stopped and FFWD started |
|
251 |
iClipSession->FastForwardL( ETrue ); |
|
252 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
253 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() > 0 ) |
|
254 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) |
|
255 |
||
256 |
// Simulate fastforwarding for a while |
|
257 |
User::After( 1000 ); |
|
258 |
||
259 |
// Simulate that clip is almost in end and fastforwarding would have |
|
260 |
// continued over end, position should be set to duration. |
|
261 |
||
262 |
file->iPosition = TTimeIntervalMicroSeconds( file->iDuration.Int64() - 1 ); |
|
263 |
||
264 |
iClipSession->FastForwardL( EFalse ); |
|
265 |
EUNIT_ASSERT( file->iPosition == file->iDuration ) |
|
266 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
267 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 ) |
|
268 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) |
|
269 |
||
270 |
} |
|
271 |
||
272 |
||
273 |
// ----------------------------------------------------------------------------- |
|
274 |
// |
|
275 |
// ----------------------------------------------------------------------------- |
|
276 |
// |
|
277 |
void UT_CMusEngClipSession::UT_FastRewindLL() |
|
278 |
{ |
|
279 |
// Try before establishment |
|
280 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->FastRewindL( ETrue ), |
|
281 |
KErrNotReady ) |
|
282 |
||
283 |
// Establish session, simulate position and duration and try again |
|
284 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
285 |
||
286 |
CMceFileSource* file = |
|
287 |
MusEngMceUtils::GetFileSourceL( *iClipSession->iSession ); |
|
288 |
||
289 |
file->iDuration = KMusEngTestFileDuration; |
|
290 |
file->iPosition = KMusEngTestFilePosition; |
|
291 |
||
292 |
iClipSession->FastRewindL( ETrue ); |
|
293 |
||
294 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
295 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 ) |
|
296 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() > 0 ) |
|
297 |
||
298 |
// Simulate fastrewinding for a while |
|
299 |
User::After( 1000 ); |
|
300 |
||
301 |
// Try to fastrewind when already fastrewinding, will be ignored |
|
302 |
iClipSession->FastRewindL( ETrue ); |
|
303 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
304 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 ) |
|
305 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() > 0 ) |
|
306 |
||
307 |
// Stop fastrewinding |
|
308 |
iClipSession->FastRewindL( EFalse ); |
|
309 |
EUNIT_ASSERT( file->iPosition < KMusEngTestFilePosition ) |
|
310 |
EUNIT_ASSERT( file->iPosition != TTimeIntervalMicroSeconds( 0 ) ) |
|
311 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
312 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 ) |
|
313 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) |
|
314 |
||
315 |
// Try to stop fastrewinding again, leaves |
|
316 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->FastRewindL( EFalse ), |
|
317 |
KErrAlreadyExists ) |
|
318 |
||
319 |
// Start fastforwarding |
|
320 |
iClipSession->FastForwardL( ETrue ); |
|
321 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
322 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() >= 0 ) |
|
323 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) |
|
324 |
||
325 |
// Start fastrewinding, forwarding should be stopped and FFWD started |
|
326 |
iClipSession->FastRewindL( ETrue ); |
|
327 |
EUNIT_ASSERT( !file->iIsEnabled ); |
|
328 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 ) |
|
329 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() >= 0 ) |
|
330 |
||
331 |
// Simulate that clip has just begun and fastrewinding would have |
|
332 |
// continued over beginning, position should be set to zero. |
|
333 |
||
334 |
file->iPosition = TTimeIntervalMicroSeconds( 1 ); |
|
335 |
||
336 |
// Simulate fastrewinding for a while |
|
337 |
User::After( 1000 ); |
|
338 |
||
339 |
iClipSession->FastRewindL( EFalse ); |
|
340 |
EUNIT_ASSERT( file->iPosition == TTimeIntervalMicroSeconds( 0 ) ) |
|
341 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
342 |
EUNIT_ASSERT( iClipSession->iFFWDStartTime.Int64() == 0 ) |
|
343 |
EUNIT_ASSERT( iClipSession->iFRWDStartTime.Int64() == 0 ) |
|
344 |
} |
|
345 |
||
346 |
||
347 |
// ----------------------------------------------------------------------------- |
|
348 |
// |
|
349 |
// ----------------------------------------------------------------------------- |
|
350 |
// |
|
351 |
void UT_CMusEngClipSession::UT_PositionLL() |
|
352 |
{ |
|
353 |
// Try before establishment |
|
354 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PositionL(), KErrNotReady ) |
|
355 |
||
356 |
// Establish session and try again |
|
357 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
358 |
||
359 |
CMceFileSource* file = |
|
360 |
MusEngMceUtils::GetFileSourceL( *iClipSession->iSession ); |
|
361 |
file->iPosition = 2000000; |
|
362 |
||
363 |
EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == |
|
364 |
file->iPosition.Int64() ) |
|
365 |
||
366 |
// Ask position while fastforwarding, it should be bigger than real position |
|
367 |
iClipSession->FastForwardL( ETrue ); |
|
368 |
||
369 |
User::After( 1000000 ); // We have to wait since dividing in PositionL and |
|
370 |
// multiplying before comparison loses difference |
|
371 |
||
372 |
EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 > |
|
373 |
file->iPosition.Int64() ) |
|
374 |
||
375 |
// Ask position while fastforwarding beyond end of clip, clip duration is |
|
376 |
// returned |
|
377 |
file->iPosition = file->iDuration; |
|
378 |
||
379 |
EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == |
|
380 |
file->iDuration.Int64() ) |
|
381 |
||
382 |
// Stop fastforwarding, start fastrewinding, position is set to the end clip |
|
383 |
iClipSession->FastForwardL( EFalse ); |
|
384 |
iClipSession->FastRewindL( ETrue ); |
|
385 |
||
386 |
User::After( 1000000 ); // We have to wait since dividing in PositionL and |
|
387 |
// multiplying before comparison loses difference |
|
388 |
||
389 |
// Ask position while fastrewinding, it should be smaller than real |
|
390 |
// position |
|
391 |
EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 < |
|
392 |
file->iPosition.Int64() ) |
|
393 |
||
394 |
// Ask position while fastrewinding beyond the beginning of clip, zero |
|
395 |
// returned |
|
396 |
file->iPosition = 0; |
|
397 |
||
398 |
EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 0 ) |
|
399 |
||
400 |
// Asking position when rewinded to beginning but rewinding has ended |
|
401 |
// and clip has not ended (position should not be altered in that case) |
|
402 |
iClipSession->iRewindedToBeginning = ETrue; |
|
403 |
file->iPosition = 0; |
|
404 |
iClipSession->iFRWDStartTime = TTime( 0 ); |
|
405 |
||
406 |
EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 0 ) |
|
407 |
||
408 |
// Position has proceeded from beginning, rewinding to beginning info |
|
409 |
// is cleared. |
|
410 |
file->iPosition = 10000000; |
|
411 |
iClipSession->iFRWDStartTime = TTime( 0 ); |
|
412 |
iClipSession->iRewindedToBeginning = EFalse; |
|
413 |
EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 10000000 ) |
|
414 |
EUNIT_ASSERT( iClipSession->iRewindedToBeginning == EFalse ) |
|
415 |
} |
|
416 |
||
417 |
||
418 |
// ----------------------------------------------------------------------------- |
|
419 |
// |
|
420 |
// ----------------------------------------------------------------------------- |
|
421 |
// |
|
422 |
void UT_CMusEngClipSession::UT_DurationLL() |
|
423 |
{ |
|
424 |
// Try before establishment |
|
425 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->DurationL(), KErrNotReady ) |
|
426 |
||
427 |
// Establish session and try again |
|
428 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
429 |
||
430 |
CMceFileSource* file = |
|
431 |
MusEngMceUtils::GetFileSourceL( *iClipSession->iSession ); |
|
432 |
file->iDuration = 2000000; |
|
433 |
||
434 |
EUNIT_ASSERT( iClipSession->DurationL().Int() * 1000000 == |
|
435 |
file->iDuration.Int64() ) |
|
436 |
} |
|
437 |
||
438 |
||
439 |
// ----------------------------------------------------------------------------- |
|
440 |
// |
|
441 |
// ----------------------------------------------------------------------------- |
|
442 |
// |
|
443 |
void UT_CMusEngClipSession::UT_SetPositionLL() |
|
444 |
{ |
|
445 |
TTimeIntervalSeconds time( 20 ); |
|
446 |
||
447 |
// Try before establishment |
|
448 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->SetPositionL( time ), |
|
449 |
KErrNotReady ) |
|
450 |
||
451 |
// Normal case with already disabled file source |
|
452 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
453 |
||
454 |
CMceFileSource* file = |
|
455 |
MusEngMceUtils::GetFileSourceL( *iClipSession->iSession ); |
|
456 |
file->iIsEnabled = EFalse; |
|
457 |
||
458 |
iClipSession->SetPositionL( time ); |
|
459 |
||
460 |
EUNIT_ASSERT( file->iPosition.Int64() == |
|
461 |
static_cast<TInt64>(time.Int()) * 1000000 ) |
|
462 |
EUNIT_ASSERT( !file->iIsEnabled ) |
|
463 |
||
464 |
// Normal case with enabled file source |
|
465 |
TTimeIntervalSeconds anotherTime( 30 ); |
|
466 |
||
467 |
file->iIsEnabled = ETrue; |
|
468 |
iClipSession->SetPositionL( anotherTime ); |
|
469 |
||
470 |
EUNIT_ASSERT( file->iPosition.Int64() == |
|
471 |
static_cast<TInt64>(anotherTime.Int()) * 1000000 ) |
|
472 |
EUNIT_ASSERT( file->iIsEnabled ) |
|
473 |
} |
|
474 |
||
475 |
||
476 |
// ----------------------------------------------------------------------------- |
|
477 |
// |
|
478 |
// ----------------------------------------------------------------------------- |
|
479 |
// |
|
480 |
void UT_CMusEngClipSession::UT_TranscodeLToAvcL() |
|
481 |
{ |
|
482 |
// Check that transcoding is not possible before invite |
|
483 |
EUNIT_ASSERT_SPECIFIC_LEAVE( |
|
484 |
iClipSession->TranscodeL( KTestVideoFileName() ), |
|
485 |
KErrNotReady ) |
|
486 |
||
487 |
// Construct session with video and audio streams that must transcoded |
|
488 |
||
489 |
CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile(); |
|
490 |
||
491 |
iClipSession->iSession = CMceOutSession::NewL( |
|
492 |
*(iClipSession->iManager), |
|
493 |
*profile, |
|
494 |
KTestRecipientSipUri8() ); |
|
495 |
||
496 |
CMceVideoStream* videoStream = CMceVideoStream::NewLC(); |
|
497 |
||
498 |
CMceRtpSink* rtpsink = CMceRtpSink::NewLC(); |
|
499 |
videoStream->AddSinkL( rtpsink ); |
|
500 |
CleanupStack::Pop( rtpsink ); |
|
501 |
||
502 |
CMceFileSource* fileSource = |
|
503 |
CMceFileSource::NewLC( *iClipSession->iManager, KTestAvcVideoFileName() ); |
|
504 |
videoStream->SetSourceL( fileSource ); |
|
505 |
CleanupStack::Pop( fileSource ); |
|
506 |
||
507 |
iClipSession->iSession->AddStreamL( videoStream ); |
|
508 |
CleanupStack::Pop( videoStream ); |
|
509 |
||
510 |
CMceAudioStream* audioStream = CMceAudioStream::NewLC(); |
|
511 |
||
512 |
audioStream->AddSinkL( CMceRtpSink::NewLC() ); |
|
513 |
CleanupStack::Pop(); |
|
514 |
||
515 |
audioStream->SetSourceL( fileSource ); |
|
516 |
||
517 |
iClipSession->iSession->AddStreamL( audioStream ); |
|
518 |
CleanupStack::Pop( audioStream ); |
|
519 |
||
520 |
videoStream->iState = CMceMediaStream::ETranscodingRequired; |
|
521 |
audioStream->iState = CMceMediaStream::ETranscodingRequired; |
|
522 |
||
523 |
// Remove all codecs (file has some unknown codec type) |
|
524 |
RPointerArray<CMceVideoCodec> videoCodecs = videoStream->Codecs(); |
|
525 |
for ( TInt i = 0; i < videoCodecs.Count(); i++ ) |
|
526 |
{ |
|
527 |
videoStream->RemoveCodecL( *videoCodecs[ i ] ); |
|
528 |
} |
|
529 |
RPointerArray<CMceVideoCodec> videoCodecs2 = videoStream->Codecs(); |
|
530 |
EUNIT_ASSERT_EQUALS( videoCodecs2.Count(), 0 ) |
|
531 |
EUNIT_ASSERT( audioStream->Codecs().Count() > 1 ) |
|
532 |
||
533 |
// Add some stream which must not be transcoded |
|
534 |
||
535 |
CMceAudioStream* inStream = CMceAudioStream::NewLC(); |
|
536 |
||
537 |
inStream->AddSinkL( CMceSpeakerSink::NewLC() ); |
|
538 |
CleanupStack::Pop(); |
|
539 |
||
540 |
inStream->SetSourceL( CMceRtpSource::NewLC() ); |
|
541 |
CleanupStack::Pop(); |
|
542 |
||
543 |
iClipSession->iSession->AddStreamL( inStream ); |
|
544 |
CleanupStack::Pop( inStream ); |
|
545 |
||
546 |
// Transcode |
|
547 |
iClipSession->TranscodeL( KTestAvcVideoFileName() ); |
|
548 |
||
549 |
// Check that transcoding has begun (transcoding to AVC as we know |
|
550 |
// that other end supports it |
|
551 |
EUNIT_ASSERT( iClipSession->iTranscodingOngoing ) |
|
552 |
EUNIT_ASSERT( videoStream->State() == CMceMediaStream::ETranscoding ) |
|
553 |
EUNIT_ASSERT( audioStream->State() == CMceMediaStream::ETranscoding ) |
|
554 |
EUNIT_ASSERT( inStream->State() != CMceMediaStream::ETranscoding ) |
|
555 |
||
556 |
// Check that codecs have been replaced |
|
557 |
const RPointerArray<CMceVideoCodec> videoCodecs3 = videoStream->Codecs(); |
|
558 |
EUNIT_ASSERT_EQUALS( videoCodecs3.Count(), 1 ) |
|
559 |
EUNIT_ASSERT( videoCodecs3[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 ) |
|
560 |
EUNIT_ASSERT( audioStream->Codecs().Count() == 1 ) |
|
561 |
EUNIT_ASSERT( audioStream->Codecs()[0]->AllowedBitrates() == |
|
562 |
KMceAllowedAmrNbBitrate475 ) |
|
563 |
} |
|
564 |
||
565 |
// ----------------------------------------------------------------------------- |
|
566 |
// |
|
567 |
// ----------------------------------------------------------------------------- |
|
568 |
// |
|
569 |
void UT_CMusEngClipSession::UT_TranscodeLToH263L() |
|
570 |
{ |
|
571 |
// Check that transcoding is not possible before invite |
|
572 |
EUNIT_ASSERT_SPECIFIC_LEAVE( |
|
573 |
iClipSession->TranscodeL( KTestVideoFileName() ), |
|
574 |
KErrNotReady ) |
|
575 |
||
576 |
// Construct session with video and audio streams that must transcoded |
|
577 |
||
578 |
CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile(); |
|
579 |
||
580 |
iClipSession->iSession = CMceOutSession::NewL( |
|
581 |
*(iClipSession->iManager), |
|
582 |
*profile, |
|
583 |
KTestRecipientSipUri8() ); |
|
584 |
||
585 |
CMceVideoStream* videoStream = CMceVideoStream::NewLC(); |
|
586 |
||
587 |
CMceRtpSink* rtpsink = CMceRtpSink::NewLC(); |
|
588 |
videoStream->AddSinkL( rtpsink ); |
|
589 |
CleanupStack::Pop( rtpsink ); |
|
590 |
||
591 |
CMceFileSource* fileSource = |
|
592 |
CMceFileSource::NewLC( *iClipSession->iManager, KTestAvcVideoFileName() ); |
|
593 |
videoStream->SetSourceL( fileSource ); |
|
594 |
CleanupStack::Pop( fileSource ); |
|
595 |
||
596 |
iClipSession->iSession->AddStreamL( videoStream ); |
|
597 |
CleanupStack::Pop( videoStream ); |
|
598 |
||
599 |
CMceAudioStream* audioStream = CMceAudioStream::NewLC(); |
|
600 |
||
601 |
audioStream->AddSinkL( CMceRtpSink::NewLC() ); |
|
602 |
CleanupStack::Pop(); |
|
603 |
||
604 |
audioStream->SetSourceL( fileSource ); |
|
605 |
||
606 |
iClipSession->iSession->AddStreamL( audioStream ); |
|
607 |
CleanupStack::Pop( audioStream ); |
|
608 |
||
609 |
videoStream->iState = CMceMediaStream::ETranscodingRequired; |
|
610 |
audioStream->iState = CMceMediaStream::ETranscodingRequired; |
|
611 |
||
612 |
const RPointerArray<CMceVideoCodec> videoCodecs = videoStream->Codecs(); |
|
613 |
EUNIT_ASSERT_EQUALS( videoCodecs.Count(), 1 ) |
|
614 |
EUNIT_ASSERT( videoCodecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 ) |
|
615 |
EUNIT_ASSERT( audioStream->Codecs().Count() > 1 ) |
|
616 |
||
617 |
TSize resolution(200,200); // Some value |
|
618 |
videoStream->Codecs()[0]->SetResolutionL( resolution ); |
|
619 |
audioStream->Codecs()[0]->SetBitrate( KMceAllowedAmrNbBitrateAll ); |
|
620 |
||
621 |
// Add some stream which must not be transcoded |
|
622 |
||
623 |
CMceAudioStream* inStream = CMceAudioStream::NewLC(); |
|
624 |
||
625 |
inStream->AddSinkL( CMceSpeakerSink::NewLC() ); |
|
626 |
CleanupStack::Pop(); |
|
627 |
||
628 |
inStream->SetSourceL( CMceRtpSource::NewLC() ); |
|
629 |
CleanupStack::Pop(); |
|
630 |
||
631 |
iClipSession->iSession->AddStreamL( inStream ); |
|
632 |
CleanupStack::Pop( inStream ); |
|
633 |
||
634 |
// Transcode |
|
635 |
iClipSession->TranscodeL( KTestAvcVideoFileName() ); |
|
636 |
||
637 |
// Check that transcoding has begun (transcoding to H263 as we don't |
|
638 |
// know whether other end supports H264) EUNIT_ASSERT( iClipSession->iTranscodingOngoing ) |
|
639 |
EUNIT_ASSERT( videoStream->State() == CMceMediaStream::ETranscoding ) |
|
640 |
EUNIT_ASSERT( audioStream->State() == CMceMediaStream::ETranscoding ) |
|
641 |
EUNIT_ASSERT( inStream->State() != CMceMediaStream::ETranscoding ) |
|
642 |
||
643 |
// Check that codecs have been replaced |
|
644 |
const RPointerArray<CMceVideoCodec> videoCodecs2 = videoStream->Codecs(); |
|
645 |
EUNIT_ASSERT_EQUALS( videoCodecs2.Count(), 1 ) |
|
646 |
EUNIT_ASSERT( videoCodecs2[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 ) |
|
647 |
EUNIT_ASSERT( audioStream->Codecs().Count() == 1 ) |
|
648 |
||
649 |
EUNIT_ASSERT( videoStream->Codecs()[0]->Resolution() != resolution ) |
|
650 |
EUNIT_ASSERT( audioStream->Codecs()[0]->AllowedBitrates() == |
|
651 |
KMceAllowedAmrNbBitrate475 ) |
|
652 |
} |
|
653 |
||
654 |
// ----------------------------------------------------------------------------- |
|
655 |
// |
|
656 |
// ----------------------------------------------------------------------------- |
|
657 |
// |
|
658 |
void UT_CMusEngClipSession::UT_CancelTranscodeLL() |
|
659 |
{ |
|
660 |
// Check that canceling transcoding is not possible before actual |
|
661 |
// transcoding |
|
662 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->CancelTranscodeL(), |
|
663 |
KErrNotReady ) |
|
664 |
||
665 |
// Construct session structure |
|
666 |
||
667 |
CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile(); |
|
668 |
||
669 |
iClipSession->iSession = CMceOutSession::NewL( |
|
670 |
*(iClipSession->iManager), |
|
671 |
*profile, |
|
672 |
KTestRecipientSipUri8() ); |
|
673 |
||
674 |
CMceVideoStream* videoStream = CMceVideoStream::NewLC(); |
|
675 |
||
676 |
CMceRtpSink* rtpsink = CMceRtpSink::NewLC(); |
|
677 |
videoStream->AddSinkL( rtpsink ); |
|
678 |
CleanupStack::Pop( rtpsink ); |
|
679 |
||
680 |
CMceFileSource* fileSource = |
|
681 |
CMceFileSource::NewLC( *iClipSession->iManager, KTestVideoFileName() ); |
|
682 |
videoStream->SetSourceL( fileSource ); |
|
683 |
CleanupStack::Pop( fileSource ); |
|
684 |
||
685 |
iClipSession->iSession->AddStreamL( videoStream ); |
|
686 |
CleanupStack::Pop( videoStream ); |
|
687 |
||
688 |
CMceAudioStream* audioStream = CMceAudioStream::NewLC(); |
|
689 |
||
690 |
audioStream->AddSinkL( CMceRtpSink::NewLC() ); |
|
691 |
CleanupStack::Pop(); |
|
692 |
||
693 |
audioStream->SetSourceL( fileSource ); |
|
694 |
||
695 |
iClipSession->iSession->AddStreamL( audioStream ); |
|
696 |
CleanupStack::Pop( audioStream ); |
|
697 |
||
698 |
// Set need for transcoding |
|
699 |
videoStream->iState = CMceMediaStream::ETranscodingRequired; |
|
700 |
audioStream->iState = CMceMediaStream::ETranscodingRequired; |
|
701 |
||
702 |
// Transcode |
|
703 |
iClipSession->TranscodeL( KTestAvcVideoFileName() ); |
|
704 |
||
705 |
EUNIT_ASSERT( videoStream->State() == CMceMediaStream::ETranscoding ) |
|
706 |
EUNIT_ASSERT( audioStream->State() == CMceMediaStream::ETranscoding ) |
|
707 |
||
708 |
// Cancel |
|
709 |
iClipSession->CancelTranscodeL(); |
|
710 |
||
711 |
EUNIT_ASSERT( videoStream->State() == |
|
712 |
CMceMediaStream::ETranscodingRequired ) |
|
713 |
EUNIT_ASSERT( audioStream->State() == |
|
714 |
CMceMediaStream::ETranscodingRequired ) |
|
715 |
} |
|
716 |
||
717 |
||
718 |
// ----------------------------------------------------------------------------- |
|
719 |
// |
|
720 |
// ----------------------------------------------------------------------------- |
|
721 |
// |
|
722 |
void UT_CMusEngClipSession::UT_PlayLL() |
|
723 |
{ |
|
724 |
// Check that resuming is not possible before invite |
|
725 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PlayL(), KErrNotReady ) |
|
726 |
||
727 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
728 |
||
729 |
// Check that playing is not possible during FFWD |
|
730 |
iClipSession->iFFWDStartTime = TTime( 10 ); |
|
731 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PlayL(), KErrNotReady ) |
|
732 |
iClipSession->iFFWDStartTime = TTime( 0 ); |
|
733 |
||
734 |
// Check that playing is not possible during FRWD |
|
735 |
iClipSession->iFRWDStartTime = TTime( 10 ); |
|
736 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PlayL(), KErrNotReady ) |
|
737 |
iClipSession->iFRWDStartTime = TTime( 0 ); |
|
738 |
||
739 |
// Successful case |
|
740 |
CMceFileSource* file = |
|
741 |
MusEngMceUtils::GetFileSourceL( *(iClipSession->iSession) ); |
|
742 |
||
743 |
file->iIsEnabled = EFalse; |
|
744 |
||
745 |
iClipSession->PlayL(); |
|
746 |
||
747 |
EUNIT_ASSERT( file->IsEnabled() ) |
|
748 |
||
749 |
// Try to play again, request should be ignored |
|
750 |
||
751 |
iClipSession->PlayL(); |
|
752 |
||
753 |
EUNIT_ASSERT( file->IsEnabled() ) |
|
754 |
||
755 |
} |
|
756 |
||
757 |
||
758 |
// ----------------------------------------------------------------------------- |
|
759 |
// |
|
760 |
// ----------------------------------------------------------------------------- |
|
761 |
// |
|
762 |
void UT_CMusEngClipSession::UT_PauseLL() |
|
763 |
{ |
|
764 |
// Check that pausing is not possible before invite |
|
765 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PauseL(), KErrNotReady ) |
|
766 |
||
767 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
768 |
||
769 |
// Check that pausing is not possible during FFWD |
|
770 |
iClipSession->iFFWDStartTime = TTime( 10 ); |
|
771 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PauseL(), KErrNotReady ) |
|
772 |
iClipSession->iFFWDStartTime = TTime( 0 ); |
|
773 |
||
774 |
// Check that pausing is not possible during FRWD |
|
775 |
iClipSession->iFRWDStartTime = TTime( 10 ); |
|
776 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->PauseL(), KErrNotReady ) |
|
777 |
iClipSession->iFRWDStartTime = TTime( 0 ); |
|
778 |
||
779 |
// Successful case |
|
780 |
||
781 |
CMceFileSource* file = |
|
782 |
MusEngMceUtils::GetFileSourceL( *(iClipSession->iSession) ); |
|
783 |
||
784 |
file->iIsEnabled = ETrue; |
|
785 |
||
786 |
iClipSession->PauseL(); |
|
787 |
||
788 |
EUNIT_ASSERT( !file->IsEnabled() ) |
|
789 |
||
790 |
// Try to pause again, request should be ignored |
|
791 |
||
792 |
iClipSession->PauseL(); |
|
793 |
||
794 |
EUNIT_ASSERT( !file->IsEnabled() ) |
|
795 |
||
796 |
} |
|
797 |
||
798 |
||
799 |
// ----------------------------------------------------------------------------- |
|
800 |
// |
|
801 |
// ----------------------------------------------------------------------------- |
|
802 |
// |
|
803 |
void UT_CMusEngClipSession::UT_IsPlayingLL() |
|
804 |
{ |
|
805 |
// Try without a session |
|
806 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->IsPlayingL(), KErrNotReady ); |
|
807 |
||
808 |
// Normal cases |
|
809 |
ESTABLISH_OUT_SESSION( iClipSession ); |
|
810 |
||
811 |
iClipSession->PlayL(); |
|
812 |
EUNIT_ASSERT( iClipSession->IsPlayingL() ) |
|
813 |
||
814 |
iClipSession->PauseL(); |
|
815 |
EUNIT_ASSERT( !iClipSession->IsPlayingL() ) |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
816 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
817 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
818 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
819 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
820 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
821 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
822 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
823 |
void UT_CMusEngClipSession::UT_CompleteSessionStructureLL() |
33 | 824 |
{ |
825 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
826 |
CMceStreamBundle* localBundle = |
33 | 827 |
CMceStreamBundle::NewLC( CMceStreamBundle::ELS ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
828 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
829 |
// Check that structure cannot be completed before creating the session |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
830 |
EUNIT_ASSERT_SPECIFIC_LEAVE( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
831 |
iClipSession->CompleteSessionStructureL( *localBundle ), |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
832 |
KErrNotReady ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
833 |
|
33 | 834 |
// Check that structure cannot be completed before setting the file name |
835 |
iClipSession->iFileName = KNullDesC(); |
|
836 |
CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile(); |
|
837 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
838 |
iClipSession->iSession = CMceOutSession::NewL( |
33 | 839 |
*(iClipSession->iManager), |
840 |
*profile, |
|
841 |
KTestRecipientSipUri8() ); |
|
842 |
||
843 |
EUNIT_ASSERT_SPECIFIC_LEAVE( |
|
844 |
iClipSession->CompleteSessionStructureL( *localBundle ), |
|
845 |
KErrNotReady ) |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
846 |
|
33 | 847 |
// Normal case |
848 |
iClipSession->iFileName = KTestVideoFileName(); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
849 |
iClipSession->CompleteSessionStructureL( *localBundle ); |
33 | 850 |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
851 |
EUNIT_ASSERT( iClipSession->iSession->Streams().Count() == 3 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
852 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Type() == KMceVideo ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
853 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Source() ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
854 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Source()->Type() == |
33 | 855 |
KMceFileSource ) |
856 |
EUNIT_ASSERT( !iClipSession->IsPlayingL() ) |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
857 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Sinks().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
858 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[0]->Sinks()[0]->Type() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
859 |
KMceRTPSink ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
860 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
861 |
// Check that only stream with speaker has been added to a bundle |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
862 |
EUNIT_ASSERT( localBundle->Streams().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
863 |
EUNIT_ASSERT( localBundle->Streams()[0]->Type() == KMceAudio ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
864 |
EUNIT_ASSERT( localBundle->Streams()[0]->Sinks().Count() > 0 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
865 |
EUNIT_ASSERT( localBundle->Streams()[0]->Sinks()[0]->Type() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
866 |
KMceSpeakerSink ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
867 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
868 |
CleanupStack::PopAndDestroy( localBundle ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
869 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
870 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
871 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
872 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
873 |
// Although all states are not meaningfull for LiveSession, all states are |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
874 |
// tested in order to force the updating of unit tests when behavior is changed |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
875 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
876 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
877 |
void UT_CMusEngClipSession::UT_StreamStateChangedL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
878 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
879 |
// Try without a session, nothing happens |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
880 |
CMceVideoStream* videoStream = CMceVideoStream::NewLC(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
881 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
882 |
*videoStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
883 |
CleanupStack::PopAndDestroy( videoStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
884 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
885 |
// Simulate sending invite |
33 | 886 |
iClipSession->InviteL( KTestRecipientSipUri() ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
887 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
888 |
// Try all the stream states |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
889 |
CMceMediaStream* changedStream = iClipSession->iSession->Streams()[0]; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
890 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
891 |
// EUninitialized, stream is created, unexpected change, nothing happens |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
892 |
changedStream->iState = CMceMediaStream::EUninitialized; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
893 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
894 |
*changedStream ); |
33 | 895 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
896 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
897 |
// EInitialized, stream is initialized |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
898 |
changedStream->iState = CMceMediaStream::EInitialized; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
899 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
900 |
*changedStream ); |
33 | 901 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
902 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
903 |
// EBuffering, stream is buffering |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
904 |
changedStream->iState = CMceMediaStream::EBuffering; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
905 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
906 |
*changedStream ); |
33 | 907 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
908 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
909 |
// EIdle, stream is not receiving RTP |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
910 |
changedStream->iState = CMceMediaStream::EIdle; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
911 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
912 |
*changedStream ); |
33 | 913 |
EUNIT_ASSERT( iObserver->iStreamIdleCalled ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
914 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
915 |
// EStreaming, stream is streaming |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
916 |
changedStream->iState = CMceMediaStream::EStreaming; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
917 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
918 |
*changedStream ); |
33 | 919 |
EUNIT_ASSERT( iObserver->iStreamStreamingCalled ) |
920 |
iObserver->Reset(); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
921 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
922 |
// EDisabled, stream is explicitly disabled |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
923 |
changedStream->iState = CMceMediaStream::EDisabled; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
924 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
925 |
*changedStream ); |
33 | 926 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
927 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
928 |
// ENoResources, stream has no needed resources to stream |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
929 |
changedStream->iState = CMceMediaStream::ENoResources; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
930 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
931 |
*changedStream ); |
33 | 932 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
933 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
934 |
// ETranscodingRequired, stream requires non-realtime transcoding |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
935 |
changedStream->iState = CMceMediaStream::ETranscodingRequired; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
936 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
937 |
*changedStream ); |
33 | 938 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
939 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
940 |
// ETranscoding, stream is transcoding in non-realtime |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
941 |
changedStream->iState = CMceMediaStream::ETranscoding; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
942 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
943 |
*changedStream ); |
33 | 944 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
945 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
946 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
947 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
948 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
949 |
// Although all states are not meaningfull for ClipSession, all states are |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
950 |
// tested in order to force the updating of unit tests when behavior is changed |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
951 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
952 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
953 |
void UT_CMusEngClipSession::UT_StreamStateChangedWithSourceL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
954 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
955 |
// Try without a session, nothing happens |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
956 |
CMceVideoStream* videoStream = CMceVideoStream::NewLC(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
957 |
CMceRtpSource* rtpSource = CMceRtpSource::NewLC(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
958 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
959 |
*videoStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
960 |
*rtpSource ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
961 |
CleanupStack::PopAndDestroy( rtpSource ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
962 |
CleanupStack::PopAndDestroy( videoStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
963 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
964 |
// Simulate sending invite |
33 | 965 |
iClipSession->InviteL( KTestRecipientSipUri() ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
966 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
967 |
// Try all the non-default stream states |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
968 |
CMceMediaStream* changedStream = iClipSession->iSession->Streams()[0]; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
969 |
CMceMediaSource* changedSource = changedStream->Source(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
970 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
971 |
// EDisabled, end of clip |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
972 |
changedStream->iState = CMceMediaStream::EDisabled; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
973 |
changedSource->iIsEnabled = EFalse; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
974 |
iClipSession->StreamStateChanged( *changedStream, *changedSource ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
975 |
|
33 | 976 |
EUNIT_ASSERT( iObserver->iEndOfClipCalled == ETrue ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
977 |
changedSource->iIsEnabled = ETrue; |
33 | 978 |
iObserver->Reset(); |
979 |
||
980 |
// ETranscodingRequired, transcoding has failed |
|
981 |
iClipSession->iSession->iState = CMceSession::EIdle; |
|
982 |
iClipSession->iTranscodingOngoing = ETrue; |
|
983 |
changedStream->iState = CMceMediaStream::ETranscodingRequired; |
|
984 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
|
985 |
*changedStream, *changedSource ); |
|
986 |
EUNIT_ASSERT( iObserver->iTranscodingFailedCalled ) |
|
987 |
EUNIT_ASSERT( !iClipSession->iTranscodingOngoing ) |
|
988 |
iObserver->Reset(); |
|
989 |
||
990 |
// ETranscoding, transcoding has progresssed |
|
991 |
iClipSession->iSession->iState = CMceSession::EIdle; |
|
992 |
changedStream->iState = CMceMediaStream::ETranscoding; |
|
993 |
static_cast<CMceFileSource*>(changedSource)->iTranscodingPercentage = 20; |
|
994 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
|
995 |
*changedStream, *changedSource ); |
|
996 |
EUNIT_ASSERT( iObserver->iTranscodingProgressedPercentage == 20 ) |
|
997 |
iObserver->Reset(); |
|
998 |
||
999 |
// ETranscoding, transcoding has progresssed, querying percentage fails |
|
1000 |
iClipSession->iSession->iState = CMceSession::EIdle; |
|
1001 |
changedStream->iState = CMceMediaStream::ETranscoding; |
|
1002 |
iObserver->iTranscodingProgressedPercentage = -1; // make assertion possible |
|
1003 |
static_cast<CMceFileSource*>(changedSource)->iFailWithCode = KErrNotReady; |
|
1004 |
static_cast<CMceFileSource*>(changedSource)->iTranscodingPercentage = 30; |
|
1005 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
|
1006 |
*changedStream, *changedSource ); |
|
1007 |
EUNIT_ASSERT( iObserver->iTranscodingProgressedPercentage == 0 ) |
|
1008 |
iObserver->Reset(); |
|
1009 |
||
1010 |
// EInitialized, transcoding has completed, establishment fails |
|
1011 |
iClipSession->iSession->iState = CMceSession::EIdle; |
|
1012 |
iClipSession->iSession->iFailWithCode = KErrCorrupt; // != KErrNone |
|
1013 |
iClipSession->iTranscodingOngoing = ETrue; |
|
1014 |
changedStream->iState = CMceMediaStream::EInitialized; |
|
1015 |
static_cast<CMceFileSource*>(changedSource)->iTranscodingPercentage = 100; |
|
1016 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
|
1017 |
*changedStream, *changedSource ); |
|
1018 |
EUNIT_ASSERT( iObserver->iTranscodingCompletedInitCalled ) |
|
1019 |
EUNIT_ASSERT( iObserver->iTranscodingCompletedFinalizeCalled ) |
|
1020 |
EUNIT_ASSERT( iObserver->iSessionFailedCalled ) |
|
1021 |
EUNIT_ASSERT( !iClipSession->iTranscodingOngoing ) |
|
1022 |
iObserver->Reset(); |
|
1023 |
||
1024 |
// EInitialized, transcoding has completed, establishment succeeds |
|
1025 |
iClipSession->iSession->iState = CMceSession::EIdle; |
|
1026 |
iClipSession->iTranscodingOngoing = ETrue; |
|
1027 |
changedStream->iState = CMceMediaStream::EInitialized; |
|
1028 |
static_cast<CMceFileSource*>(changedSource)->iTranscodingPercentage = 100; |
|
1029 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
|
1030 |
*changedStream, *changedSource ); |
|
1031 |
EUNIT_ASSERT( iObserver->iTranscodingCompletedInitCalled ) |
|
1032 |
EUNIT_ASSERT( iObserver->iTranscodingCompletedFinalizeCalled ) |
|
1033 |
// Next cannot be asserted since it is not true with alloc decoration |
|
1034 |
// EUNIT_ASSERT( !iObserver->iSessionFailedCalled ) |
|
1035 |
EUNIT_ASSERT( !iClipSession->iTranscodingOngoing ) |
|
1036 |
iObserver->Reset(); |
|
1037 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1038 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1039 |
// Test default stream state change behavior, remove or change when |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1040 |
// behavior changes |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1041 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1042 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1043 |
// EUninitialized, stream is created, unexpected change, nothing happens |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1044 |
changedStream->iState = CMceMediaStream::EUninitialized; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1045 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1046 |
*changedStream, *changedSource ); |
33 | 1047 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1048 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1049 |
// EInitialized, stream is initialized |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1050 |
changedStream->iState = CMceMediaStream::EInitialized; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1051 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1052 |
*changedStream, *changedSource ); |
33 | 1053 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1054 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1055 |
// Special meaning (Transcoding ready), tested separately |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1056 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1057 |
// EBuffering, stream is buffering |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1058 |
changedStream->iState = CMceMediaStream::EBuffering; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1059 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1060 |
*changedStream, *changedSource ); |
33 | 1061 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1062 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1063 |
// EIdle, stream is not receiving RTP |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1064 |
changedStream->iState = CMceMediaStream::EIdle; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1065 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1066 |
*changedStream, *changedSource ); |
33 | 1067 |
EUNIT_ASSERT( iObserver->iStreamIdleCalled ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1068 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1069 |
// EStreaming, stream is streaming |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1070 |
changedStream->iState = CMceMediaStream::EStreaming; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1071 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1072 |
*changedStream, *changedSource ); |
33 | 1073 |
EUNIT_ASSERT( iObserver->iStreamStreamingCalled ) |
1074 |
iObserver->Reset(); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1075 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1076 |
// EDisabled, stream is explicitly disabled |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1077 |
// This state has non-default meaning, tested before defaults |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1078 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1079 |
// ENoResources, stream has no needed resources to stream |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1080 |
changedStream->iState = CMceMediaStream::ENoResources; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1081 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1082 |
*changedStream, *changedSource ); |
33 | 1083 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
1084 |
||
1085 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1086 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1087 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1088 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1089 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1090 |
// Although all states are not meaningfull for LiveSession, all states are |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1091 |
// tested in order to force the updating of unit tests when behavior is changed |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1092 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1093 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1094 |
void UT_CMusEngClipSession::UT_StreamStateChangedWithSinkL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1095 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1096 |
// Try without a session, nothing happens |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1097 |
CMceVideoStream* videoStream = CMceVideoStream::NewLC(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1098 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1099 |
*videoStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1100 |
*CMceRtpSink::NewLC() ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1101 |
CleanupStack::PopAndDestroy(); // rtp |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1102 |
CleanupStack::PopAndDestroy( videoStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1103 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1104 |
// Simulate sending invite |
33 | 1105 |
iClipSession->InviteL( KTestRecipientSipUri() ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1106 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1107 |
// Test default stream state change behavior |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1108 |
CMceMediaStream* changedStream = iClipSession->iSession->Streams()[0]; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1109 |
CMceMediaSink* changedSink = changedStream->Sinks()[0]; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1110 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1111 |
// EUninitialized, stream is created, unexpected change, nothing happens |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1112 |
changedStream->iState = CMceMediaStream::EUninitialized; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1113 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1114 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1115 |
*changedSink ); |
33 | 1116 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1117 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1118 |
// EInitialized, stream is initialized |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1119 |
changedStream->iState = CMceMediaStream::EInitialized; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1120 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1121 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1122 |
*changedSink ); |
33 | 1123 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1124 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1125 |
// EBuffering, stream is buffering |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1126 |
changedStream->iState = CMceMediaStream::EBuffering; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1127 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1128 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1129 |
*changedSink ); |
33 | 1130 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1131 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1132 |
// EIdle, stream is not receiving RTP |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1133 |
changedStream->iState = CMceMediaStream::EIdle; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1134 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1135 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1136 |
*changedSink ); |
33 | 1137 |
EUNIT_ASSERT( iObserver->iStreamIdleCalled ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1138 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1139 |
// EStreaming, stream is streaming |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1140 |
changedStream->iState = CMceMediaStream::EStreaming; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1141 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1142 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1143 |
*changedSink ); |
33 | 1144 |
EUNIT_ASSERT( iObserver->iStreamStreamingCalled ) |
1145 |
iObserver->Reset(); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1146 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1147 |
// EDisabled, stream is explicitly disabled |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1148 |
changedStream->iState = CMceMediaStream::EDisabled; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1149 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1150 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1151 |
*changedSink ); |
33 | 1152 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1153 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1154 |
// ENoResources, stream has no needed resources to stream |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1155 |
changedStream->iState = CMceMediaStream::ENoResources; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1156 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1157 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1158 |
*changedSink ); |
33 | 1159 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1160 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1161 |
// ETranscodingRequired, stream requires non-realtime transcoding |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1162 |
changedStream->iState = CMceMediaStream::ETranscodingRequired; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1163 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1164 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1165 |
*changedSink ); |
33 | 1166 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1167 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1168 |
// ETranscoding, stream is transcoding in non-realtime |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1169 |
changedStream->iState = CMceMediaStream::ETranscoding; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1170 |
static_cast<MMceStreamObserver*>(iClipSession)->StreamStateChanged( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1171 |
*changedStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1172 |
*changedSink ); |
33 | 1173 |
EUNIT_ASSERT( iObserver->IsReseted() ) |
1174 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1175 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1176 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1177 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1178 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1179 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1180 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1181 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1182 |
void UT_CMusEngClipSession::UT_AddAmrCodecLL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1183 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1184 |
// Check that all the codecs are replaced with AMR codec |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1185 |
CMceAudioStream* audioStream = CMceAudioStream::NewLC(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1186 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1187 |
audioStream->InitializeL( iClipSession->iManager ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1188 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1189 |
EUNIT_ASSERT( audioStream->Codecs().Count() == 2 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1190 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1191 |
iClipSession->AddAmrCodecL( *audioStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1192 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1193 |
EUNIT_ASSERT( audioStream->Codecs().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1194 |
EUNIT_ASSERT( audioStream->Codecs()[0]->SdpName() == KMceSDPNameAMR() ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1195 |
EUNIT_ASSERT( audioStream->Codecs()[0]->AllowedBitrates() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1196 |
KMceAllowedAmrNbBitrate475 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1197 |
EUNIT_ASSERT( audioStream->Codecs()[0]->Bitrate() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1198 |
KMceAmrNbBitrate475 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1199 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1200 |
// Check that function leaves if there is no AMR codec |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1201 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1202 |
iClipSession->iManager->iSupportedAudioCodecs.ResetAndDestroy(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1203 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1204 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->AddAmrCodecL( *audioStream ), |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1205 |
KErrNotFound ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1206 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1207 |
CleanupStack::PopAndDestroy( audioStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1208 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1209 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1210 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1211 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1212 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1213 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1214 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1215 |
void UT_CMusEngClipSession::UT_AddVideoCodecLL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1216 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1217 |
// Check that all the codecs are replaced with H263 codec if other end |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1218 |
// does not support H264 |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1219 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1220 |
delete iClipSession->iVideoCodecList; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1221 |
iClipSession->iVideoCodecList = NULL; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1222 |
iClipSession->iVideoCodecList = KMceSDPNameH263().AllocL(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1223 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1224 |
CMceVideoStream* videoStream = CMceVideoStream::NewLC(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1225 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1226 |
videoStream->InitializeL( iClipSession->iManager ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1227 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1228 |
EUNIT_ASSERT( videoStream->Codecs().Count() > 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1229 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1230 |
iClipSession->AddVideoCodecL( *videoStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1231 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1232 |
EUNIT_ASSERT( videoStream->Codecs().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1233 |
EUNIT_ASSERT( videoStream->Codecs()[0]->SdpName() == KMceSDPNameH2632000() ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1234 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1235 |
// Check that all codecs are replaced with H264 codec if other end |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1236 |
// supports it |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1237 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1238 |
_LIT8( KMusTestCodecListDelim, ";" ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1239 |
delete iClipSession->iVideoCodecList; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1240 |
iClipSession->iVideoCodecList = NULL; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1241 |
iClipSession->iVideoCodecList = |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1242 |
HBufC8::NewL( KMceSDPNameH263().Length() + |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1243 |
KMceSDPNameH264().Length() + |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1244 |
KMusTestCodecListDelim().Length() ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1245 |
iClipSession->iVideoCodecList->Des().Copy( KMceSDPNameH263() ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1246 |
iClipSession->iVideoCodecList->Des().Append( KMusTestCodecListDelim() ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1247 |
iClipSession->iVideoCodecList->Des().Append( KMceSDPNameH264() ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1248 |
iClipSession->AddVideoCodecL( *videoStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1249 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1250 |
EUNIT_ASSERT( videoStream->Codecs().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1251 |
EUNIT_ASSERT( videoStream->Codecs()[0]->SdpName() == KMceSDPNameH264() ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1252 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1253 |
// Check that function leaves if there is no H264 codec |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1254 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1255 |
iClipSession->iManager->iSupportedVideoCodecs.ResetAndDestroy(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1256 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1257 |
EUNIT_ASSERT_SPECIFIC_LEAVE( iClipSession->AddVideoCodecL( *videoStream ), |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1258 |
KErrNotFound ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1259 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1260 |
CleanupStack::PopAndDestroy( videoStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1261 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1262 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1263 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1264 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1265 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1266 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1267 |
// |
33 | 1268 |
void UT_CMusEngClipSession::UT_HasClipEndedL() |
1269 |
{ |
|
1270 |
// Try before establishing the session |
|
1271 |
EUNIT_ASSERT( !iClipSession->HasClipEnded() ) |
|
1272 |
||
1273 |
// Try with session, but without video out stream |
|
1274 |
||
1275 |
CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile(); |
|
1276 |
||
1277 |
iClipSession->iSession = CMceOutSession::NewL( |
|
1278 |
*(iClipSession->iManager), |
|
1279 |
*profile, |
|
1280 |
KTestRecipientSipUri8() ); |
|
1281 |
||
1282 |
EUNIT_ASSERT( !iClipSession->HasClipEnded() ) |
|
1283 |
||
1284 |
// Try with video out stream without source... |
|
1285 |
CMceVideoStream* videoOut = CMceVideoStream::NewLC(); |
|
1286 |
||
1287 |
videoOut->AddSinkL( CMceRtpSink::NewLC() ); |
|
1288 |
CleanupStack::Pop(); |
|
1289 |
||
1290 |
iClipSession->iSession->AddStreamL( videoOut ); |
|
1291 |
CleanupStack::Pop( videoOut ); |
|
1292 |
||
1293 |
EUNIT_ASSERT( !iClipSession->HasClipEnded() ) |
|
1294 |
||
1295 |
// And with enabled source and stream |
|
1296 |
videoOut->SetSourceL( CMceFileSource::NewLC( *iClipSession->iManager, |
|
1297 |
iClipSession->iFileName ) ); |
|
1298 |
CleanupStack::Pop(); |
|
1299 |
||
1300 |
EUNIT_ASSERT( !iClipSession->HasClipEnded() ) |
|
1301 |
||
1302 |
// try with different position and duration |
|
1303 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 90; |
|
1304 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111; |
|
1305 |
EUNIT_ASSERT( !iClipSession->HasClipEnded() ) |
|
1306 |
||
1307 |
// Disapling source |
|
1308 |
(static_cast<CMceFileSource*> (videoOut->Source()))->DisableL(); |
|
1309 |
EUNIT_ASSERT( !iClipSession->HasClipEnded() ) |
|
1310 |
||
1311 |
// Disapling stream |
|
1312 |
videoOut->iState = CMceMediaStream::EDisabled; |
|
1313 |
EUNIT_ASSERT( !iClipSession->HasClipEnded() ) |
|
1314 |
||
1315 |
// and finaly try with "real" end of clip |
|
1316 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 0; |
|
1317 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111; |
|
1318 |
||
1319 |
EUNIT_ASSERT( iClipSession->HasClipEnded() ) |
|
1320 |
} |
|
1321 |
||
1322 |
||
1323 |
// ----------------------------------------------------------------------------- |
|
1324 |
// |
|
1325 |
// ----------------------------------------------------------------------------- |
|
1326 |
// |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1327 |
void UT_CMusEngClipSession::UT_ConstructAudioStructureLL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1328 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1329 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1330 |
CMceStreamBundle* localBundle = |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1331 |
CMceStreamBundle::NewLC( CMceStreamBundle::ELS ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1332 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1333 |
// Check that audio structure cannot be constructed before |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1334 |
// creating the session |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1335 |
EUNIT_ASSERT_SPECIFIC_LEAVE( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1336 |
iClipSession->ConstructAudioStructureL( *localBundle ), |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1337 |
KErrNotReady ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1338 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1339 |
// Try without a file source |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1340 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1341 |
CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1342 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1343 |
iClipSession->iSession = CMceOutSession::NewL( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1344 |
*(iClipSession->iManager), |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1345 |
*profile, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1346 |
KTestRecipientSipUri8() ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1347 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1348 |
EUNIT_ASSERT_SPECIFIC_LEAVE( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1349 |
iClipSession->ConstructAudioStructureL( *localBundle ), |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1350 |
KErrNotFound ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1351 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1352 |
// Normal case |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1353 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1354 |
CMceVideoStream* videoOut = CMceVideoStream::NewLC(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1355 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1356 |
videoOut->AddSinkL( CMceRtpSink::NewLC() ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1357 |
CleanupStack::Pop(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1358 |
|
33 | 1359 |
videoOut->SetSourceL( CMceFileSource::NewLC( *iClipSession->iManager, |
1360 |
iClipSession->iFileName ) ); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1361 |
CleanupStack::Pop(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1362 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1363 |
iClipSession->iSession->AddStreamL( videoOut ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1364 |
CleanupStack::Pop( videoOut ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1365 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1366 |
iClipSession->ConstructAudioStructureL( *localBundle ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1367 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1368 |
EUNIT_ASSERT( iClipSession->iSession->Streams().Count() == 3 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1369 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[1]->Type() == KMceAudio ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1370 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[2]->Type() == KMceAudio ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1371 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[1]->Source() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1372 |
videoOut->Source() ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1373 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[2]->Source() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1374 |
videoOut->Source() ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1375 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[1]->Sinks().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1376 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[2]->Sinks().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1377 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[1]->Sinks()[0]->Type() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1378 |
KMceRTPSink ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1379 |
EUNIT_ASSERT( iClipSession->iSession->Streams()[2]->Sinks()[0]->Type() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1380 |
KMceSpeakerSink ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1381 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1382 |
// Check that only stream with speaker has been added to a bundle |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1383 |
EUNIT_ASSERT( localBundle->Streams().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1384 |
EUNIT_ASSERT( localBundle->Streams()[0]->Type() == KMceAudio ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1385 |
EUNIT_ASSERT( localBundle->Streams()[0]->Sinks().Count() == 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1386 |
EUNIT_ASSERT( localBundle->Streams()[0]->Sinks()[0]->Type() == |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1387 |
KMceSpeakerSink ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1388 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1389 |
CleanupStack::PopAndDestroy( localBundle ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1390 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1391 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1392 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1393 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1394 |
// Check that audio is not constructed in operator variant |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1395 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1396 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1397 |
void UT_CMusEngClipSession::UT_ConstructAudioStructureL_OperatorVariantL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1398 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1399 |
iClipSession->iOperatorVariant = ETrue; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1400 |
CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1401 |
delete profile->iArray; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1402 |
profile->iArray = NULL; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1403 |
profile->iArray = new ( ELeave ) CDesC8ArrayFlat( 1 ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1404 |
profile->iArray->AppendL( KMusSipUri ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1405 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1406 |
// Establish session, ConstructAudioStructureL gets called |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1407 |
ESTABLISH_OUT_SESSION( iClipSession ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1408 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1409 |
// Check that only two video streams has been constructed |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1410 |
EUNIT_ASSERT_EQUALS( iClipSession->iSession->Streams().Count(), 2 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1411 |
EUNIT_ASSERT_EQUALS( iClipSession->iSession->Streams()[0]->Type(), |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1412 |
KMceVideo ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1413 |
EUNIT_ASSERT_EQUALS( iClipSession->iSession->Streams()[1]->Type(), |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1414 |
KMceVideo ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1415 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1416 |
// Check that no bundles has been constructed |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1417 |
EUNIT_ASSERT_EQUALS( iClipSession->iSession->Bundles().Count(), 0 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1418 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1419 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1420 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1421 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1422 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1423 |
// ----------------------------------------------------------------------------- |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1424 |
// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1425 |
void UT_CMusEngClipSession::UT_EstablishSessionLL() |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1426 |
{ |
33 | 1427 |
iClipSession->SetClipL( KTestAvcVideoFileName() ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1428 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1429 |
// Try to establish, must fail, because of missing session |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1430 |
TRAPD( error, iClipSession->EstablishSessionL() ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1431 |
MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1432 |
EUNIT_ASSERT( error == KErrNotReady ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1433 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1434 |
EUNIT_ASSERT( iClipSession->iVideoCodecList ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1435 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1436 |
/////// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1437 |
// 1.Test that in case the peer party supports H264, no transcoding is needed |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1438 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1439 |
// Call to CMusEngOutMceSession::InviteL leads to call to EstablishL |
33 | 1440 |
iClipSession->InviteL( KTestRecipientSipUri ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1441 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1442 |
const RPointerArray<CMceMediaStream>& streams = iClipSession->iSession->Streams(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1443 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1444 |
for ( TInt i = 0; i < streams.Count(); ++i ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1445 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1446 |
if ( streams[i]->Type() == KMceVideo ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1447 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1448 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1449 |
CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( streams[i] ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1450 |
const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1451 |
EUNIT_ASSERT_EQUALS( codecs.Count(), 1 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1452 |
EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1453 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1454 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1455 |
} |
33 | 1456 |
|
1457 |
EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled ) |
|
1458 |
EUNIT_ASSERT( !iClipSession->iTranscodingRequiredDueMissingOptions ) |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1459 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1460 |
/////// |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1461 |
// 2.Test the case when we don't know whether peer supports H264, |
33 | 1462 |
// transcoding is needed, H264 codec has to be removed from the codec list |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1463 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1464 |
delete iClipSession->iSession; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1465 |
iClipSession->iSession = NULL; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1466 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1467 |
delete iClipSession->iVideoCodecList; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1468 |
iClipSession->iVideoCodecList = NULL; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1469 |
|
33 | 1470 |
// Call to CMusEngOutMceSession::InviteL leads to call to EstablishL |
1471 |
iClipSession->InviteL( KTestRecipientSipUri ); |
|
1472 |
||
1473 |
const RPointerArray<CMceMediaStream>& streams2 = iClipSession->iSession->Streams(); |
|
1474 |
||
1475 |
for ( TInt i = 0; i < streams2.Count(); ++i ) |
|
1476 |
{ |
|
1477 |
if ( streams2[i]->Type() == KMceVideo ) |
|
1478 |
{ |
|
1479 |
CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( streams2[i] ); |
|
1480 |
const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs(); |
|
1481 |
EUNIT_ASSERT_EQUALS( codecs.Count(), 1 ) |
|
1482 |
EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 ) |
|
1483 |
} |
|
1484 |
} |
|
1485 |
||
1486 |
EUNIT_ASSERT( iObserver->iTranscodingNeededCalled ) |
|
1487 |
EUNIT_ASSERT( iObserver->iDueUnknowCapas ) |
|
1488 |
EUNIT_ASSERT( iClipSession->iTranscodingRequiredDueMissingOptions ) |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1489 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1490 |
/////// |
33 | 1491 |
// 3. Establish behaves differently at second round in case clip is AVC |
1492 |
// and because remote party's capabilities were unknown. Use-case is such |
|
1493 |
// that AVC is tried to be transcoded first but if it fails, invite is retried |
|
1494 |
// by using AVC |
|
1495 |
iObserver->Reset(); |
|
1496 |
iClipSession->InviteL( KTestRecipientSipUri ); |
|
1497 |
const RPointerArray<CMceMediaStream>& testStreams = iClipSession->iSession->Streams(); |
|
1498 |
||
1499 |
for ( TInt i = 0; i < testStreams.Count(); ++i ) |
|
1500 |
{ |
|
1501 |
if ( testStreams[i]->Type() == KMceVideo ) |
|
1502 |
{ |
|
1503 |
CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( testStreams[i] ); |
|
1504 |
const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs(); |
|
1505 |
EUNIT_ASSERT_EQUALS( codecs.Count(), 1 ) |
|
1506 |
EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 ) |
|
1507 |
} |
|
1508 |
} |
|
1509 |
||
1510 |
EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled ) |
|
1511 |
EUNIT_ASSERT( !iObserver->iDueUnknowCapas ) |
|
1512 |
||
1513 |
/////// |
|
1514 |
// 4.Test that if peer doesn't supports H264, transcoding is needed |
|
1515 |
// H264 codec has to be removed from the codec list |
|
1516 |
||
1517 |
iObserver->iTranscodingNeededCalled = EFalse; |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1518 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1519 |
delete iClipSession->iSession; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1520 |
iClipSession->iSession = NULL; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1521 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1522 |
iClipSession->iVideoCodecList = KMceSDPNameH263().AllocL(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1523 |
|
33 | 1524 |
// Call to CMusEngOutMceSession::InviteL leads to call to EstablishL |
1525 |
iClipSession->InviteL( KTestRecipientSipUri ); |
|
1526 |
||
1527 |
const RPointerArray<CMceMediaStream>& streams3 = iClipSession->iSession->Streams(); |
|
1528 |
||
1529 |
for ( TInt i = 0; i < streams3.Count(); ++i ) |
|
1530 |
{ |
|
1531 |
if ( streams3[i]->Type() == KMceVideo ) |
|
1532 |
{ |
|
1533 |
CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( streams3[i] ); |
|
1534 |
const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs(); |
|
1535 |
EUNIT_ASSERT_EQUALS( codecs.Count(), 1 ) |
|
1536 |
EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 ) |
|
1537 |
} |
|
1538 |
} |
|
1539 |
||
1540 |
EUNIT_ASSERT( iObserver->iTranscodingNeededCalled ) |
|
1541 |
EUNIT_ASSERT( !iObserver->iDueUnknowCapas ) |
|
1542 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1543 |
} |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1544 |
|
33 | 1545 |
void UT_CMusEngClipSession::UT_IsRewindFromEndL() |
1546 |
{ |
|
1547 |
// Try before establishing the session |
|
1548 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
|
1549 |
||
1550 |
// Try with session, but without video out stream |
|
1551 |
||
1552 |
CSIPProfile* profile = iClipSession->iSipProfileHandler->Profile(); |
|
1553 |
||
1554 |
iClipSession->iSession = CMceOutSession::NewL( |
|
1555 |
*(iClipSession->iManager), |
|
1556 |
*profile, |
|
1557 |
KTestRecipientSipUri8() ); |
|
1558 |
||
1559 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
|
1560 |
||
1561 |
// Try with video out stream without source... |
|
1562 |
CMceVideoStream* videoOut = CMceVideoStream::NewLC(); |
|
1563 |
||
1564 |
videoOut->AddSinkL( CMceRtpSink::NewLC() ); |
|
1565 |
CleanupStack::Pop(); |
|
1566 |
||
1567 |
iClipSession->iSession->AddStreamL( videoOut ); |
|
1568 |
CleanupStack::Pop( videoOut ); |
|
1569 |
||
1570 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
|
1571 |
||
1572 |
// And with enabled source and stream |
|
1573 |
videoOut->SetSourceL( CMceFileSource::NewLC( *iClipSession->iManager, |
|
1574 |
iClipSession->iFileName ) ); |
|
1575 |
CleanupStack::Pop(); |
|
1576 |
||
1577 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
|
1578 |
||
1579 |
// try with different position and duration |
|
1580 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 90; |
|
1581 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111; |
|
1582 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
|
1583 |
||
1584 |
// Disapling source |
|
1585 |
(static_cast<CMceFileSource*> (videoOut->Source()))->DisableL(); |
|
1586 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
|
1587 |
||
1588 |
// Disapling stream |
|
1589 |
videoOut->iState = CMceMediaStream::EDisabled; |
|
38
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1590 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
33 | 1591 |
|
1592 |
iClipSession->iPause = ETrue; |
|
1593 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
|
1594 |
||
1595 |
iClipSession->iPause = EFalse; |
|
38
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1596 |
EUNIT_ASSERT(!iClipSession->IsRewindFromEnd() ) |
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1597 |
|
33 | 1598 |
// and finaly try with "real" end of clip |
1599 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 0; |
|
1600 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111; |
|
38
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1601 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1602 |
|
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1603 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iPosition = 111; |
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1604 |
(static_cast<CMceFileSource*> (videoOut->Source()))->iDuration = 111; |
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1605 |
EUNIT_ASSERT( iClipSession->IsRewindFromEnd() ) |
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1606 |
|
ac48f0cc9f9c
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1607 |
videoOut->iState = CMceMediaStream::EIdle; |
33 | 1608 |
EUNIT_ASSERT( !iClipSession->IsRewindFromEnd() ) |
1609 |
} |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1610 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1611 |
// TEST TABLE |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1612 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1613 |
EUNIT_BEGIN_TEST_TABLE( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1614 |
UT_CMusEngClipSession, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1615 |
"UT_CMusEngClipSesssion", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1616 |
"UNIT" ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1617 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1618 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1619 |
"NewL - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1620 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1621 |
"NewL", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1622 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1623 |
SetupL, UT_NewLL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1624 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1625 |
EUNIT_TEST( |
33 | 1626 |
"SetClipL - test ", |
1627 |
"CMusEngClipSession", |
|
1628 |
"AetClipL", |
|
1629 |
"FUNCTIONALITY", |
|
1630 |
SetupL, UT_SetClipLL, Teardown) |
|
1631 |
||
1632 |
EUNIT_TEST( |
|
1633 |
"FastForwardL - test ", |
|
1634 |
"CMusEngClipSession", |
|
1635 |
"FastForwardL", |
|
1636 |
"FUNCTIONALITY", |
|
1637 |
SetupL, UT_FastForwardLL, Teardown) |
|
1638 |
||
1639 |
EUNIT_TEST( |
|
1640 |
"FastRewindL - test ", |
|
1641 |
"CMusEngClipSession", |
|
1642 |
"FastRewindL", |
|
1643 |
"FUNCTIONALITY", |
|
1644 |
SetupL, UT_FastRewindLL, Teardown) |
|
1645 |
||
1646 |
EUNIT_TEST( |
|
1647 |
"PositionL - test ", |
|
1648 |
"CMusEngClipSession", |
|
1649 |
"PositionL", |
|
1650 |
"FUNCTIONALITY", |
|
1651 |
SetupL, UT_PositionLL, Teardown) |
|
1652 |
||
1653 |
EUNIT_TEST( |
|
1654 |
"DurationL - test ", |
|
1655 |
"CMusEngClipSession", |
|
1656 |
"DurationL", |
|
1657 |
"FUNCTIONALITY", |
|
1658 |
SetupL, UT_DurationLL, Teardown) |
|
1659 |
||
1660 |
EUNIT_TEST( |
|
1661 |
"SetPositionL - test ", |
|
1662 |
"CMusEngClipSession", |
|
1663 |
"SetPositionL", |
|
1664 |
"FUNCTIONALITY", |
|
1665 |
SetupL, UT_SetPositionLL, Teardown) |
|
1666 |
||
1667 |
EUNIT_TEST( |
|
1668 |
"TranscodeL - To AVC test ", |
|
1669 |
"CMusEngClipSession", |
|
1670 |
"TranscodeL", |
|
1671 |
"FUNCTIONALITY", |
|
1672 |
SetupL, UT_TranscodeLToAvcL, Teardown) |
|
1673 |
||
1674 |
EUNIT_TEST( |
|
1675 |
"TranscodeL - To H263 test ", |
|
1676 |
"CMusEngClipSession", |
|
1677 |
"TranscodeL", |
|
1678 |
"FUNCTIONALITY", |
|
1679 |
Setup2L, UT_TranscodeLToH263L, Teardown) |
|
1680 |
||
1681 |
EUNIT_TEST( |
|
1682 |
"CancelTranscodeL - test ", |
|
1683 |
"CMusEngClipSession", |
|
1684 |
"CancelTranscodeL", |
|
1685 |
"FUNCTIONALITY", |
|
1686 |
SetupL, UT_CancelTranscodeLL, Teardown) |
|
1687 |
||
1688 |
EUNIT_TEST( |
|
1689 |
"PlayL - test ", |
|
1690 |
"CMusEngClipSession", |
|
1691 |
"PlayL", |
|
1692 |
"FUNCTIONALITY", |
|
1693 |
SetupL, UT_PlayLL, Teardown) |
|
1694 |
||
1695 |
EUNIT_TEST( |
|
1696 |
"PauseL - test ", |
|
1697 |
"CMusEngClipSession", |
|
1698 |
"PauseL", |
|
1699 |
"FUNCTIONALITY", |
|
1700 |
SetupL, UT_PauseLL, Teardown) |
|
1701 |
||
1702 |
EUNIT_TEST( |
|
1703 |
"IsPlayingL - test ", |
|
1704 |
"CMusEngClipSession", |
|
1705 |
"IsPlayingL", |
|
1706 |
"FUNCTIONALITY", |
|
1707 |
SetupL, UT_IsPlayingLL, Teardown) |
|
1708 |
||
1709 |
EUNIT_TEST( |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1710 |
"CompleteSessionStructureL - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1711 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1712 |
"CompleteSessionStructureL", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1713 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1714 |
SetupL, UT_CompleteSessionStructureLL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1715 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1716 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1717 |
"StreamStateChangedL() - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1718 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1719 |
"StreamStateChangedL()", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1720 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1721 |
SetupL, UT_StreamStateChangedL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1722 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1723 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1724 |
"StreamStateChangedL( source ) - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1725 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1726 |
"StreamStateChangedL( source )", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1727 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1728 |
SetupL, UT_StreamStateChangedWithSourceL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1729 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1730 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1731 |
"StreamStateChangedL( sink ) - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1732 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1733 |
"StreamStateChangedL( sink )", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1734 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1735 |
SetupL, UT_StreamStateChangedWithSinkL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1736 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1737 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1738 |
"AddAmrCodecL - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1739 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1740 |
"AddAmrCodecL", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1741 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1742 |
SetupL, UT_AddAmrCodecLL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1743 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1744 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1745 |
"AddVideoCodecL - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1746 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1747 |
"AddVideoCodecL", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1748 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1749 |
SetupL, UT_AddVideoCodecLL, Teardown) |
33 | 1750 |
|
1751 |
EUNIT_TEST( |
|
1752 |
"HasClipEnded - test ", |
|
1753 |
"CMusEngClipSession", |
|
1754 |
"HasClipEnded", |
|
1755 |
"FUNCTIONALITY", |
|
1756 |
SetupL, UT_HasClipEndedL, Teardown) |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1757 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1758 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1759 |
"ConstructAudioStructureL - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1760 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1761 |
"ConstructAudioStructureL", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1762 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1763 |
SetupL, UT_ConstructAudioStructureLL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1764 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1765 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1766 |
"ConstructAudioStructureL - test operator specific behavior ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1767 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1768 |
"ConstructAudioStructureL", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1769 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1770 |
SetupL, UT_ConstructAudioStructureL_OperatorVariantL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1771 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1772 |
EUNIT_TEST( |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1773 |
"EstablishSessionL - test ", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1774 |
"CMusEngClipSession", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1775 |
"EstablishSessionL", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1776 |
"FUNCTIONALITY", |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1777 |
SetupL, UT_EstablishSessionLL, Teardown) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1778 |
|
33 | 1779 |
EUNIT_TEST( |
1780 |
"IsRewindFromEnd - test ", |
|
1781 |
"CMusEngClipSession", |
|
1782 |
"IsRewindFromEnd", |
|
1783 |
"FUNCTIONALITY", |
|
1784 |
SetupL, UT_IsRewindFromEndL, Teardown) |
|
1785 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1786 |
EUNIT_END_TEST_TABLE |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1787 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1788 |
// END OF FILE |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1789 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1790 |