bcl
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2010
10:02 PM
Using Registry for Last played position
I'm whacking away at v2.0 of Home Media Server this weekend. I've got it to the point where browsing the server works and video playback is working. This rewrite is focusing on minimal server dependencies (in other words all you need is a http server with range header support and directory listing support). So I'd like to be able to keep track of the last position locally. Does the registry have enough space for something like this? Index using the video filename (no path) and last position reported before exiting (I'd only be saving on exit, not while playing).
Code isn't available yet, I've got some cleanup to do before I push it up to the git repository, hopefully by Sunday.
Code isn't available yet, I've got some cleanup to do before I push it up to the git repository, hopefully by Sunday.
5 REPLIES 5
TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2010
10:29 PM
Re: Using Registry for Last played position
You can store up to 16k in the registry per dev key.
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
bcl
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
06:52 AM
Re: Using Registry for Last played position
Thanks. I expect that won't be enough to store everything. I suppose I could limit it to the last 10 or so movies watched. I really want to avoid any kind of external dependency.
gonzotek
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2010
01:53 PM
Re: Using Registry for Last played position
"bcl" wrote:You could probably store a hash of the movie url instead of the complete url to save some space. Also, I think you have to periodically update the last played position while playing, because Roku changed the home key behavior so that it forces apps to close without a trappable event. See here:
Thanks. I expect that won't be enough to store everything. I suppose I could limit it to the last 10 or so movies watched. I really want to avoid any kind of external dependency.
viewtopic.php?p=182789#p182789
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
bcl
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2010
12:35 PM
Re: Using Registry for Last played position
"gonzotek" wrote:"bcl" wrote:You could probably store a hash of the movie url instead of the complete url to save some space. Also, I think you have to periodically update the last played position while playing, because Roku changed the home key behavior so that it forces apps to close without a trappable event. See here:
Thanks. I expect that won't be enough to store everything. I suppose I could limit it to the last 10 or so movies watched. I really want to avoid any kind of external dependency.
viewtopic.php?p=182789#p182789
Good point, I remember seeing that now. I probably won't handle that case, no sense in prematurely wearing out the flash. Save on 'normal' exit should cover most cases.
kbenson
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2010
02:49 PM
Re: Using Registry for Last played position
"bcl" wrote:
So I'd like to be able to keep track of the last position locally. Does the registry have enough space for something like this? Index using the video filename (no path) and last position reported before exiting (I'd only be saving on exit, not while playing).
How many are you planning on saving? I'm thinking you can save quite a few in the space you have.
A few options:
- If you have well defined sources, you can pull the common part of the source out into a separate table, and just reference that. E.g. if source "1" is defined, prepend that source's base URL to the file specified. You have to store the source's in the registry as well, but you keep the ability to reference full path names.
- If you are JUST tracking playback position, remove the entire entry when the entire move is watched, or they are X seconds from the end, similar to Netflix. That saves a lot of space.
- If you store a timestamp for the most recent change of the data in each record, you can scan and remove the oldest entries when space becomes sparse.
Each of these has a fairly easy to identify tradeoff of space for complexity, so obviously pick which ones make sense for you (if any) based on your needs.
-- GandK Labs
Check out Reversi! in the channel store!
Check out Reversi! in the channel store!