Generic Streaming Media Plugin or protocol system... (1 Viewer)

S

simex

Guest
Hey all.
In case you havn't guessed, I'm the one who started the DAAP/iTunes plugin (or at least began to code it :p )

I was having a thought:
Why not make a generic or abstracted Streaming-Media-That-You-Can-Browse plugin?
This would roll up the DAAP, UPnP and possibly the radio plugin, as well as any other protocol that works with streaming media and has some sort of directory of playable files (possibly heirarchical!)

So you can imagine, that it would look like the music plugin (ie. list on the right, options on the left) and you would first pick the protocol. The plugin would load up the protocol handler. If the protocol handler supported discovery (finding sources of media - Upnp and DAAP do this) then it would search and present a list of devices. For radio, there would be a flag that said it does not have 'devices' and instead goes straight to the track listing (which would be radio stations - more or less like the existing plugin is now).
For the other protocols, there would be a heirarchical "Directory" listing for each remote database or whatever (Similar to the existing Music plugin after you select a drive or folder) so you can pick and choose tracks and playlist them, etc.

I know that this is possible. I just don't know enough of MediaPortal to do it. (Ie. WTF VirtualDirectory's ?!?) If someone can do the nasty UI-stuff, I am quite happy and more than willing to put DAAP and UPnP into it!

Or.... the ultimate - practically what the OS does...

If media portal had (as well as window plugins and proccess plugins) a "protocol" plugin that would be called to do this - then it would be truely generic! (ie. if it got something like daap://server/101/1565432 it would pull up the DAAP protocol plugin and ask it to get a stream or (normal) http connection for the media at this location.

Once again if the very-smart-people-who-know-how-to-implement-the-core-side-of-this could present such an interface for (people like me) to make protocol plugins, that would be very cool, and make MP even more extensible!:D

Simon
:)

PS. I know one of the possible problems with an all-in-one solution is that different protocols have different features that may require, say, user input of some kind (username, password, etc). It would be up the the Interface developer(s) to allow the protocol to interact with the user (or some othe solution ;) ). Also, protocol plugins should be put with the other plugins as another section in configuration (this will allow enable/disable, config, etc.)

</braindump>
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
Sounds very slick...almost Apple-like integration :p

In fact, I'd go as far as making the plugin a 'Connected Media plugin' so you can incorporate music on a USB device as well.

If I were you, I'd start fresh and not use the existing code, unless you want to extend the My Music Plugin of course.

Sorry I can't be of more help though, got some more pressing non-MP committments, as well as MP committments.

Sam
 
S

simex

Guest
The problem is, although i know how to do C# well, i don't know enough about how the My Music plugin works to extend it. I can see that it uses Directories and things and i would love to use those in a new plugin, but it may be easier to modify the existing my music plugin to allow non-filesystem directories (like it does for FTP at the moment.... although i'm not sure how that works either).

I've got ideas that are too grandiose for the amount i know about MP.
Maybe i should have started with a far simpler plugin :p

I'll get there :D
 
S

simex

Guest
Generic Streaming Music

After having a look at the (to be honest, hackish) way that FTP is done in the MyMusic plugin, I thought I'd take the Music plugin, copy it, and heavily modify it to support URL Protocol handlers (which would be sub-plugins or process plugins (havn't decided)).


So there would be GSM (Generic Streaming Music - maybe add video at some later date...) and "protocol plugins" that would handle a particular protocol (eg. HTTP, FTP, FILE, DAAP, UPnP, etc.)
The GSM plugin would act very much like the existing music plugin except when you add a share (via the config) you would have to say what protocol it is first (which would be enumerated by the plugins - they would also provide a sub-window to allow configuration of the parameters eg. the FILE protocol plugin config would allow you to browse to a directory, the FTP might allow username and password, etc.
The share added to your playlist would then be a URI (eg http://server/e/example.mp3 or file://c:/music/example.mp3 or daap://server/0/184453 )

Once in MP, the GSM plugin would look very much like the MyMusic plugin - the only difference would be coming to browsing and playback.
If a plugin does not support directory enumeration (such as HTTP) then the share is played. If it does support directory enumeration (such as FILE or DAAP) then opening a share (that was not a specific file on the server) would call the protocol plugin and ask it to return a directory listing for the share.
When GSM is given a URI (for playback or directory enumeration) it looks at the protocol identifyer (the bit before the :// eg HTTP for http://server/e/example.mp3) and using information that the protocol plugins provide, finds the protocol that can handle the request. It then asks the protocol to do something with it. The protocol then can return either a further directory (if the URI was a directory) or tell GSM that this is actually a file and it can give GSM a stream (or normal http URL) for playback of the file.

Do you all get it?
If you have any questions, please ask!

My hope is that eventually this will become the new music plugin because it is the more general case of the MyMusic plugin. Even if it does not become adopted I hope the music plugin developer makes the music plugin take URIs or allows browsing/playing of other protocols then http and files.


*work is looking for me, gotta run ;) *


Simon
:)
 

Users who are viewing this thread

Top Bottom