/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Oscl_Vector<FormatCapabilityInfo, OsclMemAllocator>& iInVidFormatCapability,
Oscl_Vector<FormatCapabilityInfo, OsclMemAllocator>& iOutVidFormatCapability) = 0;
+ virtual bool UsingExternalVideoDecBuffers() = 0;
+ virtual bool UsingExternalAudioDecBuffers() = 0;
+
};
#endif
}
PVRefFileOutput* apRefFileOutput = OSCL_NEW(PVRefFileOutput,
- (aFileSettings.iFileName.get_cstr(), mio_media_type, compressed));
+ (aFileSettings.iFileName.get_cstr(), mio_media_type, compressed, aFileSettings.iTestBufferAlloc));
apRefFileOutput->setUserClockExtnInterface(compressed);
iMediaControl = OSCL_REINTERPRET_CAST(PvmiMIOControl*, apRefFileOutput);
return PVMFSuccess;
iPendingTscReset(-1),
iPendingAudioEncReset(-1),
iPendingVideoEncReset(-1),
- iReferenceCount(1)
+ iReferenceCount(1),
+ iUsingExternalVideoDecBuffers(false),
+ iUsingExternalAudioDecBuffers(false)
{
iLogger = PVLogger::GetLoggerObject("2wayEngine");
iSyncControlPVUuid = PvmfNodesSyncControlUuid;
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_INFO,
(0, "CPV324m2Way::HandleNodeInformationalEvent video dec node\n"));
+ if (PVMFPvmiBufferAllocatorNotAcquired == aEvent.GetEventType())
+ {
+ // do something
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "CPV324m2Way::HandleNodeInformationalEvent using local buffer for video decoder\n"));
+ // now let app know somehow
+ iUsingExternalVideoDecBuffers = false;
+ }
+ if (PVMFPvmiBufferAlloctorAcquired == aEvent.GetEventType())
+ {
+ // do something
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_INFO,
+ (0, "CPV324m2Way::HandleNodeInformationalEvent using *External* buffer for video decoder\n"));
+ // now let app know somehow
+ iUsingExternalVideoDecBuffers = true;
+ }
}
else if (aEvent.GetContext() == iVideoEncNode)
{
iTSC324mInterface->SetLogicalChannelPause(iAudioDecDatapath->GetChannelId(), INCOMING, pause);
}
}
+ else if (event == PVMFPvmiBufferAllocatorNotAcquired)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "CPV324m2Way::HandleNodeInformationalEvent using local buffer for audio decoder\n"));
+ // now let app know somehow
+ iUsingExternalAudioDecBuffers = false;
+ }
+ else if (event == PVMFPvmiBufferAlloctorAcquired)
+ {
+ // do something
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_INFO,
+ (0, "CPV324m2Way::HandleNodeInformationalEvent using *External* buffer for audio decoder\n"));
+ // now let app know somehow
+ iUsingExternalAudioDecBuffers = true;
+ }
+
}
else if ((iVideoEncDatapath != NULL) &&
(iVideoEncDatapath->IsNodeInDatapath((PVMFNodeInterface *) aEvent.GetContext())))
void addRef();
void removeRef();
bool queryInterface(const PVUuid& uuid, PVInterface*& iface);
+ bool UsingExternalVideoDecBuffers()
+ {
+ return iUsingExternalVideoDecBuffers;
+ }
+ bool UsingExternalAudioDecBuffers()
+ {
+ return iUsingExternalAudioDecBuffers;
+ }
+
private:
CPV324m2Way();
// interface for omx enc node capability and config
PvmiCapabilityAndConfig* ipEncNodeCapabilityAndConfig;
PVInterface* ipEncNodeCapConfigInterface;
+ bool iUsingExternalVideoDecBuffers;
+ bool iUsingExternalAudioDecBuffers;
+
};
#endif
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PV2WAY_ENGINE_SDKINFO_LABEL "1326673"
+#define PV2WAY_ENGINE_SDKINFO_LABEL "1326727"
#define PV2WAY_ENGINE_SDKINFO_DATE 0x20100316
#endif //PV_2WAY_SDKINFO_H_INCLUDED
src/test_base.cpp \
src/../../../../protocols/systems/tools/general/common/src/test_utility.cpp \
src/av_test.cpp \
+ src/av_using_test_extension.cpp \
src/acceptable_formats_test.cpp \
src/negotiated_formats_test.cpp \
+ src/turn_on_test_buffer_alloc.cpp \
src/connect_cancel_test.cpp \
src/connect_test.cpp \
src/audio_only_test.cpp \
test_base.cpp \
../../../../protocols/systems/tools/general/common/src/test_utility.cpp
SRCS_324 = av_test.cpp \
+ av_using_test_extension.cpp \
acceptable_formats_test.cpp \
negotiated_formats_test.cpp \
+ turn_on_test_buffer_alloc.cpp \
connect_cancel_test.cpp \
connect_test.cpp \
audio_only_test.cpp \
--- /dev/null
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2010 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef AV_USING_TEST_EXTENSION_H_INCLUDED
+#define AV_USING_TEST_EXTENSION_H_INCLUDED
+#include "av_test.h"
+
+
+#include "pv_2way_test_extension_interface.h"
+
+class av_using_test_extension : public av_test
+{
+ public:
+ av_using_test_extension(bool aUseProxy = false,
+ uint32 aTimeConnection = TEST_DURATION,
+ uint32 aMaxTestDuration = MAX_TEST_DURATION)
+ : av_test(aUseProxy, aTimeConnection, aMaxTestDuration),
+ iTestConfigInterface(NULL),
+ iQueryTestInterfaceCmdId(0),
+ iTempTestConfigInterface(NULL)
+ {
+ iTestName = _STRLIT_CHAR("negotiated formats");
+ }
+
+ ~av_using_test_extension()
+ {
+ }
+
+
+ protected:
+ void AllNodesAdded();
+ PV2WayTestExtensionInterface* iTestConfigInterface;
+
+ private:
+ void CommandCompleted(const PVCmdResponse& aResponse);
+ void CreateParts();
+ PVCommandId iQueryTestInterfaceCmdId;
+ PVInterface* iTempTestConfigInterface;
+
+};
+
+
+#endif
+
+
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#ifndef NEGOTIATED_FORMATS_TEST_H_INCLUDED
#define NEGOTIATED_FORMATS_TEST_H_INCLUDED
-#include "av_test.h"
+#include "av_using_test_extension.h"
#ifndef PV_2WAY_MIO_H_INCLUDED
#include "pv_2way_mio.h"
#include "pv_2way_test_extension_interface.h"
-class negotiated_formats_test : public av_test
+class negotiated_formats_test : public av_using_test_extension
{
public:
negotiated_formats_test(bool aUseProxy = false,
uint32 aTimeConnection = TEST_DURATION,
uint32 aMaxTestDuration = MAX_TEST_DURATION)
- : av_test(aUseProxy, aTimeConnection, aMaxTestDuration),
- iQueryTestInterfaceCmdId(0),
- iTempTestConfigInterface(NULL),
- iTestConfigInterface(NULL)
+ : av_using_test_extension(aUseProxy, aTimeConnection, aMaxTestDuration)
{
iTestName = _STRLIT_CHAR("negotiated formats");
}
void AddExpectedFormat(TPVDirection aDir, PV2WayMediaType aType, const char* const aFormat);
protected:
- void AllNodesAdded();
private:
void FinishTimerCallback();
- void CommandCompleted(const PVCmdResponse& aResponse);
- void CreateParts();
- PVCommandId iQueryTestInterfaceCmdId;
- PVInterface* iTempTestConfigInterface;
- PV2WayTestExtensionInterface* iTestConfigInterface;
-
Oscl_Vector<FormatCapabilityInfo, OsclMemAllocator> iInAudFormatCapability;
Oscl_Vector<FormatCapabilityInfo, OsclMemAllocator> iOutAudFormatCapability;
Oscl_Vector<FormatCapabilityInfo, OsclMemAllocator> iInVidFormatCapability;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
iAudioSinkFileSettings.iFileName = AUDIO_SINK_FILENAME;
iAudioSinkFileSettings.iMediaFormat = PVMF_MIME_AMR_IF2;
+ iAudioSinkBufferAllocatorFileSettings.iTestBufferAlloc = true;
+ iAudioSinkBufferAllocatorFileSettings.iFileName = AUDIO_SINK_FILENAME;
+ iAudioSinkBufferAllocatorFileSettings.iMediaFormat = PVMF_MIME_AMR_IF2;
+
+
iAudioSinkRawFileSettings.iFileName = AUDIO_SINK_RAW_FILENAME;
iAudioSinkRawFileSettings.iMediaFormat = PVMF_MIME_PCM16;
iVideoSinkM4VFileSettings.iFileName = VIDEO_SINK_M4V_FILENAME;
iVideoSinkM4VFileSettings.iMediaFormat = PVMF_MIME_M4V;
+
+ iVideoSinkBufferAllocatorFileSettings.iTestBufferAlloc = true;
+ iVideoSinkBufferAllocatorFileSettings.iFileName = VIDEO_SINK_YUV_FILENAME;
+ iVideoSinkBufferAllocatorFileSettings.iMediaFormat = PVMF_MIME_YUV420;
return true;
};
PvmiMIOFileInputSettings iAudioSinkRawFileSettings;
PvmiMIOFileInputSettings iAudioSink2FileSettings;
PvmiMIOFileInputSettings iAudioSinkFileSettings;
+ PvmiMIOFileInputSettings iAudioSinkBufferAllocatorFileSettings;
PvmiMIOFileInputSettings iVideoSinkYUVFileSettings;
PvmiMIOFileInputSettings iVideoSinkH263FileSettings;
PvmiMIOFileInputSettings iVideoSinkM4VFileSettings;
+ PvmiMIOFileInputSettings iVideoSinkBufferAllocatorFileSettings;
+
+
DummyMIOSettings iLipSyncAudioSourceSettings;
DummyMIOSettings iLipSyncAudioSinkSettings;
--- /dev/null
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2010 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#ifndef TURN_ON_TEST_BUFFER_ALLOC_H_INCLUDED
+#define TURN_ON_TEST_BUFFER_ALLOC_H_INCLUDED
+
+#include "av_using_test_extension.h"
+
+
+
+
+class turn_on_test_buffer_alloc : public av_using_test_extension
+{
+ public:
+ turn_on_test_buffer_alloc(bool aUseProxy = false,
+ uint32 aTimeConnection = TEST_DURATION,
+ uint32 aMaxTestDuration = MAX_TEST_DURATION)
+ : av_using_test_extension(aUseProxy, aTimeConnection, aMaxTestDuration)
+
+ {
+ iTestName = _STRLIT_CHAR("Use external buffer allocator for decoder nodes");
+
+ }
+
+ ~turn_on_test_buffer_alloc()
+ {
+ }
+
+ private:
+
+ void FinishTimerCallback();
+
+
+};
+
+
+#endif
+
+
--- /dev/null
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2010 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "negotiated_formats_test.h"
+
+void av_using_test_extension::AllNodesAdded()
+{
+ LetConnectionRun();
+}
+
+
+
+void av_using_test_extension::CreateParts()
+{
+ // Get test extension interface handle
+ // get TSC node
+ iQueryTestInterfaceCmdId = terminal->QueryInterface(PV2WayTestEncExtensionUUID,
+ iTempTestConfigInterface);
+}
+
+void av_using_test_extension::CommandCompleted(const PVCmdResponse& aResponse)
+{
+ PVCommandId cmdId = aResponse.GetCmdId();
+ if (cmdId < 0)
+ return;
+
+ if (iQueryTestInterfaceCmdId == cmdId)
+ {
+
+ if (aResponse.GetCmdStatus() == PVMFSuccess)
+ {
+ if (iTempTestConfigInterface)
+ {
+ iTestConfigInterface = OSCL_STATIC_CAST(PV2WayTestExtensionInterface*,
+ iTempTestConfigInterface);
+ iTempTestConfigInterface = NULL;
+ // set other values
+ test_base::CreateParts();
+ }
+
+ }
+
+ }
+ else
+ {
+ test_base::CommandCompleted(aResponse);
+ }
+}
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "negotiated_formats_test.h"
-void negotiated_formats_test::AllNodesAdded()
-{
- LetConnectionRun();
-}
void negotiated_formats_test::FinishTimerCallback()
}
}
-void negotiated_formats_test::CreateParts()
-{
- // Get test extension interface handle
- // get TSC node
- iQueryTestInterfaceCmdId = terminal->QueryInterface(PV2WayTestEncExtensionUUID,
- iTempTestConfigInterface);
-}
-
-void negotiated_formats_test::CommandCompleted(const PVCmdResponse& aResponse)
-{
- PVCommandId cmdId = aResponse.GetCmdId();
- if (cmdId < 0)
- return;
-
- if (iQueryTestInterfaceCmdId == cmdId)
- {
-
- if (aResponse.GetCmdStatus() == PVMFSuccess)
- {
- if (iTempTestConfigInterface)
- {
- iTestConfigInterface = OSCL_STATIC_CAST(PV2WayTestExtensionInterface*,
- iTempTestConfigInterface);
- iTempTestConfigInterface = NULL;
- // set other values
- test_base::CreateParts();
- }
-
- }
- }
- else
- {
- test_base::CommandCompleted(aResponse);
- }
-}
#include "pause_resume_test.h"
#include "reconnect_test.h"
#include "error_check_audio_only_test.h"
+#include "turn_on_test_buffer_alloc.h"
#include "tsc_h324m_config_interface.h"
// Audio Sink /Incoming
if (oscl_strncmp(PVMF_MIME_PCM16, apAudSinkFormatType, oscl_strlen(PVMF_MIME_PCM16)) == 0)
{
+
apSourceAndSinks->AddPreferredCodec(INCOMING, PV_AUDIO, iCodecs.iAudioSinkRawFileSettings);
}
}
else if (oscl_strncmp(PVMF_MIME_H2632000, apVidSrcFormatType, oscl_strlen(PVMF_MIME_H2632000)) == 0)
{
+
apSourceAndSinks->AddPreferredCodec(OUTGOING, PV_VIDEO, iCodecs.iVideoSourceH263FileSettings);
}
else if (oscl_strncmp(PVMF_MIME_M4V, apVidSrcFormatType, oscl_strlen(PVMF_MIME_M4V)) == 0)
}
else if (oscl_strncmp(PVMF_MIME_H2632000, apVidSinkFormatType, oscl_strlen(PVMF_MIME_H2632000)) == 0)
{
+
apSourceAndSinks->AddPreferredCodec(INCOMING, PV_VIDEO, iCodecs.iVideoSinkH263FileSettings);
+
}
else if (oscl_strncmp(PVMF_MIME_M4V, apVidSinkFormatType, oscl_strlen(PVMF_MIME_M4V)) == 0)
{
pTemp->AddExpectedFormat(OUTGOING, PV_AUDIO, PVMF_MIME_PCM16);
pTemp->AddExpectedFormat(INCOMING, PV_VIDEO, PVMF_MIME_YUV420);
pTemp->AddExpectedFormat(OUTGOING, PV_VIDEO, PVMF_MIME_H2632000);
+
adopt_test_case(pTemp);
}
void engine_test_suite::AddMiscTests(const bool aProxy, int32 firstTest, int32 lastTest)
{
+
if (inRange(firstTest, lastTest))
{
test_base* pTemp = OSCL_NEW(error_check_audio_only_test, (aProxy));
adopt_test_case(pTemp);
}
+ if (inRange(firstTest, lastTest))
+ {
+
+ test_base* pTemp = OSCL_NEW(turn_on_test_buffer_alloc, (aProxy));
+ PV2WaySourceAndSinksFile* pSourceAndSinks = OSCL_NEW(PV2WaySourceAndSinksFile,
+ (pTemp->GetSdkInfo()));
+ AddOutgoingAudioCodecUsingFile(pSourceAndSinks, PVMF_MIME_PCM16);
+ AddOutgoingVideoCodecUsingFile(pSourceAndSinks, PVMF_MIME_YUV420);
+ pSourceAndSinks->AddPreferredCodec(INCOMING, PV_AUDIO, iCodecs.iAudioSinkBufferAllocatorFileSettings);
+ pSourceAndSinks->AddPreferredCodec(INCOMING, PV_VIDEO, iCodecs.iVideoSinkBufferAllocatorFileSettings);
+ pTemp->AddSourceAndSinks(pSourceAndSinks);
+ adopt_test_case(pTemp);
+
+
+ }
+
}
#endif
--- /dev/null
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2010 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+#include "turn_on_test_buffer_alloc.h"
+
+
+void turn_on_test_buffer_alloc::FinishTimerCallback()
+{
+ bool pass = false;
+
+ // compare values to what we are expecting
+ if (iTestConfigInterface)
+ {
+
+ bool usingBuffers = iTestConfigInterface->UsingExternalVideoDecBuffers();
+ if (usingBuffers)
+ {
+ pass = true;
+ }
+ }
+
+ test_is_true(pass);
+
+
+ DisconnectSourceSinks();
+
+}
+
+
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1326673"
+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1326727"
#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100316
#endif //PV_AUTHOR_SDKINFO_H_INCLUDED
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVPLAYER_ENGINE_SDKINFO_LABEL "1326673"
+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1326727"
#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100316
#endif //PV_PLAYER_SDKINFO_H_INCLUDED
}
}
+ else
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "PVMFOMXAudioDecNode::HandlePortReEnable Warning- It is OK for this KVP to fail"
+ "Do NOT attempt to fix the failure in the MIO unless you absolutely want to implement"
+ "the MIO BUFFER ALLOCATOR - see documentation"));
+
+
+ ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
+ }
//Buffer allocator kvp query and allocation has to be done again if we landed into handle port reconfiguration
{
iNumOutputBuffers = iNumBuffers;
iOMXComponentOutputBufferSize = iBufferSize;
+ ReportInfoEvent(PVMFPvmiBufferAlloctorAcquired);
}
}
}
}
}
+ else
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "PVMFOMXAudioDecNode::HandlePortReEnable Warning- It is OK for this KVP to fail"
+ "Do NOT attempt to fix the failure in the MIO unless you absolutely want to implement"
+ "the MIO BUFFER ALLOCATOR -see documentation"));
+ ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
+ }
/* Allocate output buffers */
if (!CreateOutMemPool(iNumOutputBuffers))
}
+ else
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "PVMFOMXAudioDecNode::NegotiateComponentParameters Warning- It is OK for this KVP to fail"
+ "Do NOT attempt to fix the failure in the MIO unless you absolutely want to implement"
+ "the MIO BUFFER ALLOCATOR -see documentation"));
+ ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
+ }
//Try querying the buffer allocator KVP for output buffer allocation outside of the node
PvmiKvp* kvp = NULL;
int numKvp = 0;
{
iNumOutputBuffers = iNumBuffers;
iOMXComponentOutputBufferSize = iBufferSize;
-
+ ReportInfoEvent(PVMFPvmiBufferAlloctorAcquired);
}
}
}
}
}
+ else
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "PVMFOMXAudioDecNode::NegotiateComponentParameters Warning- It is OK for this KVP to fail"
+ "Do NOT attempt to fix the failure in the MIO unless you absolutely want to implement"
+ "the MIO BUFFER ALLOCATOR -see documentation"));
+ ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
+ }
iParamPort.nBufferCountActual = iNumOutputBuffers;
}
+ else
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "PVMFOMXVideoDecNode::HandlePortReEnable Warning- It is OK for this KVP to fail"
+ "Do NOT attempt to fix the failure in the MIO unless you absolutely want to implement"));
+
+ ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
+ }
//Buffer allocation has to be done again in case we landed to port reconfiguration
PvmiKvp* kvp = NULL;
{
iNumOutputBuffers = iNumBuffers;
iOMXComponentOutputBufferSize = iBufferSize;
+ ReportInfoEvent(PVMFPvmiBufferAlloctorAcquired);
}
}
else
}
else
{
- PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_ERR,
- (0, "PVMFOMXVideoDecNode::HandlePortReEnable - Error calling pvmiGetBufferAllocatorSpecificInfoSync"));
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "PVMFOMXVideoDecNode::HandlePortReEnable Warning- It is OK for this KVP to fail"
+ "Do NOT attempt to fix the failure in the MIO unless you absolutely want to implement"
+ "the MIO BUFFER ALLOCATOR -see documentation"));
+ ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
+
}
// it is now safe to send command for port reenable
// the call succeeded - no need to send extra fsi
iCompactFSISettingSucceeded = true;
sendFsi = false;
+
}
alloc.deallocate((OsclAny*)(KvpKey));
return false; // this is going to make everything go out of scope
}
}
+ else
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "PVMFOMXVideoDecNode::NegotiateComponentParameters Warning- It is OK for this KVP to fail"
+ "Do NOT attempt to fix the failure in the MIO unless you absolutely want to implement"
+ "the MIO BUFFER ALLOCATOR -see documentation"));
+ ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
+ }
}
{
iNumOutputBuffers = iNumBuffers;
iOMXComponentOutputBufferSize = iBufferSize;
+ ReportInfoEvent(PVMFPvmiBufferAlloctorAcquired);
}
}
else
{
ipExternalOutputBufferAllocatorInterface->removeRef();
ipExternalOutputBufferAllocatorInterface = NULL;
-
}
}
}
else
{
- PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_ERR,
- (0, "PVMFOMXVideoDecNode::NegotiateComponentParameters - Error calling pvmiGetBufferAllocatorSpecificInfoSync"));
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_WARNING,
+ (0, "PVMFOMXVideoDecNode::NegotiateComponentParameters Warning- It is OK for this KVP to fail"
+ "Do NOT attempt to fix the failure in the MIO unless you absolutely want to implement"
+ "the MIO BUFFER ALLOCATOR -see documentation"));
+
+ ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
}
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
iMediaFormat = PVMF_MIME_FORMAT_UNKNOWN;
iLoopInputFile = true;
+ iTestBufferAlloc = false;
iSamplingFrequency = 8000;
iNumChannels = 1;
iNum20msFramesPerChunk = 1;
{
iMediaFormat = aSettings.iMediaFormat;
iLoopInputFile = aSettings.iLoopInputFile;
+ iTestBufferAlloc = aSettings.iTestBufferAlloc;
iSamplingFrequency = aSettings.iSamplingFrequency;
iNumChannels = aSettings.iNumChannels;
iNum20msFramesPerChunk = aSettings.iNum20msFramesPerChunk;
// General settings
PVMFFormatType iMediaFormat;
bool iLoopInputFile;
+ bool iTestBufferAlloc;
OSCL_wStackString<512> iFileName;
OSCL_wStackString<512> iLogFileName;
OSCL_wStackString<512> iTextFileName;
#endif
-#define TEST_BUFFER_ALLOCATOR 0
-#if TEST_BUFFER_ALLOCATOR
#ifndef PV_INTERFACE_H
#include "pv_interface.h"
#endif
#ifndef PVMF_FIXEDSIZE_BUFFER_ALLOC_H_INCLUDED
#include "pvmf_fixedsize_buffer_alloc.h"
#endif
-#endif
+
class PVLogger;
class PVRefFileOutputTestObserver;
OSCL_IMPORT_REF PVRefFileOutput(const oscl_wchar* aFileName,
MediaType aMediaType,
- bool aCompressedMedia = false);
+ bool aCompressedMedia = false,
+ bool aTestbufferAlloc = false);
OSCL_IMPORT_REF PVRefFileOutput(const OSCL_wString& aFileName, bool logStrings = false);
bool iFsConnected;
Oscl_File iOutputFile;
bool iFileOpened;
+ bool iTest_Buffer_Alloc;
// Audio parameters.
OSCL_HeapString<OsclMemAllocator> iAudioFormatString;
OSCL_IMPORT_REF virtual void Pos(PVMFTimestamp& aTimestamp) = 0;
};
-#if TEST_BUFFER_ALLOCATOR
-
class PVRefBufferAlloc: public PVInterface, public PVMFFixedSizeBufferAlloc
{
public:
int32 numAllocated;
};
-#endif
+
#endif // PVMI_MEDIA_IO_FILEOUTPUT_H_INCLUDED
OSCL_EXPORT_REF PVRefFileOutput::PVRefFileOutput(const oscl_wchar* aFileName,
MediaType aMediaType,
- bool aCompressedMedia)
+ bool aCompressedMedia,
+ bool aTestbufferAlloc)
: OsclTimerObject(OsclActiveObject::EPriorityNominal, "pvreffileoutput")
, iOutputFileName(aFileName)
, iMediaType(aMediaType)
, iLogOutputToFile(false)
#endif
{
+
initData();
+ iTest_Buffer_Alloc = aTestbufferAlloc;
}
void PVRefFileOutput::initData()
iCommandCounter = 0;
iLogger = NULL;
iFileOpened = false;
+ iTest_Buffer_Alloc = false;
iFsConnected = false;
iCommandResponseQueue.reserve(5);
iWriteResponseQueue.reserve(5);
aParameters[0].value.uint32_value = DEFAULT_NUM_DECODED_FRAMES_CAPABILITY;
return PVMFSuccess;
}
-#if TEST_BUFFER_ALLOCATOR
- else if (pv_mime_strcmp(aIdentifier, PVMF_SUPPORT_FOR_BUFFER_ALLOCATOR_IN_MIO_KEY) == 0)
+ if (iTest_Buffer_Alloc)
{
- return PVMFSuccess;
- }
- else if (pv_mime_strcmp(aIdentifier, PVMF_BUFFER_ALLOCATOR_KEY) == 0)
- {
- int32 err;
- aParameters = (PvmiKvp*)oscl_malloc(sizeof(PvmiKvp));
- if (!aParameters)
+ if (pv_mime_strcmp(aIdentifier, PVMF_SUPPORT_FOR_BUFFER_ALLOCATOR_IN_MIO_KEY) == 0)
{
- return PVMFErrNoMemory;
+ return PVMFSuccess;
}
-
- OSCL_TRY(err, aParameters[0].value.key_specific_value = (PVInterface *)OSCL_NEW(PVRefBufferAlloc, (iBufferSize, iNumberOfBuffers)) ;);
- if (err || (NULL == aParameters[0].value.key_specific_value))
+ else if (pv_mime_strcmp(aIdentifier, PVMF_BUFFER_ALLOCATOR_KEY) == 0)
{
- return PVMFErrNoMemory;
+ int32 err;
+ aParameters = (PvmiKvp*)oscl_malloc(sizeof(PvmiKvp));
+ if (!aParameters)
+ {
+ return PVMFErrNoMemory;
+ }
+ OSCL_TRY(err, aParameters[0].value.key_specific_value = (PVInterface *)OSCL_NEW(PVRefBufferAlloc, (iBufferSize, iNumberOfBuffers)) ;);
+ if (err || (NULL == aParameters[0].value.key_specific_value))
+ {
+ return PVMFErrNoMemory;
+
+ }
+ return PVMFSuccess;
}
- return PVMFSuccess;
}
-#endif
+
//other queries are not currently supported.
//unrecognized key.
}
}
-#if TEST_BUFFER_ALLOCATOR
PVRefBufferAlloc::PVRefBufferAlloc(uint32 size, uint32 buffers): refCount(0), bufferSize(size), maxBuffers(buffers), numAllocated(0)
{
return false;
}
-#endif
Notification for invalid ts in the RTP packet
*/
const PVMFStatus PVMFErrInvalidRTPTimeInPkt = 56;
+/*
+ Notification that pvmiGetBufferAllocatorSpecificInfoSync was unsuccessful
+ */
+const PVMFStatus PVMFPvmiBufferAllocatorNotAcquired = 55;
+/*
+ Notification that pvmiGetBufferAllocatorSpecificInfoSync was successful
+ */
+const PVMFStatus PVMFPvmiBufferAlloctorAcquired = 56;
/*
Placeholder for end of range