Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> SDK Delphi component
blert
post Jun 27 2008, 05:54 PM
Post #1


Newbie
*

Group: Members
Posts: 8
Joined: 27-June 08
Member No.: 545



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?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Serge
post Jun 28 2008, 10:01 AM
Post #2


AMIP Developer
***

Group: Root Admin
Posts: 935
Joined: 12-March 06
Member No.: 1



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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
blert
post Jun 30 2008, 12:46 AM
Post #3


Newbie
*

Group: Members
Posts: 8
Joined: 27-June 08
Member No.: 545



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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Serge
post Jun 30 2008, 09:23 AM
Post #4


AMIP Developer
***

Group: Root Admin
Posts: 935
Joined: 12-March 06
Member No.: 1



Yes, it looks like you've mixed up the ports =) The second is correct.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
blert
post Jul 2 2008, 03:21 AM
Post #5


Newbie
*

Group: Members
Posts: 8
Joined: 27-June 08
Member No.: 545



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?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Serge
post Jul 2 2008, 08:40 AM
Post #6


AMIP Developer
***

Group: Root Admin
Posts: 935
Joined: 12-March 06
Member No.: 1



Could be very large playlist, increasing timeouts may help.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
blert
post Jul 2 2008, 03:43 PM
Post #7


Newbie
*

Group: Members
Posts: 8
Joined: 27-June 08
Member No.: 545



You are correct sir. My playlist is massive. I cut it down and it works nicely.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
blert
post Jul 2 2008, 05:42 PM
Post #8


Newbie
*

Group: Members
Posts: 8
Joined: 27-June 08
Member No.: 545



Ok, done. The package is attached.


Attached File(s)
Attached File  AMIP_D7_component.zip ( 5.52k ) Number of downloads: 962
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Serge
post Jul 2 2008, 11:20 PM
Post #9


AMIP Developer
***

Group: Root Admin
Posts: 935
Joined: 12-March 06
Member No.: 1



Thanks, will be included in the next SDK update.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
blert
post Jul 3 2008, 01:30 AM
Post #10


Newbie
*

Group: Members
Posts: 8
Joined: 27-June 08
Member No.: 545



Not a problem at all. If I need to make more updates to it in the future just give me a shout.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: