Your Digital Media Has Never Looked So Good

 
User avatar
squirreltown
Topic Author
Posts: 870
Joined: Sun Apr 21, 2013 2:20 pm

Re: Prevent Black Screen or Timeout

Tue Jan 27, 2015 4:35 pm

RokuJoel wrote:
If you want to test your screensaver while the channel is running, to make sure that the channel and screensaver are properly exchanging data when they are both running, preview won't help you.

- Joel


There you go. Told you I missed something.
Kinetics Screensavers
 
User avatar
Komag
Posts: 808
Joined: Fri Aug 22, 2014 3:42 am

Re: Prevent Black Screen or Timeout

Tue Jan 27, 2015 5:00 pm

Yeah, I'm planning an "in-game" screensaver as a replacement, both to literally avoid damaging any old boob toobs out there along with the plasma's, and also as an in-game sort of joke thing about being idle.

I'll just check for all inputs OTHER than my anti-screen-saver keypress, and if there are none for a certain time, do the in-game screen saver.
 
User avatar
squirreltown
Topic Author
Posts: 870
Joined: Sun Apr 21, 2013 2:20 pm

Re: Prevent Black Screen or Timeout

Tue Jan 27, 2015 5:34 pm

NewManLiving wrote:
Some things that were shared on other threads. Don't know what support the GetScreensaveTimeout has but it works on what I have
The undocumented roAppManager.GetScreensaverTimeout to get timeout values


Totally missed this, thank you NML for mentioning it. Just tried it, It's the solution to not annoying the user.
Kinetics Screensavers
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9231
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: Prevent Black Screen or Timeout

Tue Jan 27, 2015 8:38 pm

squirreltown wrote:
If you've gone to the trouble of writing your own roScreen screensaver for your roScreen app, you have to use the ECP trick to keep the black screen screensaver from launching on top of it.

Yep, as I've done, and suggested as something you should do if you opt to go this route, but that's the only legitimate reason I can think of for doing it.
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)
 
User avatar
Komag
Posts: 808
Joined: Fri Aug 22, 2014 3:42 am

Re: Prevent Black Screen or Timeout

Wed Jan 28, 2015 4:28 am

looks like using "keypress/Backspace" works fine too, so I can avoid "using up" any remote buttons just for this :)
 
User avatar
Komag
Posts: 808
Joined: Fri Aug 22, 2014 3:42 am

Re: Prevent Black Screen or Timeout

Sat Jan 31, 2015 4:03 am

By the way, "Backspace" is code 11 for press and 111 for release, and sending url = "http://"+ipaddr+":8060/keypress/Backspace" does both 11 and 111
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Prevent Black Screen or Timeout

Sat Jan 31, 2015 10:39 am

RokuMarkn wrote:
Komag wrote:
I just don't like that there is a black screen.

That's not really a good enough reason to disable the screensaver. Unless you're implementing your own screensaver functionality, you're risking damaging your users' TVs.

I am confused here, what did i miss?
I thought that black screen is always shown instead of screensaver when current channel is in roScreen.
That includes "own screensaver" too, right? So how is own-SS relevant here, if it won't be invoked anyway?
 
User avatar
RokuMarkn
Roku Engineering
Posts: 1581
Joined: Mon Jun 09, 2008 9:20 am

Re: Prevent Black Screen or Timeout

Sat Jan 31, 2015 11:05 am

Yes, currently the black screen is shown instead of a screensaver over roScreen. I don't think anyone is talking about private screensavers here. What Komag is proposing is to DISABLE the screensaver, by periodically sending ECP commands, and then have his main app behave like a screensaver when appropriate.

--Mark
 
User avatar
squirreltown
Topic Author
Posts: 870
Joined: Sun Apr 21, 2013 2:20 pm

Re: Prevent Black Screen or Timeout

Sat Jan 31, 2015 11:39 am

RokuMarkn wrote:
Yes, currently the black screen is shown instead of a screensaver over roScreen. I don't think anyone is talking about private screensavers here. What Komag is proposing is to DISABLE the screensaver, by periodically sending ECP commands, and then have his main app behave like a screensaver when appropriate.

--Mark

Correct. You build a screen saver into your channel but you don't call it Runscreensaver(). I call mine FakeScreensaver(). Then you use appmanager to get the box SS interval and trigger yours ahead of it, while using the ECP trIck to ward off the evil black screen.
Kinetics Screensavers
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Prevent Black Screen or Timeout

Sat Jan 31, 2015 11:50 am

RokuMarkn wrote:
Yes, currently the black screen is shown instead of a screensaver over roScreen. I don't think anyone is talking about private screensavers here. What Komag is proposing is to DISABLE the screensaver, by periodically sending ECP commands, and then have his main app behave like a screensaver when appropriate.

Oh i see. Seems i was mislead when further TheEndless, squirreltown and RokuJoel talked about "own screensaver" and then about testing pvt.SS w/timeout (new subject apparently).

So a private SS (implementing RunScreenSaver()) cannot interfere with a "black death" event. I.e. cannot say have runScreenSaver() that just does a `return` when invoked or ECP sends a key to wake up and return to the core app. Because it won't get invoked at all when roScreening.

Hmmm... radical question here!
Aren't periodic calls to ifScreen.swapBuffers() and .Finish() enough of a reason to ward-off the Black Screen?

