|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.server.stream.StreamService
public class StreamService
Stream service
| Field Summary |
|---|
| Fields inherited from interface org.red5.server.api.stream.IStreamService |
|---|
BEAN_NAME |
| Constructor Summary | |
|---|---|
StreamService()
|
|
| Method Summary | |
|---|---|
void |
closeStream()
Close the stream but not deallocate the resources. |
static void |
closeStream(IConnection connection,
int streamId)
Close stream. |
int |
createStream()
Create a stream and return a corresponding id. |
void |
deleteStream(int streamId)
Close the stream if not been closed. |
void |
deleteStream(IStreamCapableConnection conn,
int streamId)
Delete stream |
IBroadcastScope |
getBroadcastScope(IScope scope,
String name)
Return broadcast scope object for given scope and child scope name |
void |
pause(boolean pausePlayback,
int position)
Pauses playback |
void |
pause(Boolean pausePlayback,
int position)
Pause at given position. |
void |
pauseRaw(boolean pausePlayback,
int position)
Undocumented Flash Plugin 10 call, assuming to be the alias to pause(boolean, int) |
void |
play(Boolean dontStop)
Play stream without initial stop |
void |
play(String name)
Play stream with name |
void |
play(String name,
int start)
Play stream with name from start position |
void |
play(String name,
int start,
int length)
Play stream with name from start position and for given amount if time |
void |
play(String name,
int start,
int length,
boolean flushPlaylist)
Publishes stream from given position for given amount of time |
void |
play(String name,
int start,
int length,
Object flushPlaylist)
|
void |
publish(Boolean dontStop)
Publish |
void |
publish(String name)
Publishes stream with given name |
void |
publish(String name,
String mode)
Publishes stream with given name and mode |
void |
receiveAudio(boolean receive)
Can recieve audio? |
void |
receiveVideo(boolean receive)
Can recieve video? |
void |
releaseStream(String streamName)
Called by FME. |
void |
seek(int position)
Seek to position |
static void |
sendNetStreamStatus(IConnection conn,
String statusCode,
String description,
String name,
String status,
int streamId)
Send NetStream.Status to client (Flash Player) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamService()
| Method Detail |
|---|
public void closeStream()
closeStream in interface IStreamService
public static void closeStream(IConnection connection,
int streamId)
public void streamBroadcastStart(IBroadcastStream stream) {
super.streamBroadcastStart(stream);
if (stream instanceof IClientBroadcastStream) {
int publishedStreamId = ((ClientBroadcastStream)stream).getStreamId();
Red5.getConnectionLocal().setAttribute(PUBLISHED_STREAM_ID_ATTRIBUTE, publishedStreamId);
}
}
public void streamPlaylistItemPlay(IPlaylistSubscriberStream stream, IPlayItem item, boolean isLive) {
super.streamPlaylistItemPlay(stream, item, isLive);
Red5.getConnectionLocal().setAttribute(WATCHED_STREAM_ID_ATTRIBUTE, stream.getStreamId());
}
When stream is closed, corresponding NetStream status will be sent to stream provider / consumers.
Implementation is based on Red5's StreamService.close()
connection - client connectionstreamId - stream ID (number: 1,2,...)public int createStream()
createStream in interface IStreamServicepublic void deleteStream(int streamId)
deleteStream in interface IStreamServicestreamId - Stram id
public void deleteStream(IStreamCapableConnection conn,
int streamId)
deleteStream in interface IStreamServiceconn - Stream capable connectionstreamId - Stream idpublic void releaseStream(String streamName)
releaseStream in interface IStreamServicestreamName - stream name
public void pause(boolean pausePlayback,
int position)
pause in interface IStreamServicepausePlayback - Pause flahposition - Pause position
public void pauseRaw(boolean pausePlayback,
int position)
pauseRaw in interface IStreamServicepausePlayback - Pause flahposition - Pause position
public void pause(Boolean pausePlayback,
int position)
pausePlayback - Pause playback or notposition - Pause position
public void play(String name,
int start,
int length,
Object flushPlaylist)
public void play(String name,
int start,
int length,
boolean flushPlaylist)
play in interface IStreamServicename - Stream published namestart - Start positionlength - Playback lengthflushPlaylist - Flush playlist?
public void play(String name,
int start,
int length)
play in interface IStreamServicename - Stream namestart - Start positionlength - Playback length
public void play(String name,
int start)
play in interface IStreamServicename - Stream namestart - Start positionpublic void play(String name)
play in interface IStreamServicename - Stream namepublic void play(Boolean dontStop)
play in interface IStreamServicedontStop - Stoppage flagpublic void publish(Boolean dontStop)
publish in interface IStreamServicedontStop - Whether need to stop first
public void publish(String name,
String mode)
publish in interface IStreamServicename - Stream published namemode - Stream publishing modepublic void publish(String name)
publish in interface IStreamServicename - Stream published namepublic void seek(int position)
seek in interface IStreamServiceposition - Seek positionpublic void receiveVideo(boolean receive)
receiveVideo in interface IStreamServicereceive - Boolean flagpublic void receiveAudio(boolean receive)
receiveAudio in interface IStreamServicereceive - Boolean flag
public IBroadcastScope getBroadcastScope(IScope scope,
String name)
scope - Scope objectname - Child scope name
public static void sendNetStreamStatus(IConnection conn,
String statusCode,
String description,
String name,
String status,
int streamId)
NetStream.Status to client (Flash Player)
conn - connectionstatusCode - NetStream status codedescription - descriptionname - namestatus - The status - error, warning, or statusstreamId - stream id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||