]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/mmedia/vidbase.cpp
1 ////////////////////////////////////////////////////////////////////////////////
4 // Author: Guilhem Lavaux
7 // Copyright: (C) 1997, 1998, Guilhem Lavaux
8 // License: wxWindows license
9 ////////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "vidbase.h"
14 #include "wx/wxprec.h"
17 #include <wx/stream.h>
18 #include <wx/wfstream.h>
22 #include "wx/mmedia/vidbase.h"
28 IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver
, wxObject
)
31 wxVideoBaseDriver::wxVideoBaseDriver()
33 m_video_output
= NULL
;
36 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream
& WXUNUSED(str
))
38 m_video_output
= NULL
;
41 wxVideoBaseDriver::wxVideoBaseDriver(const wxString
& WXUNUSED(filename
))
43 m_video_output
= NULL
;
46 wxVideoBaseDriver::~wxVideoBaseDriver()
50 bool wxVideoBaseDriver::AttachOutput(wxWindow
& output
)
52 m_video_output
= &output
;
56 void wxVideoBaseDriver::DetachOutput()
58 m_video_output
= NULL
;
61 // Use an external frame for video output
63 wxFrame
*wxVideoCreateFrame(wxVideoBaseDriver
*vid_drv
)
65 wxFrame
*frame
= new wxFrame(NULL
, -1, _("Video Output"), wxDefaultPosition
, wxSize(100, 100));
66 wxWindow
*vid_out
= new wxWindow(frame
, -1, wxPoint(0, 0), wxSize(300, 300));
71 vid_drv
->AttachOutput(*vid_out
);