I mean how the SS watchdog decides if it's time to start (imaginary)saving the screen - it checks for recent events like remote I/O and video component playing. It can do the same based on whether roScreen graphic activity is happening or not. Now that is a heuristic since one might be drawing and never SwapBuffers() - or swap them while keeping the same image. But same can be said for roVideoPlayer - it may loop a video of the same still frame for many hours and ostensibly burn-into a cathode tube or plasma display after left for days
 
User avatar
squirreltown
Topic Author
Posts: 870
Joined: Sun Apr 21, 2013 2:20 pm

Re: Prevent Black Screen or Timeout

Sat Jan 31, 2015 12:30 pm

EnTerr wrote:
Hmmm... radical question here!
Aren't periodic calls to ifScreen.swapBuffers() and .Finish() enough of a reason to ward-off the Black Screen?


My experience says the answer is no. My stuff is built to be swapping buffers every pass through the loop (makes the UI real snappy) even if nothing on the screen is changing so if swapbuffers() alone prevented the screensaver you could get a burn-in event.

EnTerr wrote:
But same can be said for roVideoPlayer - it may loop a video of the same still frame for many hours and ostensibly burn-into a cathode tube or plasma display after left for days


I'm guessing that the SS Day-Mon must know that the video is paused, but if you were watching say one of Andy Warhol's 8 hour movies of a cheeseburger wrapper sitting on the table, there could be an issue there.
Kinetics Screensavers
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9231
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: Prevent Black Screen or Timeout

Sat Jan 31, 2015 3:42 pm

squirreltown wrote:
RokuMarkn wrote:
Yes, currently the black screen is shown instead of a screensaver over roScreen. I don't think anyone is talking about private screensavers here. What Komag is proposing is to DISABLE the screensaver, by periodically sending ECP commands, and then have his main app behave like a screensaver when appropriate.

--Mark

Correct. You build a screen saver into your channel but you don't call it Runscreensaver(). I call mine FakeScreensaver(). Then you use appmanager to get the box SS interval and trigger yours ahead of it, while using the ECP trIck to ward off the evil black screen.

No need to call it something other than RunScreensaver(). You can call RunScreensaver() from your code and it would work the same as calling it FakeScreensaver(). Only reason to rename it would be if you didn't want the Roku to see that you have a screensaver entry point for some reason. I actually use this trick so I only need the "fake" screensaver on newer devices, while legacy devices (which don't go to a black screen) can use the standard screensaver functionality.
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)
 
User avatar
squirreltown
Topic Author
Posts: 870
Joined: Sun Apr 21, 2013 2:20 pm

Re: Prevent Black Screen or Timeout

Sat Jan 31, 2015 3:46 pm

TheEndless wrote:
You can call RunScreensaver() from your code and it would work the same as calling it FakeScreensaver(). Only reason to rename it would be if you didn't want the Roku to see that you have a screensaver entry point for some reason. I actually use this trick so I only need the "fake" screensaver on newer devices, while legacy devices (which don't go to a black screen) can use the standard screensaver functionality.


Very good tip
Kinetics Screensavers
 
User avatar
Komag
Posts: 808
Joined: Fri Aug 22, 2014 3:42 am

Re: Prevent Black Screen or Timeout

Mon Apr 06, 2015 12:21 pm

Just a note:

app = CreateObject("roAppManager")
? app.GetScreensaverTimeout() ' Returns the number of minutes this Roku waits before running the system screensaver
? Type(app.GetScreensaverTimeout()) ' Returns "Integer"

di = CreateObject("roDeviceInfo")
? di.TimeSinceLastKeypress() ' Returns the number of seconds since the last remote keypress was received.

Simply multiply the Timeout setting by 60, check when the LastKeypress is getting close (say, within 10 seconds), and run your in-app custom screensaver instead, and send fake ECP signals to avoid the system screensaver.
 
belltown
Posts: 1465
Joined: Thu Dec 09, 2010 1:43 pm
Contact:

Re: Prevent Black Screen or Timeout

Mon Apr 06, 2015 1:42 pm

Komag wrote:
looks like using "keypress/Backspace" works fine too, so I can avoid "using up" any remote buttons just for this :)


It may be worth noting that you can use just about anything for a remote keypress, even keys that aren't on any remote or keyboard (at least any character in the 16-bit Unicode Basic Multilingual Plane). I use the Unicode Character 'ALARM CLOCK' (U+23F0), ⏰.

I have this in my fake screensaver code:

   this.CLOCK_KEY_PRESS = 9200
   this.CLOCK_KEY_RELEASE = 9300
   this.CLOCK_KEY_STRING = "Lit_%E2%8F%B0"
   
   this.WAKEUP_KEY_PRESS = this.CLOCK_KEY_PRESS
   this.WAKEUP_KEY_RELEASE = this.CLOCK_KEY_RELEASE
   this.WAKEUP_KEY_STRING = this.CLOCK_KEY_STRING


Any Unicode character that can be represented in 16 bits should work, even on legacy Rokus, even if it requires 3 UTF-8 octets. Just don't try using something like the Pile of Poo character, which takes up 32 bits. This is not a problem since you shouldn't need a pile of poo when you have an alarm clock to wake you up.
Last edited by belltown on Wed Mar 02, 2016 4:19 pm, edited 2 times in total.
https://github.com/belltown/

Who is online

Users browsing this forum: No registered users and 5 guests