Whitespace/indentation changes only.
No code changes.
diff --git a/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_ext_interface.h b/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_ext_interface.h
index 2b0364a..9402706 100644
--- a/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_ext_interface.h
+++ b/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_ext_interface.h
@@ -50,81 +50,81 @@
///////////////////////////////////////////////////////////////////////////////
class PVMFJitterBufferExtensionInterface : public PVInterface
{
- public:
- OSCL_IMPORT_REF virtual void setRTCPIntervalInMicroSecs(uint32 aRTCPInterval) = 0; //Not used as of now
- OSCL_IMPORT_REF virtual bool setPortParams(PVMFPortInterface* aPort,
- uint32 aTimeScale,
- uint32 aBitRate,
- OsclRefCounterMemFrag& aConfig,
- bool aRateAdaptation = false,
- uint32 aRateAdaptationFeedBackFrequency = 0) = 0;
- OSCL_IMPORT_REF virtual bool setPlayRange(int32 aStartTimeInMS,//called when the start of the session controller completes
- int32 aStopTimeInMS,
- bool oPlayAfterASeek,
- bool aStopTimeAvailable = true) = 0;
- OSCL_IMPORT_REF virtual void setPlayBackThresholdInMilliSeconds(uint32 threshold) = 0; //Not used as of now [replace with wait for OOO timeout]
- OSCL_IMPORT_REF virtual void setJitterBufferRebufferingThresholdInMilliSeconds(uint32 aThreshold) = 0;
- OSCL_IMPORT_REF virtual void getJitterBufferRebufferingThresholdInMilliSeconds(uint32& aThreshold) = 0;
- OSCL_IMPORT_REF virtual void setJitterBufferDurationInMilliSeconds(uint32 duration) = 0;
- OSCL_IMPORT_REF virtual void getJitterBufferDurationInMilliSeconds(uint32& duration) = 0;
+ public:
+ OSCL_IMPORT_REF virtual void setRTCPIntervalInMicroSecs(uint32 aRTCPInterval) = 0; //Not used as of now
+ OSCL_IMPORT_REF virtual bool setPortParams(PVMFPortInterface* aPort,
+ uint32 aTimeScale,
+ uint32 aBitRate,
+ OsclRefCounterMemFrag& aConfig,
+ bool aRateAdaptation = false,
+ uint32 aRateAdaptationFeedBackFrequency = 0) = 0;
+ OSCL_IMPORT_REF virtual bool setPlayRange(int32 aStartTimeInMS,//called when the start of the session controller completes
+ int32 aStopTimeInMS,
+ bool oPlayAfterASeek,
+ bool aStopTimeAvailable = true) = 0;
+ OSCL_IMPORT_REF virtual void setPlayBackThresholdInMilliSeconds(uint32 threshold) = 0; //Not used as of now [replace with wait for OOO timeout]
+ OSCL_IMPORT_REF virtual void setJitterBufferRebufferingThresholdInMilliSeconds(uint32 aThreshold) = 0;
+ OSCL_IMPORT_REF virtual void getJitterBufferRebufferingThresholdInMilliSeconds(uint32& aThreshold) = 0;
+ OSCL_IMPORT_REF virtual void setJitterBufferDurationInMilliSeconds(uint32 duration) = 0;
+ OSCL_IMPORT_REF virtual void getJitterBufferDurationInMilliSeconds(uint32& duration) = 0;
- OSCL_IMPORT_REF virtual void setEarlyDecodingTimeInMilliSeconds(uint32 duration) = 0;
- OSCL_IMPORT_REF virtual void setBurstThreshold(float burstThreshold) = 0;
+ OSCL_IMPORT_REF virtual void setEarlyDecodingTimeInMilliSeconds(uint32 duration) = 0;
+ OSCL_IMPORT_REF virtual void setBurstThreshold(float burstThreshold) = 0;
- //While in buffering/start state, Jitter Buffer node expects its upstream peer node to send media msg at its input port in duration < inactivity duration
- OSCL_IMPORT_REF virtual void setMaxInactivityDurationForMediaInMs(uint32 duration) = 0;
- OSCL_IMPORT_REF virtual void getMaxInactivityDurationForMediaInMs(uint32& duration) = 0;
+ //While in buffering/start state, Jitter Buffer node expects its upstream peer node to send media msg at its input port in duration < inactivity duration
+ OSCL_IMPORT_REF virtual void setMaxInactivityDurationForMediaInMs(uint32 duration) = 0;
+ OSCL_IMPORT_REF virtual void getMaxInactivityDurationForMediaInMs(uint32& duration) = 0;
- OSCL_IMPORT_REF virtual void setClientPlayBackClock(PVMFMediaClock* clientClock) = 0;
- OSCL_IMPORT_REF virtual bool PrepareForRepositioning(bool oUseExpectedClientClockVal = false,
- uint32 aExpectedClientClockVal = 0) = 0; //called for RTSP based streaming only
- OSCL_IMPORT_REF virtual bool setPortSSRC(PVMFPortInterface* aPort, uint32 aSSRC) = 0;
- OSCL_IMPORT_REF virtual bool setPortRTPParams(PVMFPortInterface* aPort,
- bool aSeqNumBasePresent,
- uint32 aSeqNumBase,
- bool aRTPTimeBasePresent,
- uint32 aRTPTimeBase,
- bool aNPTTimeBasePresent,
- uint32 aNPTInMS,
- bool oPlayAfterASeek = false) = 0;
- OSCL_IMPORT_REF virtual bool setPortRTCPParams(PVMFPortInterface* aPort,
- int aNumSenders,
- uint32 aRR,
- uint32 aRS) = 0;
- OSCL_IMPORT_REF virtual PVMFTimestamp getActualMediaDataTSAfterSeek() = 0;
- OSCL_IMPORT_REF virtual PVMFTimestamp getMaxMediaDataTS() = 0;
- OSCL_IMPORT_REF virtual void addRef() = 0;
- OSCL_IMPORT_REF virtual void removeRef() = 0;
- OSCL_IMPORT_REF virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface) = 0;
- OSCL_IMPORT_REF virtual PVMFStatus setServerInfo(PVMFJitterBufferFireWallPacketInfo& aServerInfo) = 0;
- OSCL_IMPORT_REF virtual PVMFStatus NotifyOutOfBandEOS() = 0;
- OSCL_IMPORT_REF virtual PVMFStatus SendBOSMessage(uint32 aStramID) = 0;
+ OSCL_IMPORT_REF virtual void setClientPlayBackClock(PVMFMediaClock* clientClock) = 0;
+ OSCL_IMPORT_REF virtual bool PrepareForRepositioning(bool oUseExpectedClientClockVal = false,
+ uint32 aExpectedClientClockVal = 0) = 0; //called for RTSP based streaming only
+ OSCL_IMPORT_REF virtual bool setPortSSRC(PVMFPortInterface* aPort, uint32 aSSRC) = 0;
+ OSCL_IMPORT_REF virtual bool setPortRTPParams(PVMFPortInterface* aPort,
+ bool aSeqNumBasePresent,
+ uint32 aSeqNumBase,
+ bool aRTPTimeBasePresent,
+ uint32 aRTPTimeBase,
+ bool aNPTTimeBasePresent,
+ uint32 aNPTInMS,
+ bool oPlayAfterASeek = false) = 0;
+ OSCL_IMPORT_REF virtual bool setPortRTCPParams(PVMFPortInterface* aPort,
+ int aNumSenders,
+ uint32 aRR,
+ uint32 aRS) = 0;
+ OSCL_IMPORT_REF virtual PVMFTimestamp getActualMediaDataTSAfterSeek() = 0;
+ OSCL_IMPORT_REF virtual PVMFTimestamp getMaxMediaDataTS() = 0;
+ OSCL_IMPORT_REF virtual void addRef() = 0;
+ OSCL_IMPORT_REF virtual void removeRef() = 0;
+ OSCL_IMPORT_REF virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface) = 0;
+ OSCL_IMPORT_REF virtual PVMFStatus setServerInfo(PVMFJitterBufferFireWallPacketInfo& aServerInfo) = 0;
+ OSCL_IMPORT_REF virtual PVMFStatus NotifyOutOfBandEOS() = 0;
+ OSCL_IMPORT_REF virtual PVMFStatus SendBOSMessage(uint32 aStramID) = 0;
- OSCL_IMPORT_REF virtual void SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator* aDataBufferAllocator, const PVMFPortInterface* aPort) = 0;
+ OSCL_IMPORT_REF virtual void SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator* aDataBufferAllocator, const PVMFPortInterface* aPort) = 0;
- OSCL_IMPORT_REF virtual void SetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32 aSize, uint32 aResizeSize, uint32 aMaxNumResizes, uint32 aExpectedNumberOfBlocksPerBuffer) = 0;
- OSCL_IMPORT_REF virtual void GetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32& aSize, uint32& aResizeSize, uint32& aMaxNumResizes, uint32& aExpectedNumberOfBlocksPerBuffer) const = 0;
+ OSCL_IMPORT_REF virtual void SetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32 aSize, uint32 aResizeSize, uint32 aMaxNumResizes, uint32 aExpectedNumberOfBlocksPerBuffer) = 0;
+ OSCL_IMPORT_REF virtual void GetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32& aSize, uint32& aResizeSize, uint32& aMaxNumResizes, uint32& aExpectedNumberOfBlocksPerBuffer) const = 0;
- OSCL_IMPORT_REF virtual void SetSharedBufferResizeParams(uint32 maxNumResizes, uint32 resizeSize) = 0;
- OSCL_IMPORT_REF virtual void GetSharedBufferResizeParams(uint32& maxNumResizes, uint32& resizeSize) = 0;
+ OSCL_IMPORT_REF virtual void SetSharedBufferResizeParams(uint32 maxNumResizes, uint32 resizeSize) = 0;
+ OSCL_IMPORT_REF virtual void GetSharedBufferResizeParams(uint32& maxNumResizes, uint32& resizeSize) = 0;
- OSCL_IMPORT_REF virtual bool ClearJitterBuffer(PVMFPortInterface* aPort,
- uint32 aSeqNum) = 0;
- OSCL_IMPORT_REF virtual void FlushJitterBuffer() = 0;
+ OSCL_IMPORT_REF virtual bool ClearJitterBuffer(PVMFPortInterface* aPort,
+ uint32 aSeqNum) = 0;
+ OSCL_IMPORT_REF virtual void FlushJitterBuffer() = 0;
- OSCL_IMPORT_REF virtual bool NotifyAutoPauseComplete() = 0;
- OSCL_IMPORT_REF virtual bool NotifyAutoResumeComplete() = 0;
- OSCL_IMPORT_REF virtual PVMFStatus SetInputMediaHeaderPreParsed(PVMFPortInterface* aPort,
- bool aHeaderPreParsed) = 0;
- OSCL_IMPORT_REF virtual PVMFStatus HasSessionDurationExpired(bool& aExpired) = 0;
- OSCL_IMPORT_REF virtual bool PurgeElementsWithNPTLessThan(NptTimeFormat& aNPTTime) = 0;
+ OSCL_IMPORT_REF virtual bool NotifyAutoPauseComplete() = 0;
+ OSCL_IMPORT_REF virtual bool NotifyAutoResumeComplete() = 0;
+ OSCL_IMPORT_REF virtual PVMFStatus SetInputMediaHeaderPreParsed(PVMFPortInterface* aPort,
+ bool aHeaderPreParsed) = 0;
+ OSCL_IMPORT_REF virtual PVMFStatus HasSessionDurationExpired(bool& aExpired) = 0;
+ OSCL_IMPORT_REF virtual bool PurgeElementsWithNPTLessThan(NptTimeFormat& aNPTTime) = 0;
- OSCL_IMPORT_REF virtual void SetBroadCastSession() = 0;
- OSCL_IMPORT_REF virtual void DisableFireWallPackets() = 0;
- OSCL_IMPORT_REF virtual void UpdateJitterBufferState() = 0;
- OSCL_IMPORT_REF virtual void StartOutputPorts() = 0;
- OSCL_IMPORT_REF virtual void StopOutputPorts() = 0;
- OSCL_IMPORT_REF virtual bool PrepareForPlaylistSwitch() = 0;
+ OSCL_IMPORT_REF virtual void SetBroadCastSession() = 0;
+ OSCL_IMPORT_REF virtual void DisableFireWallPackets() = 0;
+ OSCL_IMPORT_REF virtual void UpdateJitterBufferState() = 0;
+ OSCL_IMPORT_REF virtual void StartOutputPorts() = 0;
+ OSCL_IMPORT_REF virtual void StopOutputPorts() = 0;
+ OSCL_IMPORT_REF virtual bool PrepareForPlaylistSwitch() = 0;
};
//Mimetype and Uuid for the extension interface
@@ -134,5 +134,3 @@
#define PVMF_JITTERBUFFERNODE_EXTENSIONINTERFACE_UUID PVUuid(0x440af38b,0xde8d,0x4d61,0xab,0x2a,0x84,0x11,0x07,0x3c,0x60,0x35)
#endif
-
-
diff --git a/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_internal.h b/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_internal.h
index 05a3d7a..09fe5aa 100644
--- a/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_internal.h
+++ b/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_internal.h
@@ -55,20 +55,20 @@
#define PVMF_JBNODE_LOG_EVENTS_CLOCK(m) PVLOGGER_LOGMSG(PVLOGMSG_INST_MLDBG,ipJBEventsClockLogger ,PVLOGMSG_INFO,m);
#define PVMF_JBNODE_LOG_RTCP_AVSYNC(m) PVLOGGER_LOGMSG(PVLOGMSG_INST_REL,ipRTCPAVSyncLogger,PVLOGMSG_INFO,m);
-#define PVMF_JITTER_BUFFER_NEW(auditCB,T,params,ptr)\
-{\
-ptr = OSCL_NEW(T,params);\
-}
+#define PVMF_JITTER_BUFFER_NEW(auditCB,T,params,ptr) \
+ { \
+ ptr = OSCL_NEW(T,params); \
+ }
-#define PVMF_JITTER_BUFFER_DELETE(auditCB,T,ptr)\
-{\
-OSCL_DELETE(ptr);\
-}
+#define PVMF_JITTER_BUFFER_DELETE(auditCB,T,ptr) \
+ { \
+ OSCL_DELETE(ptr); \
+ }
-#define PVMF_JITTER_BUFFER_TEMPLATED_DELETE(auditCB, T, Tsimple, ptr)\
-{\
-OSCL_DELETE(ptr);\
-}
+#define PVMF_JITTER_BUFFER_TEMPLATED_DELETE(auditCB, T, Tsimple, ptr) \
+ { \
+ OSCL_DELETE(ptr); \
+ }
//Default vector reserve size
#define PVMF_JITTER_BUFFER_VECTOR_RESERVE 10
@@ -83,26 +83,26 @@
class PVMFJitterBufferNodeCommand : public PVMFJitterBufferNodeCommandBase
{
- public:
- void Construct(PVMFSessionId s,
- int32 cmd,
- int32 arg1,
- int32 arg2,
- int32& arg3,
- const OsclAny*aContext)
- {
- PVMFJitterBufferNodeCommandBase::Construct(s, cmd, aContext);
- iParam1 = (OsclAny*)arg1;
- iParam2 = (OsclAny*)arg2;
- iParam3 = (OsclAny*) & arg3;
- };
+ public:
+ void Construct(PVMFSessionId s,
+ int32 cmd,
+ int32 arg1,
+ int32 arg2,
+ int32& arg3,
+ const OsclAny*aContext)
+ {
+ PVMFJitterBufferNodeCommandBase::Construct(s, cmd, aContext);
+ iParam1 = (OsclAny*)arg1;
+ iParam2 = (OsclAny*)arg2;
+ iParam3 = (OsclAny*) & arg3;
+ };
- void Parse(int32&arg1, int32&arg2, int32*&arg3)
- {
- arg1 = (int32)iParam1;
- arg2 = (int32)iParam2;
- arg3 = (int32*)iParam3;
- };
+ void Parse(int32&arg1, int32&arg2, int32*&arg3)
+ {
+ arg1 = (int32)iParam1;
+ arg2 = (int32)iParam2;
+ arg3 = (int32*)iParam3;
+ };
};
//Command queue type
@@ -122,124 +122,122 @@
class PVMFJitterBufferNode;
class PVMFJitterBufferExtensionInterfaceImpl :
- public PVInterfaceImpl<OsclMemAllocator>,
- public PVMFJitterBufferExtensionInterface
+ public PVInterfaceImpl<OsclMemAllocator>,
+ public PVMFJitterBufferExtensionInterface
{
- public:
- PVMFJitterBufferExtensionInterfaceImpl(PVMFJitterBufferNode*);
- ~PVMFJitterBufferExtensionInterfaceImpl();
+ public:
+ PVMFJitterBufferExtensionInterfaceImpl(PVMFJitterBufferNode*);
+ ~PVMFJitterBufferExtensionInterfaceImpl();
- OSCL_IMPORT_REF void setRTCPIntervalInMicroSecs(uint32 aRTCPInterval);
+ OSCL_IMPORT_REF void setRTCPIntervalInMicroSecs(uint32 aRTCPInterval);
- OSCL_IMPORT_REF bool setPortParams(PVMFPortInterface* aPort,
- uint32 aTimeScale,
- uint32 aBitRate,
- OsclRefCounterMemFrag& aConfig,
- bool aRateAdaptation = false,
- uint32 aRateAdaptationFeedBackFrequency = 0);
+ OSCL_IMPORT_REF bool setPortParams(PVMFPortInterface* aPort,
+ uint32 aTimeScale,
+ uint32 aBitRate,
+ OsclRefCounterMemFrag& aConfig,
+ bool aRateAdaptation = false,
+ uint32 aRateAdaptationFeedBackFrequency = 0);
- OSCL_IMPORT_REF bool setPlayRange(int32 aStartTimeInMS,
- int32 aStopTimeInMS,
- bool oPlayAfterASeek,
- bool aStopTimeAvailable = true);
+ OSCL_IMPORT_REF bool setPlayRange(int32 aStartTimeInMS,
+ int32 aStopTimeInMS,
+ bool oPlayAfterASeek,
+ bool aStopTimeAvailable = true);
- OSCL_IMPORT_REF void setPlayBackThresholdInMilliSeconds(uint32 threshold);
+ OSCL_IMPORT_REF void setPlayBackThresholdInMilliSeconds(uint32 threshold);
- OSCL_IMPORT_REF void setJitterBufferRebufferingThresholdInMilliSeconds(uint32 aThreshold);
- OSCL_IMPORT_REF void getJitterBufferRebufferingThresholdInMilliSeconds(uint32& aThreshold);
- OSCL_IMPORT_REF void setJitterBufferDurationInMilliSeconds(uint32 duration);
- OSCL_IMPORT_REF void getJitterBufferDurationInMilliSeconds(uint32& duration);
+ OSCL_IMPORT_REF void setJitterBufferRebufferingThresholdInMilliSeconds(uint32 aThreshold);
+ OSCL_IMPORT_REF void getJitterBufferRebufferingThresholdInMilliSeconds(uint32& aThreshold);
+ OSCL_IMPORT_REF void setJitterBufferDurationInMilliSeconds(uint32 duration);
+ OSCL_IMPORT_REF void getJitterBufferDurationInMilliSeconds(uint32& duration);
- OSCL_IMPORT_REF void setEarlyDecodingTimeInMilliSeconds(uint32 duration);
- OSCL_IMPORT_REF void setBurstThreshold(float burstThreshold);
+ OSCL_IMPORT_REF void setEarlyDecodingTimeInMilliSeconds(uint32 duration);
+ OSCL_IMPORT_REF void setBurstThreshold(float burstThreshold);
- OSCL_IMPORT_REF void setClientPlayBackClock(PVMFMediaClock* clientClock);
- OSCL_IMPORT_REF void setMaxInactivityDurationForMediaInMs(uint32 duration);
- OSCL_IMPORT_REF void getMaxInactivityDurationForMediaInMs(uint32& duration);
+ OSCL_IMPORT_REF void setClientPlayBackClock(PVMFMediaClock* clientClock);
+ OSCL_IMPORT_REF void setMaxInactivityDurationForMediaInMs(uint32 duration);
+ OSCL_IMPORT_REF void getMaxInactivityDurationForMediaInMs(uint32& duration);
- OSCL_IMPORT_REF bool PrepareForRepositioning(bool oUseExpectedClientClockVal = false,
- uint32 aExpectedClientClockVal = 0);
+ OSCL_IMPORT_REF bool PrepareForRepositioning(bool oUseExpectedClientClockVal = false,
+ uint32 aExpectedClientClockVal = 0);
- OSCL_IMPORT_REF bool setPortSSRC(PVMFPortInterface* aPort, uint32 aSSRC);
+ OSCL_IMPORT_REF bool setPortSSRC(PVMFPortInterface* aPort, uint32 aSSRC);
- OSCL_IMPORT_REF bool setPortRTPParams(PVMFPortInterface* aPort,
- bool aSeqNumBasePresent,
- uint32 aSeqNumBase,
- bool aRTPTimeBasePresent,
- uint32 aRTPTimeBase,
- bool aNPTTimeBasePresent,
- uint32 aNPTInMS,
- bool oPlayAfterASeek = false);
+ OSCL_IMPORT_REF bool setPortRTPParams(PVMFPortInterface* aPort,
+ bool aSeqNumBasePresent,
+ uint32 aSeqNumBase,
+ bool aRTPTimeBasePresent,
+ uint32 aRTPTimeBase,
+ bool aNPTTimeBasePresent,
+ uint32 aNPTInMS,
+ bool oPlayAfterASeek = false);
- OSCL_IMPORT_REF bool setPortRTCPParams(PVMFPortInterface* aPort,
- int aNumSenders,
- uint32 aRR,
- uint32 aRS);
+ OSCL_IMPORT_REF bool setPortRTCPParams(PVMFPortInterface* aPort,
+ int aNumSenders,
+ uint32 aRR,
+ uint32 aRS);
- OSCL_IMPORT_REF PVMFTimestamp getActualMediaDataTSAfterSeek();
- OSCL_IMPORT_REF PVMFTimestamp getMaxMediaDataTS();
+ OSCL_IMPORT_REF PVMFTimestamp getActualMediaDataTSAfterSeek();
+ OSCL_IMPORT_REF PVMFTimestamp getMaxMediaDataTS();
- void addRef()
+ void addRef()
+ {
+ PVInterfaceImpl<OsclMemAllocator>::addRef();
+ }
+ void removeRef()
+ {
+ PVInterfaceImpl<OsclMemAllocator>::removeRef();
+ }
+ bool queryInterface(const PVUuid& uuid, PVInterface*& iface)
+ {
+ if (uuid == Uuid())
{
- PVInterfaceImpl<OsclMemAllocator>::addRef();
+ addRef();
+ iface = this;
+ return true;
}
- void removeRef()
+ else
{
- PVInterfaceImpl<OsclMemAllocator>::removeRef();
+ iface = NULL;
+ return false;
}
- bool queryInterface(const PVUuid& uuid, PVInterface*& iface)
- {
- if (uuid == Uuid())
- {
- addRef();
- iface = this;
- return true;
- }
- else
- {
- iface = NULL;
- return false;
- }
- }
+ }
- OSCL_IMPORT_REF PVMFStatus setServerInfo(PVMFJitterBufferFireWallPacketInfo& aServerInfo);
+ OSCL_IMPORT_REF PVMFStatus setServerInfo(PVMFJitterBufferFireWallPacketInfo& aServerInfo);
- OSCL_IMPORT_REF PVMFStatus NotifyOutOfBandEOS();
- OSCL_IMPORT_REF PVMFStatus SendBOSMessage(uint32 aStramID);
+ OSCL_IMPORT_REF PVMFStatus NotifyOutOfBandEOS();
+ OSCL_IMPORT_REF PVMFStatus SendBOSMessage(uint32 aStramID);
- OSCL_IMPORT_REF void SetSharedBufferResizeParams(uint32 maxNumResizes, uint32 resizeSize);
- OSCL_IMPORT_REF void GetSharedBufferResizeParams(uint32& maxNumResizes, uint32& resizeSize);
+ OSCL_IMPORT_REF void SetSharedBufferResizeParams(uint32 maxNumResizes, uint32 resizeSize);
+ OSCL_IMPORT_REF void GetSharedBufferResizeParams(uint32& maxNumResizes, uint32& resizeSize);
- OSCL_IMPORT_REF bool ClearJitterBuffer(PVMFPortInterface* aPort, uint32 aSeqNum);
- OSCL_IMPORT_REF void FlushJitterBuffer();
+ OSCL_IMPORT_REF bool ClearJitterBuffer(PVMFPortInterface* aPort, uint32 aSeqNum);
+ OSCL_IMPORT_REF void FlushJitterBuffer();
- OSCL_IMPORT_REF bool NotifyAutoPauseComplete();
+ OSCL_IMPORT_REF bool NotifyAutoPauseComplete();
- OSCL_IMPORT_REF bool NotifyAutoResumeComplete();
+ OSCL_IMPORT_REF bool NotifyAutoResumeComplete();
- OSCL_IMPORT_REF PVMFStatus SetInputMediaHeaderPreParsed(PVMFPortInterface* aPort,
- bool aHeaderPreParsed);
+ OSCL_IMPORT_REF PVMFStatus SetInputMediaHeaderPreParsed(PVMFPortInterface* aPort,
+ bool aHeaderPreParsed);
- OSCL_IMPORT_REF PVMFStatus HasSessionDurationExpired(bool& aExpired);
- OSCL_IMPORT_REF bool PurgeElementsWithNPTLessThan(NptTimeFormat &aNPTTime);
+ OSCL_IMPORT_REF PVMFStatus HasSessionDurationExpired(bool& aExpired);
+ OSCL_IMPORT_REF bool PurgeElementsWithNPTLessThan(NptTimeFormat &aNPTTime);
- OSCL_IMPORT_REF void SetBroadCastSession();
- OSCL_IMPORT_REF void DisableFireWallPackets();
+ OSCL_IMPORT_REF void SetBroadCastSession();
+ OSCL_IMPORT_REF void DisableFireWallPackets();
- OSCL_IMPORT_REF void StartOutputPorts();
- OSCL_IMPORT_REF void StopOutputPorts();
- OSCL_IMPORT_REF void UpdateJitterBufferState();
- OSCL_IMPORT_REF virtual void SetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32 aSize, uint32 aResizeSize, uint32 aMaxNumResizes, uint32 aExpectedNumberOfBlocksPerBuffer);
- OSCL_IMPORT_REF virtual void GetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32& aSize, uint32& aResizeSize, uint32& aMaxNumResizes, uint32& aExpectedNumberOfBlocksPerBuffer) const;
- OSCL_IMPORT_REF void SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator* aDataBufferAllocator, const PVMFPortInterface* aPort);
- OSCL_IMPORT_REF virtual bool PrepareForPlaylistSwitch();
+ OSCL_IMPORT_REF void StartOutputPorts();
+ OSCL_IMPORT_REF void StopOutputPorts();
+ OSCL_IMPORT_REF void UpdateJitterBufferState();
+ OSCL_IMPORT_REF virtual void SetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32 aSize, uint32 aResizeSize, uint32 aMaxNumResizes, uint32 aExpectedNumberOfBlocksPerBuffer);
+ OSCL_IMPORT_REF virtual void GetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32& aSize, uint32& aResizeSize, uint32& aMaxNumResizes, uint32& aExpectedNumberOfBlocksPerBuffer) const;
+ OSCL_IMPORT_REF void SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator* aDataBufferAllocator, const PVMFPortInterface* aPort);
+ OSCL_IMPORT_REF virtual bool PrepareForPlaylistSwitch();
- private:
- PVMFJitterBufferNode *iContainer;
- friend class PVMFJitterBufferNode;
+ private:
+ PVMFJitterBufferNode *iContainer;
+ friend class PVMFJitterBufferNode;
};
#endif
-
-
diff --git a/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_node.h b/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_node.h
index 1b1fa65..b4092ce 100644
--- a/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_node.h
+++ b/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_node.h
@@ -97,440 +97,440 @@
class JitterBufferFactory;
class PVMFJitterBufferNode : public PVInterface,
- public PVMFNodeInterface,
- public OsclActiveObject,
- public PVMFJitterBufferObserver,
- public PVMFJitterBufferMiscObserver,
- public PVMFJBEventNotifierObserver,
- public PVMFMediaClockStateObserver
+ public PVMFNodeInterface,
+ public OsclActiveObject,
+ public PVMFJitterBufferObserver,
+ public PVMFJitterBufferMiscObserver,
+ public PVMFJBEventNotifierObserver,
+ public PVMFMediaClockStateObserver
{
- public:
- OSCL_IMPORT_REF PVMFJitterBufferNode(int32 aPriority, JitterBufferFactory* aJBFactory); //may be provide static func for creation and make the ctor private
- OSCL_IMPORT_REF virtual ~PVMFJitterBufferNode();
+ public:
+ OSCL_IMPORT_REF PVMFJitterBufferNode(int32 aPriority, JitterBufferFactory* aJBFactory); //may be provide static func for creation and make the ctor private
+ OSCL_IMPORT_REF virtual ~PVMFJitterBufferNode();
- //Overrides from PVInterface
- virtual void addRef()
- {
- }
- virtual void removeRef()
- {
- }
- virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface);
+ //Overrides from PVInterface
+ virtual void addRef()
+ {
+ }
+ virtual void removeRef()
+ {
+ }
+ virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface);
- //Overrides from PVMFNodeInterface
- OSCL_IMPORT_REF PVMFStatus ThreadLogon();
- OSCL_IMPORT_REF PVMFStatus ThreadLogoff();
- OSCL_IMPORT_REF PVMFStatus GetCapability(PVMFNodeCapability& aNodeCapability);
- OSCL_IMPORT_REF PVMFPortIter* GetPorts(const PVMFPortFilter* aFilter = NULL);
- OSCL_IMPORT_REF PVMFCommandId QueryUUID(PVMFSessionId,
- const PvmfMimeString& aMimeType,
- Oscl_Vector< PVUuid, OsclMemAllocator >& aUuids,
- bool aExactUuidsOnly = false,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId QueryInterface(PVMFSessionId,
- const PVUuid& aUuid,
- PVInterface*& aInterfacePtr,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId RequestPort(PVMFSessionId,
- int32 aPortTag,
- const PvmfMimeString* aPortConfig = NULL,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId ReleasePort(PVMFSessionId,
- PVMFPortInterface& aPort,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId Init(PVMFSessionId,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId Prepare(PVMFSessionId aSession,
+ //Overrides from PVMFNodeInterface
+ OSCL_IMPORT_REF PVMFStatus ThreadLogon();
+ OSCL_IMPORT_REF PVMFStatus ThreadLogoff();
+ OSCL_IMPORT_REF PVMFStatus GetCapability(PVMFNodeCapability& aNodeCapability);
+ OSCL_IMPORT_REF PVMFPortIter* GetPorts(const PVMFPortFilter* aFilter = NULL);
+ OSCL_IMPORT_REF PVMFCommandId QueryUUID(PVMFSessionId,
+ const PvmfMimeString& aMimeType,
+ Oscl_Vector< PVUuid, OsclMemAllocator >& aUuids,
+ bool aExactUuidsOnly = false,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId QueryInterface(PVMFSessionId,
+ const PVUuid& aUuid,
+ PVInterface*& aInterfacePtr,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId RequestPort(PVMFSessionId,
+ int32 aPortTag,
+ const PvmfMimeString* aPortConfig = NULL,
const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId Start(PVMFSessionId,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId Stop(PVMFSessionId,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId Flush(PVMFSessionId,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId Pause(PVMFSessionId,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId Reset(PVMFSessionId,
- const OsclAny* aContext = NULL);
- OSCL_IMPORT_REF PVMFCommandId CancelAllCommands(PVMFSessionId,
- const OsclAny* aContextData = NULL);
- OSCL_IMPORT_REF PVMFCommandId CancelCommand(PVMFSessionId,
- PVMFCommandId aCmdId,
- const OsclAny* aContextData = NULL);
- void HandlePortActivity(const PVMFPortActivity& aActivity); //from PVMFPortActivityHandler
+ OSCL_IMPORT_REF PVMFCommandId ReleasePort(PVMFSessionId,
+ PVMFPortInterface& aPort,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId Init(PVMFSessionId,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId Prepare(PVMFSessionId aSession,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId Start(PVMFSessionId,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId Stop(PVMFSessionId,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId Flush(PVMFSessionId,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId Pause(PVMFSessionId,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId Reset(PVMFSessionId,
+ const OsclAny* aContext = NULL);
+ OSCL_IMPORT_REF PVMFCommandId CancelAllCommands(PVMFSessionId,
+ const OsclAny* aContextData = NULL);
+ OSCL_IMPORT_REF PVMFCommandId CancelCommand(PVMFSessionId,
+ PVMFCommandId aCmdId,
+ const OsclAny* aContextData = NULL);
+ void HandlePortActivity(const PVMFPortActivity& aActivity); //from PVMFPortActivityHandler
- //Overrides from PVMFJitterBufferObserver
- virtual void JitterBufferFreeSpaceAvailable(OsclAny* aContext);
- virtual void ProcessJBInfoEvent(PVMFAsyncEvent& aEvent);
- virtual void PacketReadyToBeRetrieved(OsclAny* aContext);
- virtual void EndOfStreamSignalled(OsclAny* aContext);
+ //Overrides from PVMFJitterBufferObserver
+ virtual void JitterBufferFreeSpaceAvailable(OsclAny* aContext);
+ virtual void ProcessJBInfoEvent(PVMFAsyncEvent& aEvent);
+ virtual void PacketReadyToBeRetrieved(OsclAny* aContext);
+ virtual void EndOfStreamSignalled(OsclAny* aContext);
- //PVMFJitterBufferMiscObserver
- virtual void MessageReadyToSend(PVMFPortInterface*& aPort, PVMFSharedMediaMsgPtr& aMessage);
- virtual void MediaReceivingChannelPrepared(bool aStatus);
- virtual void ProcessRTCPControllerEvent(PVMFAsyncEvent& aEvent);
- virtual void SessionSessionExpired();
+ //PVMFJitterBufferMiscObserver
+ virtual void MessageReadyToSend(PVMFPortInterface*& aPort, PVMFSharedMediaMsgPtr& aMessage);
+ virtual void MediaReceivingChannelPrepared(bool aStatus);
+ virtual void ProcessRTCPControllerEvent(PVMFAsyncEvent& aEvent);
+ virtual void SessionSessionExpired();
- //Overrides from PVMFJBEventNotifierObserver
- virtual void ProcessCallback(CLOCK_NOTIFICATION_INTF_TYPE aClockNotificationInterfaceType, uint32 aCallBkId, const OsclAny* aContext, PVMFStatus aStatus);
+ //Overrides from PVMFJBEventNotifierObserver
+ virtual void ProcessCallback(CLOCK_NOTIFICATION_INTF_TYPE aClockNotificationInterfaceType, uint32 aCallBkId, const OsclAny* aContext, PVMFStatus aStatus);
- //Override from PVMFMediaClockStateObserver
- virtual void ClockStateUpdated();
- virtual void NotificationsInterfaceDestroyed();
+ //Override from PVMFMediaClockStateObserver
+ virtual void ClockStateUpdated();
+ virtual void NotificationsInterfaceDestroyed();
- private:
- //Overrides from OsclActiveObject
- void Run();
- void DoCancel();
+ private:
+ //Overrides from OsclActiveObject
+ void Run();
+ void DoCancel();
- //Extension interface functions implemented in Node
- virtual void SetRTCPIntervalInMicroSecs(uint32 aRTCPInterval); //Not used as of now
- virtual bool SetPortParams(PVMFPortInterface* aPort,
- uint32 aTimeScale,
- uint32 aBitRate,
- OsclRefCounterMemFrag& aConfig,
- bool aRateAdaptation = false,
- uint32 aRateAdaptationFeedBackFrequency = 0);
- virtual bool SetPlayRange(int32 aStartTimeInMS,
- int32 aStopTimeInMS,
- bool oPlayAfterASeek,
- bool aStopTimeAvailable = true);
- virtual void SetPlayBackThresholdInMilliSeconds(uint32 threshold); //Not used as of now [replace with wait for OOO timeout]
- virtual void SetJitterBufferRebufferingThresholdInMilliSeconds(uint32 aThreshold);
- virtual void GetJitterBufferRebufferingThresholdInMilliSeconds(uint32& aThreshold);
- virtual void SetJitterBufferDurationInMilliSeconds(uint32 duration);
- virtual void GetJitterBufferDurationInMilliSeconds(uint32& duration);
- virtual void SetEarlyDecodingTimeInMilliSeconds(uint32 duration);
- virtual void SetBurstThreshold(float burstThreshold);
- //While in buffering/start state, Jitter Buffer node expects its upstream peer node to send media msg at its input port in duration < inactivity duration
- virtual void SetMaxInactivityDurationForMediaInMs(uint32 duration);
- virtual void GetMaxInactivityDurationForMediaInMs(uint32& duration);
+ //Extension interface functions implemented in Node
+ virtual void SetRTCPIntervalInMicroSecs(uint32 aRTCPInterval); //Not used as of now
+ virtual bool SetPortParams(PVMFPortInterface* aPort,
+ uint32 aTimeScale,
+ uint32 aBitRate,
+ OsclRefCounterMemFrag& aConfig,
+ bool aRateAdaptation = false,
+ uint32 aRateAdaptationFeedBackFrequency = 0);
+ virtual bool SetPlayRange(int32 aStartTimeInMS,
+ int32 aStopTimeInMS,
+ bool oPlayAfterASeek,
+ bool aStopTimeAvailable = true);
+ virtual void SetPlayBackThresholdInMilliSeconds(uint32 threshold); //Not used as of now [replace with wait for OOO timeout]
+ virtual void SetJitterBufferRebufferingThresholdInMilliSeconds(uint32 aThreshold);
+ virtual void GetJitterBufferRebufferingThresholdInMilliSeconds(uint32& aThreshold);
+ virtual void SetJitterBufferDurationInMilliSeconds(uint32 duration);
+ virtual void GetJitterBufferDurationInMilliSeconds(uint32& duration);
+ virtual void SetEarlyDecodingTimeInMilliSeconds(uint32 duration);
+ virtual void SetBurstThreshold(float burstThreshold);
+ //While in buffering/start state, Jitter Buffer node expects its upstream peer node to send media msg at its input port in duration < inactivity duration
+ virtual void SetMaxInactivityDurationForMediaInMs(uint32 duration);
+ virtual void GetMaxInactivityDurationForMediaInMs(uint32& duration);
- virtual void SetClientPlayBackClock(PVMFMediaClock* clientClock);
- virtual bool PrepareForRepositioning(bool oUseExpectedClientClockVal = false,
- uint32 aExpectedClientClockVal = 0); //called for RTSP based streaming only
- virtual bool SetPortSSRC(PVMFPortInterface* aPort, uint32 aSSRC);
- virtual bool SetPortRTPParams(PVMFPortInterface* aPort,
- bool aSeqNumBasePresent,
- uint32 aSeqNumBase,
- bool aRTPTimeBasePresent,
- uint32 aRTPTimeBase,
- bool aNPTTimeBasePresent,
- uint32 aNPTInMS,
- bool oPlayAfterASeek = false);
- virtual bool SetPortRTCPParams(PVMFPortInterface* aPort,
- int aNumSenders,
- uint32 aRR,
- uint32 aRS);
- virtual PVMFTimestamp GetActualMediaDataTSAfterSeek();
- virtual PVMFTimestamp GetMaxMediaDataTS();
+ virtual void SetClientPlayBackClock(PVMFMediaClock* clientClock);
+ virtual bool PrepareForRepositioning(bool oUseExpectedClientClockVal = false,
+ uint32 aExpectedClientClockVal = 0); //called for RTSP based streaming only
+ virtual bool SetPortSSRC(PVMFPortInterface* aPort, uint32 aSSRC);
+ virtual bool SetPortRTPParams(PVMFPortInterface* aPort,
+ bool aSeqNumBasePresent,
+ uint32 aSeqNumBase,
+ bool aRTPTimeBasePresent,
+ uint32 aRTPTimeBase,
+ bool aNPTTimeBasePresent,
+ uint32 aNPTInMS,
+ bool oPlayAfterASeek = false);
+ virtual bool SetPortRTCPParams(PVMFPortInterface* aPort,
+ int aNumSenders,
+ uint32 aRR,
+ uint32 aRS);
+ virtual PVMFTimestamp GetActualMediaDataTSAfterSeek();
+ virtual PVMFTimestamp GetMaxMediaDataTS();
- virtual PVMFStatus SetServerInfo(PVMFJitterBufferFireWallPacketInfo& aServerInfo);
- virtual PVMFStatus NotifyOutOfBandEOS();
- virtual PVMFStatus SendBOSMessage(uint32 aStramID);
+ virtual PVMFStatus SetServerInfo(PVMFJitterBufferFireWallPacketInfo& aServerInfo);
+ virtual PVMFStatus NotifyOutOfBandEOS();
+ virtual PVMFStatus SendBOSMessage(uint32 aStramID);
- virtual void SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator* aDataBufferAllocator, const PVMFPortInterface* aPort);
+ virtual void SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator* aDataBufferAllocator, const PVMFPortInterface* aPort);
- virtual void SetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32 aSize, uint32 aResizeSize, uint32 aMaxNumResizes, uint32 aExpectedNumberOfBlocksPerBuffer);
- virtual void GetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32& aSize, uint32& aResizeSize, uint32& aMaxNumResizes, uint32& aExpectedNumberOfBlocksPerBuffer) const ;
+ virtual void SetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32 aSize, uint32 aResizeSize, uint32 aMaxNumResizes, uint32 aExpectedNumberOfBlocksPerBuffer);
+ virtual void GetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort, uint32& aSize, uint32& aResizeSize, uint32& aMaxNumResizes, uint32& aExpectedNumberOfBlocksPerBuffer) const ;
- virtual void SetSharedBufferResizeParams(uint32 maxNumResizes, uint32 resizeSize);
- virtual void GetSharedBufferResizeParams(uint32& maxNumResizes, uint32& resizeSize);
+ virtual void SetSharedBufferResizeParams(uint32 maxNumResizes, uint32 resizeSize);
+ virtual void GetSharedBufferResizeParams(uint32& maxNumResizes, uint32& resizeSize);
- virtual bool ClearJitterBuffer(PVMFPortInterface* aPort,
- uint32 aSeqNum);
- virtual void FlushJitterBuffer();
+ virtual bool ClearJitterBuffer(PVMFPortInterface* aPort,
+ uint32 aSeqNum);
+ virtual void FlushJitterBuffer();
- virtual PVMFStatus SetInputMediaHeaderPreParsed(PVMFPortInterface* aPort,
- bool aHeaderPreParsed);
+ virtual PVMFStatus SetInputMediaHeaderPreParsed(PVMFPortInterface* aPort,
+ bool aHeaderPreParsed);
- virtual PVMFStatus HasSessionDurationExpired(bool& aExpired);
- virtual bool PurgeElementsWithNPTLessThan(NptTimeFormat& aNPTTime);
+ virtual PVMFStatus HasSessionDurationExpired(bool& aExpired);
+ virtual bool PurgeElementsWithNPTLessThan(NptTimeFormat& aNPTTime);
- virtual void SetBroadCastSession();
- virtual void DisableFireWallPackets();
- virtual void UpdateJitterBufferState();
- virtual void StartOutputPorts();
- virtual void StopOutputPorts();
+ virtual void SetBroadCastSession();
+ virtual void DisableFireWallPackets();
+ virtual void UpdateJitterBufferState();
+ virtual void StartOutputPorts();
+ virtual void StopOutputPorts();
- bool SetPortParams(PVMFPortInterface* aPort,
- uint32 aTimeScale,
- uint32 aBitRate,
- OsclRefCounterMemFrag& aConfig,
- bool aRateAdaptation,
- uint32 aRateAdaptationFeedBackFrequency,
- uint aMaxNumBuffResizes, uint aBuffResizeSize);
- bool SetPortParams(PVMFPortInterface* aPort,
- uint32 aTimeScale,
- uint32 aBitRate,
- OsclRefCounterMemFrag& aConfig,
- bool aRateAdaptation,
- uint32 aRateAdaptationFeedBackFrequency,
- bool aUserSpecifiedBuffParams,
- uint aMaxNumBuffResizes = 0, uint aBuffResizeSize = 0);
- bool PrepareForPlaylistSwitch();
+ bool SetPortParams(PVMFPortInterface* aPort,
+ uint32 aTimeScale,
+ uint32 aBitRate,
+ OsclRefCounterMemFrag& aConfig,
+ bool aRateAdaptation,
+ uint32 aRateAdaptationFeedBackFrequency,
+ uint aMaxNumBuffResizes, uint aBuffResizeSize);
+ bool SetPortParams(PVMFPortInterface* aPort,
+ uint32 aTimeScale,
+ uint32 aBitRate,
+ OsclRefCounterMemFrag& aConfig,
+ bool aRateAdaptation,
+ uint32 aRateAdaptationFeedBackFrequency,
+ bool aUserSpecifiedBuffParams,
+ uint aMaxNumBuffResizes = 0, uint aBuffResizeSize = 0);
+ bool PrepareForPlaylistSwitch();
- //Async command handling functions
- void DoQueryUuid(PVMFJitterBufferNodeCommand&);
- void DoQueryInterface(PVMFJitterBufferNodeCommand&);
- void DoRequestPort(PVMFJitterBufferNodeCommand&);
- void DoReleasePort(PVMFJitterBufferNodeCommand&);
- void DoInit(PVMFJitterBufferNodeCommand&);
- void DoPrepare(PVMFJitterBufferNodeCommand& aCmd);
- void CompletePrepare();
- void CancelPrepare();
- void DoStart(PVMFJitterBufferNodeCommand&);
- void CompleteStart();
- void CancelStart();
+ //Async command handling functions
+ void DoQueryUuid(PVMFJitterBufferNodeCommand&);
+ void DoQueryInterface(PVMFJitterBufferNodeCommand&);
+ void DoRequestPort(PVMFJitterBufferNodeCommand&);
+ void DoReleasePort(PVMFJitterBufferNodeCommand&);
+ void DoInit(PVMFJitterBufferNodeCommand&);
+ void DoPrepare(PVMFJitterBufferNodeCommand& aCmd);
+ void CompletePrepare();
+ void CancelPrepare();
+ void DoStart(PVMFJitterBufferNodeCommand&);
+ void CompleteStart();
+ void CancelStart();
- //Utility functions
- void Construct();
- void ResetNodeParams(bool aReleaseMemory = true);
- bool ProcessPortActivity(PVMFJitterBufferPortParams*);
- PVMFStatus ProcessIncomingMsg(PVMFJitterBufferPortParams*);
- PVMFStatus ProcessOutgoingMsg(PVMFJitterBufferPortParams*);
- void QueuePortActivity(PVMFJitterBufferPortParams*,
- const PVMFPortActivity&);
- bool CheckForPortRescheduling();
- bool CheckForPortActivityQueues();
+ //Utility functions
+ void Construct();
+ void ResetNodeParams(bool aReleaseMemory = true);
+ bool ProcessPortActivity(PVMFJitterBufferPortParams*);
+ PVMFStatus ProcessIncomingMsg(PVMFJitterBufferPortParams*);
+ PVMFStatus ProcessOutgoingMsg(PVMFJitterBufferPortParams*);
+ void QueuePortActivity(PVMFJitterBufferPortParams*,
+ const PVMFPortActivity&);
+ bool CheckForPortRescheduling();
+ bool CheckForPortActivityQueues();
- bool getPortContainer(PVMFPortInterface* aPort,
- PVMFJitterBufferPortParams*& aPortParams);
+ bool getPortContainer(PVMFPortInterface* aPort,
+ PVMFJitterBufferPortParams*& aPortParams);
- PVMFCommandId QueueCommandL(PVMFJitterBufferNodeCommand&);
- void MoveCmdToCurrentQueue(PVMFJitterBufferNodeCommand& aCmd);
- bool ProcessCommand(PVMFJitterBufferNodeCommand&);
- void CommandComplete(PVMFJitterBufferNodeCmdQ&,
- PVMFJitterBufferNodeCommand&,
- PVMFStatus,
- OsclAny* aData = NULL,
- PVUuid* aEventUUID = NULL,
- int32* aEventCode = NULL);
- void CommandComplete(PVMFJitterBufferNodeCommand&,
- PVMFStatus,
- OsclAny* aData = NULL,
- PVUuid* aEventUUID = NULL,
- int32* aEventCode = NULL);
- void InternalCommandComplete(PVMFJitterBufferNodeCmdQ&,
- PVMFJitterBufferNodeCommand&,
- PVMFStatus aStatus,
- OsclAny* aEventData = NULL);
- PVMFJBCommandContext* RequestNewInternalCmd();
+ PVMFCommandId QueueCommandL(PVMFJitterBufferNodeCommand&);
+ void MoveCmdToCurrentQueue(PVMFJitterBufferNodeCommand& aCmd);
+ bool ProcessCommand(PVMFJitterBufferNodeCommand&);
+ void CommandComplete(PVMFJitterBufferNodeCmdQ&,
+ PVMFJitterBufferNodeCommand&,
+ PVMFStatus,
+ OsclAny* aData = NULL,
+ PVUuid* aEventUUID = NULL,
+ int32* aEventCode = NULL);
+ void CommandComplete(PVMFJitterBufferNodeCommand&,
+ PVMFStatus,
+ OsclAny* aData = NULL,
+ PVUuid* aEventUUID = NULL,
+ int32* aEventCode = NULL);
+ void InternalCommandComplete(PVMFJitterBufferNodeCmdQ&,
+ PVMFJitterBufferNodeCommand&,
+ PVMFStatus aStatus,
+ OsclAny* aEventData = NULL);
+ PVMFJBCommandContext* RequestNewInternalCmd();
- void DoStop(PVMFJitterBufferNodeCommand&);
- void DoFlush(PVMFJitterBufferNodeCommand&);
- bool FlushPending();
+ void DoStop(PVMFJitterBufferNodeCommand&);
+ void DoFlush(PVMFJitterBufferNodeCommand&);
+ bool FlushPending();
- void DoPause(PVMFJitterBufferNodeCommand&);
- void DoReset(PVMFJitterBufferNodeCommand&);
- void DoCancelAllCommands(PVMFJitterBufferNodeCommand&);
- void DoCancelCommand(PVMFJitterBufferNodeCommand&);
+ void DoPause(PVMFJitterBufferNodeCommand&);
+ void DoReset(PVMFJitterBufferNodeCommand&);
+ void DoCancelAllCommands(PVMFJitterBufferNodeCommand&);
+ void DoCancelCommand(PVMFJitterBufferNodeCommand&);
- void ReportErrorEvent(PVMFEventType aEventType,
- OsclAny* aEventData = NULL,
- PVUuid* aEventUUID = NULL,
- int32* aEventCode = NULL);
- void ReportInfoEvent(PVMFEventType aEventType,
- OsclAny* aEventData = NULL,
- PVUuid* aEventUUID = NULL,
- int32* aEventCode = NULL);
- void SetState(TPVMFNodeInterfaceState);
+ void ReportErrorEvent(PVMFEventType aEventType,
+ OsclAny* aEventData = NULL,
+ PVUuid* aEventUUID = NULL,
+ int32* aEventCode = NULL);
+ void ReportInfoEvent(PVMFEventType aEventType,
+ OsclAny* aEventData = NULL,
+ PVUuid* aEventUUID = NULL,
+ int32* aEventCode = NULL);
+ void SetState(TPVMFNodeInterfaceState);
- void CleanUp();
+ void CleanUp();
- friend class PVMFJitterBufferPort;
- friend class PVMFJitterBufferExtensionInterfaceImpl;
+ friend class PVMFJitterBufferPort;
+ friend class PVMFJitterBufferExtensionInterfaceImpl;
- bool CheckStateForRegisteringRTPPackets();
+ bool CheckStateForRegisteringRTPPackets();
- bool NotifyAutoPauseComplete()
+ bool NotifyAutoPauseComplete()
+ {
+
+ return true;
+ }
+ bool NotifyAutoResumeComplete()
+ {
+
+ return true;
+ }
+
+ PVMFPortInterface* getPortCounterpart(PVMFPortInterface* aPort);
+ bool CheckForSpaceInJitterBuffer(PVMFPortInterface* aPort);
+ PVMFStatus CheckForHighWaterMark(PVMFPortInterface* aPort, bool& aHighWaterMarkReached);
+ PVMFStatus CheckForLowWaterMark(PVMFPortInterface* aPort, bool& aLowWaterMarkReached);
+ PVMFStatus RequestMemCallBackForAutoResume(PVMFPortInterface* aPort);
+ void freeblockavailable(OsclAny* aContextData);
+ void freememoryavailable(OsclAny* aContextData);
+ void chunkdeallocated(OsclAny* aContextData);
+ bool RegisterDataPacket(PVMFPortInterface* aPort,
+ PVMFJitterBuffer* aJitterBuffer,
+ PVMFSharedMediaDataPtr& aDataPacket);
+ PVMFJitterBuffer* findJitterBuffer(PVMFPortInterface* aPort);
+ PVMFPortInterface* findPortForJitterBuffer(PVMFJitterBuffer*);
+ bool IsJitterBufferReady(PVMFJitterBufferPortParams*, uint32& aClockDiff);
+ PVMFStatus SendData(PVMFPortInterface*);
+ PVMFStatus CheckJitterBufferEmpty(bool& oEmpty);
+
+
+ void LogSessionDiagnostics();
+ void LogPortDiagnostics();
+
+ PVMFStatus CheckForEOS();
+ PVMFStatus GenerateAndSendEOSCommand(PVMFPortInterface* aPort);
+
+
+ bool QueueBOSCommand(PVMFPortInterface* aPort);
+
+ PVMFStatus SetInPlaceProcessingMode(PVMFPortInterface* aPort,
+ bool aInPlaceProcessing)
+ {
+ PVMFJitterBufferPortParams* portParamsPtr = NULL;
+ if (!getPortContainer(aPort, portParamsPtr))
{
-
- return true;
- }
- bool NotifyAutoResumeComplete()
- {
-
- return true;
+ return PVMFFailure;
}
- PVMFPortInterface* getPortCounterpart(PVMFPortInterface* aPort);
- bool CheckForSpaceInJitterBuffer(PVMFPortInterface* aPort);
- PVMFStatus CheckForHighWaterMark(PVMFPortInterface* aPort, bool& aHighWaterMarkReached);
- PVMFStatus CheckForLowWaterMark(PVMFPortInterface* aPort, bool& aLowWaterMarkReached);
- PVMFStatus RequestMemCallBackForAutoResume(PVMFPortInterface* aPort);
- void freeblockavailable(OsclAny* aContextData);
- void freememoryavailable(OsclAny* aContextData);
- void chunkdeallocated(OsclAny* aContextData);
- bool RegisterDataPacket(PVMFPortInterface* aPort,
- PVMFJitterBuffer* aJitterBuffer,
- PVMFSharedMediaDataPtr& aDataPacket);
- PVMFJitterBuffer* findJitterBuffer(PVMFPortInterface* aPort);
- PVMFPortInterface* findPortForJitterBuffer(PVMFJitterBuffer*);
- bool IsJitterBufferReady(PVMFJitterBufferPortParams*, uint32& aClockDiff);
- PVMFStatus SendData(PVMFPortInterface*);
- PVMFStatus CheckJitterBufferEmpty(bool& oEmpty);
-
-
- void LogSessionDiagnostics();
- void LogPortDiagnostics();
-
- PVMFStatus CheckForEOS();
- PVMFStatus GenerateAndSendEOSCommand(PVMFPortInterface* aPort);
-
-
- bool QueueBOSCommand(PVMFPortInterface* aPort);
-
- PVMFStatus SetInPlaceProcessingMode(PVMFPortInterface* aPort,
- bool aInPlaceProcessing)
+ if (portParamsPtr->ipJitterBuffer != NULL)
{
- PVMFJitterBufferPortParams* portParamsPtr = NULL;
- if (!getPortContainer(aPort, portParamsPtr))
- {
- return PVMFFailure;
- }
-
- if (portParamsPtr->ipJitterBuffer != NULL)
- {
- portParamsPtr->ipJitterBuffer->SetInPlaceProcessingMode(aInPlaceProcessing);
- }
- return PVMFSuccess;
+ portParamsPtr->ipJitterBuffer->SetInPlaceProcessingMode(aInPlaceProcessing);
}
+ return PVMFSuccess;
+ }
- OsclAny* AllocatePort();
- bool PushPortToVect(PVMFJitterBufferPort*& aPort);
- bool PushPortParamsToQ(PVMFJitterBufferPortParams*& aPortParams);
+ OsclAny* AllocatePort();
+ bool PushPortToVect(PVMFJitterBufferPort*& aPort);
+ bool PushPortParamsToQ(PVMFJitterBufferPortParams*& aPortParams);
- // PvmfRtcpTimer* iRTCPTimer;
- void RtcpTimerEvent(PvmfRtcpTimer* pTimer);
- uint32 CalcRtcpInterval(PVMFJitterBufferPortParams* pFeedbackPort);
- PVMFStatus ProcessIncomingRTCPReport(PVMFSharedMediaMsgPtr&,
- PVMFJitterBufferPortParams*);
+ // PvmfRtcpTimer* iRTCPTimer;
+ void RtcpTimerEvent(PvmfRtcpTimer* pTimer);
+ uint32 CalcRtcpInterval(PVMFJitterBufferPortParams* pFeedbackPort);
+ PVMFStatus ProcessIncomingRTCPReport(PVMFSharedMediaMsgPtr&,
+ PVMFJitterBufferPortParams*);
- PVMFStatus GenerateRTCPRR(PVMFJitterBufferPortParams* pPort);
+ PVMFStatus GenerateRTCPRR(PVMFJitterBufferPortParams* pPort);
- bool LocateFeedBackPort(PVMFJitterBufferPortParams*&,
- PVMFJitterBufferPortParams*&);
+ bool LocateFeedBackPort(PVMFJitterBufferPortParams*&,
+ PVMFJitterBufferPortParams*&);
- bool LocateInputPortForFeedBackPort(PVMFJitterBufferPortParams*&,
+ bool LocateInputPortForFeedBackPort(PVMFJitterBufferPortParams*&,
+ PVMFJitterBufferPortParams*&);
+
+ PVMFStatus ComposeAndSendFeedBackPacket(PVMFJitterBufferPortParams*&,
PVMFJitterBufferPortParams*&);
- PVMFStatus ComposeAndSendFeedBackPacket(PVMFJitterBufferPortParams*&,
- PVMFJitterBufferPortParams*&);
-
- PVMFStatus ComposeAndSendRateAdaptationFeedBackPacket(PVMFJitterBufferPortParams*&,
- PVMFJitterBufferPortParams*&);
+ PVMFStatus ComposeAndSendRateAdaptationFeedBackPacket(PVMFJitterBufferPortParams*&,
+ PVMFJitterBufferPortParams*&);
- void PVMFJBSessionDurationTimerEvent();
- void ComputeCurrentSessionDurationMonitoringInterval();
+ void PVMFJBSessionDurationTimerEvent();
+ void ComputeCurrentSessionDurationMonitoringInterval();
- PVMFStatus CreateFireWallPacketMemAllocators(PVMFJitterBufferPortParams*);
- PVMFStatus DestroyFireWallPacketMemAllocators(PVMFJitterBufferPortParams*);
+ PVMFStatus CreateFireWallPacketMemAllocators(PVMFJitterBufferPortParams*);
+ PVMFStatus DestroyFireWallPacketMemAllocators(PVMFJitterBufferPortParams*);
- PVMFStatus SendFireWallPackets();
+ PVMFStatus SendFireWallPackets();
- bool Allocate(PVMFJitterBufferPortParams* it, PVMFSharedMediaDataPtr& fireWallPkt, OsclSharedPtr<PVMFMediaDataImpl>& mediaDataImpl, const int size);
+ bool Allocate(PVMFJitterBufferPortParams* it, PVMFSharedMediaDataPtr& fireWallPkt, OsclSharedPtr<PVMFMediaDataImpl>& mediaDataImpl, const int size);
- PVMFStatus ResetFireWallPacketInfoAndResend();
- void CheckForFireWallRecv(bool &aComplete);
- void CheckForFireWallPacketAttempts(bool &aComplete);
- PVMFStatus DecodeFireWallPackets(PVMFSharedMediaDataPtr aPacket,
- PVMFJitterBufferPortParams* aPortParamsPtr);
- void SetJitterBufferSize(uint32 aBufferSz);
- void GetJitterBufferSize(uint32& aBufferSz) const;
- void SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator* aDataBufferAllocator);
- bool RequestEventCallBack(JB_NOTIFY_CALLBACK aEventType, uint32 aDelay = 0, OsclAny* aContext = NULL);
- void CancelEventCallBack(JB_NOTIFY_CALLBACK aEventType, OsclAny* aContext = NULL);
- void HandleEvent_IncomingMediaInactivityDurationExpired();
- void HandleEvent_NotifyReportBufferingStatus();
- void HandleEvent_JitterBufferBufferingDurationComplete();
+ PVMFStatus ResetFireWallPacketInfoAndResend();
+ void CheckForFireWallRecv(bool &aComplete);
+ void CheckForFireWallPacketAttempts(bool &aComplete);
+ PVMFStatus DecodeFireWallPackets(PVMFSharedMediaDataPtr aPacket,
+ PVMFJitterBufferPortParams* aPortParamsPtr);
+ void SetJitterBufferSize(uint32 aBufferSz);
+ void GetJitterBufferSize(uint32& aBufferSz) const;
+ void SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator* aDataBufferAllocator);
+ bool RequestEventCallBack(JB_NOTIFY_CALLBACK aEventType, uint32 aDelay = 0, OsclAny* aContext = NULL);
+ void CancelEventCallBack(JB_NOTIFY_CALLBACK aEventType, OsclAny* aContext = NULL);
+ void HandleEvent_IncomingMediaInactivityDurationExpired();
+ void HandleEvent_NotifyReportBufferingStatus();
+ void HandleEvent_JitterBufferBufferingDurationComplete();
- /* Bitstream thinning releated */
- void UpdateRebufferingStats(PVMFEventType aEventType);
- PVMFNodeCapability iCapability;
- PVMFJitterBufferNodeCmdQ iInputCommands;
- PVMFJitterBufferNodeCmdQ iCurrentCommand;
- PVMFPortVector<PVMFJitterBufferPort, OsclMemAllocator> iPortVector;
- Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator> iPortParamsQueue;
- Oscl_Vector<PVMFPortActivity, OsclMemAllocator> iPortActivityQueue;
+ /* Bitstream thinning releated */
+ void UpdateRebufferingStats(PVMFEventType aEventType);
+ PVMFNodeCapability iCapability;
+ PVMFJitterBufferNodeCmdQ iInputCommands;
+ PVMFJitterBufferNodeCmdQ iCurrentCommand;
+ PVMFPortVector<PVMFJitterBufferPort, OsclMemAllocator> iPortVector;
+ Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator> iPortParamsQueue;
+ Oscl_Vector<PVMFPortActivity, OsclMemAllocator> iPortActivityQueue;
- bool oStartPending;
- bool oStopOutputPorts;
- uint32 iPauseTime;
+ bool oStartPending;
+ bool oStopOutputPorts;
+ uint32 iPauseTime;
- PVMFMediaClock* ipClientPlayBackClock;
+ PVMFMediaClock* ipClientPlayBackClock;
- bool iMediaReceiveingChannelPrepared;
+ bool iMediaReceiveingChannelPrepared;
- PVMFJitterBufferMisc* ipJitterBufferMisc;
+ PVMFJitterBufferMisc* ipJitterBufferMisc;
- bool iBroadCastSession;
+ bool iBroadCastSession;
- JitterBufferFactory* ipJitterBufferFactory;
- /////////////////////////////////////////////////////////////////////////////
- //Following variables are shared with the jitter buffers associated with the session and are passed by refernce
- //Node should only observe these and initialize it, and modification to these are supposed to be done by the
- //jitter buffer only
- bool iDelayEstablished;
- int iJitterDelayPercent;
- PVMFJitterBufferDataState iJitterBufferState;
+ JitterBufferFactory* ipJitterBufferFactory;
+ /////////////////////////////////////////////////////////////////////////////
+ //Following variables are shared with the jitter buffers associated with the session and are passed by refernce
+ //Node should only observe these and initialize it, and modification to these are supposed to be done by the
+ //jitter buffer only
+ bool iDelayEstablished;
+ int iJitterDelayPercent;
+ PVMFJitterBufferDataState iJitterBufferState;
- /////////////////////////////////////////////////////////////////////////////
- //Extention interface
- PVMFJitterBufferExtensionInterfaceImpl* ipExtensionInterface;
- //Variables to persist info passed on by the extension interface
- uint32 iRebufferingThreshold;
- uint32 iJitterBufferDurationInMilliSeconds;
- uint32 iMaxInactivityDurationForMediaInMs;
- uint32 iEstimatedServerKeepAheadInMilliSeconds;
- /* resizable reallocator configuration */
- uint32 iJitterBufferSz;
- uint iMaxNumBufferResizes;
- uint iBufferResizeSize;
- uint32 iBufferingStatusIntervalInMs;
+ /////////////////////////////////////////////////////////////////////////////
+ //Extention interface
+ PVMFJitterBufferExtensionInterfaceImpl* ipExtensionInterface;
+ //Variables to persist info passed on by the extension interface
+ uint32 iRebufferingThreshold;
+ uint32 iJitterBufferDurationInMilliSeconds;
+ uint32 iMaxInactivityDurationForMediaInMs;
+ uint32 iEstimatedServerKeepAheadInMilliSeconds;
+ /* resizable reallocator configuration */
+ uint32 iJitterBufferSz;
+ uint iMaxNumBufferResizes;
+ uint iBufferResizeSize;
+ uint32 iBufferingStatusIntervalInMs;
- PVMFJitterBufferFireWallPacketInfo iFireWallPacketInfo;
- bool iDisableFireWallPackets;
- bool iPlayingAfterSeek;
- ///////////////////////////////////////////////////////////////////////
- //EventNotification tracking vars
- PVMFJBEventNotifier* ipEventNotifier;
- uint32 iIncomingMediaInactivityDurationCallBkId;
- bool iIncomingMediaInactivityDurationCallBkPending;
- uint32 iNotifyBufferingStatusCallBkId;
- bool iNotifyBufferingStatusCallBkPending;
- uint32 iJitterBufferDurationCallBkId;
- bool iJitterBufferDurationCallBkPending;
+ PVMFJitterBufferFireWallPacketInfo iFireWallPacketInfo;
+ bool iDisableFireWallPackets;
+ bool iPlayingAfterSeek;
+ ///////////////////////////////////////////////////////////////////////
+ //EventNotification tracking vars
+ PVMFJBEventNotifier* ipEventNotifier;
+ uint32 iIncomingMediaInactivityDurationCallBkId;
+ bool iIncomingMediaInactivityDurationCallBkPending;
+ uint32 iNotifyBufferingStatusCallBkId;
+ bool iNotifyBufferingStatusCallBkPending;
+ uint32 iJitterBufferDurationCallBkId;
+ bool iJitterBufferDurationCallBkPending;
- //////////////////////// Diagnostic log related //////////////////////
- bool iDiagnosticsLogged;
- uint32 iNumRunL;
- ///////////////////////////////////////////////////////////////////////
+ //////////////////////// Diagnostic log related //////////////////////
+ bool iDiagnosticsLogged;
+ uint32 iNumRunL;
+ ///////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////
- //Loggers
- PVLogger* ipLogger;
- PVLogger* ipDataPathLogger;
- PVLogger* ipDataPathLoggerIn;
- PVLogger* ipDataPathLoggerOut;
- PVLogger* ipDataPathLoggerFlowCtrl;
- PVLogger* ipClockLogger;
- PVLogger* ipClockLoggerSessionDuration;
- PVLogger* ipClockLoggerRebuff;
- PVLogger* ipDiagnosticsLogger;
- PVLogger* ipJBEventsClockLogger;
- ///////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////
+ //Loggers
+ PVLogger* ipLogger;
+ PVLogger* ipDataPathLogger;
+ PVLogger* ipDataPathLoggerIn;
+ PVLogger* ipDataPathLoggerOut;
+ PVLogger* ipDataPathLoggerFlowCtrl;
+ PVLogger* ipClockLogger;
+ PVLogger* ipClockLoggerSessionDuration;
+ PVLogger* ipClockLoggerRebuff;
+ PVLogger* ipDiagnosticsLogger;
+ PVLogger* ipJBEventsClockLogger;
+ ///////////////////////////////////////////////////////////////////////
};
#endif
diff --git a/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_port.h b/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_port.h
index b864c3d..bbda643 100644
--- a/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_port.h
+++ b/nodes/streaming/jitterbuffernode/include/pvmf_jitter_buffer_port.h
@@ -16,8 +16,8 @@
* -------------------------------------------------------------------
*/
/**
-* @file pvmf_jitter_buffer_port.h
-*/
+ * @file pvmf_jitter_buffer_port.h
+ */
#ifndef PVMF_JITTER_BUFFER_PORT_H_INCLUDED
#define PVMF_JITTER_BUFFER_PORT_H_INCLUDED
@@ -51,7 +51,7 @@
#define PVMF_JITTER_BUFFER_NODE_PORT_VECTOR_RESERVE 10
// Capability mime strings
-#define PVMF_JITTER_BUFFER_PORT_SPECIFIC_ALLOCATOR "x-pvmf/pvmfstreaming/socketmemallocator"
+#define PVMF_JITTER_BUFFER_PORT_SPECIFIC_ALLOCATOR "x-pvmf/pvmfstreaming/socketmemallocator"
#define PVMF_JITTER_BUFFER_PORT_SPECIFIC_ALLOCATOR_VALTYPE "x-pvmf/pvmfstreaming/socketmemallocator;valtype=ksv"
/** Enumerated list of port tags supported by this port */
@@ -69,49 +69,49 @@
class PVMFJitterBufferPort;
class PVMFJitterBufferPortParams
{
- public:
- void ResetParams()
- {
- iJitterBufferEmpty = false;
- iProcessIncomingMessages = true;
- iProcessOutgoingMessages = true;
- iMonitorForRemoteActivity = true;
- };
+ public:
+ void ResetParams()
+ {
+ iJitterBufferEmpty = false;
+ iProcessIncomingMessages = true;
+ iProcessOutgoingMessages = true;
+ iMonitorForRemoteActivity = true;
+ };
- PVMFJitterBufferPortParams(PVMFJitterBufferPort& aPort): irPort(aPort)
- {
- iId = -1;
- iTag = PVMF_JITTER_BUFFER_PORT_TYPE_UNKNOWN;
+ PVMFJitterBufferPortParams(PVMFJitterBufferPort& aPort): irPort(aPort)
+ {
+ iId = -1;
+ iTag = PVMF_JITTER_BUFFER_PORT_TYPE_UNKNOWN;
- ipJitterBuffer = NULL; //Only Input ports will have the jitter buffer associated with them
- iTimeScale = 0;
- iBitrate = 0;
- iLastMsgTimeStamp = 0;
- iNumMediaMsgsRecvd = 0;
- iNumMediaMsgsSent = 0;
- iJitterBufferEmpty = true;
- iProcessIncomingMessages = true;
- iProcessOutgoingMessages = true;
- iCanReceivePktFromJB = false;
- iMonitorForRemoteActivity = false;
- }
+ ipJitterBuffer = NULL; //Only Input ports will have the jitter buffer associated with them
+ iTimeScale = 0;
+ iBitrate = 0;
+ iLastMsgTimeStamp = 0;
+ iNumMediaMsgsRecvd = 0;
+ iNumMediaMsgsSent = 0;
+ iJitterBufferEmpty = true;
+ iProcessIncomingMessages = true;
+ iProcessOutgoingMessages = true;
+ iCanReceivePktFromJB = false;
+ iMonitorForRemoteActivity = false;
+ }
- int32 iId;
- PVMFJitterBufferNodePortTag iTag;
- PVMFJitterBufferPort& irPort;
- PVMFJitterBuffer* ipJitterBuffer; //Only Input ports will have the jitter buffer associated with them
- uint32 iTimeScale;
- uint32 iBitrate;
- MediaClockConverter iMediaClockConverter;
- PVMFTimestamp iLastMsgTimeStamp;
- uint32 iNumMediaMsgsRecvd;
- uint32 iNumMediaMsgsSent;
- bool iJitterBufferEmpty;
- bool iProcessIncomingMessages;
- bool iProcessOutgoingMessages;
- bool iCanReceivePktFromJB;
- bool iMonitorForRemoteActivity;
- OSCL_HeapString<OsclMemAllocator> iMimeType;
+ int32 iId;
+ PVMFJitterBufferNodePortTag iTag;
+ PVMFJitterBufferPort& irPort;
+ PVMFJitterBuffer* ipJitterBuffer; //Only Input ports will have the jitter buffer associated with them
+ uint32 iTimeScale;
+ uint32 iBitrate;
+ MediaClockConverter iMediaClockConverter;
+ PVMFTimestamp iLastMsgTimeStamp;
+ uint32 iNumMediaMsgsRecvd;
+ uint32 iNumMediaMsgsSent;
+ bool iJitterBufferEmpty;
+ bool iProcessIncomingMessages;
+ bool iProcessOutgoingMessages;
+ bool iCanReceivePktFromJB;
+ bool iMonitorForRemoteActivity;
+ OSCL_HeapString<OsclMemAllocator> iMimeType;
};
/**
@@ -124,128 +124,125 @@
* same flow-control scheme.
*/
class PVMFJitterBufferPort : public PvmfPortBaseImpl,
- public PvmiCapabilityAndConfig
+ public PvmiCapabilityAndConfig
{
- public:
- /**
- * Default constructor. Default settings will be used for the data queues.
- * @param aId ID assigned to this port
- * @param aTag Port tag
- * @param aNode Container node
- */
- PVMFJitterBufferPort(int32 aTag, PVMFJitterBufferNode& aNode, const char*);
+ public:
+ /**
+ * Default constructor. Default settings will be used for the data queues.
+ * @param aId ID assigned to this port
+ * @param aTag Port tag
+ * @param aNode Container node
+ */
+ PVMFJitterBufferPort(int32 aTag, PVMFJitterBufferNode& aNode, const char*);
- /**
- * Constructor that allows the node to configure the data queues of this port.
- * @param aTag Port tag
- * @param aNode Container node
- * @param aSize Data queue capacity. The data queue size will not grow beyond this capacity.
- * @param aReserve Size of data queue for which memory is reserved. This must be
- * less than or equal to the capacity. If this is less than capacity, memory will be
- * allocated when the queue grows beyond the reserve size, but will stop growing at
- * capacity.
- * @param aThreshold Ready-to-receive threshold, in terms of percentage of the data queue capacity.
- * This value should be between 0 - 100.
- */
- PVMFJitterBufferPort(int32 aTag,
- PVMFJitterBufferNode& aNode,
- uint32 aInCapacity,
- uint32 aInReserve,
- uint32 aInThreshold,
- uint32 aOutCapacity,
- uint32 aOutReserve,
- uint32 aOutThreshold, const char*);
+ /**
+ * Constructor that allows the node to configure the data queues of this port.
+ * @param aTag Port tag
+ * @param aNode Container node
+ * @param aSize Data queue capacity. The data queue size will not grow beyond this capacity.
+ * @param aReserve Size of data queue for which memory is reserved. This must be
+ * less than or equal to the capacity. If this is less than capacity, memory will be
+ * allocated when the queue grows beyond the reserve size, but will stop growing at
+ * capacity.
+ * @param aThreshold Ready-to-receive threshold, in terms of percentage of the data queue capacity.
+ * This value should be between 0 - 100.
+ */
+ PVMFJitterBufferPort(int32 aTag,
+ PVMFJitterBufferNode& aNode,
+ uint32 aInCapacity,
+ uint32 aInReserve,
+ uint32 aInThreshold,
+ uint32 aOutCapacity,
+ uint32 aOutReserve,
+ uint32 aOutThreshold, const char*);
- /** Destructor */
- ~PVMFJitterBufferPort();
+ /** Destructor */
+ ~PVMFJitterBufferPort();
- /* Over ride Connect() */
- PVMFStatus Connect(PVMFPortInterface* aPort);
+ /* Over ride Connect() */
+ PVMFStatus Connect(PVMFPortInterface* aPort);
- /* Over ride QueryInterface - this port supports config interface */
- void QueryInterface(const PVUuid &aUuid, OsclAny*&aPtr)
- {
- if (aUuid == PVMI_CAPABILITY_AND_CONFIG_PVUUID)
- aPtr = (PvmiCapabilityAndConfig*)this;
- else
- aPtr = NULL;
- }
+ /* Over ride QueryInterface - this port supports config interface */
+ void QueryInterface(const PVUuid &aUuid, OsclAny*&aPtr)
+ {
+ if (aUuid == PVMI_CAPABILITY_AND_CONFIG_PVUUID)
+ aPtr = (PvmiCapabilityAndConfig*)this;
+ else
+ aPtr = NULL;
+ }
- // Implement pure virtuals from PvmiCapabilityAndConfig interface
- PVMFStatus getParametersSync(PvmiMIOSession aSession, PvmiKeyType aIdentifier,
- PvmiKvp*& aParameters, int& num_parameter_elements, PvmiCapabilityContext aContext);
- PVMFStatus releaseParameters(PvmiMIOSession aSession, PvmiKvp* aParameters, int num_elements);
- void setParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters,
- int num_elements, PvmiKvp * & aRet_kvp);
- PVMFStatus verifyParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters, int num_elements);
+ // Implement pure virtuals from PvmiCapabilityAndConfig interface
+ PVMFStatus getParametersSync(PvmiMIOSession aSession, PvmiKeyType aIdentifier,
+ PvmiKvp*& aParameters, int& num_parameter_elements, PvmiCapabilityContext aContext);
+ PVMFStatus releaseParameters(PvmiMIOSession aSession, PvmiKvp* aParameters, int num_elements);
+ void setParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters,
+ int num_elements, PvmiKvp * & aRet_kvp);
+ PVMFStatus verifyParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters, int num_elements);
- // Unsupported PvmiCapabilityAndConfig methods
- void setObserver(PvmiConfigAndCapabilityCmdObserver* aObserver)
- {
- OSCL_UNUSED_ARG(aObserver);
- };
- void createContext(PvmiMIOSession aSession, PvmiCapabilityContext& aContext)
- {
- OSCL_UNUSED_ARG(aSession);
- OSCL_UNUSED_ARG(aContext);
- };
- void setContextParameters(PvmiMIOSession aSession, PvmiCapabilityContext& aContext,
- PvmiKvp* aParameters, int num_parameter_elements)
- {
- OSCL_UNUSED_ARG(aSession);
- OSCL_UNUSED_ARG(aContext);
- OSCL_UNUSED_ARG(aParameters);
- OSCL_UNUSED_ARG(num_parameter_elements);
- };
- void DeleteContext(PvmiMIOSession aSession, PvmiCapabilityContext& aContext)
- {
- OSCL_UNUSED_ARG(aSession);
- OSCL_UNUSED_ARG(aContext);
- };
- PVMFCommandId setParametersAsync(PvmiMIOSession aSession, PvmiKvp* aParameters,
- int num_elements, PvmiKvp*& aRet_kvp, OsclAny* context = NULL)
- {
- OSCL_UNUSED_ARG(aSession);
- OSCL_UNUSED_ARG(aParameters);
- OSCL_UNUSED_ARG(num_elements);
- OSCL_UNUSED_ARG(aRet_kvp);
- OSCL_UNUSED_ARG(context);
- return -1;
- }
- uint32 getCapabilityMetric(PvmiMIOSession aSession)
- {
- OSCL_UNUSED_ARG(aSession);
- return 0;
- }
+ // Unsupported PvmiCapabilityAndConfig methods
+ void setObserver(PvmiConfigAndCapabilityCmdObserver* aObserver)
+ {
+ OSCL_UNUSED_ARG(aObserver);
+ };
+ void createContext(PvmiMIOSession aSession, PvmiCapabilityContext& aContext)
+ {
+ OSCL_UNUSED_ARG(aSession);
+ OSCL_UNUSED_ARG(aContext);
+ };
+ void setContextParameters(PvmiMIOSession aSession, PvmiCapabilityContext& aContext,
+ PvmiKvp* aParameters, int num_parameter_elements)
+ {
+ OSCL_UNUSED_ARG(aSession);
+ OSCL_UNUSED_ARG(aContext);
+ OSCL_UNUSED_ARG(aParameters);
+ OSCL_UNUSED_ARG(num_parameter_elements);
+ };
+ void DeleteContext(PvmiMIOSession aSession, PvmiCapabilityContext& aContext)
+ {
+ OSCL_UNUSED_ARG(aSession);
+ OSCL_UNUSED_ARG(aContext);
+ };
+ PVMFCommandId setParametersAsync(PvmiMIOSession aSession, PvmiKvp* aParameters,
+ int num_elements, PvmiKvp*& aRet_kvp, OsclAny* context = NULL)
+ {
+ OSCL_UNUSED_ARG(aSession);
+ OSCL_UNUSED_ARG(aParameters);
+ OSCL_UNUSED_ARG(num_elements);
+ OSCL_UNUSED_ARG(aRet_kvp);
+ OSCL_UNUSED_ARG(context);
+ return -1;
+ }
+ uint32 getCapabilityMetric(PvmiMIOSession aSession)
+ {
+ OSCL_UNUSED_ARG(aSession);
+ return 0;
+ }
- PVMFJitterBufferPortParams* GetPortParams()
- {
- return iPortParams;
- }
- //overrides from PVMFPortInterface
- PVMFStatus QueueOutgoingMsg(PVMFSharedMediaMsgPtr aMsg);
- bool IsOutgoingQueueBusy();
- private:
- void Construct();
+ PVMFJitterBufferPortParams* GetPortParams()
+ {
+ return iPortParams;
+ }
+ //overrides from PVMFPortInterface
+ PVMFStatus QueueOutgoingMsg(PVMFSharedMediaMsgPtr aMsg);
+ bool IsOutgoingQueueBusy();
+ private:
+ void Construct();
- PVMFFormatType iFormat;
- PVMFJitterBufferNodePortTag iPortType;
- PVMFJitterBufferPortParams* iPortParams;
- // Corresponding port paired with current port
- PVMFJitterBufferPort* iPortCounterpart;
- // Parameters of port paired with current port
- PVMFJitterBufferPortParams* iCounterpartPortParams;
+ PVMFFormatType iFormat;
+ PVMFJitterBufferNodePortTag iPortType;
+ PVMFJitterBufferPortParams* iPortParams;
+ // Corresponding port paired with current port
+ PVMFJitterBufferPort* iPortCounterpart;
+ // Parameters of port paired with current port
+ PVMFJitterBufferPortParams* iCounterpartPortParams;
- PVMFJitterBufferNode& irJitterBufferNode;
- PVLogger* ipLogger;
+ PVMFJitterBufferNode& irJitterBufferNode;
+ PVLogger* ipLogger;
- friend class PVMFJitterBufferNode;
- friend class PVMFJitterBufferExtensionInterfaceImpl;
+ friend class PVMFJitterBufferNode;
+ friend class PVMFJitterBufferExtensionInterfaceImpl;
};
#endif // PVMF_JITTER_BUFFER_PORT_H_INCLUDED
-
-
-
diff --git a/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_extension_interface.cpp b/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_extension_interface.cpp
index 2f8fe0c..0413944 100644
--- a/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_extension_interface.cpp
+++ b/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_extension_interface.cpp
@@ -26,8 +26,8 @@
#endif
PVMFJitterBufferExtensionInterfaceImpl::PVMFJitterBufferExtensionInterfaceImpl(PVMFJitterBufferNode*c)
- : PVInterfaceImpl<OsclMemAllocator>(PVUuid(PVMF_JITTERBUFFERNODE_EXTENSIONINTERFACE_UUID))
- , iContainer(c)
+ : PVInterfaceImpl<OsclMemAllocator>(PVUuid(PVMF_JITTERBUFFERNODE_EXTENSIONINTERFACE_UUID))
+ , iContainer(c)
{}
PVMFJitterBufferExtensionInterfaceImpl::~PVMFJitterBufferExtensionInterfaceImpl()
@@ -35,11 +35,11 @@
OSCL_EXPORT_REF
bool PVMFJitterBufferExtensionInterfaceImpl::setPortParams(PVMFPortInterface* aPort,
- uint32 aTimeScale,
- uint32 aBitRate,
- OsclRefCounterMemFrag& aConfig,
- bool aRateAdaptation,
- uint32 aRateAdaptationFeedBackFrequency)
+ uint32 aTimeScale,
+ uint32 aBitRate,
+ OsclRefCounterMemFrag& aConfig,
+ bool aRateAdaptation,
+ uint32 aRateAdaptationFeedBackFrequency)
{
return (iContainer->SetPortParams(aPort,
aTimeScale,
@@ -117,9 +117,9 @@
OSCL_EXPORT_REF
bool PVMFJitterBufferExtensionInterfaceImpl::setPlayRange(int32 aStartTimeInMS,
- int32 aStopTimeInMS,
- bool oPlayAfterASeek,
- bool aStopTimeAvailable)
+ int32 aStopTimeInMS,
+ bool oPlayAfterASeek,
+ bool aStopTimeAvailable)
{
return (iContainer->SetPlayRange(aStartTimeInMS,
aStopTimeInMS,
@@ -129,7 +129,7 @@
OSCL_EXPORT_REF
bool PVMFJitterBufferExtensionInterfaceImpl::PrepareForRepositioning(bool oUseExpectedClientClockVal,
- uint32 aExpectedClientClockVal)
+ uint32 aExpectedClientClockVal)
{
return (iContainer->PrepareForRepositioning(oUseExpectedClientClockVal, aExpectedClientClockVal));
}
@@ -143,13 +143,13 @@
OSCL_EXPORT_REF
bool PVMFJitterBufferExtensionInterfaceImpl::setPortRTPParams(PVMFPortInterface* aPort,
- bool aSeqNumBasePresent,
- uint32 aSeqNumBase,
- bool aRTPTimeBasePresent,
- uint32 aRTPTimeBase,
- bool aNPTTimeBasePresent,
- uint32 aNPTInMS,
- bool oPlayAfterASeek)
+ bool aSeqNumBasePresent,
+ uint32 aSeqNumBase,
+ bool aRTPTimeBasePresent,
+ uint32 aRTPTimeBase,
+ bool aNPTTimeBasePresent,
+ uint32 aNPTInMS,
+ bool oPlayAfterASeek)
{
return (iContainer->SetPortRTPParams(aPort,
aSeqNumBasePresent,
@@ -163,9 +163,9 @@
OSCL_EXPORT_REF
bool PVMFJitterBufferExtensionInterfaceImpl::setPortRTCPParams(PVMFPortInterface* aPort,
- int aNumSenders,
- uint32 aRR,
- uint32 aRS)
+ int aNumSenders,
+ uint32 aRR,
+ uint32 aRS)
{
return iContainer->SetPortRTCPParams(aPort, aNumSenders, aRR, aRS);
}
@@ -238,7 +238,7 @@
OSCL_EXPORT_REF PVMFStatus
PVMFJitterBufferExtensionInterfaceImpl::SetInputMediaHeaderPreParsed(PVMFPortInterface* aPort,
- bool aHeaderPreParsed)
+ bool aHeaderPreParsed)
{
return (iContainer->SetInputMediaHeaderPreParsed(aPort, aHeaderPreParsed));
}
diff --git a/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_node.cpp b/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_node.cpp
index 2b44ac2..977fb3e 100644
--- a/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_node.cpp
+++ b/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_node.cpp
@@ -85,7 +85,7 @@
//Construction and Destruction
OSCL_EXPORT_REF PVMFJitterBufferNode::PVMFJitterBufferNode(int32 aPriority,
- JitterBufferFactory* aJBFactory): OsclActiveObject(aPriority, "JitterBufferNode")
+ JitterBufferFactory* aJBFactory): OsclActiveObject(aPriority, "JitterBufferNode")
{
//Initialize capability
iCapability.iCanSupportMultipleInputPorts = true;
@@ -98,7 +98,7 @@
iCapability.iOutputFormatCapability.push_back(PVMF_MIME_RTP);
iCapability.iOutputFormatCapability.push_back(PVMF_MIME_ASFFF);
//Jitter buffer factory
- ipJitterBufferFactory = aJBFactory;
+ ipJitterBufferFactory = aJBFactory;
//Initialize loggers
ipLogger = NULL;
@@ -164,7 +164,7 @@
iMaxNumBufferResizes = DEFAULT_MAX_NUM_SOCKETMEMPOOL_RESIZES;
iBufferResizeSize = DEFAULT_MAX_SOCKETMEMPOOL_RESIZELEN_INPUT_PORT;
iBufferingStatusIntervalInMs =
- (PVMF_JITTER_BUFFER_BUFFERING_STATUS_EVENT_CYCLES * 1000) / PVMF_JITTER_BUFFER_BUFFERING_STATUS_EVENT_FREQUENCY;
+ (PVMF_JITTER_BUFFER_BUFFERING_STATUS_EVENT_CYCLES * 1000) / PVMF_JITTER_BUFFER_BUFFERING_STATUS_EVENT_FREQUENCY;
iDisableFireWallPackets = false;
//iPlayingAfterSeek = false;
@@ -212,8 +212,8 @@
//port vect and port params Q
Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
for (it = iPortParamsQueue.begin();
- it != iPortParamsQueue.end();
- it++)
+ it != iPortParamsQueue.end();
+ it++)
{
PVMFJitterBufferPortParams* pPortParams = *it;
@@ -263,7 +263,7 @@
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::~PVMFJitterBufferNode Out"));
}
-void PVMFJitterBufferNode::CleanUp() //Reverse of Construct
+void PVMFJitterBufferNode::CleanUp() //Reverse of Construct
{
//noop
}
@@ -295,14 +295,14 @@
OsclAny*ptr = NULL;
OSCL_TRY(err,
ptr = alloc.ALLOCATE(sizeof(PVMFJitterBufferExtensionInterfaceImpl));
- );
+ );
if (err != OsclErrNone || !ptr)
{
PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::queryInterface: Error - Out of memory"));
OSCL_LEAVE(OsclErrNoMemory);
}
ipExtensionInterface =
- OSCL_PLACEMENT_NEW(ptr, PVMFJitterBufferExtensionInterfaceImpl(this));
+ OSCL_PLACEMENT_NEW(ptr, PVMFJitterBufferExtensionInterfaceImpl(this));
}
return (ipExtensionInterface->queryInterface(uuid, iface));
}
@@ -333,28 +333,28 @@
switch (iInterfaceState)
{
case EPVMFNodeCreated:
- {
- if (!IsAdded())
- AddToScheduler();
+ {
+ if (!IsAdded())
+ AddToScheduler();
- ipLogger = PVLogger::GetLoggerObject("jitterbuffernode");
- ipDataPathLogger = PVLogger::GetLoggerObject("datapath.sourcenode.jitterbuffernode");
- ipDataPathLoggerIn = PVLogger::GetLoggerObject("datapath.sourcenode.jitterbuffernode.in");
- ipDataPathLoggerOut = PVLogger::GetLoggerObject("datapath.sourcenode.jitterbuffernode.out");
- ipDataPathLoggerFlowCtrl = PVLogger::GetLoggerObject("datapath.sourcenode.jitterbuffernode.flowctrl");
+ ipLogger = PVLogger::GetLoggerObject("jitterbuffernode");
+ ipDataPathLogger = PVLogger::GetLoggerObject("datapath.sourcenode.jitterbuffernode");
+ ipDataPathLoggerIn = PVLogger::GetLoggerObject("datapath.sourcenode.jitterbuffernode.in");
+ ipDataPathLoggerOut = PVLogger::GetLoggerObject("datapath.sourcenode.jitterbuffernode.out");
+ ipDataPathLoggerFlowCtrl = PVLogger::GetLoggerObject("datapath.sourcenode.jitterbuffernode.flowctrl");
- ipClockLogger = PVLogger::GetLoggerObject("clock.jitterbuffernode");
- ipClockLoggerSessionDuration = PVLogger::GetLoggerObject("clock.streaming_manager.sessionduration");
- ipClockLoggerRebuff = PVLogger::GetLoggerObject("clock.jitterbuffernode.rebuffer");
+ ipClockLogger = PVLogger::GetLoggerObject("clock.jitterbuffernode");
+ ipClockLoggerSessionDuration = PVLogger::GetLoggerObject("clock.streaming_manager.sessionduration");
+ ipClockLoggerRebuff = PVLogger::GetLoggerObject("clock.jitterbuffernode.rebuffer");
- ipDiagnosticsLogger = PVLogger::GetLoggerObject("pvplayerdiagnostics.streamingmanager");
- ipJBEventsClockLogger = PVLogger::GetLoggerObject("jitterbuffernode.eventsclock");
+ ipDiagnosticsLogger = PVLogger::GetLoggerObject("pvplayerdiagnostics.streamingmanager");
+ ipJBEventsClockLogger = PVLogger::GetLoggerObject("jitterbuffernode.eventsclock");
- iDiagnosticsLogged = false;
- SetState(EPVMFNodeIdle);
- status = PVMFSuccess;
- }
- break;
+ iDiagnosticsLogged = false;
+ SetState(EPVMFNodeIdle);
+ status = PVMFSuccess;
+ }
+ break;
default:
status = PVMFErrInvalidState;
break;
@@ -381,24 +381,24 @@
switch (iInterfaceState)
{
case EPVMFNodeIdle:
- {
- ResetNodeParams();
- ipLogger = NULL;
- ipDataPathLogger = NULL;
- ipDataPathLoggerIn = NULL;
- ipDataPathLoggerOut = NULL;
- ipClockLogger = NULL;
- ipClockLoggerSessionDuration = NULL;
- ipDiagnosticsLogger = NULL;
- ipDataPathLoggerFlowCtrl = NULL;
- if (IsAdded())
{
- RemoveFromScheduler();
+ ResetNodeParams();
+ ipLogger = NULL;
+ ipDataPathLogger = NULL;
+ ipDataPathLoggerIn = NULL;
+ ipDataPathLoggerOut = NULL;
+ ipClockLogger = NULL;
+ ipClockLoggerSessionDuration = NULL;
+ ipDiagnosticsLogger = NULL;
+ ipDataPathLoggerFlowCtrl = NULL;
+ if (IsAdded())
+ {
+ RemoveFromScheduler();
+ }
+ SetState(EPVMFNodeCreated);
+ status = PVMFSuccess;
}
- SetState(EPVMFNodeCreated);
- status = PVMFSuccess;
- }
- break;
+ break;
default:
status = PVMFErrInvalidState;
@@ -444,163 +444,163 @@
//PVMFErrInvalidState - If API is called in the invalid state
////////////////////////////////////////////////////////////////////////////////
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::QueryUUID(PVMFSessionId s,
- const PvmfMimeString& aMimeType,
- Oscl_Vector< PVUuid, OsclMemAllocator >& aUuids,
- bool aExactUuidsOnly ,
- const OsclAny* aContext)
+ const PvmfMimeString& aMimeType,
+ Oscl_Vector< PVUuid, OsclMemAllocator >& aUuids,
+ bool aExactUuidsOnly ,
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::QueryUUID"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_QUERYUUID,
- aMimeType,
- aUuids,
- aExactUuidsOnly,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_QUERYUUID,
+ aMimeType,
+ aUuids,
+ aExactUuidsOnly,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::QueryInterface(PVMFSessionId s,
- const PVUuid& aUuid,
- PVInterface*& aInterfacePtr,
- const OsclAny* aContext)
+ const PVUuid& aUuid,
+ PVInterface*& aInterfacePtr,
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:QueryInterface"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_QUERYINTERFACE,
- aUuid,
- aInterfacePtr,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_QUERYINTERFACE,
+ aUuid,
+ aInterfacePtr,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::RequestPort(PVMFSessionId s,
- int32 aPortTag,
- const PvmfMimeString* aPortConfig,
- const OsclAny* aContext)
+ int32 aPortTag,
+ const PvmfMimeString* aPortConfig,
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:RequestPort"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_REQUESTPORT,
- aPortTag,
- aPortConfig,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_REQUESTPORT,
+ aPortTag,
+ aPortConfig,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::ReleasePort(PVMFSessionId s,
- PVMFPortInterface& aPort,
- const OsclAny* aContext)
+ PVMFPortInterface& aPort,
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:ReleasePort"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_RELEASEPORT,
- aPort,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_RELEASEPORT,
+ aPort,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::Init(PVMFSessionId s,
- const OsclAny* aContext)
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:Init"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_INIT,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_INIT,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::Prepare(PVMFSessionId s,
- const OsclAny* aContext)
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:Prepare"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_PREPARE,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_PREPARE,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::Start(PVMFSessionId s,
- const OsclAny* aContext)
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:Start"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_START,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_START,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::Stop(PVMFSessionId s,
- const OsclAny* aContext)
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:Stop"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_STOP,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_STOP,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::Flush(PVMFSessionId s,
- const OsclAny* aContext)
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:Flush"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_FLUSH,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_FLUSH,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::Pause(PVMFSessionId s,
- const OsclAny* aContext)
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:Pause"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_PAUSE,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_PAUSE,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::Reset(PVMFSessionId s,
- const OsclAny* aContext)
+ const OsclAny* aContext)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:Reset"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_RESET,
- aContext);
+ PVMF_JITTER_BUFFER_NODE_RESET,
+ aContext);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::CancelAllCommands(PVMFSessionId s,
- const OsclAny* aContextData)
+ const OsclAny* aContextData)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:CancelAllCommands"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_CANCELALLCOMMANDS,
- aContextData);
+ PVMF_JITTER_BUFFER_NODE_CANCELALLCOMMANDS,
+ aContextData);
return QueueCommandL(cmd);
}
OSCL_EXPORT_REF PVMFCommandId PVMFJitterBufferNode::CancelCommand(PVMFSessionId s,
- PVMFCommandId aCmdId,
- const OsclAny* aContextData)
+ PVMFCommandId aCmdId,
+ const OsclAny* aContextData)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:CancelCommand"));
PVMFJitterBufferNodeCommand cmd;
cmd.PVMFJitterBufferNodeCommandBase::Construct(s,
- PVMF_JITTER_BUFFER_NODE_CANCELCOMMAND,
- aCmdId,
- aContextData);
+ PVMF_JITTER_BUFFER_NODE_CANCELCOMMAND,
+ aCmdId,
+ aContextData);
return QueueCommandL(cmd);
}
@@ -650,214 +650,214 @@
break;
case PVMF_PORT_ACTIVITY_DISCONNECT:
- {
- if (ipJitterBufferMisc)
{
- LogSessionDiagnostics();
- ipJitterBufferMisc->StreamingSessionStopped();
+ if (ipJitterBufferMisc)
+ {
+ LogSessionDiagnostics();
+ ipJitterBufferMisc->StreamingSessionStopped();
+ }
}
- }
- break;
+ break;
case PVMF_PORT_ACTIVITY_OUTGOING_MSG:
- {
- if (portParamsPtr->iProcessOutgoingMessages)
+ {
+ if (portParamsPtr->iProcessOutgoingMessages)
+ {
+ /*
+ * An outgoing message was queued on this port.
+ * All ports have outgoing messages
+ * in this node
+ */
+ QueuePortActivity(portParamsPtr, aActivity);
+ }
+ }
+ break;
+
+ case PVMF_PORT_ACTIVITY_INCOMING_MSG:
{
/*
* An outgoing message was queued on this port.
- * All ports have outgoing messages
+ * Only input and feedback ports have incoming messages
* in this node
*/
- QueuePortActivity(portParamsPtr, aActivity);
- }
- }
- break;
+ int32 portTag = portParamsPtr->iTag;
+ switch (portTag)
+ {
+ case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
+ case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
+ if (portParamsPtr->iProcessIncomingMessages)
+ {
+ QueuePortActivity(portParamsPtr, aActivity);
+ }
+ break;
- case PVMF_PORT_ACTIVITY_INCOMING_MSG:
- {
- /*
- * An outgoing message was queued on this port.
- * Only input and feedback ports have incoming messages
- * in this node
- */
- int32 portTag = portParamsPtr->iTag;
- switch (portTag)
- {
- case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
- case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
- if (portParamsPtr->iProcessIncomingMessages)
- {
- QueuePortActivity(portParamsPtr, aActivity);
- }
- break;
-
- default:
- OSCL_ASSERT(false);
- break;
+ default:
+ OSCL_ASSERT(false);
+ break;
+ }
}
- }
- break;
+ break;
case PVMF_PORT_ACTIVITY_OUTGOING_QUEUE_BUSY:
- {
- int32 portTag = portParamsPtr->iTag;
- switch (portTag)
{
- case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
- /*
- * We typically use incoming port's outgoing q
- * only in case of 3GPP streaming, wherein we
- * send firewall packets. If it is busy, it does
- * not stop us from registering incoming data pkts.
- * so do nothing.
- */
- break;
-
- case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
+ int32 portTag = portParamsPtr->iTag;
+ switch (portTag)
{
- /*
- * This implies that this output port cannot accept any more
- * msgs on its outgoing queue. This would usually imply that
- * the corresponding input port must stop processing messages,
- * however in case of jitter buffer the input and output ports
- * are separated by a huge jitter buffer. Therefore continue
- * to process the input.
- */
+ case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
+ /*
+ * We typically use incoming port's outgoing q
+ * only in case of 3GPP streaming, wherein we
+ * send firewall packets. If it is busy, it does
+ * not stop us from registering incoming data pkts.
+ * so do nothing.
+ */
+ break;
+
+ case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
+ {
+ /*
+ * This implies that this output port cannot accept any more
+ * msgs on its outgoing queue. This would usually imply that
+ * the corresponding input port must stop processing messages,
+ * however in case of jitter buffer the input and output ports
+ * are separated by a huge jitter buffer. Therefore continue
+ * to process the input.
+ */
+ }
+ break;
+
+ case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
+ portParamsPtr->iProcessIncomingMessages = false;
+ break;
+
+ default:
+ OSCL_ASSERT(false);
+ break;
}
- break;
-
- case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
- portParamsPtr->iProcessIncomingMessages = false;
- break;
-
- default:
- OSCL_ASSERT(false);
- break;
}
- }
- break;
+ break;
case PVMF_PORT_ACTIVITY_OUTGOING_QUEUE_READY:
- {
- int32 portTag = portParamsPtr->iTag;
- /*
- * Outgoing queue was previously busy, but is now ready.
- * We may need to schedule new processing events depending
- * on the port type.
- */
- switch (portTag)
{
- case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
- /*
- * We never did anything in PVMF_PORT_ACTIVITY_OUTGOING_QUEUE_BUSY
- * so do nothing
- */
- break;
-
- case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
+ int32 portTag = portParamsPtr->iTag;
+ /*
+ * Outgoing queue was previously busy, but is now ready.
+ * We may need to schedule new processing events depending
+ * on the port type.
+ */
+ switch (portTag)
{
- /*
- * This implies that this output port can accept more
- * msgs on its outgoing queue. This implies that the corresponding
- * input port can start processing messages again.
- */
- PVMFJitterBufferPort* jbPort = OSCL_STATIC_CAST(PVMFJitterBufferPort*, aActivity.iPort);
- PVMFJitterBufferPortParams* inPortParams = jbPort->iCounterpartPortParams;
- if (inPortParams != NULL)
- {
- inPortParams->iProcessIncomingMessages = true;
- }
- else
- {
+ case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
+ /*
+ * We never did anything in PVMF_PORT_ACTIVITY_OUTGOING_QUEUE_BUSY
+ * so do nothing
+ */
+ break;
+
+ case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
+ {
+ /*
+ * This implies that this output port can accept more
+ * msgs on its outgoing queue. This implies that the corresponding
+ * input port can start processing messages again.
+ */
+ PVMFJitterBufferPort* jbPort = OSCL_STATIC_CAST(PVMFJitterBufferPort*, aActivity.iPort);
+ PVMFJitterBufferPortParams* inPortParams = jbPort->iCounterpartPortParams;
+ if (inPortParams != NULL)
+ {
+ inPortParams->iProcessIncomingMessages = true;
+ }
+ else
+ {
+ OSCL_ASSERT(false);
+ }
+ }
+ break;
+
+ case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
+ portParamsPtr->iProcessIncomingMessages = true;
+ break;
+
+ default:
OSCL_ASSERT(false);
- }
+ break;
}
- break;
-
- case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
- portParamsPtr->iProcessIncomingMessages = true;
- break;
-
- default:
- OSCL_ASSERT(false);
- break;
+ if (IsAdded())
+ {
+ RunIfNotReady();
+ }
}
- if (IsAdded())
- {
- RunIfNotReady();
- }
- }
- break;
+ break;
case PVMF_PORT_ACTIVITY_CONNECTED_PORT_BUSY:
- {
- /*
- * The connected port has become busy (its incoming queue is
- * busy).
- */
- int32 portTag = portParamsPtr->iTag;
- switch (portTag)
{
- case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
- break;
-
- case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
+ /*
+ * The connected port has become busy (its incoming queue is
+ * busy).
+ */
+ int32 portTag = portParamsPtr->iTag;
+ switch (portTag)
{
- /*
- * This implies that this output port cannot send any more
- * msgs from its outgoing queue. It should stop processing
- * messages till the connect port is ready.
- */
- portParamsPtr->iProcessOutgoingMessages = false;
+ case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
+ break;
+
+ case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
+ {
+ /*
+ * This implies that this output port cannot send any more
+ * msgs from its outgoing queue. It should stop processing
+ * messages till the connect port is ready.
+ */
+ portParamsPtr->iProcessOutgoingMessages = false;
+ }
+ break;
+
+ case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
+ portParamsPtr->iProcessOutgoingMessages = false;
+ break;
+
+ default:
+ OSCL_ASSERT(false);
+ break;
}
- break;
-
- case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
- portParamsPtr->iProcessOutgoingMessages = false;
- break;
-
- default:
- OSCL_ASSERT(false);
- break;
}
- }
- break;
+ break;
case PVMF_PORT_ACTIVITY_CONNECTED_PORT_READY:
- {
- /*
- * The connected port has transitioned from Busy to Ready.
- * It's time to start processing messages outgoing again.
- */
- int32 portTag = portParamsPtr->iTag;
- switch (portTag)
{
- case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
- break;
+ /*
+ * The connected port has transitioned from Busy to Ready.
+ * It's time to start processing messages outgoing again.
+ */
+ int32 portTag = portParamsPtr->iTag;
+ switch (portTag)
+ {
+ case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
+ break;
- case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
- /*
- * This implies that this output port can now send
- * msgs from its outgoing queue. It can start processing
- * messages now.
- */
- portParamsPtr->iProcessOutgoingMessages = true;
- break;
+ case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
+ /*
+ * This implies that this output port can now send
+ * msgs from its outgoing queue. It can start processing
+ * messages now.
+ */
+ portParamsPtr->iProcessOutgoingMessages = true;
+ break;
- case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
- portParamsPtr->iProcessOutgoingMessages = true;
- break;
+ case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
+ portParamsPtr->iProcessOutgoingMessages = true;
+ break;
- default:
- OSCL_ASSERT(false);
- break;
+ default:
+ OSCL_ASSERT(false);
+ break;
+ }
+ if (IsAdded())
+ {
+ RunIfNotReady();
+ }
}
- if (IsAdded())
- {
- RunIfNotReady();
- }
- }
- break;
+ break;
default:
break;
@@ -868,7 +868,7 @@
// Port Processing routines
/////////////////////////////////////////////////////
void PVMFJitterBufferNode::QueuePortActivity(PVMFJitterBufferPortParams* aPortParams,
- const PVMFPortActivity &aActivity)
+ const PVMFPortActivity &aActivity)
{
OSCL_UNUSED_ARG(aPortParams);
OSCL_UNUSED_ARG(aActivity);
@@ -891,11 +891,11 @@
}
bool PVMFJitterBufferNode::SetPortParams(PVMFPortInterface* aPort,
- uint32 aTimeScale,
- uint32 aBitRate,
- OsclRefCounterMemFrag& aConfig,
- bool aRateAdaptation,
- uint32 aRateAdaptationFeedBackFrequency)
+ uint32 aTimeScale,
+ uint32 aBitRate,
+ OsclRefCounterMemFrag& aConfig,
+ bool aRateAdaptation,
+ uint32 aRateAdaptationFeedBackFrequency)
{
return SetPortParams(aPort, aTimeScale, aBitRate, aConfig, aRateAdaptation,
aRateAdaptationFeedBackFrequency, false);
@@ -1020,7 +1020,7 @@
}
bool PVMFJitterBufferNode::PrepareForRepositioning(bool oUseExpectedClientClockVal ,
- uint32 aExpectedClientClockVal)
+ uint32 aExpectedClientClockVal)
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::PrepareForRepositioning oUseExpectedClientClockVal[%d], aExpectedClientClockVal[%d]", oUseExpectedClientClockVal, aExpectedClientClockVal));
iJitterBufferState = PVMF_JITTER_BUFFER_IN_TRANSITION;
@@ -1035,13 +1035,13 @@
}
bool PVMFJitterBufferNode::SetPortRTPParams(PVMFPortInterface* aPort,
- bool aSeqNumBasePresent,
- uint32 aSeqNumBase,
- bool aRTPTimeBasePresent,
- uint32 aRTPTimeBase,
- bool aNPTTimeBasePresent,
- uint32 aNPTInMS,
- bool oPlayAfterASeek)
+ bool aSeqNumBasePresent,
+ uint32 aSeqNumBase,
+ bool aRTPTimeBasePresent,
+ uint32 aRTPTimeBase,
+ bool aNPTTimeBasePresent,
+ uint32 aNPTInMS,
+ bool oPlayAfterASeek)
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::SetPortRTPParams In Port - 0x%x", aPort));
uint32 i;
@@ -1092,7 +1092,7 @@
clientClock32));
#endif
pPortParams->ipJitterBuffer->PurgeElementsWithSeqNumsLessThan(aSeqNumBase,
- clientClock32);
+ clientClock32);
#if (PVLOGGER_INST_LEVEL > PVLOGMSG_INST_LLDBG)
PVMF_JBNODE_LOGCLOCK_REBUFF((0, "PVMFJitterBufferNode::setPortRTPParams - After Purge - ClientClock=%d",
clientClock32));
@@ -1114,9 +1114,9 @@
}
bool PVMFJitterBufferNode::SetPortRTCPParams(PVMFPortInterface* aPort,
- int aNumSenders,
- uint32 aRR,
- uint32 aRS)
+ int aNumSenders,
+ uint32 aRR,
+ uint32 aRS)
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::SetPortRTCPParams aPort - [0x%x]", aPort));
return ipJitterBufferMisc->SetPortRTCPParams(aPort, aNumSenders, aRR, aRS);
@@ -1186,8 +1186,8 @@
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::SendBOSMessage In"));
Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
for (it = iPortParamsQueue.begin();
- it != iPortParamsQueue.end();
- it++)
+ it != iPortParamsQueue.end();
+ it++)
{
PVMFJitterBufferPortParams* pPortParams = *it;
if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
@@ -1203,7 +1203,7 @@
}
void PVMFJitterBufferNode::SetJitterBufferChunkAllocator(OsclMemPoolResizableAllocator*
- aDataBufferAllocator, const PVMFPortInterface* aPort)
+ aDataBufferAllocator, const PVMFPortInterface* aPort)
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::SetJitterBufferChunkAllocator -aPort 0x%x", aPort));
PVMFJitterBufferPort* port = OSCL_STATIC_CAST(PVMFJitterBufferPort*, aPort);
@@ -1214,10 +1214,10 @@
}
void PVMFJitterBufferNode::SetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort,
- uint32 aSize,
- uint32 aResizeSize,
- uint32 aMaxNumResizes,
- uint32 aExpectedNumberOfBlocksPerBuffer)
+ uint32 aSize,
+ uint32 aResizeSize,
+ uint32 aMaxNumResizes,
+ uint32 aExpectedNumberOfBlocksPerBuffer)
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::SetJitterBufferMemPoolInfo Port 0x%x", aPort));
PVMFJitterBufferPort* port = OSCL_STATIC_CAST(PVMFJitterBufferPort*, aPort);
@@ -1228,10 +1228,10 @@
}
void PVMFJitterBufferNode::GetJitterBufferMemPoolInfo(const PvmfPortBaseImpl* aPort,
- uint32& aSize,
- uint32& aResizeSize,
- uint32& aMaxNumResizes,
- uint32& aExpectedNumberOfBlocksPerBuffer) const
+ uint32& aSize,
+ uint32& aResizeSize,
+ uint32& aMaxNumResizes,
+ uint32& aExpectedNumberOfBlocksPerBuffer) const
{
PVMFJitterBufferPort* port = OSCL_STATIC_CAST(PVMFJitterBufferPort*, aPort);
if (port->iPortParams->ipJitterBuffer)
@@ -1241,7 +1241,7 @@
}
void PVMFJitterBufferNode::SetSharedBufferResizeParams(uint32 maxNumResizes,
- uint32 resizeSize)
+ uint32 resizeSize)
{
// make sure we're in a state that makes sense
OSCL_ASSERT((iInterfaceState == EPVMFNodeCreated) ||
@@ -1253,14 +1253,14 @@
}
void PVMFJitterBufferNode::GetSharedBufferResizeParams(uint32& maxNumResizes,
- uint32& resizeSize)
+ uint32& resizeSize)
{
maxNumResizes = iMaxNumBufferResizes;
resizeSize = iBufferResizeSize;
}
bool PVMFJitterBufferNode::ClearJitterBuffer(PVMFPortInterface* aPort,
- uint32 aSeqNum)
+ uint32 aSeqNum)
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::ClearJitterBuffer Port 0x%x aSeqNum[%d]", aPort, aSeqNum));
/* Typically called only for HTTP streaming sessions */
@@ -1282,7 +1282,7 @@
if (ipClientPlayBackClock != NULL)
ipClientPlayBackClock->GetCurrentTime32(clientClock32, overflowFlag, PVMF_MEDIA_CLOCK_MSEC, timebase32);
pPortParams->ipJitterBuffer->PurgeElementsWithSeqNumsLessThan(aSeqNum,
- clientClock32);
+ clientClock32);
ipJitterBufferMisc->ResetSession();
iJitterBufferState = PVMF_JITTER_BUFFER_READY;
return true;
@@ -1308,7 +1308,7 @@
}
PVMFStatus PVMFJitterBufferNode::SetInputMediaHeaderPreParsed(PVMFPortInterface* aPort,
- bool aHeaderPreParsed)
+ bool aHeaderPreParsed)
{
PVMFStatus status = PVMFFailure;
PVMFJitterBufferPort *port = OSCL_STATIC_CAST(PVMFJitterBufferPort*, aPort);
@@ -1436,7 +1436,7 @@
/* Compute buffer size based on bitrate and jitter duration*/
uint32 sizeInBytes = 0;
if (((int32)iJitterBufferDurationInMilliSeconds > 0) &&
- ((int32)aBitRate > 0))
+ ((int32)aBitRate > 0))
{
uint32 byteRate = aBitRate / 8;
uint32 overhead = (byteRate * PVMF_JITTER_BUFFER_NODE_MEM_POOL_OVERHEAD) / 100;
@@ -1492,11 +1492,11 @@
//OsclActiveObject Implementation
///////////////////////////////////////////////////////////////////////////////
/**
- * This AO handles both API commands and port activity.
- * The AO will either process one command or service one connected
- * port per call. It will re-schedule itself and run continuously
- * until it runs out of things to do.
- */
+ * This AO handles both API commands and port activity.
+ * The AO will either process one command or service one connected
+ * port per call. It will re-schedule itself and run continuously
+ * until it runs out of things to do.
+ */
void PVMFJitterBufferNode::Run()
{
iNumRunL++;
@@ -1527,16 +1527,16 @@
* Process port activity
*/
if (((iInterfaceState == EPVMFNodeInitialized) ||
- (iInterfaceState == EPVMFNodePrepared) ||
- (iInterfaceState == EPVMFNodeStarted) ||
- (iInterfaceState == EPVMFNodePaused)) ||
- FlushPending())
+ (iInterfaceState == EPVMFNodePrepared) ||
+ (iInterfaceState == EPVMFNodeStarted) ||
+ (iInterfaceState == EPVMFNodePaused)) ||
+ FlushPending())
{
uint32 i;
for (i = 0; i < iPortVector.size(); i++)
{
PVMFJitterBufferPortParams* portContainerPtr =
- iPortVector[i]->iPortParams;
+ iPortVector[i]->iPortParams;
if (portContainerPtr == NULL)
{
@@ -1578,7 +1578,7 @@
for (i = 0;i < iPortVector.size();i++)
{
if (iPortVector[i]->IncomingMsgQueueSize() > 0 ||
- iPortVector[i]->OutgoingMsgQueueSize() > 0)
+ iPortVector[i]->OutgoingMsgQueueSize() > 0)
{
OSCL_ASSERT(false);
}
@@ -1622,64 +1622,64 @@
switch (aPortParams->iTag)
{
case PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT:
- {
- if ((aPortParams->iProcessOutgoingMessages) &&
+ {
+ if ((aPortParams->iProcessOutgoingMessages) &&
(aPortParams->irPort.OutgoingMsgQueueSize() > 0))
- {
- status = ProcessOutgoingMsg(aPortParams);
- }
- /*
- * Send data out of jitter buffer as long as there's:
- * - more data to send
- * - outgoing queue isn't in a Busy state.
- * - ports are not paused
- */
- PVMFJitterBufferPort* outPort = OSCL_STATIC_CAST(PVMFJitterBufferPort*, &aPortParams->irPort);
- PVMFJitterBufferPortParams* inPortParamsPtr = outPort->iCounterpartPortParams;
- if (aPortParams->iProcessOutgoingMessages)
- {
- if ((oStopOutputPorts == false) && (inPortParamsPtr->iCanReceivePktFromJB))
{
- SendData(OSCL_STATIC_CAST(PVMFPortInterface*, &inPortParamsPtr->irPort));
+ status = ProcessOutgoingMsg(aPortParams);
+ }
+ /*
+ * Send data out of jitter buffer as long as there's:
+ * - more data to send
+ * - outgoing queue isn't in a Busy state.
+ * - ports are not paused
+ */
+ PVMFJitterBufferPort* outPort = OSCL_STATIC_CAST(PVMFJitterBufferPort*, &aPortParams->irPort);
+ PVMFJitterBufferPortParams* inPortParamsPtr = outPort->iCounterpartPortParams;
+ if (aPortParams->iProcessOutgoingMessages)
+ {
+ if ((oStopOutputPorts == false) && (inPortParamsPtr->iCanReceivePktFromJB))
+ {
+ SendData(OSCL_STATIC_CAST(PVMFPortInterface*, &inPortParamsPtr->irPort));
+ }
}
}
- }
- break;
+ break;
case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
- {
- PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::ProcessPortActivity: input port- aPortParams->iProcessIncomingMessages %d aPortParams->iPort->IncomingMsgQueueSize() %d" ,
- aPortParams->iProcessIncomingMessages, aPortParams->irPort.IncomingMsgQueueSize()));
- if ((aPortParams->iProcessIncomingMessages) &&
+ {
+ PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::ProcessPortActivity: input port- aPortParams->iProcessIncomingMessages %d aPortParams->iPort->IncomingMsgQueueSize() %d" ,
+ aPortParams->iProcessIncomingMessages, aPortParams->irPort.IncomingMsgQueueSize()));
+ if ((aPortParams->iProcessIncomingMessages) &&
(aPortParams->irPort.IncomingMsgQueueSize() > 0))
- {
- status = ProcessIncomingMsg(aPortParams);
- }
- if ((aPortParams->iProcessOutgoingMessages) &&
+ {
+ status = ProcessIncomingMsg(aPortParams);
+ }
+ if ((aPortParams->iProcessOutgoingMessages) &&
(aPortParams->irPort.OutgoingMsgQueueSize() > 0))
- {
- status = ProcessOutgoingMsg(aPortParams);
+ {
+ status = ProcessOutgoingMsg(aPortParams);
+ }
}
- }
- break;
+ break;
case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
- {
- PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::ProcessPortActivity: - aPortParams->iProcessIncomingMessages %d aPortParams->iPort->IncomingMsgQueueSize() %d" ,
- aPortParams->iProcessIncomingMessages, aPortParams->irPort.IncomingMsgQueueSize()));
+ {
+ PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::ProcessPortActivity: - aPortParams->iProcessIncomingMessages %d aPortParams->iPort->IncomingMsgQueueSize() %d" ,
+ aPortParams->iProcessIncomingMessages, aPortParams->irPort.IncomingMsgQueueSize()));
- if ((aPortParams->iProcessIncomingMessages) &&
+ if ((aPortParams->iProcessIncomingMessages) &&
(aPortParams->irPort.IncomingMsgQueueSize() > 0))
- {
- status = ProcessIncomingMsg(aPortParams);
- }
- if ((aPortParams->iProcessOutgoingMessages) &&
+ {
+ status = ProcessIncomingMsg(aPortParams);
+ }
+ if ((aPortParams->iProcessOutgoingMessages) &&
(aPortParams->irPort.OutgoingMsgQueueSize() > 0))
- {
- status = ProcessOutgoingMsg(aPortParams);
+ {
+ status = ProcessOutgoingMsg(aPortParams);
+ }
}
- }
- break;
+ break;
default:
break;
@@ -1691,8 +1691,8 @@
* so don't report it.)
*/
if (status != PVMFErrBusy
- && status != PVMFSuccess
- && status != PVMFErrInvalidState)
+ && status != PVMFSuccess
+ && status != PVMFErrInvalidState)
{
PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessPortActivity: Error - ProcessPortActivity failed. port=0x%x",
&aPortParams->irPort));
@@ -1726,105 +1726,105 @@
switch (aPortParams->iTag)
{
case PVMF_JITTER_BUFFER_PORT_TYPE_INPUT:
- {
- /* Parse packet header - mainly to retrieve time stamp */
- PVMFJitterBuffer* jitterBuffer = aPortParams->ipJitterBuffer;
- if (jitterBuffer == NULL)
{
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: findJitterBuffer failed"));
- int32 errcode = PVMFJitterBufferNodeUnableToRegisterIncomingPacket;
- ReportErrorEvent(PVMFErrArgument, (OsclAny*)(aPort), &eventuuid, &errcode);
- return PVMFErrArgument;
- }
-
- /*
- * Incoming message recvd on the input port.
- * Dequeue the message
- */
- PVMFSharedMediaMsgPtr msg;
- PVMFStatus status = aPort->DequeueIncomingMsg(msg);
- if (status != PVMFSuccess)
- {
- ReportErrorEvent(PVMFErrPortProcessing, (OsclAny*)(aPort));
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Error - INPUT PORT - DequeueIncomingMsg failed"));
- return status;
- }
-
- PVMFJitterBufferRegisterMediaMsgStatus regStatus = jitterBuffer->RegisterMediaMsg(msg);
- switch (regStatus)
- {
-
- case PVMF_JB_REGISTER_MEDIA_MSG_SUCCESS:
+ /* Parse packet header - mainly to retrieve time stamp */
+ PVMFJitterBuffer* jitterBuffer = aPortParams->ipJitterBuffer;
+ if (jitterBuffer == NULL)
{
- PVMF_JBNODE_LOGDATATRAFFIC_IN((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Packet registered successfully Mime %s", aPortParams->iMimeType.get_cstr()));
- }
- break;
- case PVMF_JB_REGISTER_MEDIA_MSG_FAILURE_JB_FULL:
- {
- aPortParams->iProcessIncomingMessages = false;
- jitterBuffer->NotifyFreeSpaceAvailable();
- int32 infocode = PVMFJitterBufferNodeJitterBufferFull;
- ReportInfoEvent(PVMFInfoOverflow, (OsclAny*)(aPort), &eventuuid, &infocode);
- PVMF_JBNODE_LOGDATATRAFFIC_IN((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Jitter Buffer full"));
- PVMF_JBNODE_LOGDATATRAFFIC_FLOWCTRL_E((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Jitter Buffer full"));
- return PVMFErrBusy;
- }
- break;
- case PVMF_JB_REGISTER_MEDIA_MSG_FAILURE_INSUFFICIENT_MEMORY_FOR_PACKETIZATION:
- {
- aPortParams->iProcessIncomingMessages = false;
- jitterBuffer->NotifyFreeSpaceAvailable();
- return PVMFErrBusy;
- }
- break;
- case PVMF_JB_REGISTER_MEDIA_MSG_ERR_CORRUPT_PACKET:
- {
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: unable to register packet"));
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: findJitterBuffer failed"));
int32 errcode = PVMFJitterBufferNodeUnableToRegisterIncomingPacket;
ReportErrorEvent(PVMFErrArgument, (OsclAny*)(aPort), &eventuuid, &errcode);
return PVMFErrArgument;
}
- case PVMF_JB_REGISTER_MEDIA_MSG_ERR_EOS_SIGNALLED:
+
+ /*
+ * Incoming message recvd on the input port.
+ * Dequeue the message
+ */
+ PVMFSharedMediaMsgPtr msg;
+ PVMFStatus status = aPort->DequeueIncomingMsg(msg);
+ if (status != PVMFSuccess)
{
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: data received after signalling EOS"));
+ ReportErrorEvent(PVMFErrPortProcessing, (OsclAny*)(aPort));
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Error - INPUT PORT - DequeueIncomingMsg failed"));
+ return status;
}
- break;
- default:
+
+ PVMFJitterBufferRegisterMediaMsgStatus regStatus = jitterBuffer->RegisterMediaMsg(msg);
+ switch (regStatus)
{
- PVMF_JBNODE_LOGDATATRAFFIC_IN((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Packet could not be registered Register packet returned status %d", regStatus));
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Packet could not be registered Register packet returned status %d", regStatus));
+
+ case PVMF_JB_REGISTER_MEDIA_MSG_SUCCESS:
+ {
+ PVMF_JBNODE_LOGDATATRAFFIC_IN((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Packet registered successfully Mime %s", aPortParams->iMimeType.get_cstr()));
+ }
+ break;
+ case PVMF_JB_REGISTER_MEDIA_MSG_FAILURE_JB_FULL:
+ {
+ aPortParams->iProcessIncomingMessages = false;
+ jitterBuffer->NotifyFreeSpaceAvailable();
+ int32 infocode = PVMFJitterBufferNodeJitterBufferFull;
+ ReportInfoEvent(PVMFInfoOverflow, (OsclAny*)(aPort), &eventuuid, &infocode);
+ PVMF_JBNODE_LOGDATATRAFFIC_IN((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Jitter Buffer full"));
+ PVMF_JBNODE_LOGDATATRAFFIC_FLOWCTRL_E((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Jitter Buffer full"));
+ return PVMFErrBusy;
+ }
+ break;
+ case PVMF_JB_REGISTER_MEDIA_MSG_FAILURE_INSUFFICIENT_MEMORY_FOR_PACKETIZATION:
+ {
+ aPortParams->iProcessIncomingMessages = false;
+ jitterBuffer->NotifyFreeSpaceAvailable();
+ return PVMFErrBusy;
+ }
+ break;
+ case PVMF_JB_REGISTER_MEDIA_MSG_ERR_CORRUPT_PACKET:
+ {
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: unable to register packet"));
+ int32 errcode = PVMFJitterBufferNodeUnableToRegisterIncomingPacket;
+ ReportErrorEvent(PVMFErrArgument, (OsclAny*)(aPort), &eventuuid, &errcode);
+ return PVMFErrArgument;
+ }
+ case PVMF_JB_REGISTER_MEDIA_MSG_ERR_EOS_SIGNALLED:
+ {
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: data received after signalling EOS"));
+ }
+ break;
+ default:
+ {
+ PVMF_JBNODE_LOGDATATRAFFIC_IN((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Packet could not be registered Register packet returned status %d", regStatus));
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Packet could not be registered Register packet returned status %d", regStatus));
+ }
}
+ SendData(aPort);
}
- SendData(aPort);
- }
- break;
+ break;
case PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK:
- {
- /*
- * Incoming RTCP reports - recvd on the input port.
- * Dequeue the message - Need to fully implement
- * RTCP
- */
- PVMFSharedMediaMsgPtr msg;
- PVMFStatus status = aPort->DequeueIncomingMsg(msg);
- if (status != PVMFSuccess)
{
- ReportErrorEvent(PVMFErrPortProcessing, (OsclAny*)(aPort));
- PVMF_JBNODE_LOGERROR((0, "0x%x PVMFJitterBufferNode::ProcessIncomingMsg: Error - FB PORT - DequeueIncomingMsg failed", this));
- return status;
+ /*
+ * Incoming RTCP reports - recvd on the input port.
+ * Dequeue the message - Need to fully implement
+ * RTCP
+ */
+ PVMFSharedMediaMsgPtr msg;
+ PVMFStatus status = aPort->DequeueIncomingMsg(msg);
+ if (status != PVMFSuccess)
+ {
+ ReportErrorEvent(PVMFErrPortProcessing, (OsclAny*)(aPort));
+ PVMF_JBNODE_LOGERROR((0, "0x%x PVMFJitterBufferNode::ProcessIncomingMsg: Error - FB PORT - DequeueIncomingMsg failed", this));
+ return status;
+ }
+ status = ipJitterBufferMisc->ProcessFeedbackMessage(*aPortParams, msg);
+ PVMF_JBNODE_LOGDATATRAFFIC_IN((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Feedback Packet registered with status code status %d", status));
}
- status = ipJitterBufferMisc->ProcessFeedbackMessage(*aPortParams, msg);
- PVMF_JBNODE_LOGDATATRAFFIC_IN((0, "PVMFJitterBufferNode::ProcessIncomingMsg: Feedback Packet registered with status code status %d", status));
- }
- break;
+ break;
default:
- {
- ReportErrorEvent(PVMFErrPortProcessing, (OsclAny*)(aPort));
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg - Invalid Port Tag"));
- return PVMFFailure;
- }
+ {
+ ReportErrorEvent(PVMFErrPortProcessing, (OsclAny*)(aPort));
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::ProcessIncomingMsg - Invalid Port Tag"));
+ return PVMFFailure;
+ }
}
return (PVMFSuccess);
}
@@ -1873,7 +1873,7 @@
PVMFJitterBufferNode::SendData(PVMFPortInterface* aPort)
{
PVMFJitterBufferPort* jbPort =
- OSCL_STATIC_CAST(PVMFJitterBufferPort*, aPort);
+ OSCL_STATIC_CAST(PVMFJitterBufferPort*, aPort);
PVMFPortInterface* outputPort = jbPort->iPortCounterpart;
PVMFJitterBufferPortParams* portParamsPtr = jbPort->iPortParams;
@@ -1935,9 +1935,9 @@
uint32 currentTimeBase32 = 0;
bool overflowFlag = false;
ipJitterBufferMisc->GetEstimatedServerClock().GetCurrentTime32(currentTime32,
- overflowFlag,
- PVMF_MEDIA_CLOCK_MSEC,
- currentTimeBase32);
+ overflowFlag,
+ PVMF_MEDIA_CLOCK_MSEC,
+ currentTimeBase32);
PVMF_JBNODE_LOGDATATRAFFIC_OUT((0, "PVMFJitterBufferNode::SendData - Estimated serv clock %d", currentTime32));
@@ -1976,13 +1976,13 @@
//RTSP streaming to do firewall packet exchange. So if there are outgoing
//msgs and oProcessOutgoingMessages is true then node needs scheduling.
//b) PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT - As long as:
- // - there are msgs in outgoing queue
- // - oProcessOutgoingMessages is true
- // - and as long as there is data in JB and we are not in buffering
+ // - there are msgs in outgoing queue
+ // - oProcessOutgoingMessages is true
+ // - and as long as there is data in JB and we are not in buffering
//then node needs scheduling.
//c) PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK - As long as:
- // - there are msgs in incoming queue and oProcessIncomingMessages is true
- // - there are msgs in outgoing queue and oProcessOutgoingMessages is true
+ // - there are msgs in incoming queue and oProcessIncomingMessages is true
+ // - there are msgs in outgoing queue and oProcessOutgoingMessages is true
uint32 i;
for (i = 0; i < iPortVector.size(); i++)
{
@@ -2020,10 +2020,10 @@
else if (portContainerPtr->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_OUTPUT)
{
PVMFJitterBufferPort* jbPort =
- OSCL_STATIC_CAST(PVMFJitterBufferPort*, &portContainerPtr->irPort);
+ OSCL_STATIC_CAST(PVMFJitterBufferPort*, &portContainerPtr->irPort);
PVMFJitterBufferPortParams* inPortParamsPtr = jbPort->iCounterpartPortParams;
if ((portContainerPtr->irPort.OutgoingMsgQueueSize() > 0) ||
- (inPortParamsPtr->iCanReceivePktFromJB))
+ (inPortParamsPtr->iCanReceivePktFromJB))
{
if ((portContainerPtr->iProcessOutgoingMessages) && (oStopOutputPorts == false))
{
@@ -2082,7 +2082,7 @@
}
if ((portContainerPtr->irPort.IncomingMsgQueueSize() > 0) ||
- (portContainerPtr->irPort.OutgoingMsgQueueSize() > 0))
+ (portContainerPtr->irPort.OutgoingMsgQueueSize() > 0))
{
/*
* Found a port that still has an outstanding activity.
@@ -2174,11 +2174,11 @@
break;
default:
- {
- /* unknown command type */
- CommandComplete(iInputCommands, aCmd, PVMFErrNotSupported);
- }
- break;
+ {
+ /* unknown command type */
+ CommandComplete(iInputCommands, aCmd, PVMFErrNotSupported);
+ }
+ break;
}
return true;
@@ -2199,11 +2199,11 @@
}
void PVMFJitterBufferNode::CommandComplete(PVMFJitterBufferNodeCmdQ& aCmdQ,
- PVMFJitterBufferNodeCommand& aCmd,
- PVMFStatus aStatus,
- OsclAny* aEventData,
- PVUuid* aEventUUID,
- int32* aEventCode)
+ PVMFJitterBufferNodeCommand& aCmd,
+ PVMFStatus aStatus,
+ OsclAny* aEventData,
+ PVUuid* aEventUUID,
+ int32* aEventCode)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:CommandComplete Id %d Cmd %d Status %d Context %d Data %d"
, aCmd.iId, aCmd.iCmd, aStatus, aCmd.iContext, aEventData));
@@ -2238,18 +2238,18 @@
* state
*/
if ((aStatus == PVMFFailure) ||
- (aStatus == PVMFErrNoMemory) ||
- (aStatus == PVMFErrNoResources))
+ (aStatus == PVMFErrNoMemory) ||
+ (aStatus == PVMFErrNoResources))
{
SetState(EPVMFNodeError);
}
}
void PVMFJitterBufferNode::CommandComplete(PVMFJitterBufferNodeCommand& aCmd,
- PVMFStatus aStatus,
- OsclAny* aEventData,
- PVUuid* aEventUUID,
- int32* aEventCode)
+ PVMFStatus aStatus,
+ OsclAny* aEventData,
+ PVUuid* aEventUUID,
+ int32* aEventCode)
{
PVMF_JBNODE_LOGINFO((0, "JitterBufferNode:CommandComplete Id %d Cmd %d Status %d Context %d Data %d"
, aCmd.iId, aCmd.iCmd, aStatus, aCmd.iContext, aEventData));
@@ -2280,8 +2280,8 @@
* state
*/
if ((aStatus == PVMFFailure) ||
- (aStatus == PVMFErrNoMemory) ||
- (aStatus == PVMFErrNoResources))
+ (aStatus == PVMFErrNoMemory) ||
+ (aStatus == PVMFErrNoResources))
{
SetState(EPVMFNodeError);
}
@@ -2292,9 +2292,9 @@
* Does not report completion as it is an internal command
*/
void PVMFJitterBufferNode::InternalCommandComplete(PVMFJitterBufferNodeCmdQ& aCmdQ,
- PVMFJitterBufferNodeCommand& aCmd,
- PVMFStatus aStatus,
- OsclAny* aEventData)
+ PVMFJitterBufferNodeCommand& aCmd,
+ PVMFStatus aStatus,
+ OsclAny* aEventData)
{
OSCL_UNUSED_ARG(aEventData);
@@ -2311,8 +2311,8 @@
* state
*/
if ((aStatus == PVMFFailure) ||
- (aStatus == PVMFErrNoMemory) ||
- (aStatus == PVMFErrNoResources))
+ (aStatus == PVMFErrNoMemory) ||
+ (aStatus == PVMFErrNoResources))
{
SetState(EPVMFNodeError);
}
@@ -2337,8 +2337,8 @@
// unless exactmatch is set.
if (*mimetype == PVMF_JITTERBUFFER_CUSTOMINTERFACE_MIMETYPE
- || (!exactmatch && *mimetype == PVMF_JITTERBUFFER_MIMETYPE)
- || (!exactmatch && *mimetype == PVMF_JITTERBUFFER_BASEMIMETYPE))
+ || (!exactmatch && *mimetype == PVMF_JITTERBUFFER_MIMETYPE)
+ || (!exactmatch && *mimetype == PVMF_JITTERBUFFER_BASEMIMETYPE))
{
PVUuid uuid(PVMF_JITTERBUFFERNODE_EXTENSIONINTERFACE_UUID);
uuidvec->push_back(uuid);
@@ -2365,7 +2365,7 @@
OsclAny*ptr = NULL;
OSCL_TRY(err,
ptr = alloc.ALLOCATE(sizeof(PVMFJitterBufferExtensionInterfaceImpl));
- );
+ );
if (err != OsclErrNone || !ptr)
{
PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::DoQueryInterface: Error - Out of memory"));
@@ -2373,7 +2373,7 @@
return;
}
ipExtensionInterface =
- OSCL_PLACEMENT_NEW(ptr, PVMFJitterBufferExtensionInterfaceImpl(this));
+ OSCL_PLACEMENT_NEW(ptr, PVMFJitterBufferExtensionInterfaceImpl(this));
}
if (ipExtensionInterface->queryInterface(*uuid, *ptr))
{
@@ -2514,8 +2514,8 @@
// have caused reallocation of the vector elements.
Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
for (it = iPortParamsQueue.begin();
- it != iPortParamsQueue.end();
- it++)
+ it != iPortParamsQueue.end();
+ it++)
{
PVMFJitterBufferPortParams* portParametersPtr = *it;
PVMFJitterBufferPort* portPtr = OSCL_REINTERPRET_CAST(PVMFJitterBufferPort*, &portParametersPtr->irPort);
@@ -2605,8 +2605,8 @@
Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
for (it = iPortParamsQueue.begin();
- it != iPortParamsQueue.end();
- it++)
+ it != iPortParamsQueue.end();
+ it++)
{
PVMFJitterBufferPortParams* pPortParams = *it;
if (&pPortParams->irPort == iPortVector.front())
@@ -2678,61 +2678,61 @@
switch (iInterfaceState)
{
case EPVMFNodeInitialized:
- {
- uint32 i;
- for (i = 0; i < iPortVector.size(); i++)
{
- PVMFJitterBufferPortParams* portContainerPtr1 = NULL;
- if (getPortContainer(iPortVector[i], portContainerPtr1))
+ uint32 i;
+ for (i = 0; i < iPortVector.size(); i++)
{
- iPortVector[i]->iPortParams = portContainerPtr1;
- }
- else
- {
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::DoPrepare: getPortContainer - Self"));
- CommandComplete(iInputCommands, aCmd, PVMFFailure);
- break;
- }
- PVMFPortInterface* cpPort = getPortCounterpart(iPortVector[i]);
- if (cpPort != NULL)
- {
- iPortVector[i]->iPortCounterpart = (PVMFJitterBufferPort*)cpPort;
- PVMFJitterBufferPortParams* portContainerPtr2 = NULL;
- if (getPortContainer(iPortVector[i]->iPortCounterpart, portContainerPtr2))
+ PVMFJitterBufferPortParams* portContainerPtr1 = NULL;
+ if (getPortContainer(iPortVector[i], portContainerPtr1))
{
- iPortVector[i]->iCounterpartPortParams = portContainerPtr2;
+ iPortVector[i]->iPortParams = portContainerPtr1;
}
else
{
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::DoPrepare: getPortContainer - Counterpart"));
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::DoPrepare: getPortContainer - Self"));
CommandComplete(iInputCommands, aCmd, PVMFFailure);
break;
}
+ PVMFPortInterface* cpPort = getPortCounterpart(iPortVector[i]);
+ if (cpPort != NULL)
+ {
+ iPortVector[i]->iPortCounterpart = (PVMFJitterBufferPort*)cpPort;
+ PVMFJitterBufferPortParams* portContainerPtr2 = NULL;
+ if (getPortContainer(iPortVector[i]->iPortCounterpart, portContainerPtr2))
+ {
+ iPortVector[i]->iCounterpartPortParams = portContainerPtr2;
+ }
+ else
+ {
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::DoPrepare: getPortContainer - Counterpart"));
+ CommandComplete(iInputCommands, aCmd, PVMFFailure);
+ break;
+ }
+ }
}
- }
- ipJitterBufferMisc->Prepare();
- PVMFStatus status = ipJitterBufferMisc->PrepareMediaReceivingChannel();
- if (PVMFPending == status)
- {
- MoveCmdToCurrentQueue(aCmd);
- }
- else
- {
- if (PVMFSuccess == status)
+ ipJitterBufferMisc->Prepare();
+ PVMFStatus status = ipJitterBufferMisc->PrepareMediaReceivingChannel();
+ if (PVMFPending == status)
{
- PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::DoPrepare: FW Pkts Disabled"));
- /* Complete prepare */
- SetState(EPVMFNodePrepared);
- CommandComplete(iInputCommands, aCmd, PVMFSuccess);
+ MoveCmdToCurrentQueue(aCmd);
}
else
{
- CommandComplete(iInputCommands, aCmd, status);
+ if (PVMFSuccess == status)
+ {
+ PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode::DoPrepare: FW Pkts Disabled"));
+ /* Complete prepare */
+ SetState(EPVMFNodePrepared);
+ CommandComplete(iInputCommands, aCmd, PVMFSuccess);
+ }
+ else
+ {
+ CommandComplete(iInputCommands, aCmd, status);
+ }
}
}
- }
- break;
+ break;
default:
CommandComplete(iInputCommands, aCmd, PVMFErrInvalidState);
@@ -2770,71 +2770,71 @@
{
case EPVMFNodePrepared:
case EPVMFNodePaused:
- {
- ipJitterBufferMisc->StreamingSessionStarted();
- /* Diagnostic logging */
- iDiagnosticsLogged = false;
- iMediaReceiveingChannelPrepared = true;
-
- if (iInterfaceState == EPVMFNodePaused)
{
- uint32 currticks = OsclTickCount::TickCount();
- uint32 startTime = OsclTickCount::TicksToMsec(currticks);
- uint32 diff = (startTime - iPauseTime);
- if (diff > PVMF_JITTER_BUFFER_NODE_FIREWALL_PKT_DEFAULT_PAUSE_DURATION_IN_MS)
+ ipJitterBufferMisc->StreamingSessionStarted();
+ /* Diagnostic logging */
+ iDiagnosticsLogged = false;
+ iMediaReceiveingChannelPrepared = true;
+
+ if (iInterfaceState == EPVMFNodePaused)
{
- if (PVMFPending == ipJitterBufferMisc->PrepareMediaReceivingChannel())
+ uint32 currticks = OsclTickCount::TickCount();
+ uint32 startTime = OsclTickCount::TicksToMsec(currticks);
+ uint32 diff = (startTime - iPauseTime);
+ if (diff > PVMF_JITTER_BUFFER_NODE_FIREWALL_PKT_DEFAULT_PAUSE_DURATION_IN_MS)
{
- iMediaReceiveingChannelPrepared = false;
+ if (PVMFPending == ipJitterBufferMisc->PrepareMediaReceivingChannel())
+ {
+ iMediaReceiveingChannelPrepared = false;
+ }
}
}
- }
- if (!ipJitterBufferMisc->IsSessionExpired())
- RequestEventCallBack(JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED);
+ if (!ipJitterBufferMisc->IsSessionExpired())
+ RequestEventCallBack(JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED);
- /* If auto paused, implies jitter buffer is not empty */
- if ((iDelayEstablished == false) ||
+ /* If auto paused, implies jitter buffer is not empty */
+ if ((iDelayEstablished == false) ||
(iJitterBufferState == PVMF_JITTER_BUFFER_IN_TRANSITION))
- {
+ {
- Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator iter;
- for (iter = iPortParamsQueue.begin(); iter != iPortParamsQueue.end(); iter++)
- {
- PVMFJitterBufferPortParams* pPortParams = *iter;
- if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
+ Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator iter;
+ for (iter = iPortParamsQueue.begin(); iter != iPortParamsQueue.end(); iter++)
{
- pPortParams->ipJitterBuffer->NotifyCanRetrievePacket();
+ PVMFJitterBufferPortParams* pPortParams = *iter;
+ if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
+ {
+ pPortParams->ipJitterBuffer->NotifyCanRetrievePacket();
+ }
}
- }
- /*
- * Move start to current msg queue where it would stay
- * jitter buffer is full.
- */
- oStartPending = true;
- MoveCmdToCurrentQueue(aCmd);
- ReportInfoEvent(PVMFInfoBufferingStart);
- RequestEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
- }
- else
- {
- if (false == iMediaReceiveingChannelPrepared)
- {
+ /*
+ * Move start to current msg queue where it would stay
+ * jitter buffer is full.
+ */
oStartPending = true;
MoveCmdToCurrentQueue(aCmd);
+ ReportInfoEvent(PVMFInfoBufferingStart);
+ RequestEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
}
else
{
- /* Just resuming from a paused state with enough data in jitter buffer */
- oStartPending = false;
- SetState(EPVMFNodeStarted);
- /* Enable Output Ports */
- StartOutputPorts();
- CommandComplete(iInputCommands, aCmd, PVMFSuccess);
+ if (false == iMediaReceiveingChannelPrepared)
+ {
+ oStartPending = true;
+ MoveCmdToCurrentQueue(aCmd);
+ }
+ else
+ {
+ /* Just resuming from a paused state with enough data in jitter buffer */
+ oStartPending = false;
+ SetState(EPVMFNodeStarted);
+ /* Enable Output Ports */
+ StartOutputPorts();
+ CommandComplete(iInputCommands, aCmd, PVMFSuccess);
+ }
}
}
- }
- break;
+ break;
default:
status = PVMFErrInvalidState;
@@ -2860,36 +2860,36 @@
case EPVMFNodePrepared:
case EPVMFNodePaused:
case EPVMFNodeStarted:
- {
- /* transition to Started */
- oStartPending = false;
- SetState(EPVMFNodeStarted);
- /* Enable Output Ports */
- StartOutputPorts();
- /* Enable remote activity monitoring */
- Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
- for (it = iPortParamsQueue.begin(); it != iPortParamsQueue.end(); it++)
{
- PVMFJitterBufferPortParams* pPortParams = *it;
- if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
+ /* transition to Started */
+ oStartPending = false;
+ SetState(EPVMFNodeStarted);
+ /* Enable Output Ports */
+ StartOutputPorts();
+ /* Enable remote activity monitoring */
+ Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
+ for (it = iPortParamsQueue.begin(); it != iPortParamsQueue.end(); it++)
{
- pPortParams->iMonitorForRemoteActivity = true;
+ PVMFJitterBufferPortParams* pPortParams = *it;
+ if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
+ {
+ pPortParams->iMonitorForRemoteActivity = true;
+ }
}
+ CommandComplete(aCmd, PVMFSuccess);
+ /* Erase the command from the current queue */
+ iCurrentCommand.Erase(&iCurrentCommand.front());
}
- CommandComplete(aCmd, PVMFSuccess);
- /* Erase the command from the current queue */
- iCurrentCommand.Erase(&iCurrentCommand.front());
- }
- break;
+ break;
default:
- {
- SetState(EPVMFNodeError);
- CommandComplete(aCmd, PVMFErrInvalidState);
- /* Erase the command from the current queue */
- iCurrentCommand.Erase(&iCurrentCommand.front());
- }
- break;
+ {
+ SetState(EPVMFNodeError);
+ CommandComplete(aCmd, PVMFErrInvalidState);
+ /* Erase the command from the current queue */
+ iCurrentCommand.Erase(&iCurrentCommand.front());
+ }
+ break;
}
}
else
@@ -2924,44 +2924,44 @@
{
case EPVMFNodeStarted:
case EPVMFNodePaused:
- {
- if (ipJitterBufferMisc)
- ipJitterBufferMisc->StreamingSessionStopped();
-
- /* Clear queued messages in ports */
- for (uint32 i = 0; i < iPortVector.size(); i++)
{
- PVMFJitterBufferPortParams* pPortParams = NULL;
- bool bRet = getPortContainer(iPortVector[i], pPortParams);
- if (bRet)
- {
- if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
- {
- pPortParams->ipJitterBuffer->ResetJitterBuffer();
- }
- pPortParams->ResetParams();
- }
- iPortVector[i]->ClearMsgQueues();
- }
-
- if (aStatus == PVMFSuccess)
- {
- /* Reset State Variables */
- iDelayEstablished = false;
if (ipJitterBufferMisc)
- ipJitterBufferMisc->SetSessionDurationExpired();
- oStopOutputPorts = true;
- oStartPending = false;
- iJitterBufferState = PVMF_JITTER_BUFFER_READY;
- iJitterDelayPercent = 0;
+ ipJitterBufferMisc->StreamingSessionStopped();
- /* transition to Prepared state */
- SetState(EPVMFNodePrepared);
+ /* Clear queued messages in ports */
+ for (uint32 i = 0; i < iPortVector.size(); i++)
+ {
+ PVMFJitterBufferPortParams* pPortParams = NULL;
+ bool bRet = getPortContainer(iPortVector[i], pPortParams);
+ if (bRet)
+ {
+ if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
+ {
+ pPortParams->ipJitterBuffer->ResetJitterBuffer();
+ }
+ pPortParams->ResetParams();
+ }
+ iPortVector[i]->ClearMsgQueues();
+ }
+
+ if (aStatus == PVMFSuccess)
+ {
+ /* Reset State Variables */
+ iDelayEstablished = false;
+ if (ipJitterBufferMisc)
+ ipJitterBufferMisc->SetSessionDurationExpired();
+ oStopOutputPorts = true;
+ oStartPending = false;
+ iJitterBufferState = PVMF_JITTER_BUFFER_READY;
+ iJitterDelayPercent = 0;
+
+ /* transition to Prepared state */
+ SetState(EPVMFNodePrepared);
+ }
+ CommandComplete(iInputCommands, aCmd, aStatus);
}
- CommandComplete(iInputCommands, aCmd, aStatus);
- }
- break;
+ break;
default:
CommandComplete(iInputCommands, aCmd, PVMFErrInvalidState);
@@ -2987,18 +2987,18 @@
{
case EPVMFNodeStarted:
case EPVMFNodePaused:
- {
- uint32 currticks = OsclTickCount::TickCount();
- iPauseTime = OsclTickCount::TicksToMsec(currticks);
- ipJitterBufferMisc->StreamingSessionPaused();
- SetState(EPVMFNodePaused);
- StopOutputPorts();
- CancelEventCallBack(JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED);
- CancelEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
- PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::DoPause Success"));
- CommandComplete(iInputCommands, aCmd, PVMFSuccess);
- }
- break;
+ {
+ uint32 currticks = OsclTickCount::TickCount();
+ iPauseTime = OsclTickCount::TicksToMsec(currticks);
+ ipJitterBufferMisc->StreamingSessionPaused();
+ SetState(EPVMFNodePaused);
+ StopOutputPorts();
+ CancelEventCallBack(JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED);
+ CancelEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
+ PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::DoPause Success"));
+ CommandComplete(iInputCommands, aCmd, PVMFSuccess);
+ }
+ break;
default:
PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode::DoPause PVMFErrInvalidState iInterfaceState %d", iInterfaceState));
@@ -3193,95 +3193,95 @@
switch (aEvent.GetEventType())
{
case PVMFInfoUnderflow:
- {
- RequestEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
- if (oStartPending == false)
{
- UpdateRebufferingStats(PVMFInfoUnderflow);
- ipJitterBufferMisc->StreamingSessionBufferingStart();
- ReportInfoEvent(PVMFInfoUnderflow);
- ReportInfoEvent(PVMFInfoBufferingStart);
- ReportInfoEvent(PVMFInfoBufferingStatus);
+ RequestEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
+ if (oStartPending == false)
+ {
+ UpdateRebufferingStats(PVMFInfoUnderflow);
+ ipJitterBufferMisc->StreamingSessionBufferingStart();
+ ReportInfoEvent(PVMFInfoUnderflow);
+ ReportInfoEvent(PVMFInfoBufferingStart);
+ ReportInfoEvent(PVMFInfoBufferingStatus);
+ }
}
- }
- break;
+ break;
case PVMFInfoDataReady:
- {
- UpdateRebufferingStats(PVMFInfoDataReady);
- ReportInfoEvent(PVMFInfoBufferingStatus);
- ReportInfoEvent(PVMFInfoDataReady);
- ReportInfoEvent(PVMFInfoBufferingComplete);
- CancelEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
-
- Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
- for (it = iPortParamsQueue.begin(); it != iPortParamsQueue.end(); it++)
{
- PVMFJitterBufferPortParams* pPortParams = *it;
- if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
+ UpdateRebufferingStats(PVMFInfoDataReady);
+ ReportInfoEvent(PVMFInfoBufferingStatus);
+ ReportInfoEvent(PVMFInfoDataReady);
+ ReportInfoEvent(PVMFInfoBufferingComplete);
+ CancelEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
+
+ Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
+ for (it = iPortParamsQueue.begin(); it != iPortParamsQueue.end(); it++)
{
- pPortParams->iCanReceivePktFromJB = true;
- pPortParams->ipJitterBuffer->CancelNotifyCanRetrievePacket();
- PVMFJitterBufferStats stats = pPortParams->ipJitterBuffer->getJitterBufferStats();
- PVMF_JBNODE_LOGDATATRAFFIC((0, "Mime %s stats.currentOccupancy[%d], stats.maxSeqNumRegistered[%d], stats.lastRetrievedSeqNum[%d] stats.maxTimeStampRetrievedWithoutRTPOffset[%d]", pPortParams->iMimeType.get_cstr(), stats.currentOccupancy, stats.maxSeqNumRegistered, stats.lastRetrievedSeqNum, stats.maxTimeStampRetrievedWithoutRTPOffset));
+ PVMFJitterBufferPortParams* pPortParams = *it;
+ if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
+ {
+ pPortParams->iCanReceivePktFromJB = true;
+ pPortParams->ipJitterBuffer->CancelNotifyCanRetrievePacket();
+ PVMFJitterBufferStats stats = pPortParams->ipJitterBuffer->getJitterBufferStats();
+ PVMF_JBNODE_LOGDATATRAFFIC((0, "Mime %s stats.currentOccupancy[%d], stats.maxSeqNumRegistered[%d], stats.lastRetrievedSeqNum[%d] stats.maxTimeStampRetrievedWithoutRTPOffset[%d]", pPortParams->iMimeType.get_cstr(), stats.currentOccupancy, stats.maxSeqNumRegistered, stats.lastRetrievedSeqNum, stats.maxTimeStampRetrievedWithoutRTPOffset));
+ }
+ }
+
+ if (oStartPending)
+ {
+ CompleteStart();
+ }
+ else
+ {
+ ipJitterBufferMisc->StreamingSessionBufferingEnd();
+
}
}
-
- if (oStartPending)
- {
- CompleteStart();
- }
- else
- {
- ipJitterBufferMisc->StreamingSessionBufferingEnd();
-
- }
- }
- break;
+ break;
case PVMFInfoOverflow:
- {
- ReportInfoEvent(PVMFInfoOverflow);
- }
- break;
+ {
+ ReportInfoEvent(PVMFInfoOverflow);
+ }
+ break;
case PVMFJitterBufferNodeJitterBufferLowWaterMarkReached:
- {
- Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator iter;
- for (iter = iPortParamsQueue.begin(); iter != iPortParamsQueue.end(); iter++)
{
- PVMFJitterBufferPortParams* pPortParams = *iter;
- if (pPortParams->iMonitorForRemoteActivity == false)
+ Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator iter;
+ for (iter = iPortParamsQueue.begin(); iter != iPortParamsQueue.end(); iter++)
{
- pPortParams->iMonitorForRemoteActivity = true;
- RequestEventCallBack(JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED);
- }
+ PVMFJitterBufferPortParams* pPortParams = *iter;
+ if (pPortParams->iMonitorForRemoteActivity == false)
+ {
+ pPortParams->iMonitorForRemoteActivity = true;
+ RequestEventCallBack(JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED);
+ }
- }
- ReportInfoEvent(PVMFJitterBufferNodeJitterBufferLowWaterMarkReached);
- }
- break;
- case PVMFJitterBufferNodeJitterBufferHighWaterMarkReached:
- {
- Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator iter;
- for (iter = iPortParamsQueue.begin(); iter != iPortParamsQueue.end(); iter++)
- {
- PVMFJitterBufferPortParams* pPortParams = *iter;
- if (pPortParams->iMonitorForRemoteActivity == true)
- {
- pPortParams->iMonitorForRemoteActivity = false;
- CancelEventCallBack(JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED);
}
+ ReportInfoEvent(PVMFJitterBufferNodeJitterBufferLowWaterMarkReached);
}
- ReportInfoEvent(PVMFJitterBufferNodeJitterBufferHighWaterMarkReached);
- }
- break;
+ break;
+ case PVMFJitterBufferNodeJitterBufferHighWaterMarkReached:
+ {
+ Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator iter;
+ for (iter = iPortParamsQueue.begin(); iter != iPortParamsQueue.end(); iter++)
+ {
+ PVMFJitterBufferPortParams* pPortParams = *iter;
+ if (pPortParams->iMonitorForRemoteActivity == true)
+ {
+ pPortParams->iMonitorForRemoteActivity = false;
+ CancelEventCallBack(JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED);
+ }
+ }
+ ReportInfoEvent(PVMFJitterBufferNodeJitterBufferHighWaterMarkReached);
+ }
+ break;
case PVMFJitterBufferNodeStreamThinningRecommended:
- {
- PVMFNodeInterface::ReportInfoEvent(aEvent);
- }
- break;
+ {
+ PVMFNodeInterface::ReportInfoEvent(aEvent);
+ }
+ break;
default:
- {
- //noop
- }
+ {
+ //noop
+ }
}
}
@@ -3321,8 +3321,8 @@
{
Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
for (it = iPortParamsQueue.begin();
- it != iPortParamsQueue.end();
- it++)
+ it != iPortParamsQueue.end();
+ it++)
{
PVMFJitterBufferPortParams* pJitterBufferPortParams = *it;
if (pJitterBufferPortParams->iMonitorForRemoteActivity == false)
@@ -3463,8 +3463,8 @@
/* Force out of rebuffering */
Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
for (it = iPortParamsQueue.begin();
- it != iPortParamsQueue.end();
- it++)
+ it != iPortParamsQueue.end();
+ it++)
{
PVMFJitterBufferPortParams* pPortParams = *it;
if (pPortParams->iTag == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT)
@@ -3497,8 +3497,8 @@
Oscl_Vector<PVMFJitterBufferPortParams*, OsclMemAllocator>::iterator it;
for (it = iPortParamsQueue.begin();
- it != iPortParamsQueue.end();
- it++)
+ it != iPortParamsQueue.end();
+ it++)
{
PVMFJitterBufferPortParams* pPortParams = *it;
if (&pPortParams->irPort == aPort)
@@ -3518,34 +3518,34 @@
switch (aEventType)
{
case JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED:
- {
- PVMFJBEventNotificationRequestInfo eventRequestInfo(CLOCK_NOTIFICATION_INTF_TYPE_NONDECREASING, this, NULL);
- retval = ipEventNotifier->RequestCallBack(eventRequestInfo, iMaxInactivityDurationForMediaInMs, iIncomingMediaInactivityDurationCallBkId);
- if (retval)
{
- iIncomingMediaInactivityDurationCallBkPending = true;
+ PVMFJBEventNotificationRequestInfo eventRequestInfo(CLOCK_NOTIFICATION_INTF_TYPE_NONDECREASING, this, NULL);
+ retval = ipEventNotifier->RequestCallBack(eventRequestInfo, iMaxInactivityDurationForMediaInMs, iIncomingMediaInactivityDurationCallBkId);
+ if (retval)
+ {
+ iIncomingMediaInactivityDurationCallBkPending = true;
+ }
}
- }
- break;
+ break;
case JB_NOTIFY_REPORT_BUFFERING_STATUS:
- {
- if (iNotifyBufferingStatusCallBkPending)
{
- CancelEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
+ if (iNotifyBufferingStatusCallBkPending)
+ {
+ CancelEventCallBack(JB_NOTIFY_REPORT_BUFFERING_STATUS);
+ }
+ PVMFJBEventNotificationRequestInfo eventRequestInfo(CLOCK_NOTIFICATION_INTF_TYPE_NONDECREASING, this, NULL);
+ retval = ipEventNotifier->RequestCallBack(eventRequestInfo, iBufferingStatusIntervalInMs, iNotifyBufferingStatusCallBkId);
+ if (retval)
+ {
+ iNotifyBufferingStatusCallBkPending = true;
+ }
}
- PVMFJBEventNotificationRequestInfo eventRequestInfo(CLOCK_NOTIFICATION_INTF_TYPE_NONDECREASING, this, NULL);
- retval = ipEventNotifier->RequestCallBack(eventRequestInfo, iBufferingStatusIntervalInMs, iNotifyBufferingStatusCallBkId);
- if (retval)
- {
- iNotifyBufferingStatusCallBkPending = true;
- }
- }
- break;
+ break;
default:
- {
- //Log it
- }
+ {
+ //Log it
+ }
}
return retval;
}
@@ -3556,30 +3556,30 @@
switch (aEventType)
{
case JB_INCOMING_MEDIA_INACTIVITY_DURATION_EXPIRED:
- {
- if (iIncomingMediaInactivityDurationCallBkPending)
{
- PVMFJBEventNotificationRequestInfo eventRequestInfo(CLOCK_NOTIFICATION_INTF_TYPE_NONDECREASING, this, NULL);
- ipEventNotifier->CancelCallBack(eventRequestInfo, iIncomingMediaInactivityDurationCallBkId);
- iIncomingMediaInactivityDurationCallBkPending = false;
+ if (iIncomingMediaInactivityDurationCallBkPending)
+ {
+ PVMFJBEventNotificationRequestInfo eventRequestInfo(CLOCK_NOTIFICATION_INTF_TYPE_NONDECREASING, this, NULL);
+ ipEventNotifier->CancelCallBack(eventRequestInfo, iIncomingMediaInactivityDurationCallBkId);
+ iIncomingMediaInactivityDurationCallBkPending = false;
+ }
}
- }
- break;
+ break;
case JB_NOTIFY_REPORT_BUFFERING_STATUS:
- {
- if (iNotifyBufferingStatusCallBkPending)
{
- PVMFJBEventNotificationRequestInfo eventRequestInfo(CLOCK_NOTIFICATION_INTF_TYPE_NONDECREASING, this, NULL);
- ipEventNotifier->CancelCallBack(eventRequestInfo, iNotifyBufferingStatusCallBkId);
- iNotifyBufferingStatusCallBkPending = false;
+ if (iNotifyBufferingStatusCallBkPending)
+ {
+ PVMFJBEventNotificationRequestInfo eventRequestInfo(CLOCK_NOTIFICATION_INTF_TYPE_NONDECREASING, this, NULL);
+ ipEventNotifier->CancelCallBack(eventRequestInfo, iNotifyBufferingStatusCallBkId);
+ iNotifyBufferingStatusCallBkPending = false;
+ }
}
- }
- break;
+ break;
default:
- {
- //Log it
- }
+ {
+ //Log it
+ }
}
return;
}
@@ -3591,9 +3591,9 @@
}
void PVMFJitterBufferNode::ReportErrorEvent(PVMFEventType aEventType,
- OsclAny* aEventData,
- PVUuid* aEventUUID,
- int32* aEventCode)
+ OsclAny* aEventData,
+ PVUuid* aEventUUID,
+ int32* aEventCode)
{
PVMF_JBNODE_LOGERROR((0, "PVMFJitterBufferNode:NodeErrorEvent Type %d Data %d"
, aEventType, aEventData));
@@ -3619,9 +3619,9 @@
}
void PVMFJitterBufferNode::ReportInfoEvent(PVMFEventType aEventType,
- OsclAny* aEventData,
- PVUuid* aEventUUID,
- int32* aEventCode)
+ OsclAny* aEventData,
+ PVUuid* aEventUUID,
+ int32* aEventCode)
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferNode:NodeInfoEvent Type %d Data %d"
, aEventType, aEventData));
@@ -3642,7 +3642,7 @@
PVMFBasicErrorInfoMessage* eventmsg;
PVMF_JITTER_BUFFER_NEW(NULL, PVMFBasicErrorInfoMessage, (*aEventCode, *aEventUUID, NULL), eventmsg);
PVMFErrorInfoMessageInterface* interimPtr =
- OSCL_STATIC_CAST(PVMFErrorInfoMessageInterface*, eventmsg);
+ OSCL_STATIC_CAST(PVMFErrorInfoMessageInterface*, eventmsg);
PVMFAsyncEvent asyncevent(PVMFInfoEvent,
aEventType,
NULL,
@@ -3706,9 +3706,9 @@
uint32 currentTimeBase32 = 0;
bool overflowFlag = false;
ipJitterBufferMisc->GetEstimatedServerClock().GetCurrentTime32(currentTime32,
- overflowFlag,
- PVMF_MEDIA_CLOCK_MSEC,
- currentTimeBase32);
+ overflowFlag,
+ PVMF_MEDIA_CLOCK_MSEC,
+ currentTimeBase32);
uint32 bitrate32 = 0;
uint32 totalNumBytesRecvd = jbStats.totalNumBytesRecvd;
if (currentTime32 != 0)
@@ -3749,7 +3749,7 @@
{
PVMFJitterBufferPortParams* pPortParams = *it;
PvmfPortBaseImpl* ptr =
- OSCL_STATIC_CAST(PvmfPortBaseImpl*, &pPortParams->irPort);
+ OSCL_STATIC_CAST(PvmfPortBaseImpl*, &pPortParams->irPort);
PvmfPortBaseImplStats stats;
ptr->GetStats(stats);
diff --git a/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_port.cpp b/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_port.cpp
index d7056d8..67864bf 100644
--- a/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_port.cpp
+++ b/nodes/streaming/jitterbuffernode/src/pvmf_jitter_buffer_port.cpp
@@ -49,24 +49,24 @@
////////////////////////////////////////////////////////////////////////////
PVMFJitterBufferPort::PVMFJitterBufferPort(int32 aTag, PVMFJitterBufferNode& aNode, const char*name)
- : PvmfPortBaseImpl(aTag, &aNode, name)
- , iFormat(PVMF_MIME_FORMAT_UNKNOWN)
- , irJitterBufferNode(aNode)
+ : PvmfPortBaseImpl(aTag, &aNode, name)
+ , iFormat(PVMF_MIME_FORMAT_UNKNOWN)
+ , irJitterBufferNode(aNode)
{
Construct();
}
////////////////////////////////////////////////////////////////////////////
PVMFJitterBufferPort::PVMFJitterBufferPort(int32 aTag, PVMFJitterBufferNode& aNode
- , uint32 aInCapacity
- , uint32 aInReserve
- , uint32 aInThreshold
- , uint32 aOutCapacity
- , uint32 aOutReserve
- , uint32 aOutThreshold, const char*name)
- : PvmfPortBaseImpl(aTag, &aNode, aInCapacity, aInReserve, aInThreshold, aOutCapacity, aOutReserve, aOutThreshold, name)
- , iFormat(PVMF_MIME_FORMAT_UNKNOWN)
- , irJitterBufferNode(aNode)
+ , uint32 aInCapacity
+ , uint32 aInReserve
+ , uint32 aInThreshold
+ , uint32 aOutCapacity
+ , uint32 aOutReserve
+ , uint32 aOutThreshold, const char*name)
+ : PvmfPortBaseImpl(aTag, &aNode, aInCapacity, aInReserve, aInThreshold, aOutCapacity, aOutReserve, aOutThreshold, name)
+ , iFormat(PVMF_MIME_FORMAT_UNKNOWN)
+ , irJitterBufferNode(aNode)
{
Construct();
}
@@ -126,7 +126,7 @@
}
if ((iPortType == PVMF_JITTER_BUFFER_PORT_TYPE_INPUT) ||
- (iPortType == PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK))
+ (iPortType == PVMF_JITTER_BUFFER_PORT_TYPE_FEEDBACK))
{
OsclAny* temp = NULL;
aPort->QueryInterface(PVMI_CAPABILITY_AND_CONFIG_PVUUID, temp);
@@ -137,12 +137,12 @@
int numKvp = 0;
PvmiKvp* kvpPtr = NULL;
PVMFStatus status =
- config->getParametersSync(NULL, (char*)PVMI_PORT_CONFIG_INPLACE_DATA_PROCESSING_KEY, kvpPtr, numKvp, NULL);
+ config->getParametersSync(NULL, (char*)PVMI_PORT_CONFIG_INPLACE_DATA_PROCESSING_KEY, kvpPtr, numKvp, NULL);
if (status == PVMFSuccess)
{
bool inPlaceDataProcessing = kvpPtr[0].value.bool_value;
irJitterBufferNode.SetInPlaceProcessingMode(OSCL_STATIC_CAST(PVMFPortInterface*, this),
- inPlaceDataProcessing);
+ inPlaceDataProcessing);
}
config->releaseParameters(NULL, kvpPtr, numKvp);
}
@@ -162,10 +162,10 @@
}
////////////////////////////////////////////////////////////////////////////
PVMFStatus PVMFJitterBufferPort::getParametersSync(PvmiMIOSession aSession,
- PvmiKeyType aIdentifier,
- PvmiKvp*& aParameters,
- int& num_parameter_elements,
- PvmiCapabilityContext aContext)
+ PvmiKeyType aIdentifier,
+ PvmiKvp*& aParameters,
+ int& num_parameter_elements,
+ PvmiCapabilityContext aContext)
{
OSCL_UNUSED_ARG(aIdentifier);
OSCL_UNUSED_ARG(aParameters);
@@ -179,8 +179,8 @@
////////////////////////////////////////////////////////////////////////////
PVMFStatus PVMFJitterBufferPort::releaseParameters(PvmiMIOSession aSession,
- PvmiKvp* aParameters,
- int num_elements)
+ PvmiKvp* aParameters,
+ int num_elements)
{
OSCL_UNUSED_ARG(aSession);
@@ -188,7 +188,7 @@
aSession, aParameters, num_elements));
if ((num_elements != 1) ||
- (pv_mime_strcmp(aParameters->key, PVMF_JITTER_BUFFER_PORT_SPECIFIC_ALLOCATOR_VALTYPE) != 0))
+ (pv_mime_strcmp(aParameters->key, PVMF_JITTER_BUFFER_PORT_SPECIFIC_ALLOCATOR_VALTYPE) != 0))
{
PVMF_JBNODE_LOGINFO((0, "PVMFJitterBufferPort::releaseParameters: Error - Not a PvmiKvp created by this port"));
return PVMFFailure;
@@ -201,9 +201,9 @@
////////////////////////////////////////////////////////////////////////////
void PVMFJitterBufferPort::setParametersSync(PvmiMIOSession aSession,
- PvmiKvp* aParameters,
- int num_elements,
- PvmiKvp * & aRet_kvp)
+ PvmiKvp* aParameters,
+ int num_elements,
+ PvmiKvp * & aRet_kvp)
{
OSCL_UNUSED_ARG(aSession);
OSCL_UNUSED_ARG(aParameters);
@@ -296,10 +296,3 @@
return (PvmfPortBaseImpl::IsOutgoingQueueBusy());
#endif
}
-
-
-
-
-
-
-
diff --git a/pvmi/pvmf/include/pvmf_node_interface.h b/pvmi/pvmf/include/pvmf_node_interface.h
index cf27177..9390208 100644
--- a/pvmi/pvmf/include/pvmf_node_interface.h
+++ b/pvmi/pvmf/include/pvmf_node_interface.h
@@ -56,18 +56,18 @@
/**
-The events generated by the generic node/port base classes and the sample node
-have all been replaced with the PVMF event codes, so no event or error codes
-are defined here. However, some nodes may still define additional event codes
-starting with these placeholder values. The values are chosen to avoid conflict
-with any PVMF return codes.
+ The events generated by the generic node/port base classes and the sample node
+ have all been replaced with the PVMF event codes, so no event or error codes
+ are defined here. However, some nodes may still define additional event codes
+ starting with these placeholder values. The values are chosen to avoid conflict
+ with any PVMF return codes.
**/
#define PVMF_NODE_INFO_EVENT_LAST 4096
#define PVMF_NODE_ERROR_EVENT_LAST 8192
/**
-Node states
+ Node states
**/
typedef enum
{
@@ -82,7 +82,7 @@
} TPVMFNodeInterfaceState;
/**
-Oscl shared libary class
+ Oscl shared libary class
**/
class OsclSharedLibrary;
@@ -100,15 +100,15 @@
**/
class PVMFNodeErrorEventObserver
{
- public:
- /**
- * Handle an error event that has been generated.
- *
- * @param "aEvent" "The event to be handled."
- */
- virtual void HandleNodeErrorEvent(const PVMFAsyncEvent& aEvent) = 0;
+ public:
+ /**
+ * Handle an error event that has been generated.
+ *
+ * @param "aEvent" "The event to be handled."
+ */
+ virtual void HandleNodeErrorEvent(const PVMFAsyncEvent& aEvent) = 0;
- virtual ~PVMFNodeErrorEventObserver() {}
+ virtual ~PVMFNodeErrorEventObserver() {}
};
/**
@@ -125,15 +125,15 @@
**/
class PVMFNodeInfoEventObserver
{
- public:
- /**
- * Handle an informational event that has been generated.
- *
- * @param "aEvent" "The event to be handled."
- */
- virtual void HandleNodeInformationalEvent(const PVMFAsyncEvent& aEvent) = 0;
+ public:
+ /**
+ * Handle an informational event that has been generated.
+ *
+ * @param "aEvent" "The event to be handled."
+ */
+ virtual void HandleNodeInformationalEvent(const PVMFAsyncEvent& aEvent) = 0;
- virtual ~PVMFNodeInfoEventObserver() {}
+ virtual ~PVMFNodeInfoEventObserver() {}
};
@@ -151,15 +151,15 @@
**/
class PVMFNodeCmdStatusObserver
{
- public:
- /**
- Handle an event that has been generated.
+ public:
+ /**
+ Handle an event that has been generated.
- @param "aResponse" "The response to a previously issued command."
- */
- virtual void NodeCommandCompleted(const PVMFCmdResp& aResponse) = 0;
+ @param "aResponse" "The response to a previously issued command."
+ */
+ virtual void NodeCommandCompleted(const PVMFCmdResp& aResponse) = 0;
- virtual ~PVMFNodeCmdStatusObserver() {}
+ virtual ~PVMFNodeCmdStatusObserver() {}
};
@@ -167,321 +167,321 @@
/**
-A simple iterator for ports which just returns the number of ports and the next in the list
+ A simple iterator for ports which just returns the number of ports and the next in the list
**/
class PVMFPortIter : public HeapBase
{
- public:
- virtual uint16 NumPorts() = 0;
- virtual PVMFPortInterface* GetNext() = 0;
- virtual void Reset() = 0;
- virtual ~PVMFPortIter() {}
+ public:
+ virtual uint16 NumPorts() = 0;
+ virtual PVMFPortInterface* GetNext() = 0;
+ virtual void Reset() = 0;
+ virtual ~PVMFPortIter() {}
};
/**
-A base class for filter for ports
+ A base class for filter for ports
**/
class PVMFPortFilter
{
- public:
- PVMFPortFilter() {};
+ public:
+ PVMFPortFilter() {};
};
class PVMFNodeSessionInfo
{
- public:
- PVMFNodeSessionInfo()
- : iCmdStatusObserver(NULL)
- , iInfoObserver(NULL)
- , iErrorObserver(NULL)
- , iInfoContext(NULL)
- , iErrorContext(NULL)
- {}
- PVMFNodeSessionInfo(PVMFNodeCmdStatusObserver*c, PVMFNodeInfoEventObserver*i, OsclAny* ic, PVMFNodeErrorEventObserver*e, OsclAny* ec)
- : iCmdStatusObserver(c)
- , iInfoObserver(i)
- , iErrorObserver(e)
- , iInfoContext(ic)
- , iErrorContext(ec)
- {}
- PVMFNodeCmdStatusObserver* iCmdStatusObserver;
- PVMFNodeInfoEventObserver* iInfoObserver;
- PVMFNodeErrorEventObserver* iErrorObserver;
- OsclAny* iInfoContext;
- OsclAny* iErrorContext;
+ public:
+ PVMFNodeSessionInfo()
+ : iCmdStatusObserver(NULL)
+ , iInfoObserver(NULL)
+ , iErrorObserver(NULL)
+ , iInfoContext(NULL)
+ , iErrorContext(NULL)
+ {}
+ PVMFNodeSessionInfo(PVMFNodeCmdStatusObserver*c, PVMFNodeInfoEventObserver*i, OsclAny* ic, PVMFNodeErrorEventObserver*e, OsclAny* ec)
+ : iCmdStatusObserver(c)
+ , iInfoObserver(i)
+ , iErrorObserver(e)
+ , iInfoContext(ic)
+ , iErrorContext(ec)
+ {}
+ PVMFNodeCmdStatusObserver* iCmdStatusObserver;
+ PVMFNodeInfoEventObserver* iInfoObserver;
+ PVMFNodeErrorEventObserver* iErrorObserver;
+ OsclAny* iInfoContext;
+ OsclAny* iErrorContext;
};
#define PVMF_NODE_DEFAULT_SESSION_RESERVE 10
class PVMFNodeSession
{
- public:
- PVMFSessionId iId;
- PVMFNodeSessionInfo iInfo;
+ public:
+ PVMFSessionId iId;
+ PVMFNodeSessionInfo iInfo;
};
class PVMFPortActivity;
class PVMFPortActivityHandler
{
- public:
- virtual void HandlePortActivity(const PVMFPortActivity &) = 0;
+ public:
+ virtual void HandlePortActivity(const PVMFPortActivity &) = 0;
};
class PVMFNodeInterface: public PVMFPortActivityHandler
{
- public:
+ public:
- virtual ~PVMFNodeInterface()
+ virtual ~PVMFNodeInterface()
+ {
+ iSessions.clear();
+ }
+
+ virtual PVMFStatus ThreadLogon() = 0;
+ virtual PVMFStatus ThreadLogoff() = 0;
+
+ virtual PVMFSessionId Connect(const PVMFNodeSessionInfo &aSession)
+ {
+ PVMFNodeSession session;
+ session.iId = iSessions.size();
+ session.iInfo = aSession;
+ iSessions.push_back(session);
+ return session.iId;
+ }
+
+ virtual PVMFStatus Disconnect(PVMFSessionId aSessionId)
+ {
+ for (uint32 i = 0;i < iSessions.size();i++)
{
- iSessions.clear();
- }
-
- virtual PVMFStatus ThreadLogon() = 0;
- virtual PVMFStatus ThreadLogoff() = 0;
-
- virtual PVMFSessionId Connect(const PVMFNodeSessionInfo &aSession)
- {
- PVMFNodeSession session;
- session.iId = iSessions.size();
- session.iInfo = aSession;
- iSessions.push_back(session);
- return session.iId;
- }
-
- virtual PVMFStatus Disconnect(PVMFSessionId aSessionId)
- {
- for (uint32 i = 0;i < iSessions.size();i++)
+ if (iSessions[i].iId == aSessionId)
{
- if (iSessions[i].iId == aSessionId)
- {
- iSessions.erase(&iSessions[i]);
- return PVMFSuccess;
- }
+ iSessions.erase(&iSessions[i]);
+ return PVMFSuccess;
}
- return PVMFFailure;
}
+ return PVMFFailure;
+ }
- /**
- GetCapability can be invoked only when after a node is initialized
- **/
- virtual PVMFStatus GetCapability(PVMFNodeCapability& aNodeCapability) = 0;
+ /**
+ GetCapability can be invoked only when after a node is initialized
+ **/
+ virtual PVMFStatus GetCapability(PVMFNodeCapability& aNodeCapability) = 0;
- /**
- * Returns a list of ports currently available in the node that meet the filter criteria
- * We can add fancier iterators and filters as needed.
- * For now we return all the available ports. If no ports are present, NULL is returned
- **/
- virtual PVMFPortIter* GetPorts(const PVMFPortFilter* aFilter = NULL) = 0;
+ /**
+ * Returns a list of ports currently available in the node that meet the filter criteria
+ * We can add fancier iterators and filters as needed.
+ * For now we return all the available ports. If no ports are present, NULL is returned
+ **/
+ virtual PVMFPortIter* GetPorts(const PVMFPortFilter* aFilter = NULL) = 0;
- /**
- * Retrieves state information of this node
- **/
- virtual TPVMFNodeInterfaceState GetState()
- {
- return iInterfaceState;
- }
+ /**
+ * Retrieves state information of this node
+ **/
+ virtual TPVMFNodeInterfaceState GetState()
+ {
+ return iInterfaceState;
+ }
- /**
- * This API is to allow for extensibility of the PVMF Node interface.
- * It allows a caller to ask for all UUIDs associated with a particular MIME type.
- * If interfaces of the requested MIME type are found within the system, they are added
- * to the UUIDs array.
- *
- * Also added to the UUIDs array will be all interfaces which have the requested MIME
- * type as a base MIME type. This functionality can be turned off.
- *
- * @param aMimeType The MIME type of the desired interfaces
- * @param aUuids A vector to hold the discovered UUIDs
- * @param aExactUuidsOnly Turns on/off the retrival of UUIDs with aMimeType as a base type
- * @param aContext Optional opaque data to be passed back to user with the command response
- * @returns A unique command id for asynchronous completion
- */
- virtual PVMFCommandId QueryUUID(PVMFSessionId aSession
- , const PvmfMimeString& aMimeType
- , Oscl_Vector<PVUuid, OsclMemAllocator>& aUuids
- , bool aExactUuidsOnly = false
- , const OsclAny* aContext = NULL) = 0;
+ /**
+ * This API is to allow for extensibility of the PVMF Node interface.
+ * It allows a caller to ask for all UUIDs associated with a particular MIME type.
+ * If interfaces of the requested MIME type are found within the system, they are added
+ * to the UUIDs array.
+ *
+ * Also added to the UUIDs array will be all interfaces which have the requested MIME
+ * type as a base MIME type. This functionality can be turned off.
+ *
+ * @param aMimeType The MIME type of the desired interfaces
+ * @param aUuids A vector to hold the discovered UUIDs
+ * @param aExactUuidsOnly Turns on/off the retrival of UUIDs with aMimeType as a base type
+ * @param aContext Optional opaque data to be passed back to user with the command response
+ * @returns A unique command id for asynchronous completion
+ */
+ virtual PVMFCommandId QueryUUID(PVMFSessionId aSession
+ , const PvmfMimeString& aMimeType
+ , Oscl_Vector<PVUuid, OsclMemAllocator>& aUuids
+ , bool aExactUuidsOnly = false
+ , const OsclAny* aContext = NULL) = 0;
- /**
- * This API is to allow for extensibility of the PVMF Node interface.
- * It allows a caller to ask for an instance of a particular interface object to be returned.
- * The mechanism is analogous to the COM IUnknown method. The interfaces are identified with
- * an interface ID that is a UUID as in DCE and a pointer to the interface object is
- * returned if it is supported. Otherwise the returned pointer is NULL.
- *
- * @param aUuid The UUID of the desired interface
- * @param aInterfacePtr The output pointer to the desired interface
- * @param aContext Optional opaque data to be passed back to user with the command response
- * @returns A unique command id for asynchronous completion
- */
- virtual PVMFCommandId QueryInterface(PVMFSessionId aSession
- , const PVUuid& aUuid
- , PVInterface*& aInterfacePtr
- , const OsclAny* aContext = NULL) = 0;
+ /**
+ * This API is to allow for extensibility of the PVMF Node interface.
+ * It allows a caller to ask for an instance of a particular interface object to be returned.
+ * The mechanism is analogous to the COM IUnknown method. The interfaces are identified with
+ * an interface ID that is a UUID as in DCE and a pointer to the interface object is
+ * returned if it is supported. Otherwise the returned pointer is NULL.
+ *
+ * @param aUuid The UUID of the desired interface
+ * @param aInterfacePtr The output pointer to the desired interface
+ * @param aContext Optional opaque data to be passed back to user with the command response
+ * @returns A unique command id for asynchronous completion
+ */
+ virtual PVMFCommandId QueryInterface(PVMFSessionId aSession
+ , const PVUuid& aUuid
+ , PVInterface*& aInterfacePtr
+ , const OsclAny* aContext = NULL) = 0;
- /**
- * Requests the node to return a port meeting certain criteria for format types and buffering
- * capabilities. The node may return a reference to an already created unused port or it may dynamically
- * create one if it has the capability to do so. Since there might be some port specific initializations
- * that might need to be done for ports created on demand, it will be most flexible to have this as an
- * asynchronous API.
- * A reference to the port interface is returned with the the command completion. It is passed as an auto ptr
- * carrying opaque data that needs to be cast to PVMFPortInterface*
- * @exception PVMFErrNotSupported leaves if this is not supported.
- **/
- virtual PVMFCommandId RequestPort(PVMFSessionId aSession
- , int32 aPortTag
- , const PvmfMimeString* aPortConfig = NULL
- , const OsclAny* aContext = NULL) = 0;
-
- /**
- * Releases a port back to the owning node.
- * @exception PVMFErrArgument leaves if this node is not the owner.
- **/
- virtual PVMFCommandId ReleasePort(PVMFSessionId aSession
- , PVMFPortInterface& aPort
- , const OsclAny* aContext = NULL) = 0;
-
- /**
- * Starts initialization of the node. At the minimum, the node should be ready to advertize its
- * capabilities after initialization is complete
- **/
- virtual PVMFCommandId Init(PVMFSessionId aSession
- , const OsclAny* aContext = NULL) = 0;
-
- /**
- * Starts preparation of the node.
- * Node should be ready to Start after the Prepare is
- * complete.
- **/
- virtual PVMFCommandId Prepare(PVMFSessionId aSession
+ /**
+ * Requests the node to return a port meeting certain criteria for format types and buffering
+ * capabilities. The node may return a reference to an already created unused port or it may dynamically
+ * create one if it has the capability to do so. Since there might be some port specific initializations
+ * that might need to be done for ports created on demand, it will be most flexible to have this as an
+ * asynchronous API.
+ * A reference to the port interface is returned with the the command completion. It is passed as an auto ptr
+ * carrying opaque data that needs to be cast to PVMFPortInterface*
+ * @exception PVMFErrNotSupported leaves if this is not supported.
+ **/
+ virtual PVMFCommandId RequestPort(PVMFSessionId aSession
+ , int32 aPortTag
+ , const PvmfMimeString* aPortConfig = NULL
, const OsclAny* aContext = NULL) = 0;
- /**
- * Causes the node to start servicing all connected ports.
- **/
- virtual PVMFCommandId Start(PVMFSessionId aSession
- , const OsclAny* aContext = NULL) = 0;
+ /**
+ * Releases a port back to the owning node.
+ * @exception PVMFErrArgument leaves if this node is not the owner.
+ **/
+ virtual PVMFCommandId ReleasePort(PVMFSessionId aSession
+ , PVMFPortInterface& aPort
+ , const OsclAny* aContext = NULL) = 0;
- /**
- * Causes the node to stop servicing all connected ports and
- * discard any un-processed data.
- **/
- virtual PVMFCommandId Stop(PVMFSessionId aSession
- , const OsclAny* aContext = NULL) = 0;
+ /**
+ * Starts initialization of the node. At the minimum, the node should be ready to advertize its
+ * capabilities after initialization is complete
+ **/
+ virtual PVMFCommandId Init(PVMFSessionId aSession
+ , const OsclAny* aContext = NULL) = 0;
- /**
- * Causes the node to stop servicing all connected ports as
- * soon as current data is processed.
- **/
- virtual PVMFCommandId Flush(PVMFSessionId aSession
- , const OsclAny* aContext = NULL) = 0;
+ /**
+ * Starts preparation of the node.
+ * Node should be ready to Start after the Prepare is
+ * complete.
+ **/
+ virtual PVMFCommandId Prepare(PVMFSessionId aSession
+ , const OsclAny* aContext = NULL) = 0;
- /**
- * Causes the node to pause servicing all connected ports without
- * discarding un-processed data.
- **/
- virtual PVMFCommandId Pause(PVMFSessionId aSession
- , const OsclAny* aContext = NULL) = 0;
+ /**
+ * Causes the node to start servicing all connected ports.
+ **/
+ virtual PVMFCommandId Start(PVMFSessionId aSession
+ , const OsclAny* aContext = NULL) = 0;
- /**
- * Resets the node. The node should relinquish all resources that is has acquired as part of the
- * initialization process and should be ready to be deleted when this completes.
- **/
- virtual PVMFCommandId Reset(PVMFSessionId aSession
- , const OsclAny* aContext = NULL) = 0;
+ /**
+ * Causes the node to stop servicing all connected ports and
+ * discard any un-processed data.
+ **/
+ virtual PVMFCommandId Stop(PVMFSessionId aSession
+ , const OsclAny* aContext = NULL) = 0;
- /**
- * Cancel all pending requests. The current request being processed, if any, will also be aborted.
- *
- * @param aContextData Optional opaque data that will be passed back to the user with the command response
- * @returns A unique command id for asynchronous completion
- */
- virtual PVMFCommandId CancelAllCommands(PVMFSessionId aSession
- , const OsclAny* aContextData = NULL) = 0;
+ /**
+ * Causes the node to stop servicing all connected ports as
+ * soon as current data is processed.
+ **/
+ virtual PVMFCommandId Flush(PVMFSessionId aSession
+ , const OsclAny* aContext = NULL) = 0;
- /**
- * Cancels pending command with the specified ID.
- *
- * @param aCmdId Command Id of the command to be cancelled
- * @param aContextData Optional opaque data that will be passed back to the user with the command response
- * @returns A unique command id for asynchronous completion
- */
- virtual PVMFCommandId CancelCommand(PVMFSessionId aSession
- , PVMFCommandId aCmdId
+ /**
+ * Causes the node to pause servicing all connected ports without
+ * discarding un-processed data.
+ **/
+ virtual PVMFCommandId Pause(PVMFSessionId aSession
+ , const OsclAny* aContext = NULL) = 0;
+
+ /**
+ * Resets the node. The node should relinquish all resources that is has acquired as part of the
+ * initialization process and should be ready to be deleted when this completes.
+ **/
+ virtual PVMFCommandId Reset(PVMFSessionId aSession
+ , const OsclAny* aContext = NULL) = 0;
+
+ /**
+ * Cancel all pending requests. The current request being processed, if any, will also be aborted.
+ *
+ * @param aContextData Optional opaque data that will be passed back to the user with the command response
+ * @returns A unique command id for asynchronous completion
+ */
+ virtual PVMFCommandId CancelAllCommands(PVMFSessionId aSession
, const OsclAny* aContextData = NULL) = 0;
- /**
- * Ports call this API to report activity to the node.
- *
- * @param aActivity Information regarding the activity.
- */
- virtual void HandlePortActivity(const PVMFPortActivity& aActivity) = 0;
+ /**
+ * Cancels pending command with the specified ID.
+ *
+ * @param aCmdId Command Id of the command to be cancelled
+ * @param aContextData Optional opaque data that will be passed back to the user with the command response
+ * @returns A unique command id for asynchronous completion
+ */
+ virtual PVMFCommandId CancelCommand(PVMFSessionId aSession
+ , PVMFCommandId aCmdId
+ , const OsclAny* aContextData = NULL) = 0;
- /**
- * This API is a synchronous version of QueryInterface.
- * The mechanism is analogous to the COM IUnknown method. The interfaces are identified with
- * an interface ID that is a UUID as in DCE and a pointer to the interface object is
- * returned if it is supported. Otherwise the returned pointer is NULL.
- *
- * @param aUuid The UUID of the desired interface
- * @param aInterfacePtr The output pointer to the desired interface
- * @returns PVMFSuccess or PVMFErrNotSupported
- */
- virtual PVMFStatus QueryInterfaceSync(PVMFSessionId aSession
- , const PVUuid& aUuid
- , PVInterface*& aInterfacePtr)
- {
- return PVMFErrNotImplemented;
- }
+ /**
+ * Ports call this API to report activity to the node.
+ *
+ * @param aActivity Information regarding the activity.
+ */
+ virtual void HandlePortActivity(const PVMFPortActivity& aActivity) = 0;
+
+ /**
+ * This API is a synchronous version of QueryInterface.
+ * The mechanism is analogous to the COM IUnknown method. The interfaces are identified with
+ * an interface ID that is a UUID as in DCE and a pointer to the interface object is
+ * returned if it is supported. Otherwise the returned pointer is NULL.
+ *
+ * @param aUuid The UUID of the desired interface
+ * @param aInterfacePtr The output pointer to the desired interface
+ * @returns PVMFSuccess or PVMFErrNotSupported
+ */
+ virtual PVMFStatus QueryInterfaceSync(PVMFSessionId aSession
+ , const PVUuid& aUuid
+ , PVInterface*& aInterfacePtr)
+ {
+ return PVMFErrNotImplemented;
+ }
- /**
- * Set shared library pointer
- * @param aPtr Pointer to the shared library.
- **/
- virtual void SetSharedLibraryPtr(OsclSharedLibrary* aPtr)
- {
- iOsclSharedLibrary = aPtr;
- }
+ /**
+ * Set shared library pointer
+ * @param aPtr Pointer to the shared library.
+ **/
+ virtual void SetSharedLibraryPtr(OsclSharedLibrary* aPtr)
+ {
+ iOsclSharedLibrary = aPtr;
+ }
- /**
- * Retrieves shared library pointer
- * @returns Pointer to the shared library.
- **/
- virtual OsclSharedLibrary* GetSharedLibraryPtr()
- {
- return iOsclSharedLibrary;
- }
+ /**
+ * Retrieves shared library pointer
+ * @returns Pointer to the shared library.
+ **/
+ virtual OsclSharedLibrary* GetSharedLibraryPtr()
+ {
+ return iOsclSharedLibrary;
+ }
- protected:
- PVMFNodeInterface(int32 aSessionReserve = PVMF_NODE_DEFAULT_SESSION_RESERVE) :
- iInterfaceState(EPVMFNodeCreated)
- , iOsclSharedLibrary(NULL)
- {
- iSessions.reserve(aSessionReserve);
- }
+ protected:
+ PVMFNodeInterface(int32 aSessionReserve = PVMF_NODE_DEFAULT_SESSION_RESERVE) :
+ iInterfaceState(EPVMFNodeCreated)
+ , iOsclSharedLibrary(NULL)
+ {
+ iSessions.reserve(aSessionReserve);
+ }
- Oscl_Vector<PVMFNodeSession, OsclMemAllocator> iSessions;
- TPVMFNodeInterfaceState iInterfaceState;
+ Oscl_Vector<PVMFNodeSession, OsclMemAllocator> iSessions;
+ TPVMFNodeInterfaceState iInterfaceState;
- OsclSharedLibrary* iOsclSharedLibrary;
+ OsclSharedLibrary* iOsclSharedLibrary;
- /** This method can be used to update the state and
- ** notify observers of the state change event.
- */
- OSCL_IMPORT_REF virtual void SetState(TPVMFNodeInterfaceState);
+ /** This method can be used to update the state and
+ ** notify observers of the state change event.
+ */
+ OSCL_IMPORT_REF virtual void SetState(TPVMFNodeInterfaceState);
- /** These methods can be used to report events to
- ** the appropriate observers.
- */
- OSCL_IMPORT_REF virtual void ReportCmdCompleteEvent(PVMFSessionId s, PVMFCmdResp &resp);
- OSCL_IMPORT_REF virtual void ReportErrorEvent(PVMFEventType aEventType, OsclAny* aEventData = NULL, PVInterface*aExtMsg = NULL);
- OSCL_IMPORT_REF virtual void ReportErrorEvent(PVMFAsyncEvent&aEvent);
- OSCL_IMPORT_REF virtual void ReportInfoEvent(PVMFEventType aEventType, OsclAny* aEventData = NULL, PVInterface*aExtMsg = NULL);
- OSCL_IMPORT_REF virtual void ReportInfoEvent(PVMFAsyncEvent&aEvent);
+ /** These methods can be used to report events to
+ ** the appropriate observers.
+ */
+ OSCL_IMPORT_REF virtual void ReportCmdCompleteEvent(PVMFSessionId s, PVMFCmdResp &resp);
+ OSCL_IMPORT_REF virtual void ReportErrorEvent(PVMFEventType aEventType, OsclAny* aEventData = NULL, PVInterface*aExtMsg = NULL);
+ OSCL_IMPORT_REF virtual void ReportErrorEvent(PVMFAsyncEvent&aEvent);
+ OSCL_IMPORT_REF virtual void ReportInfoEvent(PVMFEventType aEventType, OsclAny* aEventData = NULL, PVInterface*aExtMsg = NULL);
+ OSCL_IMPORT_REF virtual void ReportInfoEvent(PVMFAsyncEvent&aEvent);
};
#endif