]>
Commit | Line | Data |
---|---|---|
4d6306eb GL |
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 | |
17 | #endif | |
18 | ||
19 | #include "mmtype.h" | |
20 | #include "mmfile.h" | |
21 | #include "wx/string.h" | |
22 | #include "wx/window.h" | |
7f42cff1 | 23 | #include "wx/frame.h" |
4d6306eb GL |
24 | |
25 | /// | |
26 | typedef enum { | |
27 | wxVIDEO_MSAVI, | |
28 | wxVIDEO_MPEG, | |
29 | wxVIDEO_QT, | |
30 | wxVIDEO_GIF, | |
31 | wxVIDEO_JMOV, | |
32 | wxVIDEO_FLI, | |
33 | wxVIDEO_IFF, | |
34 | wxVIDEO_SGI, | |
35 | wxVIDEO_MPEG2 | |
36 | } /// | |
37 | wxVideoType; | |
38 | ||
39 | /// | |
40 | class wxVideoBaseDriver; | |
41 | class wxVideoOutput : public wxWindow { | |
42 | /// | |
43 | DECLARE_DYNAMIC_CLASS(wxVideoOutput) | |
44 | protected: | |
45 | bool dyn_size; | |
46 | public: | |
47 | /// | |
48 | wxVideoOutput(); | |
49 | /// | |
50 | wxVideoOutput(wxWindow *parent, const wxWindowID id, | |
51 | const wxPoint& pos = wxDefaultPosition, | |
52 | const wxSize& size = wxDefaultSize, const long style = 0, | |
53 | const wxString& name = "video_output"); | |
54 | /// | |
55 | virtual ~wxVideoOutput(); | |
56 | ||
57 | /// | |
58 | bool DynamicSize() { return dyn_size; } | |
59 | /// | |
60 | void DynamicSize(bool dyn) { dyn_size = dyn; } | |
61 | }; | |
62 | ||
63 | /// | |
64 | class wxVideoBaseDriver : public wxObject, public wxMMediaFile { | |
65 | /// | |
66 | DECLARE_ABSTRACT_CLASS(wxVideoBaseDriver) | |
67 | protected: | |
68 | wxVideoOutput *video_output; | |
69 | public: | |
70 | friend class wxVideoOutput; | |
71 | ||
72 | /// | |
73 | wxVideoBaseDriver(); | |
74 | /// | |
75 | wxVideoBaseDriver(wxInputStream& str, bool seekable = FALSE); | |
76 | /// | |
77 | wxVideoBaseDriver(const wxString& fname); | |
78 | /// | |
79 | virtual ~wxVideoBaseDriver(); | |
80 | ||
81 | /// | |
82 | virtual bool Pause() = 0; | |
83 | /// | |
84 | virtual bool Resume() = 0; | |
85 | ||
86 | /// | |
87 | virtual bool SetVolume(wxUint8 vol) = 0; | |
88 | /// | |
89 | virtual bool Resize(wxUint16 w, wxUint16 h) = 0; | |
90 | ||
91 | /// | |
92 | virtual bool IsCapable(wxVideoType WXUNUSED(v_type)) { return FALSE; } | |
93 | ||
94 | /// | |
95 | virtual void OnFinished() {} | |
96 | ||
97 | /// | |
98 | virtual bool AttachOutput(wxVideoOutput& output); | |
99 | /// | |
100 | virtual void DetachOutput(); | |
101 | }; | |
102 | ||
103 | extern wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv); | |
104 | ||
105 | ||
106 | #endif |