1. license on all files
2. need doc++ param
2. surpess copy and assignment operators
3. RtspTransceiver:
Ptr -> reference for both data mem
remove closeConnection
.cxx line 57 and 58 swap
4. move all function in RtspUtil to RtspTransceiver
use conn.writeData
4. RtspTransceiver.hxx
- remove closeTcpConnection
- remove myREcvFifo data
member, not used anywhere
- remove references to Udp
- assert in send rtsp msg
since it's not done
5. RtspTcpConnection
- take out the udp related commenting
codes
- TreadWrapper -> extern "C" function,
Sun does not like it
Put into
source and make it static.
- Constructor use reference
- ShareRecv -> msgFifo
- All Copy constructor / operator =
for server, declare it in private
because no copy or assign
allowed
- SigTerm put in the beginning of the
server
- select() is not good for windows,
use WSAsync?
- only thing should be in public is
Constructor and destroctor
- make recvTcpThread and wrapper
private
- combine destory() and close() into
destructor
- do shutdown right after select()
- do better error checking for select()
EAGAIN,
EINT
- if a fd is not in the map, want
to remove from FD set,
handle
this error.
- FD_ISSET is not protable,
easier to do the connMap
way. Put a big warning in line 77. or assert
-print debug messgae of
select woke and nothing was processed
- rethink tcp connection
aging design
6. RtspTcpBuffer
- virtual deconstructor
- put const in several mem function
- remove myPrevCSeq and code checking prevCSeq
- pull rtspParser outside of the while loop
and make that function static.
- don't need static cast in line 102.
- same for all the operator=, == assignement
- may need a timer for each connection and
timer out for ne activity
this is separate for
the session timer.
- is myMapIndex still used?
-in readTcpData, exception if charRealRead<0,
cpLog if charReadRead == 0
7. RtspUtil
- replace all references
to this class to use Connection::read and Connection::write.
8. CharData
-need more comments for
better understanding
9. CharDataParser
- make myBuf as const
-legal issues of this file
with QuickTime?
10. Rtsp
-comment status codes
-move enum ot private section
of the class
- does everything need to
be static - make it into the new RtspUtil?
- pritorize myMethods to
put more common headers first - remove switch() in Rtsp.cxx:263
(or just use nested if statements)
- combine tables together
binded by a structure. Like RtpFileType.hxx
11. RtspMsgParser
-remove Data dump and other
memory allocation that was used only for cpLog.
-what happens if content
length is reported wrong or stepping over boundaries - needs testing
-move lines cxx:235 into
else part
-cxx:234 use char
instead of chardata since isEqualNoCase() get's ptr and len
-use accessor
functions into RtspMsg instead of friend relationship
12. RtspMsg
-comment this class is pure
virtual
- const all reference variable
( hxx:46, hxx:58, etc)
- make RtspTcpBuffer smart
ptr (hxx:53, hxx:55)
- update comnment in line
hxx:109 indicating reference of data is returned
- create public accessor
function to access completion flag. remove "friend class RtspTcpBuffer"
change RtspTcpBuffer to use that accessor function. Same as RtspMsgParser
- remove friend relationships
-cxx:55, 60, use copy constructor
instead of assignment operator.
myTransportSpec = new RtspTransportSpec( *src.myTransportSpec)
- remove operator== and
compareTransportSpec, compareRangeHdr, and compateHeaderMap
until it is really needed
-expand isValid() function
for more complete check?
-shorten isResponse to one
line
- in getSequenceId, getCSeq
,etc, keep track if parsing was already attempted, but failed.
13. RtspRequest
- remove isRequest
and isResponse. Will use base class defination
- remove operator==
-add comment
for myFilePast is part without "rtsp://"
- add
comment that more common msg headers will be added to this class
14. RtspResponse
- remove
operator== and private compareX functions
- remove
isRequest and isResponse
-during append, we should add the header into headerMap
15. RtspSdp
- in future, try to use
SdpSession directly instead of going through this class
-supress assignemnt operators
- const get functions
-reword setPort() to setMediaPort()
- use Data insead of char*
16. RtspMETHODMsg
- remove operator==
17. RtspTransportHdr
- remove friends
sinces few private functions
- move all data
to public and remove set/get functions if not doing constraint checking
- convert
RtspTransportSpec to struct instead?
- use
strtoul instead of digitToStr()
- getTranportHdr()
shouldn't change myTransport. change to return by value
-RtspTransportSpec::encode() - should we check RtspTransport header
is complete?
- RtspTransportSpec::encode():313 - check case missing case - TCP and muticast
assert this case.
- cxx:453, assert on transSpec == 0, remove if statement
- cxx:87, remove line. BUG here
18. RtspRangeHdr
- add comment to header file - the grammer, and the supported port of the
grammer
- comment this class only supports npt in seconds
- convert doubles to a long or TimeVal. Store everything in ms.
- remove friends
- remove doubleToStr maybe add TimeVal to string
- remove getDeltaTime
- update parseRangeHeader to parse "." dilimater for TimeVal
- return by value doen't need to be const
- remove myDoubleBuf
19. RtspLocationHdr
- keep constructor( host, filepath) if client needs it
- remove const from hxx:29
- remove friend from hxx:34
20. RtspRtpInfoHdr
- provide public accessor function for myUrl
- remove const from hxx:34
- remove friend from hxx:38
101. RtspFileType
-hxx:17 remove constant
with rtpFileTypeInfo/RtpFileTypes
-hxx:46 remove last comma
102. mediaServer
-cxx:53
comment port isn't really a sip port
-cxx:84 return 1 for error cases, reflect with comment on line 36
103. RtspServer
hxx: update class description comment
cxx:41 can't exit(-1) there
cxx:130: remove comment
cxx:148 number of sessions we can't find
cxx:158 pass around the session instead of the state - remove state information
from RtspServer
hxx:101 - remove the set function
hxx:104 - return const ptr reference
cxx:121 - no need to check deleting null. "delete 0" is safe.
hxx:88 - const return Sptr?
104. RtspRtpProcessor
cxx: use vusleep istead of usleep
cxx176: check for low and high parameters, and are valid numbers
cxx176: comment that port is not really reserved in rtp stack.
cxx:184 don't need to check resultls
cxx.213 check that port has been added to set
cxx:193 change "find" with "allocate"
cxx:86 insert 0 into fifo to unblock fifo ( see paper comments )
cxx: make sure RtspServer is calling stopTread() to shutdown everything
cxx 240: continue there, and remove else
cxx328: comment this is for correct printing
cxx384: select<0 and EINT then continue
cxx 103 move print statement after adding to fifo so dont' need to add
1.
cxx432 detete[] missing
cxx make loaded (10) configurable
105. RtspSessionManager
cxx:48 remove const
change map to a set, maybe?
comment mySessionIdList is for testing only
cxx:53, log err there
cxx:54, make Data sessionId("") then not chage if fail
cxx:95
return bool instead of Data
106. State.hxx
cxx:12 remove line, "myOperators.clear()"
107. Operator.hxx
no comments
108. StateMachine.hxx
move include cpLog.hxx to *.cxx
cxx: remove clear() in deconstructor
cxx: in constructor, atexit( destory() )
hxx: addState() make private
maybe: make all the state's extern static variables, then there's no list
109. StateInit.hxx
remove "incomplete handling here"
110. Make a state to catch unprocessed operators instead of in the RtspServer. OpUnkown and OpValidReqestButNotThisState
111. OpAnnounce, OpDescribe
no comments
112. OpSetup
remove line 52, "newSession->myPacketInterval" and related comments above
move line 38.39 "new RtspSession" close to point be used, line 80
113. OpRecord
remove static from processPendingEvent
remove checking range and myPausePoint != -1 in line 78
combine myPausePoint = -1, line 81 and line 86
should I change state first, then addInitalEvent (compare with OpPlay)
114. OpPlay
use internal Pause events.
115. RtspSession
combine mode and state together