NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 15 16 17 18 19 … 93 Next »
Plugin Additions and notes

 
  • 0 Vote(s) - 0 Average
Plugin Additions and notes
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#11
2011-05-08, 10:58 PM
lol Big Grin
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#12
2011-05-09, 07:37 AM
lol @ the screenshot.

That looks like a donation plugin Big Grin
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#13
2011-05-14, 02:04 AM
sub Wrote:I'm not sure on this one. I'll have to check.

I'm bumping this with some research. If you are wrapping around Microsoft.DirectX.AudioVideoPlayback it does have a Paused state http://msdn.microsoft.com/en-us/library/...s.85).aspx

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#14
2011-05-14, 02:24 AM
Behind there scenes the app know if it is paused or not, the problem is that this info isnt current exposed via the API. I can add it, but I'll need to do it closer to the next release, because changes to these types of things typically break my ability to do patches.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#15
2011-05-14, 02:53 AM
Ok thanks, I realized after I posted that the dx stuff wouldn't help me since I need state for the NMT.

Related to play state I have a multimedia keyboard and for some reason NPVR sends both Ctrl-O and MediaPlayPause to the OnKey Event when I hit the play/pause button.

Martin
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#16
2011-05-20, 10:00 AM
sub Wrote:If your needed to change the button list, you could probably do something like:

Code:
uiButtonStrip.Dispose();
uiButtonStrip = new UiButtonStrip("ButtonList", yourButtonList, this, new HashTable(), skinHelper);

One side effect of this approach, is that it resets the selected button to the first. Which is fine in itself, except there is no way (well, at least no way that I've found) to select a particular button in code. Sure, maybe I could send it multiple OnKeyDowns to get back to the correct index, but ewwww.

Sooo -- any chance of a .setSelectedCaption( String ) (or whatever)? Or if I've just missed how it's supposed to be done, hitting me on the head with that would be great too!

Thanks once again.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#17
2011-05-22, 10:48 PM (This post was last modified: 2011-05-22, 11:39 PM by mvallevand.)
Sub, earlier in this thread I asked for a way to block the screen saver popup and you said that would be coming. What about when I don't want to block it but I don't want to process screen update by returning false to NeedsRendering() ?

If I remember correctly in GBPVR plugins I could flag on Deactivate() but the screen saver popup doesn't cause a Deactivate. Would the following be a correct line in NeedsRendering() if I am not worried about rendering behind my own popups.

Code:
if (PluginHelperFactory.GetPluginHelper().GetActivePopup()!= null) return false

I did try it and it does work but I am surprised how often it gets called. Is there something I need to do to stop this from blocking updates in Screen Saver mode if 10ms

Code:
212.99275208    [6304] FixedImage     
213.00274658    [6304] FixedImage     
213.01274109    [6304] FixedImage     
213.02285767    [6304] FixedImage     
213.03279114    [6304] FixedImage     
213.04273987    [6304] FixedImage     
213.05273438    [6304] FixedImage     
213.06275940    [6304] FixedImage     
213.07276917    [6304] FixedImage     
213.08277893    [6304] FixedImage     
213.09378052    [6304] FixedImage     
213.10284424    [6304] FixedImage     
213.20611572    [6304] FixedImage     
213.21319580    [6304] FixedImage     
213.21813965    [6304] FixedImage     
213.22692871    [6304] FixedImage     
213.23684692    [6304] FixedImage     
213.24679565    [6304] FixedImage     
213.25682068    [6304] FixedImage     
213.26678467    [6304] FixedImage     
213.27679443    [6304] FixedImage     
213.28675842    [6304] FixedImage     
213.29682922    [6304] FixedImage     
213.30685425    [6304] FixedImage     
213.31684875    [6304] FixedImage     
213.32687378    [6304] FixedImage     
213.33679199    [6304] FixedImage     
213.34683228    [6304] FixedImage     
213.35690308    [6304] FixedImage     
213.36677551    [6304] FixedImage     
213.37681580    [6304] FixedImage     
213.38677979    [6304] FixedImage     
213.39675903    [6304] FixedImage     
213.40678406    [6304] FixedImage     
213.41682434    [6304] FixedImage     
213.42678833    [6304] FixedImage     
213.43676758    [6304] FixedImage     
213.44677734    [6304] FixedImage     
213.45687866    [6304] FixedImage     
213.46687317    [6304] FixedImage     
213.47680664    [6304] FixedImage     
213.48684692    [6304] FixedImage     
213.49682617    [6304] FixedImage     
213.50679016    [6304] FixedImage     
213.51689148    [6304] FixedImage     
213.52684021    [6304] FixedImage     
213.53688049    [6304] FixedImage     
213.54682922    [6304] FixedImage     
213.55685425    [6304] FixedImage     
213.56694031    [6304] FixedImage     
213.57162476    [6304] FixedImage     
213.58093262    [6304] FixedImage     
213.59080505    [6304] FixedImage     
213.60079956    [6304] FixedImage     
213.70635986    [6304] FixedImage     
213.71380615    [6304] FixedImage     
213.71984863    [6304] FixedImage     
213.72990417    [6304] FixedImage     
213.73980713    [6304] FixedImage     
213.74978638    [6304] FixedImage     
213.75985718    [6304] FixedImage     
213.76980591    [6304] FixedImage     
213.77980042    [6304] FixedImage     
213.78977966    [6304] FixedImage     
213.79983521    [6304] FixedImage     
213.80982971    [6304] FixedImage     
213.81983948    [6304] FixedImage     
213.82986450    [6304] FixedImage     
213.83987427    [6304] FixedImage     
213.84985352    [6304] FixedImage     
213.85992432    [6304] FixedImage     
213.86988831    [6304] FixedImage     
213.87989807    [6304] FixedImage     
213.88987732    [6304] FixedImage     
213.89979553    [6304] FixedImage     
213.90992737    [6304] FixedImage     
213.91983032    [6304] FixedImage     
213.92979431    [6304] FixedImage     
213.93980408    [6304] FixedImage     
213.94979858    [6304] FixedImage     
213.95983887    [6304] FixedImage     
213.96986389    [6304] FixedImage     
213.97984314    [6304] FixedImage     
213.98992920    [6304] FixedImage     
213.99986267    [6304] FixedImage     
214.00996399    [6304] FixedImage

Edit: I thought I'd add some more info. This loops is very CPU intensive NPVR runs at 5-12% CPU doing nothing. In my loop I added a System.Windows.Forms.Application.DoEvents(); and CPU goes to 0-1%. Are you missing some form of yield while the Screen Saver is active?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#18
2011-05-23, 01:07 AM
mvallevand Wrote:Sub, earlier in this thread I asked for a way to block the screen saver popup and you said that would be coming. What about when I don't want to block it but I don't want to process screen update by returning false to NeedsRendering() ?

If I remember correctly in GBPVR plugins I could flag on Deactivate() but the screen saver popup doesn't cause a Deactivate. Would the following be a correct line in NeedsRendering() if I am not worried about rendering behind my own popups.

Code:
if (PluginHelperFactory.GetPluginHelper().GetActivePopup()!= null) return false
Sorry, I dont follow the question. What do you mean exactly?

Quote:I did try it and it does work but I am surprised how often it gets called. Is there something I need to do to stop this from blocking updates in Screen Saver mode if 10ms

Code:
212.99275208    [6304] FixedImage     
213.00274658    [6304] FixedImage     
213.01274109    [6304] FixedImage     
213.02285767    [6304] FixedImage     
213.03279114    [6304] FixedImage     
213.04273987    [6304] FixedImage

Edit: I thought I'd add some more info. This loops is very CPU intensive NPVR runs at 5-12% CPU doing nothing. In my loop I added a System.Windows.Forms.Application.DoEvents(); and CPU goes to 0-1%. Are you missing some form of yield while the Screen Saver is active?
For the most part, Direct3D apps work this way, and go flat out while any animations are occurring, like when animating between photos. The CPU usage should drop down to near zero when the animations are complete though.

The app only yields the CPU when NeedsRendering() returns false, so its possible there is a bug in that screen saver (or the screen underneath it) which is causing NeedsRendering to return true.

Does this high CPU usage vary depending on the screen you were on when the screen saver started?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#19
2011-05-23, 01:50 AM
In my upcoming MusicBox plugin when music plays there is a counter showing seconds elapsed similar to the one you have on the playlist screen but it is on a main screen not popup so it stays active when the screen saver starts.

A simplified version of my NeedsRendering() follows. I found as soon as the screen saver comes on this NeedsRendering gets called every 10ms which I why I was hoping for a test to see if the screen saver was active.

Code:
public override bool NeedsRendering()
        {
            bool nr = base.NeedsRendering();
            if (PluginHelperFactory.GetPluginHelper().GetActivePopup() != null)
            {
                // I see this evey 10ms so yield to Windows
                System.Windows.Forms.Application.DoEvents();
                return false;
            }
            if (isActivated == true) // can be called before activated.
            {
                if (DateTime.Now.CompareTo(lastUpdate.AddSeconds(1)) >= 1 || lastUpdate.Equals(new DateTime(1980, 1, 1)))
                {
                    nr = true;
                }
            }
            return nr;
        }

Also if I don't have this I find the NMT is spammed, while the screen saver is active, with it I only get one screen update every move of the fixed image.

Martin
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#20
2011-05-23, 03:15 AM (This post was last modified: 2011-05-23, 03:31 AM by Ommina.)
I'm not sure if this will help, hinder, or is even relevant, but I find that, using the photo screen saver, CPU usage drops between image changes for the first half dozen or so transitions, then it stays around 60%. I don't something unique to the images, as even if I put in a single jpg, it will still behave find for the first n changes, then back to 60%.

If I'm running from within VS while doing so, I get a A first chance exception of type 'System.NullReferenceException' occurred in NextPVR.exe in Debug for each transition.

It's usually five transitions before the CPU increases, but not always. I've not been able to find what makes the difference.

Yes I have. It happens when the minute changes.

(And, again, sorry if this isn't relevant to the topic at hand.)
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,735 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,296 2020-11-14, 08:01 PM
Last Post: sub
  VIdeo playback from plugin mvallevand 5 3,421 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,861 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,737 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,028 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,932 2013-03-12, 06:48 AM
Last Post: psycik
  Plugin problems with started from the command line mvallevand 11 4,931 2012-08-12, 07:56 PM
Last Post: sub
  Get NextPVR data directory from outside a plugin McBainUK 3 2,213 2012-02-11, 05:42 PM
Last Post: mvallevand
  Weather Plugin imilne 0 1,406 2012-01-15, 08:33 PM
Last Post: imilne

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

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

Linear Mode
Threaded Mode