]> git.sesse.net Git - casparcg/blob - core/frame/composite_gpu_frame.h
821ed5cce903bcbe9eab53b889247af3efe130b5
[casparcg] / core / frame / composite_gpu_frame.h
1 #pragma once\r
2 \r
3 #include <memory>\r
4 \r
5 #include <Glee.h>\r
6 \r
7 #include "gpu_frame.h"\r
8 \r
9 namespace caspar {\r
10         \r
11 class composite_gpu_frame : public gpu_frame\r
12 {\r
13 public:\r
14         composite_gpu_frame(size_t width, size_t height);\r
15 \r
16         void write_lock();\r
17         bool write_unlock();\r
18         void read_lock(GLenum mode);\r
19         bool read_unlock();\r
20         void draw();\r
21         void reset();\r
22                 \r
23         virtual unsigned char* data();\r
24                                         \r
25         virtual const std::vector<short>& audio_data() const;   \r
26         virtual std::vector<short>& audio_data();\r
27 \r
28         void add(const gpu_frame_ptr& frame);\r
29         \r
30 private:\r
31         struct implementation;\r
32         std::shared_ptr<implementation> impl_;\r
33 };\r
34 typedef std::shared_ptr<composite_gpu_frame> composite_gpu_frame_ptr;\r
35         \r
36 }