[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] protocol/rtsp/pub crtspbase.h,1.8,1.9
From: seansmith () helixcommunity ! org
Date: 2007-11-30 20:13:03
Message-ID: 200711302013.lAUKDAvV018985 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/server/protocol/rtsp/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv13070/server/protocol/rtsp/pub
Modified Files:
crtspbase.h
Log Message:
Synopsis
========
Improves message debug performance and fixes missing debug location.
Branches: HEAD, SERVER_12_RN
Reviewer: dlew
Description
===========
The AsBuffer implementation for RTSP message classes that implement IHXRTSPConsumer \
is kind of expensive. Existing proxy/server code calls AsBuffer for *every* RTSP \
message, and passes the buffer into ::HandleDebug and ::HandleTiming methods, even if \
debug/timing is disabled.
To avoid rebuilding message strings when we aren't using them, I created new \
::HandleTiming and ::HandleDebug methods that take a IHXRTSPConsumer pointer. Within \
these methods, AsBuffer is called only if debugging or timing is active, and that \
buffer is passed to the existing ::HandleXXX method.
The only side effect is that if debugging and timing are both activated, we end up \
calling AsBuffer once for each (timing and debug).
I've also noticed that wherever HandleDebug is called, HandleTiming is also called, \
and vice versa. So it might make sense to combine the methods, or call them both from \
a wrapper that checks if at least one is active (m_pTimingFile or m_pDebugFile is not \
NULL) and then calls AsBuffer.
Note that for now we need to preserve the HandleXXX methods that take buffers args \
since CRTSPBaseProtocol is still using the non-com RTSPRequestMessage class (see \
CRTSPBaseProtocol::SendRequest).
Files Affected
==============
server/protocol/rtsp/crtspbase.cpp
server/protocol/rtsp/pub/crtspbase.h
server-restricted/proxy/rproxy/rtspprxy.cpp
Testing Performed
=================
Unit Tests:
n/a
Integration Tests:
Verified core in/out messages appear in stdout when RTSPMessageDebug flag is set in \
proxy config. Verified AsBuffer usage is bypassed when message debug is disabled \
(yay!)
Leak Tests:
n/a
Performance Tests:
n/a
Platforms Tested: win32-i386-vc7
Build verified: linux-rhel4-i686, win32-i386-vc7
QA Hints
========
n/a
Index: crtspbase.h
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/pub/crtspbase.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- crtspbase.h 20 Nov 2007 03:56:45 -0000 1.8
+++ crtspbase.h 30 Nov 2007 20:13:00 -0000 1.9
@@ -693,11 +693,17 @@
virtual HX_RESULT SendControlMessage(IHXBuffer* pBuffer);
+ void HandleDebug (IHXRTSPConsumer* pCons,
+ HXBOOL bInbound);
+
void HandleDebug (IHXBuffer* pMsgBuf,
- BOOL bInbound);
+ HXBOOL bInbound);
+
+ void HandleTiming (IHXRTSPConsumer* pCons,
+ HXBOOL bInbound);
void HandleTiming (IHXBuffer* pMsgBuf,
- BOOL bInbound);
+ HXBOOL bInbound);
HX_RESULT GetSessionID (IHXRTSPMessage* pMsg,
CHXString& sessionID);
_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic