org.red5.server.api.stream.support
Class DynamicPlayItem

java.lang.Object
  extended by org.red5.server.api.stream.support.DynamicPlayItem
All Implemented Interfaces:
IPlayItem

public class DynamicPlayItem
extends Object
implements IPlayItem

Dynamic playlist item implementation


Field Summary
protected  long length
          Length - amount to play
protected  IMessageInput msgInput
          Message source
protected  String name
          Playlist item name
protected  double offset
          Offset
protected  long size
          Size - for VOD items this will be the file size
protected  long start
          Start mark
 
Method Summary
static DynamicPlayItem build(String name, long start, long length)
          Builder for DynamicPlayItem
static DynamicPlayItem build(String name, long start, long length, double offset)
          Builder for DynamicPlayItem
 boolean equals(Object obj)
           
 long getLength()
          Returns play item length in milliseconds
 IMessageInput getMessageInput()
          Returns IMessageInput object.
 IMessageInput getMsgInput()
          Alias for getMessageInput
 String getName()
          Returns item name
 long getSize()
          Returns size in bytes
 long getStart()
          Returns boolean value that specifies whether item can be played
 int hashCode()
           
 void setMsgInput(IMessageInput msgInput)
          Setter for message input
 void setSize(long size)
          Set the size in bytes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final String name
Playlist item name


start

protected final long start
Start mark


length

protected final long length
Length - amount to play


size

protected long size
Size - for VOD items this will be the file size


offset

protected double offset
Offset


msgInput

protected IMessageInput msgInput
Message source

Method Detail

getLength

public long getLength()
Returns play item length in milliseconds

Specified by:
getLength in interface IPlayItem
Returns:
Play item length in milliseconds

getMessageInput

public IMessageInput getMessageInput()
Returns IMessageInput object. IMessageInput is an endpoint for a consumer to connect.

Specified by:
getMessageInput in interface IPlayItem
Returns:
IMessageInput object

getName

public String getName()
Returns item name

Specified by:
getName in interface IPlayItem
Returns:
item name

getStart

public long getStart()
Returns boolean value that specifies whether item can be played

Specified by:
getStart in interface IPlayItem
Returns:
start time

getMsgInput

public IMessageInput getMsgInput()
Alias for getMessageInput

Returns:
Message input source

setMsgInput

public void setMsgInput(IMessageInput msgInput)
Setter for message input

Parameters:
msgInput - Message input

getSize

public long getSize()
Returns size in bytes


setSize

public void setSize(long size)
Set the size in bytes

Parameters:
size - size in bytes

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

build

public static DynamicPlayItem build(String name,
                                    long start,
                                    long length)
Builder for DynamicPlayItem

Parameters:
name -
start -
length -
Returns:
play item instance

build

public static DynamicPlayItem build(String name,
                                    long start,
                                    long length,
                                    double offset)
Builder for DynamicPlayItem

Parameters:
name -
start -
length -
offset -
Returns:
play item instance


Copyright © 2006-2012 The Red5 Project