]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/vidbase.h
include iostream headers before using iostream classes (might fix HP-UX native compil...
[wxWidgets.git] / contrib / include / wx / mmedia / vidbase.h
CommitLineData
e8482f24
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
dea7e44a 8// CVS: $Id$
e8482f24
GL
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 "vidbase.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// headers
21// ----------------------------------------------------------------------------
22// For compilers that support precompilation, includes "wx/wx.h".
23#include "wx/wxprec.h"
24
25#ifdef __BORLANDC__
26 #pragma hdrstop
27#endif
28
29// for all others, include the necessary headers (this file is usually all you
be5a51fb 30// need because it includes almost all "standard" wxWidgets headers
e8482f24
GL
31#ifndef WX_PRECOMP
32 #include "wx/defs.h"
33 #include "wx/stream.h"
34 #include "wx/string.h"
35 #include "wx/window.h"
36 #include "wx/frame.h"
37#endif
38
15e8daec
VS
39#include "wx/mmedia/defs.h"
40
e8482f24
GL
41// ----------------------------------------------------------------------------
42// wxMMedia2 (video) types
43
44typedef enum {
45 wxVIDEO_MSAVI,
46 wxVIDEO_MPEG,
47 wxVIDEO_QT,
48 wxVIDEO_GIF,
49 wxVIDEO_JMOV,
50 wxVIDEO_FLI,
51 wxVIDEO_IFF,
52 wxVIDEO_SGI,
53 wxVIDEO_MPEG2
54} wxVideoType;
55
56// ----------------------------------------------------------------------------
57// Classes definition
58
15e8daec 59class WXDLLIMPEXP_MMEDIA wxVideoBaseDriver : public wxObject {
e8482f24
GL
60 DECLARE_ABSTRACT_CLASS(wxVideoBaseDriver)
61protected:
62 wxWindow *m_video_output;
63public:
64 // Ctors
65 wxVideoBaseDriver();
66 wxVideoBaseDriver(wxInputStream& str);
67 wxVideoBaseDriver(const wxString& filename);
68 // Dtor
69 virtual ~wxVideoBaseDriver();
70
dea7e44a 71 // Usual functions ... They all return false in case of errors.
e8482f24
GL
72 virtual bool Play() = 0;
73 virtual bool Stop() = 0;
74 virtual bool Pause() = 0;
75 virtual bool Resume() = 0;
76
77 // Size management
78 virtual bool SetSize(wxSize size) = 0;
79 virtual bool GetSize(wxSize& size) const = 0;
80
81 // Test the capability of the driver to handle the specified type
dea7e44a 82 virtual bool IsCapable(wxVideoType WXUNUSED(v_type)) const { return false; }
e8482f24
GL
83
84 // Return the video codec name
85 virtual wxString GetMovieCodec() const = 0;
86 // Return the audio codec name
87 virtual wxString GetAudioCodec() const = 0;
88 // Return misc info about audio
89 virtual wxUint32 GetSampleRate() const = 0;
90 virtual wxUint8 GetChannels() const = 0;
91 virtual wxUint8 GetBPS() const = 0;
92 // Return frame rate
93 virtual double GetFrameRate() const = 0;
94 // Return number of frames
95 virtual wxUint32 GetNbFrames() const = 0;
96
97 // Called when the movie finished
98 virtual void OnFinished() {}
99
100 // Attaches the video output to a window. The video will be shown in that window.
101 virtual bool AttachOutput(wxWindow& output);
102 virtual void DetachOutput();
103
104 // They return the state of the movie.
105 virtual bool IsPaused() const = 0;
106 virtual bool IsStopped() const = 0;
107};
108
15e8daec 109WXDLLIMPEXP_MMEDIA wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv);
e8482f24
GL
110
111
112#endif