File: VideoPresenter.h

package info (click to toggle)
freespace2 24.2.0%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,716 kB
  • sloc: cpp: 595,001; ansic: 21,741; python: 1,174; sh: 457; makefile: 248; xml: 181
file content (39 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef FS2_OPEN_OPENGLVIDEOPRESENTER_H
#define FS2_OPEN_OPENGLVIDEOPRESENTER_H

#include "globalincs/pstypes.h"
#include "graphics/2d.h"
#include "graphics/material.h"
#include "cutscene/Decoder.h"

#include <memory>

namespace cutscene {
namespace player {

class VideoPresenter {
	MovieProperties _properties;

	std::array<int, 3> _planeTextureHandles;
	std::array<std::unique_ptr<uint8_t[]>, 3> _planeTextureBuffers;

	movie_material _movie_material;
	material _rgb_material; // Material used when a RGB/RGBA movie is played
 public:
	explicit VideoPresenter(const MovieProperties& props);

	// Disallow copying
	VideoPresenter(const VideoPresenter&) = delete;
	VideoPresenter& operator=(const VideoPresenter&) = delete;

	virtual ~VideoPresenter();

	void uploadVideoFrame(const VideoFramePtr& frame);

	void displayFrame(float x1, float y1, float x2, float y2, float alpha = 1.0f);
};
}
}


#endif //FS2_OPEN_OPENGLVIDEOPRESENTER_H