NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) Slimm GB-PVR and GBPVRcli v
« Previous 1 2 3 4 Next »
plugin to show tuner status?

 
  • 0 Vote(s) - 0 Average
plugin to show tuner status?
Wakalaka
Offline

Posting Freak

Posts: 926
Threads: 161
Joined: Jan 2007
#1
2007-02-25, 09:27 PM
I have v1.5.2599.6174 and it's a great app, thanks for the hard work! I was thinking it would be nice to have the tuner status as a plugin, that way I can see what is recording on each tuner from within GB-PVR without having to use my PC to click on the system tray icon.

If you don't have the time, can I have the source that gets tuner status so I can write the plugin? You get credit, of course
NPVR 4.1.0.180302 o Kodi 17.6 o EventGhost 0.5.0.rc4 o SAF 6.3.2 o SchedulesDirect
[SIZE="1"]
Case: Apevia X-Qpack HTPC o Motherboard: Asus P8H67-MLE o CPU: Intel Core i3-2100 o RAM: 8 GB o OS: Win7 64-bit
Tuner: HDHomeRun dual tuner o Leaf SkyHDTV antenna o Remote: Microsoft MCE
Hard drives: Samsung 500 GB SSD, Seagate 2 TB SATA2, Samsung 540 GB SATA2 o Input: Logitech USB keyboard & mouse
Video: ATI Radeon 7750 o Monitor: Viewsonic 27" VX2703MH-LED, LG 55" LCD TV
[/SIZE]
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#2
2007-02-26, 01:26 PM
Wakalaka Wrote:I was thinking it would be nice to have the tuner status as a plugin, that way I can see what is recording on each tuner from within GB-PVR without having to use my PC to click on the system tray icon.

If you don't have the time, can I have the source that gets tuner status so I can write the plugin? You get credit, of course

