]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia2/lib/vidbase.cpp
1 ////////////////////////////////////////////////////////////////////////////////
4 // Author: Guilhem Lavaux
7 // Copyright: (C) 1997, 1998, Guilhem Lavaux
8 // License: wxWindows license
9 ////////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "vidbase.h"
13 #include <wx/wfstream.h>
25 #if !USE_SHARED_LIBRARY
26 IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver
, wxObject
)
27 IMPLEMENT_DYNAMIC_CLASS(wxVideoOutput
, wxWindow
)
30 wxVideoOutput::wxVideoOutput()
36 wxVideoOutput::wxVideoOutput(wxWindow
*parent
, const wxWindowID id
, const wxPoint
& position
,
37 const wxSize
& size
, const long style
,
39 : wxWindow(parent
, id
, position
, size
, style
, name
)
45 wxVideoOutput::~wxVideoOutput()
49 wxVideoBaseDriver::wxVideoBaseDriver()
51 m_video_output
= NULL
;
54 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream
& str
)
56 m_video_output
= NULL
;
59 wxVideoBaseDriver::~wxVideoBaseDriver()
63 bool wxVideoBaseDriver::AttachOutput(wxVideoOutput
& output
)
65 m_video_output
= &output
;
69 void wxVideoBaseDriver::DetachOutput()
71 m_video_output
= NULL
;
74 // Use an external frame for video output
76 wxFrame
*wxVideoCreateFrame(wxVideoBaseDriver
*vid_drv
)
78 wxFrame
*frame
= new wxFrame(NULL
, -1, "Video Output", wxDefaultPosition
, wxSize(100, 100));
79 wxVideoOutput
*vid_out
= new wxVideoOutput(frame
, -1, wxPoint(0, 0), wxSize(300, 300));
81 vid_out
->DynamicSize(TRUE
);
86 vid_drv
->AttachOutput(*vid_out
);