]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/mmedia/vidwin.h
added wxConvUI which determines the conversion used for the UI elements and can be...
[wxWidgets.git] / contrib / include / wx / mmedia / vidwin.h
1 // ----------------------------------------------------------------------------
2 // Name: vidwin.h
3 // Purpose: wxMMedia
4 // Author: Guilhem Lavaux
5 // Created: February 1998
6 // Updated:
7 // Copyright: (C) 1998, Guilhem Lavaux
8 // License: wxWindows license
9 // ----------------------------------------------------------------------------
10
11 #ifndef __VID_windows_H__
12 #define __VID_windows_H__
13
14 #if defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__)
15 // versions of Open Watcom and MinGW tested against this source does not
16 // deliver "digitalv.h" required in this feature
17
18 // ----------------------------------------------------------------------------
19 // headers
20 // ----------------------------------------------------------------------------
21 // For compilers that support precompilation, includes "wx/wx.h".
22 #include "wx/wxprec.h"
23
24 #ifdef __BORLANDC__
25 #pragma hdrstop
26 #endif
27
28 // for all others, include the necessary headers (this file is usually all you
29 // need because it includes almost all "standard" wxWidgets headers
30 #ifndef WX_PRECOMP
31 #include "wx/string.h"
32 #include "wx/stream.h"
33 #include "wx/window.h"
34 #endif
35
36 // ----------------------------------------------------------------------------
37 // wxMMedia2 headers
38
39 #include "wx/mmedia/defs.h"
40 #include "wx/mmedia/vidbase.h"
41
42 // ----------------------------------------------------------------------------
43 // System headers and private types
44
45 #ifdef WXMMEDIA_INTERNAL
46 #include <windows.h>
47 #include <mmsystem.h>
48
49 typedef struct VIDW_Internal {
50 MCIDEVICEID m_dev_id;
51 } wxVIDWinternal;
52 #endif
53
54 // ----------------------------------------------------------------------------
55 // Class definition
56
57 class WXDLLIMPEXP_MMEDIA wxVideoWindows : public wxVideoBaseDriver {
58 DECLARE_DYNAMIC_CLASS(wxVideoWindows)
59 protected:
60 struct VIDW_Internal *m_internal;
61 bool m_paused, m_stopped, m_remove_file;
62 wxString m_filename;
63 double m_frameRate;
64 wxUint8 m_bps;
65
66 void OpenFile();
67 public:
68 wxVideoWindows(void);
69 wxVideoWindows(wxInputStream& str);
70 wxVideoWindows(const wxString& fname);
71 ~wxVideoWindows(void);
72
73 bool Play();
74 bool Stop();
75 bool Pause();
76 bool Resume();
77
78 bool GetSize(wxSize& size) const;
79 bool SetSize(wxSize size);
80
81 // Return codec name for each stream.
82 wxString GetMovieCodec() const;
83 wxString GetAudioCodec() const;
84 // Return misc. info about audio
85 wxUint32 GetSampleRate() const;
86 wxUint8 GetChannels() const;
87 wxUint8 GetBPS() const;
88 // Return the frame rate of the video (in frames/second)
89 double GetFrameRate() const;
90 // Return the total number of frames in the movie
91 wxUint32 GetNbFrames() const;
92
93 bool IsCapable(wxVideoType v_type) const;
94
95 bool AttachOutput(wxWindow& output);
96 void DetachOutput(void);
97
98 bool IsPaused() const;
99 bool IsStopped() const;
100 };
101
102 #endif
103
104 #endif