Questions tagged [textureview]

A TextureView can be used to display a content stream. Such a content stream can for instance be a video or an OpenGL scene. The content stream can come from the application's process as well as a remote process.

295 questions
10
votes
2 answers

When Is a TextureView's "Consumer Side" Closed?

One of the official Google samples for the Camera2 API suffers from the same BufferQueue has been abandoned problem as is seen in: What can I do when the BufferQueue has been abandoned? Android LogCat shows BufferQueueProcedure Specifically, the…
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
10
votes
1 answer

SurfaceView vs TextureView for Camera?

I want to incorporate a camera feature in my app, that will allow layout transitions of the view itself, changing its size, its preview size, and handle orientation changes efficiently. Should I use TextureView or SurfaceView? Decisions decisions..
OferM
  • 902
  • 1
  • 8
  • 20
9
votes
1 answer

Android SurfaceTexture.detachFromGLContext Error during detachFromGLContext

I'm trying to use TextureView on videos and it is crashing a lot on when trying to SurfaceTexture.detachFromGLContext. I haven't found anything on Google, does anyone have a clue of what it could be? Thanks java.lang.RuntimeException: Error during…
Rafael Garcia
  • 361
  • 3
  • 14
8
votes
1 answer

SurfaceTexture methods not always called on Android 7.0

I have a TextureView in my code to which I've set a SurfaceTextureListener. On Android 6.0 the methods onSurfaceTextureDestroyed and onSurfaceTextureAvailable are called whenever I leave the activity and return (respectively) while on Android 7.0 I…
Hadas Kaminsky
  • 1,285
  • 1
  • 16
  • 39
8
votes
0 answers

Make a video fit in a TextureView (Parts of it are outside (not visible)) using MediaPlayer

I'm using a MediaPlayer to play videos in a TextureView. The TextureView has a fixed size, and the videos' sizes are different. It plays the videos, but the problem is parts of the video are outside and the video isn't scaled down to fit the…
Miko Diko
  • 944
  • 1
  • 13
  • 33
7
votes
1 answer

Android sharing SurfaceTexture between two processes

is it possible to share a SurfaceTexture between two processes, for example an Activity and a Service? I would like to create an Activity with a TextureView, and update its SurfaceTexture from a separate Service. So far I'm creating a SurfaceTexture…
7
votes
3 answers

TextureView playing video turns black after onPause

I am using a TextureView to play a video in a ListView. The TextureView itself works perfectly, however, if I press the home button and reenter the application a few times, the TextureView turns black (though the audio continues to play). If I exit…
7
votes
0 answers

How to apply video effects (filters like sepia, vintage, etc.) on TextureView in android?

How can we apply filters like sepia, vintage, etc. to a video, and consequently post the same on our servers? Likewise, we can bluff user by creating a filter layer on TextureView, and consequently applying the corresponding filter on the…
Bharat
  • 904
  • 6
  • 19
7
votes
1 answer

Glass camera preview display is garbled

I am trying to get a live camera preview to display in Google Glass. I'm using all of the camera defaults (and have also tried using a few different image formats; ideally, I can use one of the YUV formats), but the image that shows up in the…
7
votes
1 answer

TextureView setBackgroundColor not working

I'm trying to simply change the background color of a TextureView. I would expect this colour to be seen through the semi-transparent camera preview. For some reason it doesn't. If I remove the camera preview altogether from…
user2032323
  • 85
  • 1
  • 4
6
votes
0 answers

Synchronization of Android Views on top of GLSurfaceView

Is there a good way to draw standard Android View objects on top of a GLSurfaceView and synchronize the movement between the two layers? My layout looks like The…
6
votes
1 answer

Camera2API: Session has been closed; further changes are illegal

I'm using Camera2API to build camera activity which sends taken image to another activity. On some devices it works, but on other (slower ones) I get an java.lang.IllegalStateException which says "Session has been closed; further changes are…
jelic98
  • 723
  • 1
  • 12
  • 28
6
votes
1 answer

Video rendering is broken MediaCodec H.264 stream

I am implementing a decoder using MediaCodec Java API for decoding live H.264 remote stream. I am receiving H.264 encoded data from native layer using a callback (void OnRecvEncodedData(byte[] encodedData)), decode and render on Surface of…
Kaidul
  • 15,409
  • 15
  • 81
  • 150
6
votes
2 answers

Android TextureView / Drawing / Painting Performance

I am attempting to make a drawing/painting app using TextureView on Android. I want to support a drawing surface of up to 4096x4096 pixels, which seems reasonable for my minimum target device (which I use for testing) which is a Google Nexus 7 2013…
jjxtra
  • 20,415
  • 16
  • 100
  • 140
6
votes
3 answers

onSurfaceTextureAvailable never called when Texture Views are created in Service

I am trying to create a texture view in Service, and I dont seem to get "onSurfaceTextureAvailable" call back. "A TextureView or a subclass can only be used with hardware acceleration enabled." comes up in the log when I have provided…
user2315052
  • 61
  • 1
  • 4
1
2
3
19 20