]> git.saurik.com Git - wxWidgets.git/blame - contrib/src/mmedia/vidbase.cpp
re-added; this file should not be deleted
[wxWidgets.git] / contrib / src / mmedia / vidbase.cpp
CommitLineData
e8482f24
GL
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
92a19c2e 14#include "wx/wxprec.h"
e8482f24
GL
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
27IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver, wxObject)
28
29///
30wxVideoBaseDriver::wxVideoBaseDriver()
31{
32 m_video_output = NULL;
33}
34
35wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream& str)
36{
37 m_video_output = NULL;
38}
39
40wxVideoBaseDriver::wxVideoBaseDriver(const wxString& filename)
41{
42 m_video_output = NULL;
43}
44
45wxVideoBaseDriver::~wxVideoBaseDriver()
46{
47}
48
49bool wxVideoBaseDriver::AttachOutput(wxWindow& output)
50{
51 m_video_output = &output;
52 return TRUE;
53}
54
55void wxVideoBaseDriver::DetachOutput()
56{
57 m_video_output = NULL;
58}
59
60// Use an external frame for video output
61
62wxFrame *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}