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 »
NPVR IVideoPlugin

 
  • 0 Vote(s) - 0 Average
NPVR IVideoPlugin
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#11
2010-11-07, 07:09 PM
Sorry, no change.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#12
2010-11-07, 07:18 PM
mmm, are you sure? This is what I did to test that change, and it shows up ok.

PluginHelperFactory.GetPluginHelper().ActivateScreen(new TVGuide());

Is video definitely playing at time you called the API? ie, what are you using to trigger it?
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#13
2010-11-07, 07:31 PM
Sorry, there was a bug in my NeedsRendering method causing it to always return false. It shows now, only with the new NextPVR.exe though. Thanks.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#14
2010-11-07, 07:33 PM
OK - good.
InVermont
Offline

Member

Posts: 157
Threads: 10
Joined: Mar 2007
#15
2011-03-03, 05:44 PM
I have a plugin that registers with the EventBus and can, at a keystroke, put an On Screen Display over running video. Mostly just poking around at this point. A few things though.
First, do I call ActivateScreen(null) to remove my OSD? It works, but that doesn’t mean it is correct.

Second, is there a comparable… ‘super surface’ over the rest of NPVR? Could I show a message as an OSD atop other plugins/main menu? ActivateScreen takes me to my plugin, not overlaying the currently active screen.

Third is an error I’m getting. When NPVR is in windowed mode, video playing and my OSD is showing, if I click the [X] Close button I get
System.InvalidCastException: Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'System.Drawing.Font'.

I can’t seem to figure out how to catch the fact that NPVR is closing and remove my OSD before the error.
From my perspective, I hit the [X] and get nothing in IEventNotification.Notify, but my plugins deactivate method is called. I’ve put ActivateScreen(null) in deactivate, and my OSD does go away, but not before the error pops up. If my overlay isn’t there and hit Close, I get the expected PLAYBACK_STOPPED and EXITING messages in IEventNotification.Notify.

Thanks
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#16
2011-03-03, 06:26 PM
InVermont Wrote:I have a plugin that registers with the EventBus and can, at a keystroke, put an On Screen Display over running video. Mostly just poking around at this point. A few things though.
First, do I call ActivateScreen(null) to remove my OSD? It works, but that doesn’t mean it is correct.
Yes, that is the correct way to remove it.

Quote:Second, is there a comparable… ‘super surface’ over the rest of NPVR? Could I show a message as an OSD atop other plugins/main menu? ActivateScreen takes me to my plugin, not overlaying the currently active screen.
This overlay functionality is only available over video.

Quote:Third is an error I’m getting. When NPVR is in windowed mode, video playing and my OSD is showing, if I click the [X] Close button I get
System.InvalidCastException: Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'System.Drawing.Font'.
Can you post the stack trace?

Quote:I can’t seem to figure out how to catch the fact that NPVR is closing and remove my OSD before the error.
From my perspective, I hit the [X] and get nothing in IEventNotification.Notify, but my plugins deactivate method is called. I’ve put ActivateScreen(null) in deactivate, and my OSD does go away, but not before the error pops up. If my overlay isn’t there and hit Close, I get the expected PLAYBACK_STOPPED and EXITING messages in IEventNotification.Notify.
Anything that has called EventBus.AddListener() should get the "EXITING" message when the app is about to close.
InVermont
Offline

Member

Posts: 157
Threads: 10
Joined: Mar 2007
#17
2011-03-03, 08:05 PM
Thanks for your quick reply!
sub Wrote:This overlay functionality is only available over video.
Too bad, but understandable.

No need for the trace, I found my error that was causing the crash.
My Dispose was coughing up that exception, which must have brought everything to a standstill.

Again, thanks.
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#18
2011-05-06, 11:52 AM
McBainUK Wrote:I've tried this but it doesn't show the screen over the video. What happens is that once the video has stopped the plugin screen is then visible. Any thoughts?

Sorry for the necro-reply, but has this changed any in the subsequent release?

I'm trying to make it work now, but am coming up with the same results described by McBainUK here: a video but no screen over top.

If I stop the video, the screen is there. I'm getting the logging messages that the IScreen object is being created, right up to the .ActivatePopup(). But, nothing appears. Video is definitely playing, and I'm starting things rolling via PLAYBACK_KEYDOWN (one key to set it, another to clear it). needsRendering is returning true, but only once.

I did try the attached NextPVR replacement, just for giggles, but it's pretty old now and, unsurprisingly, self-destructs pretty early on.

I may very well be missing something (wouldn't be the first time!), so if anybody can offer some assurances that it is working, I'd appreciate it. (The npvr osd with filename and position indicator DOES appear, if that helps.)

Thanks as always.
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#19
2011-05-06, 11:57 AM
It's been a while so I've forgotten the details. Does this help:
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#20
2011-05-06, 12:12 PM (This post was last modified: 2011-05-06, 12:18 PM by Ommina.)
Well, it got me closer, thank you very much! ActivateScreen() not ActivatePopup() (or ActivatePlugin for that matter).

That simple change got it to the point where it flickers onto the video for a frame or so, but I'm almost certain that it is just a matter me not returning true for needsRendering (I note that you are returning true for the duration of the display).

I really should get some sleep... but... must try it! Thank you again!

Edit: Horray! That did it!
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,476 2021-03-11, 03:59 PM
Last Post: mvallevand
  Plugins and NPVR. Where do we start? sub 80 70,204 2020-11-26, 10:02 PM
Last Post: mandai
  Test/Development environment for npvr.db3 scJohn 10 4,583 2020-09-04, 09:14 PM
Last Post: scJohn
  How to extract M3U8 and get matching XMLTV guide data from NPVR almightyj 0 3,552 2018-10-23, 07:24 AM
Last Post: almightyj
  ios app to control npvr ui idea jnbooker15 4 3,721 2015-09-21, 10:19 PM
Last Post: sub
  ios app to control npvr ui idea jnbooker15 0 2,533 2015-09-21, 06:39 PM
Last Post: jnbooker15
  Couple of questions about hacking npvr.db3 drmargarit 6 4,359 2014-09-08, 02:22 AM
Last Post: sub
  high res (256x256+) npvr icon? reven 15 6,055 2013-09-01, 05:13 AM
Last Post: psycik
  trying to fake npvr database for unit tests reven 3 2,313 2013-05-20, 08:53 AM
Last Post: reven
  Multiple genres in npvr.db3 bgowland 5 2,899 2013-04-16, 09:53 PM
Last Post: ACTCMS

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

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

Linear Mode
Threaded Mode