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