Author Topic: SiriusXM  (Read 23365 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: SiriusXM
« Reply #30 on: March 28, 2011, 11:19:55 pm »
You can do all the dev work against an existing core. I do this often.

As for the plugin, the plugin's only job is to:

(1) create the data grids
(2) create the media stream so that the system knows it's there, and give it a specific type
(3) make sure that when it's passed a media stream, it's the right one
(4) find matching player devices in a given entertainment area that can play the stream
(5) send the play command to the appropriate players.

-Thom

kyfalcon

  • Guru
  • ****
  • Posts: 390
    • View Profile
Re: SiriusXM
« Reply #31 on: April 21, 2011, 10:07:06 pm »
Thom,

Have managed to dig into this a bit and am going to just rewrite the Shoutcast plugin for now. Since the XML reader on my system isn't working properly I am just going to define the list of genres and stations as an array of Strings and Stations and load them into the vectors on startup instead of trying to pull them from sirius.com.

I am going to try to get the grid working first before I go logging in and grabbing the stationURL which takes several different calls to sirius.com and manipulation of the response.

My question is concerning the Picture used.

In the wiki it says to use                Row_Picture *AddPicture(string sFile);

Does this always add a picture or will it check to see if it is already registered and return that? i don't want to add the same picture everytime the plugin is loaded.

Thx Kevin

kyfalcon

  • Guru
  • ****
  • Posts: 390
    • View Profile
Re: SiriusXM
« Reply #32 on: April 22, 2011, 03:08:13 am »
OK, I grabbed all the linuxmce source from svn and am trying to build just the Shoucast plugin. Getting all kinds of errors. Am I barking up the wrong tree?

I don't have a test environment so i need to be able to build and test from my core without screwing things up.

Any help is appreciated. I have tommorow off work so I was going to try and really get something working.

Thx,
Kevin

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: SiriusXM
« Reply #33 on: April 22, 2011, 05:22:09 am »
(1) do this on your core,
(2) put all the contents of /usr/pluto/lib into src/lib to bootstrap things.

-Thom

huh

  • Guru
  • ****
  • Posts: 245
    • View Profile
Re: SiriusXM
« Reply #34 on: April 22, 2011, 05:40:38 am »
"rewrite the Shoutcast plugin for now. "

Certainly not trying to bust your balls- both because you're still working on this and because you are much more capable of reading the tables in LMCE.  That said, not sure why you are focusing on a portion of the code that seems, to me, to be already done with Pyxis.  Everything from the initial setup, to username/handshake, to station identification retrieval to playing the stream is already coded.  I have been trying to figure out how to get LMCE to accept the stream.

Back to the point, why not use the existing (and future) code from the Pyxis project who have a following dedicated to following any changes made by Sirius and are quickly able to release new versions as required?  I have looked quite a bit into the Pyxis code to try and understand how it works.  I have duct taped a simple script on my desktop just to see the effects of code changes in Pyxis.  Certainly nothing that can be folded into LMCE, but I need to start somewhere....
I can't promise I will be of any help, but will continue to try to make a contribution...

/My apologies for anyone who read my previous comments- I've decided they were not beneficial to the forums or anyone and should be removed.  Would rather keep on topic and get Sirius integrated...
« Last Edit: April 22, 2011, 05:55:45 am by huh »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: SiriusXM
« Reply #35 on: April 22, 2011, 05:52:01 am »
If you do use Pyxis, you'll need to rip out the user interface code, and replace it completely with the DCEGenned code, connecting pieces appropriately.

I do not see why this seems to be beyond people's comprehension. There are so many examples of merging DCE bits with existing code bases:

* SimplePhone (uses LinPhone in a separate thread)
* lmce_launch_manager_old (uses Qt UI code, instantiated in a separate thread from Main.cpp)
* Xine_Player (uses libxine and spawns a thread to handle xine streams and time code)

Those are just three examples.

-Thom

kyfalcon

  • Guru
  • ****
  • Posts: 390
    • View Profile
Re: SiriusXM
« Reply #36 on: April 22, 2011, 07:04:44 am »
All pyxis does is make calls to the sirius website and pass the url to mplayer. I have mimic that much in java. The real benefit will come from taking that knowledge and being able to choose the stations from a gui rather than having to go to a terminal and typing in the station you want to listen too. Much more efficient and user friendly. The problem for me is it has been 7-8 years since I have coded in c/c++ so I am a little rusty, probably even longer since I have done c++ in unix/linux.

Thom once I copy that stuff will i be able to just compile the Shoutcast plugin only?

What about my question concerning the button images?

Again thanks for the help.

I know I am close on this.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: SiriusXM
« Reply #37 on: April 22, 2011, 07:08:48 am »
don't worry about duplicates. :)

Once you have the stuff in lib, you'll be able to compile the shoutcast plugin so (with make so... all plugins are compiled with make so)

You can then copy it into /usr/pluto/bin

and create a child device of the DCERouter, select the Shoutcast PlugIn.

reload router, regenerate all the orbiters, and you will see a new Shoutcast audio source when you select Audio.

-Thom

kyfalcon

  • Guru
  • ****
  • Posts: 390
    • View Profile
Re: SiriusXM
« Reply #38 on: April 22, 2011, 06:40:07 pm »
the shoutcast object file builds fine but when it tries to build the httpUtils I get all kinds of curl errors.

Did I miss something?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: SiriusXM
« Reply #39 on: April 22, 2011, 06:56:23 pm »
you're probably missing curl-dev as a package. install it.

-Thom

kyfalcon

  • Guru
  • ****
  • Posts: 390
    • View Profile
Re: SiriusXM
« Reply #40 on: April 22, 2011, 09:23:41 pm »
The grid is working with genres ad stations  ;D

Next will be to add the graphics for the stations.

Thx for the help Thom!

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: SiriusXM
« Reply #41 on: April 22, 2011, 09:25:38 pm »
np man, I'm proud of ya. ;)

See guys? I will BEND OVER BACKWARDS for _ANYONE_ who is willing to dig in and try. ;)

