org.mobicents.media.server.impl.resource.mediaplayer.video
Class VideoPlayerImpl

java.lang.Object
  extended by org.mobicents.media.server.impl.BaseComponent
      extended by org.mobicents.media.server.impl.AbstractSource
          extended by org.mobicents.media.server.impl.resource.mediaplayer.video.VideoPlayerImpl
All Implemented Interfaces:
java.io.Serializable, org.mobicents.media.Component, org.mobicents.media.MediaSource, org.mobicents.media.server.spi.clock.Task, org.mobicents.media.server.spi.resource.Player

public class VideoPlayerImpl
extends AbstractSource
implements org.mobicents.media.server.spi.resource.Player

Author:
baranowb, Oleg Kulikov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mobicents.media.server.impl.AbstractSource
logger, otherParty
 
Fields inherited from class org.mobicents.media.server.impl.BaseComponent
format
 
Constructor Summary
VideoPlayerImpl(java.lang.String name, java.lang.String videoMediaDirectory)
          Creates new instance of the Audio player.
 
Method Summary
 void evolve(org.mobicents.media.Buffer buffer, long timestamp)
          This method must be overriden by concrete media source.
 long getDuration()
          (Non Java-doc).
 org.mobicents.media.Format[] getFormats()
           
<T> T
getInterface(java.lang.Class<T> interfaceType)
           
 long getMediaTime()
          (Non Java-doc).
 void setMediaTime(long timestamp)
          (Non Java-doc).
 void setURL(java.lang.String passedURI)
          (Non Java-doc.)
 void start()
          (Non Java-doc).
 void stop()
          (Non Java-doc).
 
Methods inherited from class org.mobicents.media.server.impl.AbstractSource
afterStop, beforeStart, cancel, completed, connect, connect, disconnect, disconnect, failed, getBytesTransmitted, getPacketsTransmitted, getSupportedFormatList, isActive, isConnected, isMultipleConnectionsAllowed, isStarted, perform, resetStats, setDuration, setPreffered, setStarted, started, stopped
 
Methods inherited from class org.mobicents.media.server.impl.BaseComponent
addListener, getConnection, getEndpoint, getFormat, getId, getName, removeListener, sendEvent, setConnection, setEndpoint, subset, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mobicents.media.Component
addListener, getConnection, getEndpoint, getFormat, getId, getName, removeListener, resetStats, setConnection, setEndpoint
 

Constructor Detail

VideoPlayerImpl

public VideoPlayerImpl(java.lang.String name,
                       java.lang.String videoMediaDirectory)
Creates new instance of the Audio player.

Parameters:
name - the name of the AudioPlayer to be created.
timer - source of synchronization.
videoMediaDirectory -
Method Detail

setURL

public void setURL(java.lang.String passedURI)
            throws java.io.IOException,
                   org.mobicents.media.server.spi.ResourceUnavailableException
(Non Java-doc.)

Specified by:
setURL in interface org.mobicents.media.server.spi.resource.Player
Throws:
java.io.IOException
org.mobicents.media.server.spi.ResourceUnavailableException
See Also:
org.mobicents.media.server.spi.resource.AudioPlayer#setURL(java.lang.String)

getDuration

public long getDuration()
Description copied from class: AbstractSource
(Non Java-doc).

Specified by:
getDuration in interface org.mobicents.media.MediaSource
Overrides:
getDuration in class AbstractSource
See Also:
org.mobicents.media.MediaSource#getDuration(long duration);

setMediaTime

public void setMediaTime(long timestamp)
Description copied from class: AbstractSource
(Non Java-doc).

Specified by:
setMediaTime in interface org.mobicents.media.MediaSource
Overrides:
setMediaTime in class AbstractSource
See Also:
MediaSource.setMediaTime(long timestamp);

getMediaTime

public long getMediaTime()
Description copied from class: AbstractSource
(Non Java-doc).

Specified by:
getMediaTime in interface org.mobicents.media.MediaSource
Overrides:
getMediaTime in class AbstractSource
See Also:
MediaSource.getMediaTime();

start

public void start()
Description copied from class: AbstractSource
(Non Java-doc).

Specified by:
start in interface org.mobicents.media.MediaSource
Specified by:
start in interface org.mobicents.media.server.spi.resource.Player
Overrides:
start in class AbstractSource
See Also:
MediaSource.start().

stop

public void stop()
Description copied from class: AbstractSource
(Non Java-doc).

Specified by:
stop in interface org.mobicents.media.MediaSource
Specified by:
stop in interface org.mobicents.media.server.spi.resource.Player
Overrides:
stop in class AbstractSource
See Also:
MediaSource.stop().

evolve

public void evolve(org.mobicents.media.Buffer buffer,
                   long timestamp)
Description copied from class: AbstractSource
This method must be overriden by concrete media source. The media have to fill buffer with media data and attributes.

Specified by:
evolve in class AbstractSource
Parameters:
buffer - the buffer object for media.

getFormats

public org.mobicents.media.Format[] getFormats()
Specified by:
getFormats in interface org.mobicents.media.MediaSource

getInterface

public <T> T getInterface(java.lang.Class<T> interfaceType)
Specified by:
getInterface in interface org.mobicents.media.Component
Overrides:
getInterface in class AbstractSource


Copyright © 2010. All Rights Reserved.