Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Chooh
Visitor

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 2
TheEndless
Channel Surfer

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
Chooh
Visitor

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.