NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 87 88 89 90 91 … 93 Next »
Any help on Event Notification?

 
  • 0 Vote(s) - 0 Average
Any help on Event Notification?
joshley
Offline

Member

Posts: 146
Threads: 40
Joined: Jul 2004
#1
2004-09-29, 11:39 AM
Hello!
I seem to be missing something here - how exactly do you utilise Event Notification in C#?? Perhaps a small example of how to check CurrentAudioTrack?
Cheers all
joshley
Tobias
Offline

Junior Member

Posts: 37
Threads: 5
Joined: Sep 2004
#2
2004-09-29, 04:26 PM
You can find most of the features available from subs PluginHelper class by examing the source code in for instance "Jukebox" and "Comics"...

In my upcoming plugin I have a method that gets the current song playing. Pasting a part of it here:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
...
PlayList = PluginHelperFactory.getPluginHelper().GetAudioPlayList(out currentIndex, out trackDuration, out playbackPosition);

if ( PlayList != null )
{
string trackNameNow = (string)PlayList[currentIndex];
...
[/QUOTE]

Here I use the GetAudioPlaylist to get the current file playing and if I dont recieve null (no playlist active) I set the string &quot;trackNameNow&quot; with the filename from &quot;currentIndex&quot;.

But my best recommendation when it comes to music handling is to check out the Jukebox plugin. Almost everything that can be done with the audio classes ni GBPVR is found there.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#3
2004-09-29, 04:51 PM
If you plugin implements the IEventNotification interface, then the notify() method on you class will be called when the audio or video track changes.
joshley
Offline

Member

Posts: 146
Threads: 40
Joined: Jul 2004
#4
2004-09-29, 11:17 PM
ARG!!!!
Thanks for the replies people!
My temporary lack of complete stupidity resolved the problem...
I couldn't for the life of me get it to work, I thought I'd completely forgotten how to program - I'd just forgotten to declare darn (Notify()) method public. It's ALWAYS something annoyingly little that you miss, isn't it? I thought I'd gone completely mad!
Sorry about that. Ignore my post completely now.
joshley
Offline

Member

Posts: 146
Threads: 40
Joined: Jul 2004
#5
2004-09-30, 08:22 PM
Ok... Event Notification is all ok, but I can't figure out how to simulate keypresses (to call hotkey set up in graphics card settings)/manually shut down/restart the extended desktop. I've tried using SendKeys, but it only applies to the active Window, not to the System. If anyone has any alternatives to SendKeys, or knows the relevant System.Windows.Forms.Control for the desktop, or how to set it up, please advise!
joshley

N.B. Using C#!
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording Event jrockow 10 4,762 2014-07-28, 02:51 PM
Last Post: jrockow
  Event codes mvallevand 10 3,917 2011-04-06, 04:26 AM
Last Post: mvallevand
  "Rating" in cached event details xml alibert 74 17,972 2011-03-28, 01:06 AM
Last Post: zehd
  STARTUP_COMPLETE event on NMT alibert 6 2,525 2011-02-12, 05:15 PM
Last Post: sub
  NPVR - temporary solution to lack of searchable fields after event is gone from guide carpeVideo 5 2,346 2010-09-29, 03:08 AM
Last Post: mvallevand
  Plugin notification of stopped media mvallevand 7 2,402 2009-08-19, 11:16 PM
Last Post: mvallevand
  How do I catch the event where a list item is selected? mkenyon2 3 1,520 2009-01-06, 06:36 PM
Last Post: sub
  Csharp Event help needed.. psycik 4 2,153 2008-05-25, 06:19 AM
Last Post: psycik
  Question about the new EPGUpdate event Jeff 1 1,328 2008-03-27, 04:15 PM
Last Post: sub
  Forcing a Recording event to status 5 or 6 zehd 1 1,563 2008-03-25, 01:50 AM
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