]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia/vidbase.cpp
dbe8daeef47448fc6e14537457f435e0e47f2f0a
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/fstream.h>
25 wxVideoOutput::wxVideoOutput()
31 wxVideoOutput::wxVideoOutput(wxWindow
*parent
, const wxWindowID id
, const wxPoint
& position
,
32 const wxSize
& size
, const long style
,
34 : wxWindow(parent
, id
, position
, size
, style
, name
)
40 wxVideoOutput::~wxVideoOutput()
44 wxVideoBaseDriver::wxVideoBaseDriver()
49 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream
& str
, bool seekable
)
50 : wxMMediaFile(str
, FALSE
, seekable
)
54 wxVideoBaseDriver::wxVideoBaseDriver(const wxString
& fname
)
59 wxVideoBaseDriver::~wxVideoBaseDriver()
63 bool wxVideoBaseDriver::AttachOutput(wxVideoOutput
& output
)
65 video_output
= &output
;
69 void wxVideoBaseDriver::DetachOutput()
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);
81 vid_out
->DynamicSize(TRUE
);
82 vid_drv
->AttachOutput(*vid_out
);