OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_ | 11 #ifndef WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_ |
12 #define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_ | 12 #define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_ |
13 | 13 |
| 14 #include <memory> |
14 #include <string> | 15 #include <string> |
15 | 16 |
16 #include "webrtc/examples/peerconnection/client/main_wnd.h" | 17 #include "webrtc/examples/peerconnection/client/main_wnd.h" |
17 #include "webrtc/examples/peerconnection/client/peer_connection_client.h" | 18 #include "webrtc/examples/peerconnection/client/peer_connection_client.h" |
18 | 19 |
19 // Forward declarations. | 20 // Forward declarations. |
20 typedef struct _GtkWidget GtkWidget; | 21 typedef struct _GtkWidget GtkWidget; |
21 typedef union _GdkEvent GdkEvent; | 22 typedef union _GdkEvent GdkEvent; |
22 typedef struct _GdkEventKey GdkEventKey; | 23 typedef struct _GdkEventKey GdkEventKey; |
23 typedef struct _GtkTreeView GtkTreeView; | 24 typedef struct _GtkTreeView GtkTreeView; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 int width() const { | 86 int width() const { |
86 return width_; | 87 return width_; |
87 } | 88 } |
88 | 89 |
89 int height() const { | 90 int height() const { |
90 return height_; | 91 return height_; |
91 } | 92 } |
92 | 93 |
93 protected: | 94 protected: |
94 void SetSize(int width, int height); | 95 void SetSize(int width, int height); |
95 rtc::scoped_ptr<uint8_t[]> image_; | 96 std::unique_ptr<uint8_t[]> image_; |
96 int width_; | 97 int width_; |
97 int height_; | 98 int height_; |
98 GtkMainWnd* main_wnd_; | 99 GtkMainWnd* main_wnd_; |
99 rtc::scoped_refptr<webrtc::VideoTrackInterface> rendered_track_; | 100 rtc::scoped_refptr<webrtc::VideoTrackInterface> rendered_track_; |
100 }; | 101 }; |
101 | 102 |
102 protected: | 103 protected: |
103 GtkWidget* window_; // Our main window. | 104 GtkWidget* window_; // Our main window. |
104 GtkWidget* draw_area_; // The drawing surface for rendering video streams. | 105 GtkWidget* draw_area_; // The drawing surface for rendering video streams. |
105 GtkWidget* vbox_; // Container for the Connect UI. | 106 GtkWidget* vbox_; // Container for the Connect UI. |
106 GtkWidget* server_edit_; | 107 GtkWidget* server_edit_; |
107 GtkWidget* port_edit_; | 108 GtkWidget* port_edit_; |
108 GtkWidget* peer_list_; // The list of peers. | 109 GtkWidget* peer_list_; // The list of peers. |
109 MainWndCallback* callback_; | 110 MainWndCallback* callback_; |
110 std::string server_; | 111 std::string server_; |
111 std::string port_; | 112 std::string port_; |
112 bool autoconnect_; | 113 bool autoconnect_; |
113 bool autocall_; | 114 bool autocall_; |
114 rtc::scoped_ptr<VideoRenderer> local_renderer_; | 115 std::unique_ptr<VideoRenderer> local_renderer_; |
115 rtc::scoped_ptr<VideoRenderer> remote_renderer_; | 116 std::unique_ptr<VideoRenderer> remote_renderer_; |
116 rtc::scoped_ptr<uint8_t[]> draw_buffer_; | 117 std::unique_ptr<uint8_t[]> draw_buffer_; |
117 int draw_buffer_size_; | 118 int draw_buffer_size_; |
118 }; | 119 }; |
119 | 120 |
120 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_ | 121 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_ |
OLD | NEW |