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>
21 #include "wx/mmedia/vidbase.h"
27 IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver
, wxObject
)
30 wxVideoBaseDriver::wxVideoBaseDriver()
32 m_video_output
= NULL
;
35 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream
& str
)
37 m_video_output
= NULL
;
40 wxVideoBaseDriver::wxVideoBaseDriver(const wxString
& filename
)
42 m_video_output
= NULL
;
45 wxVideoBaseDriver::~wxVideoBaseDriver()
49 bool wxVideoBaseDriver::AttachOutput(wxWindow
& output
)
51 m_video_output
= &output
;
55 void wxVideoBaseDriver::DetachOutput()
57 m_video_output
= NULL
;
60 // Use an external frame for video output
62 wxFrame
*wxVideoCreateFrame(wxVideoBaseDriver
*vid_drv
)
64 wxFrame
*frame
= new wxFrame(NULL
, -1, "Video Output", wxDefaultPosition
, wxSize(100, 100));
65 wxWindow
*vid_out
= new wxWindow(frame
, -1, wxPoint(0, 0), wxSize(300, 300));
70 vid_drv
->AttachOutput(*vid_out
);