NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 33 34 35 36 37 … 93 Next »
Music API?

 
  • 0 Vote(s) - 0 Average
Music API?
brturn
Offline

Junior Member

Posts: 24
Threads: 4
Joined: Apr 2004
#1
2004-04-30, 05:46 PM
What is the API to the music/sound library in GB-PVR? Do modules have access to the current playlist, etc?

I'm interested in writing a party-mode jukebox module, but don't want to re-write all the code that is already being used by the music module.

Thanks,
--Bryan
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#2
2004-04-30, 05:59 PM
The plugin API allows you specify a list of songs for playback, and also allows you force playback of a specific song. Normal GB-PVR functionality allows you to skip forward or back a track and pause/play/stop.

If you'd need specific APIs to be available other than these, just let me know what you need and I'll add them.
brturn
Offline

Junior Member

Posts: 24
Threads: 4
Joined: Apr 2004
#3
2004-04-30, 06:31 PM
Sub,

Thanks for the response. Where is the list of APIs? I downloaded the WeatherPlugin and GB-PVR, but could not find the C++/C# API files. I have also looked through the documentation and the forums, but alas, no *.h files..?

I'm sure I'm missing the obvious doc or *.cs file..

Thanks,
--Bryan
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#4
2004-04-30, 06:36 PM
Support for plugins has only been in GB-PVR a few weeks, and I've not yet written any documentation to describe the API. The weather plugin gives a reasonable over of how you create a plugin. It only uses a couple of methods on the plugin helper, but here are the others:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">using System.Xml;

namespace GBPVR.Public
{
/// <summary>
/// IPluginHelper exposes useful functions that can be used by the plugins.
/// To use call: PluginHelperFactory.getPluginHelper().ReturnToMainMenu()
/// </summary>
public interface IPluginHelper
{
void ReturnToMainMenu();

string GetSkinRootDirectory();

string GetInstallDirectory();

string getStandardSkinDirectory();

Image getSkinImage(string imageName, string skinSubDirectory);

XmlDocument GetConfiguration();

void PlayVideoFile(String filename);

void PlayAudioFile(String filename);

void PlayAudioFiles(Queue files);
}
}
[/QUOTE]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#5
2004-04-30, 06:38 PM
http://gbpvr.com/cgi-bin/ikonboard.cgi?act=ST;f=4;t=1 contains a description of the interface that must be implemented by plugins.
brturn
Offline

Junior Member

Posts: 24
Threads: 4
Joined: Apr 2004
#6
2004-04-30, 06:55 PM
Aha! That's what I was looking for.. Thanks. I'll poke around at the interface and see if I can get something working.

Some more quick questions;

- Why is there a 'string' and also a 'String', are these different classes?

- How does the music module display directories? Is that done 'by hand' in the code, or is there a File &amp; Directory selection module API?

Off hand, a jukebox will need these additional interfaces:

// Append a track to the currently playing queue
AppendAudioFile(..)

// Query information about the currently playing track
GetCurrentlyPlayingInfo( out string filename, out ... position, ..more..? )

As well as some event which is sent to the task when the queue has finished playing.

Thanks.
--Bryan
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#7
2004-05-01, 05:55 AM
I've added methods to:
pluginHelper.AddAudioFileToQueue(string filename)
IList playList = pluginHelper.GetAudioPlayQueue(out currentlyPlayingIndex)

I'll also think about an approach to supply the additional info you mentioned.
Guest

Unregistered
 
#8
2004-05-01, 04:45 PM
Sub,

It looks like there are two &quot;Bryans&quot; interested in additional audio related pluginHelper methods. It's probably too late to get anything else in release 17, but I thought I would at least mention a couple of new things.

1. Can you provide away to control the volume in the MVP. Either just up and down or set to a specific percentage level.

2. If a client was controlling a particular MVP and that MVP was put in &quot;Standby&quot;, could a task wake up the MVP out of &quot;Standby&quot;.

The other important one, that you already know about, is the ability to have the client return which MVP it is connected to.

Thanks,

Bryan B.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#9
2004-05-01, 06:03 PM
The next release also contains a method to determine the client type (Overlay/VMR/XCARD/MVP). In the case of the MVP, the MAC address is appended to this.

I dont have the ability to place the MVP in standby or wake it up.
Guest

Unregistered
 
#10
2004-05-01, 07:11 PM
Good news on the MAC address.

Do you have away to change the volume?

Bryan
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Accessing music file metadata in C# bgowland 6 3,684 2013-01-26, 05:14 AM
Last Post: bgowland
  visible="!@hasImage & folder.jpg in Music not working Jaggy 0 1,363 2012-02-10, 10:29 PM
Last Post: Jaggy
  Building a list of files in media folders (npvr Music and Videos) bgowland 2 2,085 2012-02-05, 10:29 AM
Last Post: bgowland
  What music player is used? cncb 1 1,710 2011-08-01, 08:02 PM
Last Post: sub
  Detecting when Music Playlist is stopped (Ctrl-S) ACTCMS 6 3,206 2011-06-19, 07:52 PM
Last Post: sub
  How can I reset the Music plugin's database? mkenyon2 1 2,078 2009-10-15, 06:43 PM
Last Post: psycik
  Common Music/Video Inset? reven 9 4,852 2008-12-09, 03:16 AM
Last Post: JavaWiz
  Who turned on the music? ACTCMS 5 2,937 2008-03-25, 02:17 AM
Last Post: ACTCMS
  Music Albums 2 - Feature request to the author smelcher 8 2,870 2006-12-16, 05:42 PM
Last Post: mcfrojd
  faking shuffle in music playback groover km 3 2,021 2006-10-01, 06:08 AM
Last Post: reven

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

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

Linear Mode
Threaded Mode