Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

roVideoScreen and SetDestinationRect

Hi,

I have a content in 4:3 (720х480). When displayed on HDTV with 720p there are black areas on left and right side of the picture.

Is there a way to stretch picture to wide screen? Seems that SetDestinationRect can only zoom. Which params should i pass to SetDestinationRect to stretch 720x480 to 1280x720 without black areas around picture?

The most preferable way to let HD TV set the right video mode: zoom, stretch or crop.

SY, Chooh
0 Kudos
2 Replies
Level 9

Re: roVideoScreen and SetDestinationRect

Unfortunately, there is no stretch option at the moment, only zoom as you've discovered.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Level 7

Re: roVideoScreen and SetDestinationRect

I have tried the following code and it works perfectly.


If item.width <> Invalid and item.height <> Invalid Then
print "Setting video stretch"
displaySize = CreateObject("roDeviceInfo").GetDisplaySize()
rect = CreateObject("roAssociativeArray")
rect.w = displaySize.w
rect.h = Int(displaySize.w * item.height / item.width)
rect.x = 0
rect.y = Int((item.height - rect.h ) /2)
print " { x= ", rect.x, ", y= ", rect.y, ", w= ", rect.w, ", h= ", rect.h, " }"
If rect.h > displaySize.h Then
video.SetDestinationRect(rect)
End If
End If


But it seems that this code is broken in 2.9 :evil: Any ideas?
0 Kudos