I am a noob to this. I see references that we are able to stream video to a Series 3 with this app. What configuration is required to accomplish this? I have MPG4s on my system under v:\video. How would I access them?

(Same notation. Actually, wait -- you have self.height as the ypos. Were you planning to do an upwards wipe? Also, height and width aren't standard attributes of an Application instance, so I don't know how you've defined these. But, the rest still applies -- you don't need to specify visible, and you should not specify id.) We'll use the name img_view to keep track of the new view rather than trying to manipulate its id.

Now, I'm assuming here that you have a reason for wanting the image to be in a child view of self.screen -- namely, that self.screen will have its own resource assigned to it elsewhere -- otherwise, there's no reason to use two views, and both lines could be combined to:

Code:

self.screen = self.root.child(image='test.png')

For that matter, if you're not going to assign a resource to self.root, you could just do this:

Code:

self.root.set_image('test.png')

Note that the "id" parameter is meant for use with the built-in resources. I'd never use it for client-created resources.

Thanks for the help, here is a little insight in to what I'm doing. I have a large picture that gets updated frequently that I want to display but Tivo can't display it all as one image so I broke it into 14 images that are 1024 x 240. I add all the images as children to the view so when I scale or scroll the view it moves or scales all the child images at the same time. I paired down my example in my post so it would be easier to understand. I have it working but had a feeling that I wasn't using the API correctly so I thought I would ask for the proper way to do it. Thanks again for the help.

Using an alpha value only works in the simulator. (See the comments just above the code you quoted.) I mask it out so you get the same results in the simulator as on a real TiVo, and so you only have to specify the three color bytes, instead of having to preface every color with an ff (full opacity) for the alpha.

Semi-transparent views work fine, BTW. You just set the transparency via the "transparency" option when creating the view, or via the set_transparency() method later -- not via a color resource. See the "test" app for an example. This is how it's done wherever you see that effect in an HME app.

Edit: I just tested this again now, and it's not working the way I remember -- which is to say, alpha in color resources apparently is working now. Perhaps this was a change in a recent TiVo software update. Or perhaps I'm misremembering... the way I remember it, when I was first writing HME for Python, I had the alpha part unused (i.e., set to zero), and everything looked normal on the TiVo, but blank in the simulator.

I'll revisit this in the next version.

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Yes, as I said, it seems to work now. Thanks for bringing it to my attention.

BTW, I should point out that, although it's supported, the TiVo really hates transparency. I quote from the HME SDK Developer's Guide:

Quote:

Originally Posted by TiVo

Hardware rendering constraints include the following:

• Maximum of 8 images per scanline (a scanline is a horizontal line on the display)
• Maximum of 3 images per pixel (4 on some systems)
• Maximum of 56 bits of depth per pixel (128 on some systems)

Note: The maximum depth of 56 bits per pixel means that placing two transparent images on top of each other results in software rendering for the overlapping portions. (Transparent images — which includes any image with at least one transparent pixel or any GIF image — require 32 bits each. Two transparent images would thus require 64 bits, which exceeds the limit of 56 bits per pixel.)

Workarounds

To avoid software rendering, use opaque images instead of transparent images. Opaque images require 16 bits and are faster to decode and render. Using transparent images to create shading and texturing effects is costly in this environment and should be avoided.

This probably doesn't apply to the S3/HD, but it still does on the S2. I'm not sure how this translates to non-image resources, though.

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

self.screen = self.root.child()
for i in range(0,10):
self.screen.child(0, self.height*i, self.width, self.height,image="TEST %i.PNG" % i)
for i in range(0,10):
self.screen.children[i].remove_resource()
self.screen.children[i].remove()

The first loop loads all the images without a problem but the second loop stops at the remove_resource() line with a "list index out of range" error when i = 5. Another odd thing is if I set the second loop to stop at 4 so the error doesn't occur then it show that every other image was removed instead of the first 4 images.

Yeah, the problem there is a Python thing -- if you remove items from a list while you're iterating over it, it gets confused. (The remove() method of Views also removes them from their parents' "children" lists.) You can get around that by using a copy of the list -- maybe something like this:

Yeah, you host it yourself (however you want to arrange that), and just give them the URL. There's a Python app there right now: my Reversi game.

Hosting is the hard part. Since I've so far been unable to get HME working as CGI (and am increasingly pessimistic about the prospect), you pretty much have to be able to run start.py as a server and bind your own port. This means a more expensive plan. For now, I'm just running Reversi from my own PC.

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

From your quick start, start.py runs and is obviously sitting there waiting to be told something after it displays "Server Starts".

No, it's just waiting for requests from a TiVo (or the simulator), which will be shown in that window. There's nothing more for you to type. Just go to your TiVo and pull up the Music, Photos & More Showcases menu.

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

No, it's just waiting for requests from a TiVo (or the simulator), which will be shown in that window. There's nothing more for you to type. Just go to your TiVo and pull up the Music, Photos & More Showcases menu.

Thank you.

Turns out that it was NOT properly running.

I was not sure what I was supposed to see so your reply was all I needed.

After you told me this, I made some change to the config.ini file and I am now getting the printfs of the HTTP connections.

I see the various apps on the Tivo now.

The kicker is that I did not save the config.ini and I edited it and NOW I do not get any connections.

How can I wrap text to a text window? If a new line character is added anywhere in the text string then the simulator will wrap that text correctly but the same text doesn't wrap when viewed with my Tivo HD. Am I going to have to write code to wrap the text manually?

How can I wrap text to a text window? If a new line character is added anywhere in the text string then the simulator will wrap that text correctly but the same text doesn't wrap when viewed with my Tivo HD.

I'm not sure what you're saying here. New line characters should always be processed, and are, in my experience. But as for automatic wrapping, that doesn't happen unless you set the RSRC_TEXT_WRAP flag. These are two separate issues.

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

I'm not sure what you're saying here. New line characters should always be processed, and are, in my experience. But as for automatic wrapping, that doesn't happen unless you set the RSRC_TEXT_WRAP flag. These are two separate issues.

I was talking about automatic wrapping. I didn't know there was a flag for it. When the text has a new line character anywhere in the text the simulator will wrap all the text automaticly as if the flag was set.