]> git.saurik.com Git - wxWidgets.git/blame - utils/wxMMedia2/lib/vidbase.cpp
Ok. Vidwin works again on Windows.
[wxWidgets.git] / utils / wxMMedia2 / lib / vidbase.cpp
CommitLineData
4d6306eb
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
6c5e6376
GL
13
14#include <wx/wxprec.h>
15
16#ifndef WX_PRECOMP
17#include <wx/stream.h>
926c550d 18#include <wx/wfstream.h>
4d6306eb
GL
19#endif
20
6c5e6376
GL
21#include "vidbase.h"
22
4d6306eb
GL
23#ifdef __BORLANDC__
24#pragma hdrstop
25#endif
26
526ddb13 27IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver, wxObject)
4d6306eb
GL
28
29///
4d6306eb 30wxVideoBaseDriver::wxVideoBaseDriver()
4d6306eb 31{
526ddb13 32 m_video_output = NULL;
4d6306eb
GL
33}
34
526ddb13 35wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream& str)
4d6306eb 36{
526ddb13 37 m_video_output = NULL;
4d6306eb
GL
38}
39
ebaad2cc
GL
40wxVideoBaseDriver::wxVideoBaseDriver(const wxString& filename)
41{
42 m_video_output = NULL;
43}
44
4d6306eb
GL
45wxVideoBaseDriver::~wxVideoBaseDriver()
46{
47}
48
d73dd2b2 49bool wxVideoBaseDriver::AttachOutput(wxWindow& output)
4d6306eb 50{
526ddb13 51 m_video_output = &output;
4d6306eb
GL
52 return TRUE;
53}
54
55void wxVideoBaseDriver::DetachOutput()
56{
526ddb13 57 m_video_output = NULL;
4d6306eb
GL
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));
d73dd2b2 65 wxWindow *vid_out = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(300, 300));
4d6306eb 66
4d6306eb
GL
67 frame->Layout();
68 frame->Show(TRUE);
526ddb13
GL
69
70 vid_drv->AttachOutput(*vid_out);
b83290c3 71 vid_drv->Play();
4d6306eb
GL
72
73 return frame;
74}