Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: webrtc/examples/peerconnection/client/linux/main_wnd.h

Issue 1817473002: Delete VideoRendererInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/videotrack_unittest.cc ('k') | webrtc/examples/peerconnection/client/main_wnd.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 void OnRedraw(); 71 void OnRedraw();
72 72
73 protected: 73 protected:
74 class VideoRenderer : public rtc::VideoSinkInterface<cricket::VideoFrame> { 74 class VideoRenderer : public rtc::VideoSinkInterface<cricket::VideoFrame> {
75 public: 75 public:
76 VideoRenderer(GtkMainWnd* main_wnd, 76 VideoRenderer(GtkMainWnd* main_wnd,
77 webrtc::VideoTrackInterface* track_to_render); 77 webrtc::VideoTrackInterface* track_to_render);
78 virtual ~VideoRenderer(); 78 virtual ~VideoRenderer();
79 79
80 // VideoRendererInterface implementation 80 // VideoSinkInterface implementation
81 virtual void SetSize(int width, int height); 81 void OnFrame(const cricket::VideoFrame& frame) override;
82 virtual void OnFrame(const cricket::VideoFrame& frame);
83 82
84 const uint8_t* image() const { return image_.get(); } 83 const uint8_t* image() const { return image_.get(); }
85 84
86 int width() const { 85 int width() const {
87 return width_; 86 return width_;
88 } 87 }
89 88
90 int height() const { 89 int height() const {
91 return height_; 90 return height_;
92 } 91 }
93 92
94 protected: 93 protected:
94 void SetSize(int width, int height);
95 rtc::scoped_ptr<uint8_t[]> image_; 95 rtc::scoped_ptr<uint8_t[]> image_;
96 int width_; 96 int width_;
97 int height_; 97 int height_;
98 GtkMainWnd* main_wnd_; 98 GtkMainWnd* main_wnd_;
99 rtc::scoped_refptr<webrtc::VideoTrackInterface> rendered_track_; 99 rtc::scoped_refptr<webrtc::VideoTrackInterface> rendered_track_;
100 }; 100 };
101 101
102 protected: 102 protected:
103 GtkWidget* window_; // Our main window. 103 GtkWidget* window_; // Our main window.
104 GtkWidget* draw_area_; // The drawing surface for rendering video streams. 104 GtkWidget* draw_area_; // The drawing surface for rendering video streams.
105 GtkWidget* vbox_; // Container for the Connect UI. 105 GtkWidget* vbox_; // Container for the Connect UI.
106 GtkWidget* server_edit_; 106 GtkWidget* server_edit_;
107 GtkWidget* port_edit_; 107 GtkWidget* port_edit_;
108 GtkWidget* peer_list_; // The list of peers. 108 GtkWidget* peer_list_; // The list of peers.
109 MainWndCallback* callback_; 109 MainWndCallback* callback_;
110 std::string server_; 110 std::string server_;
111 std::string port_; 111 std::string port_;
112 bool autoconnect_; 112 bool autoconnect_;
113 bool autocall_; 113 bool autocall_;
114 rtc::scoped_ptr<VideoRenderer> local_renderer_; 114 rtc::scoped_ptr<VideoRenderer> local_renderer_;
115 rtc::scoped_ptr<VideoRenderer> remote_renderer_; 115 rtc::scoped_ptr<VideoRenderer> remote_renderer_;
116 rtc::scoped_ptr<uint8_t[]> draw_buffer_; 116 rtc::scoped_ptr<uint8_t[]> draw_buffer_;
117 int draw_buffer_size_; 117 int draw_buffer_size_;
118 }; 118 };
119 119
120 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_ 120 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_LINUX_MAIN_WND_H_
OLDNEW
« no previous file with comments | « webrtc/api/videotrack_unittest.cc ('k') | webrtc/examples/peerconnection/client/main_wnd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698