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

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

Issue 1304393004: Change VideoCaptureDeliverFrameCB's signature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 "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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 frame_deliverer_->DeliverVideoFrame(frame); 364 frame_deliverer_->DeliverVideoFrame(frame);
365 } 365 }
366 366
367 // Makes the frame available again for plugin. 367 // Makes the frame available again for plugin.
368 SendEnqueueBufferMessageToPlugin(index); 368 SendEnqueueBufferMessageToPlugin(index);
369 return PP_OK; 369 return PP_OK;
370 } 370 }
371 371
372 void PepperMediaStreamVideoTrackHost::OnVideoFrame( 372 void PepperMediaStreamVideoTrackHost::OnVideoFrame(
373 const scoped_refptr<VideoFrame>& frame, 373 const scoped_refptr<VideoFrame>& frame,
374 const base::TimeTicks& estimated_capture_time) { 374 base::TimeTicks estimated_capture_time) {
375 DCHECK(frame.get()); 375 DCHECK(frame.get());
376 // TODO(penghuang): Check |frame->end_of_stream()| and close the track. 376 // TODO(penghuang): Check |frame->end_of_stream()| and close the track.
377 PP_VideoFrame_Format ppformat = ToPpapiFormat(frame->format()); 377 PP_VideoFrame_Format ppformat = ToPpapiFormat(frame->format());
378 if (ppformat == PP_VIDEOFRAME_FORMAT_UNKNOWN) 378 if (ppformat == PP_VIDEOFRAME_FORMAT_UNKNOWN)
379 return; 379 return;
380 380
381 if (source_frame_size_.IsEmpty()) { 381 if (source_frame_size_.IsEmpty()) {
382 source_frame_size_ = frame->visible_rect().size(); 382 source_frame_size_ = frame->visible_rect().size();
383 source_frame_format_ = ppformat; 383 source_frame_format_ = ppformat;
384 InitBuffers(); 384 InitBuffers();
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } 527 }
528 528
529 void PepperMediaStreamVideoTrackHost::OnTrackStarted( 529 void PepperMediaStreamVideoTrackHost::OnTrackStarted(
530 MediaStreamSource* source, 530 MediaStreamSource* source,
531 MediaStreamRequestResult result, 531 MediaStreamRequestResult result,
532 const blink::WebString& result_name) { 532 const blink::WebString& result_name) {
533 DVLOG(3) << "OnTrackStarted result: " << result; 533 DVLOG(3) << "OnTrackStarted result: " << result;
534 } 534 }
535 535
536 } // namespace content 536 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698