-Thom

huh

  • Guru
  • ****
  • Posts: 245
    • View Profile
Re: SiriusXM
« Reply #42 on: April 22, 2011, 10:06:47 pm »
The grid is working with genres ad stations  ;D

Sweet- really look forward to trying this.  Great job!

Will you be able to share the steam across mds, or will each MD require a separate stream?

kyfalcon

  • Guru
  • ****
  • Posts: 390
    • View Profile
Re: SiriusXM
« Reply #43 on: April 22, 2011, 11:24:40 pm »
Sweet- really look forward to trying this.  Great job!

Will you be able to share the steam across mds, or will each MD require a separate stream?

Baby Steps.

kyfalcon

  • Guru
  • ****
  • Posts: 390
    • View Profile
Re: SiriusXM
« Reply #44 on: April 22, 2011, 11:42:12 pm »
Ok Thom my pointer knowledge is located in my brain where the fuzzies live. I'm getting this error

Shoutcast_Radio_Plugin.cpp: In member function ‘void DCE::Shoutcast_Radio_Plugin::loadStations()’:
Shoutcast_Radio_Plugin.cpp:539: error: invalid use of incomplete type ‘struct Row_Picture’
../Media_Plugin/MediaAttributes_LowLevel.h:45: error: forward declaration of ‘struct Row_Picture’


I have a Structure called Stations which has a member picID which is a long int.

The code below in bold is giving me the error.

while(count < 120){
      Row_Picture *p_MyPic = m_pMedia_Plugin->m_pMediaAttributes->m_pMediaAttributes_LowLevel->AddPicture("/home/mediapics/" + StringUtils::itos(stations[count].id) + ".png");
      stations[count].picID = p_MyPic->PK_Picture_get();
      m_vectStations.push_back(stations[count++]);
   }