Removed wxMMedia
Added wxMMedia2: it should work on linux (wave read/write, aiff read only) I begin to write windows driver now Added some file to filelist.txt Make configure build wxMMedia2 makefiles git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
89
utils/wxMMedia2/lib/vidbase.cpp
Normal file
89
utils/wxMMedia2/lib/vidbase.cpp
Normal file
@@ -0,0 +1,89 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Name: vidbdrv.cpp
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "vidbase.h"
|
||||
#endif
|
||||
#include <wx/wfstream.h>
|
||||
#include "vidbase.h"
|
||||
#ifdef WX_PRECOMP
|
||||
#include "wx_prec.h"
|
||||
#else
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxVideoBaseDriver, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxVideoOutput, wxWindow)
|
||||
#endif
|
||||
|
||||
wxVideoOutput::wxVideoOutput()
|
||||
: wxWindow()
|
||||
{
|
||||
m_dyn_size = TRUE;
|
||||
}
|
||||
|
||||
wxVideoOutput::wxVideoOutput(wxWindow *parent, const wxWindowID id, const wxPoint& position,
|
||||
const wxSize& size, const long style,
|
||||
const wxString& name)
|
||||
: wxWindow(parent, id, position, size, style, name)
|
||||
{
|
||||
m_dyn_size = TRUE;
|
||||
}
|
||||
|
||||
///
|
||||
wxVideoOutput::~wxVideoOutput()
|
||||
{
|
||||
}
|
||||
|
||||
wxVideoBaseDriver::wxVideoBaseDriver()
|
||||
{
|
||||
m_video_output = NULL;
|
||||
}
|
||||
|
||||
wxVideoBaseDriver::wxVideoBaseDriver(wxInputStream& str)
|
||||
{
|
||||
m_video_output = NULL;
|
||||
}
|
||||
|
||||
wxVideoBaseDriver::~wxVideoBaseDriver()
|
||||
{
|
||||
}
|
||||
|
||||
bool wxVideoBaseDriver::AttachOutput(wxVideoOutput& output)
|
||||
{
|
||||
m_video_output = &output;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wxVideoBaseDriver::DetachOutput()
|
||||
{
|
||||
m_video_output = NULL;
|
||||
}
|
||||
|
||||
// Use an external frame for video output
|
||||
|
||||
wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv)
|
||||
{
|
||||
wxFrame *frame = new wxFrame(NULL, -1, "Video Output", wxDefaultPosition, wxSize(100, 100));
|
||||
wxVideoOutput *vid_out = new wxVideoOutput(frame, -1, wxPoint(0, 0), wxSize(300, 300));
|
||||
|
||||
vid_out->DynamicSize(TRUE);
|
||||
frame->Layout();
|
||||
frame->Show(TRUE);
|
||||
wxYield();
|
||||
|
||||
vid_drv->AttachOutput(*vid_out);
|
||||
|
||||
return frame;
|
||||
}
|
Reference in New Issue
Block a user