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

Side by Side Diff: content/renderer/pepper/pepper_media_stream_video_track_host.cc

Issue 1476523005: Verify returned frames from media::VideoFrame::Wrap*() methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mcasas@ comments. 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" 5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 plugin_frame_size_, 351 plugin_frame_size_,
352 gfx::Rect(plugin_frame_size_), 352 gfx::Rect(plugin_frame_size_),
353 plugin_frame_size_, 353 plugin_frame_size_,
354 y_stride, 354 y_stride,
355 uv_stride, 355 uv_stride,
356 uv_stride, 356 uv_stride,
357 y_data, 357 y_data,
358 u_data, 358 u_data,
359 v_data, 359 v_data,
360 base::TimeDelta::FromMilliseconds(ts_ms)); 360 base::TimeDelta::FromMilliseconds(ts_ms));
361 if (!frame)
362 return PP_ERROR_FAILED;
361 363
362 frame_deliverer_->DeliverVideoFrame(frame); 364 frame_deliverer_->DeliverVideoFrame(frame);
363 } 365 }
364 366
365 // Makes the frame available again for plugin. 367 // Makes the frame available again for plugin.
366 SendEnqueueBufferMessageToPlugin(index); 368 SendEnqueueBufferMessageToPlugin(index);
367 return PP_OK; 369 return PP_OK;
368 } 370 }
369 371
370 void PepperMediaStreamVideoTrackHost::OnVideoFrame( 372 void PepperMediaStreamVideoTrackHost::OnVideoFrame(
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 527 }
526 528
527 void PepperMediaStreamVideoTrackHost::OnTrackStarted( 529 void PepperMediaStreamVideoTrackHost::OnTrackStarted(
528 MediaStreamSource* source, 530 MediaStreamSource* source,
529 MediaStreamRequestResult result, 531 MediaStreamRequestResult result,
530 const blink::WebString& result_name) { 532 const blink::WebString& result_name) {
531 DVLOG(3) << "OnTrackStarted result: " << result; 533 DVLOG(3) << "OnTrackStarted result: " << result;
532 } 534 }
533 535
534 } // namespace content 536 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698