Changeset 722
- Timestamp:
- 01/14/12 04:08:46 (4 months ago)
- Location:
- trunk
- Files:
-
- 47 edited
-
builders/cmake/CMakeLists.txt (modified) (3 diffs)
-
sources/applications/applestreamingclient/src/clientcontext.cpp (modified) (2 diffs)
-
sources/applications/applestreamingclient/src/protocols/key/inboundkeyprotocol.cpp (modified) (2 diffs)
-
sources/applications/applestreamingclient/src/protocols/m3u8/basem3u8protocol.cpp (modified) (2 diffs)
-
sources/common/include/platform/platform.h (modified) (1 diff)
-
sources/common/include/utils/buffering/bitarray.h (modified) (2 diffs)
-
sources/common/include/utils/logging/logging.h (modified) (1 diff)
-
sources/common/include/utils/mempool/mempool.h (modified) (1 diff)
-
sources/common/src/platform/android/androidplatform.cpp (modified) (1 diff)
-
sources/common/src/platform/dfreebsd/dfreebsdplatform.cpp (modified) (1 diff)
-
sources/common/src/platform/freebsd/freebsdplatform.cpp (modified) (1 diff)
-
sources/common/src/platform/linux/linuxplatform.cpp (modified) (1 diff)
-
sources/common/src/platform/openbsd/openbsdplatform.cpp (modified) (1 diff)
-
sources/common/src/platform/osx/osxplatform.cpp (modified) (1 diff)
-
sources/common/src/platform/solaris/solarisplatform.cpp (modified) (1 diff)
-
sources/common/src/utils/buffering/iobuffer.cpp (modified) (2 diffs)
-
sources/common/src/utils/logging/logger.cpp (modified) (3 diffs)
-
sources/common/src/utils/mempool/mempool.cpp (modified) (2 diffs)
-
sources/common/src/utils/misc/crypto.cpp (modified) (1 diff)
-
sources/common/src/utils/misc/variant.cpp (modified) (1 diff)
-
sources/thelib/include/netio/fdstats.h (modified) (1 diff)
-
sources/thelib/include/protocols/rtmp/basertmpappprotocolhandler.h (modified) (2 diffs)
-
sources/thelib/include/protocols/rtmp/streaming/outnetrtmp4tsstream.h (modified) (2 diffs)
-
sources/thelib/src/mediaformats/nsv/nsvdocument.cpp (modified) (1 diff)
-
sources/thelib/src/netio/epoll/inboundnamedpipecarrier.cpp (modified) (1 diff)
-
sources/thelib/src/netio/epoll/iohandlermanager.cpp (modified) (1 diff)
-
sources/thelib/src/netio/epoll/stdiocarrier.cpp (modified) (2 diffs)
-
sources/thelib/src/netio/epoll/tcpacceptor.cpp (modified) (2 diffs)
-
sources/thelib/src/netio/epoll/tcpcarrier.cpp (modified) (1 diff)
-
sources/thelib/src/netio/epoll/udpcarrier.cpp (modified) (1 diff)
-
sources/thelib/src/netio/kqueue/inboundnamedpipecarrier.cpp (modified) (1 diff)
-
sources/thelib/src/netio/kqueue/iohandlermanager.cpp (modified) (1 diff)
-
sources/thelib/src/netio/kqueue/stdiocarrier.cpp (modified) (2 diffs)
-
sources/thelib/src/netio/kqueue/tcpacceptor.cpp (modified) (2 diffs)
-
sources/thelib/src/netio/kqueue/tcpcarrier.cpp (modified) (1 diff)
-
sources/thelib/src/netio/kqueue/udpcarrier.cpp (modified) (1 diff)
-
sources/thelib/src/netio/select/inboundnamedpipecarrier.cpp (modified) (1 diff)
-
sources/thelib/src/netio/select/stdiocarrier.cpp (modified) (2 diffs)
-
sources/thelib/src/netio/select/tcpacceptor.cpp (modified) (2 diffs)
-
sources/thelib/src/netio/select/tcpcarrier.cpp (modified) (1 diff)
-
sources/thelib/src/netio/select/udpcarrier.cpp (modified) (1 diff)
-
sources/thelib/src/protocols/http/basehttpprotocol.cpp (modified) (2 diffs)
-
sources/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp (modified) (5 diffs)
-
sources/thelib/src/protocols/rtmp/basertmpprotocol.cpp (modified) (4 diffs)
-
sources/thelib/src/protocols/rtmp/header_le_ba.cpp (modified) (1 diff)
-
sources/thelib/src/protocols/rtmp/monitorrtmpprotocol.cpp (modified) (1 diff)
-
sources/thelib/src/protocols/rtmp/streaming/baseoutnetrtmpstream.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/builders/cmake/CMakeLists.txt
r690 r722 81 81 ADD_DEFINITIONS(-DCOMPILE_STATIC) 82 82 SET(LIB_TYPE STATIC) 83 ADD_SUBDIRECTORY(lua lua)84 ADD_SUBDIRECTORY(tinyxml tinyxml)85 83 SET(LUA_LIBRARY_PATH "lua") 86 84 SET(LUA_INCLUDE_PATH "${CRTMPSERVER_3RDPARTY_ROOT}/lua-dev") … … 107 105 ENDIF(NOT TINYXML_FOUND) 108 106 ENDIF($ENV{COMPILE_STATIC} MATCHES "1") 107 108 #disable file/line/function inside logging 109 #ADD_DEFINITIONS(-DFILE_OVERRIDE) 110 #ADD_DEFINITIONS(-DLINE_OVERRIDE) 111 #ADD_DEFINITIONS(-DFUNC_OVERRIDE) 112 #ADD_DEFINITIONS(-DASSERT_OVERRIDE) 109 113 110 114 #fine tunning … … 187 191 188 192 189 #ADD_DEFINITIONS(-DHAS_SAFE_LOGGER) 193 IF($ENV{COMPILE_STATIC} MATCHES "1") 194 ADD_SUBDIRECTORY(lua lua) 195 ADD_SUBDIRECTORY(tinyxml tinyxml) 196 ENDIF($ENV{COMPILE_STATIC} MATCHES "1") 190 197 ADD_SUBDIRECTORY(common common) 191 198 ADD_SUBDIRECTORY(thelib thelib) 192 #ADD_SUBDIRECTORY(vm vm)193 199 ADD_SUBDIRECTORY(applications applications) 194 200 ADD_SUBDIRECTORY(crtmpserver crtmpserver) 195 #ADD_SUBDIRECTORY(vmtests vmtests)196 201 ADD_SUBDIRECTORY(tests) 197 #ADD_SUBDIRECTORY(androidapplestreaming androidapplestreaming) 198 202 -
trunk/sources/applications/applestreamingclient/src/clientcontext.cpp
r625 r722 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 450 450 //1. Get the context 451 451 uint32_t contextId = parameters["contextId"]; 452 assert(contextId != 0);452 o_assert(contextId != 0); 453 453 ClientContext *pContext = GetContext(contextId, 0, 0); 454 454 if (pContext == NULL) { -
trunk/sources/applications/applestreamingclient/src/protocols/key/inboundkeyprotocol.cpp
r439 r722 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 54 54 //2. Get the transport 55 55 OutboundHTTPProtocol *pHttpProtocol = (OutboundHTTPProtocol *) GetFarProtocol(); 56 assert(pHttpProtocol != NULL);56 o_assert(pHttpProtocol != NULL); 57 57 58 58 //3. See if we have the 200 OK -
trunk/sources/applications/applestreamingclient/src/protocols/m3u8/basem3u8protocol.cpp
r160 r722 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 52 52 //1. Get the transport 53 53 OutboundHTTPProtocol *pHttpProtocol = (OutboundHTTPProtocol *) GetFarProtocol(); 54 assert(pHttpProtocol != NULL);54 o_assert(pHttpProtocol != NULL); 55 55 56 56 //2. See if we have the 200 OK -
trunk/sources/common/include/platform/platform.h
r404 r722 71 71 #endif /* ANDROID */ 72 72 73 #ifdef ASSERT_OVERRIDE 74 #define o_assert(x) \ 75 do { \ 76 if((x)==0) \ 77 exit(-1); \ 78 } while(0) 79 #else 80 #define o_assert(x) assert(x) 81 #endif 82 73 83 #endif /* _PLATFORM_H */ -
trunk/sources/common/include/utils/buffering/bitarray.h
r528 r722 74 74 75 75 if (GETAVAILABLEBYTESCOUNT(*this) == 0) { 76 assert(false);76 o_assert(false); 77 77 } 78 78 79 79 if (GETAVAILABLEBYTESCOUNT(*this) < (_cursor + count) / 8) { 80 assert(false);80 o_assert(false); 81 81 } 82 82 83 83 if (count>sizeof (T)*8) { 84 assert(false);84 o_assert(false); 85 85 } 86 86 … … 100 100 void IgnoreBits(uint32_t count) { 101 101 if (GETAVAILABLEBYTESCOUNT(*this) == 0) { 102 assert(false);102 o_assert(false); 103 103 } 104 104 105 105 if (GETAVAILABLEBYTESCOUNT(*this) < (_cursor + count) / 8) { 106 assert(false);106 o_assert(false); 107 107 } 108 108 -
trunk/sources/common/include/utils/logging/logging.h
r547 r722 54 54 #define NYI WARN("%s not yet implemented",__func__); 55 55 #define NYIR do{NYI;return false;}while(0) 56 #define NYIA do{NYI; assert(false);abort();}while(0)56 #define NYIA do{NYI;o_assert(false);abort();}while(0) 57 57 #define _PROD_ACCESS_ (_FATAL_+1) 58 58 #define _PROD_ERROR_ (_PROD_ACCESS_+1) -
trunk/sources/common/include/utils/mempool/mempool.h
r422 r722 41 41 #define DECLARE_MEMORY_POOL_STRUCT(Cls) \ 42 42 static void* operator new(size_t s) { \ 43 assert(s == sizeof (Cls)); \43 o_assert(s == sizeof (Cls)); \ 44 44 return StaticMemoryPool<sizeof (Cls)>::GetInstance()->Allocate(); \ 45 45 } \ -
trunk/sources/common/src/platform/android/androidplatform.cpp
r643 r722 46 46 char *pBuffer = NULL; 47 47 if (vasprintf(&pBuffer, STR(fmt), args) == -1) { 48 assert(false);48 o_assert(false); 49 49 return ""; 50 50 } -
trunk/sources/common/src/platform/dfreebsd/dfreebsdplatform.cpp
r643 r722 43 43 char *pBuffer = NULL; 44 44 if (vasprintf(&pBuffer, STR(fmt), args) == -1) { 45 assert(false);45 o_assert(false); 46 46 return ""; 47 47 } -
trunk/sources/common/src/platform/freebsd/freebsdplatform.cpp
r666 r722 43 43 char *pBuffer = NULL; 44 44 if (vasprintf(&pBuffer, STR(fmt), args) == -1) { 45 assert(false);45 o_assert(false); 46 46 return ""; 47 47 } -
trunk/sources/common/src/platform/linux/linuxplatform.cpp
r643 r722 45 45 char *pBuffer = NULL; 46 46 if (vasprintf(&pBuffer, STR(fmt), args) == -1) { 47 assert(false);47 o_assert(false); 48 48 return ""; 49 49 } -
trunk/sources/common/src/platform/openbsd/openbsdplatform.cpp
r643 r722 43 43 char *pBuffer = NULL; 44 44 if (vasprintf(&pBuffer, STR(fmt), args) == -1) { 45 assert(false);45 o_assert(false); 46 46 return ""; 47 47 } -
trunk/sources/common/src/platform/osx/osxplatform.cpp
r643 r722 44 44 char *pBuffer = NULL; 45 45 if (vasprintf(&pBuffer, STR(fmt), args) == -1) { 46 assert(false);46 o_assert(false); 47 47 return ""; 48 48 } -
trunk/sources/common/src/platform/solaris/solarisplatform.cpp
r643 r722 82 82 char *pBuffer = NULL; 83 83 if (vasprintf(&pBuffer, STR(fmt), args) == -1) { 84 assert(false);84 o_assert(false); 85 85 return ""; 86 86 } -
trunk/sources/common/src/utils/buffering/iobuffer.cpp
r712 r722 24 24 #ifdef WITH_SANITY_INPUT_BUFFER 25 25 #define SANITY_INPUT_BUFFER \ 26 assert(_consumed<=_published); \27 assert(_published<=_size);26 o_assert(_consumed<=_published); \ 27 o_assert(_published<=_size); 28 28 #define SANITY_INPUT_BUFFER_INDEX \ 29 assert(index >= 0); \30 assert((_published - _consumed - index) > 0);29 o_assert(index >= 0); \ 30 o_assert((_published - _consumed - index) > 0); 31 31 #else 32 32 #define SANITY_INPUT_BUFFER … … 338 338 void IOBuffer::SetMinChunkSize(uint32_t minChunkSize) { 339 339 340 assert(minChunkSize > 0 && minChunkSize < 16 * 1024 * 1024);340 o_assert(minChunkSize > 0 && minChunkSize < 16 * 1024 * 1024); 341 341 _minChunkSize = minChunkSize; 342 342 } -
trunk/sources/common/src/utils/logging/logger.cpp
r633 r722 35 35 if (pMutex == NULL) { 36 36 printf("Logger not initialized\n"); 37 assert(false);37 o_assert(false); 38 38 } 39 39 _pMutex = pMutex; 40 40 if (pthread_mutex_lock(_pMutex) != 0) { 41 41 printf("Unable to lock the logger"); 42 assert(false);42 o_assert(false); 43 43 } 44 44 }; … … 47 47 if (pthread_mutex_unlock(_pMutex) != 0) { 48 48 printf("Unable to unlock the logger"); 49 assert(false);49 o_assert(false); 50 50 } 51 51 } … … 76 76 if (_pMutex != NULL) { 77 77 printf("logger already initialized"); 78 assert(false);78 o_assert(false); 79 79 } 80 80 _pMutex = new pthread_mutex_t; 81 81 if (pthread_mutex_init(_pMutex, NULL)) { 82 82 printf("Unable to init the logger mutex"); 83 assert(false);83 o_assert(false); 84 84 } 85 85 #else -
trunk/sources/common/src/utils/mempool/mempool.cpp
r422 r722 79 79 MemoryPool::~MemoryPool() { 80 80 Cleanup(); 81 assert(_used == 0);81 o_assert(_used == 0); 82 82 MemoryPoolManager::GetInstance().UnRegister(this); 83 83 } … … 97 97 void MemoryPool::Deallocate(void *p) { 98 98 _used--; 99 assert(p != NULL);99 o_assert(p != NULL); 100 100 MemPoolEntry* pEntry = (MemPoolEntry *) (p); 101 101 pEntry->pNext = _pEntries; -
trunk/sources/common/src/utils/misc/crypto.cpp
r653 r722 248 248 HMAC_CTX_cleanup(&ctx); 249 249 250 assert(digestLen == 32);250 o_assert(digestLen == 32); 251 251 } 252 252 -
trunk/sources/common/src/utils/misc/variant.cpp
r704 r722 363 363 { 364 364 FATAL("Invalid type: %hhu", _type); 365 assert(false);365 o_assert(false); 366 366 } 367 367 } -
trunk/sources/thelib/include/netio/fdstats.h
r712 r722 51 51 52 52 inline void Increment() { 53 assert(_current >= 0);54 assert(_max >= 0);53 o_assert(_current >= 0); 54 o_assert(_max >= 0); 55 55 _current++; 56 56 _max = _max < _current ? _current : _max; 57 57 _total++; 58 assert(_current >= 0);59 assert(_max >= 0);58 o_assert(_current >= 0); 59 o_assert(_max >= 0); 60 60 } 61 61 62 62 inline void Decrement() { 63 assert(_current >= 0);64 assert(_max >= 0);63 o_assert(_current >= 0); 64 o_assert(_max >= 0); 65 65 _current--; 66 assert(_current >= 0);67 assert(_max >= 0);66 o_assert(_current >= 0); 67 o_assert(_max >= 0); 68 68 } 69 69 #ifdef GLOBALLY_ACCOUNT_BYTES -
trunk/sources/thelib/include/protocols/rtmp/basertmpappprotocolhandler.h
r718 r722 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 253 253 * */ 254 254 virtual InNetRTMPStream *CreateInNetStream(BaseRTMPProtocol *pFrom, 255 uint32_t channelId, uint32_t streamId, string streamName);255 uint32_t channelId, uint32_t streamId, string streamName); 256 256 257 257 private: -
trunk/sources/thelib/include/protocols/rtmp/streaming/outnetrtmp4tsstream.h
r721 r722 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 40 40 string name, uint32_t rtmpStreamId, uint32_t chunkSize); 41 41 virtual ~OutNetRTMP4TSStream(); 42 42 43 43 virtual void SignalAttachedToInStream(); 44 44 -
trunk/sources/thelib/src/mediaformats/nsv/nsvdocument.cpp
r413 r722 102 102 //15. Add the binary headers 103 103 for (uint32_t i = 0; i < binaryHeaders.size(); i++) { 104 assert(binaryHeaders[i].absoluteTime == 0);104 o_assert(binaryHeaders[i].absoluteTime == 0); 105 105 ADD_VECTOR_BEGIN(_frames, binaryHeaders[i]); 106 106 } -
trunk/sources/thelib/src/netio/epoll/inboundnamedpipecarrier.cpp
r637 r722 76 76 if ((event.events & EPOLLIN) != 0) { 77 77 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 78 assert(pInputBuffer != NULL);78 o_assert(pInputBuffer != NULL); 79 79 if (!pInputBuffer->ReadFromPipe(_inboundFd, FD_READ_CHUNK, 80 80 recvBytes)) { -
trunk/sources/thelib/src/netio/epoll/iohandlermanager.cpp
r712 r722 58 58 void IOHandlerManager::Start() { 59 59 _eq = epoll_create(EPOLL_QUERY_SIZE); 60 assert(_eq > 0);60 o_assert(_eq > 0); 61 61 } 62 62 -
trunk/sources/thelib/src/netio/epoll/stdiocarrier.cpp
r712 r722 54 54 return _pInstance; 55 55 } 56 assert(_pInstance->_pProtocol != NULL);57 assert(pProtocol != NULL);56 o_assert(_pInstance->_pProtocol != NULL); 57 o_assert(pProtocol != NULL); 58 58 if (_pInstance->_pProtocol->GetId() != pProtocol->GetId()) { 59 59 FATAL("Stdio carrier is already acquired"); … … 71 71 if ((event.events & EPOLLIN) != 0) { 72 72 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 73 assert(pInputBuffer != NULL);73 o_assert(pInputBuffer != NULL); 74 74 if (!pInputBuffer->ReadFromStdio(_inboundFd, FD_READ_CHUNK, _ioAmount)) { 75 75 FATAL("Unable to read data"); -
trunk/sources/thelib/src/netio/epoll/tcpacceptor.cpp
r710 r722 38 38 _address.sin_family = PF_INET; 39 39 _address.sin_addr.s_addr = inet_addr(ipAddress.c_str()); 40 assert(_address.sin_addr.s_addr != INADDR_NONE);40 o_assert(_address.sin_addr.s_addr != INADDR_NONE); 41 41 _address.sin_port = EHTONS(port); //----MARKED-SHORT---- 42 42 … … 95 95 96 96 void TCPAcceptor::SetApplication(BaseClientApplication *pApplication) { 97 assert(_pApplication == NULL);97 o_assert(_pApplication == NULL); 98 98 _pApplication = pApplication; 99 99 } -
trunk/sources/thelib/src/netio/epoll/tcpcarrier.cpp
r712 r722 70 70 if ((event.events & EPOLLIN) != 0) { 71 71 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 72 assert(pInputBuffer != NULL);72 o_assert(pInputBuffer != NULL); 73 73 if (!pInputBuffer->ReadFromTCPFd(_inboundFd, _recvBufferSize, _ioAmount)) { 74 74 FATAL("Unable to read data. %s:%hu -> %s:%hu", -
trunk/sources/thelib/src/netio/epoll/udpcarrier.cpp
r712 r722 46 46 if ((event.events & EPOLLIN) != 0) { 47 47 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 48 assert(pInputBuffer != NULL);48 o_assert(pInputBuffer != NULL); 49 49 if (!pInputBuffer->ReadFromUDPFd(_inboundFd, _ioAmount, _peerAddress)) { 50 50 FATAL("Unable to read data"); -
trunk/sources/thelib/src/netio/kqueue/inboundnamedpipecarrier.cpp
r637 r722 78 78 { 79 79 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 80 assert(pInputBuffer != NULL);80 o_assert(pInputBuffer != NULL); 81 81 if (!pInputBuffer->ReadFromPipe(event.ident, event.data, recvAmount)) { 82 82 FATAL("Unable to read data"); -
trunk/sources/thelib/src/netio/kqueue/iohandlermanager.cpp
r712 r722 99 99 void IOHandlerManager::Start() { 100 100 _kq = kqueue(); 101 assert(_kq > 0);101 o_assert(_kq > 0); 102 102 } 103 103 -
trunk/sources/thelib/src/netio/kqueue/stdiocarrier.cpp
r712 r722 60 60 return _pInstance; 61 61 } 62 assert(_pInstance->_pProtocol != NULL);63 assert(pProtocol != NULL);62 o_assert(_pInstance->_pProtocol != NULL); 63 o_assert(pProtocol != NULL); 64 64 if (_pInstance->_pProtocol->GetId() != pProtocol->GetId()) { 65 65 FATAL("Stdio carrier is already acquired"); … … 79 79 { 80 80 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 81 assert(pInputBuffer != NULL);81 o_assert(pInputBuffer != NULL); 82 82 if (!pInputBuffer->ReadFromStdio(event.ident, event.data, _ioAmount)) { 83 83 FATAL("Unable to read data"); -
trunk/sources/thelib/src/netio/kqueue/tcpacceptor.cpp
r710 r722 35 35 _address.sin_family = PF_INET; 36 36 _address.sin_addr.s_addr = inet_addr(ipAddress.c_str()); 37 assert(_address.sin_addr.s_addr != INADDR_NONE);37 o_assert(_address.sin_addr.s_addr != INADDR_NONE); 38 38 _address.sin_port = EHTONS(port); //----MARKED-SHORT---- 39 39 … … 92 92 93 93 void TCPAcceptor::SetApplication(BaseClientApplication *pApplication) { 94 assert(_pApplication == NULL);94 o_assert(_pApplication == NULL); 95 95 _pApplication = pApplication; 96 96 } -
trunk/sources/thelib/src/netio/kqueue/tcpcarrier.cpp
r712 r722 70 70 { 71 71 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 72 assert(pInputBuffer != NULL);72 o_assert(pInputBuffer != NULL); 73 73 if (!pInputBuffer->ReadFromTCPFd(event.ident, event.data, _ioAmount)) { 74 74 FATAL("Unable to read data. %s:%hu -> %s:%hu", -
trunk/sources/thelib/src/netio/kqueue/udpcarrier.cpp
r712 r722 46 46 { 47 47 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 48 assert(pInputBuffer != NULL);48 o_assert(pInputBuffer != NULL); 49 49 if (!pInputBuffer->ReadFromUDPFd(event.ident, _ioAmount, _peerAddress)) { 50 50 FATAL("Unable to read data"); -
trunk/sources/thelib/src/netio/select/inboundnamedpipecarrier.cpp
r637 r722 72 72 { 73 73 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 74 assert(pInputBuffer != NULL);74 o_assert(pInputBuffer != NULL); 75 75 if (!pInputBuffer->ReadFromPipe(_inboundFd, 76 76 FD_READ_CHUNK, recvAmount)) { -
trunk/sources/thelib/src/netio/select/stdiocarrier.cpp
r712 r722 59 59 return _pInstance; 60 60 } 61 assert(_pInstance->_pProtocol != NULL);62 assert(pProtocol != NULL);61 o_assert(_pInstance->_pProtocol != NULL); 62 o_assert(pProtocol != NULL); 63 63 if (_pInstance->_pProtocol->GetId() != pProtocol->GetId()) { 64 64 FATAL("Stdio carrier is already acquired"); … … 78 78 { 79 79 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 80 assert(pInputBuffer != NULL);80 o_assert(pInputBuffer != NULL); 81 81 if (!pInputBuffer->ReadFromStdio(_inboundFd, FD_READ_CHUNK, _ioAmount)) { 82 82 FATAL("Unable to read data"); -
trunk/sources/thelib/src/netio/select/tcpacceptor.cpp
r710 r722 35 35 _address.sin_family = PF_INET; 36 36 _address.sin_addr.s_addr = inet_addr(ipAddress.c_str()); 37 assert(_address.sin_addr.s_addr != INADDR_NONE);37 o_assert(_address.sin_addr.s_addr != INADDR_NONE); 38 38 _address.sin_port = EHTONS(port); //----MARKED-SHORT---- 39 39 … … 93 93 94 94 void TCPAcceptor::SetApplication(BaseClientApplication *pApplication) { 95 assert(_pApplication == NULL);95 o_assert(_pApplication == NULL); 96 96 _pApplication = pApplication; 97 97 } -
trunk/sources/thelib/src/netio/select/tcpcarrier.cpp
r712 r722 79 79 { 80 80 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 81 assert(pInputBuffer != NULL);81 o_assert(pInputBuffer != NULL); 82 82 if (!pInputBuffer->ReadFromTCPFd(_inboundFd, 83 83 _recvBufferSize, _ioAmount)) { -
trunk/sources/thelib/src/netio/select/udpcarrier.cpp
r712 r722 46 46 { 47 47 IOBuffer *pInputBuffer = _pProtocol->GetInputBuffer(); 48 assert(pInputBuffer != NULL);48 o_assert(pInputBuffer != NULL); 49 49 if (!pInputBuffer->ReadFromUDPFd(_inboundFd, _ioAmount, _peerAddress)) { 50 50 FATAL("Unable to read data"); -
trunk/sources/thelib/src/protocols/http/basehttpprotocol.cpp
r496 r722 213 213 return _lastChunk; 214 214 } else { 215 assert(_sessionDecodedBytesCount <= _contentLength);215 o_assert(_sessionDecodedBytesCount <= _contentLength); 216 216 return _sessionDecodedBytesCount == _contentLength; 217 217 } … … 444 444 //which is how many bytes we have available, but no more than _contentLength 445 445 uint32_t chunkSize = GETAVAILABLEBYTESCOUNT(buffer); 446 assert(_sessionDecodedBytesCount <= _contentLength);446 o_assert(_sessionDecodedBytesCount <= _contentLength); 447 447 uint32_t remaining = _contentLength - _sessionDecodedBytesCount; 448 448 chunkSize = chunkSize > remaining ? remaining : chunkSize; -
trunk/sources/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp
r718 r722 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 1861 1861 1862 1862 BaseOutFileStream* BaseRTMPAppProtocolHandler::CreateOutFileStream( 1863 BaseRTMPProtocol *pFrom, Variant &meta, bool append) 1864 { 1863 BaseRTMPProtocol *pFrom, Variant &meta, bool append) { 1865 1864 //1. Compute the file name 1866 1865 string fileName = meta[META_SERVER_MEDIA_DIR]; … … 1877 1876 (meta[META_MEDIA_TYPE] == MEDIA_TYPE_FLV)) { 1878 1877 return new OutFileRTMPFLVStream(pFrom, 1879 GetApplication()->GetStreamsManager(), fileName);1878 GetApplication()->GetStreamsManager(), fileName); 1880 1879 } 1881 1880 if (meta[META_MEDIA_TYPE] == MEDIA_TYPE_MP4) { … … 1888 1887 1889 1888 InNetRTMPStream *BaseRTMPAppProtocolHandler::CreateInNetStream( 1890 BaseRTMPProtocol *pFrom, uint32_t channelId, uint32_t streamId,1891 string streamName) {1889 BaseRTMPProtocol *pFrom, uint32_t channelId, uint32_t streamId, 1890 string streamName) { 1892 1891 return new InNetRTMPStream(pFrom, 1893 GetApplication()->GetStreamsManager(), streamName, streamId, channelId);1892 GetApplication()->GetStreamsManager(), streamName, streamId, channelId); 1894 1893 1895 1894 } … … 2107 2106 } 2108 2107 2109 // //3. Compute tcUrl: rtmp://host/appName2110 // string tcUrl = format("%s://%s%s/%s",2111 // STR(uri.scheme()),2112 // STR(uri.host()),2113 // STR(uri.portSpecified() ? format(":%"PRIu32) : ""),2114 // STR(appName));2108 // //3. Compute tcUrl: rtmp://host/appName 2109 // string tcUrl = format("%s://%s%s/%s", 2110 // STR(uri.scheme()), 2111 // STR(uri.host()), 2112 // STR(uri.portSpecified() ? format(":%"PRIu32) : ""), 2113 // STR(appName)); 2115 2114 2116 2115 //4. Get the user agent -
trunk/sources/thelib/src/protocols/rtmp/basertmpprotocol.cpp
r720 r722 1 /* 1 /* 2 2 * Copyright (c) 2010, 3 3 * Gavriloaie Eugen-Andrei (shiretu@gmail.com) … … 428 428 429 429 InNetRTMPStream * BaseRTMPProtocol::CreateINS(uint32_t channelId, 430 uint32_t streamId, string streamName) {430 uint32_t streamId, string streamName) { 431 431 if (streamId == 0 || streamId >= MAX_STREAMS_COUNT) { 432 432 FATAL("Invalid stream id: %u", streamId); … … 448 448 449 449 InNetRTMPStream *pStream = _pProtocolHandler->CreateInNetStream(this, 450 channelId, streamId, streamName);450 channelId, streamId, streamName); 451 451 _streams[streamId] = pStream; 452 452 … … 473 473 delete _streams[streamId]; 474 474 _streams[streamId] = NULL; 475 }475 } 476 476 477 477 BaseOutNetRTMPStream *pBaseOutNetRTMPStream = BaseOutNetRTMPStream::GetInstance( -
trunk/sources/thelib/src/protocols/rtmp/header_le_ba.cpp
r606 r722 213 213 case HT_FULL: 214 214 { 215 assert(channel.lastOutProcBytes == 0);216 assert(H_IA(*this));215 o_assert(channel.lastOutProcBytes == 0); 216 o_assert(H_IA(*this)); 217 217 break; 218 218 } 219 219 case HT_SAME_STREAM: 220 220 { 221 assert(channel.lastOutProcBytes == 0);222 assert(channel.lastOutStreamId == hf.s.si);223 assert(channel.lastOutStreamId == channel.lastOutHeader.hf.s.si);221 o_assert(channel.lastOutProcBytes == 0); 222 o_assert(channel.lastOutStreamId == hf.s.si); 223 o_assert(channel.lastOutStreamId == channel.lastOutHeader.hf.s.si); 224 224 break; 225 225 } 226 226 case HT_SAME_LENGTH_AND_STREAM: 227 227 { 228 assert(channel.lastOutProcBytes == 0);229 assert(channel.lastOutStreamId == hf.s.si);230 assert(channel.lastOutStreamId == channel.lastOutHeader.hf.s.si);231 assert(channel.lastOutHeader.hf.s.mt == hf.s.mt);232 assert(channel.lastOutHeader.hf.s.ml == hf.s.ml);233 assert(channel.lastOutHeader.hf.s.ts != hf.s.ts);228 o_assert(channel.lastOutProcBytes == 0); 229 o_assert(channel.lastOutStreamId == hf.s.si); 230 o_assert(channel.lastOutStreamId == channel.lastOutHeader.hf.s.si); 231 o_assert(channel.lastOutHeader.hf.s.mt == hf.s.mt); 232 o_assert(channel.lastOutHeader.hf.s.ml == hf.s.ml); 233 o_assert(channel.lastOutHeader.hf.s.ts != hf.s.ts); 234 234 break; 235 235 } 236 236 case HT_CONTINUATION: 237 237 { 238 assert(channel.lastOutStreamId == hf.s.si);239 assert(channel.lastOutStreamId == channel.lastOutHeader.hf.s.si);240 assert(channel.lastOutHeader.hf.s.mt == hf.s.mt);241 assert(channel.lastOutHeader.hf.s.ml == hf.s.ml);242 assert(channel.lastOutHeader.hf.s.ts == hf.s.ts);238 o_assert(channel.lastOutStreamId == hf.s.si); 239 o_assert(channel.lastOutStreamId == channel.lastOutHeader.hf.s.si); 240 o_assert(channel.lastOutHeader.hf.s.mt == hf.s.mt); 241 o_assert(channel.lastOutHeader.hf.s.ml == hf.s.ml); 242 o_assert(channel.lastOutHeader.hf.s.ts == hf.s.ts); 243 243 break; 244 244 } -
trunk/sources/thelib/src/protocols/rtmp/monitorrtmpprotocol.cpp
r608 r722 282 282 return false; 283 283 } 284 assert(_channels[channelId].id == channelId);284 o_assert(_channels[channelId].id == channelId); 285 285 _channels[channelId].Reset(); 286 286 } -
trunk/sources/thelib/src/protocols/rtmp/streaming/baseoutnetrtmpstream.cpp
r721 r722 790 790 791 791 if (leftBytesToSend == 0) { 792 assert(channel.lastOutProcBytes == H_ML(header));792 o_assert(channel.lastOutProcBytes == H_ML(header)); 793 793 channel.lastOutProcBytes = 0; 794 794 }
Note: See TracChangeset
for help on using the changeset viewer.