The Slimm.GBPVR.dll file (it's installed in the gbpvr directory) contains all the GB-PVR related code for this utility. You should be able to add this as a reference to your plugin project.

Note: a lot of the functions are duplicates written for my tray utility that do not require GB-PVR to be running in order to work. Because you are writing a plugin, you can get most of this information directly from inside GB-PVR.

The documentation for the dll is installed into your GBPVR/Documentation start menu under Slimm GBPVR Technical. The function you want is Applications.RecordingService.TunerStatus. It returns an array of strings, one for each tuner in the format "Tuner:Status". The documentation isn't 100% complete but is largely up-to-date. Any questions, just ask.

Here is the source code for that function in C#:
Code:
/// <summary>
      /// Gets the status of the tuners attached to the recording service.
      /// </summary>
      /// <returns>A string array with each element containing the status of a single tuner.</returns>
      public static string[] TunerStatus
      {
        get
        {
          try
          {

            if (ChannelServices.GetChannel("tcpSlimmGBPVR") == null)
            {
              ChannelServices.RegisterChannel(new TcpClientChannel("tcpSlimmGBPVR", null), false);
            }
            IRecordingService recordingService = (IRecordingService)Activator.GetObject(typeof(IRecordingService),
                                                                                        Applications.Config.GetValue("/settings/RecordingServiceLocation"));


            // check status
            return recordingService.getTunerStatus();
          }
          catch (Exception ex)
          {
            return new string[2] { string.Empty, ex.ToString() };
          }
        }
      }

Note: You should use a different TCP channel name to "tcpSlimmGBPVR" and not "tcp". I found I kept getting difficult to reproduce exceptions if I used the channel name "tcp".

Enjoy! Big Grin
[SIZE="1"]Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
See my blog for releases, HD wallpapers, movie, game and anime reviews and more.[/SIZE]
Wakalaka
Offline

Posting Freak

Posts: 926
Threads: 161
Joined: Jan 2007
#3
2007-02-26, 09:56 PM
I was browsing through your documentation and added your dll as a reference to a new C# project. Then I realized that if I write a plugin that requires your dll as a reference, then the plugin will be dependent on your app being installed. I thought some people might not like this, or more likely it creates a scenario that increases the chances of someone screwing up the plugin.

Is the source above code that uses the GBPVR interfaces? Excuse the ignorant questions, I'm just starting to get familiar with GBPVR and writing plugins. Give it a month and I'll be zooming along, I'm a good SW engineer Smile
NPVR 4.1.0.180302 o Kodi 17.6 o EventGhost 0.5.0.rc4 o SAF 6.3.2 o SchedulesDirect
[SIZE="1"]
Case: Apevia X-Qpack HTPC o Motherboard: Asus P8H67-MLE o CPU: Intel Core i3-2100 o RAM: 8 GB o OS: Win7 64-bit
Tuner: HDHomeRun dual tuner o Leaf SkyHDTV antenna o Remote: Microsoft MCE
Hard drives: Samsung 500 GB SSD, Seagate 2 TB SATA2, Samsung 540 GB SATA2 o Input: Logitech USB keyboard & mouse
Video: ATI Radeon 7750 o Monitor: Viewsonic 27" VX2703MH-LED, LG 55" LCD TV
[/SIZE]
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#4
2007-02-27, 12:45 AM
The source code is for the TunerStatus function in my library. You should be able to cut and paste it into your own project.

You will not require a reference to my library to use it if you adjust the following line:
Code:
IRecordingService recordingService = (IRecordingService)Activator.GetObject(typeof(IRecordingService),
          Applications.Config.GetValue("/settings/RecordingServiceLocation"));

The Applications.Config.GetValue() function is getting a value from the GB-PVR config file. GB-PVR provides a way of doing this for plugins.
[SIZE="1"]Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
See my blog for releases, HD wallpapers, movie, game and anime reviews and more.[/SIZE]
Wakalaka
Offline

Posting Freak

Posts: 926
Threads: 161
Joined: Jan 2007
#5
2007-02-27, 06:41 AM (This post was last modified: 2007-02-27, 06:52 AM by Wakalaka.)
Have I told you how much I like your tool? One addition would be to not allow the normal tray app to start when you make changes via the config tool or run the normal tray app EXE. This would require a background process to capture apps being launched, and not allow GBPVRTray.exe to run.

Now that I thiunk about it, it might not be a bad idea to base my plugin on your dll. You have a lot of functionality in your dll that I could use, and it can be expanded upon. Instead of telling people "to use my plugin, it requires SlimmGBPVR, so download that and install it first", why don't I just package my plugin with your app? We collaborate, I send you updates, you make the releases as you see fit.
NPVR 4.1.0.180302 o Kodi 17.6 o EventGhost 0.5.0.rc4 o SAF 6.3.2 o SchedulesDirect
[SIZE="1"]
Case: Apevia X-Qpack HTPC o Motherboard: Asus P8H67-MLE o CPU: Intel Core i3-2100 o RAM: 8 GB o OS: Win7 64-bit
Tuner: HDHomeRun dual tuner o Leaf SkyHDTV antenna o Remote: Microsoft MCE
Hard drives: Samsung 500 GB SSD, Seagate 2 TB SATA2, Samsung 540 GB SATA2 o Input: Logitech USB keyboard & mouse
Video: ATI Radeon 7750 o Monitor: Viewsonic 27" VX2703MH-LED, LG 55" LCD TV
[/SIZE]
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#6
2007-02-27, 12:51 PM
Wakalaka Wrote:Have I told you how much I like your tool? One addition would be to not allow the normal tray app to start when you make changes via the config tool or run the normal tray app EXE. This would require a background process to capture apps being launched, and not allow GBPVRTray.exe to run.

While I don't provide this functionality, you can manually rename SlimmGBPVR.exe to GBPVRTray.exe replacing it completely. Then the config app will run SlimmGBPVR.exe instead of GBPVRTray.exe. Make a backup of GBPVRTray.exe first, of course.

Wakalaka Wrote:Now that I thiunk about it, it might not be a bad idea to base my plugin on your dll. You have a lot of functionality in your dll that I could use, and it can be expanded upon. Instead of telling people "to use my plugin, it requires SlimmGBPVR, so download that and install it first", why don't I just package my plugin with your app? We collaborate, I send you updates, you make the releases as you see fit.

All you need is the dll. If you wrote a proper installer for your plugin, you could simply include the dll with your package and install it if a high enough version of Slimm.GBPVR.dll wasn't already installed. You are welcome to do this as long as you keep me informed of which functions you use (so that I don't needlessly break them in future revisions).

