Questions tagged [android-textureview]

95 questions
3
votes
1 answer

updateAndRelease: GLConsumer is not attached to an OpenGL ES context

I'm continuously getting this error.when i try to open up camera using CameraX library. same code runs on other device less than pie. but not running on pie(Camera is not showing) Here is my code: and I'm also using life data in my project can it…
3
votes
1 answer

android camera2 api - How can i add a company logo to the recorded video file

Hy everyone. I am trying to add a small logo in the corner to the video i've recorded . I've tried to add the imageView directly to the recording surface but it is not the solution. I guess i'll have to create another surface and merge them together…
Ittai Oren
  • 542
  • 5
  • 10
3
votes
0 answers

How to add video controllers like play/pause and seeker to a TextureView (Surface)

i have an activity with a TextureView, a Surface and a MediaPlayer that is playing videos, but no controllers appear. I googled for a while but coudnt find a solution. How can i make a play/pause and a seeker available? Code: public class…
2
votes
1 answer

How to create mediaRecorder for video and connect to existing textureView with Camera2 Kotlin API

I have a textureView initialized by: @SuppressLint("MissingPermission") fun open_camera() { cameraManager.openCamera(camIdWithFlash, object: CameraDevice.StateCallback() { override fun onOpened(camera: CameraDevice) { …
2
votes
1 answer

android.media.ImageWriter produces green screen screen on every second posted Image frame

I have a sample app to generate YUV images out of predefined jpeg test data and post it to the ImageWriter in order to mock the Camera API for end2end tests: https://github.com/adjorno/Bitmap2YUV package com.example.bitmap2yuv import…
Adjorno
  • 51
  • 4
2
votes
0 answers

How to update TextureView SurfaceTextureListener

I am developing a camera app and I will use front and back camera. I am using TextureView like this:
Savas Adar
  • 4,083
  • 3
  • 46
  • 54
2
votes
1 answer

Duplicate a TextureView into another one

I am trying to duplicate the drawing process on a TextureView into other TextureViews. The main goal being to be able to create a "wall" of one same video being played from one instance of a MediaPlayer attached to a TextureView (I've got that part…
2
votes
1 answer

Remove Surface View of Camera2 Android Examples

Folks, I have been following the camera2 of the likes of camera2basic, camera2raw, and camera2video (and also webjb/myrobot on github), but everything always displays the images. Are there any camera2 examples that do not have preview the image? My…
2
votes
0 answers

TextureView/SurfaceTexture clear in Android ListView

I've got a similar question like this one: How to clear SurfaceTexture after using it with a MediaPlayer? The only one answer under the above question is not acceptable in my case, I need a more appropriate way to clear TextureView/SurfaceTexture in…
Pan.
  • 67
  • 10
2
votes
0 answers

Android: render textureview of 2D video in side-by-side

I am trying to create an video player app which is capable of displaying a 2D video in a side-by-side projection for cardboard. The input is a 2D video, so no need for head tracking. I checked the Google Cardboard SDKs but they don't provide an…
Denis Loh
  • 2,194
  • 2
  • 24
  • 38
2
votes
0 answers

Playing videos with TextureViews in RecyclerView, like Vine

I have a RecyclerView and each ViewHolder of the RecyclerView has a MediaPlayer object. I am using a TextureView to hold the MediaPlayer objects, the issue is that when i am scrolling down it is very laggy. Why is this the case? I believe I am…
2
votes
2 answers

Which View is best choice for android camera preview?

As we know, we can choose TextureView, SurfaceView and GLSurfaceView for android camera preview. Which one is best choice for camera preview ? I'm focused on the camera performance.
1
vote
1 answer

Draw YUV frames on GL/Surface/TextureView

I have some callback called in own Thread (not main) continously, as this is 1920 x 1088 (yep, 88), 30 fps video: @Override public void onYuvDataReceived(MediaFormat mediaFormat, ByteBuffer byteBuffer, final int width,…
1
vote
1 answer

Camera2: SurfaceTexture buffer size is being overridden

I am writing an app using Camera2 API, which should show preview from camera and take a picture. Currently my code works as follows: When Camera Fragment is instantiated, wait for TextureView.SurfaceTextureListener.onSurfaceTextureAvailable to be…
1
vote
1 answer

How to use cameraX with SurfaceView/TextureView?

I am planning to migrate camera api to camerax. Currently I am using SurfaceView to show the camera preview. I noticed that camerax is using PreviewView to show the camera preview. As this library is still in alpha stage, so what is the alternate…