Change SurfaceView position immediately

325 views
Skip to first unread message

Andrew

unread,
Feb 18, 2012, 4:51:39 AM2/18/12
to android-platform
Hi,

I have a problem with setting a new position to SurfaceView. Actually
position changes, but after some delay. I'm playing a video and my
view is associated with an overlay. And I want to wait until position
of the overlay has been changed to avoid flickering effect.

Is this possible?

See log below.

I want position to be changed inside setVideoRect method where I set
new layout params. As you may see it changes later.

D/EngineJNIVideo( 3657): setVideoRect() called
D/EngineJNIVideo( 3657): setVideoRect() call end

-----------

Log:

D/EngineJNIVideo( 3657): surfaceChanged called width = 1024 height =
580
I/engine_application( 3657): CVideoPlayerAndroid::Update
I/engine_application( 3657): Size Available = false, Duration
Available = false, Finished = false
I/engine_application( 3657): Position = 0.000000
I/engine_application( 3657): CVideoPlayerAndroid::Render
I/TIOverlay( 1389): Setting position X0/Y20/W1024/H580
D/TIOverlay( 1389): REQUEST FOR LCD1
D/TIOverlay( 1389): found Panel Id @ [0], displayname [lcd2]
D/TIOverlay( 1389): found Display Manager @ [2], managername [2lcd]
I/TIOverlay( 1389): Position/X0/Y20/W1024/H580/R180/A255/Z1
I/TIOverlay( 1389): Adjusted Position/X0/Y20/W1024/H580
D/EngineJNIVideo( 3657): onVideoSizeChanged called width = 320 height
= 240
D/EngineJNIVideo( 3657): onPrepared called
D/EngineJNIVideo( 3657): surfaceChanged called width = 320 height =
240
I/engine_application( 3657): CVideoPlayerAndroid::Update
I/engine_application( 3657): Size Available = true, Duration Available
= true, Finished = false
I/engine_application( 3657): Size.x = 320, Size.y = 240
I/engine_application( 3657): Duration = 95.028000
I/engine_application( 3657): Position = 0.000000
I/engine_application( 3657): CVideoPlayerAndroid::Render
D/EngineJNIVideo( 3657): setVideoRect() called
D/EngineJNIVideo( 3657): setVideoRect() call end
D/EngineJNIVideo( 3657): surfaceChanged called width = 320 height =
240
I/TIOverlay( 1389): Setting position X572/Y280/W426/H320
D/TIOverlay( 1389): REQUEST FOR LCD1
D/TIOverlay( 1389): found Panel Id @ [0], displayname [lcd2]
D/TIOverlay( 1389): found Display Manager @ [2], managername [2lcd]
I/TIOverlay( 1389): Position/X572/Y280/W426/H320/R180/A255/Z1
I/TIOverlay( 1389): Adjusted Position/X572/Y280/W426/H320
I/EngineJNIVideo( 3657): mMediaPlayer.start() called
D/TIOverlay( 1301): Crop Win/X16/Y16/W320/H240
D/TIOverlay( 1301): REQUEST FOR LCD1
D/TIOverlay( 1301): found Panel Id @ [0], displayname [lcd2]
D/TIOverlay( 1301): found Display Manager @ [2], managername [2lcd]
I/engine_application( 3657): CVideoPlayerAndroid::Update
I/engine_application( 3657): Size Available = true, Duration Available
= true, Finished = false
Reply all
Reply to author
Forward
0 new messages