|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.server.stream.consumer.FileConsumer
public class FileConsumer
Consumer that pushes messages to file. Used when recording live streams.
| Field Summary |
|---|
| Fields inherited from interface org.red5.server.messaging.IPushableConsumer |
|---|
KEY |
| Constructor Summary | |
|---|---|
FileConsumer()
Default ctor |
|
FileConsumer(IScope scope,
File file)
Creates file consumer |
|
| Method Summary | |
|---|---|
void |
doWrites()
Write all the queued items to the writer. |
void |
doWrites(org.red5.server.stream.consumer.FileConsumer.QueuedData[] slice)
Write a slice of the queued items to the writer. |
int |
getQueueThreshold()
Returns the size of the delayed writing queue. |
int |
getSchedulerThreadSize()
|
int |
getSliceLength()
Returns the amount of queued data items to be written at a time. |
boolean |
isDelayWrite()
Whether or not the queue should be utilized. |
void |
onOOBControlMessage(IMessageComponent source,
IPipe pipe,
OOBControlMessage oobCtrlMsg)
Out-of-band control message handler |
void |
onPipeConnectionEvent(PipeConnectionEvent event)
Pipe connection event handler |
void |
pushMessage(IPipe pipe,
IMessage message)
Push message through pipe |
void |
setAudioDecoderConfiguration(IRTMPEvent decoderConfig)
Sets a audio decoder configuration; some codecs require this, such as AAC. |
void |
setDelayWrite(boolean delayWrite)
Sets whether or not to use the queue. |
void |
setFile(File file)
Sets the file we're writing to. |
void |
setQueueThreshold(int queueThreshold)
Sets the threshold for the queue. |
void |
setSchedulerThreadSize(int schedulerThreadSize)
|
void |
setScope(IScope scope)
Sets the scope for this consumer. |
void |
setSliceLength(int sliceLength)
Sets the amount of queued data items to be written at a time. |
void |
setVideoDecoderConfiguration(IRTMPEvent decoderConfig)
Sets a video decoder configuration; some codecs require this, such as AVC. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileConsumer()
public FileConsumer(IScope scope,
File file)
scope - Scope of consumerfile - File| Method Detail |
|---|
public void pushMessage(IPipe pipe,
IMessage message)
throws IOException
pushMessage in interface IPushableConsumerpipe - Pipemessage - Message to push
IOException - if message could not be written
public void onOOBControlMessage(IMessageComponent source,
IPipe pipe,
OOBControlMessage oobCtrlMsg)
onOOBControlMessage in interface IMessageComponentsource - Source of messagepipe - Pipe that is used to transmit OOB messageoobCtrlMsg - OOB control messagepublic void onPipeConnectionEvent(PipeConnectionEvent event)
onPipeConnectionEvent in interface IPipeConnectionListenerevent - Pipe connection eventpublic final void doWrites()
public final void doWrites(org.red5.server.stream.consumer.FileConsumer.QueuedData[] slice)
public void setVideoDecoderConfiguration(IRTMPEvent decoderConfig)
decoderConfig - video codec configurationpublic void setAudioDecoderConfiguration(IRTMPEvent decoderConfig)
decoderConfig - audio codec configurationpublic void setScope(IScope scope)
scope - public void setFile(File file)
file - public void setQueueThreshold(int queueThreshold)
queueThreshold - number of items to queue before spawning workerpublic int getQueueThreshold()
public void setSliceLength(int sliceLength)
sliceLength - public int getSliceLength()
public boolean isDelayWrite()
public void setDelayWrite(boolean delayWrite)
delayWrite - true to use the queue, false if notpublic int getSchedulerThreadSize()
public void setSchedulerThreadSize(int schedulerThreadSize)
schedulerThreadSize - the schedulerThreadSize to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||