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
3
votes
2 answers

GLConsumer is already attached to a context for new SurfaceTexture

Is SurfaceTexture attached to GLContext by default when created manually? If so, how? Here is an example, I'm trying to create my own SurfaceTexture and set it to TextureView: public class MainActivity extends AppCompatActivity { @Override …
dkarmazi
  • 3,199
  • 1
  • 13
  • 25
3
votes
4 answers

Add text labels in video output file using camera2 API

My goal is to add some text info in the video output file obtained after recording a video with the Camera2 API (e. g. date/time, user id etc.). I have checked some references about how to do this using camera API but I didn't find any information…
Hank Moody
  • 354
  • 2
  • 15
3
votes
0 answers

onStartTemporaryDetach() in View

The android docs says This is called when a container is going to temporarily detach a child, with ViewGroup.detachViewFromParent. Now what is this "temporary detach" and "permanent detach". When exactly is this method called? I am using…
Diffy
  • 2,339
  • 3
  • 25
  • 47
3
votes
2 answers

TextureView with camera preview

I would like to use TextureView to show camera preview in it. Finally i want to set opacity for camera preview, using TextureView. But i have problem: 10-22 12:21:14.773: W/TextureView(5126): A TextureView or a subclass can only be used with…
3
votes
2 answers

Android wrong values from onSurfaceTextureSizeChanged on screen rotation

I'm trying to stream a video to a custom TextureView. The Video is shown in fullscreen mode. The layout is the same for portrait mode and landscape mode:
ocramot
  • 1,361
  • 28
  • 55
3
votes
0 answers

Making cardboard video view by textureview's video in android

I'm trying to make cardboard view(stereoscopic view) on my android app Currently I can show a live video using textureview but I don't know how to combine this with cardboardview. As my understanding, when show the video in cardboardview I need to…
kju
  • 123
  • 9
3
votes
2 answers

TextureView keeps getting SIGSEGV 11

I have found this Solution, but unfortunately, it didn't work for me. When I'm only displaying a small moving rectangle, so no taxing animations, it works fine, but I want to display some animation frames that I load in with a .png, and whenever I…
Sami
  • 129
  • 2
  • 15
3
votes
0 answers

BaseAdapter containing TextureView and MediaPlayer doesn't work

What I'm trying to do is to populate a ListView with a BaseAdapter which has a TextureView in it. The problem is i don't see any video playing before waiting at least 2 mins, and its not about my internet connection speed. When i set the width of…
eden
  • 5,876
  • 2
  • 28
  • 43
3
votes
3 answers

Play video in Android listview

I am trying to play videos in my listview just like Vine or Instgram. I have been trying to use TextureView with a media player except that when attaching TextureView to the media player I experience issues where the textureview is not being reused…
MoMo
  • 186
  • 1
  • 3
  • 15
3
votes
1 answer

Playing video on TextureView taken from front camera

I record a video from Samsung Galaxy S4 (1080wx1920h) from FRONT CAMERA. The resulting video is rotated 90° and upside down. (See the picture) Then I take the video (final resolution 320wx240h) and I display it to TextureView…
Vojtech B
  • 2,837
  • 7
  • 31
  • 59
3
votes
0 answers

Using TextureView with MediaPlayer on Samsung Galaxy S2

I've been struggling with this for ages, and I cannot figure out the problem. I want to develop an application that plays a video, using TextureView and a MediaPlayer. It all runs great, on all devices tested except for Samsung Galaxy S2, android…
3
votes
1 answer

Z-order issue with MediaCodec and TextureView

In my Android app I have the need to render three views with the following Z-order: At bottom, the output surface of a MediaCodec decoder covering the whole screen. I have the requirement that I have to transform the image produced by MediaCodec…
David Stone
  • 1,132
  • 7
  • 18
3
votes
0 answers

Why use SurfaceView or TextureView for custom drawing? Their Canvas isn't hardware accelerated

So I'm doing a number of Canvas drawText, drawPath, drawArc, drawLine, and drawCircle for an animation... Using SurfaceView, doing lockCanvas & unlockCanvasAndPost, eventually discover that drawing to the canvas is taking > 16ms say 1 in 20…
McNinja
  • 798
  • 7
  • 19
3
votes
1 answer

Issues with TextureView on Android 4.2

Has anyone faced issues with TextureView and MediaPlayer on Android 4.2.2? SOLVED: See answer below and how to serve files from an embedded HTTP server. UPDATE: The videos which fail to display if embedded in the res/raw folder play just fine if…
AngraX
  • 1,803
  • 2
  • 18
  • 30
3
votes
2 answers

Adding TextureView to main.xml: Android

I'm trying to capture an image using TextureView, but the main.xml file is overridden by TextureView, and hence I cannot see the contents of the main.xml file. I'm trying to add TextureView into main.xml. Please give suggestions about how to improve…
Aswathy
  • 337
  • 2
  • 8
  • 18