# MediaCtrl?

**URL:** <https://www.ruby-forum.com/t/mediactrl/118212>\
**Category:** wxRuby\
**Created:** [October 24, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/mediactrl/118212 "2007-10-24T20:54:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albin\_Holmgren](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Albin\_Holmgren](https://www.ruby-forum.com/u/Albin_Holmgren)\
**Post date:** [October 24, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/mediactrl/118212/1 "2007-10-24T20:54:13Z")

</div>

Hi.

First of all, thank you for your hard work - wxRuby (with wxSugar) is a  
wonderful tool! I have been playing with it on and off for a year or so  
for  
toy projects and really like it!

I need to play mediafiles (mostly mp3s) from within an application. In  
wxwidgets (the c++) I can use wxMediaCtrl. As I understand it this class  
is  
not implemented in wxRuby - right?  
Is there a reason for this - is there technical problems implementing  
it? I  
have read about the policy to only wrap GUI functionality and not  
classes  
already present in ruby. Thing is, I haven’t found any other way to play  
media files from within ruby (cross platform and especially on windows).  
Or  
is it just that nobody have had any need for it yet?

Until now I have only used the binary releases of wxruby, but will try  
to  
set up a build environment to try to wrap it myself. Should MSVC 2005,  
latest swig, wxMSW-2.8.6 and ruby 1.8.6 be compatible with the one-click  
installer? If I do succeed - don’t hold your breath - are you interested  
in  
patches?

Thanks,  
Albin Holmgren

---

<div class="post-metadata">

**Author:** ![Albin\_Holmgren](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Albin\_Holmgren](https://www.ruby-forum.com/u/Albin_Holmgren)\
**Post date:** [October 24, 2007, 9:29pm UTC](https://www.ruby-forum.com/t/mediactrl/118212/2 "2007-10-24T21:29:19Z")

</div>

Hi Albin

Albin Holmgren wrote:

> First of all, thank you for your hard work - wxRuby (with wxSugar) is  
> a wonderful tool! I have been playing with it on and off for a year or  
> so for toy projects and really like it!  
> Thanks, that’s kind of you to say so.  
> I need to play mediafiles (mostly mp3s) from within an application. In  
> wxwidgets (the c++) I can use wxMediaCtrl. As I understand it this  
> class is not implemented in wxRuby - right?  
> Yep.  
> Is there a reason for this - is there technical problems implementing it?  
> Yes; there’s no other objections to adding it. I last tried this class  
> quite a while ago, but didn’t get any joy. I don’t remember the specific  
> error, but basically it was because the underlying wxWidgets C++  
> implementation is a lot more complex (with abstract classes etc) than  
> the public-facing API.  
> Until now I have only used the binary releases of wxruby, but will try  
> to set up a build environment to try to wrap it myself. Should MSVC  
> 2005, latest swig, wxMSW-2.8.6 and ruby 1.8.6 be compatible with the  
> one-click installer? If I do succeed - don’t hold your breath - are  
> you interested in patches?  
> That all sounds OK - I think that’s the compiler I use for debugging on  
> Windows though Sean may use VC6 which is the “official” binary  
> compatible for the one-click installer.

I’d be really pleased to see this class added; if you want any help feel  
free to ask on the -dev mailing list.

alex

---

<div class="post-metadata">

**Author:** ![Albin\_Holmgren](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Albin\_Holmgren](https://www.ruby-forum.com/u/Albin_Holmgren)\
**Post date:** [October 24, 2007, 10:27pm UTC](https://www.ruby-forum.com/t/mediactrl/118212/3 "2007-10-24T22:27:15Z")

</div>

> > Until now I have only used the binary releases of wxruby, but will try  
> > to set up a build environment to try to wrap it myself. Should MSVC  
> > 2005, latest swig, wxMSW-2.8.6 and ruby 1.8.6 be compatible with the  
> > one-click installer? If I do succeed - don’t hold your breath - are  
> > you interested in patches?  
> > That all sounds OK - I think that’s the compiler I use for debugging on  
> > Windows though Sean may use VC6 which is the “official” binary  
> > compatible for the one-click installer.

Actually I use Visual Studio .Net 2003 and did not even know the  
“official” compiler for the one-click was VC6 until very recently  
(last week actually). On my build VM for windows I run the following:

- MS Windows XP Pro sp2
- MS Visual Studio .Net 2003
- Ruby 1.8.4 One-click installer version 184-16
- Swig 1.3.31
- wxWidgets 2.8.6

I have had problems compiling with this compiler with newer one-click  
installers so I am sticking with this one. The resulting gem works  
fine on later installer builds.

BTW if anyone has a copy of VC6 they want to donate for building gems  
I would gladly take such a donation, I would feel a bit more  
comfortable using it to build the gems.

Sean
