FileDocCategorySizeDatePackage
Renderer.javaAPI DocAndroid 5.1 API7175Thu Mar 12 22:22:44 GMT 2015com.android.onemedia.playback

Renderer

public abstract class Renderer extends Object
TODO: Insert description here. (generated by epastern)

Fields Summary
public static final String
FEATURE_SET_CONTENT
public static final String
FEATURE_SET_NEXT_CONTENT
public static final String
FEATURE_PLAY
public static final String
FEATURE_PAUSE
public static final String
FEATURE_NEXT
public static final String
FEATURE_PREVIOUS
public static final String
FEATURE_SEEK_TO
public static final String
FEATURE_STOP
public static final int
STATE_ERROR
public static final int
STATE_INIT
The state MediaPlayerManager starts in before any action has been performed.
public static final int
STATE_PREPARING
Indicates the source has been set and it is being prepared/buffered before starting playback.
public static final int
STATE_READY
The media is ready and playback can be started.
public static final int
STATE_PLAYING
The media is currently playing.
public static final int
STATE_PAUSED
The media is currently paused.
public static final int
STATE_STOPPED
The service has been stopped and cannot be started again until a new source has been set.
public static final int
STATE_ENDED
The playback has reached the end. It can be restarted by calling play().
protected List
mFeatures
protected List
mListeners
Constructors Summary
public Renderer(android.content.Context context, android.os.Bundle params)


         
        onCreate(params);
        initFeatures(params);
    
Methods Summary
public longgetDuration()

        // throw new
        // UnsupportedOperationException("getDuration is not supported.");
        return -1;
    
public java.util.ListgetFeatures()

        return mFeatures;
    
public intgetPlayState()

        // throw new
        // UnsupportedOperationException("getPlayState is not supported.");
        return 0;
    
public longgetSeekPosition()

        // throw new
        // UnsupportedOperationException("getSeekPosition is not supported.");
        return -1;
    
protected voidinitFeatures(android.os.Bundle params)

        mFeatures.add(FEATURE_SET_CONTENT);
    
public voidonCreate(android.os.Bundle params)

        // Do nothing by default
    
public voidonDestroy()

        // Do nothing by default
    
public booleanonNext()

        // throw new UnsupportedOperationException("next is not supported.");
        return false;
    
public booleanonPause()

        // throw new UnsupportedOperationException("pause is not supported.");
        return false;
    
public booleanonPlay()

        // TODO consider making these log warnings instead of crashes (or
        // Log.wtf)
        // throw new UnsupportedOperationException("play is not supported.");
        return false;
    
public booleanonPrevious()

        // throw new
        // UnsupportedOperationException("previous is not supported.");
        return false;
    
public booleanonSeekTo(int time)

        // throw new UnsupportedOperationException("seekTo is not supported.");
        return false;
    
public booleanonStop()

        // throw new UnsupportedOperationException("stop is not supported.");
        return false;
    
protected voidpushOnBufferingUpdate(int percent)

        for (Listener listener : mListeners) {
            listener.onBufferingUpdate(percent);
        }
    
protected voidpushOnError(int type, int extra, android.os.Bundle extras, java.lang.Throwable error)

        for (Listener listener : mListeners) {
            listener.onError(type, extra, extras, error);
        }
    
protected voidpushOnFocusLost()

        for (Listener listener : mListeners) {
            listener.onFocusLost();
        }
    
protected voidpushOnNextStarted()

        for (Listener listener : mListeners) {
            listener.onNextStarted();
        }
    
protected voidpushOnStateChanged(int newState)

        for (Listener listener : mListeners) {
            listener.onStateChanged(newState);
        }
    
public voidregisterListener(com.android.onemedia.playback.Renderer$Listener listener)

        if (!mListeners.contains(listener)) {
            mListeners.add(listener);
        }
    
public abstract voidsetContent(android.os.Bundle request)

public voidsetNextContent(android.os.Bundle request)

        throw new UnsupportedOperationException("setNextContent() is not supported.");
    
public voidunregisterListener(com.android.onemedia.playback.Renderer$Listener listener)

        mListeners.remove(listener);