INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Plugins and Delphi  (Read 5748 times)

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Plugins and Delphi
« on: July 28, 2006, 09:05:18 am »

Hi,

Is it possible to write a plugin using delphi? and if so is there any guide anywhere?

Thanks
Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Plugins and Delphi
« Reply #1 on: July 29, 2006, 03:02:42 pm »

Hi,

Is it possible to write a plugin using delphi? and if so is there any guide anywhere?

Thanks
Craig

I think theoretically yes, because Delphi can work with the COM,
I don't think anyones written a guide as such for Delphi yet..
I'm only going from memory tho, may be worth having a search around.

I think a few people have tried it before and got it working,
but no write ups.
If you do crack it let us know, and even better tell us what you've done, and
how you did it! =)

I've written a couple of tutorials on how to get up and
running using .NET.
JRiver SDK shows some VB6 stuff,
and theres also a C++ Tutorial floating around.
As far as I can see Delphi's not been covered yet.

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #2 on: July 31, 2006, 04:11:02 am »

Thanks,

I'll let you know if i come up with anything.

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

tommer

  • Recent member
  • *
  • Posts: 19
Re: Plugins and Delphi
« Reply #3 on: August 10, 2006, 01:49:58 am »

Yes, Delphi works perfectly towards MediaCenter :)

You add MediaCenter COM object as a Type Library, and off you go...
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #4 on: August 10, 2006, 02:41:14 am »

Thanks Tommer,

I'll have a dabble

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #5 on: August 11, 2006, 03:03:31 am »

Tommer,
Do you have anymore info on getting the basics up and running?

I've imported Media Center.tlb but after that I'm stuck.

This is all new ground for me.

Thanks in advance
Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20062
Re: Plugins and Delphi
« Reply #6 on: August 11, 2006, 05:18:06 am »

if writing for MC12 you will need to use "media center 12.tlb"
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #7 on: August 11, 2006, 11:56:05 pm »

Thanks King,

I've got a bunch of components on my pallette now but am stuggling on how to use them.
I'm wanting to capture when the current playing song changes. At the moment all I can get is  'MCC: NOTIFY_PLAYLIST_PROPERTIES_CHANGED' events but they only seem to occur when the Playing Now list  changes completely not when the current song moves.

Any pointers would be welcome.

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #8 on: August 12, 2006, 01:59:23 am »

Ok, I've got as far as being able to get the current song file and other info but how do I set up an event to tell me that this has changed or do I just need to keep polling it?

Thanks

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Plugins and Delphi
« Reply #9 on: August 12, 2006, 09:22:19 am »

Only the newest version (MC12) has events.  At least that's what we're told.  And the documentation is sketchy since it's still a Beta version.
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #10 on: August 12, 2006, 04:42:16 pm »

Thanks Scott,

I've got the basics working now but obviously polling MC's not the best way to go about things.

Could you point me towards the documentation however sketchy please?

Thanks
Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Plugins and Delphi
« Reply #11 on: August 12, 2006, 06:53:10 pm »

When I said "sketchy" what I meant (in a nice way) is that there is none yet.
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #12 on: August 13, 2006, 02:40:09 am »

And I was expecting a Pdf of scans of beer mats ;D

Are there any docs that would explain how to make my program into a MC service?

Thanks
Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Plugins and Delphi
« Reply #13 on: August 13, 2006, 09:49:39 am »

One of the registry settings when you set up the COM interface (PluginMode) is to tell MC that the plugin should run all the time.  0= only when shown, 1 = all the time.

Is that what you're asking?
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #14 on: August 13, 2006, 12:09:38 pm »

No it's a bit more than that. Because I have no experience with plugins and couldn't find any info relating to Delphi, my program (A link between MC and Squeezebox's) has ended up as an exe that needs to be run alongside MC. I was meaning what is involved in getting it to run inside MC?

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Plugins and Delphi
« Reply #15 on: August 13, 2006, 05:35:16 pm »

I have no experience making exe's run alongside MC.  Somebody with more experience would have to help.

It would be far easier if you could turn the exe into a dll.  Then the dll just has to register as a COM interface to MC and set the PluginMode setting (as I mentioned).  Then MC handles it automatically.

Sorry I can't be of any further help.
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Plugins and Delphi
« Reply #16 on: August 14, 2006, 02:28:53 am »

Thanks Scott,

I'll keep developing it as an exe for now then I'll be asking questions about converting it to a dll later ;-)

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

tommer

  • Recent member
  • *
  • Posts: 19
Re: Plugins and Delphi
« Reply #17 on: August 21, 2006, 02:01:44 am »

Craig

I'm also using an exe which interfaces towards the MC com object.

What I've done is to make my own touchscreen application, but letting MC handle all the music, zones etc...
Logged

dlone

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 264
Re: Plugins and Delphi
« Reply #18 on: September 01, 2006, 05:46:25 pm »

Instead of creating an application - try an activex form (not sure if that's the right name - but it's there somewhere)
I tried it a long time ago and it worked fine
You'll need to have delphi7 or lower as it was removed in the later versions
Logged

tommer

  • Recent member
  • *
  • Posts: 19
Re: Plugins and Delphi
« Reply #19 on: September 13, 2006, 04:30:41 pm »

Well, I'm quite happy about my app which throug automation uses MediaCenter as a back end  ;D
Logged
Pages: [1]   Go Up