Questions tagged [android-textureview]
95 questions
1
vote
0 answers
How to display SurfaceTextures on a TextureView in android
I am trying to view SurfaceTextures in TextureView , i am getting SurfaceTextures from a callback
@Override
public void onNewTexture(SurfaceTexture texture) {
Log.d(TAG, "On New Texture");
…

Bhushan Gurnule
- 31
- 5
1
vote
0 answers
How to set low resolution in a TextureView in Android Studio
I want to get a portion of pixels in a region of interest (ROI) of each frame while the camera is previewing. I'm obtaining the bitmap from the TextureView and calculating the mean value of that region using a 'for' cycle. The process is slow if I…

ElMix
- 11
- 2
1
vote
0 answers
How do I use a TextureView for a Vulkan app
I'm currently using a custom SurfaceView (MySurfaceView) for my Vulkan application (game), but have read that TextureView is a better choice. I tried changing to a custom TextureView (MyTextureView), but am not getting Resize() or Redraw() events.
I…

Bungles
- 1,969
- 2
- 25
- 54
1
vote
0 answers
ReleaseTexImage crashing in Android 9
I've a custom class which extends TextureView. In this TextureView I've a surfaceTexture, mSurfaceTexture. This is a single-buffered surface.
As per android documentation, here:
In single buffered mode the application is responsible for serializing…

Prajval M
- 2,298
- 11
- 32
1
vote
0 answers
Camera is not displaying to the complete width of AutoFitTextureView using CameraAPI2 sample code
I am using sample code of Camera2API and there is one bug in both the samples of ImageCapture and VideoCapture code by google. The bug is that when i open camera it does not take the complete width of AutofitTextureView. It crops some of its part…

sak
- 1,230
- 18
- 37
1
vote
0 answers
How to change videos / update videos on a textureView on android
I have successfully played a video using MediaPlayer on TextureView, now I am trying to program so that the video automatically changes after a certain frame is passed. However, after a certain condition is met, I am unable to update the video. It…

user13233122
- 11
- 3
1
vote
0 answers
Adding images to video with help of this MediaCodec Api
I am trying to add waterMark to the video by using this library but i couldn't the get the desired result as shown in the library https://github.com/MasayukiSuda/Mp4Composer-android . can anyone point out or help me how to solve it thanks
what i…

Shiva s
- 710
- 1
- 6
- 13
1
vote
0 answers
Issue when drawing on Textureview on Huawei P20
I have a very simple app with a textureview and renderscript code that draws red pixels on the textureview. This works as expected on all test devices except for Huawei P20. Could this be related to how the hardware handles this? Any help to point…

Ehsan Khaveh
- 1,444
- 17
- 21
1
vote
0 answers
Glitch while changing video inside media player
My requirement is to change video inside video player with animation. When a person taps on "change" button the video in media player will get change with a new one and the old will end up with zoom in animation. I am able to implement this…

user2028
- 163
- 4
- 15
- 40
1
vote
1 answer
Is there any fast alternatives for TextureView.getBitmap() function?
I'm using android vlc (LibVLC) along with a TextureView in order to play a live rtsp stream in my android application. Everything is working fine, however i need to get the current playing frame every possible time for some object detection tasks,…

peter bence
- 782
- 3
- 14
- 34
1
vote
1 answer
Surface had no valid native Surface for Camera2
I've integrated camera2 with textureVIew. It works on all devices but on tablet when we capture image for first time, it crashesand displays following logs.
Fatal Exception: java.lang.IllegalArgumentException: Surface had no valid native…

Ragini
- 765
- 1
- 11
- 29
1
vote
1 answer
Need to display a camera preview inside a circular view
I need to implement a circular camera preview. I am using camera2 api with TextureView. I added the layout as follows:
Doing this I am getting the below result:
As you can see,…

user2234
- 1,282
- 1
- 21
- 44
1
vote
2 answers
How to draw objects on TextureView Camera stream preview and record the stream with objects?
I need help with an application I am working on. The application has to have a custom Camera interface to record a video with audio and have to add some objects in realtime on the TextureView canvas. Old Camera API is deprecated, so I have to use…

Rishabh Agrawal
- 21
- 1
- 4
1
vote
0 answers
Camera - TextureView preview flicker in some devices
I have implemented my custom CamerView with TextureView which works perfectly fine. Though in some devices such as Motorolla G4 - MarshMallow, Lenovo KNote - Lollipop Camera Preview flickers with Green Square View appears on the screen.
Here's my…

Vikalp Patel
- 10,669
- 6
- 61
- 96
1
vote
2 answers
Camera2 api with Preview
I am using the Camera2 api to show a preview form the camera. I also want to implement a ImageReader to process the images. I have a Start preview function. When I call it the preview is just black. If I remove "mimageReader.getSurface()" from…

amanda45
- 535
- 10
- 29