<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>TiVo Community - HME Developers Corner</title>
		<link>http://www.tivocommunity.com/tivo-vb</link>
		<description>This area is for HME Developers to work on new apps for HME.  TiVo will be watching, so happy programming!</description>
		<language>en</language>
		<lastBuildDate>Sat, 21 Nov 2009 06:46:40 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.tivocommunity.com/tivo-vb/tivo/misc/rss.jpg</url>
			<title>TiVo Community - HME Developers Corner</title>
			<link>http://www.tivocommunity.com/tivo-vb</link>
		</image>
		<item>
			<title>hme 1.4 memory leak or user error?</title>
			<link>http://www.tivocommunity.com/tivo-vb/showthread.php?t=436607&amp;goto=newpost</link>
			<pubDate>Thu, 05 Nov 2009 05:52:08 GMT</pubDate>
			<description><![CDATA[I am playing around with creating an app and am fairly new to Java.  Here are two code snippets.


Code:
---------
BufferedImage myScreenImage=myCaptureRobot.createScreenCapture(screenRectangle);
ImageIO.write(myScreenImage,"PNG",new File("testf.png"));
bg.setResource(createImage("testf.png"));
---------
and 


Code:
---------
BufferedImage myScreenImage=myCaptureRobot.createScreenCapture(screenRectangle);
bg.setResource(myScreenImage);
---------
Note bg is defined by:

Code:
---------
bg = new View(root, 0, 0, root.getWidth(), root.getHeight());
---------
The difference is in one case I am using bg.setResource with a PNG image file the other with a image object.  Both pieces of code give the proper results on the TiVo screen.  However, on the application server, the heap grows as this block of code is executed multiple times until I run out of memory.  The first version, the heap is stable and has no problem.

Is there a memory leak in setResource with an image object?  Or have I missed some fundamental concept and need to free something up after executing the block?]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>I am playing around with creating an app and am fairly new to Java.  Here are two code snippets.<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">BufferedImage myScreenImage=myCaptureRobot.createScreenCapture(screenRectangle);<br />
ImageIO.write(myScreenImage,&quot;PNG&quot;,new File(&quot;testf.png&quot;));<br />
bg.setResource(createImage(&quot;testf.png&quot;));</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->and <br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">BufferedImage myScreenImage=myCaptureRobot.createScreenCapture(screenRectangle);<br />
bg.setResource(myScreenImage);</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->Note bg is defined by:<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">bg = new View(root, 0, 0, root.getWidth(), root.getHeight());</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->The difference is in one case I am using bg.setResource with a PNG image file the other with a image object.  Both pieces of code give the proper results on the TiVo screen.  However, on the application server, the heap grows as this block of code is executed multiple times until I run out of memory.  The first version, the heap is stable and has no problem.<br />
<br />
Is there a memory leak in setResource with an image object?  Or have I missed some fundamental concept and need to free something up after executing the block?</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://www.tivocommunity.com/tivo-vb/forumdisplay.php?f=42">HME Developers Corner</category>
			<dc:creator>toups</dc:creator>
			<guid isPermaLink="true">http://www.tivocommunity.com/tivo-vb/showthread.php?t=436607</guid>
		</item>
		<item>
			<title>hme 1.4.1 problems</title>
			<link>http://www.tivocommunity.com/tivo-vb/showthread.php?t=436344&amp;goto=newpost</link>
			<pubDate>Sun, 01 Nov 2009 03:19:26 GMT</pubDate>
			<description><![CDATA[Tried to run helloworld from 1.4.1 and get the following messages:


Code:
---------
charon samples # java -classpath ../hme-host-sample.jar:samples.jar com.tivo.hme.host.sample.Main com.tivo.hme.samples.hello.HelloWorld
Instance ID = 1171eb716232c408
hme-host-sample version: 1.4.1 threadsafe-experimental
debug: Loaded factory: com.tivo.hme.samples.hello.HelloWorld
debug: Class loader for com.tivo.hme.samples.hello.HelloWorld: sun.misc.Launcher$AppClassLoader
debug: Context class loader: sun.misc.Launcher$AppClassLoader
added factory
MDNS ADD: http://10.34.165.8:0/hello/
Contacting mDNS localhost daemon at 127.0.0.1:5354
Connection to mDNS localhost daemon failed: java.net.ConnectException: Connection refused
mDNS localhost daemon: service not found.
        > java.net.ConnectException: Connection refused
jmdns library: register [start]: http://10.34.165.8:0/hello/
jmdns library: register [done]:  http://10.34.165.8:0/hello/
---------
Opening the app on the TiVo gives:

Code:
---------
Can't Run

An error occured while running the application.  HTTP failure (Http connection error: 0x50005).
---------
(BTW, someone at TiVo can't spell occurred.)

Any suggestions?

Or is it possible for an app to invoke a HD mode using 1.4?]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>Tried to run helloworld from 1.4.1 and get the following messages:<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">charon samples # java -classpath ../hme-host-sample.jar:samples.jar com.tivo.hme.host.sample.Main com.tivo.hme.samples.hello.HelloWorld<br />
Instance ID = 1171eb716232c408<br />
hme-host-sample version: 1.4.1 threadsafe-experimental<br />
debug: Loaded factory: com.tivo.hme.samples.hello.HelloWorld<br />
debug: Class loader for com.tivo.hme.samples.hello.HelloWorld: sun.misc.Launcher$AppClassLoader<br />
debug: Context class loader: sun.misc.Launcher$AppClassLoader<br />
added factory<br />
MDNS ADD: http://10.34.165.8:0/hello/<br />
Contacting mDNS localhost daemon at 127.0.0.1:5354<br />
Connection to mDNS localhost daemon failed: java.net.ConnectException: Connection refused<br />
mDNS localhost daemon: service not found.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &gt; java.net.ConnectException: Connection refused<br />
jmdns library: register [start]: http://10.34.165.8:0/hello/<br />
jmdns library: register [done]:&nbsp; http://10.34.165.8:0/hello/</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->Opening the app on the TiVo gives:<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Can't Run<br />
<br />
An error occured while running the application.&nbsp; HTTP failure (Http connection error: 0x50005).</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->(BTW, someone at TiVo can't spell occurred.)<br />
<br />
Any suggestions?<br />
<br />
Or is it possible for an app to invoke a HD mode using 1.4?</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://www.tivocommunity.com/tivo-vb/forumdisplay.php?f=42">HME Developers Corner</category>
			<dc:creator>toups</dc:creator>
			<guid isPermaLink="true">http://www.tivocommunity.com/tivo-vb/showthread.php?t=436344</guid>
		</item>
		<item>
			<title>tivo web browser app</title>
			<link>http://www.tivocommunity.com/tivo-vb/showthread.php?t=436036&amp;goto=newpost</link>
			<pubDate>Tue, 27 Oct 2009 02:49:58 GMT</pubDate>
			<description>I ran across this the other day.  

https://tivo-www.dev.java.net/

Interesting concept.  Anyone ever look at this?

Thanks</description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>I ran across this the other day.  <br />
<br />
<a href="https://tivo-www.dev.java.net/" target="_blank">https://tivo-www.dev.java.net/</a><br />
<br />
Interesting concept.  Anyone ever look at this?<br />
<br />
Thanks</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://www.tivocommunity.com/tivo-vb/forumdisplay.php?f=42">HME Developers Corner</category>
			<dc:creator>toups</dc:creator>
			<guid isPermaLink="true">http://www.tivocommunity.com/tivo-vb/showthread.php?t=436036</guid>
		</item>
		<item>
			<title><![CDATA[Streaming "NowPlaying" with embedded Apps (download)]]></title>
			<link>http://www.tivocommunity.com/tivo-vb/showthread.php?t=436026&amp;goto=newpost</link>
			<pubDate>Tue, 27 Oct 2009 00:56:48 GMT</pubDate>
			<description><![CDATA[So, here's the new version of my "NowPlaying" toy app.
http://David.Blackledge.com/tivo/NowPlayingv2.zip
It can run with its own .bat file, and also includes instructions for installing under Galleon.  If you run Galleon be sure to follow those instructions or shut down Galleon before running this...they may not get along very well (or maybe it doesn't matter because they're running different apps...I forget)

Old existing functionality: 
*  Vaguely simulate the NowPlaying screen using content served directly from the TiVo, allow you to play videos via Video Streaming (doesn't work well with HD content unless you have a really fast network).


Added functionality:
*  Using Zeroconf (JmDNS) find all TiVo HMO Video Sources (i.e. all TiVos plus other Video servers you might be running e.g. Galleon's GoBack) so you can choose which source to get a NowPlaying list from (not just the current TiVo)
*  Supports "Play Folder" feature if you hit "play" with a folder selected... when one stream finishes, the next is started up.
*  *While playing, open the info box ("info" or "right") and along with the program information there are three new "buttons" that allow you to run another application while playing a video*
  *  application list button (with icon where available) use up/down to select different applications, select to run the application - list of application is also gotten from ZeroConf functionality.
  *  application size/location choice (abreviated e.g. default is "B/R" for bottom/right corner at 1/2 size, other options include center, 3/4 size, and Full Screen)
  *  application transparency choice (0% (default), 25%, 50%, 75%)

The application will start up, shrunk/positioned as requested and will take all remote control input until the application is "exited" 
(upon Exit it will only be deactivated and hidden, so if it is playing e.g. an mp3, you'll still hear it until you start another application up)

This is the "application as a stream" functionality mentioned in the documentation.  The Java SDK has a bug that prevents it from working (fix is on the Wiki).  Witht his feature, all running applications continue to run, but only the active application receives Remote Control input.  When a secondary application is activated, the primary one gets an "active=false" event, then when the secondary application is quit, the primary one gets an "active=true" event... the secondary application doesn't do anything other than what the programmer made it do on an inactivation or when the user selected the application-quitting option (perhaps it cleans up resources, perhaps it just sits there and keeps running).

_Bonus:_ Run a video-streaming application in a non-full-screen mode while viewing a video and stream a second video ... (e.g. select the "Video" app that comes with this) 
Voila! Scaled-down video!  It immediately steals the video-viewing port and the application scaling also scales down the video viewing port somehow... Careful, though.  It immediately switches the CURRENT video stream to the shrunken port... the fact that it is now trying to stream ANOTHER video could cause you trouble...so I recommend quitting shortly after you start this and see the effect... I think it just pauses until the first/parent video stream is done, though.
The point is, if you open a Video stream resource in a streamed application (maybe even if you just open it in a simpler circumstance, I'm not sure) it will steal the port and apply an scaling, even if that resource is not really valid, so you could purposely open a bogus one to force the video to be small for the moment.  (or just make that 2nd application your primary video-runner)

I'll put up a Java quick tutorial for JmDNS to supplement the (not so useful) Rendezvous one on the Wiki as soon as I get a chance.

Enjoy ;]]]></description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>So, here's the new version of my &quot;NowPlaying&quot; toy app.<br />
<a href="http://David.Blackledge.com/tivo/NowPlayingv2.zip" target="_blank">http://David.Blackledge.com/tivo/NowPlayingv2.zip</a><br />
It can run with its own .bat file, and also includes instructions for installing under Galleon.  If you run Galleon be sure to follow those instructions or shut down Galleon before running this...they may not get along very well (or maybe it doesn't matter because they're running different apps...I forget)<br />
<br />
Old existing functionality: <ul><li> Vaguely simulate the NowPlaying screen using content served directly from the TiVo, allow you to play videos via Video Streaming (doesn't work well with HD content unless you have a really fast network).</li>
</ul><br />
Added functionality:<ul><li> Using Zeroconf (JmDNS) find all TiVo HMO Video Sources (i.e. all TiVos plus other Video servers you might be running e.g. Galleon's GoBack) so you can choose which source to get a NowPlaying list from (not just the current TiVo)</li>
<li> Supports &quot;Play Folder&quot; feature if you hit &quot;play&quot; with a folder selected... when one stream finishes, the next is started up.</li>
<li> <b>While playing, open the info box (&quot;info&quot; or &quot;right&quot;) and along with the program information there are three new &quot;buttons&quot; that allow you to run another application while playing a video</b><ul><li> application list button (with icon where available) use up/down to select different applications, select to run the application - list of application is also gotten from ZeroConf functionality.</li>
<li> application size/location choice (abreviated e.g. default is &quot;B/R&quot; for bottom/right corner at 1/2 size, other options include center, 3/4 size, and Full Screen)</li>
<li> application transparency choice (0% (default), 25%, 50%, 75%)</li>
</ul></li>
</ul>The application will start up, shrunk/positioned as requested and will take all remote control input until the application is &quot;exited&quot; <br />
(upon Exit it will only be deactivated and hidden, so if it is playing e.g. an mp3, you'll still hear it until you start another application up)<br />
<br />
This is the &quot;application as a stream&quot; functionality mentioned in the documentation.  The Java SDK has a bug that prevents it from working (fix is on the Wiki).  Witht his feature, all running applications continue to run, but only the active application receives Remote Control input.  When a secondary application is activated, the primary one gets an &quot;active=false&quot; event, then when the secondary application is quit, the primary one gets an &quot;active=true&quot; event... the secondary application doesn't do anything other than what the programmer made it do on an inactivation or when the user selected the application-quitting option (perhaps it cleans up resources, perhaps it just sits there and keeps running).<br />
<br />
<u>Bonus:</u> Run a video-streaming application in a non-full-screen mode while viewing a video and stream a second video ... (e.g. select the &quot;Video&quot; app that comes with this) <br />
Voila! Scaled-down video!  It immediately steals the video-viewing port and the application scaling also scales down the video viewing port somehow... Careful, though.  It immediately switches the CURRENT video stream to the shrunken port... the fact that it is now trying to stream ANOTHER video could cause you trouble...so I recommend quitting shortly after you start this and see the effect... I think it just pauses until the first/parent video stream is done, though.<br />
The point is, if you open a Video stream resource in a streamed application (maybe even if you just open it in a simpler circumstance, I'm not sure) it will steal the port and apply an scaling, even if that resource is not really valid, so you could purposely open a bogus one to force the video to be small for the moment.  (or just make that 2nd application your primary video-runner)<br />
<br />
I'll put up a Java quick tutorial for JmDNS to supplement the (not so useful) Rendezvous one on the Wiki as soon as I get a chance.<br />
<br />
Enjoy ;]</div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="http://www.tivocommunity.com/tivo-vb/forumdisplay.php?f=42">HME Developers Corner</category>
			<dc:creator>davidblackledge</dc:creator>
			<guid isPermaLink="true">http://www.tivocommunity.com/tivo-vb/showthread.php?t=436026</guid>
		</item>
	</channel>
</rss>
