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