Log in or register to post comments

Video on canvas Sony xperia issue

January 12, 2013 - 5:23am #1

Hi guys,

Sony xPeria once again ;o( I guess these are most problematic devices.

I realized that on device ST26i with androdi 4.0.4 second canvas video is not showing up on scene with 2 video canvas on one target. 

The behaviour is that both videos show clock, than play button. Once the play is hit on first video it starts playing the sound but canvas is just black not showing video. Video can be paused and resumed with no problem just canvas is still black. Second video plays well. 

I first though it is a problem of the video format and spent some time on tweeking it but than after some time I tried to copy second video in place of first so there was on both canvases basically identical video file. First shown black second playing well.

I also tried different demo project where there were no more videos on one target but instead 6 targets with one video on each. There it shown video only on very first target in the scene and on all the other only sound with black canvas.

I also tried a plain new project with your sample unity video pakackage. Same thing was happening. Video played well on stones, but black canvas on chips target.

here is probably interesting part of logCat from running sample video project from vuforia. It shows up these errors on playing video where it remains black.

S.

 

01-12 14:00:50.890: W/SignalStrength(423): getLTELevel - rssi:99 rssiIconLevel:0
01-12 14:00:50.890: W/SignalStrength(423): getGsmLevel=3
01-12 14:00:50.890: W/SignalStrength(423): getLevel=3
01-12 14:00:51.890: W/SignalStrength(423): getLTELevel - rsrp:2147483647 snr:2147483647 rsrpIconLevel:-1 snrIconLevel:-1
01-12 14:00:51.890: W/SignalStrength(423): getLTELevel - rssi:99 rssiIconLevel:0
01-12 14:00:51.890: W/SignalStrength(423): getGsmLevel=3
01-12 14:00:51.890: W/SignalStrength(423): getLevel=3
01-12 14:00:52.710: E/AwesomePlayer(128): AudioPlayer created, Non-LPA mode mime audio/mp4a-latm duration 48599365
01-12 14:00:52.820: E/memalloc(128): /dev/pmem: Failed to map buffer size:11075584 offset:10727424 fd:159 Error: Invalid argument
01-12 14:00:52.820: E/msm7627a.gralloc(128): Could not mmap handle 0xc63d88, fd=159 (Invalid argument)
01-12 14:00:52.820: E/msm7627a.gralloc(128): gralloc_register_buffer: gralloc_map failed
01-12 14:00:52.820: W/GraphicBufferMapper(128): registerBuffer(0xc63d88) failed -22 (Invalid argument)
01-12 14:00:52.820: E/memalloc(128): /dev/pmem: Failed to map buffer size:11075584 offset:10727424 fd:159 Error: Invalid argument
01-12 14:00:52.820: E/msm7627a.gralloc(128): Could not mmap handle 0xc63d88, fd=159 (Invalid argument)
01-12 14:00:52.820: E/libgenlock(128): perform_lock_unlock_operation: GENLOCK_IOC_LOCK failed (lockType0x1, err=Bad file number fd=159)
01-12 14:00:52.820: E/msm7627a.gralloc(128): gralloc_lock: genlock_lock_buffer (lockType=0x2) failed
01-12 14:00:52.820: W/GraphicBufferMapper(128): lock(...) failed -22 (Invalid argument)
01-12 14:00:52.820: E/SoftwareRenderer(128): Error: mapper.lock failed -22
01-12 14:00:52.870: E/memalloc(128): /dev/pmem: Failed to map buffer size:4091904 offset:3743744 fd:157 Error: Invalid argument
01-12 14:00:52.870: E/msm7627a.gralloc(128): Could not mmap handle 0xba21a0, fd=157 (Invalid argument)
01-12 14:00:52.870: E/msm7627a.gralloc(128): gralloc_register_buffer: gralloc_map failed
01-12 14:00:52.870: W/GraphicBufferMapper(128): registerBuffer(0xba21a0) failed -22 (Invalid argument)
01-12 14:00:52.870: E/memalloc(128): /dev/pmem: Failed to map buffer size:4091904 offset:3743744 fd:157 Error: Invalid argument
01-12 14:00:52.870: E/msm7627a.gralloc(128): Could not mmap handle 0xba21a0, fd=157 (Invalid argument)
01-12 14:00:52.870: E/libgenlock(128): perform_lock_unlock_operation: GENLOCK_IOC_LOCK failed (lockType0x1, err=Bad file number fd=157)
01-12 14:00:52.870: E/msm7627a.gralloc(128): gralloc_lock: genlock_lock_buffer (lockType=0x2) failed
01-12 14:00:52.870: W/GraphicBufferMapper(128): lock(...) failed -22 (Invalid argument)
01-12 14:00:52.870: E/SoftwareRenderer(128): Error: mapper.lock failed -22
01-12 14:00:53.510: E/SurfaceTexture(9474): [unnamed-9474-6] dequeueBuffer: no available buffer slots
01-12 14:00:53.510: W/SoftwareRenderer(128): Surface::dequeueBuffer returned error -16
01-12 14:00:53.660: W/SignalStrength(506): SignalStrength before validate=SignalStrength: 9 255 -1 -1 -1 -1 -1 99 -32767 -32767 -32767 -32767 cdma
01-12 14:00:53.660: W/SignalStrength(506): SignalStrength after validate=SignalStrength: 9 255 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 -32767 cdma
01-12 14:00:53.720: W/SignalStrength(423): getLTELevel - rsrp:2147483647 snr:2147483647 rsrpIconLevel:-1 snrIconLevel:-1
01-12 14:00:53.720: W/SignalStrength(423): getLTELevel - rssi:99 rssiIconLevel:0
01-12 14:00:53.720: W/SignalStrength(423): getGsmLevel=3
01-12 14:00:53.720: W/SignalStrength(423): getLevel=3
01-12 14:00:53.740: W/SignalStrength(423): getLTELevel - rsrp:2147483647 snr:2147483647 rsrpIconLevel:-1 snrIconLevel:-1
01-12 14:00:53.740: W/SignalStrength(423): getLTELevel - rssi:99 rssiIconLevel:0
01-12 14:00:53.740: W/SignalStrength(423): getGsmLevel=3
01-12 14:00:53.740: W/SignalStrength(423): getLevel=3
01-12 14:00:53.980: W/SignalStrength(506): SignalStrength before validate=SignalStrength: 9 255 -1 -1 -1 -1 -1 99 -32767 -32767 -32767 -32767 cdma
01-12 14:00:53.980: W/SignalStrength(506): SignalStrength after validate=SignalStrength: 9 255 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 -32767 cdma
01-12 14:00:54.140: E/SurfaceTexture(9474): [unnamed-9474-6] dequeueBuffer: no available buffer slots
01-12 14:00:54.140: W/SoftwareRenderer(128): Surface::dequeueBuffer returned error -16
01-12 14:00:54.900: W/SignalStrength(423): getLTELevel - rsrp:2147483647 snr:2147483647 rsrpIconLevel:-1 snrIconLevel:-1
01-12 14:00:54.900: W/SignalStrength(423): getLTELevel - rssi:99 rssiIconLevel:0
01-12 14:00:54.900: W/SignalStrength(423): getGsmLevel=3
01-12 14:00:54.900: W/SignalStrength(423): getLevel=3
01-12 14:00:54.940: E/SurfaceTexture(9474): [unnamed-9474-6] dequeueBuffer: no available buffer slots
01-12 14:00:54.940: W/SoftwareRenderer(128): Surface::dequeueBuffer returned error -16
01-12 14:00:55.430: E/SurfaceTexture(9474): [unnamed-9474-6] dequeueBuffer: no available buffer slots
 

 

 

Video on canvas Sony xperia issue

April 5, 2013 - 8:07am #11

That's a good tip. The Video Playback feature relies on the native device player, provided by the iOS or Android device. These can become unstable on some devices when you attempt to maintain too many active player references. So it's a good idea to handle video loading dynamically to manage the references and only load those that are needed.

Video on canvas Sony xperia issue

April 5, 2013 - 3:40am #10

Hi,

I don't know whether you are using Unity or not, but in Unity even if there are videos on different markers and are not shown at the same time, all videos in scene by default initialize (and preload) at the app start up. All more less at the same time.

This is what you have to avoid in your app. To be safe you should allow only one video to be initialized at a time.

this is how we sorted the problems in our app after long testign variety of situations.

from previous post:

"Different devices handle more remote videos better or worse. In our app we sorted this by forbiding to prebuffer videos automatically and let it buffer just when it is started and destroying video object when different vdeo is played. It is less smooth for user as he has to wait to buffer but I think ppl are used to buffering videos before playback starts and with loading indicator it is acceptable. We managed to get it very stable this way even with 10 vids on the same marker."

 

If you are playing the same video on all your targets, just move the video from one to another when different target is detected, so you keep only one video obejct in the scene.

S.

Video on canvas Sony xperia issue

April 5, 2013 - 3:16am #9

hi, 

I have 8 markers and nned to play only one video(VP official video) overe there.. here video got playing on 4 markers but in others showing X icon

did i missed anything??

Video on canvas Sony xperia issue

April 4, 2013 - 5:33am #8

I see, then it might be just a resource allocation problem on the Xperia device (as you cannot handle too many videos simultaneously in Android; so on some devices you might be able to handle up to 4 or 5 videos simultaneously, on other devices no more than 2...)

 

Video on canvas Sony xperia issue

April 4, 2013 - 5:25am #7

Hi, i checked it with the offical sample videos its working fine and fixed my problems, but now in 3rd marker its showing a close(x) symbol instead of play.. Works perfect in all other devices..

 

there is only one video with 3 markers (official sample video).

 

VideoPlayback.java

 

mMovieName[poster_1] = "VuforiaSizzleReel_1.m4v";
mMovieName[poster_2] = "VuforiaSizzleReel_1.m4v";
mMovieName[poster_3] = "VuforiaSizzleReel_1.m4v";
 
Loading textures
 
private void loadTextures()
    {
        mTextures.add(Texture.loadTextureFromApk("VuforiaSizzleReel_1.png",
                getAssets()));
        mTextures.add(Texture.loadTextureFromApk("VuforiaSizzleReel_1.png",
                getAssets()));
        mTextures.add(Texture.loadTextureFromApk("VuforiaSizzleReel_1.png",
                getAssets()));
        mTextures.add(Texture.loadTextureFromApk("play.png",
                getAssets()));
        mTextures.add(Texture.loadTextureFromApk("busy.png",
                getAssets()));
        mTextures.add(Texture.loadTextureFromApk("error.png",
                getAssets()));
    }

 

VideoPlayback.cpp

changed the native function VideoPlaybackRenderer_renderFrame for icons indexs and compiled successfully

switch (currentStatus[currentTarget])

            {
                case READY:
                    glBindTexture(GL_TEXTURE_2D, textures[3]->mTextureID);
                    break;
                case REACHED_END:
                    glBindTexture(GL_TEXTURE_2D, textures[3]->mTextureID);
                    break;
                case PAUSED:
                    glBindTexture(GL_TEXTURE_2D, textures[3]->mTextureID);
                    break;
                case NOT_READY:
                    glBindTexture(GL_TEXTURE_2D, textures[4]->mTextureID);
                    break;
                case ERROR:
                    glBindTexture(GL_TEXTURE_2D, textures[5]->mTextureID);
                    break;
                default:
                    glBindTexture(GL_TEXTURE_2D, textures[4]->mTextureID);
                    break;
            }
 
Thanks
Shinurag KR

Video on canvas Sony xperia issue

April 4, 2013 - 4:12am #6

Hi shinurag,

does the error occur with the VideoPlayback sample and the official sample videos, or when using a different video ?

 

Video on canvas Sony xperia issue

April 4, 2013 - 2:51am #5

HI AlessandroB while playing second video onwards( first marker and its video playing without any problem),  its playing started but after 2 or 3 seconds its showing Error icon(this one currentStatus[currentTarget] = ERROR) ... this bug comes only with Sony Experia andorid 4.1.2

 

Thanks

Shinurag KR

Video on canvas Sony xperia issue

March 11, 2013 - 11:15pm #4

Hi stan, thanks for the update and for sharing your solution.

Video on canvas Sony xperia issue

March 11, 2013 - 3:10pm #3

Hi Alessandro,

sorry to getting back this late I did not realize you replied to me on this thread. This issue is related to another one I reported on other thread where when there are more remote videos in the scene at the same time, dependng on device state and hardware it randomly fails to prebuffer or to play video on canvas. Different devices handle more remote videos better or worse. In our app we sorted this by forbiding to prebuffer videos automatically and let it buffer just when it is started and destroying video object when different vdeo is played. It is less smooth for user as he has to wait to buffer but I think ppl are used to buffering videos before playback starts and with loading indicator it is acceptable. We managed to get it very stable this way even with 10 vids on the same marker.

S. 

Hi stan, so the official

January 14, 2013 - 1:14am #2

Hi stan,

so the official videoplayback sample also shows this issue, if I understand correctly;

could you try and swap the video of chips with the one of "stones" just to double-check that the black canvas is always on the same target ? (and it does not depend on the specific video used) ?

Then let me know please.

Log in or register to post comments