glsurfaceview

Recording a Surface using MediaCodec

时间秒杀一切 提交于 2019-11-29 11:52:23
问题 So, In my application, I am able to show effects(like blur filter, gaussian) to video that comes from Camera using GPUImage library. Basically, I (library) will take the input from the Camera, get's the raw byte data, converts it into RGBA format from YUV format, then applies effects to this image and displays on the Surface of GLSurfaceView using OpenGL. finally, to the user, it looks like a video with effects applied. Now I want to record the frames of Surface as a video using MediaCodec

Android+JNI+OpenGL开发自己的美图秀秀

安稳与你 提交于 2019-11-29 10:53:38
代码地址 网上对于Android相机的开发博文较少,碰巧闲着无聊,遂完成此工程,仅供学习交流,可根据地址中的示例完成类似于美图秀秀的APP,包含40+种滤镜与实时美颜与后处理美颜功能。若对您有帮助,点开地址并且点击右上角的Star。 1.相机预览模式 示例见:com.seu.magiccamera.activity.CameraActivity 需要自行创建一个glsurfaceview GLSurfaceView glSurfaceView = (GLSurfaceView)findViewById(R.id.glsurfaceView); FrameLayout.LayoutParams params = new LayoutParams(Constants.mScreenWidth, Constants.mScreenHeight); glSurfaceView.setLayoutParams(params); mMagicCameraDisplay = new MagicCameraDisplay(this, glSurfaceView); 通过setFilter(int)来更换滤镜 拍照采用将图片绘制到等大小的framebuffer,并读取像素数据,封装成Bitmap并保存。 2.照片模式 : 示例:com.seu.magiccamera.activity

How to properly use setZOrderMediaOverlay on Android?

萝らか妹 提交于 2019-11-29 09:33:02
问题 Like many others, I am trying to draw 3D objects (using GLSurfaceView) on camera preview (using SurfaceView), along with some buttons placed on top. I actually got a prototype working, but I could not get the onResume working correctly. After a resume, GLSurfaceView stays behind and is not visible anymore. I know that it is working, because I can see the drawing fine if I remove the SurfaceView from the layout. The target is Nexus One, running stock 2.3.3 ROM. Here's the layout xml: <com

How can I use Multiple GLSurfaceView components in the same Layout?

末鹿安然 提交于 2019-11-29 06:24:08
问题 I'm writing an Information Visualization API for Android and ran into a problem trying to place two units of a custom GLSurfaceView into a Layout. The Custom GLSurfaceView at this point is simply an extension of the GLSurfaceView to eliminate possible faults caused by custom methods. When I have both components added in layout and start the application it runs. But nothing is drawn, seems like it enters an infinite loop. because debug messages inside the Renderers are printed into the LogCat.

Android GLSurfaceView transparent background without setZOrderonTop

假如想象 提交于 2019-11-29 06:09:38
Sorry for my English. My work is based on https://github.com/harism/android_page_curl/ After many hours of research, I have found a few solutions, but not for all the issues what I have in my application. I've some trouble with a GLSurfaceView. I've got a background with a relativeLayout, a GLSurfaceView, and an overlay on top. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/background" android:layout_width="match_parent" android:background="@layout/backgroundrepeat" android:layout_height="match_parent"> <com.m2y.foxprez.view.CurlView xmlns:android=

Fighting with SurfaceView, Camera and OpenGL

旧时模样 提交于 2019-11-28 21:34:45
We've been fighting with some problems relating to SurfaceViews for more than a week, and find no proper solution to them. We read the other questions in the forum regarding to similar problems (and even Mixare source code) but couldn't find an answer, so we hope you could help us somehow. Scenario: We've got a SurfaceView for the Camera a SurfaceView for an OpenGL layer, which goes on top of the camera. another View, which shows some information about what we can see on the screen. This one goes on top of both SurfaceViews. Problem: No matter how hard we try, both SurfaceViews apparently don

TextureView vs. GLSurfaceView or How to use GLSurfaceView with EGL14

空扰寡人 提交于 2019-11-28 16:19:53
问题 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,

Android thread performance/priority on Galaxy Note 2 when screen is touched/released

混江龙づ霸主 提交于 2019-11-28 11:44:30
I have an OpenGL game for Android. It runs at a good 60fps when the screen is touched. When I release my finger it goes back down to around 30fps. Does the touch event/release raise/lower a thread's priority and if so how can I replicate this to keep it at a constant 60fps. This only seems to be an issue on Galaxy Note 2 so far. I'll assume you are using onDrawFrame and setRenderMode(RENDERMODE_CONTINUOUSLY) . 30 and 60FPS indicates that your implementation of onDrawFrame is called as the device's screen refreshes. Most displays refresh at 60Hz, giving you 60FPS. It is likely that the Galaxy

OPENGL 入门

十年热恋 提交于 2019-11-28 10:08:21
检测设备支持版本,判断是否支持opengl 2.0版本 初始化设置OpenGLES2.0 实现接口GLSurfaceView.Renderer 渲染 绘制图形 1、检测设备支持版本,判断是否支持opengl 2.0版本 private boolean hasGLES20(){ ActivityManager activityManager=(ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); ConfigurationInfo info=activityManager.getDeviceConfigurationInfo(); return info.reqGLEsVersion>=0x20000; } 2、强制应用支持 <uses-feature android:glEsVersion="0x00020000" android:required="true"/> 3、初始化设置OpenGLES2.0 @Override protected void onCreate(Bundle savedInstanceState){ //设置全屏模式 requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager

glsurfaceview inside a scrollview, moving but not clipping

我们两清 提交于 2019-11-28 09:56:30
问题 I have a scrollview with a linear layout inside. One of the elements inside this linearlayout is a glsurfaceview. This all works correctly and when I scroll the glsurfaceview moves up and down however when the glsurfaceview reaches the top or bottom of where it should of the scrollview where it should be clipped it is not and is continued outside of the scrollview. This screenshot should make it clearer: Don't think it's completly nessecary but here is my layout.xml: <?xml version="1.0"