|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.server.stream.AbstractStream
org.red5.server.stream.AbstractClientStream
org.red5.server.stream.SingleItemSubscriberStream
public class SingleItemSubscriberStream
Stream of a single play item for a subscriber
| Nested Class Summary | |
|---|---|
class |
SingleItemSubscriberStream.Notifier
Handles notifications in a separate thread. |
| Field Summary | |
|---|---|
protected int |
bufferCheckInterval
Interval in ms to check for buffer underruns in VOD streams. |
protected long |
creationTime
Timestamp this stream was created. |
protected PlayEngine |
engine
Plays items back |
protected static ScheduledThreadPoolExecutor |
executor
Executor that will be used to schedule stream playback to keep the client buffer filled. |
protected int |
underrunTrigger
Number of pending messages at which a NetStream.Play.InsufficientBW
message is generated for VOD streams. |
| Fields inherited from class org.red5.server.stream.AbstractStream |
|---|
lock, metaData, state |
| Fields inherited from interface org.red5.server.api.stream.IClientStream |
|---|
MODE_APPEND, MODE_LIVE, MODE_PUBLISH, MODE_READ, MODE_RECORD |
| Constructor Summary | |
|---|---|
SingleItemSubscriberStream()
|
|
| Method Summary | |
|---|---|
void |
close()
Close this stream. |
ScheduledThreadPoolExecutor |
getExecutor()
Return the executor to use. |
boolean |
isPaused()
Check if the stream is currently paused. |
void |
onChange(StreamState state,
Object... changed)
Notification of state change and associated parameters. |
void |
pause(int position)
Pause at a position for current playing item. |
void |
play()
Start playing. |
void |
receiveAudio(boolean receive)
Should the stream send audio to the client? |
void |
receiveVideo(boolean receive)
Should the stream send video to the client? |
void |
resume(int position)
Resume from a position for current playing item. |
void |
seek(int position)
Seek into a position for current playing item. |
void |
setBufferCheckInterval(int bufferCheckInterval)
Set interval to check for buffer underruns. |
void |
setExecutor(ScheduledThreadPoolExecutor executor)
Set the executor to use. |
void |
setPlayItem(IPlayItem item)
Setter for property 'playItem'. |
void |
setUnderrunTrigger(int underrunTrigger)
Set maximum number of pending messages at which a NetStream.Play.InsufficientBW message will be
generated for VOD streams |
void |
start()
Start this stream. |
void |
stop()
Stop playing. |
| Methods inherited from class org.red5.server.stream.AbstractClientStream |
|---|
getBroadcastStreamPublishName, getClientBufferDuration, getConnection, getStreamId, setBroadcastStreamPublishName, setClientBufferDuration, setConnection, setStreamId |
| Methods inherited from class org.red5.server.stream.AbstractStream |
|---|
getCodecInfo, getCreationTime, getMetaData, getName, getScope, getState, getStreamAwareHandler, setCodecInfo, setName, setScope, setState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.red5.server.api.stream.ISubscriberStream |
|---|
getState, setState |
| Methods inherited from interface org.red5.server.api.stream.IClientStream |
|---|
getBroadcastStreamPublishName, getClientBufferDuration, getConnection, getStreamId, setClientBufferDuration |
| Methods inherited from interface org.red5.server.api.stream.IStream |
|---|
getCodecInfo, getCreationTime, getName, getScope |
| Field Detail |
|---|
protected static ScheduledThreadPoolExecutor executor
protected int bufferCheckInterval
protected int underrunTrigger
NetStream.Play.InsufficientBW
message is generated for VOD streams.
protected long creationTime
protected PlayEngine engine
| Constructor Detail |
|---|
public SingleItemSubscriberStream()
| Method Detail |
|---|
public void setPlayItem(IPlayItem item)
ISingleItemSubscriberStream
setPlayItem in interface ISingleItemSubscriberStreamitem - Value to set for property 'playItem'.
public void play()
throws IOException
ISubscriberStream
play in interface ISubscriberStreamIOException - if an IO error occurred while starting to play the streampublic void pause(int position)
pause in interface ISubscriberStreamposition - Position for pause in millisecond.public void resume(int position)
resume in interface ISubscriberStreamposition - Position for resume in millisecond.public void stop()
stop in interface IStreamstop in interface ISubscriberStream
public void seek(int position)
throws OperationNotSupportedException
seek in interface ISubscriberStreamposition - Position for seek in millisecond.
OperationNotSupportedException - if the stream doesn't support seeking.public boolean isPaused()
ISubscriberStream
isPaused in interface ISubscriberStreampublic void receiveVideo(boolean receive)
receiveVideo in interface ISubscriberStreampublic void receiveAudio(boolean receive)
receiveAudio in interface ISubscriberStreampublic void setExecutor(ScheduledThreadPoolExecutor executor)
executor - the executorpublic ScheduledThreadPoolExecutor getExecutor()
getExecutor in interface ISubscriberStreampublic void setBufferCheckInterval(int bufferCheckInterval)
0 to
disable.
bufferCheckInterval - interval in mspublic void setUnderrunTrigger(int underrunTrigger)
NetStream.Play.InsufficientBW message will be
generated for VOD streams
underrunTrigger - the maximum number of pending messagespublic void start()
IStream
start in interface IStreampublic void close()
IStream
close in interface IStream
public void onChange(StreamState state,
Object... changed)
onChange in interface ISubscriberStreamstate - new statechanged - parameters associated with the change
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||