]> git.saurik.com Git - wxWidgets.git/blame - utils/wxMMedia2/lib/vidwin.h
Ok. Vidwin works again on Windows.
[wxWidgets.git] / utils / wxMMedia2 / lib / vidwin.h
CommitLineData
ebaad2cc 1// ----------------------------------------------------------------------------
4d6306eb
GL
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
ebaad2cc
GL
9// ----------------------------------------------------------------------------
10
4d6306eb
GL
11#ifndef __VID_windows_H__
12#define __VID_windows_H__
13
14#ifdef __GNUG__
ebaad2cc 15 #pragma interface "vidwin.h"
4d6306eb
GL
16#endif
17
ebaad2cc
GL
18// ----------------------------------------------------------------------------
19// headers
20// ----------------------------------------------------------------------------
21// For compilers that support precompilation, includes "wx/wx.h".
4d6306eb 22#include "wx/wxprec.h"
ebaad2cc
GL
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" wxWindows headers
30#ifndef WX_PRECOMP
31 #include "wx/string.h"
32 #include "wx/stream.h"
33 #include "wx/window.h"
4d6306eb 34#endif
ebaad2cc
GL
35
36// ----------------------------------------------------------------------------
37// wxMMedia2 headers
38
4d6306eb
GL
39#include "vidbase.h"
40
ebaad2cc
GL
41// ----------------------------------------------------------------------------
42// System headers and private types
43
4d6306eb
GL
44#ifdef WXMMEDIA_INTERNAL
45#include <windows.h>
46#include <mmsystem.h>
47
48typedef struct VIDW_Internal {
ebaad2cc
GL
49 MCIDEVICEID m_dev_id;
50} wxVIDWinternal;
4d6306eb
GL
51#endif
52
ebaad2cc
GL
53// ----------------------------------------------------------------------------
54// Class definition
55
56class WXDLLEXPORT wxVideoWindows : public wxVideoBaseDriver {
57 DECLARE_DYNAMIC_CLASS(wxVideoWindows)
4d6306eb 58protected:
ebaad2cc
GL
59 struct VIDW_Internal *m_internal;
60 bool m_paused, m_stopped, m_remove_file;
61 wxString m_filename;
4d6306eb 62
ebaad2cc 63 void OpenFile();
4d6306eb 64public:
ebaad2cc
GL
65 wxVideoWindows(void);
66 wxVideoWindows(wxInputStream& str);
67 wxVideoWindows(const wxString& fname);
68 ~wxVideoWindows(void);
4d6306eb 69
ebaad2cc
GL
70 bool Play();
71 bool Stop();
72 bool Pause();
73 bool Resume();
74
ebaad2cc 75 bool GetSize(wxSize& size) const;
171774fc
GL
76 bool SetSize(wxSize size);
77
78 // Return codec name for each stream.
79 wxString GetMovieCodec() const;
80 wxString GetAudioCodec() const;
81 // Return misc. info about audio
82 wxUint32 GetSampleRate() const;
83 wxUint8 GetChannels() const;
84 wxUint8 GetBPS() const;
85 // Return the frame rate of the video (in frames/second)
86 double GetFrameRate() const;
87 // Return the total number of frames in the movie
88 wxUint32 GetNbFrames() const;
ebaad2cc
GL
89
90 bool IsCapable(wxVideoType v_type);
91
92 bool AttachOutput(wxWindow& output);
93 void DetachOutput(void);
94
171774fc
GL
95 bool IsPaused() const;
96 bool IsStopped() const;
4d6306eb
GL
97};
98
99#endif