textureview

Android TextureView vs VideoView Performance

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to be able to rotate a video on screen, so I created a custom TextureView which provides a convenience layer over a MediaPlayer similar to how the current implementation of VideoView does. This Android blog post says the following about TextureView: Because a SurfaceView’s content does not live in the application’s window, it cannot be transformed (moved, scaled, rotated) efficiently. This makes it difficult to use a SurfaceView inside a ListView or a ScrollView. SurfaceView also cannot interact properly with some features of the UI

TextureView vs. GLSurfaceView or How to use GLSurfaceView with EGL14

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am getting confused with EGL. My GLSurfaceView creates an EGLContext. Now I create a shared context. Now I need to use a EGLExtension. The Method I have to use is called (>=API18): EGLExt . eglPresentationTimeANDROID ( android . opengl . EGLDisplay display , android . opengl . EGLSurface surface , long time ); The Problem is, that the GLSurfaceView does only creates javax.microedition.khronos.egl.EGLContext s. Which tells me, NOT to use GLSurfaceView. So I tried TextureView, which is slightly similar, with the difference that you

Android控件--TextureView

匿名 (未验证) 提交于 2019-12-03 00:32:02
应用程序的视频或者opengl内容往往是显示在一个特别的UI控件中:SurfaceView。SurfaceView的工作方式是创建一个置于应用窗口之后的新窗口。这种方式的效率非常高,因为SurfaceView窗口刷新的时候不需要重绘应用程序的窗口(android普通窗口的视图绘制机制是一层一层的,任何一个子元素或者是局部的刷新都会导致整个视图结构全部重绘一次,因此效率非常低下,不过满足普通应用界面的需求还是绰绰有余),但是SurfaceView也有一些非常不便的限制。 因为SurfaceView的内容不在应用窗口上,所以不能使用变换(平移、缩放、旋转等)。也难以放在ListView或者ScrollView中,不能使用UI控件的一些特性比如View.setAlpha()。 为了解决这个问题 Android 4.0中引入了TextureView。它们都可以在另一个独立线程中绘制和渲染,这是和其它View的最大不同。 与SurfaceView相比,TextureView并没有创建一个单独的Surface(表面)用来绘制,这使得它可以像一般的View一样执行一些变换操作,设置透明度等。另外,Textureview必须在硬件加速开启的窗口中。 TextureView的使用非常简单,我们要做的就是获取用于渲染内容的SurfaceTexture(它能捕获一个图像流的一帧来作为OpenGL

Camera1与Camera2区别

匿名 (未验证) 提交于 2019-12-02 23:42:01
版权声明:本文为博主原创文章,欢迎转载但需注明出处谢谢! https://blog.csdn.net/dongxianfei/article/details/91445918 内容 Camera1.0 Camera2.0 权限 android.permission.CAMERA android.permission.CAMERA 布局 SurfaceView TextureView 实现接口 SurfaceHolder.Callback 1.surfaceCreated 2.surfaceChanged 3.surfaceDestroyed SurfaceTextureListener 1.onSurfaceTextureAvailable 2.onSurfaceTextureSizeChanged 3.onSurfaceTextureDestroyed 4.onSurfaceTextureUpdated Camera参数(设置,查看) Camera.Parameters Camera.Size 查看:CameraCharacteristics中getCameraCharacteristics(CameraID)设置:CaptureRequest.Builder中void set(Key key, T value)举例:曝光:CaptureReqBuilder.set

How do I use Android’s “Surface” classes?

旧时模样 提交于 2019-12-02 17:38:36
Is there a detailed explanation of Surface, SurfaceHolder, EGLSurface, SurfaceView, GLSurfaceView, SurfaceTexture, and TextureView? In particular: What’s the difference between SurfaceView and TextureView? Do I need to use GLSurfaceView to use OpenGL ES? How do Surface and EGLSurface interact? What does SurfaceTexture do? Why does the stuff I draw on a SurfaceView have to go above or below everything else? What is SurfaceFlinger? How does composition of the status and navigation bars work? While we’re at it, what’s the right way to structure a game loop on Android? The answers to these and

Xamarin Android Display a stream from the camera

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 11:29:23
问题 I'm new in Xamarin and I try to implement my camera stream into a xaml layout. This example of Xamarin will set the complete textureview as layout so I'm not able to add some extra features like buttons etc. https://developer.xamarin.com/recipes/android/other_ux/textureview/display_a_stream_from_the_camera/ using System; using Android.App; using Android.OS; using Android.Views; using Android.Widget; using Android.Hardware; using static Android.App.ActionBar; namespace TextureViewCameraStream

Weird frames appear when using TextureView to play video in ListView

与世无争的帅哥 提交于 2019-12-02 06:05:56
问题 I managed to play multiple videos in one screen circularly, I added TextureViews to ListView with BaseAdapter which is very common and I created a IjkMediaPlayer (IjkMediaplay github)instance for each textureview. I have reused textureview in getView() callback of BaseAdapter, once getView() called, I stop the previous video and play the new video. This works fine in most of time, but occasionally, TextureView will display some frames which is not belong to the current video, the frames

Xamarin Android Display a stream from the camera

点点圈 提交于 2019-12-02 04:09:29
I'm new in Xamarin and I try to implement my camera stream into a xaml layout. This example of Xamarin will set the complete textureview as layout so I'm not able to add some extra features like buttons etc. https://developer.xamarin.com/recipes/android/other_ux/textureview/display_a_stream_from_the_camera/ using System; using Android.App; using Android.OS; using Android.Views; using Android.Widget; using Android.Hardware; using static Android.App.ActionBar; namespace TextureViewCameraStream { [Activity (Label = "TextureViewCameraStream", MainLauncher = true)] public class Activity1 : Activity

How to make TextureView play video with round corners and bubble effect

核能气质少年 提交于 2019-12-01 23:23:24
问题 I managed to play video with TextureView and MediaPlayer on Android. I did it like this: I created a Surface with SurfaceTexture: public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int w, int h) { mSurface = new Surface(surfaceTexture); ... ... } Attatch the Surface to MediaPlayer: try { mMediaPlayer.setDataSource(mPlayUrl); mMediaPlayer.setSurface(mSurface); ... ... } That is OK, but not enough for me. I expect that the TextureView to be with round corners and look like a

TextureView with camera preview

女生的网名这么多〃 提交于 2019-12-01 21:27:00
I would like to use TextureView to show camera preview in it. Finally i want to set opacity for camera preview, using TextureView. But i have problem: 10-22 12:21:14.773: W/TextureView(5126): A TextureView or a subclass can only be used with hardware acceleration enabled. Here is my class code: public class CameraService extends Service implements android.view.TextureView.SurfaceTextureListener { private LayoutInflater layoutInflater; private Camera mCamera; private View mCameraView; private WindowManager mWindowManager; private TextureView textureView; private float transparentLevel; public