ScummVM API documentation
VideoStream.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22/*
23 * Copyright (C) 2006-2010 - Frictional Games
24 *
25 * This file is part of HPL1 Engine.
26 */
27
28#ifndef HPL_VIDEO_STREAM_H
29#define HPL_VIDEO_STREAM_H
30
31#include "hpl1/engine/graphics/GraphicsTypes.h"
32#include "hpl1/engine/resources/ResourceBase.h"
33
34namespace hpl {
35
36//-----------------------------------------
37
38class iTexture;
39
40class iVideoStream;
41
42//-----------------------------------------
43
45public:
46 virtual ~iVideoStreamLoader() {}
47
48 virtual iVideoStream *Create(const tString &asName) = 0;
49
50 tStringVec &GetExtensions() { return mvExtensions; }
51
52protected:
53 tStringVec mvExtensions;
54};
55
56//-----------------------------------------
57
59public:
60 iVideoStream(tString asName) : iResourceBase(asName, 0) {}
61 virtual ~iVideoStream() {}
62
63 virtual bool LoadFromFile(tString asFilePath) = 0;
64
65 virtual void Update(float afTimeStep) = 0;
66
67 virtual void Play() = 0;
68 virtual void Stop() = 0;
69
70 virtual void Pause(bool abX) = 0;
71 virtual bool IsPaused() = 0;
72
73 virtual void SetLoop(bool abX) = 0;
74 virtual bool IsLooping() = 0;
75
76 virtual void CopyToTexture(iTexture *apTexture) = 0;
77
78 const tString &GetFileName() { return msFilePath; }
79 const cVector2l &GetSize() { return mvSize; }
80
82 // ResourceBase implementation
83 bool reload() { return false; }
84 void unload() {}
85 void destroy() {}
86
87protected:
88 tString msFilePath;
89 cVector2l mvSize;
90};
91
92} // namespace hpl
93
94#endif // HPL_VIDEO_STREAM_H
Definition: str.h:59
Definition: ResourceBase.h:36
Definition: Texture.h:88
Definition: VideoStream.h:58
void destroy()
Definition: VideoStream.h:85
bool reload()
Definition: VideoStream.h:83
void unload()
Definition: VideoStream.h:84
Definition: VideoStream.h:44