1

I want to play a video in a frame using wxSmith ( which is a wxWidgets extension ) . I've read the documentation from their website ( http://docs.wxwidgets.org/2.6.3/wx_wxmediactrl.html ) but I barely understood it . What I did by now :

wxMediaCtrl* Video;
wxString filename='/home/cristi/Desktop/intro.mp4';    
Video= new wxMediaCtrl(this, filename,"IDVideo",wxDefaultPosition,wxDefaultSize,0,wxT(""),wxDefaultValidator,wxPanelNameStr);
this->Connect(IDVideo, wxEVT_MEDIA_STOP, (wxObjectEventFunction)
(wxEventFunction)(wxMediaEventFunction) &t2Frame::OnMediaStop);
void t2Frame::OnMediaStop(const wxMediaEvent& evt)
{
    if(I don't know what to put here)
    {
        m_mediactrl->SetPosition(
            m_mediactrl->GetDuration() << 1
                                );
        evt.Veto();
    }
}

But I don't know what to do next. I have a lots of error. It's the first time I use wxWidgets and I've searched a lot on the Internet but no results.

Thanks in advance.

Antaka
  • 27
  • 2
  • 4
  • Sadly, you need to learn the basics of C++ first if you intend to use a C++ library. There is no way around it. – Lauri Nurmi Nov 16 '14 at 22:25
  • @LauriNurmi I know C++, I have worked with it for more than one year. But it's the first time when I use wxWidgets and I couldn't find any example or sample. – Antaka Nov 17 '14 at 08:42

1 Answers1

0

Two general advices:

  1. Start from a non-ancient wxWidgets version such as 3.0.2.
  2. Look at the sample showing the use of this control.

Beyond this I really am not sure what are you asking about, e.g. why are you handling wxEVT_MEDIA_STOP in the first place. And, of course, you should really make some better effort than "lots of error[s]" if you want to get any help.

VZ.
  • 21,740
  • 3
  • 39
  • 42
  • Thank you for the sample, I think an example is all I need. I couldn't find any example or sample on the Internet, that's why I posted here. I, basically, want an example to understand better how to handle wxwidgets. I will search more about the 3.0.2 version and I will come back if I have other questions. Thank you, sir – Antaka Nov 17 '14 at 08:45