--- a/build.config.xml Fri Sep 17 08:38:32 2010 +0300
+++ b/build.config.xml Thu Oct 14 10:21:48 2010 +0100
@@ -42,5 +42,17 @@
</component>
</module>
</layer>
+
+ <layer name="test_ncp_layer">
+ <module name="openmaxil">
+ <component name="openmaxil_plat">
+ <unit unitID="openmaxil_plat.test_api_test" name="OpenMAX IL Symbian API" mrp="" bldFile="&layer_real_source_path;/openmaxil_plat/test_api/group"/>
+ </component>
+ <component name="openmaxil_tsrc">
+ <unit unitID="tsrc.xmltestharness_test" name="OpenMAX IL xmlclient" mrp="" bldFile="&layer_real_source_path;/tsrc/xmltestharness/group"/>
+ </component>
+ </module>
+ </layer>
+
</systemModel>
</SystemDefinition>
--- a/omxil_generic/omxilcomplib/mmpfiles/omxilcomponentcommon.mmp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/mmpfiles/omxilcomponentcommon.mmp Thu Oct 14 10:21:48 2010 +0100
@@ -62,10 +62,6 @@
// Uncomment to activate spec version checks in OMX IL structs
//MACRO _OMXIL_COMMON_SPEC_VERSION_CHECKS_ON
-// Uncomment to activate the "alternatives to App Note IL #318"
-// See IL516c_Issue#1-Race-Conditions-Solutions-for-1.y_Nokia.pdf
-// MACRO _OMXIL_COMMON_IL516C_ON
-
NOSTRICTDEF
--- a/omxil_generic/omxilcomplib/src/omxilaudioport.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilaudioport.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -379,9 +379,14 @@
apBuffer);
}
+#ifndef __WINSCW__
+#pragma CTC SKIP
+#endif
EXPORT_C
TInt COmxILAudioPort::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
{
return COmxILPort::Extension_(aExtensionId, a0, a1);
}
-
+#ifndef __WINSCW__
+#pragma CTC ENDSKIP
+#endif
--- a/omxil_generic/omxilcomplib/src/omxilcallbackmanager.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilcallbackmanager.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -302,25 +302,6 @@
}
-#ifdef _OMXIL_COMMON_IL516C_ON
-OMX_ERRORTYPE
-COmxILCallbackManager::EjectBuffersRequest(OMX_U32 aLocalOmxPortIndex)
- {
- DEBUG_PRINTF2(_L8("COmxILCallbackManager::EjectBuffersRequest : aLocalOmxPortIndex [%u]"), aLocalOmxPortIndex);
-
- CEjectBuffersRequestCommand* pEjectCBack =
- new CEjectBuffersRequestCommand(aLocalOmxPortIndex);
- if (!pEjectCBack || (iCommandQueue.Send(pEjectCBack) != KErrNone))
- {
- delete pEjectCBack;
- HandleInsufficientResources();
- }
-
- return OMX_ErrorNone;
-
- }
-#endif
-
OMX_ERRORTYPE
COmxILCallbackManager::ErrorEventNotification(OMX_ERRORTYPE aOmxError)
{
@@ -1063,22 +1044,3 @@
}
}
-
-#ifdef _OMXIL_COMMON_IL516C_ON
-void
-COmxILCallbackManager::CEjectBuffersRequestCommand::operator()(
- COmxILCallbackManager& aCbMgr, TBool& /* aHasBeenDeferred */)
- {
- DEBUG_PRINTF3(_L8("CEjectBuffersRequestCommand::operator() : Handle[%X], iLocalOmxPortIndex=[%u]"),
- aCbMgr.ipHandle, iLocalOmxPortIndex);
-
- OMX_ERRORTYPE omxError =
- aCbMgr.DoEjectBuffersRequest(iLocalOmxPortIndex);
-
- if (OMX_ErrorInsufficientResources == omxError)
- {
- aCbMgr.HandleInsufficientResources();
- }
-
- }
-#endif //_OMXIL_COMMON_IL516C_ON
--- a/omxil_generic/omxilcomplib/src/omxilcallbackmanager.h Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilcallbackmanager.h Thu Oct 14 10:21:48 2010 +0100
@@ -57,9 +57,6 @@
class CEventCallbackCommand;
class CBufferDoneCallbackCommand;
class CPortSettingsChangeCommand;
-#ifdef _OMXIL_COMMON_IL516C_ON
- class CEjectBuffersRequestCommand;
-#endif
// Note that the following friends don't break COmxILCallbackManager's
// interface as all friends below are COmxILCallbackManager's private
// nested classes and therefore they are logically part of
@@ -72,9 +69,6 @@
friend class CEventCallbackCommand;
friend class CBufferDoneCallbackCommand;
friend class CPortSettingsChangeCommand;
-#ifdef _OMXIL_COMMON_IL516C_ON
- friend class CEjectBuffersRequestCommand;
-#endif
public:
@@ -131,11 +125,6 @@
OMX_COMMANDTYPE aOmxCommand,
OMX_U32 aOmxPortIndex);
-#ifdef _OMXIL_COMMON_IL516C_ON
- OMX_ERRORTYPE EjectBuffersRequest(
- OMX_U32 aLocalOmxPortIndex);
-#endif
-
//
// Methods for Callback Notification (from MOmxILCallbackManagerIf)
//
@@ -500,28 +489,6 @@
};
-#ifdef _OMXIL_COMMON_IL516C_ON
-/**
- Callback Manager's command class for requesting buffer ejection from tunnelled component.
- */
-class COmxILCallbackManager::CEjectBuffersRequestCommand :
- public COmxILCallbackManager::CCallbackCommand
- {
-
-public:
-
- inline CEjectBuffersRequestCommand(OMX_U32 aLocalOmxPortIndex);
-
- void operator()(COmxILCallbackManager& aCbMgr, TBool& aHasBeenDeferred);
-
-private:
-
- OMX_U32 iLocalOmxPortIndex;
-
- };
-#endif
-
-
#include "omxilcallbackmanager.inl"
#endif // OMXILCALLBACKMANAGER_H
--- a/omxil_generic/omxilcomplib/src/omxilcallbackmanager.inl Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilcallbackmanager.inl Thu Oct 14 10:21:48 2010 +0100
@@ -132,14 +132,3 @@
ipPortSettings(apPortSettings)
{
}
-
-#ifdef _OMXIL_COMMON_IL516C_ON
-inline
-COmxILCallbackManager::CEjectBuffersRequestCommand::
-CEjectBuffersRequestCommand(OMX_U32 aLocalOmxPortIndex)
- :
- CCallbackCommand(CCallbackCommand::EPriorityNormal),
- iLocalOmxPortIndex(aLocalOmxPortIndex)
- {
- }
-#endif
--- a/omxil_generic/omxilcomplib/src/omxilcallbackmanagerif.h Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilcallbackmanagerif.h Thu Oct 14 10:21:48 2010 +0100
@@ -174,20 +174,6 @@
OMX_COMMANDTYPE aOmxCommand,
OMX_U32 aOmxPortIndex) = 0;
-#ifdef _OMXIL_COMMON_IL516C_ON
- /**
- Method to request from the tunnelled component the ejection of the
- buffers present in one of its ports
-
- @param [in] aLocalOmxPortIndex The index of the local port that is
- tunnelled to the component that the ejection request applies to
-
- @return OMX_ERRORTYPE
- */
- virtual OMX_ERRORTYPE EjectBuffersRequest(
- OMX_U32 aLocalOmxPortIndex) = 0;
-#endif
-
};
#include "omxilcallbackmanagerif.inl"
--- a/omxil_generic/omxilcomplib/src/omxilcallbackmanagerifimpl.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilcallbackmanagerifimpl.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -410,61 +410,6 @@
}
-#ifdef _OMXIL_COMMON_IL516C_ON
-OMX_ERRORTYPE
-XOmxILCallbackManagerIfImpl::DoEjectBuffersRequest(
- OMX_U32 aLocalPortIndex)
- {
- DEBUG_PRINTF2(_L8("XOmxILCallbackManagerIfImpl::DoEjectBuffersRequest : "
- "aLocalPortIndex[%d]"), aLocalPortIndex);
-
- __ASSERT_DEBUG(ipHandle &&
- ipCallbacks &&
- ipPortManager,
- User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1));
-
- // find out whether the port is tunnelled or not
- const TUint tunnelCount = iRegisteredTunnels.Count();
- for (TUint i=0; i<tunnelCount; ++i)
- {
- if (iRegisteredTunnels[i].iLocalPortIndex ==
- aLocalPortIndex)
- {
-
- OMX_COMPONENTTYPE* ipTunnelledComponent =
- static_cast<OMX_COMPONENTTYPE*>(
- iRegisteredTunnels[i].
- iTunnelledComponentHandle);
-
- __ASSERT_DEBUG(ipTunnelledComponent,
- User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1));
-
- DEBUG_PRINTF3(_L8("XOmxILCallbackManagerIfImpl::DoEjectBuffersRequest : "
- "iTunnelledComponent [%X] iTunnelledPortIndex[%u]"),
- ipTunnelledComponent,
- iRegisteredTunnels[i].iTunnelledPortIndex);
-
- OMX_PARAM_U32TYPE ejectBufferRequest;
- ejectBufferRequest.nSize = sizeof(OMX_PARAM_U32TYPE);
- ejectBufferRequest.nVersion = TOmxILSpecVersion();
- ejectBufferRequest.nPortIndex = iRegisteredTunnels[i].iTunnelledPortIndex;
- ejectBufferRequest.nU32 = 1; // .... we can define a constant to be used here
-
- // Returned error ignored here. Cannot handle an error from the
- // tunnelled component
- OMX_SetConfig(ipTunnelledComponent,
- OMX_IndexConfigPortBufferReturnRequest,
- &ejectBufferRequest);
-
- break;
- }
- }
-
- return OMX_ErrorNone;
-
- }
-#endif
-
void
XOmxILCallbackManagerIfImpl::SignalOrPropagateBufferMarks(
OMX_BUFFERHEADERTYPE* apBufferHeader,
--- a/omxil_generic/omxilcomplib/src/omxilcallbackmanagerifimpl.h Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilcallbackmanagerifimpl.h Thu Oct 14 10:21:48 2010 +0100
@@ -108,11 +108,6 @@
TUint aPortSettingsIndex,
const TDesC8& aPortSettings);
-#ifdef _OMXIL_COMMON_IL516C_ON
- virtual OMX_ERRORTYPE DoEjectBuffersRequest(
- OMX_U32 aLocalPortIndex);
-#endif
-
virtual void SignalOrPropagateBufferMarks(OMX_BUFFERHEADERTYPE* apBufferHeader,
OMX_U32 aLocalPortIndex);
--- a/omxil_generic/omxilcomplib/src/omxilcomponent.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilcomponent.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -155,11 +155,16 @@
__ASSERT_ALWAYS(ipImpl, User::Panic(KOmxILComponentPanicCategory, 1));
return ipImpl->GetProcessingFunction();
}
-
+
+#ifndef __WINSCW__
+#pragma CTC SKIP
+#endif
EXPORT_C
TInt COmxILComponent::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
{
return CBase::Extension_(aExtensionId, a0, a1);
}
+#ifndef __WINSCW__
+#pragma CTC ENDSKIP
+#endif
-
--- a/omxil_generic/omxilcomplib/src/omxilconfigmanager.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilconfigmanager.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -187,8 +187,15 @@
__ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1));
return ipConfigManagerImpl->ManagedConfigIndexes();
}
+
+#ifndef __WINSCW__
+#pragma CTC SKIP
+#endif
EXPORT_C
TInt COmxILConfigManager::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
{
return CBase::Extension_(aExtensionId, a0, a1);
}
+#ifndef __WINSCW__
+#pragma CTC ENDSKIP
+#endif
--- a/omxil_generic/omxilcomplib/src/omxilimageport.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilimageport.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -410,9 +410,15 @@
return ipImagePortImpl->GetSupportedColorFormats();
}
+#ifndef __WINSCW__
+#pragma CTC SKIP
+#endif
EXPORT_C
OMX_IMAGE_PARAM_PORTFORMATTYPE& COmxILImagePort::GetParamImagePortFormat()
{
__ASSERT_ALWAYS(ipImagePortImpl, User::Panic(KOmxILImagePortPanicCategory, 1));
return ipImagePortImpl->GetParamImagePortFormat();
}
+#ifndef __WINSCW__
+#pragma CTC ENDSKIP
+#endif
--- a/omxil_generic/omxilcomplib/src/omxilincontextcallbackmanager.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilincontextcallbackmanager.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -647,19 +647,6 @@
}
-#ifdef _OMXIL_COMMON_IL516C_ON
-OMX_ERRORTYPE
-COmxILInContextCallbackManager::EjectBuffersRequest(
- OMX_U32 aLocalOmxPortIndex)
- {
- DEBUG_PRINTF2(_L8("COmxILInContextCallbackManager::EjectBuffersRequest : aLocalOmxPortIndex[%d]"), aLocalOmxPortIndex);
-
- OMX_ERRORTYPE omxError = DoEjectBuffersRequest(aLocalOmxPortIndex);
- return omxError;
-
- }
-#endif
-
void
COmxILInContextCallbackManager::FlushQueue(
RCbMgrBufferQueue& aQueue)
--- a/omxil_generic/omxilcomplib/src/omxilincontextcallbackmanager.h Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilincontextcallbackmanager.h Thu Oct 14 10:21:48 2010 +0100
@@ -88,11 +88,6 @@
OMX_COMMANDTYPE aOmxCommand,
OMX_U32 aOmxPortIndex);
-#ifdef _OMXIL_COMMON_IL516C_ON
- OMX_ERRORTYPE EjectBuffersRequest(
- OMX_U32 aLocalOmxPortIndex);
-#endif
-
//
// Methods for Callback Notification (from MOmxILCallbackManagerIf)
//
--- a/omxil_generic/omxilcomplib/src/omxilotherport.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilotherport.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -374,8 +374,14 @@
return ipOtherPortImpl->GetParamOtherPortFormat();
}
+#ifndef __WINSCW__
+#pragma CTC SKIP
+#endif
EXPORT_C
TInt COmxILOtherPort::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
{
return COmxILPort::Extension_(aExtensionId, a0, a1);
}
+#ifndef __WINSCW__
+#pragma CTC ENDSKIP
+#endif
--- a/omxil_generic/omxilcomplib/src/omxilport.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilport.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -678,12 +678,17 @@
return ipPortImpl->GetTunnelledPort();
}
+#ifndef __WINSCW__
+#pragma CTC SKIP
+#endif
EXPORT_C
TInt COmxILPort::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
{
return CBase::Extension_(aExtensionId, a0, a1);
}
+#ifndef __WINSCW__
+#pragma CTC ENDSKIP
+#endif
-
--- a/omxil_generic/omxilcomplib/src/omxilportmanager.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilportmanager.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -653,47 +653,6 @@
{
DEBUG_PRINTF(_L8("COmxILPortManager::SetConfig"));
-#ifdef _OMXIL_COMMON_IL516C_ON
-
- if (OMX_IndexConfigPortBufferReturnRequest == aConfigIndex)
- {
- OMX_U32 portIndex;
- if (OMX_ErrorNone != GetPortIndexFromOmxStruct(
- apComponentConfigStructure,
- portIndex))
- {
- return OMX_ErrorBadPortIndex;
- }
- DEBUG_PRINTF2(_L8("COmxILPortManager::SetConfig : PORT[%u] OMX_IndexConfigPortBufferReturnRequest"), portIndex);
-
- // Check the index of the port..
- if ((OMX_ALL != portIndex) &&
- (CheckPortIndex(portIndex) != OMX_ErrorNone))
- {
- return OMX_ErrorBadPortIndex;
- }
-
- // This error will be ignored...
- OMX_ERRORTYPE omxRetValue = OMX_ErrorNone;
- if (portIndex != OMX_ALL)
- {
- omxRetValue = BufferEjectIndication(portIndex);
- }
- else
- {
- const TInt portCount = iAllPorts.Count();
-
- for (TUint i = 0; i< portCount; ++i)
- {
- omxRetValue = BufferEjectIndication(iAllPorts[i]->Index());
- }
- }
-
- return OMX_ErrorNone;
-
- }
-#endif
-
TInt index = FindConfigIndex(aConfigIndex);
if (KErrNotFound == index)
{
@@ -775,22 +734,6 @@
// Grab the port here...
COmxILPort* pPort = iAllPorts[aPortIndex];
-#ifdef _OMXIL_COMMON_IL516C_ON
- if (!apBuffer)
- {
- // Basically, if OMX_UseBuffer is used, the port must not be populated
- // at this point, otherwise it is an error...
- if (pPort->IsPopulated())
- {
- return OMX_ErrorIncorrectStateOperation;
- }
- }
- else
- {
- // ... AllocateBuffer... this is only allowed if the the IL Client has
- // issued the command to idle already..
-#endif
-
if (OMX_TRUE == aPortIsDisabled &&
pPort->IsEnabled() &&
!pPort->IsTransitioningToEnabled())
@@ -802,10 +745,6 @@
return OMX_ErrorIncorrectStateOperation;
}
-#ifdef _OMXIL_COMMON_IL516C_ON
- }
-#endif
-
// Check that in case of tunnelling, this port is not buffer supplier...
if (pPort->IsTunnelledAndBufferSupplier())
{
@@ -1327,34 +1266,22 @@
return OMX_ErrorBadPortIndex;
}
-#ifdef _OMXIL_COMMON_IL516C_ON
- (void)aPortIsDisabled;
- // Only restriction here is that the port must be populated
- if (!pPort->IsPopulated())
- {
- return OMX_ErrorIncorrectStateOperation;
- }
-#endif
-
-#ifndef _OMXIL_COMMON_IL516C_ON
if (!pPort->IsEnabled() &&
- !pPort->IsTransitioningToDisabled() &&
- !pPort->IsTransitioningToEnabled())
- {
- return OMX_ErrorIncorrectStateOperation;
- }
+ !pPort->IsTransitioningToDisabled() &&
+ !pPort->IsTransitioningToEnabled())
+ {
+ return OMX_ErrorIncorrectStateOperation;
+ }
// Check port enabled property...
if (OMX_TRUE == aPortIsDisabled &&
- pPort->IsEnabled())
- {
- // There is an indication from the FSM that the port must be disabled,
- // otherwise, the buffer indication is not allowed in the current
- // state.
- return OMX_ErrorIncorrectStateOperation;
- }
-
-#endif
+ pPort->IsEnabled())
+ {
+ // There is an indication from the FSM that the port must be disabled,
+ // otherwise, the buffer indication is not allowed in the current
+ // state.
+ return OMX_ErrorIncorrectStateOperation;
+ }
OMX_ERRORTYPE omxRetValue = OMX_ErrorNone;
// Check whether this port is a buffer supplier...
@@ -1402,27 +1329,6 @@
return OMX_ErrorNone;
} // if ((pPort->IsTunnelledAndBufferSupplier() && pPort->IsTransitioningToDisabled())
-#ifdef _OMXIL_COMMON_IL516C_ON
- else if (pPort->IsTunnelled() && pPort->IsTransitioningToDisabled())
- {
- // We get here if the port is tunnelled, non-supplier and is currently
- // in the process of transitioning to disabled... To avoid Race
- // condition #3, we need to check that we've received the request from
- // the supplier to return its buffers... however, we don't check it for
- // now, it is just easier to return the buffer now...
- DEBUG_PRINTF3(_L8("COmxILPortManager::BufferIndication : PORT [%u] BUFFER [%X] : "
- "WARNING This port is being disabled, "
- "the buffer id being returned to the tunnelled component"),
- portIndex, apBufferHeader);
- omxRetValue =
- iCallbacks.BufferDoneNotification(apBufferHeader,
- portIndex,
- aDirection);
- // ... we are done..
- return OMX_ErrorNone;
- }
-#endif
-
// Inform the port that one of its buffers is going to be sent to the
// processing function (exception applies to OMX_PortDomainOther ports) ...
@@ -1692,19 +1598,10 @@
// This port will have to wait to get some of its buffers
// returned by the tunnelled port...
foundBufferSupplierThatNeedsToWait = ETrue;
-#ifdef _OMXIL_COMMON_IL516C_ON
- // Request buffer ejection from the tunnelled component
- iCallbacks.EjectBuffersRequest(pPort->Index());
-#endif
}
continue;
}
-#ifdef _OMXIL_COMMON_IL516C_ON
- if (!pPort->IsTunnelled())
- {
-#endif
-
if (OMX_ErrorNone !=
(omxRetValue = iProcessingFunction.BufferFlushingIndication(
pPort->Index(),
@@ -1713,10 +1610,6 @@
return omxRetValue;
}
-#ifdef _OMXIL_COMMON_IL516C_ON
- }
-#endif
-
}
}
@@ -1919,10 +1812,6 @@
pPort->SetTransitionToDisabled();
// This port will have to wait to get all its buffers
// returned by the tunnelled port...
-#ifdef _OMXIL_COMMON_IL516C_ON
- //... but request the ejection of the buffers first...
- iCallbacks.EjectBuffersRequest(pPort->Index());
-#endif
}
else
{
@@ -1963,11 +1852,6 @@
if (pPort->Count() > 0)
{
-#ifdef _OMXIL_COMMON_IL516C_ON
- if (!pPort->IsTunnelled())
- {
-#endif
-
if (OMX_ErrorNone !=
(omxRetValue =
iProcessingFunction.BufferFlushingIndication(
@@ -1977,10 +1861,6 @@
return omxRetValue;
}
-#ifdef _OMXIL_COMMON_IL516C_ON
- }
-#endif
-
// Inform the port that it is being disabled
pPort->SetTransitionToDisabled();
}
@@ -2038,34 +1918,6 @@
}
-#ifdef _OMXIL_COMMON_IL516C_ON
-OMX_ERRORTYPE
-COmxILPortManager::BufferEjectIndication(
- TUint32 aPortIndex)
- {
- DEBUG_PRINTF2(_L8("COmxILPortManager::BufferEjectIndication: PORT[%u] "), aPortIndex);
-
- // Check the index of the port..
- if (CheckPortIndex(aPortIndex) != OMX_ErrorNone)
- {
- return OMX_ErrorBadPortIndex;
- }
-
- OMX_ERRORTYPE omxRetValue = OMX_ErrorNone;
- COmxILPort* pPort = iAllPorts[aPortIndex];
-
- if (pPort->Count())
- {
- omxRetValue = iProcessingFunction.BufferFlushingIndication(
- pPort->Index(),
- pPort->Direction());
- }
-
- return omxRetValue;
-
- }
-#endif
-
OMX_ERRORTYPE
COmxILPortManager::ComponentRoleIndication(TUint aComponentRoleIndex)
{
--- a/omxil_generic/omxilcomplib/src/omxilportmanager.h Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilportmanager.h Thu Oct 14 10:21:48 2010 +0100
@@ -144,11 +144,6 @@
OMX_ERRORTYPE BufferMarkIndication(OMX_U32 aPortIndex,
OMX_PTR ipMarkData);
-#ifdef _OMXIL_COMMON_IL516C_ON
- OMX_ERRORTYPE BufferEjectIndication(
- TUint32 aPortIndex);
-#endif
-
OMX_ERRORTYPE ComponentRoleIndication(TUint aComponentRoleIndex);
OMX_ERRORTYPE PortSettingsChangeIndication(OMX_U32 aPortIndex,
--- a/omxil_generic/omxilcomplib/src/omxilprocessingfunction.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilprocessingfunction.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -65,8 +65,14 @@
return OMX_ErrorNotImplemented;
}
+#ifndef __WINSCW__
+#pragma CTC SKIP
+#endif
EXPORT_C
TInt COmxILProcessingFunction::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
{
return CBase::Extension_(aExtensionId, a0, a1);
}
+#ifndef __WINSCW__
+#pragma CTC ENDSKIP
+#endif
--- a/omxil_generic/omxilcomplib/src/omxilstate.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilstate.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -462,44 +462,6 @@
{
DEBUG_PRINTF(_L8("COmxILStateLoaded::PopulateBuffer"));
-
-#ifdef _OMXIL_COMMON_IL516C_ON
-
- if (!apBuffer)
- {
- // ... AllocateBuffer
- //
- // At this point, the command requesting the transition from Loaded to
- // Idle has not been received yet.. (see
- // COmxILStateLoadedToIdle). Therefore, this can only be successful if
- // the port is disabled
- return COmxILState::PopulateBuffer(aFsm,
- appBufferHdr,
- aPortIndex,
- apAppPrivate,
- aSizeBytes,
- apBuffer,
- portPopulationCompleted);
- }
- else
- {
- //... UseBuffer...
- OMX_ERRORTYPE omxError =
- COmxILState::PopulateBufferV2(aFsm,
- appBufferHdr,
- aPortIndex,
- apAppPrivate,
- aSizeBytes,
- apBuffer,
- portPopulationCompleted);
- if (apBuffer && OMX_ErrorNone == omxError)
- {
- DEBUG_PRINTF2(_L8("COmxILStateLoaded::PopulateBuffer : PORT [%u] : Buffer population occurring in OMX_StateLoaded"), aPortIndex);
- }
- return omxError;
- }
-#else
-
// At this point, the command requesting the transition from Loaded to Idle
// has not been received yet.. (see COmxILStateLoadedToIdle). Therefore,
// this can only be successful if the port is disabled
@@ -510,7 +472,6 @@
aSizeBytes,
apBuffer,
portPopulationCompleted);
-#endif
}
@@ -536,11 +497,6 @@
{
DEBUG_PRINTF(_L8("COmxILStateLoaded::EmptyThisBuffer"));
-#ifdef _OMXIL_COMMON_IL516C_ON
- return COmxILState::EmptyThisBufferV2(aFsm,
- apBuffer);
-#endif
-
return COmxILState::EmptyThisBuffer(aFsm,
apBuffer);
@@ -552,11 +508,6 @@
{
DEBUG_PRINTF(_L8("COmxILStateLoaded::FillThisBuffer"));
-#ifdef _OMXIL_COMMON_IL516C_ON
- return COmxILState::FillThisBufferV2(aFsm,
- apBuffer);
-#endif
-
return COmxILState::FillThisBuffer(aFsm,
apBuffer);
@@ -891,11 +842,6 @@
{
DEBUG_PRINTF(_L8("COmxILStateWaitForResources::EmptyThisBuffer"));
-#ifdef _OMXIL_COMMON_IL516C_ON
- return COmxILState::EmptyThisBufferV2(aFsm,
- apBuffer);
-#endif
-
return COmxILState::EmptyThisBuffer(aFsm,
apBuffer);
@@ -909,11 +855,6 @@
{
DEBUG_PRINTF(_L8("COmxILStateWaitForResources::FillThisBuffer"));
-#ifdef _OMXIL_COMMON_IL516C_ON
- return COmxILState::FillThisBufferV2(aFsm,
- apBuffer);
-#endif
-
return COmxILState::FillThisBuffer(aFsm,
apBuffer);
--- a/omxil_generic/omxilcomplib/src/omxilvideoport.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcomplib/src/omxilvideoport.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -418,10 +418,14 @@
apBuffer);
}
-
+#ifndef __WINSCW__
+#pragma CTC SKIP
+#endif
EXPORT_C
TInt COmxILVideoPort::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1)
{
return COmxILPort::Extension_(aExtensionId, a0, a1);
}
-
+#ifndef __WINSCW__
+#pragma CTC ENDSKIP
+#endif
--- a/omxil_generic/omxilcore/src/core/omxilcore.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/omxil_generic/omxilcore/src/core/omxilcore.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -205,30 +205,26 @@
Ost_OMXIL_Performance::EMeasurementStart, MAKESTRING(E_GetHandle));
#endif
-
- if(error == OMX_ErrorNone)
+ if(!aHandle || !aComponentName)
{
- if(!aHandle || !aComponentName)
+ error = OMX_ErrorBadParameter;
+ }
+ else
+ {
+ if( !VerifyComponentName(aComponentName))
{
- error = OMX_ErrorBadParameter;
+ error = OMX_ErrorInvalidComponentName;
}
else
{
- if( !VerifyComponentName(aComponentName))
- {
- error = OMX_ErrorInvalidComponentName;
- }
- else
+#ifdef ENABLE_OMXIL_TRACING
+ TRAPD(Err, OMXILAPITraceWrapper::PrepareTraceStructuresL(hClientHandle, pLocCallBacks, pCompRefToClient, pCompRefToTrace) );
+ if(Err != KErrNone)
{
-#ifdef ENABLE_OMXIL_TRACING
- TRAPD(Err, OMXILAPITraceWrapper::PrepareTraceStructuresL(hClientHandle, pLocCallBacks, pCompRefToClient, pCompRefToTrace) );
- if(Err != KErrNone)
- {
- IsPrepareTraceStructuresLFailure = ETrue;
- error = OMX_ErrorInsufficientResources;
- }
+ IsPrepareTraceStructuresLFailure = ETrue;
+ error = OMX_ErrorInsufficientResources;
+ }
#endif
- }
}
}
--- a/tsrc/xmltestharness/group/bld.inf Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/group/bld.inf Thu Oct 14 10:21:48 2010 +0100
@@ -1,20 +1,20 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "../tools/t_videoframesupplier/group/bld.inf"
-#include "../xmlclient/group/bld.inf"
-#include "../te_xmlomxclient/group/bld.inf"
-
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "../tools/t_videoframesupplier/group/bld.inf"
+#include "../xmlclient/group/bld.inf"
+#include "../te_xmlomxclient/group/bld.inf"
+
--- a/tsrc/xmltestharness/te_xmlomxclient/group/component_test.pkg Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/te_xmlomxclient/group/component_test.pkg Thu Oct 14 10:21:48 2010 +0100
@@ -26,6 +26,9 @@
"\epoc32\winscw\c\omxil\tef\te_omx_filesink_other.xml"-"c:\omxil\tef\te_omx_filesink_other.xml"
"\epoc32\winscw\c\omxil\tef\te_omx_filesink_video.script"-"c:\omxil\tef\te_omx_filesink_video.script"
"\epoc32\winscw\c\omxil\tef\te_omx_filesink_video.xml"-"c:\omxil\tef\te_omx_filesink_video.xml"
+"\epoc32\winscw\c\omxil\tef\te_omx_filesink_graphic.script"-"c:\omxil\tef\te_omx_filesink_graphic.script"
+"\epoc32\winscw\c\omxil\tef\te_omx_filesink_graphic.xml"-"c:\omxil\tef\te_omx_filesink_graphic.xml"
+
; The following is commented out because we don't have OMX.SYMBIAN.OTHER.CONTAINER_DEMUXER.3GP in Vasco
; "\epoc32\winscw\c\omxil\tef\te_omx_filesink_video_compatibility.script"-"c:\omxil\tef\te_omx_filesink_video_compatibility.script"
--- a/tsrc/xmltestharness/tools/group/bld.inf Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/tools/group/bld.inf Thu Oct 14 10:21:48 2010 +0100
@@ -1,18 +1,18 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
#include "../t_videoframesupplier/group/bld.inf"
\ No newline at end of file
--- a/tsrc/xmltestharness/tools/t_videoframesupplier/bwins/t_videoframesupplieru.def Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/tools/t_videoframesupplier/bwins/t_videoframesupplieru.def Thu Oct 14 10:21:48 2010 +0100
@@ -1,8 +1,8 @@
-EXPORTS
- ?NewL@CVideoFrameSupplier@@SAPAV1@ABVTDesC16@@W4TVideoFileType@1@@Z @ 1 NONAME ; class CVideoFrameSupplier * CVideoFrameSupplier::NewL(class TDesC16 const &, enum CVideoFrameSupplier::TVideoFileType)
- ?LargestFrameSize@CVideoFrameSupplier@@QBEHXZ @ 2 NONAME ; int CVideoFrameSupplier::LargestFrameSize(void) const
- ??1CVideoFrameSupplier@@UAE@XZ @ 3 NONAME ; CVideoFrameSupplier::~CVideoFrameSupplier(void)
- ?NextFrameData@CVideoFrameSupplier@@QAEHPAEAAH@Z @ 4 NONAME ; int CVideoFrameSupplier::NextFrameData(unsigned char *, int &)
- ?IsLastFrame@CVideoFrameSupplier@@QBEHXZ @ 5 NONAME ; int CVideoFrameSupplier::IsLastFrame(void) const
- ?CurrentFrame@CVideoFrameSupplier@@QBEHXZ @ 6 NONAME ; int CVideoFrameSupplier::CurrentFrame(void) const
-
+EXPORTS
+ ?NewL@CVideoFrameSupplier@@SAPAV1@ABVTDesC16@@W4TVideoFileType@1@@Z @ 1 NONAME ; class CVideoFrameSupplier * CVideoFrameSupplier::NewL(class TDesC16 const &, enum CVideoFrameSupplier::TVideoFileType)
+ ?LargestFrameSize@CVideoFrameSupplier@@QBEHXZ @ 2 NONAME ; int CVideoFrameSupplier::LargestFrameSize(void) const
+ ??1CVideoFrameSupplier@@UAE@XZ @ 3 NONAME ; CVideoFrameSupplier::~CVideoFrameSupplier(void)
+ ?NextFrameData@CVideoFrameSupplier@@QAEHPAEAAH@Z @ 4 NONAME ; int CVideoFrameSupplier::NextFrameData(unsigned char *, int &)
+ ?IsLastFrame@CVideoFrameSupplier@@QBEHXZ @ 5 NONAME ; int CVideoFrameSupplier::IsLastFrame(void) const
+ ?CurrentFrame@CVideoFrameSupplier@@QBEHXZ @ 6 NONAME ; int CVideoFrameSupplier::CurrentFrame(void) const
+
--- a/tsrc/xmltestharness/tools/t_videoframesupplier/eabi/t_videoframesupplieru.def Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/tools/t_videoframesupplier/eabi/t_videoframesupplieru.def Thu Oct 14 10:21:48 2010 +0100
@@ -1,12 +1,12 @@
-EXPORTS
- _ZN19CVideoFrameSupplier13NextFrameDataEPhRi @ 1 NONAME
- _ZN19CVideoFrameSupplier4NewLERK7TDesC16NS_14TVideoFileTypeE @ 2 NONAME
- _ZN19CVideoFrameSupplierD0Ev @ 3 NONAME
- _ZN19CVideoFrameSupplierD1Ev @ 4 NONAME
- _ZN19CVideoFrameSupplierD2Ev @ 5 NONAME
- _ZNK19CVideoFrameSupplier11IsLastFrameEv @ 6 NONAME
- _ZNK19CVideoFrameSupplier12CurrentFrameEv @ 7 NONAME
- _ZNK19CVideoFrameSupplier16LargestFrameSizeEv @ 8 NONAME
- _ZTI19CVideoFrameSupplier @ 9 NONAME
- _ZTV19CVideoFrameSupplier @ 10 NONAME
-
+EXPORTS
+ _ZN19CVideoFrameSupplier13NextFrameDataEPhRi @ 1 NONAME
+ _ZN19CVideoFrameSupplier4NewLERK7TDesC16NS_14TVideoFileTypeE @ 2 NONAME
+ _ZN19CVideoFrameSupplierD0Ev @ 3 NONAME
+ _ZN19CVideoFrameSupplierD1Ev @ 4 NONAME
+ _ZN19CVideoFrameSupplierD2Ev @ 5 NONAME
+ _ZNK19CVideoFrameSupplier11IsLastFrameEv @ 6 NONAME
+ _ZNK19CVideoFrameSupplier12CurrentFrameEv @ 7 NONAME
+ _ZNK19CVideoFrameSupplier16LargestFrameSizeEv @ 8 NONAME
+ _ZTI19CVideoFrameSupplier @ 9 NONAME
+ _ZTV19CVideoFrameSupplier @ 10 NONAME
+
--- a/tsrc/xmltestharness/tools/t_videoframesupplier/group/t_videoframesupplier.iby Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/tools/t_videoframesupplier/group/t_videoframesupplier.iby Thu Oct 14 10:21:48 2010 +0100
@@ -1,23 +1,23 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __T_VIDEOFRAMESUPPLIER_IBY__
-#define __T_VIDEOFRAMESUPPLIER_IBY__
-
-file=ABI_DIR\BUILD_DIR\t_videoframesupplier.dll System\Libs\t_videoframesupplier.dll
-
-#endif
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __T_VIDEOFRAMESUPPLIER_IBY__
+#define __T_VIDEOFRAMESUPPLIER_IBY__
+
+file=ABI_DIR\BUILD_DIR\t_videoframesupplier.dll System\Libs\t_videoframesupplier.dll
+
+#endif
--- a/tsrc/xmltestharness/tools/t_videoframesupplier/inc/t_videoframesupplier.h Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/tools/t_videoframesupplier/inc/t_videoframesupplier.h Thu Oct 14 10:21:48 2010 +0100
@@ -1,83 +1,83 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __T_VIDEOFRAMESUPPLIER_H__
-#define __T_VIDEOFRAMESUPPLIER_H__
-
-
-#include <e32base.h>
-#include <e32std.h>
-#include <f32file.h>
-
-typedef struct
- {
- TInt iPosition; // From start of the file.
- TInt iLength;
- }
-TFrameData;
-
-typedef enum
- {
- ESearchForZero = 0,
- ESearchForZeroZero,
- ESearchForZeroZeroOne,
- ESearchForStartCode,
- EBeginningOfFrame
- }
-TMPEG4ParseState;
-
-//
-//
-//
-class CVideoFrameSupplier : public CBase
- {
-public:
-
- typedef enum
- {
- EVideoFileTypeMPEG4
- }
- TVideoFileType;
-
- IMPORT_C static CVideoFrameSupplier* NewL(const TDesC& aFileName, TVideoFileType aFileType);
- IMPORT_C ~CVideoFrameSupplier();
-
-public:
- IMPORT_C TInt LargestFrameSize() const;
- IMPORT_C TInt CurrentFrame() const;
- IMPORT_C TInt NextFrameData(TUint8* aPtr, TInt& aFrameLength);
- IMPORT_C TBool IsLastFrame() const;
-
-private:
- CVideoFrameSupplier();
- void ConstructL(const TDesC& aFileName, TVideoFileType aFileType);
- void ParseMPEG4FileL();
- TInt AppendFrameData(TInt aPosition, TInt aLength);
- TInt ProcessMPEG4Byte(TUint8 aByte, TInt aBytePosition);
-
-private:
- RFs iFs;
- RFile iFile;
- RArray<TFrameData> iFrames;
- TInt iLargestFrameSize;
- TInt iCurrentFrame;
- TMPEG4ParseState iState;
- TInt iFrameStartPosition;
- };
-
-#endif // __T_VIDEOFRAMESUPPLIER_H__
-
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __T_VIDEOFRAMESUPPLIER_H__
+#define __T_VIDEOFRAMESUPPLIER_H__
+
+
+#include <e32base.h>
+#include <e32std.h>
+#include <f32file.h>
+
+typedef struct
+ {
+ TInt iPosition; // From start of the file.
+ TInt iLength;
+ }
+TFrameData;
+
+typedef enum
+ {
+ ESearchForZero = 0,
+ ESearchForZeroZero,
+ ESearchForZeroZeroOne,
+ ESearchForStartCode,
+ EBeginningOfFrame
+ }
+TMPEG4ParseState;
+
+//
+//
+//
+class CVideoFrameSupplier : public CBase
+ {
+public:
+
+ typedef enum
+ {
+ EVideoFileTypeMPEG4
+ }
+ TVideoFileType;
+
+ IMPORT_C static CVideoFrameSupplier* NewL(const TDesC& aFileName, TVideoFileType aFileType);
+ IMPORT_C ~CVideoFrameSupplier();
+
+public:
+ IMPORT_C TInt LargestFrameSize() const;
+ IMPORT_C TInt CurrentFrame() const;
+ IMPORT_C TInt NextFrameData(TUint8* aPtr, TInt& aFrameLength);
+ IMPORT_C TBool IsLastFrame() const;
+
+private:
+ CVideoFrameSupplier();
+ void ConstructL(const TDesC& aFileName, TVideoFileType aFileType);
+ void ParseMPEG4FileL();
+ TInt AppendFrameData(TInt aPosition, TInt aLength);
+ TInt ProcessMPEG4Byte(TUint8 aByte, TInt aBytePosition);
+
+private:
+ RFs iFs;
+ RFile iFile;
+ RArray<TFrameData> iFrames;
+ TInt iLargestFrameSize;
+ TInt iCurrentFrame;
+ TMPEG4ParseState iState;
+ TInt iFrameStartPosition;
+ };
+
+#endif // __T_VIDEOFRAMESUPPLIER_H__
+
--- a/tsrc/xmltestharness/tools/t_videoframesupplier/src/t_videoframesupplier.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/tools/t_videoframesupplier/src/t_videoframesupplier.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -1,260 +1,260 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "t_videoframesupplier.h"
-
-
-//
-//
-//
-CVideoFrameSupplier::CVideoFrameSupplier()
- : iLargestFrameSize(KErrNotFound)
- {
- }
-
-//
-//
-//
-EXPORT_C CVideoFrameSupplier::~CVideoFrameSupplier()
- {
- iFrames.Close();
- iFile.Close();
- iFs.Close();
- }
-
-
-//
-//
-//
-EXPORT_C CVideoFrameSupplier* CVideoFrameSupplier::NewL(const TDesC& aFileName, TVideoFileType aFileType)
- {
- CVideoFrameSupplier* self = new(ELeave) CVideoFrameSupplier();
- CleanupStack::PushL(self);
- self->ConstructL(aFileName, aFileType);
- CleanupStack::Pop(self);
- return self;
- }
-
-
-//
-//
-//
-void CVideoFrameSupplier::ConstructL(const TDesC& aFileName, TVideoFileType aFileType)
- {
- User::LeaveIfError(iFs.Connect());
- TInt err = iFile.Open(iFs, aFileName, EFileRead);
- if (err != KErrNone)
- {
- RDebug::Print(_L("*** CVideoFrameSupplier: Error %d opening file %S"), err, &aFileName);
- User::Leave(err);
- }
-
- switch (aFileType)
- {
- case EVideoFileTypeMPEG4:
- ParseMPEG4FileL();
- break;
-
- default:
- User::Leave(KErrNotSupported);
- }
- }
-
-
-//
-//
-//
-EXPORT_C TInt CVideoFrameSupplier::LargestFrameSize() const
- {
- return iLargestFrameSize;
- }
-
-
-//
-//
-//
-EXPORT_C TInt CVideoFrameSupplier::CurrentFrame() const
- {
- return iCurrentFrame;
- }
-
-
-//
-//
-//
-EXPORT_C TBool CVideoFrameSupplier::IsLastFrame() const
- {
- return iCurrentFrame >= (iFrames.Count() - 1);
- }
-
-
-//
-//
-//
-EXPORT_C TInt CVideoFrameSupplier::NextFrameData(TUint8* aPtr, TInt& aFrameLength)
- {
- aFrameLength = KErrNotFound;
-
- if (!aPtr)
- {
- return KErrArgument;
- }
-
- if (iCurrentFrame >= iFrames.Count())
- {
- return KErrEof;
- }
-
- TFrameData data = iFrames[iCurrentFrame++];
- TInt pos = data.iPosition;
- TInt err = iFile.Seek(ESeekStart, pos);
- if (err == KErrNone)
- {
- TPtr8 des(aPtr, data.iLength);
- err = iFile.Read(des);
- if (err == KErrNone)
- {
- aFrameLength = data.iLength;
- }
- }
-
- return err;
- }
-
-
-//
-//
-//
-TInt CVideoFrameSupplier::AppendFrameData(TInt aPosition, TInt aLength)
- {
- ASSERT(aPosition >= 0);
- ASSERT(aLength > 0);
-
- TFrameData data;
- data.iPosition = aPosition;
- data.iLength = aLength;
-
- if (aLength > iLargestFrameSize)
- {
- iLargestFrameSize = aLength;
- }
-
- return iFrames.Append(data);
- }
-
-
-//
-//
-//
-void CVideoFrameSupplier::ParseMPEG4FileL()
- {
- iFrames.Reset();
-
- const TInt KBufferSize = 1024;
-
- iState = ESearchForZero;
- iLargestFrameSize = KErrNotFound;
- iFrameStartPosition = KErrNotFound;
-
- TBuf8<KBufferSize> data;
- TInt filePosition = 0;
- TBool lastBuffer = EFalse;
- TInt err = KErrNone;
-
- do
- {
- data.Zero();
- err = iFile.Read(data);
- lastBuffer = (data.Length() != KBufferSize);
-
- if (err == KErrNone)
- {
- for (TInt i = 0; i < data.Length(); i++)
- {
- err = ProcessMPEG4Byte(data[i], filePosition + i);
- }
-
- filePosition += KBufferSize;
- }
- }
- while (!lastBuffer);
- }
-
-
-//
-//
-//
-TInt CVideoFrameSupplier::ProcessMPEG4Byte(TUint8 aByte, TInt aBytePosition)
- {
- ASSERT(aBytePosition >= 0);
-
- TInt err = KErrNone;
-
- switch (iState)
- {
- case ESearchForZero:
- iState = (aByte == 0x00 ? ESearchForZeroZero : iState);
- break;
-
- case ESearchForZeroZero:
- iState = (aByte == 0x00 ? ESearchForZeroZeroOne : ESearchForZero);
- break;
-
- case ESearchForZeroZeroOne:
- if (aByte == 0x00)
- {
- // Do nothing. It is allowed to have more than two leading zero bytes.
- break;
- }
-
- iState = (aByte == 0x01 ? ESearchForStartCode : ESearchForZero);
- break;
-
- case ESearchForStartCode:
- if (iFrameStartPosition != KErrNotFound)
- {
- // If we are currently in a frame then it ends at this start code.
- TInt length = (aBytePosition - 3) - iFrameStartPosition;
- err = AppendFrameData(iFrameStartPosition, length);
- iFrameStartPosition = KErrNotFound;
- }
-
- iState = (aByte == 0xB6 ? EBeginningOfFrame : ESearchForZero);
- break;
-
- case EBeginningOfFrame:
- iFrameStartPosition = aBytePosition - 4; // The 0x000001B6 bytes count too.
- if (iFrames.Count() == 0)
- {
- if (iFrameStartPosition != 0)
- {
- // There was a header before the frame. The ST-E decoder
- // requires that this data is prepended to the frame data (first frame only).
- // We assume that all bytes before this frame are valid header bytes!
- iFrameStartPosition = 0;
- }
- }
-
- iState = ESearchForZero;
- break;
-
- default:
- ASSERT(EFalse);
- }
-
- return err;
- }
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "t_videoframesupplier.h"
+
+
+//
+//
+//
+CVideoFrameSupplier::CVideoFrameSupplier()
+ : iLargestFrameSize(KErrNotFound)
+ {
+ }
+
+//
+//
+//
+EXPORT_C CVideoFrameSupplier::~CVideoFrameSupplier()
+ {
+ iFrames.Close();
+ iFile.Close();
+ iFs.Close();
+ }
+
+
+//
+//
+//
+EXPORT_C CVideoFrameSupplier* CVideoFrameSupplier::NewL(const TDesC& aFileName, TVideoFileType aFileType)
+ {
+ CVideoFrameSupplier* self = new(ELeave) CVideoFrameSupplier();
+ CleanupStack::PushL(self);
+ self->ConstructL(aFileName, aFileType);
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+
+//
+//
+//
+void CVideoFrameSupplier::ConstructL(const TDesC& aFileName, TVideoFileType aFileType)
+ {
+ User::LeaveIfError(iFs.Connect());
+ TInt err = iFile.Open(iFs, aFileName, EFileRead);
+ if (err != KErrNone)
+ {
+ RDebug::Print(_L("*** CVideoFrameSupplier: Error %d opening file %S"), err, &aFileName);
+ User::Leave(err);
+ }
+
+ switch (aFileType)
+ {
+ case EVideoFileTypeMPEG4:
+ ParseMPEG4FileL();
+ break;
+
+ default:
+ User::Leave(KErrNotSupported);
+ }
+ }
+
+
+//
+//
+//
+EXPORT_C TInt CVideoFrameSupplier::LargestFrameSize() const
+ {
+ return iLargestFrameSize;
+ }
+
+
+//
+//
+//
+EXPORT_C TInt CVideoFrameSupplier::CurrentFrame() const
+ {
+ return iCurrentFrame;
+ }
+
+
+//
+//
+//
+EXPORT_C TBool CVideoFrameSupplier::IsLastFrame() const
+ {
+ return iCurrentFrame >= (iFrames.Count() - 1);
+ }
+
+
+//
+//
+//
+EXPORT_C TInt CVideoFrameSupplier::NextFrameData(TUint8* aPtr, TInt& aFrameLength)
+ {
+ aFrameLength = KErrNotFound;
+
+ if (!aPtr)
+ {
+ return KErrArgument;
+ }
+
+ if (iCurrentFrame >= iFrames.Count())
+ {
+ return KErrEof;
+ }
+
+ TFrameData data = iFrames[iCurrentFrame++];
+ TInt pos = data.iPosition;
+ TInt err = iFile.Seek(ESeekStart, pos);
+ if (err == KErrNone)
+ {
+ TPtr8 des(aPtr, data.iLength);
+ err = iFile.Read(des);
+ if (err == KErrNone)
+ {
+ aFrameLength = data.iLength;
+ }
+ }
+
+ return err;
+ }
+
+
+//
+//
+//
+TInt CVideoFrameSupplier::AppendFrameData(TInt aPosition, TInt aLength)
+ {
+ ASSERT(aPosition >= 0);
+ ASSERT(aLength > 0);
+
+ TFrameData data;
+ data.iPosition = aPosition;
+ data.iLength = aLength;
+
+ if (aLength > iLargestFrameSize)
+ {
+ iLargestFrameSize = aLength;
+ }
+
+ return iFrames.Append(data);
+ }
+
+
+//
+//
+//
+void CVideoFrameSupplier::ParseMPEG4FileL()
+ {
+ iFrames.Reset();
+
+ const TInt KBufferSize = 1024;
+
+ iState = ESearchForZero;
+ iLargestFrameSize = KErrNotFound;
+ iFrameStartPosition = KErrNotFound;
+
+ TBuf8<KBufferSize> data;
+ TInt filePosition = 0;
+ TBool lastBuffer = EFalse;
+ TInt err = KErrNone;
+
+ do
+ {
+ data.Zero();
+ err = iFile.Read(data);
+ lastBuffer = (data.Length() != KBufferSize);
+
+ if (err == KErrNone)
+ {
+ for (TInt i = 0; i < data.Length(); i++)
+ {
+ err = ProcessMPEG4Byte(data[i], filePosition + i);
+ }
+
+ filePosition += KBufferSize;
+ }
+ }
+ while (!lastBuffer);
+ }
+
+
+//
+//
+//
+TInt CVideoFrameSupplier::ProcessMPEG4Byte(TUint8 aByte, TInt aBytePosition)
+ {
+ ASSERT(aBytePosition >= 0);
+
+ TInt err = KErrNone;
+
+ switch (iState)
+ {
+ case ESearchForZero:
+ iState = (aByte == 0x00 ? ESearchForZeroZero : iState);
+ break;
+
+ case ESearchForZeroZero:
+ iState = (aByte == 0x00 ? ESearchForZeroZeroOne : ESearchForZero);
+ break;
+
+ case ESearchForZeroZeroOne:
+ if (aByte == 0x00)
+ {
+ // Do nothing. It is allowed to have more than two leading zero bytes.
+ break;
+ }
+
+ iState = (aByte == 0x01 ? ESearchForStartCode : ESearchForZero);
+ break;
+
+ case ESearchForStartCode:
+ if (iFrameStartPosition != KErrNotFound)
+ {
+ // If we are currently in a frame then it ends at this start code.
+ TInt length = (aBytePosition - 3) - iFrameStartPosition;
+ err = AppendFrameData(iFrameStartPosition, length);
+ iFrameStartPosition = KErrNotFound;
+ }
+
+ iState = (aByte == 0xB6 ? EBeginningOfFrame : ESearchForZero);
+ break;
+
+ case EBeginningOfFrame:
+ iFrameStartPosition = aBytePosition - 4; // The 0x000001B6 bytes count too.
+ if (iFrames.Count() == 0)
+ {
+ if (iFrameStartPosition != 0)
+ {
+ // There was a header before the frame. The ST-E decoder
+ // requires that this data is prepended to the frame data (first frame only).
+ // We assume that all bytes before this frame are valid header bytes!
+ iFrameStartPosition = 0;
+ }
+ }
+
+ iState = ESearchForZero;
+ break;
+
+ default:
+ ASSERT(EFalse);
+ }
+
+ return err;
+ }
--- a/tsrc/xmltestharness/tools/t_videoframesupplier/src/t_videoframesupplierDllMain.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/tools/t_videoframesupplier/src/t_videoframesupplierDllMain.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -1,29 +1,29 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <e32std.h>
-
-
-#ifndef EKA2 // for EKA1 only
-EXPORT_C TInt E32Dll(TDllReason /*aReason*/)
-// Called when the DLL is loaded and unloaded. Note: have to define
-// epoccalldllentrypoints in MMP file to get this called in THUMB.
- {
- return KErrNone;
- }
-#endif
-
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <e32std.h>
+
+
+#ifndef EKA2 // for EKA1 only
+EXPORT_C TInt E32Dll(TDllReason /*aReason*/)
+// Called when the DLL is loaded and unloaded. Note: have to define
+// epoccalldllentrypoints in MMP file to get this called in THUMB.
+ {
+ return KErrNone;
+ }
+#endif
+
--- a/tsrc/xmltestharness/xmlclient/src/omxscriptparser.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/xmlclient/src/omxscriptparser.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -530,14 +530,12 @@
OMX_ERRORTYPE expectedErrorInt = OMX_ErrorNone;
CheckForAbortL(iCallback.MosSetCameraCaptureL(comp, portIndex, isCapturing, expectedErrorInt));
}
- else if(elemName == _L8("SetVideoPortDef"))
+ else if(elemName == _L8("SetVideoPortDef") || elemName == _L8("SetVideoPortFormat"))
{
const TDesC8& compPort = FindAttributeL(aAttributes, _L8("port"));
TPtrC8 comp;
TInt port;
ParseCompPortL(compPort, comp, port);
- TInt width = ParseOptionalIntL(aAttributes, _L8("width"), -1);
- TInt height = ParseOptionalIntL(aAttributes, _L8("height"), -1);
OMX_COLOR_FORMATTYPE colorFormat = OMX_COLOR_FormatMax;
OMX_COLOR_FORMATTYPE* colorFormatPtr = NULL;
const TDesC8* colorFormatDes = FindAttribute(aAttributes, _L8("colorFormat"));
@@ -554,14 +552,25 @@
codingType = ParseOmxVideoCodingL(*codingDes);
codingTypePtr = &codingType;
}
+ const TDesC8* expectedError = FindAttribute(aAttributes, _L8("expectedomxerr"));
+ OMX_ERRORTYPE expectedErrorInt = OMX_ErrorNone;
+ if (expectedError)
+ {
+ expectedErrorInt = ParseOmxErrorCode(*expectedError);
+ }
+
+ if (elemName == _L8("SetVideoPortFormat"))
+ {
+ TInt rate = ParseOptionalIntL(aAttributes, _L8("framerate"), -1);
+ CheckForAbortL(iCallback.MosSetVideoPortFormatsL(comp, port, colorFormatPtr, codingTypePtr, rate, expectedErrorInt));
+ return;
+ }
+
+ // The rest apply to SetVideoPortDef only
+ TInt width = ParseOptionalIntL(aAttributes, _L8("width"), -1);
+ TInt height = ParseOptionalIntL(aAttributes, _L8("height"), -1);
TInt stride = ParseOptionalIntL(aAttributes, _L8("stride"), -1);
- const TDesC8* expectedError = FindAttribute(aAttributes, _L8("expectedomxerr"));
- OMX_ERRORTYPE expectedErrorInt = OMX_ErrorNone;
- if (expectedError)
- {
- expectedErrorInt = ParseOmxErrorCode(*expectedError);
- }
#ifdef HREF_ED_WITHOUT_FLOATING_POINT
CheckForAbortL(iCallback.MosSetVideoPortDefL(comp, port, width, height, colorFormatPtr, codingTypePtr, stride, 0, expectedErrorInt));
@@ -667,21 +676,28 @@
const TDesC8& data = FindAttributeL(aAttributes, _L8("data"));
CheckForAbortL(iCallback.MosSetParameterUnknownIndexTypeL(comp, port, scope, atomType, atomIndex, data));
}
- else if(elemName == _L8("DisablePort"))
+ else if(elemName == _L8("DisablePort") || elemName == _L8("EnablePort"))
{
const TDesC8& port = FindAttributeL(aAttributes, _L8("port"));
TPtrC8 comp;
TInt portIndex;
ParseCompPortL(port, comp, portIndex);
- CheckForAbortL(iCallback.MosDisablePort(comp, portIndex));
- }
- else if(elemName == _L8("EnablePort"))
- {
- const TDesC8& port = FindAttributeL(aAttributes, _L8("port"));
- TPtrC8 comp;
- TInt portIndex;
- ParseCompPortL(port, comp, portIndex);
- CheckForAbortL(iCallback.MosEnablePort(comp, portIndex));
+
+ const TDesC8* expectedError = FindAttribute(aAttributes, _L8("expectedomxerr"));
+ OMX_ERRORTYPE expectedErrorInt = OMX_ErrorNone;
+ if (expectedError)
+ {
+ expectedErrorInt = ParseOmxErrorCode(*expectedError);
+ }
+
+ if (elemName == _L8("EnablePort"))
+ {
+ CheckForAbortL(iCallback.MosEnablePort(comp, portIndex, expectedErrorInt));
+ }
+ else
+ {
+ CheckForAbortL(iCallback.MosDisablePort(comp, portIndex, expectedErrorInt));
+ }
}
else if(elemName == _L8("IgnoreEvent"))
{
@@ -829,6 +845,31 @@
}
CheckForAbortL(iCallback.MosCheckConfigAudioMuteL(comp, port, mute));
}
+ else if(elemName == _L8("CheckCommonScale") || elemName == _L8("SetCommonScale"))
+ {
+ const TDesC8& compPort = FindAttributeL(aAttributes, _L8("port"));
+ TPtrC8 comp;
+ TInt port;
+ ParseCompPortL(compPort, comp, port);
+ TInt width = ParseOptionalIntL(aAttributes, _L8("width"), -1);
+ TInt height = ParseOptionalIntL(aAttributes, _L8("height"), -1);
+
+ const TDesC8* expectedError = FindAttribute(aAttributes, _L8("expectedomxerr"));
+ OMX_ERRORTYPE expectedErrorInt = OMX_ErrorNone;
+ if (expectedError)
+ {
+ expectedErrorInt = ParseOmxErrorCode(*expectedError);
+ }
+
+ if (elemName == _L8("CheckCommonScale"))
+ {
+ CheckForAbortL(iCallback.MosCheckConfigCommonScaleL(comp, port, width, height, expectedErrorInt));
+ }
+ else
+ {
+ CheckForAbortL(iCallback.MosSetConfigCommonScaleL(comp, port, width, height, expectedErrorInt));
+ }
+ }
else if(elemName == _L8("SetAudioVolume"))
{
const TDesC8& compPort = FindAttributeL(aAttributes, _L8("port"));
--- a/tsrc/xmltestharness/xmlclient/src/omxscriptparser.h Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/xmlclient/src/omxscriptparser.h Thu Oct 14 10:21:48 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -74,6 +74,7 @@
const TDesC8& aSinkComp, TInt aSinkPort,
OMX_BUFFERSUPPLIERTYPE aSupplier,
OMX_ERRORTYPE aExpectedSourceError, OMX_ERRORTYPE aExpectedSinkError) = 0;
+ virtual TBool MosSetVideoPortFormatsL(const TDesC8& aComp, TInt aPortIndex, OMX_COLOR_FORMATTYPE* aColorFormat, OMX_VIDEO_CODINGTYPE* aCodingType, TInt aFramerate, OMX_ERRORTYPE aExpectedError) = 0;
virtual TBool MosSetVideoPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_COLOR_FORMATTYPE* aColorFormat, OMX_VIDEO_CODINGTYPE* aCodingType, TInt aStride, TReal aFps, OMX_ERRORTYPE aExpectedError) = 0;
virtual TBool MosSetCameraOneShotL(const TDesC8& aComp, TInt aIsOneShot, OMX_ERRORTYPE aExpectedError) = 0;
virtual TBool MosSetCameraCaptureL(const TDesC8& aComp, TInt aPortIndex, TInt aIsCapturing, OMX_ERRORTYPE aExpectedError) = 0;
@@ -87,13 +88,15 @@
virtual TBool MosGetParameterUnknownIndexTypeL(const TDesC8& aComp, TInt aPortIndex, OMX_METADATASCOPETYPE aScope, const TDesC8& aAtomType, TUint32 aAtomIndex, const TDesC8& aData) = 0;
virtual TBool MosSetParameterUnknownIndexTypeL(const TDesC8& aComp, TInt aPortIndex, OMX_METADATASCOPETYPE aScope, const TDesC8& aAtomType, TUint32 aAtomIndex, const TDesC8& aData) = 0;
- virtual TBool MosDisablePort(const TDesC8& aComp, TInt aPortIndex) = 0;
- virtual TBool MosEnablePort(const TDesC8& aComp, TInt aPortIndex) = 0;
+ virtual TBool MosDisablePort(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError) = 0;
+ virtual TBool MosEnablePort(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError) = 0;
virtual TBool MosIgnoreEventL(const TDesC8& aComp, OMX_EVENTTYPE aEvent, TUint32 nData1, TUint32 nData2) = 0;
virtual TBool MosSetPcmAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aNumChannels, TInt aSamplingRate, TInt aBitsperSample, OMX_NUMERICALDATATYPE aNumData, OMX_ENDIANTYPE aEndian, OMX_BOOL* aInterleaved, const TDesC8* aEncoding) = 0;
virtual TBool MosSetConfigAudioVolumeL(const TDesC8& aComp, TInt aPortIndex, TBool aLinear, TInt aMinVolume, TInt aMaxVolume, TInt aVolume, OMX_ERRORTYPE aExpectedError) = 0;
virtual TBool MosCheckConfigAudioVolumeL(const TDesC8& aComp, TInt aPortIndex, TBool aLinear, TInt aMinVolume, TInt aMaxVolume, TInt aVolume) = 0;
virtual TBool MosCheckConfigAudioMuteL(const TDesC8& aComp, TInt aPortIndex, TBool aMute) = 0;
+ virtual TBool MosCheckConfigCommonScaleL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_ERRORTYPE aExpectedError) = 0;
+ virtual TBool MosSetConfigCommonScaleL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_ERRORTYPE aExpectedError) = 0;
virtual TBool MosSetConfigAudioMuteL(const TDesC8& aComp, TInt aPortIndex, TBool aMute) = 0;
virtual TBool MosSetAacAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aNumChannels, TInt aSamplingRate, TInt aBitRate, TInt aAudioBandwidth, TInt aFrameLength, TInt aAacTools, TInt aAacErTools, TInt aProfile, TInt aStreamFormat, TInt aChannelMode) = 0;
virtual TBool MosSetAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, OMX_AUDIO_CODINGTYPE* aCodingType, OMX_ERRORTYPE aExpectedError) = 0;
--- a/tsrc/xmltestharness/xmlclient/src/omxscripttest.cpp Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/xmlclient/src/omxscripttest.cpp Thu Oct 14 10:21:48 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -1143,6 +1143,34 @@
return ETrue;
}
+TBool ROmxScriptTest::MosSetVideoPortFormatsL(const TDesC8& aComp, TInt aPortIndex, OMX_COLOR_FORMATTYPE* aColorFormat, OMX_VIDEO_CODINGTYPE* aCodingType, TInt aFramerate, OMX_ERRORTYPE aExpectedError)
+ {
+ OMX_COMPONENTTYPE* component = ComponentByName(aComp);
+ if(!component)
+ {
+ return EFalse;
+ }
+
+ INFO_PRINTF1(_L("MosSetVideoPortFormatsL"));
+
+ OMX_VIDEO_PARAM_PORTFORMATTYPE format;
+
+ format.nSize = sizeof(format);
+ format.nVersion = KOmxVersion;
+ format.nPortIndex = aPortIndex;
+ format.xFramerate = aFramerate;
+ format.eColorFormat = *aColorFormat;
+ format.eCompressionFormat = *aCodingType;
+
+ OMX_ERRORTYPE error = component->SetParameter(component, OMX_IndexParamVideoPortFormat, &format);
+ if(error != aExpectedError)
+ {
+ ERR_PRINTF3(_L("MosSetVideoPortFormatsL SetParameter() error 0x%X, expected 0x%X"), error, aExpectedError);
+ return EFalse;
+ }
+ return ETrue;
+ }
+
TBool ROmxScriptTest::MosSetVideoPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_COLOR_FORMATTYPE* aColorFormat, OMX_VIDEO_CODINGTYPE* aCodingType, TInt aStride, TReal aFps, OMX_ERRORTYPE aExpectedError)
{
OMX_COMPONENTTYPE* component = ComponentByName(aComp);
@@ -1156,6 +1184,7 @@
portDef.nVersion = KOmxVersion;
portDef.nPortIndex = aPortIndex;
OMX_ERRORTYPE error = component->GetParameter(component, OMX_IndexParamPortDefinition, &portDef);
+
if(error)
{
FailWithOmxError(_L("GetParameter()"), error);
@@ -1409,7 +1438,7 @@
StopTest(EFail);
return EFalse;
}
-TBool ROmxScriptTest::MosDisablePort(const TDesC8& aComp, TInt aPortIndex)
+TBool ROmxScriptTest::MosDisablePort(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError)
{
OMX_COMPONENTTYPE* component = ComponentByName(aComp);
if(!component)
@@ -1418,7 +1447,7 @@
}
OMX_ERRORTYPE error = component->SendCommand(component, OMX_CommandPortDisable, aPortIndex, NULL);
- if(error)
+ if(error != aExpectedError)
{
FailWithOmxError(aComp, _L("OMX_SendCommand(OMX_CommandPortDisable)"), error);
return EFalse;
@@ -1427,7 +1456,7 @@
return ETrue;
}
-TBool ROmxScriptTest::MosEnablePort(const TDesC8& aComp, TInt aPortIndex)
+TBool ROmxScriptTest::MosEnablePort(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError)
{
OMX_COMPONENTTYPE* component = ComponentByName(aComp);
if(!component)
@@ -1436,7 +1465,7 @@
}
OMX_ERRORTYPE error = component->SendCommand(component, OMX_CommandPortEnable, aPortIndex, NULL);
- if(error)
+ if(error != aExpectedError)
{
FailWithOmxError(aComp, _L("OMX_SendCommand(OMX_CommandPortEnable)"), error);
return EFalse;
@@ -1592,6 +1621,68 @@
}
+TBool ROmxScriptTest::MosCheckConfigCommonScaleL(const TDesC8& aComp,
+ TInt aPortIndex,
+ TInt aWidth, TInt aHeight, OMX_ERRORTYPE aExpectedError)
+ {
+ OMX_COMPONENTTYPE* component = ComponentByName(aComp);
+ if(!component)
+ {
+ User::Leave(KErrGeneral);
+ }
+
+ OMX_CONFIG_SCALEFACTORTYPE commonScale;
+ commonScale.nSize = sizeof(commonScale);
+ commonScale.nVersion = KOmxVersion;
+ commonScale.nPortIndex = aPortIndex;
+
+ OMX_ERRORTYPE error = component->GetConfig(component, OMX_IndexConfigCommonScale, &commonScale);
+ if(error != aExpectedError)
+ {
+ FailWithOmxError(_L("GetConfig() with unexpected error "), error);
+ return EFalse;
+ }
+
+ if (error)
+ {
+ return ETrue;
+ }
+
+ if(commonScale.xWidth != aWidth || commonScale.xHeight != aHeight)
+ {
+ ERR_PRINTF1(_L("CommonScale not what expected."));
+ StopTest(KErrGeneral, EFail);
+ return EFalse;
+ }
+ return ETrue;
+ }
+
+TBool ROmxScriptTest::MosSetConfigCommonScaleL(const TDesC8& aComp,
+ TInt aPortIndex,
+ TInt aWidth, TInt aHeight, OMX_ERRORTYPE aExpectedError)
+ {
+ OMX_COMPONENTTYPE* component = ComponentByName(aComp);
+ if(!component)
+ {
+ User::Leave(KErrGeneral);
+ }
+
+ OMX_CONFIG_SCALEFACTORTYPE commonScale;
+ commonScale.nSize = sizeof(commonScale);
+ commonScale.nVersion = KOmxVersion;
+ commonScale.nPortIndex = aPortIndex;
+ commonScale.xWidth = aWidth;
+ commonScale.xHeight = aHeight;
+
+ OMX_ERRORTYPE error = component->SetConfig(component, OMX_IndexConfigCommonScale, &commonScale);
+ if(error != aExpectedError)
+ {
+ FailWithOmxError(_L("SetConfig() with unexpected error"), error);
+ return EFalse;
+ }
+
+ return ETrue;
+ }
TBool ROmxScriptTest::MosSetConfigAudioVolumeL(const TDesC8& aComp,
--- a/tsrc/xmltestharness/xmlclient/src/omxscripttest.h Fri Sep 17 08:38:32 2010 +0300
+++ b/tsrc/xmltestharness/xmlclient/src/omxscripttest.h Thu Oct 14 10:21:48 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -112,6 +112,7 @@
const TDesC8& aSinkComp, TInt aSinkPort,
OMX_BUFFERSUPPLIERTYPE aSupplier,
OMX_ERRORTYPE aExpectedSourceError, OMX_ERRORTYPE aExpectedSinkError);
+ TBool MosSetVideoPortFormatsL(const TDesC8& aComp, TInt aPortIndex, OMX_COLOR_FORMATTYPE* aColorFormat, OMX_VIDEO_CODINGTYPE* aCodingType, TInt aFramerate, OMX_ERRORTYPE aExpectedError);
TBool MosSetVideoPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_COLOR_FORMATTYPE* aColorFormat, OMX_VIDEO_CODINGTYPE* aCodingType, TInt aStride, TReal aFps, OMX_ERRORTYPE aExpectedError);
TBool MosSetCameraOneShotL(const TDesC8& aComp, TInt aIsOneShot, OMX_ERRORTYPE aExpectedError);
TBool MosSetCameraCaptureL(const TDesC8& aComp, TInt aPortIndex, TInt aIsCapturing, OMX_ERRORTYPE aExpectedError);
@@ -127,13 +128,15 @@
TBool MosGetParameterUnknownIndexTypeL(const TDesC8& aComp, TInt aPortIndex, OMX_METADATASCOPETYPE aScope, const TDesC8& aAtomType, TUint32 aAtomIndex, const TDesC8& aData);
TBool MosSetParameterUnknownIndexTypeL(const TDesC8& aComp, TInt aPortIndex, OMX_METADATASCOPETYPE aScope, const TDesC8& aAtomType, TUint32 aAtomIndex, const TDesC8& aData);
- TBool MosDisablePort(const TDesC8& aComp, TInt aPortIndex);
- TBool MosEnablePort(const TDesC8& aComp, TInt aPortIndex);
+ TBool MosDisablePort(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError);
+ TBool MosEnablePort(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError);
TBool MosIgnoreEventL(const TDesC8& aComp, OMX_EVENTTYPE aEvent, TUint32 nData1, TUint32 nData2);
TBool MosSetPcmAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aNumChannels, TInt aSamplingRate, TInt aBitsperSample, OMX_NUMERICALDATATYPE aNumData, OMX_ENDIANTYPE aEndian, OMX_BOOL* aInterleaved, const TDesC8* aEncoding);
TBool MosSetConfigAudioVolumeL(const TDesC8& aComp, TInt aPortIndex, TBool aLinear, TInt aMinVolume, TInt aMaxVolume, TInt aVolume, OMX_ERRORTYPE aExpectedError);
TBool MosCheckConfigAudioVolumeL(const TDesC8& aComp, TInt aPortIndex, TBool aLinear, TInt aMinVolume, TInt aMaxVolume, TInt aVolume);
TBool MosCheckConfigAudioMuteL(const TDesC8& aComp, TInt aPortIndex, TBool aMute);
+ TBool MosCheckConfigCommonScaleL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_ERRORTYPE aExpectedError);
+ TBool MosSetConfigCommonScaleL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_ERRORTYPE aExpectedError);
TBool MosSetConfigAudioMuteL(const TDesC8& aComp, TInt aPortIndex, TBool aMute);
TBool MosSetAacAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aNumChannels, TInt aSamplingRate, TInt aBitRate, TInt aAudioBandwidth, TInt aFrameLength, TInt aAacTools, TInt aAacErTools, TInt aProfile, TInt aStreamFormat, TInt aChannelMode);
TBool MosSetAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, OMX_AUDIO_CODINGTYPE* aCodingType, OMX_ERRORTYPE aExpectedError);