OLD | NEW |
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 "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 plugin_frame_size_, | 348 plugin_frame_size_, |
349 gfx::Rect(plugin_frame_size_), | 349 gfx::Rect(plugin_frame_size_), |
350 plugin_frame_size_, | 350 plugin_frame_size_, |
351 y_stride, | 351 y_stride, |
352 uv_stride, | 352 uv_stride, |
353 uv_stride, | 353 uv_stride, |
354 y_data, | 354 y_data, |
355 u_data, | 355 u_data, |
356 v_data, | 356 v_data, |
357 base::TimeDelta::FromMilliseconds(ts_ms)); | 357 base::TimeDelta::FromMilliseconds(ts_ms)); |
| 358 if (!frame) |
| 359 return PP_ERROR_FAILED; |
358 | 360 |
359 frame_deliverer_->DeliverVideoFrame(frame); | 361 frame_deliverer_->DeliverVideoFrame(frame); |
360 } | 362 } |
361 | 363 |
362 // Makes the frame available again for plugin. | 364 // Makes the frame available again for plugin. |
363 SendEnqueueBufferMessageToPlugin(index); | 365 SendEnqueueBufferMessageToPlugin(index); |
364 return PP_OK; | 366 return PP_OK; |
365 } | 367 } |
366 | 368 |
367 void PepperMediaStreamVideoTrackHost::OnVideoFrame( | 369 void PepperMediaStreamVideoTrackHost::OnVideoFrame( |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 } | 524 } |
523 | 525 |
524 void PepperMediaStreamVideoTrackHost::OnTrackStarted( | 526 void PepperMediaStreamVideoTrackHost::OnTrackStarted( |
525 MediaStreamSource* source, | 527 MediaStreamSource* source, |
526 MediaStreamRequestResult result, | 528 MediaStreamRequestResult result, |
527 const blink::WebString& result_name) { | 529 const blink::WebString& result_name) { |
528 DVLOG(3) << "OnTrackStarted result: " << result; | 530 DVLOG(3) << "OnTrackStarted result: " << result; |
529 } | 531 } |
530 | 532 |
531 } // namespace content | 533 } // namespace content |
OLD | NEW |