]> git.saurik.com Git - wxWidgets.git/blame - utils/wxMMedia2/lib/vidbase.cpp
* ESD works in full duplex (theorically)
[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
40wxVideoBaseDriver::~wxVideoBaseDriver()
41{
42}
43
d73dd2b2 44bool wxVideoBaseDriver::AttachOutput(wxWindow& output)
4d6306eb 45{
526ddb13 46 m_video_output = &output;
4d6306eb
GL
47 return TRUE;
48}
49
50void wxVideoBaseDriver::DetachOutput()
51{
526ddb13 52 m_video_output = NULL;
4d6306eb
GL
53}
54
55// Use an external frame for video output
56
57wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv)
58{
59 wxFrame *frame = new wxFrame(NULL, -1, "Video Output", wxDefaultPosition, wxSize(100, 100));
d73dd2b2 60 wxWindow *vid_out = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(300, 300));
4d6306eb 61
4d6306eb
GL
62 frame->Layout();
63 frame->Show(TRUE);
526ddb13
GL
64
65 vid_drv->AttachOutput(*vid_out);
b83290c3 66 vid_drv->Play();
4d6306eb
GL
67
68 return frame;
69}