org.red5.server.stream

## Interface IProviderService

All Superinterfaces:
  IScopeService

All Known Implementing Classes:
  ProviderService

    public interface IProviderService
    extends IScopeService

Central unit to get access to different types of provider inputs

### Nested Class Summary

Nested Classes
`static class` `IProviderService.INPUT_TYPE`

### Field Summary

Fields
`static String` `BEAN_NAME`

### Method Summary

Methods
`Set<String>` `getBroadcastStreamNames(IScope scope)` Get names of existing broadcast streams in a scope.
`IMessageInput` `getLiveProviderInput(IScope scope, String name, boolean needCreate)` Get a named Live provider as the source of input.
`IMessageInput` `getProviderInput(IScope scope, String name)` Get a named provider as the source of input.
`File` `getVODProviderFile(IScope scope, String name)` Get a named VOD source file.
`IMessageInput` `getVODProviderInput(IScope scope, String name)` Get a named VOD provider as the source of input.
`IProviderService.INPUT_TYPE` `lookupProviderInput(IScope scope, String name, int type)` Returns the input type for a named provider if a source of input exists.
`boolean` `registerBroadcastStream(IScope scope, String name, IBroadcastStream stream)` Register a broadcast stream to a scope.
`boolean` `unregisterBroadcastStream(IScope scope, String name)` Unregister a broadcast stream of a specific name from a scope.
`boolean` `unregisterBroadcastStream(IScope scope, String name, IBroadcastStream stream)` Unregister a broadcast stream of a specific name from a scope.

### Field Detail

#### BEAN_NAME

    static final String BEAN_NAME

See Also:
  Constant Field Values

### Method Detail

#### lookupProviderInput

    IProviderService.INPUT_TYPE lookupProviderInput(IScope scope,
                                                  String name,
                                                  int type)

Returns the input type for a named provider if a source of input exists. Live is checked first and VOD second.

Parameters:
  `scope` - Scope of provider
  `name` - Name of provider
  `type` - Type of video stream
Returns:
  LIVE if live, VOD if VOD, and NOT_FOUND otherwise

#### getProviderInput

    IMessageInput getProviderInput(IScope scope,
                                 String name)

Get a named provider as the source of input. Live stream first, VOD stream second.

Parameters:
  `scope` - Scope of provider
  `name` - Name of provider
Returns:
  `null` if nothing found.

#### getLiveProviderInput

    IMessageInput getLiveProviderInput(IScope scope,
                                     String name,
                                     boolean needCreate)

Get a named Live provider as the source of input.

Parameters:
  `scope` - Scope of provider
  `name` - Name of provider
  `needCreate` - Whether there's need to create basic scope / live provider if they don't exist
Returns:
  `null` if not found.

#### getVODProviderInput

    IMessageInput getVODProviderInput(IScope scope,
                                    String name)

Get a named VOD provider as the source of input.

Parameters:
  `scope` - Scope of provider
  `name` - Name of provider
Returns:
  `null` if not found.

#### getVODProviderFile

    File getVODProviderFile(IScope scope,
                          String name)

Get a named VOD source file.

Parameters:
  `scope` - Scope of provider
  `name` - Name of provider
Returns:
  `null` if not found.

#### registerBroadcastStream

    boolean registerBroadcastStream(IScope scope,
                                  String name,
                                  IBroadcastStream stream)

Register a broadcast stream to a scope.

Parameters:
  `scope` - Scope
  `name` - Name of stream
  `stream` - Broadcast stream to register
Returns:
  `true` if register successfully.

#### getBroadcastStreamNames

    Set<String> getBroadcastStreamNames(IScope scope)

Get names of existing broadcast streams in a scope.

Parameters:
  `scope` - Scope to get stream names from
Returns:
  List of stream names

#### unregisterBroadcastStream

    boolean unregisterBroadcastStream(IScope scope,
                                    String name)

Unregister a broadcast stream of a specific name from a scope.

Parameters:
  `scope` - Scope
  `name` - Stream name
Returns:
  `true` if unregister successfully.

#### unregisterBroadcastStream

    boolean unregisterBroadcastStream(IScope scope,
                                    String name,
                                    IBroadcastStream stream)

Unregister a broadcast stream of a specific name from a scope.

Parameters:
  `scope` - Scope
  `name` - Stream name
  `stream` - Broadcast stream
Returns:
  `true` if unregister successfully.