[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-video-dev
Subject: [Video-dev] CR: Add Post Processing Functionality for Symbian
From: <Shy.Ward () nokia ! com>
Date: 2006-03-10 20:12:59
Message-ID: AADDB69D47B8C5498F30600FDC3CD90401A37D21 () daebe102 ! NOE ! Nokia ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> Add Post Processing Functionality for Symbian MMF/MDF
>
> "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@nokia.com
>
> Reviewed by:
>
> Date: 03-7-2006.
>
> Error ID: EOVL-6GVTAH
> EOVL-6F4TP7
> EOVL-6K4V7V
> EHSG-6LTKFT
>
> Project: Helix plugin for Symbian
>
> Synopsis: Add Post Processing Functionality for Symbian MMF/MDF.
>
> Three new interfaces were added: IHXSurfaceControl, IHXDSAControl, &
> IHXSiteRegister. These allow the Symbian MMF/MDF
> to send post processing commands to dev video in the MDF. No
> functionality has been changed or added for non-MDF builds.
> The feature flag HELIX_FEATURE_MMF_SITE_CONTROL is used and defined in
> the profile: helix-client-s60-mdf-common.pfi.
> These new features allow the MMF client to scale, rotate, control DSA,
> set contrast, etc.
>
> Files Modified:
> clientapps\symbianMmf\hxmmfctrlimpl.cpp
> clientapps\symbianMmf\hxmmfsitesupplier.cpp
> clientapps\symbianMmf\hxmmfsitesupplier.h
> datatype\mdf\video\renderer\mdfvideoadapter.cpp
> datatype\mdf\video\renderer\umakelib
> datatype\mdf\video\renderer\pub\mdfvideoadapter.h
> common\include\hxiids.h
> common\include\hxwintyp.h
> video\sitelib\platform\symbian\minisymbiansite.cpp
> video\sitelib\pub\platform\symbian\minisymbiansite.h
> ribosome\build\umakepf\helix-client-s60-mdf-common.pfi
>
>
> Files Added:
> client\include\hxsite3.h
>
> Image Size and Heap Use impact: Minor
>
> Platforms and Profiles Build Verified: helix-client-s60-mmf-mdf-basic
>
> Platforms and Profiles Functionality verified: armv5
>
> Branch: hxclient_2_1_0_cayennes
>
> <<hxsite3.h>> <<common_include.diff>> <<datatype_mdf.diff>>
> <<video_sitelib.diff>> <<build_umakepf.diff>>
> <<clientapps_diff.diff>>
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.21">
<TITLE> CR: Add Post Processing Functionality for Symbian MMF/MDF</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<UL>
<P><FONT SIZE=2 FACE="Arial">Add Post Processing Functionality for Symbian \
MMF/MDF</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">"Nokia submits this code under the terms of a \
commercial contribution agreement</FONT>
<BR><FONT SIZE=2 FACE="Arial">with RealNetworks, and I am authorized to contribute \
this code under said agreement."</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Modified by: shy.ward@nokia.com</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Reviewed by:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Date: 03-7-2006.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Error ID: EOVL-6GVTAH</FONT>
<BR><FONT SIZE=2 FACE="Arial"> \
EOVL-6F4TP7</FONT>
<BR><FONT SIZE=2 FACE="Arial"> \
EOVL-6K4V7V</FONT>
<BR><FONT SIZE=2 FACE="Arial"> \
EHSG-6LTKFT</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Project: Helix plugin for Symbian</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Synopsis: Add Post Processing Functionality for Symbian \
MMF/MDF.</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Three new interfaces were added: IHXSurfaceControl, \
IHXDSAControl, & IHXSiteRegister. These allow the Symbian MMF/MDF</FONT>
<BR><FONT SIZE=2 FACE="Arial">to send post processing commands to dev video in the \
MDF. No functionality has been changed or added for non-MDF builds.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">The feature flag HELIX_FEATURE_MMF_SITE_CONTROL is used \
and defined in the profile: helix-client-s60-mdf-common.pfi.</FONT>
<BR><FONT SIZE=2 FACE="Arial">These new features allow the MMF client to scale, \
rotate, control DSA, set contrast, etc.</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Files Modified:</FONT>
<BR><FONT SIZE=2 FACE="Arial">clientapps\symbianMmf\hxmmfctrlimpl.cpp</FONT>
<BR><FONT SIZE=2 FACE="Arial">clientapps\symbianMmf\hxmmfsitesupplier.cpp</FONT>
<BR><FONT SIZE=2 FACE="Arial">clientapps\symbianMmf\hxmmfsitesupplier.h</FONT>
<BR><FONT SIZE=2 FACE="Arial">datatype\mdf\video\renderer\mdfvideoadapter.cpp</FONT>
<BR><FONT SIZE=2 FACE="Arial">datatype\mdf\video\renderer\umakelib</FONT>
<BR><FONT SIZE=2 FACE="Arial">datatype\mdf\video\renderer\pub\mdfvideoadapter.h</FONT>
<BR><FONT SIZE=2 FACE="Arial">common\include\hxiids.h</FONT>
<BR><FONT SIZE=2 FACE="Arial">common\include\hxwintyp.h</FONT>
<BR><FONT SIZE=2 FACE="Arial">video\sitelib\platform\symbian\minisymbiansite.cpp</FONT>
<BR><FONT SIZE=2 FACE="Arial">video\sitelib\pub\platform\symbian\minisymbiansite.h</FONT>
<BR><FONT SIZE=2 FACE="Arial">ribosome\build\umakepf\helix-client-s60-mdf-common.pfi</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Files Added:</FONT>
<BR><FONT SIZE=2 FACE="Arial">client\include\hxsite3.h</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Image Size and Heap Use impact: Minor</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Platforms and Profiles Build Verified: \
helix-client-s60-mmf-mdf-basic</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Platforms and Profiles Functionality verified: \
armv5</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Branch: hxclient_2_1_0_cayennes</FONT>
</P>
<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"> <<hxsite3.h>> </FONT><FONT \
FACE="Arial" SIZE=2 COLOR="#000000"> <<common_include.diff>> </FONT><FONT \
FACE="Arial" SIZE=2 COLOR="#000000"> <<datatype_mdf.diff>> </FONT><FONT \
FACE="Arial" SIZE=2 COLOR="#000000"> <<video_sitelib.diff>> </FONT><FONT \
FACE="Arial" SIZE=2 COLOR="#000000"> <<build_umakepf.diff>> </FONT><FONT \
FACE="Arial" SIZE=2 COLOR="#000000"> <<clientapps_diff.diff>> </FONT></P> \
</UL> </BODY>
</HTML>
["hxsite3.h" (application/octet-stream)]
["common_include.diff" (application/octet-stream)]
Index: hxiids.h
===================================================================
RCS file: /cvsroot/common/include/hxiids.h,v
retrieving revision 1.89.2.1
diff -w -u -b -r1.89.2.1 hxiids.h
--- hxiids.h 24 Jan 2006 23:24:06 -0000 1.89.2.1
+++ hxiids.h 10 Mar 2006 15:59:33 -0000
@@ -700,6 +700,9 @@
DEFINE_GUID_ENUM(IID_IHXDrawFocus, 0x00000D24, 0x903, 0x11d1, \
0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59) DEFINE_GUID_ENUM(IID_IHXSubRectSite, \
0x00000D25, 0x903, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59) \
DEFINE_GUID_ENUM(IID_IHXFocusNavigation, 0xb42b7677, 0xf605, 0x438e, \
0x90, 0x2, 0xe2, 0xaa, 0xb7, 0x78, 0x4b, 0x43) \
+DEFINE_GUID_ENUM(IID_IHXSurfaceControl, 0x00000D26, 0x903, 0x11d1, 0x8b, \
0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59) +DEFINE_GUID_ENUM(IID_IHXSiteRegister, \
0x719e98e8, 0xdcc3, 0x4fc1, 0x84, 0xc0, 0x13, 0xfd, 0x3f, 0xb5, 0xa5, 0x23) \
+DEFINE_GUID_ENUM(IID_IHXDSAControl, 0x5ce50a2a, 0x8a8, 0x450a, 0xb6, \
0x74, 0x89, 0xef, 0x12, 0x2a, 0xff, 0xf1) #endif
/*
* File:
Index: hxwintyp.h
===================================================================
RCS file: /cvsroot/common/include/hxwintyp.h,v
retrieving revision 1.5
diff -w -u -b -r1.5 hxwintyp.h
--- hxwintyp.h 14 Mar 2005 19:27:09 -0000 1.5
+++ hxwintyp.h 10 Mar 2006 15:59:33 -0000
@@ -176,6 +176,22 @@
result->bottom = ( r1.bottom < r2.bottom ) ? r1.bottom : r2.bottom;
}
+inline void HXxRect_Set( HXxRect& rect, INT32 l, INT32 t, INT32 r, INT32 b )
+{
+ rect.left = l;
+ rect.top = t;
+ rect.right = r;
+ rect.bottom = b;
+}
+
+inline void HXxRect_SetWithSize( HXxRect& rect, INT32 x, INT32 y, INT32 w, INT32 h )
+{
+ rect.left = x;
+ rect.top = y;
+ rect.right = x + w;
+ rect.bottom = y + h;
+}
+
#endif // __cplusplus
["datatype_mdf.diff" (application/octet-stream)]
Index: mdfvideoadapter.cpp
===================================================================
RCS file: /cvsroot/datatype/mdf/video/renderer/mdfvideoadapter.cpp,v
retrieving revision 1.3.2.6
diff -w -u -b -r1.3.2.6 mdfvideoadapter.cpp
--- mdfvideoadapter.cpp 7 Mar 2006 21:24:53 -0000 1.3.2.6
+++ mdfvideoadapter.cpp 10 Mar 2006 15:57:37 -0000
@@ -52,16 +52,26 @@
STDMETHODIMP CMdfVideoAdapter::QueryInterface( REFIID riid, void** ppvObj )
{
- if (IsEqualIID(riid, IID_IUnknown))
+
+ QInterfaceList qiList[] =
+ {
+ { GET_IIDHANDLE( IID_IUnknown ), ( IUnknown* )( IHXSurfaceControl* ) this \
}, + { GET_IIDHANDLE( IID_IHXSurfaceControl ), ( IHXSurfaceControl* ) this \
}, + { GET_IIDHANDLE( IID_IHXDSAControl ), ( IHXDSAControl* ) this }
+ };
+
+ if( QIFind( qiList, QILISTSIZE(qiList), riid, ppvObj ) == HXR_OK )
{
- AddRef();
- *ppvObj = (IUnknown*)this;
+ MDFVIDEOLOG_LEAVEFN( "QueryInterface" );
return HXR_OK;
}
-
+ else
+ {
*ppvObj = NULL;
+ MDFVIDEOLOG_LEAVEFN( "QueryInterface" );
return HXR_NOINTERFACE;
}
+}
STDMETHODIMP_(UINT32) CMdfVideoAdapter::AddRef()
{
@@ -97,12 +107,17 @@
m_HwPostProcessorId( KUidZero ),
m_bWsIsConnected( FALSE ),
m_pContext( NULL ),
- m_IsDSAStarted( FALSE ),
+ m_bIsDSAStarted( FALSE ),
m_pPayloadFormatPluginDevice( NULL ),
m_bIsFirstFrameSent( FALSE ),
+ m_rotationValue ( Rotate0 ),
m_bAppendHeaderToFirstFrame( TRUE ),
m_pPictureHeader( NULL ),
- m_bIsPaused( FALSE )
+ m_bIsPaused( FALSE ),
+ m_bAntiAlias( FALSE ),
+ m_bFrameRectValid ( FALSE ),
+ m_bAutoScale ( TRUE )
+
{
MDFVIDEOLOG_CREATE_NOWRITE;
MDFVIDEOLOG_CLASSNAME( "CMdfVideoAdapter" );
@@ -134,6 +149,7 @@
HX_DELETE( m_pBltQueueMutex );
HX_DELETE( m_pWriteMutex );
HX_RELEASE( m_pContext );
+ m_ClipRegion.Close();
MDFVIDEOLOG_LEAVEFN( "~CMdfVideoAdapter" );
MDFVIDEOLOG_DELETE;
@@ -153,6 +169,7 @@
MDFVIDEOLOG_ENTERFN2( "Init" );
HX_RESULT retVal = HXR_OK;
+ ReadPrefBOOL(pContext, "AutoScale", m_bAutoScale);
m_pClockSource = pClockSource;
m_pPayloadFormatPluginDevice = pPayloadFormatPluginDevice;
m_pContext = pContext;
@@ -327,17 +344,6 @@
m_bIsPaused = TRUE;
}
- //Following codes are inserted temporarily because of lack of path
- //from UI to DevVideo through which DSA calls could pass
- //In later version, this path will be built.
- //********** Start
- if( m_pDevVideoPlay != NULL && m_IsDSAStarted == TRUE )
- {
- m_pDevVideoPlay->AbortDirectScreenAccess();
- m_IsDSAStarted = FALSE;
- }
- //********** End
-
MDFVIDEOLOG_LEAVEFN( "VideoPause" );
return HXR_OK;
}
@@ -352,25 +358,6 @@
m_bIsPaused = FALSE;
}
- //Following codes are inserted temporarily because of lack of path
- //from UI to DevVideo through which DSA calls could pass
- //In later version, this path will be built.
- //********** Start
- if( m_pDevVideoPlay != NULL && m_IsDSAStarted == FALSE )
- {
- RRegion region( m_clipRect );
- TRAPD( error, m_pDevVideoPlay->StartDirectScreenAccessL(m_clipRect, \
*m_pFbsScreenDevice, region ) );
- if( error != KErrNone )
- {
- retVal = HXR_FAIL;
- }
- else
- {
- m_IsDSAStarted = TRUE;
- }
- region.Close(); //do not use Destroy()
- }
- //********** End
TInt number = m_BltPacketQueue.GetCount();
MDFVIDEOLOG_WRITE_FORMAT( " packets left in queue that is not blitted is %d", \
number ); Blt();
@@ -432,7 +419,7 @@
MDFVIDEOLOG_ENTERFN4( "Blt" );
HX_RESULT retVal = HXR_OK;
- if( m_IsDSAStarted == FALSE )
+ if( m_bIsDSAStarted == FALSE )
{
MDFVIDEOLOG_RETURNFN4( "Blt", retVal );
return retVal;
@@ -573,6 +560,16 @@
HX_ASSERT( pSite );
m_pSite = pSite;
m_pSite->AddRef();
+
+ //Register with symbian site
+ IHXSiteRegister* pRegisterControl = NULL;
+ m_pSite->QueryInterface(IID_IHXSiteRegister, (void**) &pRegisterControl);
+ if(pRegisterControl)
+ {
+ pRegisterControl->RegisterAdapter((IHXSurfaceControl*) this);
+ HX_RELEASE(pRegisterControl);
+ }
+
SetupWindow();
MDFVIDEOLOG_LEAVEFN( "AttachSite" );
}
@@ -581,6 +578,16 @@
{
MDFVIDEOLOG_ENTERFN( "DetachSite" );
HX_ASSERT( m_pSite );
+
+ //DeRegister with symbian site
+ IHXSiteRegister* pRegisterControl = NULL;
+ m_pSite->QueryInterface(IID_IHXSiteRegister, (void**) &pRegisterControl);
+ if(pRegisterControl)
+ {
+ pRegisterControl->DeRegisterAdapter();
+ HX_RELEASE(pRegisterControl);
+ }
+
m_pSite->Release();
m_pSite = NULL;
MDFVIDEOLOG_LEAVEFN( "DetachSite" );
@@ -643,21 +650,7 @@
{
retVal = HXR_FAIL;
HX_ASSERT( m_pDevVideoPlay );
-#if defined(HELIX_FEATURE_SYMBIAN_MMF)
- m_clipRect.SetRect( pHXWin->clipRect.left,
- pHXWin->clipRect.top,
- pHXWin->clipRect.right,
- pHXWin->clipRect.bottom );
-
- RRegion region( m_clipRect );
- TRAPD( error, m_pDevVideoPlay->StartDirectScreenAccessL(m_clipRect, \
*m_pFbsScreenDevice, region ) );
- if( error == KErrNone )
- {
- m_IsDSAStarted = TRUE;
- retVal = HXR_OK;
- }
- region.Close(); //do not use Destroy()
-#else
+#if !defined(HELIX_FEATURE_SYMBIAN_MMF)
RWindow* pWin = (RWindow*)pHXWin->window;
CDirectScreenAccess* pDirectScreen = pHXWin->iDSA;
@@ -667,14 +660,16 @@
TRAPD( error, m_pDevVideoPlay->StartDirectScreenAccessL(m_clipRect, \
*pDirectScreen->ScreenDevice(), aClipRegion ) ); if( error == KErrNone )
{
- m_IsDSAStarted = TRUE;
+ m_bIsDSAStarted = TRUE;
retVal = HXR_OK;
}
+#else
+ retVal = HXR_OK;
#endif
if( SUCCEEDED( retVal ) )
{
- TRAPD( error, m_pDevVideoPlay->SetScaleOptionsL( \
m_PostProcessorHwDeviceId, m_clipRect.Size(), EFalse ) ); + TRAPD( error, \
m_pDevVideoPlay->SetScaleOptionsL( m_PostProcessorHwDeviceId, m_scaledSize, \
m_bAntiAlias ) ); if( error == KErrNone )
{
retVal = HXR_OK;
@@ -685,7 +680,18 @@
}
}
}
-
+ if( SUCCEEDED( retVal ) )
+ {
+ TRAPD(error, m_pDevVideoPlay->SetYuvToRgbOptionsL(m_PostProcessorHwDeviceId, \
m_contrastOptions)); + if( error == KErrNone )
+ {
+ retVal = HXR_OK;
+ }
+ else
+ {
+ retVal = HXR_FAIL;
+ }
+ }
if( SUCCEEDED( retVal ) )
{
@@ -717,6 +723,14 @@
m_DevVidInitialized = EInitializedFailed;
}
+ if (m_DevVidInitialized == EInitializedSuccess)
+ {
+ if (SUCCEEDED(StartDSA()))
+ {
+ retVal = HXR_OK;
+ }
+ }
+
MDFVIDEOLOG_LEAVEFN( "SetupWindow" );
}
@@ -825,7 +839,7 @@
m_pDevVideoPlay->Stop();
MDFVIDEOLOG_INOUTFN( "Stop" );
- m_IsDSAStarted = FALSE;
+ m_bIsDSAStarted = FALSE;
m_DevVidInitialized = EInitializedReady;
}
@@ -834,3 +848,487 @@
MDFVIDEOLOG_LEAVEFN( "MdvpoStreamEnd" );
}
+HX_RESULT
+CMdfVideoAdapter::AbortDSA()
+{
+ MDFVIDEOLOG_ENTERFN2( "AbortDSA" );
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ MDFVIDEOLOG_LEAVEFN2( "AbortDSA fail" );
+ return HXR_FAIL;
+ }
+ if (m_bIsDSAStarted)
+ {
+ m_pDevVideoPlay->AbortDirectScreenAccess();
+ m_bIsDSAStarted = FALSE;
+ }
+
+ MDFVIDEOLOG_LEAVEFN2( "AbortDSA" );
+ return HXR_OK;
+}
+
+HX_RESULT
+CMdfVideoAdapter::StartDSA()
+{
+ MDFVIDEOLOG_ENTERFN2( "StartDSA" );
+ TInt error = KErrNone;
+ HX_RESULT retVal = HXR_OK;
+
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ MDFVIDEOLOG_LEAVEFN2( "StartDSA fail due to m_DevVidInitialized != \
EInitializedSuccess" ); + return HXR_FAIL;
+ }
+
+ HX_ASSERT(m_pFbsScreenDevice);
+ if (!m_pFbsScreenDevice)
+ {
+ return HXR_FAIL;
+ }
+
+ HX_ASSERT(!m_bIsDSAStarted);
+ if (m_bIsDSAStarted)
+ {
+ m_pDevVideoPlay->AbortDirectScreenAccess();
+ m_bIsDSAStarted = FALSE;
+ }
+
+ //commit any changes before direct screen access
+ if (!SUCCEEDED(Commit()))
+ {
+ return HXR_FAIL;
+ }
+
+ TRAP(error, m_pDevVideoPlay->StartDirectScreenAccessL(m_clipRect, \
*m_pFbsScreenDevice, m_ClipRegion)); + if (error == KErrNone)
+ {
+ m_bIsDSAStarted = TRUE;
+ retVal = HXR_OK;
+ }
+
+ MDFVIDEOLOG_LEAVEFN2( "StartDSA" );
+ return retVal;
+}
+
+HX_RESULT CMdfVideoAdapter::Commit()
+{
+ MDFVIDEOLOG_ENTERFN2( "Commit" );
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ MDFVIDEOLOG_LEAVEFN2( "Commit fail" );
+ return HXR_FAIL;
+ }
+
+ TRAPD(error, m_pDevVideoPlay->CommitL());
+ if (error == KErrNone)
+ {
+ MDFVIDEOLOG_LEAVEFN2( "Commit ok" );
+ return HXR_OK;
+ }
+
+ MDFVIDEOLOG_LEAVEFN2( "Commit fail" );
+ return HXR_FAIL;
+}
+
+void CMdfVideoAdapter::CalculateScaleFactor()
+{
+ TSize tempSize;
+ HXxRect tempRect;
+ tempRect.left = m_clipRect.iTl.iX;
+ tempRect.top = m_clipRect.iTl.iY;
+ tempRect.right = m_clipRect.iBr.iX;
+ tempRect.bottom = m_clipRect.iBr.iY;
+ HXBOOL bNeedSwap = FALSE;
+ UINT32 tmp;
+
+ if( m_bAutoScale )
+ {
+ if( m_bFrameRectValid )
+ {
+ HXFLOAT factor;
+ HXFLOAT fWidthPerc, fHeightPerc;
+ UINT32 width = HXxRECT_WIDTH(tempRect);
+ UINT32 height = HXxRECT_HEIGHT(tempRect);
+
+ switch (m_rotationValue)
+ {
+ case Rotate90:
+ case Rotate270:
+ {
+ /* Swap the width and height. */
+ tmp = width;
+ width = height;
+ height = tmp;
+ bNeedSwap = TRUE;
+ }
+ }
+
+ factor = MIN((HXFLOAT)width / m_frameRect.right, (HXFLOAT)height / \
m_frameRect.bottom); +
+ tempSize.iWidth = factor * m_frameRect.right;
+ tempSize.iHeight = factor * m_frameRect.bottom;
+ if(bNeedSwap)
+ {
+ tmp = tempSize.iWidth;
+ tempSize.iWidth = tempSize.iHeight;
+ tempSize.iHeight = tmp;
+ }
+
+ }
+ else
+ {
+ tempSize = m_clipRect.Size();
+ }
+ }
+ else
+ {
+ if( m_bFrameRectValid )
+ {
+ //just scale to frame size
+ tempSize.iWidth = m_frameRect.right;
+ tempSize.iHeight = m_frameRect.bottom;
+ }
+ else
+ {
+ tempSize = m_clipRect.Size();
+ }
+ }
+ m_scaledSize = tempSize;
+
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::DirectScreenAccessEvent(HXBOOL bValue)
+{
+ MDFVIDEOLOG_ENTERFN2( "DirectScreenAccessEvent" );
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ return HXR_FAIL;
+ }
+
+ HX_RESULT retVal = HXR_OK;
+
+ if (bValue)
+ {
+ if (!SUCCEEDED(StartDSA()))
+ {
+ MDFVIDEOLOG_LEAVEFN2( "DirectScreenAccessEvent start failed" );
+ retVal = HXR_FAIL;
+ }
+ }
+ else
+ {
+ AbortDSA();
+ }
+
+ MDFVIDEOLOG_LEAVEFN2( "DirectScreenAccessEvent" );
+ return retVal;
+
+}
+
+
+STDMETHODIMP
+CMdfVideoAdapter::SetRotation(UINT32 ulValue)
+{
+ MDFVIDEOLOG_ENTERFN2( "SetRotation" );
+ HX_RESULT retVal = HXR_FAIL;
+
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ MDFVIDEOLOG_LEAVEFN2( "SetRotation fail due to m_DevVidInitialized != \
EInitializedSuccess" ); + return HXR_FAIL;
+ }
+
+ m_rotationValue = ulValue;
+ TRotationType rotationType = ERotateNone;
+ switch (ulValue)
+ {
+ case Rotate0: rotationType = ERotateNone; break;
+ case Rotate90: rotationType = ERotate90Clockwise; break;
+ case Rotate270: rotationType = ERotate90Anticlockwise; break;
+ case Rotate180: rotationType = ERotate180; break;
+ default: rotationType = ERotateNone; break;
+ }
+
+ CalculateScaleFactor();
+
+ TRAPD(error, m_pDevVideoPlay->SetRotateOptionsL(m_PostProcessorHwDeviceId, \
rotationType)); + if (error == KErrNone)
+ {
+ if (SUCCEEDED(Commit()))
+ {
+ TRAPD(error, \
m_pDevVideoPlay->SetScaleOptionsL(m_PostProcessorHwDeviceId, m_scaledSize, \
m_bAntiAlias)); + if (error == KErrNone)
+ {
+ if (SUCCEEDED(Commit()))
+ {
+ retVal = HXR_OK;
+ }
+ }
+ }
+ }
+ MDFVIDEOLOG_LEAVEFN2( "SetRotation" );
+ return retVal;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::GetRotation(UINT32 &ulValue)
+{
+ MDFVIDEOLOG_ENTERFN2( "GetRotation" );
+ ulValue = m_rotationValue;
+ MDFVIDEOLOG_LEAVEFN2( "GetRotation" );
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::SetContrast(UINT32 ulValue)
+{
+ MDFVIDEOLOG_ENTERFN2( "SetContrast" );
+ HX_RESULT retVal = HXR_FAIL;
+
+ /* We need to adjust from 0..100 to -100..100. */
+ m_contrastOptions.iContrast = (ulValue - 50) * 2;
+
+ m_contrastOptions.iLightness = 0;
+ m_contrastOptions.iSaturation = 0;
+ m_contrastOptions.iGamma = 1.0;
+ m_contrastOptions.iDitherType = EDitherNone;
+
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ MDFVIDEOLOG_LEAVEFN2( "SetContrast fail due to m_DevVidInitialized != \
EInitializedSuccess" ); + return HXR_FAIL;
+ }
+
+ TRAPD(error, m_pDevVideoPlay->SetYuvToRgbOptionsL(m_PostProcessorHwDeviceId, \
m_contrastOptions)); + if (error == KErrNone)
+ {
+ if (SUCCEEDED(Commit()))
+ {
+ MDFVIDEOLOG_LEAVEFN2( "SetContrast OK" );
+ retVal = HXR_OK;
+ }
+ }
+
+ MDFVIDEOLOG_LEAVEFN2( "SetContrast" );
+ return retVal;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::GetContrast(UINT32 &ulValue)
+{
+ //handled at site level
+ return HXR_NOTIMPL;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::SetWindowRect(HXxRect sValue)
+{
+ MDFVIDEOLOG_ENTERFN2( "SetWindowRect" );
+ TRect windowRect;
+ windowRect.SetRect(sValue.left, sValue.top, sValue.right, sValue.bottom);
+
+ RRegion region( windowRect );
+ m_ClipRegion.Clear();
+ m_ClipRegion.Copy(region);
+ region.Close();
+
+ MDFVIDEOLOG_LEAVEFN2( "SetWindowRect" );
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::SetFrameRect(HXxRect sValue)
+{
+ MDFVIDEOLOG_ENTERFN2( "SetFrameRect" );
+ HX_RESULT retVal = HXR_OK;
+ m_bFrameRectValid = TRUE;
+ m_frameRect = sValue;
+ if( (sValue.left == 0) && (sValue.top == 0) && (sValue.right == 0) && \
(sValue.bottom == 0)) + {
+ m_bFrameRectValid = FALSE;
+ }
+ CalculateScaleFactor();
+
+ MDFVIDEOLOG_LEAVEFN2( "SetFrameRect" );
+ return retVal;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::GetFrameRect(HXxRect &sValue)
+{
+ sValue = m_frameRect;
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::SetDestRect(HXxRect sValue)
+{
+ MDFVIDEOLOG_ENTERFN2( "SetDestRect" );
+ HX_RESULT retVal = HXR_FAIL;
+ TSize tempSize;
+
+ HXxRect tempRect;
+ tempRect.left = m_clipRect.iTl.iX;
+ tempRect.top = m_clipRect.iTl.iY;
+ tempRect.right = m_clipRect.iBr.iX;
+ tempRect.bottom = m_clipRect.iBr.iY;
+ if(tempRect == sValue)
+ {
+ retVal = HXR_IGNORE;
+ }
+ else
+ {
+ m_clipRect.SetRect(sValue.left, sValue.top, sValue.right, sValue.bottom);
+ retVal = HXR_OK;
+ }
+
+ CalculateScaleFactor();
+
+ if (retVal != HXR_IGNORE)
+ {
+ if (SUCCEEDED(StartDSA()))
+ {
+ TRAPD(error, \
m_pDevVideoPlay->SetScaleOptionsL(m_PostProcessorHwDeviceId, m_scaledSize, \
m_bAntiAlias)); + if (error == KErrNone)
+ {
+ if (SUCCEEDED(Commit()))
+ {
+ MDFVIDEOLOG_LEAVEFN2( "SetDestRect - Scale options okay" );
+ retVal = HXR_OK;
+ }
+ }
+ else
+ {
+ MDFVIDEOLOG_LEAVEFN2( "SetDestRect" );
+ return retVal;
+ }
+ }
+ }
+
+ MDFVIDEOLOG_LEAVEFN2( "SetDestRect" );
+ return retVal;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::SetScaling(HXFLOAT fWidthPerc, HXFLOAT fHeightPerc, HXBOOL \
bAntiAlias) +{
+ MDFVIDEOLOG_ENTERFN2( "SetScaling" );
+ HX_RESULT retVal = HXR_FAIL;
+ TSize tempSize;
+ m_bAntiAlias = bAntiAlias;
+
+ if( m_bFrameRectValid )
+ {
+ tempSize.iWidth = (fWidthPerc/100) * m_frameRect.right;
+ tempSize.iHeight = (fHeightPerc/100) * m_frameRect.bottom;
+ }
+ else
+ {
+ tempSize.iWidth = (fWidthPerc/100) * (m_clipRect.iBr.iX - \
m_clipRect.iTl.iX); + tempSize.iHeight = (fHeightPerc/100) * \
(m_clipRect.iBr.iY - m_clipRect.iTl.iY); + }
+ m_scaledSize = tempSize;
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ return retVal;
+ }
+
+
+ TRAPD( error, m_pDevVideoPlay->SetScaleOptionsL( m_PostProcessorHwDeviceId, \
tempSize, bAntiAlias ) ); + if( error == KErrNone )
+ {
+ if (SUCCEEDED(Commit()))
+ {
+ retVal = HXR_OK;
+ m_scaledSize = tempSize;
+ m_bAntiAlias = bAntiAlias;
+ MDFVIDEOLOG_LEAVEFN2( "SetScaling commit okay" );
+ }
+ }
+ else
+ {
+ MDFVIDEOLOG_LEAVEFN2( "SetScaling falied" );
+ retVal = HXR_FAIL;
+ }
+
+ MDFVIDEOLOG_LEAVEFN2( "SetScaling" );
+ return retVal;
+
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::GetScaling(HXFLOAT &fWidthPerc, HXFLOAT &fHeightPerc, HXBOOL \
&bAntiAlias) +{
+ MDFVIDEOLOG_ENTERFN2( "getScaling" );
+ fWidthPerc = m_scaledSize.iWidth;
+ fHeightPerc = m_scaledSize.iHeight;
+ bAntiAlias = m_bAntiAlias;
+ MDFVIDEOLOG_LEAVEFN2( "GetScaling" );
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::UpdateDisplayRegion(HXxRegion Region)
+{
+ MDFVIDEOLOG_ENTERFN2( "UpdateDisplayRegion" );
+ HX_RESULT retVal = HXR_FAIL;
+
+ // Fetch the clipping region.
+ memset(&m_ClipRegion,0,sizeof(m_ClipRegion));
+ m_ClipRegion.Clear();
+ m_ClipRegion.Copy(*(TRegion*)Region);
+ m_pDevVideoPlay->SetScreenClipRegion(m_ClipRegion);
+
+ retVal = HXR_OK;
+
+ MDFVIDEOLOG_LEAVEFN2( "UpdateDisplayRegion" );
+ return retVal;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::RefreshWindow()
+{
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ MDFVIDEOLOG_LEAVEFN2( "RefreshWindow fail due to m_DevVidInitialized != \
EInitializedSuccess" ); + return HXR_FAIL;
+ }
+ MDFVIDEOLOG_ENTERFN2( "RefreshWindow" );
+ m_pDevVideoPlay->Redraw();
+ MDFVIDEOLOG_LEAVEFN2( "RefreshWindow" );
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::SetCropRect(HXxRect sValue)
+{
+ MDFVIDEOLOG_ENTERFN2( "SetCropRect" );
+ HX_RESULT retVal = HXR_FAIL;
+
+ if (m_DevVidInitialized != EInitializedSuccess)
+ {
+ return retVal;
+ }
+
+ TRect rect(sValue.left, sValue.top, sValue.right, sValue.bottom);
+ TRAPD(error, m_pDevVideoPlay->SetOutputCropOptionsL(m_PostProcessorHwDeviceId, \
rect)); + if (error == KErrNone)
+ {
+ if (SUCCEEDED(Commit()))
+ {
+ retVal = HXR_OK;
+ }
+ else
+ {
+ MDFVIDEOLOG_LEAVEFN2( "SetCropRect Commit Falied" );
+ }
+ }
+ MDFVIDEOLOG_LEAVEFN2( "SetCropRect" );
+ return retVal;
+}
+
+STDMETHODIMP
+CMdfVideoAdapter::GetCropRect(HXxRect &sValue)
+{
+ return HXR_NOTIMPL;
+}
Index: umakelib
===================================================================
RCS file: /cvsroot/datatype/mdf/video/renderer/umakelib,v
retrieving revision 1.1.1.1
diff -w -u -b -r1.1.1.1 umakelib
--- umakelib 6 Oct 2005 11:47:01 -0000 1.1.1.1
+++ umakelib 10 Mar 2006 15:57:37 -0000
@@ -48,8 +48,10 @@
UmakefileVersion(2,1)
project.AddModuleIncludes( "common/include",
+ "client/include",
"datatype/rm/include",
"common/util/pub",
+ "common/util",
"common/container/pub",
"datatype/common/container/pub",
"common/log/logutil/pub",
Index: pub/mdfvideoadapter.h
===================================================================
RCS file: /cvsroot/datatype/mdf/video/renderer/pub/mdfvideoadapter.h,v
retrieving revision 1.3.2.4
diff -w -u -b -r1.3.2.4 mdfvideoadapter.h
--- pub/mdfvideoadapter.h 7 Mar 2006 21:26:07 -0000 1.3.2.4
+++ pub/mdfvideoadapter.h 10 Mar 2006 15:57:37 -0000
@@ -71,8 +71,13 @@
#include "mdfpluginmanager.h" //CPluginPackage
#include "hxslist.h" //CHXSimpleList
#include "mdfgenericlog.h" //logging
+#include "hxsite3.h"
+#include "hxprefs.h"
+#include "hxprefutil.h"
class CMdfVideoAdapter : public IUnknown,
+public IHXSurfaceControl,
+public IHXDSAControl,
public MMMFDevVideoPlayObserver
{
public:
@@ -100,6 +105,10 @@
void AttachSite( IHXSite* pSite );
void DetachSite();
void ClearBltQueue();
+ HX_RESULT AbortDSA();
+ HX_RESULT StartDSA();
+ HX_RESULT Commit();
+ void CalculateScaleFactor(void);
private:
void SetupWindow();
@@ -125,6 +134,27 @@
virtual void MdvpoInitComplete(TInt aError);
virtual void MdvpoStreamEnd();
+ //
+ // IHXSurfaceControl methods
+ //
+ STDMETHOD(SetRotation) (THIS_ UINT32 ulValue);
+ STDMETHOD(GetRotation) (THIS_ REF(UINT32) ulValue);
+ STDMETHOD(SetContrast) (THIS_ UINT32 ulValue);
+ STDMETHOD(GetContrast) (THIS_ REF(UINT32) ulValue);
+ STDMETHOD(SetWindowRect) (THIS_ HXxRect sValue);
+ STDMETHOD(SetFrameRect) (THIS_ HXxRect sValue);
+ STDMETHOD(GetFrameRect) (THIS_ REF(HXxRect) sValue);
+ STDMETHOD(SetDestRect) (THIS_ HXxRect sValue);
+ STDMETHOD(SetScaling) (THIS_ HXFLOAT fWidthPerc, HXFLOAT fHeightPerc, HXBOOL \
bAntiAlias); + STDMETHOD(GetScaling) (THIS_ REF(HXFLOAT) fWidthPerc, REF(HXFLOAT) \
fHeightPerc, REF(HXBOOL) bAntiAlias); + STDMETHOD(SetCropRect) (THIS_ HXxRect \
sValue); + STDMETHOD(GetCropRect) (THIS_ REF(HXxRect) sValue);
+
+ //IHXDSAControl
+ STDMETHOD(DirectScreenAccessEvent) (THIS_ HXBOOL bValue);
+ STDMETHOD(UpdateDisplayRegion) (THIS_ HXxRegion Region);
+ STDMETHOD(RefreshWindow) (THIS_);
+
private:
enum InitializeState
{
@@ -159,8 +189,16 @@
HXBOOL m_bWsIsConnected;
IUnknown* m_pContext;
TRect m_clipRect;
- HXBOOL m_IsDSAStarted;
+ HXBOOL m_bIsDSAStarted;
+ HXxRect m_frameRect;
+ TSize m_scaledSize;
+ HXBOOL m_bAntiAlias;
+ RRegion m_ClipRegion;
+ TYuvToRgbOptions m_contrastOptions;
+ ULONG32 m_rotationValue;
HXBOOL m_bIsPaused;
+ HXBOOL m_bFrameRectValid;
+ HXBOOL m_bAutoScale;
CPayloadFormatPluginDevice* m_pPayloadFormatPluginDevice;
HXBOOL m_bIsFirstFrameSent;
["video_sitelib.diff" (application/octet-stream)]
Index: platform/symbian/minisymbiansite.cpp
===================================================================
RCS file: /cvsroot/video/sitelib/platform/symbian/minisymbiansite.cpp,v
retrieving revision 1.24
diff -w -u -b -r1.24 minisymbiansite.cpp
--- platform/symbian/minisymbiansite.cpp 4 Oct 2005 15:41:46 -0000 1.24
+++ platform/symbian/minisymbiansite.cpp 10 Mar 2006 16:01:12 -0000
@@ -57,6 +57,7 @@
#include <fbs.h>
#include "hxprefs.h"
#include "hxprefutil.h"
+#include "hxtlogutil.h"
//Well, I hate to add this, but we really have to keep track of how
//many sites have been made so we can center and scale video only
@@ -64,12 +65,33 @@
const INT32 _zm_nSiteCount = 0;
#define zm_nSiteCount HXGlobalInt32::Get(&_zm_nSiteCount)
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+//
+// IUnknown implementation body
+//
+
+BEGIN_INTERFACE_LIST_NOCREATE(CHXSymbianSite)
+INTERFACE_LIST_ENTRY(IID_IHXSurfaceControl, IHXSurfaceControl)
+INTERFACE_LIST_ENTRY(IID_IHXSiteRegister, IHXSiteRegister)
+INTERFACE_LIST_ENTRY(IID_IHXDSAControl, IHXDSAControl)
+INTERFACE_LIST_ENTRY_DELEGATE_BLIND(CMiniBaseSite::QueryInterface)
+END_INTERFACE_LIST
+
+#endif //HELIX_FEATURE_MMF_SITE_CONTROL
CHXSymbianSite::CHXSymbianSite( IUnknown* pContext,
IUnknown* pUnkOuter,
INT32 lZorder)
: CMiniBaseSite(pContext, pUnkOuter, lZorder),
m_bAutoScale(TRUE)
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ ,m_pSurfaceControlSite(NULL)
+ ,m_pDSAControl(NULL)
+ ,m_bWindowRectValid(FALSE)
+ ,m_eRotation(Rotate0)
+ ,m_bBlitting(TRUE)
+#endif
{
+ HXLOGL2( HXLOG_SITE, "CHXSymbianSite::CHXSymbianSite(m_bAutoScale[%d])", \
m_bAutoScale); memset(&m_OrigSize, 0, sizeof(m_OrigSize));
zm_nSiteCount++;
}
@@ -241,3 +263,243 @@
}
return ret;
}
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+
+
+STDMETHODIMP
+CHXSymbianSite::SetRotation(UINT32 ulValue)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::SetRotation( rotation[%d])",ulValue);
+ //update cuurently rotated value
+ m_eRotation = (RotationType)ulValue;
+ if (m_pSurfaceControlSite)
+ {
+ m_pSurfaceControlSite->SetRotation(ulValue);
+ }
+
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CHXSymbianSite::GetRotation(UINT32 &ulValue)
+{
+ if (m_pSurfaceControlSite)
+ {
+ m_pSurfaceControlSite->GetRotation(ulValue);
+ }
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::GetRotation( rotation[%d])",ulValue);
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CHXSymbianSite::SetContrast(UINT32 ulValue)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::SetContrast( contrast[%d] )",ulValue );
+ if(m_pSurfaceControlSite)
+ {
+ m_pSurfaceControlSite->SetContrast(ulValue);
+ }
+ m_uiContrast = ulValue;
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CHXSymbianSite::GetContrast(UINT32 &ulValue)
+{
+ if(m_pSurfaceControlSite)
+ {
+ m_pSurfaceControlSite->GetContrast(ulValue);
+ }
+ ulValue = m_uiContrast;
+
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CHXSymbianSite::SetWindowRect(HXxRect sValue)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::SetWindowRect( sValue.left[%d] \
sValue.top[%d] sValue.right[%d] \
sValue.bottom[%d])",sValue.left,sValue.top,sValue.right,sValue.bottom ); + \
m_bWindowRectValid = TRUE; + if (m_pSurfaceControlSite)
+ {
+ m_pSurfaceControlSite->SetWindowRect(sValue);
+ }
+
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CHXSymbianSite::SetFrameRect(HXxRect sValue)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::SetFrameRect( sValue.left[%d] \
sValue.top[%d] sValue.right[%d] \
sValue.bottom[%d])",sValue.left,sValue.top,sValue.right,sValue.bottom ); + \
HX_RESULT retVal = HXR_OK; +
+ if (m_pSurfaceControlSite)
+ {
+ m_pSurfaceControlSite->SetFrameRect(sValue);
+ }
+
+ return retVal;
+}
+
+STDMETHODIMP
+CHXSymbianSite::GetFrameRect(HXxRect &sValue)
+{
+ HX_RESULT retVal = HXR_FAIL;
+ if(m_pSurfaceControlSite)
+ {
+ retVal = m_pSurfaceControlSite->GetFrameRect(sValue);
+ }
+}
+
+STDMETHODIMP
+CHXSymbianSite::SetDestRect(HXxRect sValue)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::SetDestRect( sValue.left[%d] \
sValue.top[%d] sValue.right[%d] \
sValue.bottom[%d])",sValue.left,sValue.top,sValue.right,sValue.bottom ); + if \
(m_pSurfaceControlSite) + {
+ m_pSurfaceControlSite->SetDestRect(sValue);
+ }
+ return HXR_OK;
+}
+
+STDMETHODIMP
+CHXSymbianSite::SetScaling(HXFLOAT fWidthPerc, HXFLOAT fHeightPerc, HXBOOL \
bAntiAlias) +{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::SetScaling( fWidthPerc[%lf] \
fHeightPerc[%lf] bAntiAlias[%d])",fWidthPerc,fHeightPerc,bAntiAlias ); + HX_RESULT \
retVal = HXR_FAIL; + if(m_pSurfaceControlSite)
+ {
+ retVal = m_pSurfaceControlSite->SetScaling(fWidthPerc,fHeightPerc,bAntiAlias);
+ }
+ return retVal;
+}
+
+STDMETHODIMP
+CHXSymbianSite::GetScaling(HXFLOAT &fWidthPerc, HXFLOAT &fHeightPerc, HXBOOL \
&bAntiAlias) +{
+ HX_RESULT retVal = HXR_FAIL;
+ if(m_pSurfaceControlSite)
+ {
+ retVal = m_pSurfaceControlSite->GetScaling(fWidthPerc, fHeightPerc, \
bAntiAlias); + }
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::GetScaling( fWidthPerc[%lf] \
fHeightPerc[%lf] bAntiAlias[%d])",fWidthPerc,fHeightPerc,bAntiAlias ); + return \
retVal; +}
+
+STDMETHODIMP
+CHXSymbianSite::SetCropRect(HXxRect sValue)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::SetCropRect()");
+ if(m_pSurfaceControlSite)
+ {
+ m_pSurfaceControlSite->SetCropRect(sValue);
+ }
+}
+
+STDMETHODIMP
+CHXSymbianSite::GetCropRect(HXxRect &sValue)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::GetCropRect()");
+ if(m_pSurfaceControlSite)
+ {
+ m_pSurfaceControlSite->GetCropRect(sValue);
+ }
+}
+
+
+STDMETHODIMP
+CHXSymbianSite::RegisterAdapter(IUnknown* pMdfVideoAdapter)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::RegisterAdapter()");
+ IUnknown* pSurfaceCtrl;
+ if( pMdfVideoAdapter == NULL)
+ {
+ return HXR_FAIL;
+ }
+
+ //Get surface control interface
+ pMdfVideoAdapter->QueryInterface(IID_IHXSurfaceControl, (void**) \
&m_pSurfaceControlSite); + if(!m_pSurfaceControlSite)
+ {
+ return HXR_FAIL;
+ }
+
+ //Get control of DSA interface
+ m_pSurfaceControlSite->QueryInterface(IID_IHXDSAControl, (void**) \
&m_pDSAControl); + if(!m_pDSAControl)
+ {
+ return HXR_FAIL;
+ }
+
+ HXxRect tmpRect;
+ if(!m_bWindowRectValid)
+ {
+
+ HXxRect_SetWithSize(tmpRect,
+ m_pWindow->x,
+ m_pWindow->y,
+ m_pWindow->width,
+ m_pWindow->height);
+
+ SetWindowRect(tmpRect);
+ }
+
+ //update contrast
+ SetContrast(m_uiContrast);
+
+ HXxRect_Set(tmpRect,
+ m_pWindow->clipRect.left,
+ m_pWindow->clipRect.top,
+ m_pWindow->clipRect.right,
+ m_pWindow->clipRect.bottom);
+
+ SetDestRect(tmpRect);
+}
+
+STDMETHODIMP
+CHXSymbianSite::DeRegisterAdapter()
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::DeRegisterAdapter()");
+ //Release control of DSA interface & Surface Control
+ HX_RELEASE( m_pDSAControl );
+ HX_RELEASE( m_pSurfaceControlSite );
+
+}
+
+//IHXDSAControl
+HX_RESULT CHXSymbianSite::DirectScreenAccessEvent( HXBOOL bValue )
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::DirectScreenAccessEvent(%d)", bValue);
+ HX_RESULT retVal = HXR_FAIL;
+ if( m_pDSAControl )
+ {
+ retVal = m_pDSAControl->DirectScreenAccessEvent( bValue );
+ }
+ m_bBlitting = bValue;
+ return retVal;
+}
+
+STDMETHODIMP
+CHXSymbianSite::UpdateDisplayRegion(HXxRegion Region)
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::UpdateDisplayRegion()");
+ HX_RESULT retVal = HXR_FAIL;
+ if(m_pDSAControl)
+ {
+ retVal = m_pDSAControl->UpdateDisplayRegion(Region);
+ }
+ return retVal;
+}
+
+STDMETHODIMP
+CHXSymbianSite::RefreshWindow()
+{
+ HXLOGL4( HXLOG_SITE, "CHXSymbianSite::RefreshWindow()");
+ if(m_pDSAControl)
+ {
+ m_pDSAControl->RefreshWindow();
+ }
+}
+
+#endif //#ifdef HELIX_FEATURE_MMF_SITE_CONTROL
Index: pub/platform/symbian/minisymbiansite.h
===================================================================
RCS file: /cvsroot/video/sitelib/pub/platform/symbian/minisymbiansite.h,v
retrieving revision 1.11
diff -w -u -b -r1.11 minisymbiansite.h
--- pub/platform/symbian/minisymbiansite.h 11 Mar 2005 19:58:09 -0000 1.11
+++ pub/platform/symbian/minisymbiansite.h 10 Mar 2006 16:01:12 -0000
@@ -51,12 +51,27 @@
#define _MSYMBIANSITE_H
#include <w32std.h>
+#include "unkimp.h"
+#include "hxcom.h"
+
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+#include "hxsite3.h"
+#endif
class CHXSymbianSite : public CMiniBaseSite
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+,public IHXSurfaceControl
+,public CUnknownIMP
+,public IHXSiteRegister
+,public IHXDSAControl
+#endif
{
public:
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ DECLARE_UNKNOWN(CHXSymbianSite)
+#endif
friend class CMiniSymbianSurface;
CHXSymbianSite(IUnknown* pContext, IUnknown* pUnkOuter = NULL, INT32 lZorder = \
0); @@ -65,8 +80,50 @@
//symbian.
STDMETHOD(SetSize) (THIS_ HXxSize size);
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ //
+ // IHXSurfaceControl methods
+ //
+ //
+ // IHXSurfaceControl methods
+ //
+ STDMETHOD(SetRotation) (THIS_ UINT32 ulValue);
+ STDMETHOD(GetRotation) (THIS_ REF(UINT32) ulValue);
+ STDMETHOD(SetContrast) (THIS_ UINT32 ulValue);
+ STDMETHOD(GetContrast) (THIS_ REF(UINT32) ulValue);
+ STDMETHOD(SetWindowRect) (THIS_ HXxRect sValue);
+ STDMETHOD(SetFrameRect) (THIS_ HXxRect sValue);
+ STDMETHOD(GetFrameRect) (THIS_ REF(HXxRect) sValue);
+ STDMETHOD(SetDestRect) (THIS_ HXxRect sValue);
+ STDMETHOD(SetScaling) (THIS_ HXFLOAT fWidthPerc, HXFLOAT fHeightPerc, HXBOOL \
bAntiAlias); + STDMETHOD(GetScaling) (THIS_ REF(HXFLOAT) fWidthPerc, \
REF(HXFLOAT) fHeightPerc, REF(HXBOOL) bAntiAlias); + STDMETHOD(SetCropRect) \
(THIS_ HXxRect sValue); + STDMETHOD(GetCropRect) (THIS_ REF(HXxRect) sValue);
+
+ //
+ // IHXSiteRegister methods
+ //
+ STDMETHOD(RegisterAdapter) (THIS_ IUnknown* pMdfVideoAdapter);
+ STDMETHOD(DeRegisterAdapter) (THIS_);
+
+ //IHXDSAControl
+ STDMETHOD(DirectScreenAccessEvent) (THIS_ HXBOOL bValue);
+ STDMETHOD(UpdateDisplayRegion) (THIS_ HXxRegion Region);
+ STDMETHOD(RefreshWindow) (THIS_);
+
+#endif //HELIX_FEATURE_MMF_SITE_CONTROL
protected:
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+
+ HXBOOL m_bBlitting;
+ IHXSurfaceControl* m_pSurfaceControlSite;
+ IHXDSAControl* m_pDSAControl;
+ HXBOOL m_bWindowRectValid;
+ RotationType m_eRotation;
+ UINT32 m_uiContrast;
+#endif
+
virtual void* _Create(void* ParentWindow, UINT32 style);
virtual void _Destroy(HXxWindow* pWindow);
virtual void _SetSize(HXxSize size);
["build_umakepf.diff" (application/octet-stream)]
Index: helix-client-s60-mdf-common.pfi
===================================================================
RCS file: /cvsroot/ribosome/build/umakepf/helix-client-s60-mdf-common.pfi,v
retrieving revision 1.5
diff -w -u -b -r1.5 helix-client-s60-mdf-common.pfi
--- helix-client-s60-mdf-common.pfi 31 Jan 2006 17:38:31 -0000 1.5
+++ helix-client-s60-mdf-common.pfi 10 Mar 2006 16:03:08 -0000
@@ -55,6 +55,9 @@
#Enables maximum frame size checking
project.AddDefines('HELIX_FEATURE_VIDEO_ENFORCE_MAX_FRAMESIZE')
+#Enables Post Processing
+project.AddDefines('HELIX_FEATURE_MMF_SITE_CONTROL')
+
project.AddDefines('HELIX_FEATURE_SYMBIAN_MDF_VIDEO')
#Flag indicates if MDF decoder supports addtional API (ConfigureDecoderL)
["clientapps_diff.diff" (application/octet-stream)]
Index: hxmmfctrlimpl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfctrlimpl.cpp,v
retrieving revision 1.12.2.15
diff -w -u -b -r1.12.2.15 hxmmfctrlimpl.cpp
--- hxmmfctrlimpl.cpp 7 Mar 2006 16:56:48 -0000 1.12.2.15
+++ hxmmfctrlimpl.cpp 10 Mar 2006 15:52:56 -0000
@@ -265,6 +265,10 @@
HX_RELEASE(m_pPrefs);
HX_RELEASE(m_pRequest);
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ HX_RELEASE(m_pDSAControl);
+ HX_RELEASE(m_pSurfaceControl);
+#endif
m_pStateCtrl->Close();
HX_RELEASE(m_pStateCtrl);
HX_DELETE(m_pEnvChange);
@@ -474,6 +478,28 @@
//
m_pStateCtrl->RegisterCtrlObject(this);
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ //
+ // Query for Surface control & Dsa Control on Site Supplier
+ //
+ IHXSiteSupplier* pSiteSupplier;
+ m_pStateCtrl->QueryInterface(IID_IHXSiteSupplier, (void **) &pSiteSupplier);
+ HX_ASSERT(pSiteSupplier);
+ if(pSiteSupplier)
+ {
+ pSiteSupplier->QueryInterface(IID_IHXSurfaceControl, (void **) \
&m_pSurfaceControl); + HX_ASSERT(m_pSurfaceControl);
+
+ pSiteSupplier->QueryInterface(IID_IHXDSAControl, (void **) &m_pDSAControl);
+ HX_ASSERT(m_pDSAControl);
+
+ HX_RELEASE(pSiteSupplier);
+ }
+ if((!m_pSurfaceControl) || (!m_pDSAControl))
+ {
+ User::Leave(KErrNotSupported);
+ }
+#endif
// register to receive environment change notifications (for OOM)
m_bIgnoreFirstEnvChange = TRUE;
HX_ASSERT(!m_pEnvChange);
@@ -1108,21 +1134,17 @@
}
}
- /*
+
// Update values that need change-notification in realtime: scaling, alignments
if ( status == KErrNone )
{
- int autoScale = false;
- m_pConfig->Map(NP_AutoScale, autoScale);
- npScreenAccess::Instance()->SetAutoScale(autoScale);
-
- int xAlignment = npScreenParams::ELeft;
- int yAlignment = npScreenParams::ETop;
- m_pConfig->Map(NP_HorizontalAlignment, xAlignment);
- m_pConfig->Map(NP_VerticalAlignment, yAlignment);
- npScreenAccess::Instance()->SetAlignment(xAlignment, yAlignment);
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ UINT32 contrast = 0;
+ contrast = prefs::GetUINT32(m_pPrefs, "Contrast", 0);
+
+ m_pSurfaceControl->SetContrast(contrast);
+#endif
}
- */
return status;
}
@@ -1335,30 +1357,18 @@
HXMMFCtrlImpl::MvpcDirectScreenAccessEventL( const TMMFDSAEvent aDSAEvent )
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::DSAEvent(%d)", aDSAEvent);
-/*
- npScreenAccess* pScreen = npScreenAccess::Instance();
-
-
- if ( aDSAEvent == EAbortDSA )
- {
- pScreen->Abort();
- }
- else if ( aDSAEvent == EResumeDSA )
- {
- if (pScreen->Resume())
- {
- m_pEngine->Refresh();
- }
- }
-*/
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ m_pDSAControl->DirectScreenAccessEvent(aDSAEvent == EResumeDSA);
+#endif
}
void
HXMMFCtrlImpl::MvpcUpdateDisplayRegionL( const TRegion& aRegion )
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcUpdateDisplayRegion()");
-
-// npScreenAccess::Instance()->UpdateRegion(aRegion);
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ m_pDSAControl->UpdateDisplayRegion((HXxRegion)&aRegion);
+#endif
}
void
@@ -1377,19 +1387,7 @@
tl.iX, tl.iY, br.iX, br.iY);
m_pStateCtrl->SetDisplayWindow( aWindowRect, aClipRect );
-/*
- npScreenAccess* pScreen = npScreenAccess::Instance();
-
- pScreen->SetWindow(aWindowRect, aClipRect);
- utString offset;
- utString size;
- if ( pScreen->GetDimensions(offset, size) )
- {
- m_pConfig->Append(NP_WindowOffset, offset);
- m_pConfig->Append(NP_WindowSize, size);
- }
-*/
}
void
@@ -1443,9 +1441,9 @@
HXMMFCtrlImpl::MvpcRefreshFrameL()
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcRefreshL()");
-
-// if (m_pEngine)
-// m_pEngine->Refresh();
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ m_pDSAControl->RefreshWindow();
+#endif
}
void
@@ -1459,67 +1457,43 @@
HXMMFCtrlImpl::MvpcSetRotationL( TVideoRotation aRotation )
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcSetRotationL()");
-/*
- npScreenAccess* pScreen = npScreenAccess::Instance();
-
- switch (aRotation)
- {
- case EVideoRotationClockwise90:
- pScreen->SetRotation(90);
- break;
- case EVideoRotationClockwise180:
- pScreen->SetRotation(180);
- break;
- case EVideoRotationClockwise270:
- pScreen->SetRotation(270);
- break;
- case EVideoRotationNone:
- default:
- pScreen->SetRotation(0);
- break;
- }
-*/
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ m_pSurfaceControl->SetRotation(aRotation);
+#endif
}
void
HXMMFCtrlImpl::MvpcGetRotationL(TVideoRotation& aRotation)
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcGetRotationL()");
-/*
- npScreenAccess* pScreen = npScreenAccess::Instance();
-
- switch (pScreen->GetRotation())
- {
- case 90:
- aRotation = EVideoRotationClockwise90;
- break;
- case 180:
- aRotation = EVideoRotationClockwise180;
- break;
- case 270:
- aRotation = EVideoRotationClockwise270;
- break;
- case 0:
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ UINT32 tempRotation;
+ m_pSurfaceControl->GetRotation(tempRotation);
+ switch (tempRotation)
+ {
+ case Rotate90:
+ aRotation = EVideoRotationClockwise90; break;
+ case Rotate180:
+ aRotation = EVideoRotationClockwise180; break;
+ case Rotate270:
+ aRotation = EVideoRotationClockwise270; break;
+ case Rotate0:
default:
- aRotation = EVideoRotationNone;
- break;
+ aRotation = EVideoRotationNone; break;
}
-*/
+#endif
+
}
void
HXMMFCtrlImpl::MvpcSetScaleFactorL( TReal32 aWidthPercentage,
TReal32 aHeightPercentage,
- TBool /* aAntiAliasFiltering */)
+ TBool aAntiAliasFiltering )
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcSetScaleFactorL()");
-/*
- npScreenAccess* pScreen = npScreenAccess::Instance();
-
- // we ignore the filter parameter
- // and only support isometric scaling
- pScreen->SetScale((int)(aWidthPercentage));
-*/
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ m_pSurfaceControl->SetScaling(aWidthPercentage, aHeightPercentage, \
aAntiAliasFiltering); +#endif
}
void
@@ -1528,35 +1502,24 @@
TBool& aAntiAliasFiltering)
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcGetScaleFactorL()");
-/*
- npScreenAccess* pScreen = npScreenAccess::Instance();
-
- // we ignore the filter parameter and
- // only support isometric scaling
- aWidthPercentage = (TReal)pScreen->GetScale();
- aHeightPercentage = aWidthPercentage;
- aAntiAliasFiltering = ETrue;
-*/
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ m_pSurfaceControl->GetScaling(aWidthPercentage, aHeightPercentage, \
aAntiAliasFiltering); +#endif
}
void
HXMMFCtrlImpl::MvpcSetCropRegionL(const TRect& aCropRegion)
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcSetCropRegionL()");
-/*
- npScreenAccess* pScreen = npScreenAccess::Instance();
- pScreen->SetCropRect(aCropRegion);
-*/
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ m_pSurfaceControl->SetCropRect(CHXxRect(aCropRegion.iTl.iX, aCropRegion.iTl.iY, \
aCropRegion.iBr.iX, aCropRegion.iBr.iY)); +#endif
}
void
HXMMFCtrlImpl::MvpcGetCropRegionL(TRect& aCropRegion)
{
HXLOGL1(HXLOG_SMMF, "HXMMFCtrlImpl::MvpcGetCropRegionL()");
-/*
- npScreenAccess* pScreen = npScreenAccess::Instance();
- aCropRegion = pScreen->GetCropRect();
-*/
}
@@ -1859,5 +1822,15 @@
HXMMFCtrlImpl::CachePresentationInfo(IHXPlayer *pPlayer)
{
m_pMetaData->CachePresentationInfo(pPlayer);
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ //update frame size for site based on clip info
+ TInt width=0, height=0;
+
+ m_pMetaData->FindStreamValueByName( "Video", "FrameWidth", width);
+ m_pMetaData->FindStreamValueByName( "Video", "FrameHeight", height);
+
+ /* Initialization. */
+ m_pSurfaceControl->SetFrameRect(CHXxRect(0, 0, width, height));
+#endif
}
Index: hxmmfctrlimpl.h
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfctrlimpl.h,v
retrieving revision 1.3.2.6
diff -w -u -b -r1.3.2.6 hxmmfctrlimpl.h
--- hxmmfctrlimpl.h 24 Feb 2006 20:11:46 -0000 1.3.2.6
+++ hxmmfctrlimpl.h 10 Mar 2006 15:52:56 -0000
@@ -88,6 +88,11 @@
#include "hxmmfmetadata.h"
#include "hxmmferrorlogsink.h"
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+#include "hxsite3.h"
+#include <chxxtype.h> /* For CHXxRect. */
+#endif
+
class MDataSource;
class MDataSink;
class MMMFVideoFrameMessage;
@@ -253,6 +258,10 @@
#ifdef DRM_ENABLED_FROM_CONTROLLER
ContentAccess::TIntent m_DRMIntent;
#endif
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ IHXDSAControl* m_pDSAControl;
+ IHXSurfaceControl* m_pSurfaceControl;
+#endif
};
Index: hxmmfsitesupplier.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfsitesupplier.cpp,v
retrieving revision 1.1.1.1.2.3
diff -w -u -b -r1.1.1.1.2.3 hxmmfsitesupplier.cpp
--- hxmmfsitesupplier.cpp 9 Feb 2006 16:28:01 -0000 1.1.1.1.2.3
+++ hxmmfsitesupplier.cpp 10 Mar 2006 15:52:56 -0000
@@ -108,12 +108,17 @@
//
BEGIN_INTERFACE_LIST(HXMMFSiteSupplier)
INTERFACE_LIST_ENTRY(IID_IHXSiteSupplier, IHXSiteSupplier)
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+INTERFACE_LIST_ENTRY(IID_IHXSurfaceControl, IHXSurfaceControl)
+INTERFACE_LIST_ENTRY(IID_IHXDSAControl, IHXDSAControl)
+#endif
END_INTERFACE_LIST
HXMMFSiteSupplier::HXMMFSiteSupplier()
: m_classFactory(NULL),
m_sitesManager(NULL),
+m_pSitesManager2(NULL),
m_pScreenSize(NULL)
{
}
@@ -123,6 +128,7 @@
HX_RELEASE(m_classFactory);
HX_RELEASE(m_sitesManager);
+ HX_RELEASE(m_pSitesManager2);
HX_RELEASE(m_pContext);
HX_ASSERT(m_sitesCreated.IsEmpty());
@@ -143,9 +149,11 @@
{
m_pContext->AddRef();
m_pContext->QueryInterface(IID_IHXSiteManager,(void**)&m_sitesManager);
+ m_pContext->QueryInterface(IID_IHXSiteManager2,(void**)&m_pSitesManager2);
m_pContext->QueryInterface(IID_IHXCommonClassFactory, \
(void**)&m_classFactory); HX_ASSERT(m_sitesManager);
HX_ASSERT(m_classFactory);
+ HX_ASSERT(m_pSitesManager2);
}
@@ -173,6 +181,13 @@
{
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)); +
+#endif //HELIX_FEATURE_MMF_SITE_CONTROL
}
//
@@ -426,7 +441,784 @@
HX_RESULT
HXMMFSiteSupplier::SizeChanged( HXxSize* pSize )
{
- HXLOGL2(HXLOG_SMMF, "HXMMFSiteSupplier::SizeChanged");
+ HXLOGL2(HXLOG_SMMF, "HXMMFSiteSupplier::SizeChanged()");
+ return HXR_OK;
+}
+
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+
+STDMETHODIMP
+HXMMFSiteSupplier::SetRotation(UINT32 ulValue)
+{
+
+ IHXSurfaceControl* pSurfaceControl = NULL;
+ IHXSite* pIterationSite = NULL;
+ HRESULT hres;
+ UINT32 index;
+ UINT32 nNumSites = 0;
+ RotationType ulRotation;
+
+ switch (ulValue)
+ {
+ case EVideoRotationClockwise90:
+ ulRotation = Rotate90; break;
+ case EVideoRotationClockwise180:
+ ulRotation = Rotate180; break;
+ case EVideoRotationClockwise270:
+ ulRotation = Rotate270; break;
+ case EVideoRotationNone:
+ default:
+ ulRotation = Rotate0; break;
+ }
+
+ 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->SetRotation(ulRotation) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetRotation(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::SetRotation(%lu) #Sites[%lu] \
#Errors[%d]", ulValue, nNumSites, hres); + if(hres == nNumSites)
+ {
+ //no site was set
+ return HXR_FAIL;
+ }
+ else
+ {
+ //AT least one site set the parameter
return HXR_OK;
}
+}
+
+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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) \
&pSurfaceControl); + if(pSurfaceControl)
+ {
+ if(pSurfaceControl->GetRotation(ulValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetRotation(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::GetRotation(%lu) #Sites[%lu] \
#Errors[%d]", ulValue, nNumSites, hres); + if(hres == nNumSites)
+ {
+ //no site was gotten
+ return HXR_FAIL;
+ }
+ else
+ {
+ //We got the parameter from at least one site
+ return HXR_OK;
+ }
+}
+
+STDMETHODIMP
+HXMMFSiteSupplier::SetContrast(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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) \
&pSurfaceControl); + if(pSurfaceControl)
+ {
+ if(pSurfaceControl->SetContrast(ulValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetContrast(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::SetContrast(%lu) #Sites[%lu] \
#Errors[%d])", ulValue, nNumSites, hres); + if(hres == nNumSites)
+ {
+ //no site was set
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one site was site
+ return HXR_OK;
+ }
+}
+
+STDMETHODIMP
+HXMMFSiteSupplier::GetContrast(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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) \
&pSurfaceControl); + if(pSurfaceControl)
+ {
+ if(pSurfaceControl->GetContrast(ulValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetContrast(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::GetContrast(%lu) #Sites[%lu] \
#Errors[%d])", ulValue, nNumSites, hres); + if(hres == nNumSites)
+ {
+ //no site was gotten
+ return HXR_FAIL;
+ }
+ else
+ {
+ //We got the parameter from at least one site
+ return HXR_OK;
+ }
+}
+
+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;
+ 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->SetFrameRect(sValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetFrameRect(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::SetFrameRect");
+ if(hres == nNumSites)
+ {
+ //no site was set
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one site was set
+ return HXR_OK;
+ }
+}
+
+STDMETHODIMP
+HXMMFSiteSupplier::GetFrameRect(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->GetFrameRect(sValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::GetFrameRect(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::GetFrameRect");
+ if(hres == nNumSites)
+ {
+ //no site was gotten
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one site was got
+ return HXR_OK;
+ }
+}
+
+STDMETHODIMP
+HXMMFSiteSupplier::SetDestRect(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->SetDestRect(sValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, "HXMMFSiteSupplier::SetDestRect(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");
+ if(hres == nNumSites)
+ {
+ //no site was set
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one site was set
+ return HXR_OK;
+ }
+}
+
+
+STDMETHODIMP
+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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) \
&pSurfaceControl); + if(pSurfaceControl)
+ {
+ if(pSurfaceControl->SetScaling(fWidthPerc,fHeightPerc,bAntiAlias) == \
HXR_OK) + {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ 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::SetScaling( fWidthPerc(%lu) \
fHeightPerc[%lu] bAntiAlias[%d] )", fWidthPerc, fHeightPerc, bAntiAlias); + \
if(hres == nNumSites) + {
+ //no site was set
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one site was set
+ return HXR_OK;
+ }
+}
+
+STDMETHODIMP
+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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) \
&pSurfaceControl); + if(pSurfaceControl)
+ {
+ if(pSurfaceControl->GetScaling(fWidthPerc,fHeightPerc,bAntiAlias) == \
HXR_OK) + {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ 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::GetScaling( fWidthPerc(%lu) \
fHeightPerc[%lu] bAntiAlias[%d] )", fWidthPerc, fHeightPerc, bAntiAlias); + \
if(hres == nNumSites) + {
+ //no site was gotten
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one site was got
+ return HXR_OK;
+ }
+}
+
+STDMETHODIMP
+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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) \
&pSurfaceControl); + if(pSurfaceControl)
+ {
+ if(pSurfaceControl->SetCropRect(sValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ 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::SetCropRect()");
+ if(hres == nNumSites)
+ {
+ //no site was set
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one site was set
+ return HXR_OK;
+ }
+}
+
+STDMETHODIMP
+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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXSurfaceControl, (void**) \
&pSurfaceControl); + if(pSurfaceControl)
+ {
+ if(pSurfaceControl->SetCropRect(sValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ 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::GetCropRect()");
+ if(hres == nNumSites)
+ {
+ //no site was gotten
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one site was got
+ return HXR_OK;
+ }
+}
+
+//IHXDSAControl
+
+STDMETHODIMP
+HXMMFSiteSupplier::UpdateDisplayRegion(HXxRegion Region)
+{
+ 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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXDSAControl, (void**) \
&pDSAControl); + if(pDSAControl)
+ {
+ if(pDSAControl->UpdateDisplayRegion(Region) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, \
"HXMMFSiteSupplier::UpdateDisplayRegion(FALIED)"); + }
+ HX_RELEASE(pDSAControl);
+ }
+ }
+
+ }
+ // 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::UpdateDisplayRegion()");
+ if(hres == nNumSites)
+ {
+ //no update sent
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one update sent
+ return HXR_OK;
+ }
+}
+
+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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXDSAControl, (void**) \
&pDSAControl); + if(pDSAControl)
+ {
+ if(pDSAControl->RefreshWindow() == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, \
"HXMMFSiteSupplier::RefreshWindow(FALIED)"); + }
+ HX_RELEASE(pDSAControl);
+ }
+ }
+
+ }
+ // 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::RefreshWindow()");
+ if(hres == nNumSites)
+ {
+ //no refresh sent
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one refresh sent
+ return HXR_OK;
+ }
+}
+
+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++)
+ {
+ m_pSitesManager2->GetSiteAt(index, pIterationSite);
+ if(pIterationSite)
+ {
+ pIterationSite->QueryInterface(IID_IHXDSAControl, (void**) \
&pDSAControl); + if(pDSAControl)
+ {
+ if(pDSAControl->DirectScreenAccessEvent(bValue) == HXR_OK)
+ {
+ //error tracking of how many sites succeded
+ hres--;
+ }
+ else
+ {
+ HXLOGL2( HXLOG_SMMF, \
"HXMMFSiteSupplier::DirectScreenAccessEvent(FALIED)"); + }
+ HX_RELEASE(pDSAControl);
+ }
+ }
+
+ }
+ // 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::DirectScreenAccessEvent(%d) #Sites[%d] \
#Errors[%d]", bValue, nNumSites, hres); + if(hres == nNumSites)
+ {
+ //no DSA sent
+ return HXR_FAIL;
+ }
+ else
+ {
+ //at least one DSA sent
+ return HXR_OK;
+ }
+}
+
+#endif //(HELIX_FEATURE_MMF_SITE_CONTROL)
Index: hxmmfsitesupplier.h
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfsitesupplier.h,v
retrieving revision 1.1.1.1.2.1
diff -w -u -b -r1.1.1.1.2.1 hxmmfsitesupplier.h
--- hxmmfsitesupplier.h 9 Feb 2006 16:28:01 -0000 1.1.1.1.2.1
+++ hxmmfsitesupplier.h 10 Mar 2006 15:52:56 -0000
@@ -65,11 +65,26 @@
#include "hxsite2.h"
#include "chxmaplongtoobj.h"
-
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+//
+// Symbian includes
+//
+#include <mmf/common/mmfvideo.h>
+#include <mmf/common/mmfstandardcustomcommands.h>
+#endif
+
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+#include "hxsite3.h"
+#include <chxxtype.h> /* For CHXxRect. */
+#endif
class HXMMFSiteSupplier : public CUnknownIMP,
public IHXSiteSupplier,
public IHXPassiveSiteWatcher
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+,public IHXSurfaceControl
+,public IHXDSAControl
+#endif
{
public:
DECLARE_UNKNOWN(HXMMFSiteSupplier)
@@ -87,7 +102,29 @@
STDMETHOD(SitesNotNeeded)(THIS_ UINT32 uReqestID);
STDMETHOD(BeginChangeLayout)(THIS);
STDMETHOD(DoneChangeLayout)(THIS);
+#if defined(HELIX_FEATURE_MMF_SITE_CONTROL)
+ //
+ // IHXSurfaceControl methods
+ //
+ STDMETHOD(SetRotation) (THIS_ UINT32 ulValue);
+ STDMETHOD(GetRotation) (THIS_ REF(UINT32) ulValue);
+ STDMETHOD(SetContrast) (THIS_ UINT32 ulValue);
+ STDMETHOD(GetContrast) (THIS_ REF(UINT32) ulValue);
+ STDMETHOD(SetWindowRect) (THIS_ HXxRect sValue);
+ STDMETHOD(SetFrameRect) (THIS_ HXxRect sValue);
+ STDMETHOD(GetFrameRect) (THIS_ REF(HXxRect) sValue);
+ STDMETHOD(SetDestRect) (THIS_ HXxRect sValue);
+ STDMETHOD(SetScaling) (THIS_ HXFLOAT fWidthPerc, HXFLOAT fHeightPerc, HXBOOL \
bAntiAlias); + STDMETHOD(GetScaling) (THIS_ REF(HXFLOAT) fWidthPerc, REF(HXFLOAT) \
fHeightPerc, REF(HXBOOL) bAntiAlias); + STDMETHOD(SetCropRect) (THIS_ HXxRect \
sValue); + STDMETHOD(GetCropRect) (THIS_ REF(HXxRect) sValue);
+
+ //IHXDSAControl
+ STDMETHOD(DirectScreenAccessEvent) (THIS_ HXBOOL bValue);
+ STDMETHOD(UpdateDisplayRegion) (THIS_ HXxRegion Region);
+ STDMETHOD(RefreshWindow) (THIS_);
+#endif
//
// IHXPassiveSiteWatcher methods
//
@@ -101,6 +138,7 @@
IHXCommonClassFactory* m_classFactory;
IHXSiteManager* m_sitesManager;
+ IHXSiteManager2* m_pSitesManager2;
CHXMapLongToObj m_sitesCreated;
IUnknown* m_pContext;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic