1 /* 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 * 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. 9 */ 10 11 package org.webrtc.videoengine; 12 13 import android.content.Context; 14 import android.view.SurfaceHolder; 15 import android.view.SurfaceView; 16 17 public class ViERenderer { CreateRenderer(Context context)18 public static SurfaceView CreateRenderer(Context context) { 19 return CreateRenderer(context, false); 20 } 21 CreateRenderer(Context context, boolean useOpenGLES2)22 public static SurfaceView CreateRenderer(Context context, 23 boolean useOpenGLES2) { 24 if(useOpenGLES2 == true && ViEAndroidGLES20.IsSupported(context)) 25 return new ViEAndroidGLES20(context); 26 else 27 return new SurfaceView(context); 28 } 29 } 30