|
||||||||||
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 | |
---|---|
protected boolean |
checkSendMessageEnabled(RTMPMessage message)
Check if sending the given message was enabled by the client. |
void |
close()
Close stream |
int |
getLastMessageTimestamp()
Returns the timestamp of the last message sent. |
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 |
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 |
resume(int position)
Resume playback |
void |
seek(int position)
Seek to a given position |
void |
sendBlankAudio(boolean sendBlankAudio)
|
void |
setBufferCheckInterval(int bufferCheckInterval)
|
void |
setMaxPendingVideoFrames(int maxPendingVideoFrames)
|
void |
setMaxSequentialPendingVideoFrames(int maxSequentialPendingVideoFrames)
|
void |
setUnderrunTrigger(int underrunTrigger)
|
void |
start()
Start stream |
void |
stop()
Stop playback |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 exceptionpublic 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 exceptionpublic void pause(int position) throws IllegalStateException
position
- Position in file
IllegalStateException
- If stream is stoppedpublic void resume(int position) throws IllegalStateException
position
- Resumes playback
IllegalStateException
- If stream is stoppedpublic 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()
public void onOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg)
onOOBControlMessage
in interface IMessageComponent
source
- Message component sourcepipe
- Connection pipeoobCtrlMsg
- Out-of-band control messagepublic void onPipeConnectionEvent(PipeConnectionEvent event)
onPipeConnectionEvent
in interface IPipeConnectionListener
event
- Pipe connection eventpublic void pushMessage(IPipe pipe, IMessage message) throws IOException
pushMessage
in interface IPushableConsumer
pipe
- Pipemessage
- Message
IOException
- if message could not be writtenpublic boolean isPullMode()
public boolean isPaused()
public int getLastMessageTimestamp()
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
protected boolean checkSendMessageEnabled(RTMPMessage message)
message
- the message to check
true
if the message should be sent, false
otherwise (and the message is discarded)public void setMaxPendingVideoFrames(int maxPendingVideoFrames)
maxPendingVideoFrames
- the maxPendingVideoFrames to setpublic void setMaxSequentialPendingVideoFrames(int maxSequentialPendingVideoFrames)
maxSequentialPendingVideoFrames
- the maxSequentialPendingVideoFrames to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |