aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/av/GLMediaPlayerFactory.java
blob: 0025a70ba5786e1341f513b50e3f3d5057f854c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.jogamp.opengl.av;

import com.jogamp.common.os.AndroidVersion;
import com.jogamp.common.os.Platform;
import com.jogamp.common.util.ReflectionUtil;

public class GLMediaPlayerFactory {
    private static final String AndroidGLMediaPlayerAPI14ClazzName = "jogamp.opengl.android.av.AndroidGLMediaPlayerAPI14";
    
    public static GLMediaPlayer create() {
        if(Platform.OS_TYPE.equals(Platform.OSType.ANDROID)) {
            if(AndroidVersion.SDK_INT >= 14) {
                return (GLMediaPlayer) ReflectionUtil.createInstance(AndroidGLMediaPlayerAPI14ClazzName, GLMediaPlayerFactory.class.getClassLoader());
            }
        }
        return null;
    }
}