As I mentioned before, a lot of the functionality of my dll replicates items already available to plugins but not available to external utilities, especially when GBPVR is not running. Some of the functionality replicates items found in CommonGBPVRUtilities.dll which is now installed alongside GBPVR but assumes that GBPVR is running.

At this time, I recommend giving your plugin (what will it do by the way?) a separate installer. As I said before, you are welcome to include Slimm.GBPVR.dll as long as the installer doesn't overwrite an installed higher version dll.
[SIZE="1"]Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
See my blog for releases, HD wallpapers, movie, game and anime reviews and more.[/SIZE]
FirstTeamOPS
Offline

Member

Posts: 245
Threads: 21
Joined: Mar 2006
#7
2007-02-27, 05:35 PM
Wakalaka Wrote:I was thinking it would be nice to have the tuner status as a plugin, that way I can see what is recording on each tuner from within GB-PVR without having to use my PC to click on the system tray icon.

Please keep us (or at least me Wink ) updated when this plugin is complete. I think it would be a nice addon.
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#8
2007-02-27, 06:02 PM
Wakalaka Wrote:I was thinking it would be nice to have the tuner status as a plugin, that way I can see what is recording on each tuner from within GB-PVR without having to use my PC to click on the system tray icon.

It always used to be "think first, speak later". I guess I should update that to "think first, type later".
[SIZE="1"]Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
See my blog for releases, HD wallpapers, movie, game and anime reviews and more.[/SIZE]
Wakalaka
Offline

Posting Freak

Posts: 926
Threads: 161
Joined: Jan 2007
#9
2007-02-27, 08:59 PM
Mister Slimm Wrote:It always used to be "think first, speak later". I guess I should update that to "think first, type later".

Yeah, I sometimes get ahead of myself. Overwhelmed with data at work and with GBPVR.
NPVR 4.1.0.180302 o Kodi 17.6 o EventGhost 0.5.0.rc4 o SAF 6.3.2 o SchedulesDirect
[SIZE="1"]
Case: Apevia X-Qpack HTPC o Motherboard: Asus P8H67-MLE o CPU: Intel Core i3-2100 o RAM: 8 GB o OS: Win7 64-bit
Tuner: HDHomeRun dual tuner o Leaf SkyHDTV antenna o Remote: Microsoft MCE
Hard drives: Samsung 500 GB SSD, Seagate 2 TB SATA2, Samsung 540 GB SATA2 o Input: Logitech USB keyboard & mouse
Video: ATI Radeon 7750 o Monitor: Viewsonic 27" VX2703MH-LED, LG 55" LCD TV
[/SIZE]
Wakalaka
Offline

Posting Freak

Posts: 926
Threads: 161
Joined: Jan 2007
#10
2007-03-26, 09:53 AM
I'm finally working on this, and hopefully will have something to release very soon with a nice installer.
NPVR 4.1.0.180302 o Kodi 17.6 o EventGhost 0.5.0.rc4 o SAF 6.3.2 o SchedulesDirect
[SIZE="1"]
Case: Apevia X-Qpack HTPC o Motherboard: Asus P8H67-MLE o CPU: Intel Core i3-2100 o RAM: 8 GB o OS: Win7 64-bit
Tuner: HDHomeRun dual tuner o Leaf SkyHDTV antenna o Remote: Microsoft MCE
Hard drives: Samsung 500 GB SSD, Seagate 2 TB SATA2, Samsung 540 GB SATA2 o Input: Logitech USB keyboard & mouse
Video: ATI Radeon 7750 o Monitor: Viewsonic 27" VX2703MH-LED, LG 55" LCD TV
[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  gbpvrCLI Formatting Tuner Status possible? martint123 2 5,877 2010-05-27, 04:55 PM
Last Post: martint123
  No status balloons keith_leitch 7 8,121 2010-01-08, 08:43 PM
Last Post: keith_leitch
  Recording status erroneously remains on keith_leitch 1 5,253 2009-06-13, 07:22 AM
Last Post: keith_leitch

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

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

Linear Mode
Threaded Mode