OSDN Git Service

RIO-7938: Add API in PVMp4H263EncExtensionInterface to set H.263 GOB header interval
authorPacketVideo CM <engbuild@pv.com>
Fri, 12 Feb 2010 02:47:29 +0000 (18:47 -0800)
committerPacketVideo CM <engbuild@pv.com>
Fri, 12 Feb 2010 02:47:29 +0000 (18:47 -0800)
24 files changed:
ChangeLog [changed mode: 0644->0755]
android/author/authordriver.cpp
android/author/authordriver.h
codecs_v2/omx/omx_m4venc/src/omx_mpeg4enc_component.cpp
engines/2way/src/pv_2way_engine.cpp
engines/2way/src/pv_2way_engine.h
engines/2way/src/pv_2way_sdkinfo.h
engines/2way/test/src/connect_test.cpp
engines/2way/test/src/video_only_test.cpp
engines/author/src/pv_author_sdkinfo.h
engines/author/src/single_core/pvaenodefactoryutility.h
engines/author/test/src/test_pv_author_engine_testset1.cpp
engines/author/test/src/test_pv_author_engine_testset4.cpp
engines/author/test/src/test_pv_author_engine_testset5.cpp
engines/author/test/src/test_pv_author_engine_testset6.cpp
engines/author/test/src/test_pv_author_engine_testset7.cpp
engines/author/test/src/test_pv_author_engine_testset8.cpp
engines/author/test/src/test_pv_author_engine_typedefs.h
engines/player/src/pv_player_sdkinfo.h
nodes/common/Android.mk
nodes/common/build/make/local.mk
nodes/common/include/pv_video_encnode_extension.h [moved from nodes/common/include/pvmp4h263encextension.h with 93% similarity]
nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
nodes/pvomxencnode/src/pvmf_omx_enc_node.h

old mode 100644 (file)
new mode 100755 (executable)
index 3dd2904..011460f
--- a/ChangeLog
+++ b/ChangeLog
@@ -420,7 +420,7 @@ firewall packets to the server
 - 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
index b2c1bb0..ca9f66d 100644 (file)
@@ -1328,7 +1328,7 @@ void AuthorDriver::CommandCompleted(const PVCmdResponse& aResponse)
         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) {
index a2a2c67..ce9b10e 100644 (file)
@@ -59,7 +59,7 @@
 #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
index 6775d33..f12639b 100644 (file)
@@ -356,7 +356,7 @@ OMX_ERRORTYPE OmxComponentMpeg4EncAO::ConstructComponent(OMX_PTR pAppData, OMX_P
         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
     }
 
 
index 4d3fe8e..2c5bd1b 100644 (file)
@@ -44,7 +44,7 @@
 #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"
@@ -1863,7 +1863,7 @@ void CPV324m2Way::CheckConnect()
     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);
 
@@ -2419,7 +2419,7 @@ void CPV324m2Way::GenerateIFrame(PVMFPortInterface *aPort)
                 (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"));
@@ -5536,8 +5536,8 @@ PVMFStatus CPV324m2Way::ConfigureVideoEncoderNode()
         return PVMFFailure;
     }
 
-    PVMp4H263EncExtensionInterface *ptr =
-        (PVMp4H263EncExtensionInterface *) iVideoEncNodeInterface.iInterface;
+    PVVideoEncExtensionInterface *ptr =
+        (PVVideoEncExtensionInterface *) iVideoEncNodeInterface.iInterface;
 
     if (ptr)
     {
index a36d220..482fcde 100644 (file)
@@ -54,8 +54,8 @@
 #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
index 9e9cf3a..003a512 100644 (file)
@@ -21,7 +21,7 @@
 // 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
index 39cc394..1416354 100644 (file)
@@ -1,5 +1,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.
@@ -18,7 +18,7 @@
 
 #include "connect_test.h"
 #include "tsc_h324m_config_interface.h"
-#include "pvmp4h263encextension.h"
+#include "pv_video_encnode_extension.h"
 
 
 
@@ -64,7 +64,7 @@ void connect_test::InitSucceeded()
 void connect_test::EncoderIFSucceeded()
 {
     PVUuid mp4h263EncUuid = PVMp4H263EncExtensionUUID;
-    PVMp4H263EncExtensionInterface *ptr = (PVMp4H263EncExtensionInterface *) iMP4H263EncoderInterface;
+    PVVideoEncExtensionInterface *ptr = (PVVideoEncExtensionInterface *) iMP4H263EncoderInterface;
     if (ptr)
     {
         // Default frame rate is 5
index 486b53b..6bb8f9d 100644 (file)
@@ -1,5 +1,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.
@@ -17,8 +17,8 @@
  */
 #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
index afdd324..63d976c 100644 (file)
@@ -21,7 +21,7 @@
 // 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
index 2aa0e4e..ffc4698 100644 (file)
@@ -1,5 +1,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.
@@ -47,8 +47,8 @@
 #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"
index 92aba88..c041619 100644 (file)
@@ -1,5 +1,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.
@@ -31,8 +31,8 @@
 #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
@@ -857,8 +857,8 @@ bool pvauthor_async_test_miscellaneous::ConfigureVideoEncoder()
     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,
index 2fd067f..9717aee 100644 (file)
@@ -1,5 +1,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.
@@ -31,8 +31,8 @@
 #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
@@ -565,8 +565,8 @@ bool pvauthor_async_compressed_test_errorhandling::ConfigureVideoEncoder()
     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,
index 002c37e..4a47bf9 100644 (file)
@@ -1,5 +1,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.
@@ -31,8 +31,8 @@
 #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
@@ -574,8 +574,8 @@ bool pv_mediainput_async_test_opencomposestop::AddMediaTrack()
 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,
index 8273741..9d18fc9 100644 (file)
@@ -1,5 +1,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.
@@ -31,8 +31,8 @@
 #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
@@ -396,8 +396,8 @@ bool pv_mediainput_async_test_errorhandling::AddMediaTrack()
 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,
index 6aed9cf..f0855d0 100644 (file)
@@ -1,5 +1,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.
@@ -31,8 +31,8 @@
 #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
@@ -392,8 +392,8 @@ bool pv_mediainput_async_test_reset::AddMediaTrack()
 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,
index bc7ec8e..bdb429e 100644 (file)
@@ -1,5 +1,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.
@@ -31,8 +31,8 @@
 #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
@@ -392,8 +392,8 @@ bool pv_mediainput_async_test_delete::AddMediaTrack()
 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,
index 57d8b2a..af9677f 100644 (file)
@@ -1,5 +1,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.
@@ -87,8 +87,8 @@
 #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"
index dd7f930..95c993f 100644 (file)
@@ -21,7 +21,7 @@
 // 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
index 32d48a7..7555588 100644 (file)
@@ -44,7 +44,7 @@ LOCAL_COPY_HEADERS := \
        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
index a89b786..3c0d46f 100644 (file)
@@ -34,7 +34,7 @@ HDRS :=  pvmf_common_audio_decnode.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
@@ -1,5 +1,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.
  * -------------------------------------------------------------------
  */
 /**
- * @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"
@@ -62,7 +62,7 @@ typedef enum
 } PVMFVENRateControlType;
 
 ////////////////////////////////////////////////////////////////////////////
-class PVMp4H263EncExtensionInterface : public PVInterface
+class PVVideoEncExtensionInterface : public PVInterface
 {
     public:
         /** Increment reference counter for this interface. */
@@ -252,9 +252,18 @@ class PVMp4H263EncExtensionInterface : public PVInterface
          */
         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
 
 
 
index d877a4f..95012ca 100644 (file)
@@ -884,6 +884,7 @@ PVMFOMXEncNode::PVMFOMXEncNode(int32 aPriority) :
     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
@@ -2984,7 +2985,11 @@ bool PVMFOMXEncNode::SetH263EncoderParameters()
     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)
@@ -8296,7 +8301,7 @@ void PVMFOMXEncNode::DoQueryInterface(PVMFOMXEncNodeCommand&  aCmd)
     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);
 
@@ -8943,7 +8948,7 @@ OSCL_EXPORT_REF bool PVMFOMXEncNode::SetRVLC(bool aRVLC)
 }
 
 ////////////////////////////////////////////////////////////////////////////
-//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,
@@ -9202,7 +9207,7 @@ PVMFStatus PVMFOMXEncNode::SetCodecType(PVMFFormatType aCodec)
 }
 
 ////////////////////////////////////////////////////////////////////////////
-//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,
@@ -9281,6 +9286,30 @@ PVMFStatus PVMFOMXEncNode::SetInputFrameRate(OsclFloat aFrameRate)
 }
 
 ////////////////////////////////////////////////////////////////////////////
+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;
index 173e858..faba7ec 100644 (file)
@@ -81,8 +81,8 @@
 #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
@@ -649,6 +649,8 @@ typedef struct PV_VideoEncodeParam
     /** 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;
 
@@ -889,7 +891,7 @@ class PVMFOMXEncNode
         , public PVMFOMXEncNodeExtensionInterface
         , public PVMFMetadataExtensionInterface
         , public PvmiCapabilityAndConfigBase
-        , public PVMp4H263EncExtensionInterface
+        , public PVVideoEncExtensionInterface
         , public PVAudioEncExtensionInterface
 {
     public:
@@ -1002,7 +1004,7 @@ class PVMFOMXEncNode
         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);
@@ -1030,6 +1032,7 @@ class PVMFOMXEncNode
         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);