[Clientapps-cvs] symbianMmf/videocontroller hxmmfctrlimpl.cpp, 1.12.2.58, 1.12.2.58.2.1
junhliu at helixcommunity.org junhliu at helixcommunity.orgUpdate of /cvsroot/clientapps/symbianMmf/videocontroller
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv4350
Modified Files:
Tag: hxclient_2_2_1_cayennes
hxmmfctrlimpl.cpp
Log Message:
"Nokia submits this code under the terms of a commercial contribution agreement
with RealNetworks, and I am authorized to contribute this code under said agreement."
Modified by: junhong.liu at nokia.com
Reviewed by:
Date: 07-Feb-2008
Project: SymbianMmf_Rel
TSW: RBEL-7ART7A
Synopsis: Helix won't set scaling option to DevVideo when the frame size info is not avalible.
Overview: When the frame size info is not avaliable for helix engine, either because it's missing from SDP or from the file header, helix won't set scaling option to DevVideo. The post-processor will do the auto scaling based on the frame size info from the decoder in this case.
Files Modified:
/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp
/datatype/mdf/video/renderer/mdfvideoadapter.cpp,v
Image Size and Heap Use impact: None
Module Release testing (STIF) : Pass
Test case(s) Added : No
Memory leak check performed : No new leaks introduced.
Platforms and Profiles Build Verified:
Profile -> helix-client-s60-32-mmf-mdf-arm
BIF branch -> helix_restricted
SYSTEM_ID -> symbian-91-armv5
Target -> symbianMmf_rel
Platforms and Profiles Functionality verified: armv5, winscw
Branch: 210CayS, 221CayS& head
Index: hxmmfctrlimpl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp,v
retrieving revision 1.12.2.58
retrieving revision 1.12.2.58.2.1
diff -u -d -r1.12.2.58 -r1.12.2.58.2.1
--- hxmmfctrlimpl.cpp 4 Sep 2007 20:40:47 -0000 1.12.2.58
+++ hxmmfctrlimpl.cpp 11 Feb 2008 18:32:58 -0000 1.12.2.58.2.1
@@ -259,14 +259,14 @@
if(m_pStateCtrl != NULL)
{
- if(m_bIsProtected &&
+ if(m_bIsProtected &&
(!m_bDisableAutoIntent || (m_bConsumeRightsForWMDRM && m_bWMDRMContent))
)
- {
+ {
User::LeaveIfError(m_pFileSource->ExecuteIntent(m_DRMIntent));
}
m_pStateCtrl->Play();
-
+
m_nextEvent = PlaybackComplete;
}
else
@@ -282,7 +282,7 @@
if(m_pStateCtrl != NULL)
{
- if(m_bIsProtected &&
+ if(m_bIsProtected &&
(!m_bDisableAutoIntent || (m_bConsumeRightsForWMDRM && m_bWMDRMContent))
)
{
@@ -302,13 +302,13 @@
if(m_pStateCtrl != NULL)
{
m_nextEvent = ErrorEvent;
-
+
m_pStateCtrl->Stop();
- if(m_bIsProtected &&
+ if(m_bIsProtected &&
(!m_bDisableAutoIntent || (m_bConsumeRightsForWMDRM && m_bWMDRMContent))
)
- {
+ {
User::LeaveIfError(m_pFileSource->ExecuteIntent(ContentAccess::EStop));
}
}
@@ -332,7 +332,7 @@
}
m_ulDownloadID = downloadID();
- HXLOGL2(HXLOG_SMMF,
+ HXLOGL2(HXLOG_SMMF,
"HXMMFCtrlImpl::GetDownloadID downloadID=%u", downloadID());
return status;
@@ -348,7 +348,7 @@
if(aMessage.SizeOfData1FromClient() != downloadComplete.Length() ||
aMessage.ReadData1FromClient(downloadComplete) != KErrNone)
{
- HXLOGL1(HXLOG_SMMF,
+ HXLOGL1(HXLOG_SMMF,
"HXMMFCtrlImpl::SetDownloadComplete failed");
status = KErrNotFound;
}
@@ -357,8 +357,8 @@
if(m_pDownloadObserver)
{
m_pDownloadObserver->SetDownloadComplete(downloadComplete());
- HXLOGL2(HXLOG_SMMF,
- "HXMMFCtrlImpl::SetDownloadComplete value=%u",
+ HXLOGL2(HXLOG_SMMF,
+ "HXMMFCtrlImpl::SetDownloadComplete value=%u",
downloadComplete());
}
}
@@ -376,7 +376,7 @@
if(aMessage.SizeOfData1FromClient() != downloadSize.Length() ||
aMessage.ReadData1FromClient(downloadSize) != KErrNone)
{
- HXLOGL1(HXLOG_SMMF,
+ HXLOGL1(HXLOG_SMMF,
"HXMMFCtrlImpl::SetDownloadSize failed");
status = KErrNotFound;
}
@@ -385,7 +385,7 @@
if(m_pDownloadObserver)
{
m_pDownloadObserver->SetDownloadSize( downloadSize() );
- HXLOGL4(HXLOG_SMMF,
+ HXLOGL4(HXLOG_SMMF,
"HXMMFCtrlImpl::SetDownloadSize size=%u", downloadSize());
}
}
@@ -401,7 +401,7 @@
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::SetScalingType()");
TPckg<TInt> ulScalingTypePckg(EMMFDefaultScaling);
-
+
if ( aMessage.SizeOfData1FromClient() != ulScalingTypePckg.Length() ||
aMessage.ReadData1FromClient(ulScalingTypePckg) != KErrNone )
{
@@ -409,14 +409,14 @@
status = KErrNotFound;
}
else
- {
+ {
TRAP(status, DoCreateEngineIfRequiredL());
if (status == KErrNone)
- {
+ {
status = m_pSurfaceControl->SetScalingType(ulScalingTypePckg());
}
}
-
+
return status;
}
@@ -428,16 +428,16 @@
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::GetScalingType()");
UINT32 ulScalingType = EMMFDefaultScaling;
-
-
+
+
TRAP(status, DoCreateEngineIfRequiredL());
if (status == KErrNone)
- {
+ {
status = m_pSurfaceControl->GetScalingType(ulScalingType);
}
-
+
TPckg<TInt> ulScalingTypePckg(ulScalingType);
- aMessage.WriteDataToClient(ulScalingTypePckg);
+ aMessage.WriteDataToClient(ulScalingTypePckg);
return status;
}
@@ -550,7 +550,7 @@
else if ( aMessage.Destination().InterfaceId() == KUidInterfaceMMFControllerScalingMsg )
{
switch (aMessage.Function())
- {
+ {
case EMMFGetScalingType:
status = GetScalingType(aMessage);
break;
@@ -584,7 +584,7 @@
if(m_ulDownloadID > 0 && m_pDownloadObserver && m_pFileSource && m_pRequest)
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcPrepare(), PROGRESSIVE DOWNLOAD ENABLED");
-
+
// set the URL to use the progressive download scheme
TBuf<KMaxFileName> fileName;
fileName.Append(m_pFileSource->FullName());
@@ -705,9 +705,9 @@
{
UINT32 ulStart = INT64_TO_UINT32(aStart.Int64()/1000);
UINT32 ulEnd = INT64_TO_UINT32(aEnd.Int64()/1000);
-
+
UINT32 ulDuration = m_pStateCtrl->GetDuration();
-
+
//
// Check for valid times
//
@@ -715,22 +715,22 @@
{
ulStart = 0;
}
-
+
if ( ulEnd < ulStart || ulEnd > ulDuration )
{
ulEnd = ulDuration;
}
-
+
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcPlayL(%lu,%lu)",ulStart,ulEnd);
-
- if(m_bIsProtected &&
+
+ if(m_bIsProtected &&
(!m_bDisableAutoIntent || (m_bConsumeRightsForWMDRM && m_bWMDRMContent))
)
{
User::LeaveIfError(m_pFileSource->ExecuteIntent(m_DRMIntent));
}
-
+
rc = m_pStateCtrl->PlayRange(ulStart,ulEnd);
} // End of if(m_pStateCtrl != NULL)
@@ -918,13 +918,13 @@
HXMMFCtrlImpl::MvcGetVideoBitRateL(TInt& aBitRate)
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcGetVideoBitRateL()");
-
+
aBitRate = 0;
if(m_pMetaData != NULL)
{
if( m_pMetaData->DoesStreamExist( "Video" ) )
{
-
+
m_pMetaData->FindStreamValueByName( "Video", "AvgBitRate", aBitRate );
}
}
@@ -1101,8 +1101,8 @@
{
if(m_nextEvent == ErrorEvent)
{
- // Save any ErrorEvent error code to be sent again as
- // a non-ErrorEvent, e.g. PrepareComplete. This is
+ // Save any ErrorEvent error code to be sent again as
+ // a non-ErrorEvent, e.g. PrepareComplete. This is
// necessary since Media Player currently ignores ErrorEvents.
m_ulSavedProgDownError = ulHXCode_local;
}
@@ -1113,8 +1113,8 @@
{
ulHXCode_local = m_ulSavedProgDownError;
- HXLOGL1(HXLOG_SMMF,
- "HXMMFCtrlImpl::OnError() - HXCode changed from %lx to %lx",
+ HXLOGL1(HXLOG_SMMF,
+ "HXMMFCtrlImpl::OnError() - HXCode changed from %lx to %lx",
ulHXCode, ulHXCode_local);
}
}
@@ -1307,7 +1307,11 @@
#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
/* Initialization. */
- m_pSurfaceControl->SetFrameRect(CHXxRect(0, 0, m_lFrameWidth, m_lFrameHeight));
+
+ if ((m_lFrameWidth != 0) || (m_lFrameHeight != 0))
+ {
+ m_pSurfaceControl->SetFrameRect(CHXxRect(0, 0, m_lFrameWidth, m_lFrameHeight));
+ }
//The Site nor the MDF will have knowledge of any roatation value
//so we send them again