OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license | |
5 * that can be found in the LICENSE file in the root of the source | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_IMPL_H_ | |
12 #define WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_IMPL_H_ | |
13 | |
14 #include <list> | |
15 #include <map> | |
16 #include <memory> | |
17 | |
18 #include "webrtc/modules/video_render/i_video_render.h" | |
19 | |
20 namespace webrtc { | |
21 | |
22 class VideoRenderIosGles20; | |
23 class CriticalSectionWrapper; | |
24 | |
25 class VideoRenderIosImpl : IVideoRender { | |
26 public: | |
27 explicit VideoRenderIosImpl(const int32_t id, | |
28 void* window, | |
29 const bool full_screen); | |
30 | |
31 ~VideoRenderIosImpl(); | |
32 | |
33 // Implementation of IVideoRender. | |
34 int32_t Init() override; | |
35 int32_t ChangeWindow(void* window) override; | |
36 | |
37 VideoRenderCallback* AddIncomingRenderStream(const uint32_t stream_id, | |
38 const uint32_t z_order, | |
39 const float left, | |
40 const float top, | |
41 const float right, | |
42 const float bottom) override; | |
43 | |
44 int32_t DeleteIncomingRenderStream(const uint32_t stream_id) override; | |
45 | |
46 int32_t GetIncomingRenderStreamProperties(const uint32_t stream_id, | |
47 uint32_t& z_order, | |
48 float& left, | |
49 float& top, | |
50 float& right, | |
51 float& bottom) const override; | |
52 | |
53 int32_t StartRender() override; | |
54 int32_t StopRender() override; | |
55 | |
56 VideoRenderType RenderType() override; | |
57 RawVideoType PerferedVideoType() override; | |
58 bool FullScreen() override; | |
59 int32_t GetGraphicsMemory( | |
60 uint64_t& total_graphics_memory, | |
61 uint64_t& available_graphics_memory) const override; // NOLINT | |
62 int32_t GetScreenResolution( | |
63 uint32_t& screen_width, | |
64 uint32_t& screen_height) const override; // NOLINT | |
65 uint32_t RenderFrameRate(const uint32_t stream_id); | |
66 int32_t SetStreamCropping(const uint32_t stream_id, | |
67 const float left, | |
68 const float top, | |
69 const float right, | |
70 const float bottom) override; | |
71 int32_t ConfigureRenderer(const uint32_t stream_id, | |
72 const unsigned int z_order, | |
73 const float left, | |
74 const float top, | |
75 const float right, | |
76 const float bottom) override; | |
77 int32_t SetTransparentBackground(const bool enable) override; | |
78 int32_t SetText(const uint8_t text_id, | |
79 const uint8_t* text, | |
80 const int32_t text_length, | |
81 const uint32_t text_color_ref, | |
82 const uint32_t background_color_ref, | |
83 const float left, | |
84 const float top, | |
85 const float right, | |
86 const float bottom) override; | |
87 int32_t SetBitmap(const void* bit_map, | |
88 const uint8_t picture_id, | |
89 const void* color_key, | |
90 const float left, | |
91 const float top, | |
92 const float right, | |
93 const float bottom); | |
94 int32_t FullScreenRender(void* window, const bool enable); | |
95 | |
96 private: | |
97 int32_t id_; | |
98 void* ptr_window_; | |
99 bool full_screen_; | |
100 | |
101 CriticalSectionWrapper* crit_sec_; | |
102 std::unique_ptr<VideoRenderIosGles20> ptr_ios_render_; | |
103 }; | |
104 } // namespace webrtc | |
105 #endif // WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_IMPL_H_ | |
OLD | NEW |