]>
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"
14 #include <wx/wxprec.h>
17 #include <wx/stream.h>
18 #include <wx/wfstream.h>
27 #if !USE_SHARED_LIBRARY
28 IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver
, wxObject
)
29 IMPLEMENT_DYNAMIC_CLASS(wxVideoOutput
, wxWindow
)
32 wxVideoOutput::wxVideoOutput()
38 wxVideoOutput::wxVideoOutput(wxWindow
*parent
, const wxWindowID id
, const wxPoint
& position
,
39 const wxSize
& size
, const long style
,
41 : wxWindow(parent
, id
, position
, size
, style
, name
)
47 wxVideoOutput::~wxVideoOutput()
51 wxVideoBaseDriver::wxVideoBaseDriver()
53 m_video_output
= NULL
;
56 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream
& str
)
58 m_video_output
= NULL
;
61 wxVideoBaseDriver::~wxVideoBaseDriver()
65 bool wxVideoBaseDriver::AttachOutput(wxVideoOutput
& output
)
67 m_video_output
= &output
;
71 void wxVideoBaseDriver::DetachOutput()
73 m_video_output
= NULL
;
76 // Use an external frame for video output
78 wxFrame
*wxVideoCreateFrame(wxVideoBaseDriver
*vid_drv
)
80 wxFrame
*frame
= new wxFrame(NULL
, -1, "Video Output", wxDefaultPosition
, wxSize(100, 100));
81 wxVideoOutput
*vid_out
= new wxVideoOutput(frame
, -1, wxPoint(0, 0), wxSize(300, 300));
83 vid_out
->DynamicSize(TRUE
);
88 vid_drv
->AttachOutput(*vid_out
);