## org.red5.server.api.stream
Interface IStreamService

All Superinterfaces:
  IScopeService

All Known Implementing Classes:
  StreamService

    public interface IStreamService

extends IScopeService

This interface represents the stream methods that can be called throug RTMP.

Field Summary
`static String` `BEAN_NAME`

Method Summary
`void` `closeStream()` Close the stream but not deallocate the resources.
`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
`void` `pause(Boolean pausePlayback, int position)` Pauses playback
`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` `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

Field Detail

### BEAN_NAME

    static final String BEAN_NAME

See Also:
  Constant Field Values

Method Detail

### createStream

    int createStream()

  Create a stream and return a corresponding id.

  Returns:
    ID of created stream

### closeStream

    void closeStream()

  Close the stream but not deallocate the resources.

### deleteStream

    void deleteStream(int streamId)

  Close the stream if not been closed. Deallocate the related resources.

  Parameters:
    `streamId` - Stram id

### releaseStream

    void releaseStream(String streamName)

  Called by FME.

  Parameters:
    `streamName` - stream name

### deleteStream

    void deleteStream(IStreamCapableConnection conn,
                      int streamId)

  Delete stream

  Parameters:
    `conn` - Stream capable connection
    `streamId` - Stream id

### play

    void play(Boolean dontStop)

  Play stream without initial stop

  Parameters:
    `dontStop` - Stoppage flag

### play

    void play(String name)

  Play stream with name

  Parameters:
    `name` - Stream name

### play

    void play(String name,
              int start)

  Play stream with name from start position

  Parameters:
    `name` - Stream name
    `start` - Start position

### play

    void play(String name,
              int start,
              int length)

  Play stream with name from start position and for given amount if time

  Parameters:
    `name` - Stream name
    `start` - Start position
    `length` - Playback length

### play

    void play(String name,
              int start,
              int length,
              boolean flushPlaylist)

  Publishes stream from given position for given amount of time

  Parameters:
    `name` - Stream published name
    `start` - Start position
    `length` - Playback length
    `flushPlaylist` - Flush playlist?

### publish

    void publish(String name)

  Publishes stream with given name

  Parameters:
    `name` - Stream published name

### publish

    void publish(String name,
                 String mode)

  Publishes stream with given name and mode

  Parameters:
    `name` - Stream published name
    `mode` - Stream publishing mode

### publish

    void publish(Boolean dontStop)

  Publish

  Parameters:
    `dontStop` - Whether need to stop first

### seek

    void seek(int position)

  Seek to position

  Parameters:
    `position` - Seek position

### pause

    void pause(Boolean pausePlayback,
               int position)

  Pauses playback

  Parameters:
    `pausePlayback` - Pause flah
    `position` - Pause position

### pauseRaw

    void pauseRaw(Boolean pausePlayback,
                  int position)

  Undocumented Flash Plugin 10 call, assuming to be the alias to pause(boolean, int)

  Parameters:
    `pausePlayback` - Pause flah
    `position` - Pause position

### receiveVideo

    void receiveVideo(boolean receive)

  Can recieve video?

  Parameters:
    `receive` - Boolean flag

### receiveAudio

    void receiveAudio(boolean receive)

  Can recieve audio?

  Parameters:
    `receive` - Boolean flag

Copyright © 2006-2010 The Red5 Project