Re-size surface problem

VLC for Android and Chrome OS specific usage questions
d36201419
New Cone
New Cone
Posts: 9
Joined: 20 May 2013 20:12

Re-size surface problem

Postby d36201419 » 25 Dec 2013 06:34

HI, first thanks for your help.
I encounter a problem. How to re-size the surface?

the code on android set the surface as full-screen.
But I want to make it just maybe 400*400.
Have any one done this before?

I tried to modify the function "changeSurfaceSize()". But the screen is black, although it has voice.

Thanks for your help again!

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: Re-size surface problem

Postby XilasZ » 08 Jan 2014 13:57

if you want to display in a 400x400 frame but keep the original aspect ratio, forcing dw/dh variable to 400 at the beginning should work.
if you don't care about aspect ratio, you can just force dimensions in the two LayoutParams near the end.

in all cases, you must keep this line untouched :

Code: Select all

mSurfaceHolder.setFixedSize(mVideoWidth, mVideoHeight);


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 19 guests