]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/vidwin.h
When using an external scrollbar ensure that the built-in one is set
[wxWidgets.git] / contrib / include / wx / mmedia / vidwin.h
CommitLineData
e8482f24
GL
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#ifdef __GNUG__
15 #pragma interface "vidwin.h"
16#endif
17
2b3644c7
JS
18#if defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__)
19// versions of Open Watcom and MinGW tested against this source does not
20// deliver "digitalv.h" required in this feature
21
e8482f24
GL
22// ----------------------------------------------------------------------------
23// headers
24// ----------------------------------------------------------------------------
25// For compilers that support precompilation, includes "wx/wx.h".
26#include "wx/wxprec.h"
27
28#ifdef __BORLANDC__
29 #pragma hdrstop
30#endif
31
32// for all others, include the necessary headers (this file is usually all you
be5a51fb 33// need because it includes almost all "standard" wxWidgets headers
e8482f24
GL
34#ifndef WX_PRECOMP
35 #include "wx/string.h"
36 #include "wx/stream.h"
37 #include "wx/window.h"
38#endif
39
40// ----------------------------------------------------------------------------
41// wxMMedia2 headers
42
15e8daec 43#include "wx/mmedia/defs.h"
e8482f24
GL
44#include "wx/mmedia/vidbase.h"
45
46// ----------------------------------------------------------------------------
47// System headers and private types
48
49#ifdef WXMMEDIA_INTERNAL
50#include <windows.h>
51#include <mmsystem.h>
52
53typedef struct VIDW_Internal {
54 MCIDEVICEID m_dev_id;
55} wxVIDWinternal;
56#endif
57
58// ----------------------------------------------------------------------------
59// Class definition
60
15e8daec 61class WXDLLIMPEXP_MMEDIA wxVideoWindows : public wxVideoBaseDriver {
e8482f24
GL
62 DECLARE_DYNAMIC_CLASS(wxVideoWindows)
63protected:
64 struct VIDW_Internal *m_internal;
65 bool m_paused, m_stopped, m_remove_file;
66 wxString m_filename;
67 double m_frameRate;
68 wxUint8 m_bps;
69
70 void OpenFile();
71public:
72 wxVideoWindows(void);
73 wxVideoWindows(wxInputStream& str);
74 wxVideoWindows(const wxString& fname);
75 ~wxVideoWindows(void);
76
77 bool Play();
78 bool Stop();
79 bool Pause();
80 bool Resume();
81
82 bool GetSize(wxSize& size) const;
83 bool SetSize(wxSize size);
84
85 // Return codec name for each stream.
86 wxString GetMovieCodec() const;
87 wxString GetAudioCodec() const;
88 // Return misc. info about audio
89 wxUint32 GetSampleRate() const;
90 wxUint8 GetChannels() const;
91 wxUint8 GetBPS() const;
92 // Return the frame rate of the video (in frames/second)
93 double GetFrameRate() const;
94 // Return the total number of frames in the movie
95 wxUint32 GetNbFrames() const;
96
2bbf230a 97 bool IsCapable(wxVideoType v_type) const;
e8482f24
GL
98
99 bool AttachOutput(wxWindow& output);
100 void DetachOutput(void);
101
102 bool IsPaused() const;
103 bool IsStopped() const;
104};
105
106#endif
2b3644c7
JS
107
108#endif