]> git.saurik.com Git - wxWidgets.git/blob - contrib/src/mmedia/vidbase.cpp
More details about the internal module name changes
[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 #ifdef __GNUG__
11 #pragma implementation "vidbase.h"
12 #endif
13
14 #include "wx/wxprec.h"
15
16 #ifndef WX_PRECOMP
17 #include <wx/stream.h>
18 #include <wx/wfstream.h>
19 #include <wx/intl.h>
20 #endif
21
22 #include "wx/mmedia/vidbase.h"
23
24 #ifdef __BORLANDC__
25 #pragma hdrstop
26 #endif
27
28 IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver, wxObject)
29
30 ///
31 wxVideoBaseDriver::wxVideoBaseDriver()
32 {
33 m_video_output = NULL;
34 }
35
36 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream& WXUNUSED(str))
37 {
38 m_video_output = NULL;
39 }
40
41 wxVideoBaseDriver::wxVideoBaseDriver(const wxString& WXUNUSED(filename))
42 {
43 m_video_output = NULL;
44 }
45
46 wxVideoBaseDriver::~wxVideoBaseDriver()
47 {
48 }
49
50 bool wxVideoBaseDriver::AttachOutput(wxWindow& output)
51 {
52 m_video_output = &output;
53 return TRUE;
54 }
55
56 void wxVideoBaseDriver::DetachOutput()
57 {
58 m_video_output = NULL;
59 }
60
61 // Use an external frame for video output
62
63 wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv)
64 {
65 wxFrame *frame = new wxFrame(NULL, -1, _("Video Output"), wxDefaultPosition, wxSize(100, 100));
66 wxWindow *vid_out = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(300, 300));
67
68 frame->Layout();
69 frame->Show(TRUE);
70
71 vid_drv->AttachOutput(*vid_out);
72 vid_drv->Play();
73
74 return frame;
75 }