IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

Foobar as a UPnP renderer (player
Wadsbrau
post Dec 15 2008, 18:55
Post #1





Group: Members
Posts: 60
Joined: 10-December 08
Member No.: 64276



I am in the initial stages of creating a plugin (my first) that will make Foobar2000 a player for UPnP. I am not unfamiliar to the general logic of prgramming. I experience is mainly in C.

My code for the UPnP will compile and run as a stand alone app. Although it doesn't have any player capability at this time.
I have been able to add the UPnP stack code (as dll) to the SDK and can build it and add it to foobar with no errors and no functionality.

My first step is that I merely need to have foobar launch the UPnP code when it starts up. Howvever, I have no knowledge of Foobar's objects and functions.

Can anyone help me get started with the code that is used to initialize my plugin when foobar starts up?

I have tried this but it doesnt work:

CODE
include "../SDK/foobar2000.h"
DECLARE_COMPONENT_VERSION("Test", "0.1", NULL);

class initquit_handler : public initquit
{
    virtual void on_init()
    {
         UPnPStart();
    }
    virtual void on_quit()
     {
    
     }
};
static initquit_factory_t<initquit_handler> foo_initquit;


After I get it to launch, I merely need to tell foobar to play, pause stop etc. Then have foobar send the play progress information back to the UPnP control point.

Please help,

Thank you
Darren
Go to the top of the page
+Quote Post
 
Start new topic
Replies
Frank Bicking
post Dec 15 2008, 21:06
Post #2





Group: Super Moderator
Posts: 1823
Joined: 24-July 02
Member No.: 2776



CODE
static initquit_factory_t<initquit_handler> foo_initquit;

Was correct, no need to change it.

QUOTE
"error LNK2001: unresolved external symbol "void __cdecl UPnPStart(void)" (?UPnPStart@@YAXXZ)"

You probably forgot to add some library (.lib) to the additional linker dependencies.


--------------------
foobar2000.audiohq.de
Go to the top of the page
+Quote Post

Posts in this topic
- Wadsbrau   Foobar as a UPnP renderer (player   Dec 15 2008, 18:55
- - Canar   I would recommend specifically not relying on anot...   Dec 15 2008, 19:29
|- - Wadsbrau   QUOTE (Canar @ Dec 15 2008, 12:29) I woul...   Dec 15 2008, 19:51
- - Canar   CODE#include "../SDK/foobar2000.h" DECLARE...   Dec 15 2008, 20:01
|- - Wadsbrau   QUOTE (Canar @ Dec 15 2008, 13:01) CODE#i...   Dec 15 2008, 20:47
- - Frank Bicking   CODEstatic initquit_factory_t<initquit_handler...   Dec 15 2008, 21:06
|- - Wadsbrau   QUOTE (Frank Bicking @ Dec 15 2008, 14:06...   Dec 18 2008, 19:04
- - foosion   You can't just call a function that resides in...   Dec 18 2008, 20:28
|- - Wadsbrau   QUOTE (foosion @ Dec 18 2008, 13:28) You ...   Dec 18 2008, 22:21
|- - foosion   QUOTE (Wadsbrau @ Dec 18 2008, 22:21) QUO...   Dec 19 2008, 01:42
- - Yirkha   You should start a separate thread in on_init(), w...   Dec 18 2008, 22:42
- - Wadsbrau   Apparently I hadnt realized that because some of m...   Dec 19 2008, 20:38
- - Wadsbrau   Oh, and BTW, can someone tell me how i can can ste...   Dec 19 2008, 21:07
- - Wadsbrau   I was also wondering if it were possible to run Fo...   Dec 20 2008, 00:31
- - Yirkha   I'm sorry, I don't have time for more exha...   Dec 20 2008, 00:57
- - Wadsbrau   I can get the UPnP code to compile as dll now. Ho...   Dec 23 2008, 18:41
- - Wadsbrau   When the UPnP programs runs on its own, it runs in...   Dec 30 2008, 21:51
|- - foosion   QUOTE (Wadsbrau @ Dec 30 2008, 21:51) I u...   Jan 1 2009, 20:47
- - Canar   Maybe if you posted an archive with all the releva...   Dec 30 2008, 22:27
- - Wadsbrau   I could do that. Are you saying just put up a .zi...   Dec 31 2008, 00:04
|- - Yirkha   QUOTE (Wadsbrau @ Dec 31 2008, 00:04) Can...   Dec 31 2008, 09:37
|- - Wadsbrau   QUOTE (Yirkha @ Dec 31 2008, 02:37) QUOTE...   Dec 31 2008, 18:11
- - Yirkha   Why? C code usually compiles fine as C++, unless t...   Jan 1 2009, 10:58
- - Wadsbrau   I found the trouble, but having issues resolving i...   Jan 2 2009, 19:55
- - Wadsbrau   I figured out that if I put the includes in a diff...   Jan 2 2009, 20:35
- - Wadsbrau   Now I need to know what functions to call: to add ...   Jan 2 2009, 20:57
- - Wadsbrau   QUOTE (Yirkha @ Dec 31 2008, 02:37) QUOTE...   Jan 2 2009, 22:07
- - Yirkha   Use main_thread_callback. ETA: Sorry about that p...   Jan 2 2009, 22:33
|- - Wadsbrau   Thank you! Could you please give me an exampl...   Jan 2 2009, 23:10
- - Yirkha   Depends on where you want to use it. If it's f...   Jan 2 2009, 23:59
- - Wadsbrau   I am figuring this out. Still having a little tro...   Jan 3 2009, 01:54


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

 



RSS Lo-Fi Version Time is now: 20th April 2014 - 03:39