Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8555779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:12:08+00:00 2026-06-11T15:12:08+00:00

I tried to play the same video with a SurfaceView and a TextureView and

  • 0

I tried to play the same video with a SurfaceView and a TextureView and noticed that the image rendered with the TextureView is more aliased (less ‘smooth’) than with the SurfaceView.

What is the reason for this ? Is there any way to configure rendering of TextureView to look better ?

The TextureView is used like this:

    TextureView textureView = new TextureView(this);
    textureView.setSurfaceTextureListener(new SurfaceTextureListener() {

        @Override
        public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width, int height) {
            Log.i("test", "onSurfaceTextureAvailable()");
            MediaPlayer player = MediaPlayer.create(TestActivity.this, Uri.parse(VIDEO_URL));
            Surface surface = new Surface(surfaceTexture);
            player.setSurface(surface);
            player.start();
        }

        @Override
        public void onSurfaceTextureUpdated(SurfaceTexture surface) { 
            Log.i("test", "onSurfaceTextureUpdated()");
        }

        @Override
        public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) { 
            Log.i("test", "onSurfaceTextureSizeChanged()");
        }

        @Override
        public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
            Log.i("test", "onSurfaceTextureDestroyed()");
            return false;
        }
    });
    setContentView(textureView);

And for the SurfaceView:

    SurfaceView surfaceView = new SurfaceView(this);
    surfaceView.getHolder().addCallback(new Callback() {

        @Override
        public void surfaceCreated(SurfaceHolder holder) {
            Log.i("test", "surfaceCreated()");
        }

        @Override
        public void surfaceDestroyed(SurfaceHolder holder) { 
            Log.i("test", "surfaceDestroyed()");
        }

        @Override
        public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { 
            Log.i("test", "surfaceChanged()");
            MediaPlayer player = MediaPlayer.create(TestActivity.this, Uri.parse(VIDEO_URL));
            player.setSurface(holder.getSurface());
            player.start();
        }
    });
    setContentView(surfaceView);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:12:09+00:00Added an answer on June 11, 2026 at 3:12 pm

    Well, it seems that applying a scaling (other than 1) on the TextureView does the ‘smoothing’ effect that I’m looking for.

    textureView.setScaleX(1.00001f);
    

    That sounds like a strange hack…but it works. Would be interesting to dig out what’s done in the scaling that changes the rendering aspect…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so, I have a function that makes an image invisible, and at the same
A while back, I noticed that VLC has the ability to play videos directly
I have an mp4 video that I want to play in IE9 using HTML5
For some reason, when I try to play a video that is 1536x2048 on
I need your help. I tried to play an audio file stored in Assets
I have a .wav music file. When I tried to play using SoundEffect.Play(); mus1.Play();
I am now learning on the audio framework of iphone. Just tried to play
I tried the following command find ~/dir1 *.m4a | play Directory dir1 has exactly
I am trying to play video files from iPhone media player in my iphone
What I'm trying to do is play the first video retrieved from the external

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.