0

I am developing an application using Camera2 API with no preview. I used Textureview for the camera part but, now I need to use a SurfaceView to display a dynamic image.

I did some tests and I am getting this error: E/SurfaceTextureClient(13629): queueBuffer: error queuing buffer to SurfaceTexture, -19

Any idea how to manage both views in the application?

Thanks in advance!!

mmf
  • 9
  • 3
  • "now I need to use a SurfaceView to display a dynamic image" -- why? Why not use a `TextureView`, or something else? If you are capable of using `TextureView` (e.g., `minSdkVersion`), I fail to see why you would want to use `SurfaceView` for anything. – CommonsWare Mar 16 '15 at 17:15
  • yes, you are right, but even using a TextureView ... how I could manage 2 TextureViews at the same time?, because the TextureView for the camera is hidden and the second textview is used in a thread for showing a dynamic image. My problem is the error with the SurfaceTexture because, the application works if I run each of the views separately I hope you understand my idea. – mmf Mar 16 '15 at 17:28
  • 1
    What does it mean to "manage" two TextureViews? What is a "dynamic image"? For an example of side-by-side TextureViews being used to display two separate videos, see https://github.com/google/grafika/blob/master/src/com/android/grafika/DoubleDecodeActivity.java . (It's not a great example, as it does a lot of extra work to keep the videos playing even while the screen is rotating, so it has complexity that most apps won't need. But it does show multiple TextureViews in use.) – fadden Mar 16 '15 at 20:00
  • Thanks for the link. I already solved my problem. – mmf Mar 19 '15 at 07:26

0 Answers0