C# Class CSharpRTMP.Core.Protocols.Rtmp.BaseRTMPProtocol

Inheritance: BaseProtocol, IInFileRTMPStreamHolder
Show file Open project: langhuihui/csharprtmp Class Usage Examples

Public Properties

Property Type Description
GenuineFmsKey byte[]
GenuineFpKey byte[]
_outboundChunkSize uint

Protected Properties

Property Type Description
_channelPool Stack
_channels Channel>.Dictionary
_handshakeCompleted bool
_inboundChunkSize uint
_nextReceivedBytesCountReport ulong
_pProtocolHandler BaseRTMPAppProtocolHandler
_rtmpProtocolSerializer RTMPProtocolSerializer
_rtmpState RTMPState
_rxInvokes ulong
_selectedChannel int
_streams IStream[]
_txInvokes ulong
_winAckSize uint

Public Methods

Method Description
ChunkAmfMessage ( Header header, BufferWithOffset input, MemoryStream output ) : void
CloseStream ( uint streamId, bool createNeutralStream ) : bool
CreateIFS ( Variant metadata ) : InFileRTMPStream
CreateINS ( uint channelId, uint streamId, string streamName ) : InNetRTMPStream
CreateNeutralStream ( uint &streamId ) : RTMPStream
CreateONS ( uint streamId, string streamName, ulong inStreamType ) : BaseOutNetRTMPStream
Dispose ( ) : void
EnqueueForTimeEvent ( uint seconds ) : bool
GetChannel ( uint id ) : Channel
GetDHOffset ( BufferWithOffset pBuffer, byte schemeNumber ) : uint
GetDHOffset0 ( BufferWithOffset pBuffer ) : uint
GetDHOffset1 ( BufferWithOffset pBuffer ) : uint
GetDigestOffset ( BufferWithOffset pBuffer, byte schemeNumber ) : uint
GetDigestOffset0 ( BufferWithOffset pBuffer ) : uint
GetDigestOffset1 ( BufferWithOffset pBuffer ) : uint
HMACsha256 ( BufferWithOffset pData, uint dataLength, byte key, uint keyLength ) : byte[]
HMACsha256 ( byte pData, uint dataLength, byte key, uint keyLength ) : byte[]
ReadyForSend ( ) : void
ReleaseChannel ( Channel pChannel ) : void
ReserveChannel ( ) : Channel
ResetChannel ( uint channelId ) : bool
SendMessage ( AmfMessage message, bool enqueueForOutbound = false, bool recycleMessageBody = true ) : bool
SendMessages ( ) : bool
SetInboundChunkSize ( uint chunkSize ) : bool
SetWinAckSize ( uint winAckSize ) : void
SignalInputData ( int recAmount ) : bool
TrySetOutboundChunkSize ( uint chunkSize ) : void

Protected Methods

Method Description
BaseRTMPProtocol ( ) : System
PerformHandshake ( InputStream buffer ) : bool

Private Methods

Method Description
ProcessBytes ( InputStream buffer ) : bool
RemoveIFS ( InFileRTMPStream pIFS ) : void

Method Details

BaseRTMPProtocol() protected method

protected BaseRTMPProtocol ( ) : System
return System

ChunkAmfMessage() public method

public ChunkAmfMessage ( Header header, BufferWithOffset input, MemoryStream output ) : void
header Header
input CSharpRTMP.Common.BufferWithOffset
output System.IO.MemoryStream
return void

CloseStream() public method

public CloseStream ( uint streamId, bool createNeutralStream ) : bool
streamId uint
createNeutralStream bool
return bool

CreateIFS() public method

public CreateIFS ( Variant metadata ) : InFileRTMPStream
metadata Variant
return Core.Protocols.Rtmp.InFileRTMPStream

CreateINS() public method

public CreateINS ( uint channelId, uint streamId, string streamName ) : InNetRTMPStream
channelId uint
streamId uint
streamName string
return InNetRTMPStream

CreateNeutralStream() public method

public CreateNeutralStream ( uint &streamId ) : RTMPStream
streamId uint
return RTMPStream

CreateONS() public method

public CreateONS ( uint streamId, string streamName, ulong inStreamType ) : BaseOutNetRTMPStream
streamId uint
streamName string
inStreamType ulong
return BaseOutNetRTMPStream

Dispose() public method

public Dispose ( ) : void
return void

EnqueueForTimeEvent() public method

public EnqueueForTimeEvent ( uint seconds ) : bool
seconds uint
return bool

GetChannel() public method

public GetChannel ( uint id ) : Channel
id uint
return Channel

GetDHOffset() public method

public GetDHOffset ( BufferWithOffset pBuffer, byte schemeNumber ) : uint
pBuffer CSharpRTMP.Common.BufferWithOffset
schemeNumber byte
return uint

GetDHOffset0() public method

public GetDHOffset0 ( BufferWithOffset pBuffer ) : uint
pBuffer CSharpRTMP.Common.BufferWithOffset
return uint

GetDHOffset1() public method

public GetDHOffset1 ( BufferWithOffset pBuffer ) : uint
pBuffer CSharpRTMP.Common.BufferWithOffset
return uint

GetDigestOffset() public method

public GetDigestOffset ( BufferWithOffset pBuffer, byte schemeNumber ) : uint
pBuffer CSharpRTMP.Common.BufferWithOffset
schemeNumber byte
return uint

GetDigestOffset0() public method

public GetDigestOffset0 ( BufferWithOffset pBuffer ) : uint
pBuffer CSharpRTMP.Common.BufferWithOffset
return uint

GetDigestOffset1() public method

public GetDigestOffset1 ( BufferWithOffset pBuffer ) : uint
pBuffer CSharpRTMP.Common.BufferWithOffset
return uint

HMACsha256() public static method

public static HMACsha256 ( BufferWithOffset pData, uint dataLength, byte key, uint keyLength ) : byte[]
pData CSharpRTMP.Common.BufferWithOffset
dataLength uint
key byte
keyLength uint
return byte[]

HMACsha256() public static method

public static HMACsha256 ( byte pData, uint dataLength, byte key, uint keyLength ) : byte[]
pData byte
dataLength uint
key byte
keyLength uint
return byte[]

PerformHandshake() protected abstract method

protected abstract PerformHandshake ( InputStream buffer ) : bool
buffer CSharpRTMP.Common.InputStream
return bool

ReadyForSend() public method

public ReadyForSend ( ) : void
return void

ReleaseChannel() public method

public ReleaseChannel ( Channel pChannel ) : void
pChannel Channel
return void

ReserveChannel() public method

public ReserveChannel ( ) : Channel
return Channel

ResetChannel() public method

public ResetChannel ( uint channelId ) : bool
channelId uint
return bool

SendMessage() public method

public SendMessage ( AmfMessage message, bool enqueueForOutbound = false, bool recycleMessageBody = true ) : bool
message AmfMessage
enqueueForOutbound bool
recycleMessageBody bool
return bool

SendMessages() public method

public SendMessages ( ) : bool
return bool

SetInboundChunkSize() public method

public SetInboundChunkSize ( uint chunkSize ) : bool
chunkSize uint
return bool

SetWinAckSize() public method

public SetWinAckSize ( uint winAckSize ) : void
winAckSize uint
return void

SignalInputData() public method

public SignalInputData ( int recAmount ) : bool
recAmount int
return bool

TrySetOutboundChunkSize() public method

public TrySetOutboundChunkSize ( uint chunkSize ) : void
chunkSize uint
return void

Property Details

GenuineFmsKey public static property

public static byte[] GenuineFmsKey
return byte[]

GenuineFpKey public static property

public static byte[] GenuineFpKey
return byte[]

_channelPool protected property

protected Stack _channelPool
return Stack

_channels protected property

protected Dictionary _channels
return Channel>.Dictionary

_handshakeCompleted protected property

protected bool _handshakeCompleted
return bool

_inboundChunkSize protected property

protected uint _inboundChunkSize
return uint

_nextReceivedBytesCountReport protected property

protected ulong _nextReceivedBytesCountReport
return ulong

_outboundChunkSize public property

public uint _outboundChunkSize
return uint

_pProtocolHandler protected property

protected BaseRTMPAppProtocolHandler,CSharpRTMP.Core.Protocols.Rtmp _pProtocolHandler
return BaseRTMPAppProtocolHandler

_rtmpProtocolSerializer protected property

protected RTMPProtocolSerializer,CSharpRTMP.Core.Protocols.Rtmp _rtmpProtocolSerializer
return RTMPProtocolSerializer

_rtmpState protected property

protected RTMPState _rtmpState
return RTMPState

_rxInvokes protected property

protected ulong _rxInvokes
return ulong

_selectedChannel protected property

protected int _selectedChannel
return int

_streams protected property

protected IStream[] _streams
return IStream[]

_txInvokes protected property

protected ulong _txInvokes
return ulong

_winAckSize protected property

protected uint _winAckSize
return uint