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

org.jitsi.impl.neomedia.control.FrameRateControlAdapter Maven / Gradle / Ivy

/*
 * Copyright @ 2015 Atlassian Pty Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jitsi.impl.neomedia.control;

import java.awt.*;

import javax.media.*;
import javax.media.control.*;

/**
 * Provides a default implementation of FrameRateControl.
 *
 * @author Lyubomir Marinov
 */
public class FrameRateControlAdapter
    implements FrameRateControl
{
    /**
     * Gets the UI Component associated with this Control
     * object. FrameRateControlAdapter always returns null.
     *
     * @return the UI Component associated with this Control
     * object
     * @see Control#getControlComponent()
     */
    public Component getControlComponent()
    {
        return null;
    }

    /**
     * Gets the current output frame rate. FrameRateControlAdapter
     * always returns -1.
     *
     * @return the current output frame rate if it is known; otherwise,
     * -1
     * @see FrameRateControl#getFrameRate()
     */
    public float getFrameRate()
    {
        return -1;
    }

    /**
     * Gets the maximum supported output frame rate.
     * FrameRateControlAdapter always returns -1.
     *
     * @return the maximum supported output frame rate if it is known;
     * otherwise, -1
     * @see FrameRateControl#getMaxSupportedFrameRate()
     */
    public float getMaxSupportedFrameRate()
    {
        return -1;
    }

    /**
     * Gets the default/preferred output frame rate.
     * FrameRateControlAdapter always returns -1.
     *
     * @return the default/preferred output frame rate if it is known;
     * otherwise, -1
     * @see FrameRateControl#getPreferredFrameRate()
     */
    public float getPreferredFrameRate()
    {
        return -1;
    }

    /**
     * Sets the output frame rate. FrameRateControlAdapter always
     * returns -1.
     *
     * @param frameRate the output frame rate to change the current one to
     * @return the actual current output frame rate or -1 if it is
     * unknown or not controllable
     * @see FrameRateControl#setFrameRate(float)
     */
    public float setFrameRate(float frameRate)
    {
        return -1;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy