Changeset 718
- Timestamp:
- 01/14/12 03:59:44 (4 months ago)
- Location:
- trunk/sources/thelib
- Files:
-
- 6 edited
-
include/protocols/rtmp/basertmpappprotocolhandler.h (modified) (2 diffs)
-
include/protocols/rtmp/basertmpprotocol.h (modified) (1 diff)
-
include/protocols/rtmp/streaming/innetrtmpstream.h (modified) (1 diff)
-
src/protocols/rtmp/basertmpappprotocolhandler.cpp (modified) (1 diff)
-
src/protocols/rtmp/basertmpprotocol.cpp (modified) (3 diffs)
-
src/protocols/rtmp/streaming/innetrtmpstream.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/thelib/include/protocols/rtmp/basertmpappprotocolhandler.h
r715 r718 33 33 class BaseRTMPProtocol; 34 34 class BaseOutFileStream; 35 class InNetRTMPStream; 35 36 36 37 class DLLEXP BaseRTMPAppProtocolHandler … … 244 245 * */ 245 246 virtual BaseOutFileStream *CreateOutFileStream(BaseRTMPProtocol *pFrom, Variant &meta, bool append); 247 248 /* 249 * Create a file stream for writing to disk. 250 * pFrom - The connection which wants to stream to disk 251 * meta - Stream metadata 252 * append - Whether to append this stream to an exiting file 253 * */ 254 virtual InNetRTMPStream *CreateInNetStream(BaseRTMPProtocol *pFrom, 255 uint32_t channelId, uint32_t streamId, string streamName); 256 246 257 private: 247 258 /* -
trunk/sources/thelib/include/protocols/rtmp/basertmpprotocol.h
r651 r718 104 104 105 105 uint32_t GetOutboundChunkSize(); 106 uint32_t GetInboundChunkSize(); 106 107 bool SetInboundChunkSize(uint32_t chunkSize); 107 108 void TrySetOutboundChunkSize(uint32_t chunkSize); -
trunk/sources/thelib/include/protocols/rtmp/streaming/innetrtmpstream.h
r715 r718 54 54 uint64_t _videoDroppedBytesCount; 55 55 public: 56 InNetRTMPStream(BaseProtocol *pProtocol, StreamsManager *pStreamsManager, 57 string name, uint32_t rtmpStreamId, uint32_t chunkSize, 58 uint32_t channelId); 56 InNetRTMPStream(BaseRTMPProtocol *pProtocol, StreamsManager *pStreamsManager, 57 string name, uint32_t rtmpStreamId, uint32_t channelId); 59 58 virtual ~InNetRTMPStream(); 60 59 virtual StreamCapabilities * GetCapabilities(); -
trunk/sources/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp
r715 r718 1887 1887 } 1888 1888 1889 InNetRTMPStream *BaseRTMPAppProtocolHandler::CreateInNetStream( 1890 BaseRTMPProtocol *pFrom, uint32_t channelId, uint32_t streamId, 1891 string streamName) { 1892 return new InNetRTMPStream(pFrom, 1893 GetApplication()->GetStreamsManager(), streamName, streamId, channelId); 1894 1895 } 1896 1889 1897 string NormalizeStreamName(string streamName) { 1890 1898 replace(streamName, "-", "_"); -
trunk/sources/thelib/src/protocols/rtmp/basertmpprotocol.cpp
r693 r718 312 312 } 313 313 314 uint32_t BaseRTMPProtocol::GetInboundChunkSize() { 315 return _inboundChunkSize; 316 } 317 314 318 bool BaseRTMPProtocol::SetInboundChunkSize(uint32_t chunkSize) { 315 319 /*WARN("Chunk size changed for RTMP connection %p: %u->%u", this, … … 424 428 425 429 InNetRTMPStream * BaseRTMPProtocol::CreateINS(uint32_t channelId, 426 uint32_t streamId, string streamName) {430 uint32_t streamId, string streamName) { 427 431 if (streamId == 0 || streamId >= MAX_STREAMS_COUNT) { 428 432 FATAL("Invalid stream id: %u", streamId); … … 443 447 _streams[streamId] = NULL; 444 448 445 InNetRTMPStream *pStream = new InNetRTMPStream(this, 446 GetApplication()->GetStreamsManager(), streamName, streamId, 447 _inboundChunkSize, channelId); 448 449 InNetRTMPStream *pStream = _pProtocolHandler->CreateInNetStream(this, 450 channelId, streamId, streamName); 449 451 _streams[streamId] = pStream; 450 452 -
trunk/sources/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp
r715 r718 27 27 #include "streaming/streamstypes.h" 28 28 29 InNetRTMPStream::InNetRTMPStream(Base Protocol *pProtocol,29 InNetRTMPStream::InNetRTMPStream(BaseRTMPProtocol *pProtocol, 30 30 StreamsManager *pStreamsManager, string name, 31 uint32_t rtmpStreamId, uint32_t ch unkSize, uint32_t channelId)31 uint32_t rtmpStreamId, uint32_t channelId) 32 32 : BaseInNetStream(pProtocol, pStreamsManager, ST_IN_NET_RTMP, name) { 33 33 _rtmpStreamId = rtmpStreamId; 34 _chunkSize = chunkSize;34 _chunkSize = pProtocol->GetInboundChunkSize(); 35 35 _channelId = channelId; 36 36 _clientId = format("%d_%d_%"PRIz"u", _pProtocol->GetId(), _rtmpStreamId, (size_t)this);
Note: See TracChangeset
for help on using the changeset viewer.
