--- a/mmsharing/mmshengine/inc/musengclipsession.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengclipsession.h Tue May 11 16:10:30 2010 +0300
@@ -31,7 +31,6 @@
class CMceVideoStream;
class CMceAudioCodec;
-
class CMusEngClipSession : public CMusEngMceOutSession
{
MUS_UNITTEST( UT_CMusEngClipSession )
@@ -197,7 +196,7 @@
void AddAmrCodecL( CMceAudioStream& aAudioStream );
- void AddVideoCodecL( CMceVideoStream& aVideoStream );
+ void AddVideoCodecL( CMceVideoStream& aVideoStream, TBool aIgnoreNegotiated = EFalse );
TBool HasClipEnded();
@@ -218,6 +217,12 @@
void DetermineBufferingPeriod( CMceMediaStream& aStream );
TBool IsH264Supported() const;
+
+ void HandleTranscodingFailureL( TInt aError );
+
+ TInt DoCompleteTranscoding();
+
+ void DeleteTranscodingDestinationFileL();
private: // Data
@@ -242,6 +247,7 @@
TFileName iTranscodingDestFileName;
TBool iRewindedToBeginning;
+ TBool iTranscodingRequiredDueMissingOptions;
};
--- a/mmsharing/mmshengine/inc/musengclipsessionobserver.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshengine/inc/musengclipsessionobserver.h Tue May 11 16:10:30 2010 +0300
@@ -42,8 +42,10 @@
/**
* Indicates that chosen clip must be transcoded before sharing.
+ * @param aDueUnknownRemoteCapabilities, ETrue if transcoding is needed because
+ * it is unknown whether remote end can support current format of clip.
*/
- virtual void TranscodingNeeded() = 0;
+ virtual void TranscodingNeeded(TBool aDueUnknownRemoteCapabilities) = 0;
/**
* Indicates that transcoding has progressed.
@@ -70,4 +72,4 @@
};
-#endif
\ No newline at end of file
+#endif
--- a/mmsharing/mmshengine/src/musengclipsession.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshengine/src/musengclipsession.cpp Tue May 11 16:10:30 2010 +0300
@@ -313,11 +313,12 @@
}
}
- file->TranscodeL( aFileName );
-
+ // Set dest file already before transcoding as output file is deleted in failure case
+ iTranscodingDestFileName = aFileName;
+ TRAPD( err, file->TranscodeL( aFileName ) );
+ HandleTranscodingFailureL( err );
iTranscodingOngoing = ETrue;
-
- iTranscodingDestFileName = aFileName;
+
MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::TranscodeL(...)" )
}
@@ -341,20 +342,8 @@
// Even if cancel fails, try to delete the partial clip
MUS_LOG( "mus: [ENGINE] - delete the partially converted clip" )
- RFs fs;
- User::LeaveIfError( fs.Connect() );
- CleanupClosePushL( fs );
-
- CFileMan* fileMan = CFileMan::NewL( fs );
- CleanupStack::PushL( fileMan );
-
- MUS_LOG_TDESC8( "mus: [ENGINE] - trascoding destination filename",
- iTranscodingDestFileName )
- err = fileMan->Delete( iTranscodingDestFileName );
- MUS_LOG1( "mus: [ENGINE] - file delete result %d", err )
-
- CleanupStack::PopAndDestroy( fileMan );
- CleanupStack::PopAndDestroy(); // fs
+
+ DeleteTranscodingDestinationFileL();
MUS_LOG( "mus: [ENGINE] <- CMusEngClipSession::CancelTranscodeL()" )
}
@@ -483,6 +472,7 @@
const RPointerArray<CMceMediaStream>& streams = iSession->Streams();
TBool transcodingRequired = EFalse;
+ TBool transcodingRequiredDueUnknownCaps = EFalse;
if ( iVideoCodecList )
{
@@ -492,25 +482,31 @@
CMceVideoStream* videoStream = NULL;
for ( TInt i = 0; i < streams.Count(); ++i )
{
- if ( streams[i]->State() == CMceMediaStream::ETranscodingRequired )
+ videoStream = static_cast<CMceVideoStream*>( streams[i] );
+
+ if ( iTranscodingRequiredDueMissingOptions )
+ {
+ MUS_LOG( " -> establish with current codec, remote capa unknown!!!" )
+ TBool ignoreOptionsQueryCodecs( ETrue );
+ AddVideoCodecL( *videoStream, ignoreOptionsQueryCodecs );
+ }
+ else if ( streams[i]->State() == CMceMediaStream::ETranscodingRequired )
{
transcodingRequired = ETrue;
}
- else if ( streams[i]->Type() == KMceVideo &&
- !IsH264Supported() )
+ else if ( streams[i]->Type() == KMceVideo && !IsH264Supported() )
{
MUS_LOG( " -> video stream found!!!" )
- videoStream = static_cast<CMceVideoStream*>( streams[i] );
//transcoding of H264 is not needed only if we know explicitly
- //that the peer supports it (from OPTIONS response)
-
+ //that the peer supports it (from OPTIONS response)
const RPointerArray<CMceVideoCodec>& codecs = videoStream->Codecs();
for ( TInt codecIndex = 0; codecIndex < codecs.Count(); ++codecIndex )
{
if ( codecs[codecIndex]->SdpName() == KMceSDPNameH264() )
{
transcodingRequired = ETrue;
+ transcodingRequiredDueUnknownCaps = !iVideoCodecList;
MUS_LOG( " -> Removing H264 codec from video stream" )
videoStream->RemoveCodecL( *codecs[codecIndex] );
codecIndex = 0;
@@ -526,9 +522,11 @@
}
}
+ iTranscodingRequiredDueMissingOptions = transcodingRequiredDueUnknownCaps;
+
if ( transcodingRequired )
{
- iClipSessionObserver.TranscodingNeeded();
+ iClipSessionObserver.TranscodingNeeded(iTranscodingRequiredDueMissingOptions);
}
else
{
@@ -595,18 +593,7 @@
// there's no getter for the filename in API.
iFileName = iTranscodingDestFileName;
- iTranscodingOngoing = EFalse;
-
- iClipSessionObserver.TranscodingCompletedInit();
-
- TRAPD( error, EstablishSessionL() )
- if ( error != KErrNone )
- {
- iSessionObserver.SessionFailed();
- }
-
- // Next call does not return before session establishment
- iClipSessionObserver.TranscodingCompletedFinalize();
+ DoCompleteTranscoding();
}
}
else if ( aStream.State() == CMceMediaStream::ETranscodingRequired &&
@@ -616,6 +603,7 @@
iClipSessionObserver.TranscodingFailed();
iTranscodingOngoing = EFalse;
+ iTranscodingRequiredDueMissingOptions = EFalse;
}
else if ( HasClipEnded() )
{
@@ -741,7 +729,8 @@
// otherwise H263 is used.
// -----------------------------------------------------------------------------
//
-void CMusEngClipSession::AddVideoCodecL( CMceVideoStream& aVideoStream )
+void CMusEngClipSession::AddVideoCodecL(
+ CMceVideoStream& aVideoStream, TBool aIgnoreNegotiated )
{
MUS_LOG( "mus: [ENGINE] -> CMusEngClipSession::AddVideoCodecL" )
@@ -757,8 +746,8 @@
CMceVideoCodec* addedCodec = NULL;
- TPtrC8 addedCodecName =
- IsH264Supported() ? KMceSDPNameH264() : KMceSDPNameH2632000();
+ TPtrC8 addedCodecName = ( aIgnoreNegotiated || IsH264Supported() ) ?
+ KMceSDPNameH264() : KMceSDPNameH2632000();
MUS_LOG_TDESC8( "mus: [ENGINE] adding codec : ", addedCodecName );
@@ -1007,6 +996,67 @@
{
return ( iVideoCodecList && iVideoCodecList->FindF( KMceSDPNameH264() ) >= 0 );
}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngClipSession::HandleTranscodingFailureL( TInt aError )
+ {
+ if ( aError == KErrNone )
+ {
+ return;
+ }
+
+ TRAP_IGNORE( DeleteTranscodingDestinationFileL() )
+
+ User::LeaveIfError( aError );
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CMusEngClipSession::DoCompleteTranscoding()
+ {
+ iTranscodingOngoing = EFalse;
+
+ iClipSessionObserver.TranscodingCompletedInit();
+
+ TRAPD( error, EstablishSessionL() )
+ iTranscodingRequiredDueMissingOptions = EFalse;
+ if ( error != KErrNone )
+ {
+ iSessionObserver.SessionFailed();
+ }
+ // Next call does not return before session establishment
+ iClipSessionObserver.TranscodingCompletedFinalize();
+
+ return error;
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusEngClipSession::DeleteTranscodingDestinationFileL()
+ {
+ RFs fs;
+ User::LeaveIfError( fs.Connect() );
+ CleanupClosePushL( fs );
+
+ CFileMan* fileMan = CFileMan::NewL( fs );
+ CleanupStack::PushL( fileMan );
+
+ MUS_LOG_TDESC8( "mus: [ENGINE] - deleting trascoding destination, filename",
+ iTranscodingDestFileName )
+ TInt err = fileMan->Delete( iTranscodingDestFileName );
+ MUS_LOG1( "mus: [ENGINE] - file delete result %d", err )
+
+ CleanupStack::PopAndDestroy( fileMan );
+ CleanupStack::PopAndDestroy(); // fs
+ }
+
// End of file
--- a/mmsharing/mmshengine/src/musengtelephoneutils.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshengine/src/musengtelephoneutils.cpp Tue May 11 16:10:30 2010 +0300
@@ -61,14 +61,20 @@
{
CTelephonyAudioRouting::TAudioOutput currentMode =
iTelephonyAudioRouting->Output();
- if( currentMode != iAudioOutputAtStartup )
+ MUS_LOG1( "mus: [ENGINE] iAudioOutputAtStartup: %d", iAudioOutputAtStartup );
+ MUS_LOG1( "mus: [ENGINE] currentMode: %d", currentMode );
+ // When active call is dropped, audio output is set to ENotActive,
+ // but in some cases Mush engine get deleted before OutputChanged()
+ // notification comes. In that case we shouldn't touch output.
+ if( currentMode != iAudioOutputAtStartup &&
+ currentMode != CTelephonyAudioRouting::ENotActive )
{
// As going down, let audiorouting api to show notification
iTelephonyAudioRouting->SetShowNote( ETrue );
TRAPD( err, DoSetOutputL( iAudioOutputAtStartup ) );
MUS_LOG1( "mus: [ENGINE] final route change completed: %d", err )
err++;
- }
+ }
}
if ( iNotifier )
@@ -438,7 +444,7 @@
iTelephonyAudioRouting = CTelephonyAudioRouting::NewL( *this );
iAudioOutputAtStartup = iTelephonyAudioRouting->Output();
-
+ MUS_LOG1( "mus: [ENGINE] iAudioOutputAtStartup: %d", iAudioOutputAtStartup );
// Phone
MUS_LOG( "mus: [ENGINE] Use static DLL" )
iPhoneCommandHandler = CPhCltCommandHandler::NewL();
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/musengstubs.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/musengstubs.h Tue May 11 16:10:30 2010 +0300
@@ -120,7 +120,7 @@
void EndOfClip();
- void TranscodingNeeded();
+ void TranscodingNeeded(TBool aDueUnknowCapas);
void TranscodingProgressed( TInt aPercentage );
@@ -208,6 +208,7 @@
HBufC* iIncomingSessionOriginator;
TInt iVolume;
+ TBool iDueUnknowCapas;
};
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/musengstubs.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/musengstubs.cpp Tue May 11 16:10:30 2010 +0300
@@ -290,9 +290,10 @@
//
// -----------------------------------------------------------------------------
//
-void CMusEngObserverStub::TranscodingNeeded()
+void CMusEngObserverStub::TranscodingNeeded(TBool aDueUnknowCapas)
{
iTranscodingNeededCalled = ETrue;
+ iDueUnknowCapas = aDueUnknowCapas;
}
@@ -492,6 +493,7 @@
iShowNote = EFalse;
iAudioRouteChangeAllowed = ETrue;
iVolume = 0;
+ iDueUnknowCapas = EFalse;
}
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengclipsession.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengclipsession.cpp Tue May 11 16:10:30 2010 +0300
@@ -409,7 +409,7 @@
// is cleared.
file->iPosition = 10000000;
iClipSession->iFRWDStartTime = TTime( 0 );
-
+ iClipSession->iRewindedToBeginning = EFalse;
EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 10000000 )
EUNIT_ASSERT( iClipSession->iRewindedToBeginning == EFalse )
}
@@ -1454,7 +1454,8 @@
}
}
- EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled )
+ EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled )
+ EUNIT_ASSERT( !iClipSession->iTranscodingRequiredDueMissingOptions )
///////
// 2.Test the case when we don't know whether peer supports H264,
@@ -1483,10 +1484,34 @@
}
EUNIT_ASSERT( iObserver->iTranscodingNeededCalled )
-
+ EUNIT_ASSERT( iObserver->iDueUnknowCapas )
+ EUNIT_ASSERT( iClipSession->iTranscodingRequiredDueMissingOptions )
///////
- // 3.Test that if peer doesn't supports H264, transcoding is needed
+ // 3. Establish behaves differently at second round in case clip is AVC
+ // and because remote party's capabilities were unknown. Use-case is such
+ // that AVC is tried to be transcoded first but if it fails, invite is retried
+ // by using AVC
+ iObserver->Reset();
+ iClipSession->InviteL( KTestRecipientSipUri );
+ const RPointerArray<CMceMediaStream>& testStreams = iClipSession->iSession->Streams();
+
+ for ( TInt i = 0; i < testStreams.Count(); ++i )
+ {
+ if ( testStreams[i]->Type() == KMceVideo )
+ {
+ CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( testStreams[i] );
+ const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs();
+ EUNIT_ASSERT_EQUALS( codecs.Count(), 1 )
+ EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 )
+ }
+ }
+
+ EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled )
+ EUNIT_ASSERT( !iObserver->iDueUnknowCapas )
+
+ ///////
+ // 4.Test that if peer doesn't supports H264, transcoding is needed
// H264 codec has to be removed from the codec list
iObserver->iTranscodingNeededCalled = EFalse;
@@ -1503,7 +1528,7 @@
for ( TInt i = 0; i < streams3.Count(); ++i )
{
- if ( streams2[i]->Type() == KMceVideo )
+ if ( streams3[i]->Type() == KMceVideo )
{
CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( streams3[i] );
const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs();
@@ -1513,6 +1538,7 @@
}
EUNIT_ASSERT( iObserver->iTranscodingNeededCalled )
+ EUNIT_ASSERT( !iObserver->iDueUnknowCapas )
}
--- a/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtelephoneutils.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/src/ut_musengtelephoneutils.cpp Tue May 11 16:10:30 2010 +0300
@@ -434,8 +434,12 @@
CleanupStack::PushL( utils );
utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
utils->iTelephonyAudioRouting->iCurrentOutput =
- CTelephonyAudioRouting::EHandset;
+ CTelephonyAudioRouting::EHandset;
+ CTelephonyAudioRouting::iPreviousOutput =
+ CTelephonyAudioRouting::ELoudspeaker;
CleanupStack::PopAndDestroy( utils );
+ EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput ==
+ CTelephonyAudioRouting::ELoudspeaker )
// Simulate that current audio output mode is not the same as original,
// Setting fails
@@ -444,8 +448,14 @@
utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
utils->iTelephonyAudioRouting->iCurrentOutput =
CTelephonyAudioRouting::ELoudspeaker;
+ CTelephonyAudioRouting::iPreviousOutput =
+ CTelephonyAudioRouting::EHandset;
utils->iTelephonyAudioRouting->iForceFailWithCode = KErrGeneral;
CleanupStack::PopAndDestroy( utils );
+ EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput ==
+ CTelephonyAudioRouting::EHandset )
+ EUNIT_ASSERT( CTelephonyAudioRouting::iCurrentOutput ==
+ CTelephonyAudioRouting::ELoudspeaker )
// Simulate that current audio output mode is not the same as original,
// Setting succeeds
@@ -454,9 +464,30 @@
utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
utils->iTelephonyAudioRouting->iCurrentOutput =
CTelephonyAudioRouting::ELoudspeaker;
+ CTelephonyAudioRouting::iPreviousOutput =
+ CTelephonyAudioRouting::EHandset;
CleanupStack::PopAndDestroy( utils );
+ EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput ==
+ CTelephonyAudioRouting::ELoudspeaker )
+ EUNIT_ASSERT( CTelephonyAudioRouting::iCurrentOutput ==
+ CTelephonyAudioRouting::EHandset )
// Simulate that current audio output mode is not the same as original,
+ // Setting not done due to special case handling (ENotActive)
+ utils = CMusEngTelephoneUtils::NewL();
+ CleanupStack::PushL( utils );
+ utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
+ utils->iTelephonyAudioRouting->iCurrentOutput =
+ CTelephonyAudioRouting::ENotActive;
+ CTelephonyAudioRouting::iPreviousOutput =
+ CTelephonyAudioRouting::ELoudspeaker;
+ CleanupStack::PopAndDestroy( utils );
+ EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput ==
+ CTelephonyAudioRouting::ELoudspeaker )
+ EUNIT_ASSERT( CTelephonyAudioRouting::iCurrentOutput ==
+ CTelephonyAudioRouting::ENotActive )
+
+ // Simulate that current audio output mode is not the same as original,
// Setting does not succeed as observer does not allow changes anymore
utils = CMusEngTelephoneUtils::NewL();
iObserver->iAudioRouteChangeAllowed = EFalse;
@@ -465,8 +496,13 @@
utils->iAudioOutputAtStartup = CTelephonyAudioRouting::EHandset;
utils->iTelephonyAudioRouting->iCurrentOutput =
CTelephonyAudioRouting::ELoudspeaker;
+ CTelephonyAudioRouting::iPreviousOutput =
+ CTelephonyAudioRouting::EHandset;
CleanupStack::PopAndDestroy( utils );
- // Cannot really assert anything
+ EUNIT_ASSERT( CTelephonyAudioRouting::iPreviousOutput ==
+ CTelephonyAudioRouting::EHandset )
+ EUNIT_ASSERT( CTelephonyAudioRouting::iCurrentOutput ==
+ CTelephonyAudioRouting::ELoudspeaker )
}
// -----------------------------------------------------------------------------
--- a/mmsharing/mmshui/inc/musuiclipsharingcontroller.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuiclipsharingcontroller.h Tue May 11 16:10:30 2010 +0300
@@ -127,7 +127,7 @@
virtual void EndOfClip();
- virtual void TranscodingNeeded();
+ virtual void TranscodingNeeded(TBool aDueUnknownRemoteCapabilities);
virtual void TranscodingProgressed( TInt aPercentage );
@@ -176,6 +176,8 @@
TBool DoFastForwardingL( TBool aUseWinding );
TBool DoFastRewindingL( TBool aUseWinding );
+
+ TBool DoInviteL();
private:
@@ -192,6 +194,8 @@
TBool iTranscode;
+ TBool iTranscodeDueUnknownRemoteCapas;
+
TBool iTranscodingGoing;
TBool iToolbarFFRevSelected;
--- a/mmsharing/mmshui/inc/musuiclipsharingview.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuiclipsharingview.h Tue May 11 16:10:30 2010 +0300
@@ -106,7 +106,7 @@
public: // new functions
- void RefreshView();
+ void RefreshView( TBool aLayoutChange = EFalse );
void CancelTranscodingL();
--- a/mmsharing/mmshui/inc/musuidefinitions.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuidefinitions.h Tue May 11 16:10:30 2010 +0300
@@ -86,7 +86,8 @@
EMusUiAsyncStartInvitation,
EMusUiAsyncStartMediaGallery,
EMusUiAsyncStartTranscoding,
- EMusUiAsyncHandleExit
+ EMusUiAsyncHandleExit,
+ EMusUiAsyncRefreshView
};
enum TMusUiNaviMediaDecorator
--- a/mmsharing/mmshui/inc/musuieventcontroller.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuieventcontroller.h Tue May 11 16:10:30 2010 +0300
@@ -436,6 +436,11 @@
*
*/
CMusUiPropertyWatch* iStatusPropertyWatch;
+
+ /**
+ *
+ */
+ CMusUiPropertyWatch* iMicMuteStatusPropertyWatch;
/**
*
--- a/mmsharing/mmshui/inc/musuigeneralview.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuigeneralview.h Tue May 11 16:10:30 2010 +0300
@@ -78,7 +78,7 @@
* to landscape or vice versa. This is a virtual function that must be
* implemented by all concrete MUS UI views.
*/
- virtual void RefreshView() = 0;
+ virtual void RefreshView( TBool aLayoutChange = EFalse ) = 0;
virtual void HandleToolbarCommandL( TInt aCommand ) = 0;
--- a/mmsharing/mmshui/inc/musuilivesharingcontroller.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuilivesharingcontroller.h Tue May 11 16:10:30 2010 +0300
@@ -84,7 +84,8 @@
virtual void InviteL( const TDesC& aRecipient );
virtual void HandleSliderValueChangeL( TInt aNewLevel );
-
+
+ virtual void HandleAsyncEventL( TMusUiAsyncEvent aEventId );
public: // new functions
@@ -155,6 +156,7 @@
void InactivityTimeout();
+ void AsyncRefreshView();
private:
--- a/mmsharing/mmshui/inc/musuilivesharingobserver.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuilivesharingobserver.h Tue May 11 16:10:30 2010 +0300
@@ -42,8 +42,9 @@
virtual void SetBrightnessVisible( TBool aVisible ) = 0;
-
- };
+ virtual void DoRefreshView() = 0;
+
+ };
#endif // MUSUILIVESHARINGOBSERVER_H
--- a/mmsharing/mmshui/inc/musuilivesharingview.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuilivesharingview.h Tue May 11 16:10:30 2010 +0300
@@ -100,7 +100,9 @@
public: // new functions
- void RefreshView();
+ void RefreshView( TBool aLayoutChange );
+
+ void DoRefreshView();
void LevelIndicatorDismissed();
--- a/mmsharing/mmshui/inc/musuireceiveview.h Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/inc/musuireceiveview.h Tue May 11 16:10:30 2010 +0300
@@ -93,7 +93,7 @@
public: // new functions
- void RefreshView();
+ void RefreshView( TBool aLayoutChange );
protected: // from MusUiGeneralView
--- a/mmsharing/mmshui/src/musuiappui.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/src/musuiappui.cpp Tue May 11 16:10:30 2010 +0300
@@ -532,6 +532,8 @@
{
MUS_LOG( "mus: [MUSUI ] CMusUiAppUi::HandleResourceChangeL:\
aResourceChangeType == KEikDynamicLayoutVariantSwitch" );
+
+ iView->Toolbar()->HandleResourceChange( aResourceChangeType );
CMusUiGeneralView* activatedView =
static_cast<CMusUiGeneralView*>( iView );
@@ -543,7 +545,7 @@
if ( activatedView )
{
- activatedView->RefreshView();
+ activatedView->RefreshView( ETrue );
}
}
--- a/mmsharing/mmshui/src/musuibackgroundviewcontainer.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/src/musuibackgroundviewcontainer.cpp Tue May 11 16:10:30 2010 +0300
@@ -72,6 +72,8 @@
iMyWindowGroup.SetName( KMusUiBackgroundWindowGroupName );
iMyWindowGroup.SetOrdinalPosition( iOrdinalPosition, ECoeWinPriorityNormal );
iMyWindowGroup.EnableReceiptOfFocus( EFalse );
+ iMyWindowGroup.AutoForeground( EFalse );
+ iMyWindowGroup.SetNonFading( ETrue );
CreateWindowL(&iMyWindowGroup);
--- a/mmsharing/mmshui/src/musuiclipsharingcontroller.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/src/musuiclipsharingcontroller.cpp Tue May 11 16:10:30 2010 +0300
@@ -327,47 +327,17 @@
iAddress = aRecipient.AllocL();
- TRAPD( err, iSession->InviteL( aRecipient ) );
- MUS_LOG( "mus: [MUSUI ] CMusUiClipSharingController::InviteL: After TRAPD" );
-
- // If address is in wrong format, Manual Address Entry Dialog
- // is displayed
- if ( err != KErrNone )
+ TBool inviteProceeding = DoInviteL();
+ if ( !inviteProceeding )
{
- DismissWaitDialog();
- MusUiDialogUtil::ShowGlobalErrorDialogL(
- R_MUS_LIVE_SHARING_VIEW_NOTE_INVITE_ERROR );
- if ( ( ++iTriedInvitations < 2 ) && ( err == KErrArgument ) )
- {
- MUS_LOG( "mus: [MUSUI ] CMusUiLiveSharingController::InviteL: iTriedInvitations < 2" );
- iManualAddressTyped = ETrue;
- iResourceHandler->RequestKeypadL( ETrue );
-
- // If the address has to be queried again...:
- iTranscode = EFalse;
-
- MUS_LOG_TDESC( "mus: [MUSUI ] CMusUiClipSharingController::InviteL: ",
- iFileName->Des() )
-
- iSendObserver.ManualAddressEntryL( *iRemoteSipAddressProposal );
- return;
- }
- else
- {
- MUS_LOG( "mus: [MUSUI ] CMusUiLiveSharingController::InviteL: ++iTriedInvitations > 1" );
- DeleteEngineSession();
- HandleExitL();
- return;
- }
- }
-
-
+ MUS_LOG( "mus: [MUSUI ] <- CMusUiClipSharingController::InviteL, invite failed" );
+ return;
+ }
if( iTranscode )
{
MUS_LOG( "mus: [MUSUI ] Starting transcode..." );
iTranscode = EFalse;
- // Show progress dialog:
- iClipObserver.ShowTranscodingProgressDialogL();
+
// Start transcoding
iTranscodingGoing = ETrue;
@@ -378,25 +348,39 @@
{
MUS_LOG1( "mus: [MUSUI ] Transcoding failed: %d", err );
iTranscodingGoing = EFalse;
- if ( err == KErrNotFound ) // No Video Editor Engine
+ if ( iTranscodeDueUnknownRemoteCapas )
{
- DismissWaitDialog();
+ MUS_LOG( "mus: [MUSUI ] Retry invite without transcoding" );
+ // Still retry the clip without transcoding as other end might support current codec.
+ iVideoToBeSaved = EFalse;
+ inviteProceeding = DoInviteL();
+ }
+ else if ( err == KErrNotFound ) // No Video Editor Engine
+ {
MusUiDialogUtil::ShowGlobalErrorDialogL(
R_MUS_LIVE_SHARING_VIEW_NOTE_TRANSCODING_NOT_SUPPORTED );
DeleteEngineSession();
iVideoToBeSaved = EFalse;
HandleExitL();
+ inviteProceeding = EFalse;
}
else
{
// Unable to convert clip, if transc. leaves.
// After note return back to the media gallery.
TranscodingFailed();
+ inviteProceeding = EFalse;
}
- return;
+ }
+ else
+ {
+ // Show progress dialog:
+ iClipObserver.ShowTranscodingProgressDialogL();
+ inviteProceeding = EFalse;
}
}
- else
+
+ if ( inviteProceeding )
{
SetConnectionInitialized( ETrue );
ShowInvitingWaitDialogL();
@@ -405,6 +389,46 @@
MUS_LOG( "mus: [MUSUI ] <- CMusUiClipSharingController::InviteL" );
}
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiClipSharingController::DoInviteL()
+ {
+ __ASSERT_ALWAYS( iAddress, User::Leave( KErrNotReady ) );
+ TRAPD( err, iSession->InviteL( *iAddress ) );
+ MUS_LOG( "mus: [MUSUI ] CMusUiClipSharingController::DoInviteL: After TRAPD" );
+
+ // If address is in wrong format, Manual Address Entry Dialog
+ // is displayed
+ if ( err != KErrNone )
+ {
+ DismissWaitDialog();
+ MusUiDialogUtil::ShowGlobalErrorDialogL(
+ R_MUS_LIVE_SHARING_VIEW_NOTE_INVITE_ERROR );
+ if ( ( ++iTriedInvitations < 2 ) && ( err == KErrArgument ) )
+ {
+ MUS_LOG( "mus: [MUSUI ] CMusUiLiveSharingController::DoInviteL: iTriedInvitations < 2" );
+ iManualAddressTyped = ETrue;
+ iResourceHandler->RequestKeypadL( ETrue );
+
+ // If the address has to be queried again...:
+ iTranscode = EFalse;
+
+ MUS_LOG_TDESC( "mus: [MUSUI ] CMusUiClipSharingController::DoInviteL: ",
+ iFileName->Des() )
+
+ iSendObserver.ManualAddressEntryL( *iRemoteSipAddressProposal );
+ }
+ else
+ {
+ MUS_LOG( "mus: [MUSUI ] CMusUiLiveSharingController::DoInviteL: ++iTriedInvitations > 1" );
+ DeleteEngineSession();
+ HandleExitL();
+ }
+ }
+ return ( err == KErrNone );
+ }
// -----------------------------------------------------------------------------
//
@@ -840,10 +864,12 @@
//
// -----------------------------------------------------------------------------
//
-void CMusUiClipSharingController::TranscodingNeeded()
+void CMusUiClipSharingController::TranscodingNeeded(TBool aDueUnknownRemoteCapabilities)
{
- MUS_LOG( "mus: [MUSUI ] -> CMusUiClipSharingController::TranscodingNeeded" );
+ MUS_LOG1( "mus: [MUSUI ] -> CMusUiClipSharingController::TranscodingNeeded, %d",
+ aDueUnknownRemoteCapabilities);
iTranscode = ETrue;
+ iTranscodeDueUnknownRemoteCapas = aDueUnknownRemoteCapabilities;
MUS_LOG( "mus: [MUSUI ] <- CMusUiClipSharingController::TranscodingNeeded" );
}
--- a/mmsharing/mmshui/src/musuiclipsharingview.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/src/musuiclipsharingview.cpp Tue May 11 16:10:30 2010 +0300
@@ -467,7 +467,7 @@
//
// -----------------------------------------------------------------------------
//
-void CMusUiClipSharingView::RefreshView()
+void CMusUiClipSharingView::RefreshView( TBool aLayoutChange )
{
MUS_LOG( "mus: [MUSUI ] -> CMusUiClipSharingView::RefreshView" );
--- a/mmsharing/mmshui/src/musuieventcontroller.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/src/musuieventcontroller.cpp Tue May 11 16:10:30 2010 +0300
@@ -53,6 +53,7 @@
#include <hlplch.h> // HlpLauncher
#include <AknUtils.h>
+#include <telmicmutestatuspskeys.h>
using namespace MusSettingsKeys;
using namespace NMusSessionApi;
@@ -73,6 +74,7 @@
delete iCallbackService;
delete iMmcMonitor;
delete iActivityManager;
+ delete iMicMuteStatusPropertyWatch;
FeatureManager::UnInitializeLib();
MUS_LOG( "mus: [MUSUI ] <- CMusUiEventController::~CMusUiEventController" );
}
@@ -139,6 +141,12 @@
iMmcMonitor = CMusUiMmcMonitor::NewL( *this );
iResourceHandler = CMusUiResourceHandler::NewL( iEventObserver );
+
+ //Mic mute status property
+ iMicMuteStatusPropertyWatch = CMusUiPropertyWatch::NewL(
+ *this,
+ KPSUidTelMicrophoneMuteStatus,
+ KTelMicrophoneMuteState );
// start monitoring activity
iActivityManager = CMusUiActivityManager::NewL( KMusBacklightTimeOut );
@@ -182,6 +190,20 @@
aKey: [%u] aValue: [%d]", aKey, aValue );
switch( aKey )
{
+ case KTelMicrophoneMuteState:
+ {
+ if ( aValue == EPSTelMicMuteOff)
+ {
+ iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnmute,
+ EMusuiCmdToolbarMute,ETrue );
+ }
+ else if ( aValue == EPSTelMicMuteOn )
+ {
+ iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarMute,
+ EMusuiCmdToolbarUnmute,ETrue );
+ }
+ break;
+ }
case KStatus:
{
TRAP_IGNORE(
--- a/mmsharing/mmshui/src/musuilivesharingcontroller.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/src/musuilivesharingcontroller.cpp Tue May 11 16:10:30 2010 +0300
@@ -158,7 +158,6 @@
PauseL();
EnableDisplayL(false);
EnableDisplayL(true);
- User::After( interval );
PlayL();
}
else
@@ -929,7 +928,38 @@
}
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::AsyncRefreshView()
+ {
+ TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncRefreshView ) );
+ }
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingController::HandleAsyncEventL( TMusUiAsyncEvent aEventId )
+ {
+ MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::HandleAsyncEventL" );
+ switch ( aEventId )
+ {
+ case EMusUiAsyncRefreshView:
+ {
+ iLiveObserver.DoRefreshView();
+ break;
+ }
+ default:
+ {
+ // Not live sharing specific, let the base class handle
+ CMusUiSendController::HandleAsyncEventL( aEventId );
+ }
+ }
+ MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::HandleAsyncEventL" );
+
+ }
// End of file
--- a/mmsharing/mmshui/src/musuilivesharingview.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/src/musuilivesharingview.cpp Tue May 11 16:10:30 2010 +0300
@@ -572,9 +572,32 @@
//
// -----------------------------------------------------------------------------
//
-void CMusUiLiveSharingView::RefreshView()
+void CMusUiLiveSharingView::RefreshView( TBool aLayoutChange )
{
- MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingView::RefreshView" );
+ MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingView::RefreshView" );
+ if ( iController )
+ {
+ if ( aLayoutChange )
+ {
+ iController->AsyncRefreshView();
+ }
+ else
+ {
+ DoRefreshView();
+ }
+
+ }
+ MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingView::RefreshView" );
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMusUiLiveSharingView::DoRefreshView()
+ {
+ MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingView::DoRefreshView" );
if ( iContainer )
{
TRect containerRect( ClientRect().iBr.iX - KMusUiContainerWidth,
@@ -600,8 +623,8 @@
iController->SetRect( videoRect );
}
- MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingView::RefreshView" );
- }
+ MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingView::DoRefreshView" );
+ }
// -----------------------------------------------------------------------------
--- a/mmsharing/mmshui/src/musuireceiveview.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmsharing/mmshui/src/musuireceiveview.cpp Tue May 11 16:10:30 2010 +0300
@@ -386,7 +386,7 @@
//
// -----------------------------------------------------------------------------
//
-void CMusUiReceiveView::RefreshView()
+void CMusUiReceiveView::RefreshView( TBool aLayoutChange )
{
MUS_LOG( "mus: [MUSUI ] -> CMusUiReceiveView::RefreshView" );
--- a/mmshplugins/mmshaoplugin/src/muscallmonitorbase.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/mmshplugins/mmshaoplugin/src/muscallmonitorbase.cpp Tue May 11 16:10:30 2010 +0300
@@ -99,7 +99,13 @@
NMusSessionInformationApi::KMusCallEvent,
aVal ));
}
- }
+ }
+ else if( aVal==NMusSessionInformationApi::EConferenceCall)
+ {
+ User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
+ NMusSessionInformationApi::KMusCallEvent,
+ NMusSessionInformationApi::EConferenceCall ));
+ }
else if( aVal==NMusSessionInformationApi::ECallHold || iRemoteCallEvent==RMobileCall::ERemoteHold )
{
User::LeaveIfError(RProperty::Set( NMusSessionInformationApi::KCategoryUid,
--- a/tsrc/telephonyaudioroutingstub/inc/telephonyaudiorouting.h Tue Apr 27 16:34:06 2010 +0300
+++ b/tsrc/telephonyaudioroutingstub/inc/telephonyaudiorouting.h Tue May 11 16:10:30 2010 +0300
@@ -194,8 +194,8 @@
MTelephonyAudioRoutingObserver& iObserver;
RArray<TAudioOutput> iAvailableOutputs;
- TAudioOutput iCurrentOutput;
- TAudioOutput iPreviousOutput;
+ static TAudioOutput iCurrentOutput;
+ static TAudioOutput iPreviousOutput;
TBool iShowNoteMode;
--- a/tsrc/telephonyaudioroutingstub/src/telephonyaudioroutingstub.cpp Tue Apr 27 16:34:06 2010 +0300
+++ b/tsrc/telephonyaudioroutingstub/src/telephonyaudioroutingstub.cpp Tue May 11 16:10:30 2010 +0300
@@ -20,6 +20,11 @@
+CTelephonyAudioRouting::TAudioOutput CTelephonyAudioRouting::iCurrentOutput =
+ CTelephonyAudioRouting::ENone;
+CTelephonyAudioRouting::TAudioOutput CTelephonyAudioRouting::iPreviousOutput =
+ CTelephonyAudioRouting::ENone;
+
// ============================ MEMBER FUNCTIONS ===============================
@@ -86,6 +91,7 @@
User::Leave( leaveValue );
}
+ iPreviousOutput = iCurrentOutput;
iCurrentOutput = aOutput;
}