NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 8 9 10 11 12 … 93 Next »
UiStatic vs UiElement?

 
  • 0 Vote(s) - 0 Average
UiStatic vs UiElement?
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#1
2012-12-23, 04:12 PM
Can anyone explain what the difference is between them and when I should be favouring one other the other?

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2012-12-23, 04:36 PM
UiElement is much lower level. It's probably best to avoid using this directly if you can.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#3
2012-12-23, 04:56 PM
That's all I needed to hear Big Grin

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#4
2012-12-23, 07:38 PM
As a (kind of) follow up to this question, the reason I was asking is because I'm building an IScreenPlugin that needs to display information over playing video (including Live TV). I'm activating it in response to a keypress with:

Code:
PluginHelperFactory.GetPluginHelper().ActivateScreen(...)

This works, but only after the initial MetaData overlay (the Alt+B one) has disappeared. No amount of keypressing activates it before that (in fact I think it only keeps the MetaData on screen even longer). Once there are no overlays, then mine will respond and appear. If the MetaData one is brought back, mine can override it straight away if desired.

I was just wondering if there was a reason for this behaviour - and if so, that's fine - or if I'm perhaps doing something wrong?

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#5
2012-12-23, 07:40 PM
Oh, and as a follow up to the follow up, if I activate my plugin while the Now/Next details screen is visible, then NPVR throws a NotImplementedException when it tries to deactivate it.

Code:
System.NotImplementedException: The method or operation is not implemented.
   at NextPVR.Players.NowNextPlugin.Deactivate()
   at NextPVR.Players.BasePlayer.ActivateOSDPlugin(IScreenPlugin plugin)
   at NextPVR.ControllerForm.ActivateScreen(IScreenPlugin screenPlugin)
   at MediaInfoPlugin.MediaInfoPlugin.Notify(String eventName, Object eventArg) in E:\Documents\Documents\Programming\NPVR\MediaInfo\src\MediaInfo.cs:line 87
   at NUtility.EventBus.Notify(String eventName, Object eventArg)
   at NextPVR.ControllerForm.OnKeyDown(Object sender, KeyEventArgs e)
   at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at NextPVR.ControllerForm.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#6
2012-12-23, 07:45 PM
imilne Wrote:Oh, and as a follow up to the follow up, if I activate my plugin while the Now/Next details screen is visible, then NPVR throws a NotImplementedException when it tries to deactivate it.
Ok, I've fixed this for the next release.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#7
2012-12-23, 07:48 PM
imilne Wrote:As a (kind of) follow up to this question, the reason I was asking is because I'm building an IScreenPlugin that needs to display information over playing video (including Live TV). I'm activating it in response to a keypress with:

Code:
PluginHelperFactory.GetPluginHelper().ActivateScreen(...)

This works, but only after the initial MetaData overlay (the Alt+B one) has disappeared. No amount of keypressing activates it before that (in fact I think it only keeps the MetaData on screen even longer). Once there are no overlays, then mine will respond and appear. If the MetaData one is brought back, mine can override it straight away if desired.

I was just wondering if there was a reason for this behaviour - and if so, that's fine - or if I'm perhaps doing something wrong?

Iain
The built in metadata overlay does work differently to other OSD overlays, so it might not be possible to override it. It wasn't intentional, but not something I've tested.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#8
2012-12-23, 08:03 PM
Thanks sub.

I'll set OSDTimeoutInfo in config.xml to a really low value while testing it, as it's amazing how long 4 seconds is when you're waiting to test something (over and over and over...) Big Grin

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#9
2012-12-24, 02:31 PM (This post was last modified: 2012-12-24, 03:01 PM by imilne.)
Sub, I see that the API has IPluginHelper.SetPlayerMetaData(Hashtable) - would it be possible to add a GetPlayerMetaData so that any active details can be read back by another plugin?

I'd like to be able to get the title, poster, channel logo, etc of whatever is playing.

Edit: actually, on second thought the poster might not be possible because it's often a reference to an image callback isn't it?

Thanks

Iain
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  UiElement class tmrt 1 1,320 2010-10-05, 05:09 PM
Last Post: sub
  Problem using UIStatic philcooling 13 4,322 2010-02-12, 06:34 PM
Last Post: whurlston
  Drawing UiStatic mvallevand 4 2,196 2009-09-02, 10:06 PM
Last Post: mvallevand
  UIStatic update idkpmiller 3 1,866 2008-01-10, 02:35 AM
Last Post: idkpmiller
  UIStatic issue idkpmiller 8 5,116 2008-01-08, 05:01 PM
Last Post: whurlston
  Save a UiStatic out as a jpg McBainUK 4 1,807 2007-11-16, 03:23 PM
Last Post: McBainUK

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

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

Linear Mode
Threaded Mode