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