NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 20 21 22 23 24 … 93 Next »
WizTools - 1.x Plugin Development Toolkit

 
  • 0 Vote(s) - 0 Average
WizTools - 1.x Plugin Development Toolkit
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#111
2008-01-02, 12:31 PM
JavaWiz Wrote:I've added a method to WizControlManager - UpdateControl(AWizUiControl control).

Place the WizUiHelper.DLL in common, and the WizUiHelperPlugin.DLL in the WizUiHelper plugin directory.

You seem to have updated the plugin and it know longer works with the old skin, can you pass on the new skin.

Log shows this:

Cannot locate placementName: SystemDateTime in skin. --->

Cheers
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#112
2008-01-02, 02:19 PM
idkpmiller Wrote:You seem to have updated the plugin and it know longer works with the old skin, can you pass on the new skin.

Log shows this:

Cannot locate placementName: SystemDateTime in skin. --->

Cheers
Here is the complete source (w/skins). You may have to use the ..._2005.sln (or .csproj) to open as I have upgraded to VS Express 2008.
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#113
2008-01-02, 04:14 PM
idkpmiller Wrote:One other thing I have noticed that the text in the listbox is stretched if I change the size of the listbox, I was expecting that changing the size (wider) would mean I get more characters on screen not for the text to stretch.
Paul
This is basically a skinning question.

I've muddled thru the skins so far, but by no means fully understand all the details. Could you post an example of the skin elements you are working with and maybe we can figure out how to achieve what you are after.
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#114
2008-01-02, 05:43 PM
JavaWiz Wrote:Here is the complete source (w/skins). You may have to use the ..._2005.sln (or .csproj) to open as I have upgraded to VS Express 2008.


Any issues with the upgrade? Project files convert over ok?
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#115
2008-01-02, 06:26 PM
pastro Wrote:Any issues with the upgrade? Project files convert over ok?
I found no problems: http://forums.nextpvr.com/showthread.php?t=31959
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#116
2008-01-03, 07:19 AM
I'm not sure if this is a question for sub or JW, so I'm going to start here since I'm using JW's developer tools.

Over the course of the plug-in, I (may) load several graphics, depending on what the user does. Presumably, these are cached for later use. That is, memory climbs but doesn't seem to fall back down.

However, given the recent threads on memory leaks, I'd like to ensure that I'm seeing expected behaviour.

I guess it could simply be memory being used, then .NET not giving it back because it can't be bothered to do so until poked by the OS. I'm fine with that.

OR, the images are being cached for reuse. I'm fine with that too, although I'd like to be able to expire them if possible.

OR, I'm not disposing something correctly. I'm not as fine with that. I'm not really doing anything magical, just returning an Image.FromFile() in the GetImage callback. The filename used, of course, changing depending on what picture I want to display.

I'm not disposing anything, but then, I don't have much for opportunities TO dispose anything. I can't very well destroy the image object that I just created for GetImage, and the pretty much is all there is for interesting objects.

I saw a mention in another thread that things needed to be handled differently in popups. Do the developer tools insulate me from that? Is there something for which I should be watching?

I don't want a greedy plug-in after all!
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#117
2008-01-03, 07:29 AM
Quote:I'm not really doing anything magical, just returning an Image.FromFile() in the GetImage callback. The filename used, of course, changing depending on what picture I want to display.
The SkinHelper2.GetImageCallback() callback is called when something calls SkinHelper2.GetImage() to draw a composite image (for example the UIList object when it draws each item in the list).

