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

Side by Side Diff: content/browser/renderer_host/media/video_capture_device_client.cc

Issue 1134643002: Add distinction between RGB and RGBA native texture video frames and resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser/renderer_host/media/video_capture_device_client.h" 5 #include "content/browser/renderer_host/media/video_capture_device_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "content/browser/compositor/image_transport_factory.h" 10 #include "content/browser/compositor/image_transport_factory.h"
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 media::VideoFrame::WrapNativeTexture( 563 media::VideoFrame::WrapNativeTexture(
564 mailbox_holder.Pass(), 564 mailbox_holder.Pass(),
565 media::BindToCurrentLoop( 565 media::BindToCurrentLoop(
566 base::Bind(&VideoCaptureDeviceClient::TextureWrapHelper:: 566 base::Bind(&VideoCaptureDeviceClient::TextureWrapHelper::
567 ReleaseCallback, 567 ReleaseCallback,
568 this, image_id, texture_id)), 568 this, image_id, texture_id)),
569 frame_format.frame_size, 569 frame_format.frame_size,
570 gfx::Rect(frame_format.frame_size), 570 gfx::Rect(frame_format.frame_size),
571 frame_format.frame_size, 571 frame_format.frame_size,
572 base::TimeDelta(), 572 base::TimeDelta(),
573 true /* allow_overlay */); 573 true /* allow_overlay */,
574 true /* has_alpha */);
574 video_frame->metadata()->SetDouble(media::VideoFrameMetadata::FRAME_RATE, 575 video_frame->metadata()->SetDouble(media::VideoFrameMetadata::FRAME_RATE,
575 frame_format.frame_rate); 576 frame_format.frame_rate);
576 577
577 BrowserThread::PostTask( 578 BrowserThread::PostTask(
578 BrowserThread::IO, FROM_HERE, 579 BrowserThread::IO, FROM_HERE,
579 base::Bind( 580 base::Bind(
580 &VideoCaptureController::DoIncomingCapturedVideoFrameOnIOThread, 581 &VideoCaptureController::DoIncomingCapturedVideoFrameOnIOThread,
581 controller_, base::Passed(&buffer), video_frame, timestamp)); 582 controller_, base::Passed(&buffer), video_frame, timestamp));
582 } 583 }
583 584
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 void VideoCaptureDeviceClient::TextureWrapHelper::OnError( 668 void VideoCaptureDeviceClient::TextureWrapHelper::OnError(
668 const std::string& message) { 669 const std::string& message) {
669 DCHECK(capture_task_runner_->BelongsToCurrentThread()); 670 DCHECK(capture_task_runner_->BelongsToCurrentThread());
670 DLOG(ERROR) << message; 671 DLOG(ERROR) << message;
671 BrowserThread::PostTask( 672 BrowserThread::PostTask(
672 BrowserThread::IO, FROM_HERE, 673 BrowserThread::IO, FROM_HERE,
673 base::Bind(&VideoCaptureController::DoErrorOnIOThread, controller_)); 674 base::Bind(&VideoCaptureController::DoErrorOnIOThread, controller_));
674 } 675 }
675 676
676 } // namespace content 677 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698