Printable Version of Topic

Click here to view this topic in its original format

AMIP Community _ SDK Support _ SDK Delphi component

Posted by: blert Jun 27 2008, 05:54 PM

Hello Serge. This is Chris, probably better known to you as blert. I wrote the Delphi7 component for your SDK. I've been MIA for a while but am slowly trying to get back into things.

I came to download the latest and greatest versions of AMIP and the SDK and noticed that there have been some changes to the SDK that need to be applied to the Delphi component. I made all the changes and fired up my example application and the server is not loading. sad.gif Using FB2K v0.9.5.3 with all the latest AMIP stuff. All settings seem to be correct. Am I missing something that I have forgotten in my long absence?

Update:
I commented out all server stuff from my example appication to test just client stuff and it seems none of it is working. Am I missing something in FB2K that I need to turn on?

Posted by: Serge Jun 28 2008, 10:01 AM

Hi blert, nice to see you again. Can it be some firewall issue? Get the Process Explorer and check that player process is listening on the specified port for the client connections. Also check that the server part of your client application binds to the correct port and also listens to the player replies.

Posted by: blert Jun 30 2008, 12:46 AM

Not a firewall issue, and Process Explorer shows listening on port 60334. Server settings in AMIP Configurator is set to 127.0.0.1:60334.

I had the ports backwards in my code. blink.gif Not sure how as this code worked last time I was mucking with it (long time ago).
Original code...

CODE

    // start server
    if AMIPWrapper1.ac_init_server('127.0.0.1', 60334) <> 1 then
      ...
    //start client
    if AMIPWrapper1.ac_init_client('127.0.0.1', 60333, 1000, 5, 1) <> 1 then
      ...
    //add event listener
    if AMIPWrapper1.ac_add_event_listener('127.0.0.1', 60334, 1000, AC_EVT_ALL, 1) <>  C_ERR_NOERROR then
      ...

I switched the ports in the code to...
CODE

    // start server
    if AMIPWrapper1.ac_init_server('127.0.0.1', 60333) <> 1 then
      ...
    //start client
    if AMIPWrapper1.ac_init_client('127.0.0.1', 60334, 1000, 5, 1) <> 1 then
      ...
    //add event listener
    if AMIPWrapper1.ac_add_event_listener('127.0.0.1', 60333, 1000, AC_EVT_ALL, 1) <> AC_ERR_NOERROR then
      ...

...and all works great.

After I run a few more tests and make some changes to the example app I will send you the updated component package.

Posted by: Serge Jun 30 2008, 09:23 AM

Yes, it looks like you've mixed up the ports =) The second is correct.

Posted by: blert Jul 2 2008, 03:21 AM

Sorry this is taking so long but I can now only plink around with kinda stuff as it comes to me or as I have time.

The updated component is done and works nicely. I'm having trouble with the example app though... ac_get_pl() is always resulting in an AC_ERR_CONNECTIONFAILED.

Server is running, client is running, listener is running for all events, ac_get_pl() is fired via callback on receipt of AC_EVT_PLREADY.

Any clues for me as why this might be?

Posted by: Serge Jul 2 2008, 08:40 AM

Could be very large playlist, increasing timeouts may help.

Posted by: blert Jul 2 2008, 03:43 PM

You are correct sir. My playlist is massive. I cut it down and it works nicely.

Posted by: blert Jul 2 2008, 05:42 PM

Ok, done. The package is attached.


Attached File(s)
Attached File  AMIP_D7_component.zip ( 5.52k ) Number of downloads: 2276

Posted by: Serge Jul 2 2008, 11:20 PM

Thanks, will be included in the next SDK update.

Posted by: blert Jul 3 2008, 01:30 AM

Not a problem at all. If I need to make more updates to it in the future just give me a shout.

Powered by Invision Power Board
© Invision Power Services