Results 1 to 7 of 7

Thread: Help with plugin coding?

  1. #1
    Join Date
    Jan 2003
    Location
    Stockholm, Sweden
    Posts
    17

    Default Help with plugin coding?

    I've looked at most of the available plugins but they are unfortunatley written in C++ which I do not master. The API has left me with more questions than answers. Has anybody got a plugin written in C they can share?

    I have made a program that I want to convert to a plugin, so I only need the framework of plugins merged onto my code.
    The program enables me to browse the filesystem via a 4x20 screen and the remote, so no need to use the TV for MP3 playing...

    Thanks,
    /Adam Klotblixt
    /Adam Klotblixt

  2. #2
    Join Date
    Sep 2001
    Location
    Sheffield, UK
    Posts
    320

    Default

    OSDMenu can be used to display menu's on an lcd with the help of the LCD plugin. This can be controlled with a remote.
    What does your code do at the moment?
    It would probably be quite easy to add your code into OSDMenu to make OSDMenu display the filesystem instead.
    What do you think?
    I could probably create a DLL interface to OSDMenu which would allow external DLL's to feed the menu content (though this may take me a few weeks(exams ops: ).
    Matt Wire - Author of OSDMenu plugin

  3. #3
    Join Date
    Jan 2003
    Location
    Stockholm, Sweden
    Posts
    17

    Default

    My code currently uses 4-way keys and enter-key to roam the filesystem. All keys are sent from Girder using the keyboard buffer. When the enter-key is pressed, the selected file is passed as an argument to a pre-defined program (winamp currently). I sort on the names, and I also filter the extension so I only see MP3s and directories. This way I can play a single file or a directory (with sub-directories). I output 3 lines of text on a VFD so I can see where I am when choosing.

    The nice thing about this is that I do not have to build any menus, the filesystem sits there allways ready.

    I guess I'd like to build a separate plugin for this, as I really want to make a decent program for once. I am already involved in trying to add support for the VFD I use in the LCD plugin, trying to learn C++ on the way

    If you have any C-code available that you can share I'd be VERY grateful.

    I'll take a better look at OSDmenu to see what it can do though.
    /Adam Klotblixt

  4. #4
    Join Date
    Sep 2001
    Location
    Sheffield, UK
    Posts
    320

    Default

    I'm afraid I don't have any C code available. (OSDMenu is written in Delphi).
    However, there are quite a few people on this forum who know a lot about C/C++ etc. so if you have any questions just ask.
    Someone will probably help you!

    OSDMenu works something like this:

    -command triggered -> gir_event:
    If menu not running:
    Creates a menu thread. This thread reads settings from ini file, processes and then displays menu.
    If menu running:
    Close menu (kill menuthread).

    -control key/message sent to menu window:
    Standard windows message handler picks up message/key,
    passes it to procedures which process/update menu.


    I don't think you'd need to know much C++ to do something similar to above. You can just follow the API as written and put all your C procedures in a separate thread.
    If it helps I can send the source of OSDMenu's plugin API section. This is written in Delphi but uses standard Windows API's so should be relevant. Most of the available plugins written in C++ (non-MFC) should also be similar.
    Matt Wire - Author of OSDMenu plugin

  5. #5
    Join Date
    Jan 2003
    Location
    Stockholm, Sweden
    Posts
    17

    Default

    After work I'll try to implement some of the code I have in LUA. If LUA is fast enough, it isn't much work to implement what I need to do and faster than writing a plugin (maybe).

    I am still into the idea of writing a proper plugin later, but it seems to be a bit too much work right now, since I have no example-code in C.
    /Adam Klotblixt

  6. #6
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default

    There is lots of example code in C

    AST/NEC/IBM
    Generic BT8x8
    Httpd

    Maybe more, take a look at the plugins by Mike McMahon

    This is all available on the developers page.
    Ron
    No support through PM

  7. #7
    Join Date
    Jan 2003
    Location
    Stockholm, Sweden
    Posts
    17

    Default

    Thanks for the pointers, naturally the plugins I hadn't checked

    I have implemented the functionality in LUA, so I won't do it in a plugin. I'll clean it all up and release it as an example for all to use.

    LUA is really the best move for Girder in a long time. It's very nice to work with once you get past the first obstacles. It makes Girder even more powerful!
    /Adam Klotblixt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •