2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 package org.webrtc.videoengine;
13 import android.content.Context;
14 import android.view.SurfaceHolder;
15 import android.view.SurfaceView;
17 public class ViERenderer {
18 public static SurfaceView CreateRenderer(Context context) {
19 return CreateRenderer(context, false);
22 public static SurfaceView CreateRenderer(Context context,
23 boolean useOpenGLES2) {
24 if(useOpenGLES2 == true && ViEAndroidGLES20.IsSupported(context))
25 return new ViEAndroidGLES20(context);
27 return new SurfaceView(context);