|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.server.stream.PlayEngine
public final class PlayEngine
A play engine for playing an IPlayItem.
| Nested Class Summary | |
|---|---|
static class |
PlayEngine.Builder
Builder pattern |
| Field Summary |
|---|
| Fields inherited from interface org.red5.server.messaging.IPushableConsumer |
|---|
KEY |
| Method Summary | |
|---|---|
void |
available(ITokenBucket bucket,
long tokenCount)
Being called when the tokens requested are available. |
void |
close()
Close stream |
IRTMPEvent |
getLastMessage()
|
long |
getPlaybackStart()
|
boolean |
isPaused()
|
boolean |
isPullMode()
|
void |
onOOBControlMessage(IMessageComponent source,
IPipe pipe,
OOBControlMessage oobCtrlMsg)
|
void |
onPipeConnectionEvent(PipeConnectionEvent event)
Pipe connection event handler |
void |
pause(int position)
Pause at position |
void |
play(IPlayItem item)
Play stream |
void |
play(IPlayItem item,
boolean withReset)
Play stream |
protected void |
pullAndPush()
Receive then send if message is data (not audio or video) |
void |
pushMessage(IPipe pipe,
IMessage message)
Pushes message through pipe |
boolean |
receiveAudio()
Returns true if the engine currently receives audio. |
boolean |
receiveAudio(boolean receive)
Returns true if the engine currently receives audio and sets the new value. |
boolean |
receiveVideo()
Returns true if the engine currently receives video. |
boolean |
receiveVideo(boolean receive)
Returns true if the engine currently receives video and sets the new value. |
void |
reset(ITokenBucket bucket,
long tokenCount)
Resets tokens in bucket |
void |
resume(int position)
Resume playback |
void |
seek(int position)
Seek position in file |
void |
sendBlankAudio(boolean sendBlankAudio)
|
void |
setBandwidthController(IBWControlService bwController,
IBWControlContext bwContext)
|
void |
setBufferCheckInterval(int bufferCheckInterval)
|
void |
setUnderrunTrigger(int underrunTrigger)
|
void |
start()
Start stream |
void |
stop()
Stop playback |
void |
updateBandwithConfigure()
Update bandwidth configuration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setBandwidthController(IBWControlService bwController,
IBWControlContext bwContext)
public void setBufferCheckInterval(int bufferCheckInterval)
public void setUnderrunTrigger(int underrunTrigger)
public void start()
public void play(IPlayItem item)
throws StreamNotFoundException,
IllegalStateException,
IOException
item - Playlist item
StreamNotFoundException - Stream not found
IllegalStateException - Stream is in stopped state
IOException - Stream had io exception
public void play(IPlayItem item,
boolean withReset)
throws StreamNotFoundException,
IllegalStateException,
IOException
item - Playlist itemwithReset - Send reset status before playing.
StreamNotFoundException - Stream not found
IllegalStateException - Stream is in stopped state
IOException - Stream had IO exception
public void pause(int position)
throws IllegalStateException
position - Position in file
IllegalStateException - If stream is stopped
public void resume(int position)
throws IllegalStateException
position - Resumes playback
IllegalStateException - If stream is stopped
public void seek(int position)
throws IllegalStateException,
OperationNotSupportedException
position - Position
IllegalStateException - If stream is in stopped state
OperationNotSupportedException - If this object doesn't support the operation.
public void stop()
throws IllegalStateException
IllegalStateException - If stream is in stopped statepublic void close()
protected void pullAndPush()
throws IOException
IOException
public void onOOBControlMessage(IMessageComponent source,
IPipe pipe,
OOBControlMessage oobCtrlMsg)
onOOBControlMessage in interface IMessageComponentsource - Message component sourcepipe - Connection pipe
TODOoobCtrlMsg - Out-of-band control messagepublic void onPipeConnectionEvent(PipeConnectionEvent event)
onPipeConnectionEvent in interface IPipeConnectionListenerevent - Pipe connection event
public void pushMessage(IPipe pipe,
IMessage message)
throws IOException
pushMessage in interface IPushableConsumerpipe - Pipemessage - Message
IOException - if message could not be written
public void available(ITokenBucket bucket,
long tokenCount)
available in interface ITokenBucket.ITokenBucketCallbackbucket - BuckettokenCount - Number of tokens
public void reset(ITokenBucket bucket,
long tokenCount)
reset in interface ITokenBucket.ITokenBucketCallbackbucket - BuckettokenCount - Number of tokenspublic void updateBandwithConfigure()
public boolean isPullMode()
public boolean isPaused()
public IRTMPEvent getLastMessage()
public long getPlaybackStart()
public void sendBlankAudio(boolean sendBlankAudio)
public boolean receiveAudio()
public boolean receiveAudio(boolean receive)
receive - new value
public boolean receiveVideo()
public boolean receiveVideo(boolean receive)
receive - new value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||