Author Topic: cbMP: A mediaplayer plugin  (Read 18104 times)

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
cbMP: A mediaplayer plugin
« on: May 22, 2009, 04:24:19 pm »
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

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: cbMP: A mediaplayer plugin
« Reply #1 on: May 23, 2009, 12:54:42 am »
cool  :)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: cbMP: A mediaplayer plugin
« Reply #2 on: May 25, 2009, 07:40:19 am »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: cbMP: A mediaplayer plugin
« Reply #3 on: May 25, 2009, 12:47:17 pm »
just wanted to try it out.

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

However you mentioned build against latest CB svn ...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: cbMP: A mediaplayer plugin
« Reply #4 on: May 25, 2009, 01:06:41 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: cbMP: A mediaplayer plugin
« Reply #5 on: May 25, 2009, 01:15:17 pm »
Martin,

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

Cheers,
Lieven

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: cbMP: A mediaplayer plugin
« Reply #6 on: May 25, 2009, 01:16:31 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: cbMP: A mediaplayer plugin
« Reply #7 on: May 25, 2009, 01:28:27 pm »
let's try  8)

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: cbMP: A mediaplayer plugin
« Reply #8 on: May 25, 2009, 02:34:09 pm »
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.

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

Offline critic

  • Multiple posting newcomer
  • *
  • Posts: 93
Re: cbMP: A mediaplayer plugin
« Reply #9 on: May 29, 2009, 07:13:44 am »
I tryed to build plugin but got following message:

Code
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? :?

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: cbMP: A mediaplayer plugin
« Reply #10 on: May 29, 2009, 05:13:02 pm »
For me this comand works (using wxWidgets-2.8.10, Codeblocks SVN 5604 and MinGW 4.3.3-tdm)!

Code
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

Offline critic

  • Multiple posting newcomer
  • *
  • Posts: 93
Re: cbMP: A mediaplayer plugin
« Reply #11 on: June 01, 2009, 06:35:13 am »
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:
Code
-------------------

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.  :?

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: cbMP: A mediaplayer plugin
« Reply #12 on: June 01, 2009, 10:53:43 am »
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


Offline PsYhLo

  • Almost regular
  • **
  • Posts: 157
Re: cbMP: A mediaplayer plugin
« Reply #13 on: June 01, 2009, 01:00:39 pm »
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]
« Last Edit: June 01, 2009, 01:23:54 pm by PsYhLo »

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: cbMP: A mediaplayer plugin
« Reply #14 on: June 01, 2009, 05:26:03 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