]> git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia/vidbase.cpp
Corrected link error for missing wxRegTipProvider::GetTip by giving it
[wxWidgets.git] / utils / wxMMedia / 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 #include <wx/wfstream.h>
14 #include "vidbase.h"
15 #ifdef WX_PRECOMP
16 #include "wx_prec.h"
17 #else
18 #include "wx/wx.h"
19 #endif
20
21 #ifdef __BORLANDC__
22 #pragma hdrstop
23 #endif
24
25 wxVideoOutput::wxVideoOutput()
26 : wxWindow()
27 {
28 dyn_size = TRUE;
29 }
30
31 wxVideoOutput::wxVideoOutput(wxWindow *parent, const wxWindowID id, const wxPoint& position,
32 const wxSize& size, const long style,
33 const wxString& name)
34 : wxWindow(parent, id, position, size, style, name)
35 {
36 dyn_size = TRUE;
37 }
38
39 ///
40 wxVideoOutput::~wxVideoOutput()
41 {
42 }
43
44 wxVideoBaseDriver::wxVideoBaseDriver()
45 : wxMMediaFile()
46 {
47 }
48
49 wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream& str, bool seekable)
50 : wxMMediaFile(str, FALSE, seekable)
51 {
52 }
53
54 wxVideoBaseDriver::wxVideoBaseDriver(const wxString& fname)
55 : wxMMediaFile(fname)
56 {
57 }
58
59 wxVideoBaseDriver::~wxVideoBaseDriver()
60 {
61 }
62
63 bool wxVideoBaseDriver::AttachOutput(wxVideoOutput& output)
64 {
65 video_output = &output;
66 return TRUE;
67 }
68
69 void wxVideoBaseDriver::DetachOutput()
70 {
71 video_output = NULL;
72 }
73
74 // Use an external frame for video output
75
76 wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv)
77 {
78 wxFrame *frame = new wxFrame(NULL, -1, "Video Output", wxDefaultPosition, wxSize(100, 100));
79 wxVideoOutput *vid_out = new wxVideoOutput(frame, -1);
80
81 vid_out->DynamicSize(TRUE);
82 vid_drv->AttachOutput(*vid_out);
83 frame->Layout();
84 frame->Show(TRUE);
85
86 return frame;
87 }