Skip to main content

[BD-J-DEV] Scaling SD video to full screen in a 1920x1080 scene

No replies
Anonymous

Hi all,

I am trying to scale PAL SD video to full screen to be able to use a
full HD popup menu. Besides some subtitle problems this seems to work
quite well on Samsung and Panasonic players.
But I have no luck on the PS3! The video stays in it's original
resolution and only position changes seem to have an effect. Any
ideas? Here's a snippet of the code:

HSceneTemplate st = new HSceneTemplate();

st.setPreference(HSceneTemplate.SCENE_SCREEN_DIMENSION, new
HScreenDimension(1.0F, 1.0F), HSceneTemplate.REQUIRED);

st.setPreference(HSceneTemplate.SCENE_SCREEN_LOCATION, new
HScreenPoint(0.0F, 0.0F), HSceneTemplate.REQUIRED);

scene = HSceneFactory.getInstance().getBestScene(st);
scene.setBounds(0, 0, 1920, 1080);

BDVideoConfigTemplate vct = new BDVideoConfigTemplate();

vct.setPreference(BDVideoConfigTemplate.KEEP_RESOLUTION, new
Dimension(1920, 1080), BDVideoConfigTemplate.REQUIRED);

HVideoDevice vd = HScreen.getDefaultHScreen().getDefaultHVideoDevice();
try {
vd.reserveDevice(this);
vd.setVideoConfiguration(vd.getBestConfiguration(vct));
} catch (Exception e) {}

Rectangle src = new Rectangle(0, 0, 768, 576);
Rectangle dst = new Rectangle(240, 0, 1440, 1080);

((AWTVideoSizeControl)player.getControl(AWTVideoSizeControl.class.getName())).setSize(new
AWTVideoSize(src, dst));

Thank you!

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net