Java Code Examples for android.opengl.EGL14#eglQueryString()

The following examples show how to use android.opengl.EGL14#eglQueryString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DummySurface.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@TargetApi(24)
private static @SecureMode int getSecureModeV24(Context context) {
  if (Util.SDK_INT < 26 && ("samsung".equals(Util.MANUFACTURER) || "XT1650".equals(Util.MODEL))) {
    // Samsung devices running Nougat are known to be broken. See
    // https://github.com/google/ExoPlayer/issues/3373 and [Internal: b/37197802].
    // Moto Z XT1650 is also affected. See
    // https://github.com/google/ExoPlayer/issues/3215.
    return SECURE_MODE_NONE;
  }
  if (Util.SDK_INT < 26 && !context.getPackageManager().hasSystemFeature(
      PackageManager.FEATURE_VR_MODE_HIGH_PERFORMANCE)) {
    // Pre API level 26 devices were not well tested unless they supported VR mode.
    return SECURE_MODE_NONE;
  }
  EGLDisplay display = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
  String eglExtensions = EGL14.eglQueryString(display, EGL10.EGL_EXTENSIONS);
  if (eglExtensions == null) {
    return SECURE_MODE_NONE;
  }
  if (!eglExtensions.contains(EXTENSION_PROTECTED_CONTENT)) {
    return SECURE_MODE_NONE;
  }
  // If we can't use surfaceless contexts, we use a protected 1 * 1 pixel buffer surface. This may
  // require support for EXT_protected_surface, but in practice it works on some devices that
  // don't have that extension. See also https://github.com/google/ExoPlayer/issues/3558.
  return eglExtensions.contains(EXTENSION_SURFACELESS_CONTEXT)
      ? SECURE_MODE_SURFACELESS_CONTEXT
      : SECURE_MODE_PROTECTED_PBUFFER;
}
 
Example 2
Source File: DummySurface.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@TargetApi(24)
private static @SecureMode int getSecureModeV24(Context context) {
  if (Util.SDK_INT < 26 && ("samsung".equals(Util.MANUFACTURER) || "XT1650".equals(Util.MODEL))) {
    // Samsung devices running Nougat are known to be broken. See
    // https://github.com/google/ExoPlayer/issues/3373 and [Internal: b/37197802].
    // Moto Z XT1650 is also affected. See
    // https://github.com/google/ExoPlayer/issues/3215.
    return SECURE_MODE_NONE;
  }
  if (Util.SDK_INT < 26 && !context.getPackageManager().hasSystemFeature(
      PackageManager.FEATURE_VR_MODE_HIGH_PERFORMANCE)) {
    // Pre API level 26 devices were not well tested unless they supported VR mode.
    return SECURE_MODE_NONE;
  }
  EGLDisplay display = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
  String eglExtensions = EGL14.eglQueryString(display, EGL10.EGL_EXTENSIONS);
  if (eglExtensions == null) {
    return SECURE_MODE_NONE;
  }
  if (!eglExtensions.contains(EXTENSION_PROTECTED_CONTENT)) {
    return SECURE_MODE_NONE;
  }
  // If we can't use surfaceless contexts, we use a protected 1 * 1 pixel buffer surface. This may
  // require support for EXT_protected_surface, but in practice it works on some devices that
  // don't have that extension. See also https://github.com/google/ExoPlayer/issues/3558.
  return eglExtensions.contains(EXTENSION_SURFACELESS_CONTEXT)
      ? SECURE_MODE_SURFACELESS_CONTEXT
      : SECURE_MODE_PROTECTED_PBUFFER;
}
 
