]> git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia2/lib/vidbase.h
Cut out some duplicate symbol in datstrm.tex
[wxWidgets.git] / utils / wxMMedia2 / lib / vidbase.h
1 // /////////////////////////////////////////////////////////////////////////////
2 // Name: vidbase.h
3 // Purpose: wxMMedia
4 // Author: Guilhem Lavaux
5 // Created: 1997
6 // Updated: 1998
7 // Copyright: (C) 1997, 1998, Guilhem Lavaux
8 // CVS: $Id$
9 // License: wxWindows license
10 // /////////////////////////////////////////////////////////////////////////////
11 /* Real -*- C++ -*- */
12 #ifndef __VID_bdrv_H__
13 #define __VID_bdrv_H__
14
15 #ifdef __GNUG__
16 #pragma interface "vidbase.h"
17 #endif
18
19 // ----------------------------------------------------------------------------
20 // headers
21 // ----------------------------------------------------------------------------
22 // For compilers that support precompilation, includes "wx/wx.h".
23 #include "wx/wxprec.h"
24
25 #ifdef __BORLANDC__
26 #pragma hdrstop
27 #endif
28
29 // for all others, include the necessary headers (this file is usually all you
30 // need because it includes almost all "standard" wxWindows headers
31 #ifndef WX_PRECOMP
32 #include "wx/defs.h"
33 #include "wx/stream.h"
34 #include "wx/string.h"
35 #include "wx/window.h"
36 #include "wx/frame.h"
37 #endif
38
39 // ----------------------------------------------------------------------------
40 // wxMMedia2 (video) types
41
42 typedef enum {
43 wxVIDEO_MSAVI,
44 wxVIDEO_MPEG,
45 wxVIDEO_QT,
46 wxVIDEO_GIF,
47 wxVIDEO_JMOV,
48 wxVIDEO_FLI,
49 wxVIDEO_IFF,
50 wxVIDEO_SGI,
51 wxVIDEO_MPEG2
52 } wxVideoType;
53
54 // ----------------------------------------------------------------------------
55 // Classes definition
56
57 class WXDLLEXPORT wxVideoBaseDriver : public wxObject {
58 DECLARE_ABSTRACT_CLASS(wxVideoBaseDriver)
59 protected:
60 wxWindow *m_video_output;
61 public:
62 // Ctors
63 wxVideoBaseDriver();
64 wxVideoBaseDriver(wxInputStream& str);
65 wxVideoBaseDriver(const wxString& filename);
66 // Dtor
67 virtual ~wxVideoBaseDriver();
68
69 // Usual functions ... They all return FALSE in case of errors.
70 virtual bool Play() = 0;
71 virtual bool Stop() = 0;
72 virtual bool Pause() = 0;
73 virtual bool Resume() = 0;
74
75 // Size management
76 virtual bool Resize(wxUint16 w, wxUint16 h) = 0;
77 virtual bool GetSize(wxSize& size) const = 0;
78
79 // Test the capability of the driver to handle the specified type
80 virtual bool IsCapable(wxVideoType WXUNUSED(v_type)) { return FALSE; }
81
82 // Called when the movie finished
83 virtual void OnFinished() {}
84
85 // Attaches the video output to a window. The video will be shown in that window.
86 virtual bool AttachOutput(wxWindow& output);
87 virtual void DetachOutput();
88
89 // They return the state of the movie.
90 virtual bool IsPaused() = 0;
91 virtual bool IsStopped() = 0;
92 };
93
94 WXDLLEXPORT wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv);
95
96
97 #endif