Whether you get a leak depends on what is done with that image that is returned from SkinHelper2.GetImage(). If you're just using GB-PVR's built in UIList, UISimpleList, UIButton etc then it takes care of all the memory management for you, so should be possible get any leaks. Is it these components that is calling SkinHelper2.GetImage(), or is something else calling this?
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#118
2008-01-03, 04:46 PM
I have a queston along those lines. I have a "Poster" placement rectangle in my skin that displays a thumbnail for the selected item. In GetRenderList(), I check for the existence of the thumbnail and if it exists, I then display it with:
Code:
GBPVRUiElement posterElement = new GBPVRUiElement("poster", skinHelper.getPlacementRect("Poster"), Image.FromFile(smPoster.FullName));
renderList.Add(posterElement);
I notice that mymemory usage keeps climbing with each additional image I load. Will the memory management in this case be handled by GB-PVR or is there something I need to do? Or is there a better way I should be using?
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#119
2008-01-03, 04:58 PM
sub Wrote:The SkinHelper2.GetImageCallback() callback is called when something calls SkinHelper2.GetImage() to draw a composite image (for example the UIList object when it draws each item in the list).

Whether you get a leak depends on what is done with that image that is returned from SkinHelper2.GetImage(). If you're just using GB-PVR's built in UIList, UISimpleList, UIButton etc then it takes care of all the memory management for you, so should be possible get any leaks. Is it these components that is calling SkinHelper2.GetImage(), or is something else calling this?

WizUi objects utilize pretty much the same method that subs base UI objects use. They are all subclassed from AWizUiControl which imposes the IDisposable interface.
  • WizUiButton - is basically a UIButton, with extensions.
  • WizUiButtonList - an arrayList of WizUiButtons
  • WizUiList - very similar to UIList. Provides it's own Dispose() method, and caches up to 40 images.
  • WizUiLabel - Basically a GBPVRUiElement, Provides it's own Dispose() method
  • WizUiText - Provides it's own Dispose() method.
Each of the controls Dispose method roughly does the following:
  • Create a disposeList ArrayList
  • For each GBPVRUiElement that makes up the control (or is cached in the case of the list)
    • Call element.image.Dispose()
    • Add element to disposeList
  • Call PluginHelperFactory.getPluginHelper().DisposeResources(disposeList);
  • Set each GBPVRUiElement variable to null
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#120
2008-01-03, 07:33 PM
whurlston Wrote:I have a queston along those lines. I have a "Poster" placement rectangle in my skin that displays a thumbnail for the selected item. In GetRenderList(), I check for the existence of the thumbnail and if it exists, I then display it with:
Code:
GBPVRUiElement posterElement = new GBPVRUiElement("poster", skinHelper.getPlacementRect("Poster"), Image.FromFile(smPoster.FullName));
renderList.Add(posterElement);
I notice that mymemory usage keeps climbing with each additional image I load. Will the memory management in this case be handled by GB-PVR or is there something I need to do? Or is there a better way I should be using?
If you're dealing with these lower level GBPVRUiElement elements, then you do need to be careful to make sure you dont leak memory. In this case, I would have made the 'GBPVRUiElement posterElement' a private member variable rather than something allocated in GetRenderList(). You can then conditionally add it to the render list if it is supposed to be visible. If you have to reload it with a different picture, dont allocate a new one - instead just do a 'posterElement.image = Image.FromFile(smPoster.FullName);' and a 'posterElement.forceRefresh = true;'. This way it'll automatically release video texture memory associated with the old image.

There was also some higher level components that can be used for showing an image instead of having to use the GBPVRUiElement objects, namely the UiStatic object. Again this would be allocated as a member variable, and just have its values updated when something needs to be changed (rather than allocating a new one all the time).
« Next Oldest | Next Newest »

Users browsing this thread: 3 Guest(s)

Pages (31): « Previous 1 … 10 11 12 13 14 … 31 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 3,098 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,567 2020-11-14, 08:01 PM
Last Post: sub
  Test/Development environment for npvr.db3 scJohn 10 4,602 2020-09-04, 09:14 PM
Last Post: scJohn
  VIdeo playback from plugin mvallevand 5 3,649 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 3,014 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,885 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,335 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 2,030 2013-03-12, 06:48 AM
Last Post: psycik
  Integrated Development Environment (IDE) for plugins osx-addict 5 2,868 2012-10-18, 08:35 PM
Last Post: osx-addict
  Plugin problems with started from the command line mvallevand 11 5,262 2012-08-12, 07:56 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode