Package org.jitsi.impl.neomedia.protocol
Class StreamSubstituteBufferTransferHandler
- java.lang.Object
-
- org.jitsi.impl.neomedia.protocol.StreamSubstituteBufferTransferHandler
-
- All Implemented Interfaces:
javax.media.protocol.BufferTransferHandler
public class StreamSubstituteBufferTransferHandler extends Object implements javax.media.protocol.BufferTransferHandler
Implements a BufferTransferHandler wrapper which doesn't expose a PushBufferStream but rather a specific substitute in order to give full control to thePushBufferStream.read(javax.media.Buffer)method of the substitute.The purpose is achieved in
#transferData(PushBufferStream)where the method argumentstreamis ignored and the substitute is used instead.- Author:
- Lubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description StreamSubstituteBufferTransferHandler(javax.media.protocol.BufferTransferHandler transferHandler, javax.media.protocol.PushBufferStream stream, javax.media.protocol.PushBufferStream substitute)Initializes a new StreamSubstituteBufferTransferHandler instance which is to overwrite the source PushBufferStream of a specific BufferTransferHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtransferData(javax.media.protocol.PushBufferStream stream)Implements BufferTransferHandler#transferData(PushBufferStream).
-
-
-
Constructor Detail
-
StreamSubstituteBufferTransferHandler
public StreamSubstituteBufferTransferHandler(javax.media.protocol.BufferTransferHandler transferHandler, javax.media.protocol.PushBufferStream stream, javax.media.protocol.PushBufferStream substitute)Initializes a new StreamSubstituteBufferTransferHandler instance which is to overwrite the source PushBufferStream of a specific BufferTransferHandler.- Parameters:
transferHandler- the BufferTransferHandler the new instance is to overwrite the source PushBufferStream ofstream- thePushBufferStreamto be overridden for the specifiedtransferHandlerwith the specifiedsubstitutesubstitute- thePushBufferStreamto override the specifiedstreamfor the specifiedtransferHandler
-
-
Method Detail
-
transferData
public void transferData(javax.media.protocol.PushBufferStream stream)
Implements BufferTransferHandler#transferData(PushBufferStream). Puts in place the essence of the StreamSubstituteBufferTransferHandler class which is to report to the transferHandler from the same PushBufferStream to which it was set so that the substitute can gain full control.- Specified by:
transferDatain interfacejavax.media.protocol.BufferTransferHandler- Parameters:
stream- the PushBufferStream to transfer
-
-