- Clean up warnings and some negotiate parameter changes from omx dec & enc
test apps
- Fix valgrind issue reported with android simulator in omx base node
-- Add more supported rate control types in pvmp4h263encextension.h
+- Add more supported rate control types in pv_video_encnode_extension.h
- Memory leak in player engine test case 807
- Addressed compiler warnings in PVME
- nBufferAlignment of OMX_PARAM_PORTDEFINITIONTYPE is initialized to negative
case VIDEO_ENCODER_H263:
case VIDEO_ENCODER_MPEG_4_SP:
case VIDEO_ENCODER_H264: {
- PVMp4H263EncExtensionInterface *config = OSCL_STATIC_CAST(PVMp4H263EncExtensionInterface*,
+ PVVideoEncExtensionInterface *config = OSCL_STATIC_CAST(PVVideoEncExtensionInterface*,
mVideoEncoderConfig);
if (config) {
if (mVideo_bitrate_setting == 0) {
#include "pvmf_media_input_node_factory.h"
#include "pvmf_fileoutput_factory.h"
#include "pvmf_node_interface.h"
-#include "pvmp4h263encextension.h"
+#include "pv_video_encnode_extension.h"
#include "pvmp4ffcn_clipconfig.h"
#include "pvmf_fileoutput_config.h"
#ifndef PVMF_FILEOUTPUT_CONFIG_H_INCLUDED
ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoH263.nAllowedPictureTypes = OMX_VIDEO_PictureTypeI | OMX_VIDEO_PictureTypeP;
ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoH263.bForceRoundingTypeToZero = OMX_TRUE;
ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoH263.nPictureHeaderRepetition = 0;
- ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoH263.nGOBHeaderInterval = 0;
+ ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoH263.nGOBHeaderInterval = 2; //one can change it by SetGOBHdrInterval in pvomxencnode
}
#endif
#include "pvmf_video.h"
-#include "pvmp4h263encextension.h"
+#include "pv_video_encnode_extension.h"
#ifndef PV_ENGINE_OBSERVER_H_INCLUDED
#include "pv_engine_observer.h"
if ((iMuxDatapath->GetState() == EOpened) && iIsStackConnected)
{
/* Increase video encoder bitrate if required */
- // PVMp4H263EncExtensionInterface *ptr = (PVMp4H263EncExtensionInterface *) iVideoEncNodeInterface.iInterface;
+ // PVVideoEncExtensionInterface *ptr = (PVVideoEncExtensionInterface *) iVideoEncNodeInterface.iInterface;
// ptr->SetOutputBitRate(0, VIDEO_ENCODER_BITRATE);
SetState(EConnected);
(iVideoEncDatapath->IsPortInDatapath(aPort)) &&
(iVideoEncDatapath->GetState() == EOpened))
{
- if (!((PVMp4H263EncExtensionInterface *) iVideoEncNodeInterface.iInterface)->RequestIFrame())
+ if (!((PVVideoEncExtensionInterface *) iVideoEncNodeInterface.iInterface)->RequestIFrame())
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
(0, "CPV324m2Way::GenerateIFrame - unable to generate iframe\n"));
return PVMFFailure;
}
- PVMp4H263EncExtensionInterface *ptr =
- (PVMp4H263EncExtensionInterface *) iVideoEncNodeInterface.iInterface;
+ PVVideoEncExtensionInterface *ptr =
+ (PVVideoEncExtensionInterface *) iVideoEncNodeInterface.iInterface;
if (ptr)
{
#include "pvlogger.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PV_2WAY_TEST_EXTENSION_H_INCLUDED
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PV2WAY_ENGINE_SDKINFO_LABEL "1247284"
-#define PV2WAY_ENGINE_SDKINFO_DATE 0x20100204
+#define PV2WAY_ENGINE_SDKINFO_LABEL "1247491"
+#define PV2WAY_ENGINE_SDKINFO_DATE 0x20100205
#endif //PV_2WAY_SDKINFO_H_INCLUDED
/* ------------------------------------------------------------------
- * 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 "connect_test.h"
#include "tsc_h324m_config_interface.h"
-#include "pvmp4h263encextension.h"
+#include "pv_video_encnode_extension.h"
void connect_test::EncoderIFSucceeded()
{
PVUuid mp4h263EncUuid = PVMp4H263EncExtensionUUID;
- PVMp4H263EncExtensionInterface *ptr = (PVMp4H263EncExtensionInterface *) iMP4H263EncoderInterface;
+ PVVideoEncExtensionInterface *ptr = (PVVideoEncExtensionInterface *) iMP4H263EncoderInterface;
if (ptr)
{
// Default frame rate is 5
/* ------------------------------------------------------------------
- * 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 "video_only_test.h"
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef TEST_UTILITY_H_HEADER
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1247284"
-#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100204
+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1247491"
+#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100205
#endif //PV_AUTHOR_SDKINFO_H_INCLUDED
/* ------------------------------------------------------------------
- * 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 PVMF_FILEOUTPUT_CONFIG_H_INCLUDED
#include "pvmf_fileoutput_config.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVMF_AUDIO_ENCNODE_EXTENSION_H_INCLUDED
#include "pvmf_audio_encnode_extension.h"
/* ------------------------------------------------------------------
- * 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 "pvmp4ffcn_clipconfig.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVAETEST_NODE_CONFIG_H_INCLUDED
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
(0, "pvauthor_async_test_miscellaneous::ConfigureVideoEncoder"));
- PVMp4H263EncExtensionInterface* config;
- config = OSCL_STATIC_CAST(PVMp4H263EncExtensionInterface*, iVideoEncoderConfig);
+ PVVideoEncExtensionInterface* config;
+ config = OSCL_STATIC_CAST(PVVideoEncExtensionInterface*, iVideoEncoderConfig);
if (!config)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
/* ------------------------------------------------------------------
- * 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 "pvmp4ffcn_clipconfig.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVAETEST_NODE_CONFIG_H_INCLUDED
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
(0, "pvauthor_async_compressed_test_errorhandling::ConfigureVideoEncoder"));
- PVMp4H263EncExtensionInterface* config;
- config = OSCL_STATIC_CAST(PVMp4H263EncExtensionInterface*, iVideoEncoderConfig);
+ PVVideoEncExtensionInterface* config;
+ config = OSCL_STATIC_CAST(PVVideoEncExtensionInterface*, iVideoEncoderConfig);
if (!config)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
/* ------------------------------------------------------------------
- * 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 "pvmp4ffcn_clipconfig.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVAETEST_NODE_CONFIG_H_INCLUDED
bool pv_mediainput_async_test_opencomposestop::ConfigureVideoEncoder()
{
- PVMp4H263EncExtensionInterface* config;
- config = OSCL_STATIC_CAST(PVMp4H263EncExtensionInterface*, iVideoEncoderConfig);
+ PVVideoEncExtensionInterface* config;
+ config = OSCL_STATIC_CAST(PVVideoEncExtensionInterface*, iVideoEncoderConfig);
if (!config)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
/* ------------------------------------------------------------------
- * 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 "pvmp4ffcn_clipconfig.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVAETEST_NODE_CONFIG_H_INCLUDED
bool pv_mediainput_async_test_errorhandling::ConfigureVideoEncoder()
{
- PVMp4H263EncExtensionInterface* config;
- config = OSCL_STATIC_CAST(PVMp4H263EncExtensionInterface*, iVideoEncoderConfig);
+ PVVideoEncExtensionInterface* config;
+ config = OSCL_STATIC_CAST(PVVideoEncExtensionInterface*, iVideoEncoderConfig);
if (!config)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
/* ------------------------------------------------------------------
- * 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 "pvmp4ffcn_clipconfig.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVAETEST_NODE_CONFIG_H_INCLUDED
bool pv_mediainput_async_test_reset::ConfigureVideoEncoder()
{
- PVMp4H263EncExtensionInterface* config;
- config = OSCL_STATIC_CAST(PVMp4H263EncExtensionInterface*, iVideoEncoderConfig);
+ PVVideoEncExtensionInterface* config;
+ config = OSCL_STATIC_CAST(PVVideoEncExtensionInterface*, iVideoEncoderConfig);
if (!config)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
/* ------------------------------------------------------------------
- * 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 "pvmp4ffcn_clipconfig.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVAETEST_NODE_CONFIG_H_INCLUDED
bool pv_mediainput_async_test_delete::ConfigureVideoEncoder()
{
- PVMp4H263EncExtensionInterface* config;
- config = OSCL_STATIC_CAST(PVMp4H263EncExtensionInterface*, iVideoEncoderConfig);
+ PVVideoEncExtensionInterface* config;
+ config = OSCL_STATIC_CAST(PVVideoEncExtensionInterface*, iVideoEncoderConfig);
if (!config)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
/* ------------------------------------------------------------------
- * 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 XML_TEST_INTERPRETER_H_INCLUDED
#include "xml_test_interpreter.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVMP4FFCN_CLIPCONFIG_H_INCLUDED
#include "pvmp4ffcn_clipconfig.h"
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVPLAYER_ENGINE_SDKINFO_LABEL "1247284"
-#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100204
+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1247491"
+#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100205
#endif //PV_PLAYER_SDKINFO_H_INCLUDED
include/pvmf_streaming_data_source.h \
include/pvmf_audio_encnode_extension.h \
include/pvmfamrencnode_extension.h \
- include/pvmp4h263encextension.h \
+ include/pv_video_encnode_extension.h \
include/pvmf_format_progdownload_support_extension.h \
include/pvmf_license_context_data.h \
include/pvmf_mp4_mfra_info_update.h
pvmf_streaming_data_source.h \
pvmf_audio_encnode_extension.h \
pvmfamrencnode_extension.h \
- pvmp4h263encextension.h \
+ pv_video_encnode_extension.h \
pvmf_format_progdownload_support_extension.h \
pvmf_license_context_data.h \
pvmf_mp4_mfra_info_update.h
/* ------------------------------------------------------------------
- * 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.
* -------------------------------------------------------------------
*/
/**
- * @file pvmp4h263encextension.h
+ * @file pv_video_encnode_extension.h
*/
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#define PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#define PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
#ifndef OSCL_BASE_H_INCLUDED
#include "oscl_base.h"
} PVMFVENRateControlType;
////////////////////////////////////////////////////////////////////////////
-class PVMp4H263EncExtensionInterface : public PVInterface
+class PVVideoEncExtensionInterface : public PVInterface
{
public:
/** Increment reference counter for this interface. */
*/
virtual bool SetTimeIncRes(int32 aTimeIncRes) = 0;
+ /**
+ * Sets H.263 GOB header interval.
+ *
+ * @param aGOBHdrIntvrl is GOB Header Interval value 0 for none,
+ * 1 for every slice, 2 for every other slice,etc.
+ * @return True if successful, else false
+ */
+ virtual bool SetGOBHdrInterval(uint32 aGOBHdrIntrvl) = 0;
+
};
-#endif // PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
+#endif // PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
iVideoEncodeParam.iShortHeader = false;
iVideoEncodeParam.iDataPartitioning = false;
iVideoEncodeParam.iResyncMarker = true;
+ iVideoEncodeParam.iGOBHdrInterval = 0; //Default
// set the default rate control type to variable bit rate control
// since it has better performance
H263Type.bPLUSPTYPEAllowed = OMX_FALSE;
H263Type.bForceRoundingTypeToZero = OMX_FALSE;
H263Type.nPictureHeaderRepetition = 0;
- H263Type.nGOBHeaderInterval = 0;
+ if (H263Type.nGOBHeaderInterval)
+ {
+ // if non-zero, then overwrite.
+ H263Type.nGOBHeaderInterval = iVideoEncodeParam.iGOBHdrInterval;
+ }
Err = OMX_SetParameter(iOMXEncoder, OMX_IndexParamVideoH263, &H263Type);
if (OMX_ErrorNone != Err)
else if (*uuid == PVMp4H263EncExtensionUUID)
{
addRef();
- *ptr = OSCL_STATIC_CAST(PVMp4H263EncExtensionInterface*, this);
+ *ptr = OSCL_STATIC_CAST(PVVideoEncExtensionInterface*, this);
CommandComplete(iInputCommands, aCmd, PVMFSuccess);
//iface = OSCL_STATIC_CAST(PVInterface*, myInterface);
}
////////////////////////////////////////////////////////////////////////////
-//Stub GetVolHeader Function for PvMp4H263EncExtensionInterface
+//Stub GetVolHeader Function for PVVideoEncExtensionInterface
OSCL_EXPORT_REF bool PVMFOMXEncNode::GetVolHeader(OsclRefCounterMemFrag& aVolHeader)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
}
////////////////////////////////////////////////////////////////////////////
-//Stub SetFSIParam Function for PvMp4H263EncExtensionInterface
+//Stub SetFSIParam Function for PVVideoEncExtensionInterface
OSCL_EXPORT_REF bool PVMFOMXEncNode::SetFSIParam(uint8* aFSIBuff, int aFSIBuffLength)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
}
////////////////////////////////////////////////////////////////////////////
+OSCL_EXPORT_REF bool PVMFOMXEncNode::SetGOBHdrInterval(uint32 aGOBHdrIntrvl)
+{
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
+ (0, "PVMFOMXEncNode-%s::SetGOBHdrInterval to %d", iNodeTypeId, aGOBHdrIntrvl));
+
+
+ switch (iInterfaceState)
+ {
+ case EPVMFNodeStarted:
+ case EPVMFNodePaused:
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXEncEncNode-%s::SetGOBHdrInterval: Error iInterfaceState=%d", iNodeTypeId, iInterfaceState));
+ return false;
+
+ default:
+ break;
+ }
+
+ iVideoEncodeParam.iGOBHdrInterval = aGOBHdrIntrvl;
+ return true;
+
+}
+
+////////////////////////////////////////////////////////////////////////////
PVMFFormatType PVMFOMXEncNode::GetCodecType()
{
return iOutFormat;
#include "pvmf_omx_enc_node_extension_interface.h"
#endif
-#ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED
-#include "pvmp4h263encextension.h"
+#ifndef PV_VIDEO_ENCNODE_EXTENSION_H_INCLUDED
+#include "pv_video_encnode_extension.h"
#endif
#ifndef PVMF_AUDIO_ENCNODE_EXTENSION_H_INCLUDED
/** Sets the number of ticks in time increment resolution between 2 source frames (equivalent to source frame rate). */
int32 iTickPerSrc;
+ /** Sets the interval of non-empty GOB headers in units of GOBs */
+ uint32 iGOBHdrInterval;
} PV_VideoEncodeParam;
, public PVMFOMXEncNodeExtensionInterface
, public PVMFMetadataExtensionInterface
, public PvmiCapabilityAndConfigBase
- , public PVMp4H263EncExtensionInterface
+ , public PVVideoEncExtensionInterface
, public PVAudioEncExtensionInterface
{
public:
void setParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters, int aNumElements, PvmiKvp* &aRetKVP);
PVMFStatus verifyParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters, int aNumElements);
- // Virtual functions of PVMp4H263EncExtensionInterface
+ // Virtual functions of PVVideoEncExtensionInterface
// OSCL_IMPORT_REF void addRef();
// OSCL_IMPORT_REF void removeRef();
// OSCL_IMPORT_REF bool queryInterface(const PVUuid& uuid, PVInterface*& iface);
OSCL_IMPORT_REF bool SetShortHeader(bool aShortHeaderFlag);
OSCL_IMPORT_REF bool SetResyncMarker(bool aResyncMarkerFlag);
OSCL_IMPORT_REF bool SetTimeIncRes(int32 aTimeIncRes);
+ OSCL_IMPORT_REF bool SetGOBHdrInterval(uint32 aGOBHdrIntrvl);
// from AudioEncExtensionInterface
OSCL_IMPORT_REF PVMFStatus SetOutputBitRate(PVMF_GSMAMR_Rate aBitRate);