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