All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.media.protocol.DataSource Maven / Gradle / Ivy

There is a newer version: 1.0.2-jitsi
Show newest version
package javax.media.protocol;

import javax.media.*;

/**
 * Standard JMF class -- see this class in the JMF Javadoc. Coding Complete.
 *
 * @author Ken Larson
 *
 */
public abstract class DataSource implements Controls, Duration
{
    private MediaLocator locator;

    public DataSource()
    {
        super();
    }

    public DataSource(MediaLocator source)
    {
        this.locator = source;
    }

    public abstract void connect() throws java.io.IOException;

    public abstract void disconnect();

    public abstract String getContentType();

    public abstract Object getControl(String controlType);

    public abstract Object[] getControls();

    public abstract Time getDuration();

    public MediaLocator getLocator()
    {
        return locator;
    }

    protected void initCheck()
    {
        if (locator == null)
            throw new Error("Uninitialized DataSource error."); // JavaDoc
                                                                // claims this
                                                                // should be
                                                                // UninitializedError(),
                                                                // but this is
                                                                // not the
                                                                // case.;

    }

    public void setLocator(MediaLocator source)
    {
        this.locator = source;
    }

    public abstract void start() throws java.io.IOException;

    public abstract void stop() throws java.io.IOException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy