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

Side by Side Diff: talk/media/base/capturerenderadapter.cc

Issue 1574963002: Deleted renderer-related SetSize methods, and all uses. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 11 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 | « talk/app/webrtc/videosource_unittest.cc ('k') | talk/media/base/fakevideorenderer.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 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 } 110 }
111 111
112 // The renderer_crit_ lock needs to be taken when calling this function. 112 // The renderer_crit_ lock needs to be taken when calling this function.
113 void CaptureRenderAdapter::MaybeSetRenderingSize(const VideoFrame* frame) { 113 void CaptureRenderAdapter::MaybeSetRenderingSize(const VideoFrame* frame) {
114 for (VideoRenderers::iterator iter = video_renderers_.begin(); 114 for (VideoRenderers::iterator iter = video_renderers_.begin();
115 iter != video_renderers_.end(); ++iter) { 115 iter != video_renderers_.end(); ++iter) {
116 const bool new_resolution = iter->render_width != frame->GetWidth() || 116 const bool new_resolution = iter->render_width != frame->GetWidth() ||
117 iter->render_height != frame->GetHeight(); 117 iter->render_height != frame->GetHeight();
118 if (new_resolution) { 118 if (new_resolution) {
119 if (iter->renderer->SetSize(static_cast<int>(frame->GetWidth()), 119 iter->render_width = frame->GetWidth();
120 static_cast<int>(frame->GetHeight()), 0)) { 120 iter->render_height = frame->GetHeight();
121 iter->render_width = frame->GetWidth();
122 iter->render_height = frame->GetHeight();
123 } else {
124 LOG(LS_ERROR) << "Captured frame size not supported by renderer: " <<
125 frame->GetWidth() << " x " << frame->GetHeight();
126 }
127 } 121 }
128 } 122 }
129 } 123 }
130 124
131 // The renderer_crit_ lock needs to be taken when calling this function. 125 // The renderer_crit_ lock needs to be taken when calling this function.
132 bool CaptureRenderAdapter::IsRendererRegistered( 126 bool CaptureRenderAdapter::IsRendererRegistered(
133 const VideoRenderer& video_renderer) const { 127 const VideoRenderer& video_renderer) const {
134 for (VideoRenderers::const_iterator iter = video_renderers_.begin(); 128 for (VideoRenderers::const_iterator iter = video_renderers_.begin();
135 iter != video_renderers_.end(); ++iter) { 129 iter != video_renderers_.end(); ++iter) {
136 if (&video_renderer == iter->renderer) { 130 if (&video_renderer == iter->renderer) {
137 return true; 131 return true;
138 } 132 }
139 } 133 }
140 return false; 134 return false;
141 } 135 }
142 136
143 } // namespace cricket 137 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/app/webrtc/videosource_unittest.cc ('k') | talk/media/base/fakevideorenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698