]> git.saurik.com Git - wxWidgets.git/blob - contrib/src/mmedia/vidbase.cpp
Removed useless pragma after fixing code to use insigned ints.
[wxWidgets.git] / contrib / src / mmedia / vidbase.cpp
1 ////////////////////////////////////////////////////////////////////////////////
2 // Name: vidbdrv.cpp
3 // Purpose: wxMMedia
4 // Author: Guilhem Lavaux
5 // Created: 1997
6 // Updated: 1998
7 // Copyright: (C) 1997, 1998, Guilhem Lavaux
8 // License: wxWindows license
9 ////////////////////////////////////////////////////////////////////////////////
10
11 #include "wx/wxprec.h"
12
13 #ifndef WX_PRECOMP
14 #include "wx/stream.h"
15 #include "wx/wfstream.h"
16 #include "wx/intl.h"
17 #endif
18
19 #include "wx/mmedia/vidbase.h"
20
21 #ifdef __BORLANDC__
22 #pragma hdrstop
23 #endif
24
25 IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver, wxObject)
26
27 ///
28 wxVideoBaseDriver::wxVideoBaseDriver()
29 {
30 m_video_output = NULL;
31 }
32
33 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream& WXUNUSED(str))
34 {
35 m_video_output = NULL;
36 }
37
38 wxVideoBaseDriver::wxVideoBaseDriver(const wxString& WXUNUSED(filename))
39 {
40 m_video_output = NULL;
41 }
42
43 wxVideoBaseDriver::~wxVideoBaseDriver()
44 {
45 }
46
47 bool wxVideoBaseDriver::AttachOutput(wxWindow& output)
48 {
49 m_video_output = &output;
50 return true;
51 }
52
53 void wxVideoBaseDriver::DetachOutput()
54 {
55 m_video_output = NULL;
56 }
57
58 // Use an external frame for video output
59
60 wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv)
61 {
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));
64
65 frame->Layout();
66 frame->Show(true);
67
68 vid_drv->AttachOutput(*vid_out);
69 vid_drv->Play();
70
71 return frame;
72 }