]>
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 #include "wx/wxprec.h"
14 #include "wx/stream.h"
15 #include "wx/wfstream.h"
19 #include "wx/mmedia/vidbase.h"
25 IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver
, wxObject
)
28 wxVideoBaseDriver::wxVideoBaseDriver()
30 m_video_output
= NULL
;
33 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream
& WXUNUSED(str
))
35 m_video_output
= NULL
;
38 wxVideoBaseDriver::wxVideoBaseDriver(const wxString
& WXUNUSED(filename
))
40 m_video_output
= NULL
;
43 wxVideoBaseDriver::~wxVideoBaseDriver()
47 bool wxVideoBaseDriver::AttachOutput(wxWindow
& output
)
49 m_video_output
= &output
;
53 void wxVideoBaseDriver::DetachOutput()
55 m_video_output
= NULL
;
58 // Use an external frame for video output
60 wxFrame
*wxVideoCreateFrame(wxVideoBaseDriver
*vid_drv
)
62 wxFrame
*frame
= new wxFrame(NULL
, wxID_ANY
, _("Video Output"), wxDefaultPosition
, wxSize(100, 100));
63 wxWindow
*vid_out
= new wxWindow(frame
, wxID_ANY
, wxPoint(0, 0), wxSize(300, 300));
68 vid_drv
->AttachOutput(*vid_out
);