Example 3
Source File: DummySurface.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@TargetApi(24)
private static @SecureMode int getSecureModeV24(Context context) {
  if (Util.SDK_INT < 26 && ("samsung".equals(Util.MANUFACTURER) || "XT1650".equals(Util.MODEL))) {
    // Samsung devices running Nougat are known to be broken. See
    // https://github.com/google/ExoPlayer/issues/3373 and [Internal: b/37197802].
    // Moto Z XT1650 is also affected. See
    // https://github.com/google/ExoPlayer/issues/3215.
    return SECURE_MODE_NONE;
  }
  if (Util.SDK_INT < 26 && !context.getPackageManager().hasSystemFeature(
      PackageManager.FEATURE_VR_MODE_HIGH_PERFORMANCE)) {
    // Pre API level 26 devices were not well tested unless they supported VR mode.
    return SECURE_MODE_NONE;
  }
  EGLDisplay display = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
  String eglExtensions = EGL14.eglQueryString(display, EGL10.EGL_EXTENSIONS);
  if (eglExtensions == null) {
    return SECURE_MODE_NONE;
  }
  if (!eglExtensions.contains(EXTENSION_PROTECTED_CONTENT)) {
    return SECURE_MODE_NONE;
  }
  // If we can't use surfaceless contexts, we use a protected 1 * 1 pixel buffer surface. This may
  // require support for EXT_protected_surface, but in practice it works on some devices that
  // don't have that extension. See also https://github.com/google/ExoPlayer/issues/3558.
  return eglExtensions.contains(EXTENSION_SURFACELESS_CONTEXT)
      ? SECURE_MODE_SURFACELESS_CONTEXT
      : SECURE_MODE_PROTECTED_PBUFFER;
}
 
Example 4
Source File: DummySurface.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@TargetApi(24)
private static @SecureMode int getSecureModeV24(Context context) {
  if (Util.SDK_INT < 26 && ("samsung".equals(Util.MANUFACTURER) || "XT1650".equals(Util.MODEL))) {
    // Samsung devices running Nougat are known to be broken. See
    // https://github.com/google/ExoPlayer/issues/3373 and [Internal: b/37197802].
    // Moto Z XT1650 is also affected. See
    // https://github.com/google/ExoPlayer/issues/3215.
    return SECURE_MODE_NONE;
  }
  if (Util.SDK_INT < 26 && !context.getPackageManager().hasSystemFeature(
      PackageManager.FEATURE_VR_MODE_HIGH_PERFORMANCE)) {
    // Pre API level 26 devices were not well tested unless they supported VR mode.
    return SECURE_MODE_NONE;
  }
  EGLDisplay display = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
  String eglExtensions = EGL14.eglQueryString(display, EGL10.EGL_EXTENSIONS);
  if (eglExtensions == null) {
    return SECURE_MODE_NONE;
  }
  if (!eglExtensions.contains(EXTENSION_PROTECTED_CONTENT)) {
    return SECURE_MODE_NONE;
  }
  // If we can't use surfaceless contexts, we use a protected 1 * 1 pixel buffer surface. This may
  // require support for EXT_protected_surface, but in practice it works on some devices that
  // don't have that extension. See also https://github.com/google/ExoPlayer/issues/3558.
  return eglExtensions.contains(EXTENSION_SURFACELESS_CONTEXT)
      ? SECURE_MODE_SURFACELESS_CONTEXT
      : SECURE_MODE_PROTECTED_PBUFFER;
}
 
Example 5
Source File: EglCore.java    From cineio-broadcast-android with MIT License 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 6
Source File: EglCore.java    From pause-resume-video-recording with Apache License 2.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 7
Source File: EglCore.java    From MockCamera with Apache License 2.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(eGLDisplay, what);
}
 
Example 8
Source File: EglCore.java    From IjkVRPlayer with Apache License 2.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 9
Source File: EglCore.java    From LiveVideoBroadcaster with Apache License 2.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 10
Source File: EglCore.java    From FuAgoraDemoDroid with MIT License 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 11
Source File: EglCore.java    From Fatigue-Detection with MIT License 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 12
Source File: EglCore.java    From grafika with Apache License 2.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 13
Source File: EglCore.java    From sealrtc-android with MIT License 4 votes vote down vote up
/** Queries a string value. */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 14
Source File: EglCore.java    From TikTok with Apache License 2.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 15
Source File: EglCore.java    From PhotoMovie with Apache License 2.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 16
Source File: EglCore.java    From RtmpPublisher with Apache License 2.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 17
Source File: EglCore.java    From mobile-ar-sensor-logger with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 18
Source File: EglCore.java    From Lassi-Android with MIT License 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 19
Source File: EglCore.java    From VIA-AI with MIT License 4 votes vote down vote up
/**
 * Queries a string value.
 */
public String queryString(int what) {
    return EGL14.eglQueryString(mEGLDisplay, what);
}
 
Example 20
Source File: EGLBase14.java    From libcommon with Apache License 2.0 2 votes vote down vote up
/**
 * GLESに文字列を問い合わせる
 * @param what
 * @return
 */
@Override
	public String queryString(final int what) {
	return EGL14.eglQueryString(mEglDisplay, what);
}