americosfacebook / googletv-issues

Automatically exported from code.google.com/p/googletv-issues
0 stars 0 forks source link

Video Surface View goes blank #80

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
During development of a video based GTV app, I've noticed that periodically the 
Video surface view is lost i.e. video being played is not rendered to the 
screen.

This affects the entire O/S. When you switch to youtube (or any other app) the 
video image is not displayed to the screen (audio and controls are fine). In 
fact even the wallpaper on the home screen is not displayed.

This has happened ~5 times in the past few weeks on my Sony NSZ-GS7/GX70 
running 3.2.

Only a hard reboot (i.e. power off at the mains) fixes the problem. 

I can't see anything useful in logcat at the moment. Will run adb bugreport the 
very next time it happens.

Original issue reported on code.google.com by d.w.flan...@googlemail.com on 18 Sep 2012 at 9:58

GoogleCodeExporter commented 8 years ago
Happened again. Interestingly, I notice that there although it shows black 
where the video should be, there is a  bleed through of video of video (1 pixel 
wide and full height) on the left hand side of the screen (image attached, 
taken from mobile phone because it doesn't show up in ddms screenshot capture).

Also attached logcat and bugreport.

Original comment by d.w.flan...@googlemail.com on 18 Sep 2012 at 2:03

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Attached screenshot of youtube app (just to assure you that it is not simply an 
issue with my app!).

Original comment by d.w.flan...@googlemail.com on 18 Sep 2012 at 2:18

Attachments:

GoogleCodeExporter commented 8 years ago
I am not writing a Google TV App but I have a very serious problem with my 
Google TV. It sounds like it is similar to this one. Overnight when I leave the 
Google TV running and in the morning almost always the "TV App" isn't working 
it shows a black screen. Is there perhaps somewhere else I can report this 
issue?

Original comment by NikolayM...@gmail.com on 28 Sep 2012 at 6:19

Attachments:

GoogleCodeExporter commented 8 years ago
Please add Google TV device name ,model , build.
Are you using MediaPlayer or VideoView? Please add sample code which intializes 
this player and sets url to play.
What is the source of your video files? Can you send some example urls?

Original comment by mjo...@google.com on 28 Sep 2012 at 8:10

GoogleCodeExporter commented 8 years ago
Make: Sony 
Model: NSZ-GS7/GX70
Firmware: 3.2
Build Number: REL03_NSZGS7_CEK_1104_4384_20120724_URSC_S67254

Here's an example video url: 
http://dailyburn-f.akamaihd.net/i/series101/103_CODY_C/,1814K,1264K,814K,504K,28
2K,142K,.mp4.csmil/master.m3u8?__b__=504K

I'm using MediaPlayer (I'm reusing the same code as used in existing Android 
phone / tablet app). MediaPlayer setup is as follows: 

        @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

                Bundle bundle = ctx.getIntent().getExtras();
        if (bundle != null && bundle.containsKey(Constants.KEY_VIDEO)) {
            mVideo = (WorkoutVideo) bundle.getSerializable(Constants.KEY_VIDEO);
        }       

        currentMovie = mVideo.getIosVideoUrl();
                ...
                mSurface = (TappableSurfaceView) ctx.findViewById(R.id.surface);
        mSurface.addTapListener(onTap);
        mHolder = mSurface.getHolder();
        mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        mHolder.addCallback(this);
               ...
        }

        public void surfaceCreated(SurfaceHolder holder) {
        playVideo(currentMovie);
    }

        private void playVideo(String url) {
        try {
            mPlayer = new MediaPlayer();
            mPlayer.setScreenOnWhilePlaying(true);
            mPlayer.setDataSource(url);
            mPlayer.setDisplay(mHolder);
            mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
            mPlayer.setOnPreparedListener(this);
            mPlayer.prepareAsync();
            mPlayer.setOnBufferingUpdateListener(this);
            mPlayer.setOnCompletionListener(this);
            mPlayer.setOnSeekCompleteListener(this);
            mPlayer.setOnErrorListener(this);

        } catch (Throwable t) {
            Log.e(TAG, "Exception in media prep", t);
        }
    }

        @Override
    public void onPrepared(MediaPlayer mediaplayer) {
        startVideoPlayback();
    }

       private void startVideoPlayback() {
        mHolder.setSizeFromLayout();
        mPlayer.start();    
       }

Let me know if I can be of more help.

Original comment by d.w.flan...@googlemail.com on 4 Oct 2012 at 10:03

GoogleCodeExporter commented 8 years ago
Just to add some more info to this:

I'm not entirely convinced that the media, decoding or playback is causing this 
issue.
I suspect that the GTV surfaceview is being damaged when connecting via adb 
connect (which seems to be very unreliable, e.g. I can connect 5 times on 
average before ipaddress is dropped by GTV). I just connected now and noticed 
that the Desktop background image disappeared 

Also, I now realise that the 1px bleed on the left hand side is because I 
didn't fully align the left edge during the setup process. So when this issue 
occurs the video is actually playing and being displayed correctly but it seems 
that there is a big black box (the size of the tv screen) being overlayed on 
top of the content!

Original comment by d.w.flan...@googlemail.com on 21 Nov 2012 at 12:39

GoogleCodeExporter commented 8 years ago
In my expererience the issue seems to be related to whether or not I have a USB 
thumb drive mounted. 

Sony Google TV, running android 3.2.

I see this issue when I have a USB thumb drive mounted. Everything works fine 
for while. At some point the contents of the thumb drive disaapper. Removing 
the thumb drive at this point results in a message to the effect that the USB 
device "Unknown Device" has been removed without having been previously 
unmounted.

In that state, any attempt to play video results in what appears to be a black 
box overlaid on top. Oddly, the video be seen playing in a one or two pixel 
strip between the black box and the true edge of the screen, on the left and 
right hand sides of the screeen.

Rebooting the device cures the problem for a while. Very interestingly, the 
problem does not occur if the thumb drive has not been mounted!

Original comment by rerdav...@gmail.com on 29 Nov 2012 at 6:25

GoogleCodeExporter commented 8 years ago
Happens frequently to me (at least once a day). May be related to throwing 
videos from my devices to my TV. Also, I've heard reports that if you slightly 
alter your video settings by dragging the top-left of the screen that fixes is 
too, though I've not tried that yet myself.

Original comment by darrylwr...@gmail.com on 20 Jan 2013 at 5:20

GoogleCodeExporter commented 8 years ago
I  entered the link and only got the bottom guide line.  Nothing would 
play.Logitech Revue.I have no hard drives connected.

Original comment by tucker3...@gmail.com on 21 Jan 2013 at 7:48

GoogleCodeExporter commented 8 years ago
Hi,
Even i have the same problem..My googletv Video Surfaceview goes blank while 
playing,i mean the video surface gets covered with a black screen and im able 
to see the video of 1px at the left side edge, the audio works fine.
Evrythng works fine for a while and later the same thing happens...only reboot 
fixes the problem.
Did anyone find the solution..?? please let me know..

Thanks.

Original comment by kmrudul...@gmail.com on 4 Apr 2013 at 6:56