[Clientapps-cvs] symbianMmf hxmmfsitesupplier.cpp, 1.1.1.1.2.4, 1.1.1.1.2.5
shy_ward at helixcommunity.org shy_ward at helixcommunity.orgUpdate of /cvsroot/clientapps/symbianMmf
In directory cvs02.internal.helixcommunity.org:/tmp/cvs-serv2380
Modified Files:
Tag: hxclient_2_1_0_cayennes
hxmmfsitesupplier.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: shy.ward at nokia.com
Reviewed by:
Date: 07-Jul-2006.
Project: Helix Symbian player
ErrorId: EOVL-6PLT4G
EOVL-6PLM6X
EOVL-6PLTA4
EOVL-6PLTA4
EOVL-6PMK5X
Synopsis: Java Video player will not play video. And SMIL was not show video on first play.
Two problems were identified in the code.
* Java, in their infinite wisdom, bypasses MMF and directly interfaces with the controller. Therefore we would never get a valid Clipping Region.
The solution is to always make a default clipping region based on the window parameters given in the SetDisplayWindow method.
* SMIL First video play was failing because they send down an initial Window 0,0,0,0 ClipRect 0,0,0,0 and DisplayRegion of 0. We have always had
UI conflicts of starting the DSA with a region of 0. So in this case we know they are not going to display anything so we dont start the DSA. Later in the
sequence we get a valid window and region but the DSA is not started. The solution is to Start the DSA manually in SetDiplayWindow if the UI had started it and the window parameters have changed.
*Other Modification: SetDestRect & SetWindowRect were collapsed into a single call.
*Side Effects: Are slight blinking while rotation and momentary orphan frame on Zeus.
Files Modified:
===========
clientapps/symbianMmf/hxmmfsitesupplier.cpp
clientapps/symbianMmf/hxmmfsitesupplier.h
datatype/mdf/video/renderer/mdfvideoadapter.cpp
datatype/mdf/video/renderer/pub/mdfvideoadapter.h
video/sitelib/platform/symbian/minisymbiansite.cpp
video/sitelib/pub/platform/symbian/minisymbiansite.h
client/include/hxsite3.h
Image Size and Heap Use impact: Minor
Platforms and Profiles Build Verified: helix-client-s60-mmf-mdf-arm helix-client-s60-mmf-mdf-dsp
Platforms and Profiles Functionality verified: armv5
Branch: Helix, 210CayS
Index: hxmmfsitesupplier.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfsitesupplier.cpp,v
retrieving revision 1.1.1.1.2.4
retrieving revision 1.1.1.1.2.5
diff -u -d -r1.1.1.1.2.4 -r1.1.1.1.2.5
--- hxmmfsitesupplier.cpp 13 Mar 2006 21:20:46 -0000 1.1.1.1.2.4
+++ hxmmfsitesupplier.cpp 10 Jul 2006 15:25:29 -0000 1.1.1.1.2.5
@@ -182,11 +182,10 @@
m_WindowRect = aWinRect;
m_ClipRect = aClipRect;
#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
-
- SetWindowRect(CHXxRect(aWinRect.iTl.iX, aWinRect.iTl.iY, aWinRect.iBr.iX, aWinRect.iBr.iY));
-
- SetDestRect(CHXxRect(aClipRect.iTl.iX, aClipRect.iTl.iY, aClipRect.iBr.iX, aClipRect.iBr.iY));
-
+
+ SetWindowParameters( CHXxRect(aWinRect.iTl.iX, aWinRect.iTl.iY, aWinRect.iBr.iX, aWinRect.iBr.iY),
+ CHXxRect(aClipRect.iTl.iX, aClipRect.iTl.iY, aClipRect.iBr.iX, aClipRect.iBr.iY) );
+
#endif //HELIX_FEATURE_MMF_SITE_CONTROL
}
@@ -450,14 +449,14 @@
STDMETHODIMP
HXMMFSiteSupplier::SetRotation(UINT32 ulValue)
{
-
+
IHXSurfaceControl* pSurfaceControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
RotationType ulRotation;
-
+
switch (ulValue)
{
case EVideoRotationClockwise90:
@@ -470,7 +469,7 @@
default:
ulRotation = Rotate0; break;
}
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -493,7 +492,7 @@
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
@@ -515,13 +514,13 @@
STDMETHODIMP
HXMMFSiteSupplier::GetRotation(UINT32 &ulValue)
{
-
+
IHXSurfaceControl* pSurfaceControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -544,7 +543,7 @@
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
@@ -571,7 +570,7 @@
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -594,7 +593,7 @@
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
@@ -621,7 +620,7 @@
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -644,7 +643,7 @@
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
@@ -664,56 +663,6 @@
}
STDMETHODIMP
-HXMMFSiteSupplier::SetWindowRect(HXxRect sValue)
-{
- IHXSurfaceControl* pSurfaceControl = NULL;
- IHXSite* pIterationSite = NULL;
- HRESULT hres;
- UINT32 index;
- UINT32 nNumSites = 0;
-
- m_pSitesManager2->GetNumberOfSites(nNumSites);
- hres = nNumSites;
- for(index = 0; index< nNumSites; index++)
- {
- m_pSitesManager2->GetSiteAt(index, pIterationSite);
- if(pIterationSite)
- {
- pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) &pSurfaceControl);
- if(pSurfaceControl)
- {
- if(pSurfaceControl->SetWindowRect(sValue) == HXR_OK)
- {
- //error tracking of how many sites succeded
- hres--;
- }
- else
- {
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetWindowRect(FALIED)");
- }
- HX_RELEASE(pSurfaceControl);
- }
- }
-
- }
- // Tracking Errors but not acting on them
- // if hres == 0 then all sites succesfully set the param
- // if hres < #sites then at least one site updated
- // if hres == #sites then no site successfully set the param
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetWindowRect()");
- if(hres == nNumSites)
- {
- //no site was set
- return HXR_FAIL;
- }
- else
- {
- //at least one site was set
- return HXR_OK;
- }
-}
-
-STDMETHODIMP
HXMMFSiteSupplier::SetFrameRect(HXxRect sValue)
{
IHXSurfaceControl* pSurfaceControl = NULL;
@@ -721,7 +670,7 @@
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -744,7 +693,7 @@
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
@@ -771,7 +720,7 @@
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -794,7 +743,7 @@
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
@@ -814,14 +763,14 @@
}
STDMETHODIMP
-HXMMFSiteSupplier::SetDestRect(HXxRect sValue)
+HXMMFSiteSupplier::SetScaling(HXFLOAT fWidthPerc, HXFLOAT fHeightPerc, HXBOOL bAntiAlias)
{
IHXSurfaceControl* pSurfaceControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -832,25 +781,25 @@
pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) &pSurfaceControl);
if(pSurfaceControl)
{
- if(pSurfaceControl->SetDestRect(sValue) == HXR_OK)
+ if(pSurfaceControl->SetScaling(fWidthPerc,fHeightPerc,bAntiAlias) == HXR_OK)
{
//error tracking of how many sites succeded
hres--;
}
else
{
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetDestRect(FALIED)");
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetScaling(FALIED)");
}
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
// if hres < #sites then at least one site updated
// if hres == #sites then no site successfully set the param
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetDestRect");
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetScaling( fWidthPerc(%lu) fHeightPerc[%lu] bAntiAlias[%d] )", fWidthPerc, fHeightPerc, bAntiAlias);
if(hres == nNumSites)
{
//no site was set
@@ -863,16 +812,15 @@
}
}
-
STDMETHODIMP
-HXMMFSiteSupplier::SetScaling(HXFLOAT fWidthPerc, HXFLOAT fHeightPerc, HXBOOL bAntiAlias)
+HXMMFSiteSupplier::GetScaling(HXFLOAT &fWidthPerc, HXFLOAT &fHeightPerc, HXBOOL &bAntiAlias)
{
IHXSurfaceControl* pSurfaceControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -883,46 +831,47 @@
pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) &pSurfaceControl);
if(pSurfaceControl)
{
- if(pSurfaceControl->SetScaling(fWidthPerc,fHeightPerc,bAntiAlias) == HXR_OK)
+ if(pSurfaceControl->GetScaling(fWidthPerc,fHeightPerc,bAntiAlias) == HXR_OK)
{
//error tracking of how many sites succeded
hres--;
}
else
{
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetScaling(FALIED)");
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetScaling(FALIED)");
}
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
// if hres < #sites then at least one site updated
// if hres == #sites then no site successfully set the param
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetScaling( fWidthPerc(%lu) fHeightPerc[%lu] bAntiAlias[%d] )", fWidthPerc, fHeightPerc, bAntiAlias);
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetScaling( fWidthPerc(%lu) fHeightPerc[%lu] bAntiAlias[%d] )", fWidthPerc, fHeightPerc, bAntiAlias);
if(hres == nNumSites)
{
- //no site was set
+ //no site was gotten
return HXR_FAIL;
}
else
{
- //at least one site was set
+ //at least one site was got
return HXR_OK;
}
}
STDMETHODIMP
-HXMMFSiteSupplier::GetScaling(HXFLOAT &fWidthPerc, HXFLOAT &fHeightPerc, HXBOOL &bAntiAlias)
+HXMMFSiteSupplier::SetCropRect(HXxRect sValue)
{
+
IHXSurfaceControl* pSurfaceControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -933,47 +882,47 @@
pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) &pSurfaceControl);
if(pSurfaceControl)
{
- if(pSurfaceControl->GetScaling(fWidthPerc,fHeightPerc,bAntiAlias) == HXR_OK)
+ if(pSurfaceControl->SetCropRect(sValue) == HXR_OK)
{
//error tracking of how many sites succeded
hres--;
}
else
{
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetScaling(FALIED)");
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetCropRect(FALIED)");
}
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
// if hres < #sites then at least one site updated
// if hres == #sites then no site successfully set the param
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetScaling( fWidthPerc(%lu) fHeightPerc[%lu] bAntiAlias[%d] )", fWidthPerc, fHeightPerc, bAntiAlias);
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetCropRect()");
if(hres == nNumSites)
{
- //no site was gotten
+ //no site was set
return HXR_FAIL;
}
else
{
- //at least one site was got
+ //at least one site was set
return HXR_OK;
}
}
STDMETHODIMP
-HXMMFSiteSupplier::SetCropRect(HXxRect sValue)
+HXMMFSiteSupplier::GetCropRect(HXxRect &sValue)
{
-
+
IHXSurfaceControl* pSurfaceControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -991,40 +940,40 @@
}
else
{
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetCropRect(FALIED)");
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetCropRect(FALIED)");
}
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
// if hres < #sites then at least one site updated
// if hres == #sites then no site successfully set the param
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetCropRect()");
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetCropRect()");
if(hres == nNumSites)
{
- //no site was set
+ //no site was gotten
return HXR_FAIL;
}
else
{
- //at least one site was set
+ //at least one site was got
return HXR_OK;
}
}
STDMETHODIMP
-HXMMFSiteSupplier::GetCropRect(HXxRect &sValue)
+HXMMFSiteSupplier::SetWindowParameters(HXxRect sWinRect, HXxRect sClipRect)
{
-
+
IHXSurfaceControl* pSurfaceControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -1035,25 +984,25 @@
pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) &pSurfaceControl);
if(pSurfaceControl)
{
- if(pSurfaceControl->SetCropRect(sValue) == HXR_OK)
+ if(pSurfaceControl->SetWindowParameters(sWinRect, sClipRect) == HXR_OK)
{
//error tracking of how many sites succeded
hres--;
}
else
{
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetCropRect(FALIED)");
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetWindowParameters(FALIED)");
}
HX_RELEASE(pSurfaceControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
// if hres < #sites then at least one site updated
// if hres == #sites then no site successfully set the param
- HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetCropRect()");
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetWindowParameters()");
if(hres == nNumSites)
{
//no site was gotten
@@ -1061,7 +1010,7 @@
}
else
{
- //at least one site was got
+ //at least one site was set
return HXR_OK;
}
}
@@ -1076,7 +1025,7 @@
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -1099,7 +1048,7 @@
HX_RELEASE(pDSAControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
@@ -1121,13 +1070,13 @@
STDMETHODIMP
HXMMFSiteSupplier::RefreshWindow()
{
-
+
IHXDSAControl* pDSAControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -1150,7 +1099,7 @@
HX_RELEASE(pDSAControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param
@@ -1172,13 +1121,13 @@
STDMETHODIMP
HXMMFSiteSupplier::DirectScreenAccessEvent(HXBOOL bValue)
{
-
+
IHXDSAControl* pDSAControl = NULL;
IHXSite* pIterationSite = NULL;
HRESULT hres;
UINT32 index;
UINT32 nNumSites = 0;
-
+
m_pSitesManager2->GetNumberOfSites(nNumSites);
hres = nNumSites;
for(index = 0; index< nNumSites; index++)
@@ -1201,7 +1150,7 @@
HX_RELEASE(pDSAControl);
}
}
-
+
}
// Tracking Errors but not acting on them
// if hres == 0 then all sites succesfully set the param