News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

cbMP: A mediaplayer plugin

Started by GeO, May 22, 2009, 04:24:19 PM

Previous topic - Next topic

GeO

I like to listen to music while programming so i've created a mediaplayer plugin for codeblocks.
It's made after my mediaplayer project https://sourceforge.net/projects/fafnir/ with less features.
It can play *.mp3 and *.ogg files. It can load, create and save playlists and some more stuff...

I uploaded the .cbplugin for Windows linked with the latest SVN to
http://sourceforge.net/project/showfiles.php?group_id=258661&package_id=323616

The source code is aviable at http://fafnir.svn.sourceforge.net/viewvc/fafnir/Plugin/ !

Please read the HowToUse.txt and report any impression/bug/suggestion/question
in this post or at the project page in the forum
https://sourceforge.net/forum/forum.php?forum_id=957228

PS: Sorry for my bad english!

Greets GeO

JGM


MortenMacFly

Quote from: GeO on May 22, 2009, 04:24:19 PM
The source code is aviable at http://fafnir.svn.sourceforge.net/viewvc/fafnir/Plugin/ !
Really nice one! :-)
Just a couple of comments:
- I had to link against libtag.dll and not libtag.dll.a like setup in the project settings (libtag.dll.a is not present).
- I had to move "#include <wx/dcbuffer.h>" in "SGauge.cpp" outside the WX_PRECOMP #ifdef to compile correctly (with wxMSW 2.8.10)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot

just wanted to try it out.

But it seems it was build with an older sdk ??

However you mentioned build against latest CB svn ...

MortenMacFly

Quote from: killerbot on May 25, 2009, 12:47:17 PM
But it seems it was build with an older sdk ??
I built it myself - so I don't know. I never trust 3rd party binaries. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot

Martin,

Could you attach your windows binary of the dll ?
Or PM it to me ?

Cheers,
Lieven

MortenMacFly

Quote from: killerbot on May 25, 2009, 01:15:17 PM
Or PM it to me ?
I would but I have a different SDK, too so you would end up in the same trouble. Should I anyways?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot


GeO

Quote from: MortenMacFly on May 25, 2009, 07:40:19 AM
Really nice one! :-)
Just a couple of comments:
- I had to link against libtag.dll and not libtag.dll.a like setup in the project settings (libtag.dll.a is not present).
- I had to move "#include <wx/dcbuffer.h>" in "SGauge.cpp" outside the WX_PRECOMP #ifdef to compile correctly (with wxMSW 2.8.10)

Fixed in SVN.

Quote from: killerbot on May 25, 2009, 12:47:17 PM
But it seems it was build with an older sdk ??

In file manifest.xml the SDK version is:
SdkVersion major="1" minor="11"  release="12"
I use svn build rev 5604 of Code::Blocks!!

Greets GeO

critic

I tryed to build plugin but got following message:

g++.exe -shared   -Wl,--dll -LD:\bin\dev\libs\CB_SDK\devel -LD:\bin\dev\libs\wxWidgets-2.8.7\lib\gcc_dll  .objs\GMPlayList.o .objs\GMPlaylistFrm.o .objs\SGauge.o .objs\cbMP.o .objs\wxAudiere.o .objs\GMOctoCtrl.o   -o cbMP.dll -Wl,--enable-auto-image-base -Wl,--export-all-symbols -Wl,--add-stdcall-alias -Wl,--enable-auto-import  -lcodeblocks -lwxmsw28u MSW_spez\TagLib\libtag.dll MSW_spez\Audiere\audiere.lib
Cannot export audiere_NULL_THUNK_DATA: symbol not found
collect2: ld returned 1 exit status


Do you know why it appears and how to correct it? :?

GeO

For me this comand works (using wxWidgets-2.8.10, Codeblocks SVN 5604 and MinGW 4.3.3-tdm)!


g++.exe -shared   -Wl,--dll -LC:\Programme\CodeBlocks\src\devel -LC:\Programme\wxWidgets-2.8.10\lib\gcc_dll
.objs\GMPlayList.o .objs\GMPlaylistFrm.o .objs\SGauge.o .objs\cbMP.o .objs\wxAudiere.o .objs\GMOctoCtrl.o   
-o cbMP.dll -Wl,--enable-auto-image-base -Wl,--export-all-symbols -Wl,--add-stdcall-alias -Wl,--enable-auto-import 
-lcodeblocks -lwxmsw28u MSW_spez\TagLib\libtag.dll MSW_spez\Audiere\audiere.lib

critic

Ok! I made it. Reason of problem was a mingw 3.4.5 that is not clever enough  :lol:

But I have another problem: C::B not loaded - it crushes while loading.
This is the codeblocks.RPT contents:

-------------------

Error occured on Monday, June 1, 2009 at 10:27:31.

D:\bin\dev\c++\CodeBlocks\codeblocks.exe caused an Access Violation at location 66f5db58 in module D:\bin\dev\c++\CodeBlocks\share\codeblocks\plugins\cbMP.dll Reading from location 00000000.

Registers:
eax=00000000 ebx=00000000 ecx=00000000 edx=0281a6f8 esi=0022f6ec edi=6d265954
eip=66f5db58 esp=0022f280 ebp=0022f288 iopl=0         nv up ei pl nz ac pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00210212

Call stack:
66F5DB58  D:\bin\dev\c++\CodeBlocks\share\codeblocks\plugins\cbMP.dll:66F5DB58


Maybe it's a bug? Or the matter is in the C::B version - 5602 (under Win XP).
Don't know what to do.  :?

GeO

Have you copied the audiere.dll and libtag.dll to the Code::Blocks Installpath?

Else you could try to change the OUTPUT_HELP at cbMP.cpp line 52 from wxMEDIABACKEND_AUDIERE to wxMEDIABACKEND_WMP10.

Have you tried to install the binary cbMP.cbplugin? Do you get the same crash?

GeO


PsYhLo

#13
any one run this on linux ?
i compile it successfully but it says me that the sdk version is different :(

i attach my project file

my system is Ubuntu 9.04
wx from apt.wxwidgets.org
taglib form ubuntu
audiere from ubuntu

and 2 changes in the code
at GMPlayList.cpp
around lines 230 and 261 i change .c_str() to .char_str()

[attachment deleted by admin]
[url="http://img529.imageshack.us/img529/822/3664286vy.png"]http://img529.imageshack.us/img529/822/3664286vy.png[/url]

GeO

Quote from: PsYhLo on June 01, 2009, 01:00:39 PM
i compile it successfully but it says me that the sdk version is different :(

I tried it too, the problem is not the sdk version, but  the dynamic libraries (libtag.so and audiere.so).
look at he Code::Blocks Logpane::
/home/[user]/.codeblocks/share/codeblocks/plugins/cbMP.so: not loaded (missing symbols?)

In Windows you just have to put this libraries to your Code::Blocks install. But in Linux (Ubuntu) i don't know
where to put it (i copied them in every folder that has something to do with Code::Blocks but i had no success :?)!!

GeO