pvmf_event_handling.h: made IsA a constant method. Added missing virtual keyword.
pvmf_event_handling.cpp: new file where the bloated inline code should go.
Fixed compilation warnings: pvmf_omx_enc_node.cpp and pvmf_protocol_enging_node_download_common.cpp
Android.mk: added new .cpp file to the src list. Reordered using alphanumerical order the .cpp files.
diff --git a/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp b/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
index 7e55cc5..78f9e56 100644
--- a/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
+++ b/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
@@ -610,6 +610,8 @@
iMediaDataMemPool(NULL),
iOMXComponentOutputBufferSize(0),
iOutputAllocSize(0),
+ iNumOutstandingOutputBuffers(0),
+ iNumOutstandingInputBuffers(0),
iProcessingState(EPVMFOMXEncNodeProcessingState_Idle),
iOMXEncoder(NULL),
iSendBOS(false),
@@ -630,9 +632,7 @@
iResetInProgress(false),
iResetMsgSent(false),
iStopInResetMsgSent(false),
- iNumOutstandingOutputBuffers(0),
- iNumOutstandingInputBuffers(0)
- ,bIsQCOMOmxComp(false)
+ bIsQCOMOmxComp(false)
{
iInterfaceState = EPVMFNodeCreated;
diff --git a/nodes/pvprotocolenginenode/download_protocols/common/src/pvmf_protocol_engine_node_download_common.cpp b/nodes/pvprotocolenginenode/download_protocols/common/src/pvmf_protocol_engine_node_download_common.cpp
index a10c7fd..1910d3b 100644
--- a/nodes/pvprotocolenginenode/download_protocols/common/src/pvmf_protocol_engine_node_download_common.cpp
+++ b/nodes/pvprotocolenginenode/download_protocols/common/src/pvmf_protocol_engine_node_download_common.cpp
@@ -1236,8 +1236,8 @@
iProtocol(NULL),
iCfgFileContainer(NULL),
iNodeTimer(NULL),
- iNodeOutput(NULL),
- iInterfacingObjectContainer(NULL)
+ iInterfacingObjectContainer(NULL),
+ iNodeOutput(NULL)
{
clear();
}
@@ -1537,5 +1537,3 @@
}
return 0;
}
-
-
diff --git a/pvmi/pvmf/Android.mk b/pvmi/pvmf/Android.mk
index aba2321..ce60b5a 100644
--- a/pvmi/pvmf/Android.mk
+++ b/pvmi/pvmf/Android.mk
@@ -2,24 +2,25 @@
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
+ src/pvmf_basic_errorinfomessage.cpp \
+ src/pvmf_duration_infomessage.cpp \
+ src/pvmf_event_handling.cpp \
src/pvmf_format_type.cpp \
- src/pvmf_pool_buffer_allocator.cpp \
- src/pvmf_sync_util_data_queue.cpp \
+ src/pvmf_media_clock.cpp \
src/pvmf_media_cmd.cpp \
src/pvmf_media_data.cpp \
- src/pvmf_port_base_impl.cpp \
- src/pvmf_timestamp.cpp \
- src/pvmf_simple_media_buffer.cpp \
- src/pvmi_config_and_capability_utils.cpp \
- src/pvmf_node_interface.cpp \
- src/pvmf_sync_util.cpp \
- src/pvmf_basic_errorinfomessage.cpp \
- src/pvmi_kvp_util.cpp \
src/pvmf_mempool.cpp \
- src/pvmf_media_clock.cpp \
- src/pvmf_duration_infomessage.cpp \
src/pvmf_metadata_infomessage.cpp \
- src/pvmf_return_codes.cpp
+ src/pvmf_node_interface.cpp \
+ src/pvmf_pool_buffer_allocator.cpp \
+ src/pvmf_port_base_impl.cpp \
+ src/pvmf_return_codes.cpp \
+ src/pvmf_simple_media_buffer.cpp \
+ src/pvmf_sync_util.cpp \
+ src/pvmf_sync_util_data_queue.cpp \
+ src/pvmf_timestamp.cpp \
+ src/pvmi_config_and_capability_utils.cpp \
+ src/pvmi_kvp_util.cpp \
LOCAL_MODULE := libpvmf
@@ -30,7 +31,7 @@
LOCAL_STATIC_LIBRARIES := libosclbase
-LOCAL_SHARED_LIBRARIES :=
+LOCAL_SHARED_LIBRARIES :=
LOCAL_C_INCLUDES := \
$(PV_TOP)/pvmi/pvmf/src \
diff --git a/pvmi/pvmf/include/pvmf_event_handling.h b/pvmi/pvmf/include/pvmf_event_handling.h
index ed96505..efe5550 100644
--- a/pvmi/pvmf/include/pvmf_event_handling.h
+++ b/pvmi/pvmf/include/pvmf_event_handling.h
@@ -64,10 +64,11 @@
PVMFEventBase() {}
virtual ~PVMFEventBase() {};
+
/**
- What type of event is this ?
- **/
- virtual PVMFEventCategory IsA() = 0;
+ * @return the event's category.
+ */
+ virtual PVMFEventCategory IsA() const = 0;
};
/**
@@ -133,10 +134,7 @@
virtual ~PVMFCmdResp() {}
- PVMFEventCategory IsA()
- {
- return PVMFCmdRespEvent;
- }
+ virtual PVMFEventCategory IsA() const;
/**
* @return Returns the unique ID associated with a command of this type.
@@ -345,10 +343,7 @@
virtual ~PVMFAsyncEvent() {}
- PVMFEventCategory IsA()
- {
- return iEventCategory;
- }
+ virtual PVMFEventCategory IsA() const;
/**
* @return Returns the unique type identifier of the event.
@@ -428,9 +423,9 @@
/**
* @return Returns the local data asociated with the event.
+ * TODO: This is a const method returning a non const ref to some
+ * internal array.
*/
- // TODO: This is a const method returning a non const ref to some
- // internal array.
uint8* GetLocalBuffer() const
{
return (uint8*)iLocalBuffer;
diff --git a/pvmi/pvmf/src/pvmf_event_handling.cpp b/pvmi/pvmf/src/pvmf_event_handling.cpp
new file mode 100644
index 0000000..5b5b695
--- /dev/null
+++ b/pvmi/pvmf/src/pvmf_event_handling.cpp
@@ -0,0 +1,37 @@
+/*
+**
+** Copyright 2009, The Android Open Source Project
+**
+** 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 "pvmf_event_handling.h"
+
+// TODO: header file is bloated with inlined code. Move it here.
+
+// ----------------------------------------------------------------------
+// PVMFCmdResp
+
+PVMFEventCategory PVMFCmdResp::IsA() const
+{
+ return PVMFCmdRespEvent;
+}
+
+
+// ----------------------------------------------------------------------
+// PVMFAsyncEvent
+
+PVMFEventCategory PVMFAsyncEvent::IsA() const
+{
+ return iEventCategory;
+}